Search code examples
pythonmacossegmentation-faultskype4py

Cannot attach Skype4Py to Skype via Python in Mac OSX


I am on Mac OSX (10.8.2) and am trying to use Skype4py to connect to my currently running Skype instance via Python.

My difficulty here is that I have followed the instructions on the website (http://pypi.python.org/pypi/Skype4Py/1.0.34#segfaults), and properly installed Skype4Py using the arch -i386 pip install Skype4Py command. As the instructions state, I have set my code editor's run code to use the arch -i386 python command to run things instead of the typical python (As well as tried using both to run the file directly from terminal).

My code is currently really simple (I plan to work further once I get the connection working), and is as follows:

import Skype4Py
skype = Skype4Py.Skype()
skype.Attach()

That gives me an error window that python had to close as well as the following error: Run Command: line 1: 66888 Segmentation fault: 11 arch -i386 python "$1" "${@:3}"

After some searching around on these forums, I had found a few threads that agree upon the following code revision as an answer:

import Skype4Py
skype = Skype4Py.Skype(Transport='x11')
skype.Attach()

Unfortunately, this fix simply changes the nature of my error. The new error message is more complicated:

Traceback (most recent call last):
  File "skypeAttach.py", line 4, in <module>
    skype = Skype4Py.Skype(Transport='x11')
  File "build/bdist.macosx-10.8-intel/egg/Skype4Py/skype.py", line 250, in __init__
  File "build/bdist.macosx-10.8-intel/egg/Skype4Py/api/darwin.py", line 296, in __init__
  File "build/bdist.macosx-10.8-intel/egg/Skype4Py/api/__init__.py", line 214, in finalize_opts
TypeError: Unexpected option(s): Transport

Which, under my limited programming knowledge, seems to be trying to tell me that "Transport" is an unexpected parameter.


Solution

  • From the Skype4Py PyPI page:

    It works on Windows, OSX and Linux platforms with Python 2.x versions.

    It is not compatible with Python 3.3. Try installing it with Python 2.7.