Code crashes on decode

Bug #1475988 reported by Derek
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Pythoscope
New
Undecided
Unassigned

Bug Description

Stack trace:

Stack trace:

  File "/home/john/.virtualenvs/treads/bin/pythoscope", line 11, in <module>
    sys.exit(main())
  File "/home/john/.virtualenvs/treads/local/lib/python2.7/site-packages/pythoscope/__init__.py", line 190, in main
    generate_tests(args, force, template)
  File "/home/john/.virtualenvs/treads/local/lib/python2.7/site-packages/pythoscope/__init__.py", line 118, in generate_tests
    inspect_project(project)
  File "/home/john/.virtualenvs/treads/local/lib/python2.7/site-packages/pythoscope/inspector/__init__.py", line 12, in inspect_project
    updates = inspect_project_statically(project)
  File "/home/john/.virtualenvs/treads/local/lib/python2.7/site-packages/pythoscope/inspector/__init__.py", line 55, in inspect_project_statically
    return add_and_update_modules(project) + \
  File "/home/john/.virtualenvs/treads/local/lib/python2.7/site-packages/pythoscope/inspector/__init__.py", line 37, in add_and_update_modules
    static.inspect_module(project, modpath)
  File "/home/john/.virtualenvs/treads/local/lib/python2.7/site-packages/pythoscope/inspector/static.py", line 130, in inspect_module
    return inspect_code(project, path, read_file_contents(path))
  File "/home/john/.virtualenvs/treads/local/lib/python2.7/site-packages/pythoscope/inspector/static.py", line 135, in inspect_code
    tree = parse(code)
  File "/home/john/.virtualenvs/treads/local/lib/python2.7/site-packages/pythoscope/astbuilder.py", line 82, in parse
    result = drv.parse_string(code, True)
  File "/usr/lib/python2.7/lib2to3/pgen2/driver.py", line 106, in parse_string
    return self.parse_tokens(tokens, debug)
  File "/usr/lib/python2.7/lib2to3/pgen2/driver.py", line 60, in parse_tokens
    prefix += value
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 12: ordinal not in range(128)

Revision history for this message
Michal Kwiatkowski (ruby) wrote :

Hi Derek, thank you for reporting this!

Have you tried using the pythoscope version in trunk? See the first comment in https://bugs.launchpad.net/pythoscope/+bug/922540

Revision history for this message
Derek (gamesbook) wrote :

Hi Michal - no I have not tried it, but I can do so.

Revision history for this message
Derek (gamesbook) wrote :

Are there plans to release 0.5 to PyPi?

Revision history for this message
Michal Kwiatkowski (ruby) wrote :

This seems to be a recurring problem, so I will release 0.5 to PyPI this week.

Revision history for this message
Michal Kwiatkowski (ruby) wrote :

...or rather another 0.4.x, as the 0.5 is not complete.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.