sibradzic/upp

Import error

Opened this issue · 3 comments

Hey,

When I try to run upp.py I get this error:

"Traceback (most recent call last):
File "C:\upp-master\src\upp\upp.py", line 6, in (module)
from upp import decode
File "C:\upp-master\src\upp\upp.py", line 6, in (module)
from upp import decode
ImportError: cannot import name 'decode' from partially initialized moduel 'upp' (most likely due to a circular import) (C:\upp-master\src\upp\upp.py)".

How may I fix this?

Sincerely, Danske.

Hi @DansKEE, thanks for reporting.

To some questions first:

  1. Judging from your report, you are trying to run upp from Windows, right?
  2. Are you running upp directly from the root of the git source tree? Which particular command?
  3. What is stopping you from installing upp with pip3?
  4. If you totally have to run upp from the git source tree, have you tried running from src dir, as suggested in https://github.com/sibradzic/upp/blob/master/src/upp/upp.py#L1-L2
  5. Curious, what is your use case, what are you trying to achieve, in particular using upp in Windows?

Hey,

  1. Yes
  2. Yes, happens with all commands (help, dump, etc.)
  3. Nothing, didn't know about it
  4. Yes
  5. I'm trying to read the power play table of a vbios

That https://github.com/sibradzic/upp/blob/master/src/upp/upp.py#L1-L2 thing was meant for development and testing purposes anyway. Cool, just install the latest upp with pip, and don't worry about source code. Please let me know how it works in Windows and if you run into any issues...