Opened 5 years ago

Closed 5 years ago

#8759 defect closed duplicate (duplicate)

Circular dependency on twisted.trial.reporter leads to ImportError

Reported by: nessita Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:

Description (last modified by nessita)


I'm using python-twisted-core from the debian package available in Ubuntu LTS 16.04 (Xenial), version 16.0.0-1.

I get an ImportError when trying to import from twisted.trial.reporter caused by a circular import between reporter -> unittest -> _asynctestrunner -> reporter:

>>> from twisted.trial.reporter import TreeReporter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/twisted/trial/", line 29, in <module>
    from twisted.trial.unittest import makeTodo
  File "/usr/lib/python2.7/dist-packages/twisted/trial/", line 16, in <module>
    from twisted.trial._asyncrunner import (
  File "/usr/lib/python2.7/dist-packages/twisted/trial/", line 16, in <module>
    from twisted.trial import itrial, reporter
ImportError: cannot import name reporter

Change History (3)

comment:1 Changed 5 years ago by nessita

Description: modified (diff)

comment:2 Changed 5 years ago by nessita

Description: modified (diff)

comment:3 Changed 5 years ago by Julian Berman

Resolution: duplicate
Status: newclosed

This is a duplicate of #8267.

Note: See TracTickets for help on using tickets.