NameError: name 'sys' is not defined

Issue #317 resolved
Dmitry Trofimov created an issue

Seems like sys is not imported in

Traceback (most recent call last):
  File "/home/vagrant/.pycharm_helpers/", line 11, in <module>
    from coverage.cmdline import main
  File "/home/vagrant/.pycharm_helpers/coverage/", line 10, in <module>
    from coverage.control import coverage, process_startup
  File "/home/vagrant/.pycharm_helpers/coverage/", line 8, in <module>
    from coverage.annotate import AnnotateReporter
  File "/home/vagrant/.pycharm_helpers/coverage/", line 5, in <module>
    from coverage.backward import sorted                    # pylint: disable=W0622
  File "/home/vagrant/.pycharm_helpers/coverage/", line 88, in <module>
    if sys.version_info >= (3, 0):
NameError: name 'sys' is not defined

Comments (5)

  1. Ned Batchelder repo owner

    @traff This is a very odd error. Can you supply the full contents of /home/vagrant/.pycharm_helpers/coverage/ This problem has never been reported by anyone else, and seems like a fundamental error that everyone would encounter.

  2. Dmitry Trofimov reporter

    Hi Ned, sorry for the false alarm. My coverage/ got corrupted somehow and the import line was missing.

  3. Log in to comment