-
Notifications
You must be signed in to change notification settings - Fork 795
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
More readable error messages #480
Comments
Yuck, I will have a look.
…On Sat, Feb 24, 2018 at 12:47 PM, Jake Vanderplas ***@***.***> wrote:
Assigned #480 <#480> to
@ellisonbg <https://github.com/ellisonbg>.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#480 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AABr0FzgiVhKAjxRCuvNntPKYEIXERRZks5tYHVVgaJpZM4SSCfm>
.
--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgranger@calpoly.edu and ellisonbg@gmail.com
|
This was referenced Feb 26, 2018
This was referenced Mar 5, 2018
Edit: current behavior is better, but still has an extra error from the renderer: ---------------------------------------------------------------------------
SchemaValidationError Traceback (most recent call last)
~/anaconda/envs/altair-dev/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj, include, exclude)
968
969 if method is not None:
--> 970 return method(include=include, exclude=exclude)
971 return None
972 else:
~/github/altair-viz/altair/altair/vegalite/v2/api.py in _repr_mimebundle_(self, include, exclude)
320 def _repr_mimebundle_(self, include, exclude):
321 """Return a MIME bundle for display in Jupyter frontends."""
--> 322 return renderers.get()(self.to_dict())
323
324 def repeat(self, row=Undefined, column=Undefined, **kwargs):
~/github/altair-viz/altair/altair/vegalite/v2/api.py in to_dict(self, *args, **kwargs)
254 if dct is None:
255 kwargs['validate'] = 'deep'
--> 256 dct = super(TopLevelMixin, copy).to_dict(*args, **kwargs)
257
258 if is_top_level:
~/github/altair-viz/altair/altair/utils/schemapi.py in to_dict(self, validate, ignore, context)
228 self.validate(result)
229 except jsonschema.ValidationError as err:
--> 230 raise SchemaValidationError(self, err)
231 return result
232
SchemaValidationError: Invalid specification
altair.vegalite.v2.api.Chart, validating 'required'
'mark' is a required property
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-9828fa16e394> in <module>()
1 import altair as alt
----> 2 alt.Chart()
~/anaconda/envs/altair-dev/lib/python3.6/site-packages/IPython/core/displayhook.py in __call__(self, result)
255 self.start_displayhook()
256 self.write_output_prompt()
--> 257 format_dict, md_dict = self.compute_format_data(result)
258 self.update_user_ns(result)
259 self.fill_exec_result(result)
~/anaconda/envs/altair-dev/lib/python3.6/site-packages/IPython/core/displayhook.py in compute_format_data(self, result)
149
150 """
--> 151 return self.shell.display_formatter.format(result)
152
153 # This can be set to True by the write_output_prompt method in a subclass
~/anaconda/envs/altair-dev/lib/python3.6/site-packages/IPython/core/formatters.py in format(self, obj, include, exclude)
148 return {}, {}
149
--> 150 format_dict, md_dict = self.mimebundle_formatter(obj, include=include, exclude=exclude)
151
152 if format_dict or md_dict:
TypeError: 'NoneType' object is not iterable |
This may have been fixed here: But not released yet. Eventually, we should maybe test the version of ipython and only do the hack for versions < 6.2 or 5.6. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a chart produces an invalid schema, the error message is really hard to understand.
One reason for this is that the mime-bundle display system also throws a "NoneType is not iterable" error after the jsonschema validation error.
We really need to figure out how to clean this up. An example, trying to display an empty chart. In a perfect world, I'd like this to just output
ValidationError: mark must be specified
(or something similar).The text was updated successfully, but these errors were encountered: