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

Sample code ImportError: cannot import name 'messages' #15

Closed
Muffo opened this issue Nov 15, 2018 · 3 comments
Closed

Sample code ImportError: cannot import name 'messages' #15

Muffo opened this issue Nov 15, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@Muffo
Copy link

Muffo commented Nov 15, 2018

After installing the library, I am trying to run the sample code.
From the repository root folder:

$ examples/print_hierarchy.py
Traceback (most recent call last):
  File "examples/print_hierarchy.py", line 11, in <module>
    from systemrdl import RDLCompiler, RDLListener, RDLWalker, RDLCompileError
  File "/root/my/systemrdl-compiler/examples/../systemrdl/__init__.py", line 2, in <module>
    from .compiler import RDLCompiler
  File "/root/my/systemrdl-compiler/examples/../systemrdl/compiler.py", line 5, in <module>
    from . import messages
  File "/root/my/systemrdl-compiler/examples/../systemrdl/messages.py", line 12, in <module>
    from .preprocessor.preprocessor import PreprocessedInputStream
  File "/root/my/systemrdl-compiler/examples/../systemrdl/preprocessor/preprocessor.py", line 11, in <module>
    from .. import messages
ImportError: cannot import name 'messages'

Is this a configuration issue or a bug in the sample code?

Commit id: a130367

@Muffo Muffo changed the title ImportError: cannot import name 'messages' Sample code ImportError: cannot import name 'messages' Nov 15, 2018
@amykyta3
Copy link
Member

Local tests as well as seem to work.
I suspect this is also related to running using Python 3.4

If possible, see if you can use Python 3.5 or newer.
In the meantime, I'll setup up a virtualenv and see if I can work through getting 3.4 supported as it is still pretty common.

@Muffo
Copy link
Author

Muffo commented Nov 15, 2018

That's a good point! I'll see if I can test this with a more recent version of Python.

@amykyta3
Copy link
Member

Fixed. See details in #16

@amykyta3 amykyta3 added feature New feature or request bug Something isn't working and removed feature New feature or request labels Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants