Error when run in the external console

55 views
Skip to first unread message

Gertwin

unread,
Jun 10, 2010, 5:48:27 PM6/10/10
to spyder
I try to run my program in the external console, but it seems to use
the api setting (version 1) from spyder.
I am using the external console because it will run in its own
process.
With the internal console I expect this error.
Outside spyder it runs OK.

Traceback (most recent call last):
File "/home/gertwin/work/pythoncad/PythonCAD/pythoncad_qt.py", line
5, in <module>
sip.setapi('QString', 2)
ValueError: API 'QString' has already been set to version 1

Is there a way to work around this problem?

Thanks,
Gertwin

Pierre Raybaut

unread,
Jun 11, 2010, 2:57:35 AM6/11/10
to spyder
That is a bit tricky indeed. Actually the external console has its own
mechanism for providing code instropection remotely: that is a
notifying server communicating with a monitor (all of it being
initialized in the local sitecustomize script). The monitor is running
in a separate thread (Thread module) whereas the server is running in
a QThread... (because we need to emit/connect a SIGNAL inside of it)
that's why PyQt4 is imported before you do in your own program.

Currently there is no workaround for this particular issue.
Getting rid of PyQt4 in the sitecustomize script means losing the
ability to send SIGNALs from the notifying server... I'll have to take
a look at it to see if I can do without these signals.

Pierre

Gertwin Groen

unread,
Jun 21, 2010, 4:06:33 PM6/21/10
to spyd...@googlegroups.com
Thanks for your answer.

I just tried with version 1.1.0rc2 and now it works.

Regards,
Gertwin

2010/6/11 Pierre Raybaut <pierre....@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "spyder" group.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages