pylint issue

141 views
Skip to first unread message

Steve

unread,
Apr 25, 2013, 12:00:08 PM4/25/13
to spyd...@googlegroups.com
Has anyone seen this traceback before?  The weird thing is it only happens on some files, but it is repeatable.

Traceback (most recent call last):

File "c:\python27\scripts\pylint-script.py", line 8, in <module>

load_entry_point('pylint==0.27.0', 'console_scripts', 'pylint')()

File "c:\python27\lib\site-packages\pylint\__init__.py", line 21, in run_pylint

Run(sys.argv[1:])

File "c:\python27\lib\site-packages\pylint\lint.py", line 991, in __init__

linter.check(args)

File "c:\python27\lib\site-packages\pylint\lint.py", line 587, in check

self.check_astng_module(astng, walker, rawcheckers)

File "c:\python27\lib\site-packages\pylint\lint.py", line 666, in check_astng_module

walker.walk(astng)

File "c:\python27\lib\site-packages\pylint\utils.py", line 600, in walk

self.walk(child)

File "c:\python27\lib\site-packages\pylint\utils.py", line 600, in walk

self.walk(child)

File "c:\python27\lib\site-packages\pylint\utils.py", line 597, in walk

cb(astng)

File "c:\python27\lib\site-packages\pylint\checkers\typecheck.py", line 222, in visit_assign

function_node = safe_infer(node.value.func)

File "c:\python27\lib\site-packages\pylint\checkers\utils.py", line 83, in safe_infer

inferit.next()

File "c:\python27\lib\site-packages\logilab\astng\bases.py", line 304, in wrapped

for res in _func(node, context, **kwargs):

File "c:\python27\lib\site-packages\logilab\astng\bases.py", line 328, in wrapper

for node in func(*args, **kwargs):

File "c:\python27\lib\site-packages\logilab\astng\inference.py", line 211, in infer_getattr

for owner in self.expr.infer(context):

File "c:\python27\lib\site-packages\logilab\astng\bases.py", line 304, in wrapped

for res in _func(node, context, **kwargs):

File "c:\python27\lib\site-packages\logilab\astng\bases.py", line 328, in wrapper

for node in func(*args, **kwargs):

File "c:\python27\lib\site-packages\logilab\astng\inference.py", line 217, in infer_getattr

for obj in owner.igetattr(self.attrname, context):

File "c:\python27\lib\site-packages\logilab\astng\bases.py", line 115, in _infer_stmts

for infered in stmt.infer(context):

File "c:\python27\lib\site-packages\logilab\astng\bases.py", line 304, in wrapped

for res in _func(node, context, **kwargs):

File "c:\python27\lib\site-packages\logilab\astng\inference.py", line 179, in infer_import

yield self.do_import_module(self.real_name(name))

File "c:\python27\lib\site-packages\logilab\astng\mixins.py", line 117, in do_import_module

return mymodule.import_module(modname, level=level)

File "c:\python27\lib\site-packages\logilab\astng\scoped_nodes.py", line 348, in import_module

return MANAGER.astng_from_module_name(modname)

File "c:\python27\lib\site-packages\logilab\astng\manager.py", line 136, in astng_from_module_name

return self.astng_from_file(filepath, modname, fallback=False)

File "c:\python27\lib\site-packages\logilab\astng\manager.py", line 107, in astng_from_file

return ASTNGBuilder(self).file_build(filepath, modname)

File "c:\python27\lib\site-packages\logilab\astng\builder.py", line 129, in file_build

node = self.string_build(data, modname, path)

File "c:\python27\lib\site-packages\logilab\astng\builder.py", line 135, in string_build

module = self._data_build(data, modname, path)

File "c:\python27\lib\site-packages\logilab\astng\builder.py", line 151, in _data_build

node = parse(data + '\n')

File "c:\python27\lib\site-packages\logilab\astng\builder.py", line 41, in parse

return compile(string, "<string>", 'exec', PyCF_ONLY_AST)

TypeError: compile() expected string without null bytes


Carlos Córdoba

unread,
Apr 26, 2013, 12:30:01 PM4/26/13
to spyd...@googlegroups.com
This seems an error with a library pylint depends on. Could you upload a
file that always gives you this error?

El 25/04/13 11:00, Steve escribió:
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to spyderlib+...@googlegroups.com.
> To post to this group, send email to spyd...@googlegroups.com.
> Visit this group at http://groups.google.com/group/spyderlib?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Steve

unread,
Apr 26, 2013, 6:23:45 PM4/26/13
to spyd...@googlegroups.com
I just reproduced the issue by pylinting C:\Python27\Lib\argparse.py

Jed Ludlow

unread,
Apr 26, 2013, 11:56:12 PM4/26/13
to spyderlib
On Fri, Apr 26, 2013 at 4:23 PM, Steve <steve.f....@gmail.com> wrote:
I just reproduced the issue by pylinting C:\Python27\Lib\argparse.py


Hi, Steve. I can't reproduce the traceback by pylinting argparse.py on either Windows or Linux. Does it generate the traceback every time for you when with argparse.py?

Steve

unread,
Apr 29, 2013, 11:54:29 AM4/29/13
to spyd...@googlegroups.com
Yes, I can restart spyder and the issue still occurs.

Steve

unread,
Apr 30, 2013, 10:39:21 AM4/30/13
to spyd...@googlegroups.com
I also updated to pylint 0.28.0 with no help.  Maybe I should go backwards?

Steve

unread,
Apr 30, 2013, 11:08:06 AM4/30/13
to spyd...@googlegroups.com
This seemed more like an issue with lower level stuff and not spyder.  I decided to nuke my entire python install and start from scratch.  pylint is working correctly again.

Carlos Córdoba

unread,
Apr 30, 2013, 11:11:38 AM4/30/13
to spyd...@googlegroups.com
I also thought that was case. What about your problems with IPython? Were they solved too?

El 30/04/13 10:08, Steve escribió:
--

Steve

unread,
Apr 30, 2013, 11:40:25 AM4/30/13
to spyd...@googlegroups.com
No, ipython is still not working.  I tried that custom sitecustomize.py you sent me and it did not help.

Also, I updated to pylint 0.28.0 because it fixes bugs that were causing issues for me.  Now when I click an item in the pylint window it's not jumping to the line in the editor.  :(
Reply all
Reply to author
Forward
0 new messages