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

ImportError: cannot import name 'default_variator' from 'platypus' #246

Closed
EwoutH opened this issue Sep 8, 2024 · 3 comments
Closed

ImportError: cannot import name 'default_variator' from 'platypus' #246

EwoutH opened this issue Sep 8, 2024 · 3 comments

Comments

@EwoutH
Copy link
Contributor

EwoutH commented Sep 8, 2024

Our CI detected a new import error, on using platypus-opt 1.3.0.

ImportError: cannot import name 'default_variator' from 'platypus'

Location the import error originates from: outputspace_exploration.py#L30

@dhadka
Copy link
Member

dhadka commented Sep 8, 2024

I sent a PR to EMAWorkbench with two possible fixes. One in the PR and one in the PR's description, depending if you want to support both versions of just 1.3.0 moving forward.

quaquel/EMAworkbench#369

@dhadka
Copy link
Member

dhadka commented Sep 9, 2024

Version 1.3.1 is published that adds these methods back. However, they now warn about being deprecated, so you may still see CI errors if pytest is configured to fail on warnings.

If it's still causing issues for your CI, you might need to ignore these with something like:

import warnings
warnings.filterwarnings('ignore', message=".*PlatypusConfig.*", category=DeprecationWarning)

or

-Wignore::DeprecationWarning::

@EwoutH
Copy link
Contributor Author

EwoutH commented Sep 9, 2024

Thanks for both the bugfix release and the solutions provided!

@EwoutH EwoutH closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants