question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SyntaxError: invalid syntax (0.10.1) & ImportError: No module named enums (0.9.9)

See original GitHub issue

installed using setup.py…

PyEmVue-0.10.1# python -m pyemvue ../keys.json
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/usr/lib/python2.7/runpy.py", line 111, in _get_module_details
    __import__(mod_name)  # Do not catch exceptions initializing package
  File "pyemvue/__init__.py", line 2, in <module>
    from pyemvue.pyemvue import PyEmVue
  File "pyemvue/pyemvue.py", line 85
    raise ValueError(f'Scale of {scale} is invalid, must be 1S, 1MIN, 15MIN, or 1H.')
                                                                                   ^
SyntaxError: invalid syntax

# ls /usr/local/lib/python2.7/dist-packages|grep vue
pyemvue-0.10.1-py2.7.egg

tried downgrading,… diff error:

PyEmVue-0.9.9# python -m pyemvue ../keys.json
 Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/usr/lib/python2.7/runpy.py", line 111, in _get_module_details
    __import__(mod_name)  # Do not catch exceptions initializing package
  File "pyemvue/__init__.py", line 2, in <module>
    from pyemvue.pyemvue import PyEmVue
  File "pyemvue/pyemvue.py", line 12, in <module>
    from pyemvue.enums import Scale, Unit, TotalTimeFrame, TotalUnit
ImportError: No module named enums
# ls /usr/local/lib/python2.7/dist-packages|grep vue
pyemvue-0.9.9-py2.7.egg


# python --version
Python 2.7.12

also tried w/ python3 w/ same errors.

# python3 --version
Python 3.5.2
# ls /usr/local/lib/python3.5/dist-packages/|grep vue
pyemvue-0.10.1-py3.5.egg

any ideas?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
magico13commented, Sep 9, 2020

So it looks like because I use f-strings to do string formatting that requires python 3.6 or higher. I can swap all of those over to str.Format to possibly work with older python versions but I don’t have time right now to do so, so you upgrading to 3.6+ might be quicker.

0reactions
ikishkcommented, Sep 10, 2020

perfect and outside the box, love it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: No module named enum - python - Stack Overflow
Show activity on this post. I ran into this issue with Python 3.6 and Python 3.7 . The top answer (running pip install...
Read more >
ImportError: No module named enum on python 2.7 #16
I installed llvmlite in a virtual environment with pip install -e git+https://github.com/numba/llvmlite.git#egg=llvmlite But then an import ...
Read more >
How to fix Python 'ImportError: No module named enum'
The enum module is only available in Python 3! You are trying to use it in Python 2. Try running your code with...
Read more >
fullresults.2013-05-14.txt - debian.org Developers LDAP Search
stdio.h:457:1: error: 'gets' undeclared here (not in a function) acct 6.5.5-1 ... 0.7.1-3 Failed [PYTHON_TRACEBACK/PYIMPORT] ImportError: No module named ...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
... Bug:111388 - "pyfest ebuild-- python module for festival" status:RESOLVED ... ImportError: No module named sqlite3" status:RESOLVED resolution:OBSOLETE ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found