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

Syntax Error #21

Closed
EdwardFinegan opened this issue Jul 7, 2019 · 6 comments
Closed

Syntax Error #21

EdwardFinegan opened this issue Jul 7, 2019 · 6 comments

Comments

@EdwardFinegan
Copy link

When I run hxtool --help I'm getting the following syntax error. Any thoughts on what may be causing this? I'm Assuming its something in my python environment. This is on OS X Mojave. I have installed the latest python version from the python website. Thanks!

Traceback (most recent call last): File "/usr/local/bin/hxtool", line 9, in <module> load_entry_point('hxtool==0.2.1a0', 'console_scripts', 'hxtool')() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2697, in load_entry_point return ep.load() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2370, in load return self.resolve() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2376, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/Library/Python/2.7/site-packages/hxtool/__init__.py", line 19 logger.warning(f"Multiple devices detected, using {devices[0].tty}") ^ SyntaxError: invalid syntax

@cr
Copy link
Owner

cr commented Jul 7, 2019

Python 2.7 is not supported and hxtool requires Python 3.6 or later. I recommend creating a virtual environment with Python 3.7 which is the current version and what I use for developement.

@cr cr closed this as completed Jul 7, 2019
@cr
Copy link
Owner

cr commented Jul 7, 2019

I have installed the latest python version from the python website.

I don't know which Python version you installed, but from the error it looks like your environment is still using Mac OS's system Python 2.7. You shouldn't try to switch the system away from its default Python interpreter, because it will cause nasty errors in other places. That's why setting up a dedicated virtual environment for hxtool is crucial.

@EdwardFinegan
Copy link
Author

Thanks got it working. Had hxtool installed in the virtual environment and on the system. When I ran it the path came up with the system install.

Is there a way to dump the gps logger file?

@cr
Copy link
Owner

cr commented Jul 7, 2019

Great!

Is there a way to dump the gps logger file?

Not really, at least for now. There are internal functions to dump the raw data and decode the bytes into coordinates, but since there has been no solid proposal for an export format (GPX?), these functions haven't made it into the command line interface, yet.

@cr
Copy link
Owner

cr commented Jul 8, 2019

@edfinegan, #22 just landed experimental GPX export. Please feel free to give it a try and provide some feedback whether the GPX file works for your software.

@cr
Copy link
Owner

cr commented Jul 8, 2019

Please provide feedback regarding log export in #6.

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