1

I tried to run a simple python code for Skype4Py here's my code

import Skype4Py
import logging

logging.basicConfig(level=logging.DEBUG)
print 'OK'
# Create Skype instance
print 'CREATE'
skype = Skype4Py.Skype()
print 'CREATED'

# Connect Skype object to Skype client
print 'CONNECT'
skype.Attach()
print 'CONNECTED'

print 'Your full name:', skype.CurrentUser.FullName
print 'Your contacts:'
for user in skype.Friends:
  print 'LOOP'
  print '    ', user.FullName
  print 'DONE'

and my output is this

OK
CREATE
INFO:Skype4Py.skype.Skype:object created
INFO:Skype4Py.api.posix_dbus.SkypeAPI:opened
CREATED
CONNECT
INFO:Skype4Py.api.posix_dbus.SkypeAPI:thread started
Segmentation fault
Segmentation in skype.Attach().

Anyone knows how to solve this? Thanks

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
joi
  • 307
  • 1
  • 2
  • 11
  • I see no error on Ubuntu 12.04 (it prints correct info). I've installed it as: `sudo add-apt-repository ppa:skype-wrapper/ppa && sudo apt-get update && sudo apt-get install python-skype` – jfs Sep 06 '12 at 04:04
  • i tried to test that in ubuntu but the result is still the same – joi Sep 06 '12 at 07:35
  • You could get stacktrace using faulthandler module or gdb. What is your software versions e.g., `dpkg -l python-skype` or `apt-cache show python-skype` mine: `1.0.31.0-2~precise1` – jfs Sep 06 '12 at 17:07

1 Answers1

1

Use X11 transport to avoid segmentation faults

https://github.com/opensourcehacker/sevabot/blob/master/sevabot/bot.py#L30

Also use patched version of Skype4Py and do not try to use anything provided by your Linux distribution

https://github.com/stigkj/Skype4Py

More information about the segfaults with Skype4Py

https://github.com/opensourcehacker/sevabot#segfaults

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
  • i tried this and i don't get any seg fault every time I run my program. Thanks a lot Mikko :) – joi Sep 10 '12 at 08:20