Tigge / antfs-cli

Extracts FIT files from ANT-FS based sport watches such as Garmin Forerunner 60, 405CX, 310XT, 610 and 910XT.
MIT License
310 stars 76 forks source link

No module named antfs_cli #124

Closed jdmostro closed 9 years ago

jdmostro commented 9 years ago

Bonjour, Install of openant and antfs-cli was very well but i have this error: Traceback (most recent call last): File "/usr/local/bin/antfs-cli", line 9, in load_entry_point('antfs-cli==0.2', 'console_scripts', 'antfs-cli')() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load ['name']) ImportError: No module named antfs_cli

what can i do? Merci beaucoup.

Toilal commented 9 years ago

@Tigge There's a problem with the module refactor, because module is now antfs_cli.antfs_cli instead of just antfs_cli. Maybe antfs_cli/antfs_cli.py could be renamed to antfs_cli/__init__.py for this issue to be solved.

Tigge commented 9 years ago

Hm, I thought I tested this -- must have had some old version installed as well. So we need to change the install script to:

      entry_points={
          'console_scripts': ['antfs-cli=antfs_cli.antfs_cli:main']
      },

Might make sense to rename the module to something else than the package name to avoid confusion. But should that work?

Tigge commented 9 years ago

Might be worth adding a test for this as well, just running "antfs_cli --version" or something.

Toilal commented 9 years ago

I think that should work too, but I think it's be better to avoid the duplicate module name antfs_cli.antfs_cli using the __init__.py file in antfs_cli directory.

Toilal commented 9 years ago

or simply move back this file in root folder, while keeping others in the directory with an empty __init__.py Forget this it doesn't work.

Toilal commented 9 years ago

In any case, there should be an __init__.py file in this directory, and imports should like this

from . import utilities
from . import scripting

It then works with

  entry_points={
      'console_scripts': ['antfs-cli=antfs_cli.antfs_cli:main']
  },
jdmostro commented 9 years ago

thank you for the answer, I test.

2015-01-27 18:57 GMT+01:00 Rémi Alvergnat notifications@github.com:

@Tigge https://github.com/Tigge There's a problem with this refactor, because module is now antfs_cli.antfs_cli instead of just antfs_cli. Maybe antfs_cli/antfs_cli.py could be renamed to antfs_cli/init.py for this issue to be solved.

— Reply to this email directly or view it on GitHub https://github.com/Tigge/antfs-cli/issues/124#issuecomment-71694811.

J.D.

pfergi42 commented 9 years ago

Any luck with this? I followed all the instructions but now can't run:

antfs-cli -h

I get:

Traceback (most recent call last): File "/usr/local/bin/antfs-cli", line 9, in load_entry_point('antfs-cli==0.2', 'console_scripts', 'antfs-cli')() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load entry = import(self.module_name, globals(),globals(), ['name']) ImportError: No module named antfs_cli

Tigge commented 9 years ago

I've pushed a fix for this and https://travis-ci.org/Tigge/antfs-cli reports that it can run and install it. @pfergi42 could you try again now?

pfergi42 commented 9 years ago

Whoo it works! Great job @Tigge!

Now... what do I do with these .fit files? Can I sync them to strava somehow? =) (I know that's beyond the scope of this project).

Well done!

Toilal commented 9 years ago

Here my workflow:

pfergi42 commented 9 years ago

Thanks SO much! I was already using tapiriiik so I was just missing that 2nd step. I'll give it a go and report back.

On Thu, Jan 29, 2015 at 2:37 PM, Rémi Alvergnat notifications@github.com wrote:

Here my workflow:

— Reply to this email directly or view it on GitHub https://github.com/Tigge/antfs-cli/issues/124#issuecomment-72118692.

Tigge commented 9 years ago

I'm using something like https://gist.github.com/Tigge/2ad3bf6387ed2c38fd48 placed in my script folder for antfs-cli to upload to Runkeeper. Could probably do something similar with http://strava.github.io/api/v3/activities/ for Strava if tapiriik doens't work out.

jdmostro commented 9 years ago

Bonjour, I found this: http://forum.ubuntu-fr.org/viewtopic.php?id=1267521 it works well. Thanks. Cordialement. J. D. Le 29 janv. 2015 23:57, "Gustav Tiger" notifications@github.com a écrit :

I'm using something like https://gist.github.com/Tigge/2ad3bf6387ed2c38fd48 placed in my script folder for antfs-cli to upload to Runkeeper. Could probably do something similar with http://strava.github.io/api/v3/activities/ for Strava if tapiriik doens't work out.

— Reply to this email directly or view it on GitHub https://github.com/Tigge/antfs-cli/issues/124#issuecomment-72120531.

pfergi42 commented 9 years ago

I also found this service to upload to Garmin Connect. But it's manual and one file at a time:

https://connect.garmin.com/api/upload/widget/manualUpload.faces?uploadServiceVersion=1.1&cid=3447601

Tigge commented 9 years ago

(issue seems fixed, closing)