Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

SyntaxError: invalid syntax #1

Closed
LaurentGatto opened this issue Sep 3, 2018 · 3 comments
Closed

SyntaxError: invalid syntax #1

LaurentGatto opened this issue Sep 3, 2018 · 3 comments

Comments

@LaurentGatto
Copy link

Using Python 2.7.6 and the example script you provide, with a file outside of the github repo (file exists and file path is correct, I checked):

from lazydata import track

with open(track("/home/lg390/tmp/data/some_data_file.txt"), "r") as f:
    print(f.read())

I get

-> % python sample_script.py
Traceback (most recent call last):
  File "sample_script.py", line 1, in <module>
    from lazydata import track
  File "/usr/local/lib/python2.7/dist-packages/lazydata/__init__.py", line 1, in <module>
    from .tracker import track
  File "/usr/local/lib/python2.7/dist-packages/lazydata/tracker.py", line 11
    def track(path:str) -> str:
                  ^
SyntaxError: invalid syntax
@rstojnic
Copy link
Owner

rstojnic commented Sep 3, 2018

Thanks! Currently only Python 3.5+ is supported - will add this to the docs.

@varun19299
Copy link

Could you add this to your pip dependencies? Ensuring its not used with < 3.5?

rstojnic added a commit that referenced this issue Sep 7, 2018
@rstojnic
Copy link
Owner

rstojnic commented Sep 7, 2018

Released 1.0.18 that requires python >= 3.5.2

@rstojnic rstojnic closed this as completed Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants