question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pypy/Twisted incompatibility

See original GitHub issue

Hi,

I tried running a few of our internal tests using the latest pypy (version 5.10), and hit a compatibility issue with the Twisted Failure object():

from tblib import pickling_support
pickling_support.install()

import six, pickle, sys
from twisted.python.failure import Failure

try:
	raise ValueError
except ValueError:
	s = pickle.dumps(sys.exc_info())

try:
	six.reraise(*pickle.loads(s))
except ValueError:
	f = Failure()

print('F', f)

This works on both Python 2.7.13, 3.6.3, but not the latest pypy. The error output was:

Traceback (most recent call last):
  File "twisted_six.py", line 10, in <module>
    s = pickle.dumps(sys.exc_info())
  File "/home/arni/dohop/pypy-5.10.0-linux_x86_64-portable/lib-python/2.7/pickle.py", line 1431, in dumps
    Pickler(file, protocol).dump(obj)
  File "/home/arni/dohop/pypy-5.10.0-linux_x86_64-portable/lib-python/2.7/pickle.py", line 224, in dump
    self.save(obj)
  File "/home/arni/dohop/pypy-5.10.0-linux_x86_64-portable/lib-python/2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/home/arni/dohop/pypy-5.10.0-linux_x86_64-portable/lib-python/2.7/pickle.py", line 570, in save_tuple
    save(element)
  File "/home/arni/dohop/pypy-5.10.0-linux_x86_64-portable/lib-python/2.7/pickle.py", line 292, in save
    rv = reduce(obj)
  File "/home/arni/dohop/virtualenvs/pypy_5_10/site-packages/tblib/pickling_support.py", line 20, in pickle_traceback
    return unpickle_traceback, (Frame(tb.tb_frame), tb.tb_lineno, tb.tb_next and Traceback(tb.tb_next))
  File "/home/arni/dohop/virtualenvs/pypy_5_10/site-packages/tblib/__init__.py", line 54, in __init__
    self.f_back = Traceback(frame.f_back)
  File "/home/arni/dohop/virtualenvs/pypy_5_10/site-packages/tblib/__init__.py", line 69, in __init__
    self.tb_frame = Frame(tb.tb_frame)
AttributeError: 'NoneType' object has no attribute 'tb_frame'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ionelmccommented, May 2, 2019

@arnimarj there is indeed a problem with Twisted that will be fixed. However the traceback you pasted doesn’t match the code in the 1.3.2 release: https://github.com/ionelmc/python-tblib/blob/v1.3.2/src/tblib/__init__.py#L54

0reactions
ionelmccommented, May 2, 2019

Released v1.4.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

twisted-iocpsupport - PyPI
An extension for use in the L{twisted.internet.iocpreactor} I/O Completion Ports reactor. This code was initially part of the core Twisted project.
Read more >
Pip Install Twisted Error 1 - python - Stack Overflow
Twisted includes C extensions so this seems possible. Do you have a C toolchain? You're using an incompatible version of Python.
Read more >
Twisted Release Process — Twisted 22.4.0 documentation
PyPi file publishing is done via GitHub Actions workflow when a tag is created. Any Twisted contributor in GitHub should have access to...
Read more >
Found conflicts. Incompatible packages when installing. #1018
Bugs / Unexpected behaviors Hi, when i install pytorch3d follow the instruction, i get the below error: Found conflicts!
Read more >
Twisted Release Process — Twisted 17.9.0 documentation
Admin privileges for Twisted's PyPI packages; Contributor status for the Twisted blog; Read The Docs access for the Twisted project. Version numbers¶. Twisted...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found