ERROR Error executing protocol helper [/usr/local/bin/ssh-import-id-gh]

Bug #1428840 reported by Fernando Miguel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ssh-import-id
Fix Released
Medium
Dustin Kirkland 

Bug Description

Download and extract ssh-import-id-4.1.tar.gz on OSx 10.10.3 with Python 2.7.9 installed via homebrew

fmMac:Downloads Fernando.Pereira$ ssh-import-id -o team/auth/authorized_keys gh:fernandomiguel
Traceback (most recent call last):
  File "/usr/local/bin/ssh-import-id-gh", line 4, in <module>
    __import__('pkg_resources').run_script('ssh-import-id==4.1', 'ssh-import-id-gh')
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources/__init__.py", line 696, in run_script
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources/__init__.py", line 1621, in run_script
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ssh_import_id-4.1-py2.7.egg/EGG-INFO/scripts/ssh-import-id-gh", line 25, in <module>

ImportError: No module named parse
2015-03-05 20:39:45,873 ERROR Error executing protocol helper [/usr/local/bin/ssh-import-id-gh]

Related branches

Marco Ceppi (marcoceppi)
Changed in ssh-import-id:
status: New → Confirmed
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

ssh-import-id was ported to Python3 a while ago and as such depends on Python3. The error you're getting here is because you're using a python2.7 interpreter.

Changed in ssh-import-id:
importance: Undecided → Medium
status: Confirmed → In Progress
assignee: nobody → Dustin Kirkland  (kirkland)
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

This is because ssh-import-id requires python3 to operate but uses interpreter headings for python2. Also, OSX does not include python3 out of the box so you will need to install it via upstream or homebrew, then modify the files in /usr/bin/local/ssh-import-id-lp and /usr/local/bin/ssh-import-id-gh to have #!/usr/bin/env python3

It be great if either pypi was updated to indicate this is only python3 compatible, the header updated on each file to use the proper interpreter, or ultimately if this project was made to support py2 and py3 as the majority of operating systems shipping today which include python by default, are including python2

Changed in ssh-import-id:
status: In Progress → Fix Committed
Revision history for this message
Ivan Anishchuk (anishchuk-ia) wrote :

Py2 is approaching the end of life. This should be closed (after properly removing any mention of py2 and cleaning up any compatibility left code, perhaps)

Revision history for this message
Scott Moser (smoser) wrote :

This bug is fixed in the 5.8 release.

Changed in ssh-import-id:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.