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

assignment 4, inspect_tradeoff shows depreciation warning #16

Closed
BRtudelft opened this issue May 15, 2023 · 6 comments
Closed

assignment 4, inspect_tradeoff shows depreciation warning #16

BRtudelft opened this issue May 15, 2023 · 6 comments

Comments

@BRtudelft
Copy link

/Users/brittreddingius/Documents/pythonProject2/lib/python3.11/site-packages/altair/utils/deprecation.py:65: AltairDeprecationWarning: 'selection_single' is deprecated.  Use 'selection_point'
  warnings.warn(message, AltairDeprecationWarning, stacklevel=1)

SchemaValidationError                     Traceback (most recent call last)
File ~/Documents/pythonProject2/lib/python3.11/site-packages/altair/vegalite/v5/api.py:843, in TopLevelMixin.to_dict(self, *args, **kwargs)
    838 kwargs["context"] = context
    840 # TopLevelMixin instance does not necessarily have to_dict defined
    841 # but due to how Altair is set up this should hold.
    842 # Too complex to type hint right now
--> 843 dct = super(TopLevelMixin, copy).to_dict(*args, **kwargs)  # type: ignore[misc]
    845 # TODO: following entries are added after validation. Should they be validated?
    846 if is_top_level:
    847     # since this is top-level we add $schema if it's missing

File ~/Documents/pythonProject2/lib/python3.11/site-packages/altair/utils/schemapi.py:814, in SchemaBase.to_dict(self, validate, ignore, context)
    807         self.validate(result)
    808     except jsonschema.ValidationError as err:
    809         # We do not raise `from err` as else the resulting
    810         # traceback is very long as it contains part
    811         # of the Vega-Lite schema. It would also first
    812         # show the less helpful ValidationError instead of
    813         # the more user friendly SchemaValidationError
--> 814         raise SchemaValidationError(self, err) from None
    815 return result

SchemaValidationError: `VConcatChart` has no parameter named 'selection'

Existing parameter names are:
vconcat      center     description   params    title       
autosize     config     name          resolve   transform   
background   data       padding       spacing   usermeta    
bounds       datasets                                       

See the help for `VConcatChart` to read the full description of these parameters
@quaquel
Copy link
Owner

quaquel commented May 15, 2023

Which version of altair do you have installed? You can check this with altair.__version__ in e.g., a notebook after having imported altair?

@EwoutH
Copy link
Collaborator

EwoutH commented May 15, 2023

I could not reproduce this bug with both Altair 4.2.2 or 5.0.0.

@BRtudelft If you could provide us with both your Altair version and EMAworkbench version (ema_workbench.__version__), and upload the full Jupyter notebook you're using, that would help us a lot!

Edit: I could reproduce it with altair 5.0.0, looking into it now.

@EwoutH
Copy link
Collaborator

EwoutH commented May 15, 2023

quaquel/EMAworkbench#270 fixes the deprecation warning, but not the SchemaValidationError.

@EwoutH
Copy link
Collaborator

EwoutH commented May 15, 2023

@BRtudelft I think I fixed the bug in quaquel/EMAworkbench#270. Could you install this version of the EMAworkbench to see if that's the case?

Screenshot_858 Screenshot_859
https://github.com/quaquel/EMAworkbench@altair-v5-fix#egg=ema-workbench

@BRtudelft
Copy link
Author

Thanks for the reaction. It works now!

@EwoutH
Copy link
Collaborator

EwoutH commented Jun 12, 2023

Closing this issue since it's confirmed fixed. Thanks for reporting!

@EwoutH EwoutH closed this as completed Jun 12, 2023
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

3 participants