print function imported from __future__ causes inspection to fail
Bug #683031 reported by
Daniel Lee
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pythoscope |
Confirmed
|
Medium
|
Unassigned |
Bug Description
e.g.
'''
test.py
'''
from __future__ import print_function
class Class(object):
def method(self):
WARNING: Inspection of module path\test.py failed.
description: | updated |
Changed in pythoscope: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
To post a comment you must log in.
This may be related: If you have a from future print import and you run pythoscope --init, the resulting pickle files crash pythoscope on load when you try to run pythoscope again.
To reproduce, put a python file with the from future bug and one that analyzes fine in the same directory.
run pythoscope --init
pythoscope will complain with a warning:
WARNING: Inspection of module <bad_module_here> failed.
Then run pythoscope good_module.py
I get the following traceback:
ERROR: Oops, it seems that an internal Pythoscope error occurred. Please file a bug report at https:/ /bugs.launchpad .net/pythoscope
Traceback (most recent call last): bin/pythoscope" , line 9, in <module> entry_point( 'pythoscope= =0.4.3' , 'console_scripts', 'pythoscope')() lib/python2. 7/dist- packages/ pythoscope/ __init_ _.py", line 190, in main tests(args, force, template) lib/python2. 7/dist- packages/ pythoscope/ __init_ _.py", line 117, in generate_tests from_directory( find_project_ directory( modules[ 0])) lib/python2. 7/dist- packages/ pythoscope/ store.py" , line 69, in from_directory from(get_ pickle_ path(project_ path)) lib/python2. 7/dist- packages/ pythoscope/ util.py" , line 365, in load_pickle_from pgen2.parse. ParseError' >, ("bad input: type=22, value='=', context=(' ', (182, 23))",))
File "/usr/local/
load_
File "/usr/local/
generate_
File "/usr/local/
project = Project.
File "/usr/local/
project = load_pickle_
File "/usr/local/
obj = cPickle.load(fd)
TypeError: ('__init__() takes exactly 5 arguments (2 given)', <class 'lib2to3.
I'm running pythoscope 0.4.3