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

Unpacking errors #11

Closed
mitar opened this issue Feb 4, 2018 · 3 comments
Closed

Unpacking errors #11

mitar opened this issue Feb 4, 2018 · 3 comments

Comments

@mitar
Copy link

mitar commented Feb 4, 2018

When I am trying to run flake8 with this plugin enabled, I get the following error:

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 463, in _handle_results
    task = get()
  File "/usr/local/lib/python3.6/multiprocessing/connection.py", line 251, in recv
    return _ForkingPickler.loads(buf.getbuffer())
TypeError: __init__() missing 3 required positional arguments: 'type', 'value', and 'context'

Python 3.6.3.

Not sure how can I debug this.

@mitar
Copy link
Author

mitar commented Feb 4, 2018

That's the value of the buffer trying to be unpickled:

b'\x80\x03K\x00K\x05\x89cmultiprocessing.pool\nrebuild_exc\nq\x00cawpa.pgen2.parse\nParseError\nq\x01X4\x00\x00\x00bad input: type=23, value=\'.\', context=(\'\', (25, 4))q\x02\x85q\x03Rq\x04}q\x05(X\x03\x00\x00\x00msgq\x06X\t\x00\x00\x00bad inputq\x07X\x04\x00\x00\x00typeq\x08K\x17X\x05\x00\x00\x00valueq\tX\x01\x00\x00\x00.q\nX\x07\x00\x00\x00contextq\x0bX\x00\x00\x00\x00q\x0cK\x19K\x04\x86q\r\x86q\x0eubX\xce\x05\x00\x00\n"""\nTraceback (most recent call last):\n  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 119, in worker\n    result = (True, func(*args, **kwds))\n  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar\n    return list(map(*args))\n  File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 648, in _run_checks\n    return checker.run_checks()\n  File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 579, in run_checks\n    self.run_ast_checks()\n  File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 493, in run_ast_checks\n    for (line_number, offset, text, check) in runner:\n  File "/usr/local/lib/python3.6/site-packages/ebb_lint/flake8.py", line 216, in run\n    tree, trailing_newline = self._grammar.parse_source(self.source)\n  File "/usr/local/lib/python3.6/site-packages/awpa/pgen2/grammar.py", line 142, in parse_source\n    tree = Driver(self, convert=convert).parse_string(source)\n  File "/usr/local/lib/python3.6/site-packages/awpa/pgen2/driver.py", line 111, in parse_string\n    return self.parse_tokens(tokens, debug)\n  File "/usr/local/lib/python3.6/site-packages/awpa/pgen2/driver.py", line 75, in parse_tokens\n    if p.addtoken(type, value, (prefix, start)):\n  File "/usr/local/lib/python3.6/site-packages/awpa/pgen2/parse.py", line 159, in addtoken\n    raise ParseError("bad input", type, value, context)\nawpa.pgen2.parse.ParseError: bad input: type=23, value=\'.\', context=(\'\', (25, 4))\n"""q\x0f\x86q\x10Rq\x11\x86q\x12\x87q\x13.'

@mitar
Copy link
Author

mitar commented Feb 4, 2018

OK, I figured it out. I had such method defined:

@abc.abstractmethod
def foobar(self):
    ...

Changing it to pass instead of ... removed the problem.

So it seems awpa cannot parse ....

@Julian
Copy link
Member

Julian commented Jan 3, 2019

Closing this here since yeah seems like this is something to solve upstream.

@Julian Julian closed this as completed Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants