-
Notifications
You must be signed in to change notification settings - Fork 218
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
sparse "invalid syntax" error. Python 3.4 / virtualenv #172
Comments
Duplicate of #76 and #170. You just need to install the Python 3 compatible fork of fabric in our requirements.txt. |
Apologies for opening an old issue, but having run
It would seem that sparse is looking for |
@Erve1879, yeah, that is unfortunately an issue in the version of streamparse you're using. Both of the 3.0 developer preview releases do not have this issue anymore. |
You can see more info about the new releases here. |
Thanks for the quick response @dan-blanchard - since this is my first stab-at-streamparse, I'll start with the dev release. |
In OSX, installed python3 (3.4), created a virtualenv, installed sreamparse, and whenever it runs it show "invalid syntax" error.
(streamparse)[mariano:
/W-IOT/pruebas-plataformas/streamparse]$ virtualenv --version/W-IOT/pruebas-plataformas/streamparse]$ python --version1.11.6
(streamparse)[mariano:
Python 3.4.3
(streamparse)[mariano:
/W-IOT/pruebas-plataformas/streamparse]$ pip --version/W-IOT/pruebas-plataformas/streamparse]$ sparsepip 1.5.6 from /Users/mariano/W-IOT/pruebas-plataformas/streamparse/lib/python3.4/site-packages (python 3.4)
(streamparse)[mariano:
Traceback (most recent call last):
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/bin/sparse", line 9, in
load_entry_point('streamparse==2.0.2', 'console_scripts', 'sparse')()
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/lib/python3.4/site-packages/streamparse/cli/sparse.py", line 47, in main
load_suparsers(subparsers)
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/lib/python3.4/site-packages/streamparse/cli/sparse.py", line 25, in load_suparsers
module = importlib.import_module('streamparse.cli.{}'.format(mod_name))
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/lib/python3.4/importlib/init.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 2254, in _gcd_import
File "", line 2237, in _find_and_load
File "", line 2226, in _find_and_load_unlocked
File "", line 1200, in _load_unlocked
File "", line 1129, in _exec
File "", line 1471, in exec_module
File "", line 321, in _call_with_frames_removed
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/lib/python3.4/site-packages/streamparse/cli/jar.py", line 12, in
from ..util import prepare_topology
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/lib/python3.4/site-packages/streamparse/util.py", line 12, in
from fabric.api import env
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/lib/python3.4/site-packages/fabric/api.py", line 9, in
from fabric.context_managers import (cd, hide, settings, show, path, prefix,
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/lib/python3.4/site-packages/fabric/context_managers.py", line 535
def accept(channel, (src_addr, src_port), (dest_addr, dest_port)):
^
SyntaxError: invalid syntax
When installing streamparse there where similar errors:
*** Error compiling '/Users/mariano/W-IOT/pruebas-plataformas/streamparse/build/invoke/invoke/vendor/yaml2/resolver.py'...
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/build/invoke/invoke/vendor/yaml2/resolver.py", line 171
re.compile(ur'''^(?:yes|Yes|YES|no|No|NO
|true|True|TRUE|false|False|FALSE
|on|On|ON|off|Off|OFF)$''', re.X),
SyntaxError: invalid syntax
*** Error compiling '/Users/mariano/W-IOT/pruebas-plataformas/streamparse/build/invoke/invoke/vendor/yaml2/scanner.py'...
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/build/invoke/invoke/vendor/yaml2/scanner.py", line 1427
except UnicodeDecodeError, exc:
^
SyntaxError: invalid syntax
Running setup.py install for fabric
File "/Users/mariano/W-IOT/pruebas-plataformas/streamparse/lib/python3.4/site-packages/fabric/context_managers.py", line 535
def accept(channel, (src_addr, src_port), (dest_addr, dest_port)):
^
SyntaxError: invalid syntax
The FAQ says it should work with Python > 3.3
Don't know if this is a user error or a bug.
The text was updated successfully, but these errors were encountered: