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

Copying error does not include newlines #687

Merged
merged 2 commits into from
Jul 3, 2015

Conversation

astrofrog
Copy link
Member

When copying an error from the error console, the output is something like:

Traceback (most recent call last):
  File "/Users/tom/miniconda3/envs/gluedev/lib/python3.4/site-packages/glueviz-0.5.0-py3.4.egg/glue/core/application_base.py", line 25, in wrapper
    return func(*args, **kwargs)
  File "/Users/tom/miniconda3/envs/gluedev/lib/python3.4/site-packages/glueviz-0.5.0-py3.4.egg/glue/core/application_base.py", line 94, in save_session
    state = gs.dumps(indent=2)
  File "/Users/tom/miniconda3/envs/gluedev/lib/python3.4/site-packages/glueviz-0.5.0-py3.4.egg/glue/core/state.py", line 339, in dumps
    return json.dumps(result, indent=indent, default=self.json_default)
  File "/Users/tom/miniconda3/envs/gluedev/lib/python3.4/json/__init__.py", line 237, in dumps
    **kw).encode(obj)
  File "/Users/tom/miniconda3/envs/gluedev/lib/python3.4/json/encoder.py", line 194, in encode
    chunks = list(chunks)
  File "/Users/tom/miniconda3/envs/gluedev/lib/python3.4/json/encoder.py", line 422, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/Users/tom/miniconda3/envs/gluedev/lib/python3.4/json/encoder.py", line 396, in _iterencode_dict
    yield from chunks
  File "/Users/tom/miniconda3/envs/gluedev/lib/python3.4/json/encoder.py", line 396, in _iterencode_dict
    yield from chunks
  File "/Users/tom/miniconda3/envs/gluedev/lib/python3.4/json/encoder.py", line 430, in _iterencode
    yield from _iterencode(o, _current_indent_level)
  File "/Users/tom/miniconda3/envs/gluedev/lib/python3.4/json/encoder.py", line 427, in _iterencode
    raise ValueError("Circular reference detected")
ValueError: Circular reference detected


Newlines are missing...

@astrofrog astrofrog added the bug label Jul 3, 2015
@astrofrog
Copy link
Member Author

They are not missing but use the unicode \u2029. This PR normalizes this.

@astrofrog astrofrog mentioned this pull request Jul 3, 2015
@astrofrog astrofrog modified the milestone: 0.5.1 Jul 3, 2015
astrofrog added a commit that referenced this pull request Jul 3, 2015
Copying error does not include newlines
@astrofrog astrofrog merged commit 5d3215b into glue-viz:master Jul 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant