Skip to content

TypeError: compile() expected string without null bytes #118

@adiroiban

Description

@adiroiban

See https://travis-ci.org/twisted/twisted/jobs/148667038

this is produced if we run twistedchecker

we also got this errors in the past, is just that they were hidden among the many linter errors.

Traceback (most recent call last):
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/pylint/lint.py", line 586, in get_astng
    return MANAGER.astng_from_file(filepath, modname, source=True)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/manager.py", line 104, in astng_from_file
    return ASTNGBuilder(self).file_build(filepath, modname)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 128, in file_build
    node = self.string_build(data, modname, path)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 134, in string_build
    module = self._data_build(data, modname, path)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 150, in _data_build
    node = parse(data + '\n')
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 39, in parse
    return compile(string, "<string>", 'exec', PyCF_ONLY_AST)
TypeError: compile() expected string without null bytes
Traceback (most recent call last):
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/pylint/lint.py", line 586, in get_astng
    return MANAGER.astng_from_file(filepath, modname, source=True)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/manager.py", line 104, in astng_from_file
    return ASTNGBuilder(self).file_build(filepath, modname)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 128, in file_build
    node = self.string_build(data, modname, path)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 134, in string_build
    module = self._data_build(data, modname, path)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 150, in _data_build
    node = parse(data + '\n')
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 39, in parse
    return compile(string, "<string>", 'exec', PyCF_ONLY_AST)
TypeError: compile() expected string without null bytes
Traceback (most recent call last):
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/pylint/lint.py", line 586, in get_astng
    return MANAGER.astng_from_file(filepath, modname, source=True)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/manager.py", line 104, in astng_from_file
    return ASTNGBuilder(self).file_build(filepath, modname)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 128, in file_build
    node = self.string_build(data, modname, path)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 134, in string_build
    module = self._data_build(data, modname, path)
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 150, in _data_build
    node = parse(data + '\n')
  File "/home/travis/build/twisted/twisted/build/txchecker-travis/lib/python2.7/site-packages/logilab/astng/builder.py", line 39, in parse
    return compile(string, "<string>", 'exec', PyCF_ONLY_AST)
TypeError: compile() expected string without null bytes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions