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

Invalid syntax after pip install #385

Closed
jpmens opened this issue Nov 20, 2019 · 4 comments
Closed

Invalid syntax after pip install #385

jpmens opened this issue Nov 20, 2019 · 4 comments

Comments

@jpmens
Copy link
Collaborator

jpmens commented Nov 20, 2019

$ python3 -mvenv v3
$ source v3/bin/activate
$ pip install mqttwarn
$ mqttwarn
Traceback (most recent call last):
  File "/private/tmp/m1/v3/bin/mqttwarn", line 11, in <module>
    load_entry_point('mqttwarn==0.11.3', 'console_scripts', 'mqttwarn')()
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/mqttwarn/commands.py", line 12, in <module>
    from mqttwarn.configuration import load_configuration
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/mqttwarn/configuration.py", line 123
    except Exception, e:
                    ^
SyntaxError: invalid syntax
@jpmens
Copy link
Collaborator Author

jpmens commented Nov 20, 2019

Fixing the error (except Exception as e:) results in

Traceback (most recent call last):
  File "/private/tmp/m1/v3/bin/mqttwarn", line 11, in <module>
    load_entry_point('mqttwarn==0.11.3', 'console_scripts', 'mqttwarn')()
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/mqttwarn/commands.py", line 12, in <module>
    from mqttwarn.configuration import load_configuration
  File "/private/tmp/m1/v3/lib/python3.7/site-packages/mqttwarn/configuration.py", line 8, in <module>
    from ConfigParser import RawConfigParser, NoOptionError
ModuleNotFoundError: No module named 'ConfigParser'

@jpmens
Copy link
Collaborator Author

jpmens commented Nov 20, 2019

(apologies that I cannot be more constructive at the moment!)

@amotl
Copy link
Member

amotl commented Nov 20, 2019

Dear @jpmens,

Python 3 support has not landed yet, this is still ongoing within #336. Sorry that I wasn't clear on that [1].

However, installing mqttwarn through pip within a Python 2 virtualenv might make you happy already:

virtualenv --python=python2 .venv2
source .venv2/bin/activate
pip install mqttwarn

With kind regards,
Andreas.

[1] I've just updated my comment at #336 (comment) appropriately to reflect the current state.

@jpmens
Copy link
Collaborator Author

jpmens commented Nov 20, 2019

Thank you.

@jpmens jpmens closed this as completed Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants