Giter Site home page Giter Site logo

pypy-traceview's Issues

error: ImportError: cannot import name '__all__'

Hi,

I'm trying to use pypy-traceview. On Python 3.6, I get:

Traceback (most recent call last):
  File "./pypy-traceview", line 12, in <module>
    from pypy_traceview.renderer.html import render
  File "/home/staff/gback/python/pypy-traceview/pypy_traceview/renderer/html.py", line 2, in <module>
    from jinja2 import Template
  File "/home/staff/gback/python/venv/lib/python3.6/site-packages/jinja2/__init__.py", line 8, in <module>
    from .environment import Environment as Environment
  File "/home/staff/gback/python/venv/lib/python3.6/site-packages/jinja2/environment.py", line 17, in <module>
    from . import nodes
  File "/home/staff/gback/python/venv/lib/python3.6/site-packages/jinja2/nodes.py", line 5, in <module>
    import inspect
  File "/usr/lib64/python3.6/inspect.py", line 36, in <module>
    import dis
  File "/usr/lib64/python3.6/dis.py", line 9, in <module>
    from opcode import __all__ as _opcodes_all
ImportError: cannot import name '__all__'

I get the same error on Python 3.10:

$ PYTHONPATH=. ../venv/bin/pipenv run ./pypy-traceview ../logfile 
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Traceback (most recent call last):
  File "/home/gback/icpc/icpc-fall-2022/pickupsticks/pypy-traceview/./pypy-traceview", line 4, in <module>
    import pstats
  File "/usr/lib/python3.10/pstats.py", line 31, in <module>
    from dataclasses import dataclass
  File "/usr/lib/python3.10/dataclasses.py", line 5, in <module>
    import inspect
  File "/usr/lib/python3.10/inspect.py", line 38, in <module>
    import dis
  File "/usr/lib/python3.10/dis.py", line 9, in <module>
    from opcode import __all__ as _opcodes_all
ImportError: cannot import name '__all__' from 'opcode' (/home/gback/icpc/icpc-fall-2022/pickupsticks/pypy-traceview/pypy_traceview/opcode.py)

It seems that you are importing dis which in turn imports opcode but due to the PYTHONPATH setting picks up your version instead of the system version. I note that /usr/lib/python3.10/opcode.py has an __all__ export.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.