Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Color: should be a string" error in operator form #427

Closed
SylvainCorlay opened this issue Sep 16, 2024 · 5 comments
Closed

"Color: should be a string" error in operator form #427

SylvainCorlay opened this issue Sep 16, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@SylvainCorlay
Copy link
Member

When creating e.g. a union operator, I see the warning "Color: should be a string" in the form for the parameters of the operator.

I suppose there could be some default value assigned to the field so that it does not trigger an error.

Screenshot 2024-09-16 at 21 07 36
@SylvainCorlay SylvainCorlay added the bug Something isn't working label Sep 16, 2024
@arjxn-py
Copy link
Member

This was also reported in #413 (comment) but we couldn't reproduce it further 🫤

I shall try looking into this more, should be an easy fix as far as I anticipate once reproduced. Thanks for opening this.

I suppose there could be some default value assigned to the field so that it does not trigger an error.

Yes, it basically inherits the color of the base object which is being operated on.

@arjxn-py
Copy link
Member

@SylvainCorlay, can you maybe confirm how you got this error:

  • You must have created two objects
  • Then straight up clicked on any operator button. (Did you select any of the object before clicking on the operator button?)

@arjxn-py
Copy link
Member

Did you select any of the object before clicking on the operator button?

I ask as I could produce this another error when I haven't selected any object even once (related but not exactly this):

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'value')

I think this one error is because in case of never selected model.localState?.selected should be undefined.

Having said that this is a different error, I'd once again request you to try reproducing Color: should be a string error and maybe give some inference or observation that can help further. Apologies & Thanks.

@SylvainCorlay
Copy link
Member Author

Having said that this is a different error, I'd once again request you to try reproducing Color: should be a string error and maybe give some inference or observation that can help further. Apologies & Thanks.

This seems to occur when opening an old jcad file dating from before colors were part of the model. The color is missing in the first object of the union.

We may decide to ignore this issue at this point.

@arjxn-py
Copy link
Member

We may decide to ignore this issue at this point.

Sounds good to me, As it's not affecting new files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants