gespeaker: python-error

Non release banter
Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

gespeaker: python-error

Post#1 by Kulle » 27 Mar 2019, 15:28

Download: gespeaker_0.8.6-1_all.deb
and deb2xzm
But gespeaker_0.8.6-1_all.xzm does not work:

Code: Select all

guest@porteus:~$ gespeaker 
...
ImportError: /usr/lib64/python2.7/site-packages/glib/_glib.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8
does anyone know what to do?

Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

gespeaker: python-error

Post#2 by Kulle » 03 Apr 2019, 15:24

I have now additionally activated pydoc.xzm
(look here tar2xzm)
But the error has remained:

Code: Select all

guest@porteus:~$ gespeaker 
Traceback (most recent call last):
  File "gespeaker.py", line 27, in <module>
    import gtk.glade
  File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 30, in <module>
    import gobject as _gobject
  File "/usr/lib64/python2.7/site-packages/gobject/__init__.py", line 26, in <module>
    from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
  File "/usr/lib64/python2.7/site-packages/glib/__init__.py", line 22, in <module>
    from glib._glib import *
ImportError: /usr/lib64/python2.7/site-packages/glib/_glib.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

tar2xzm

Post#3 by Ed_P » 03 Apr 2019, 15:49

Understandable. Pydoc.xzm contains nothing related to the PyUnicodeUCS2_DecodeUTF8 error. Maybe using USM to download a complete Python 2.7 package would solve that problem.
Ed

Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

tar2xzm & txzxzm & slpkg

Post#4 by Kulle » 03 Apr 2019, 17:01

Hi Ed_P
but usm does not work:

Code: Select all

root@porteus:/home/guest# usm -s python
....
python-2.7.16-x86_64-1_slack14.2.txz was found in slackwarepatches []
....
root@porteus:/home/guest# usm -g python-2.7.16-x86_64-1_slack14.2.txz

 Nothing found for:  python-2.7.16-x86_64-1_slack14.2.txz 
that's why I'll try slpkg

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

tar2xzm & txzxzm & slpkg

Post#5 by Ed_P » 03 Apr 2019, 17:15

You could try a different Python version.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# usm -g python-2

 The following items were found.
 Choose an number to confirm. 
 ctrl+c to quit

1) python-2.7.11-x86_64-2.txz
2) python-2.7.13-x86_64-2_slack14.2.txz
#? 
And then you shouldn't need 005-devel.xzm.
Ed

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

gespeaker: python-error

Post#6 by ncmprhnsbl » 04 Apr 2019, 06:42

befor getting too far into this, check out polyglot (in the network menu) , it has a text to speech function..

a similar unicode error came up somewhere on forum in recent memory, but i don't recall where or what the solution was.(or if there was).
quite possibly a python version mismatch.. ( a hazard with using foreign packages)
gespeaker will require espeak, pyxdg and possibly more
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

gespeaker: python-error

Post#7 by donald » 04 Apr 2019, 14:19

ImportError: /usr/lib64/python2.7/site-packages/glib/_glib.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8
https://docs.python.org/2.7/faq/extendi ... nicodeucs2

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

gespeaker: python-error

Post#8 by Ed_P » 04 Apr 2019, 18:44

:hmmm: So using a different Python version might be the only solution.

With Porteus's 005-devel.xzm this:

Code: Select all

#!/usr/bin/python3
import sys
if sys.maxunicode > 65535:
 print ("UCS4 build")
else:
 print ("USC2 build")
yields this:

Code: Select all

guest@porteus:~$ ./unicode.sh
UCS4 build
Ed

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

gespeaker: python-error

Post#9 by ncmprhnsbl » 04 Apr 2019, 23:24

which package provides /usr/lib64/python2.7/site-packages/glib/_glib.so ?
answer my own question: pygobject
so what version of pygobject do you have? if it's 2.28.7 from current, there's a good chance it doesn't match the python in porteus 4.0..
possible that 2.28.6 from 14.2 might match.. or viceversa..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

gespeaker: python-error

Post#10 by Ed_P » 04 Apr 2019, 23:29

ncmprhnsbl wrote:
04 Apr 2019, 23:24
which package provides /usr/lib64/python2.7/site-packages/glib/_glib.so ?
According to this:

https://www.google.com/search?source=hp ... q7GmahYxnA

ubuntu.
Ed

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

gespeaker: python-error

Post#11 by ncmprhnsbl » 05 Apr 2019, 00:17

ok, i have it working with these packages:

Code: Select all

espeak-1.48.04-x86_64-2dj.txz
gespeaker_0.8.6-1_all.deb
glade-3.18.3-x86_64-1_slonly.txz
pygobject-2.28.7-x86_64-3.txz
pyxdg-0.26-x86_64-1.txz
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

gespeaker: python-error

Post#12 by donald » 05 Apr 2019, 04:40

^
A bit more is needed to make it run in port4-x86_64-XFCE..

dbus-python-1.2.8-x86_64-2.txz
espeak-1.48.04-x86_64-1dj.txz
gespeaker_0.8.6-1_all.deb
glade-3.18.3-x86_64-1_slonly.txz
portaudio-v19-x86_64-2dj.txz
pygobject-2.28.7-x86_64-3.txz
pyxdg-0.26-x86_64-1_slonly.txz

Some files are from slackware-current, you wont get them via USM:
dbus-python-1.2.8-x86_64-2.txz
pygobject-2.28.7-x86_64-3.txz
Get the packages at
https://packages.slackware.com/
(Slackware64 current)

You need to set pulseaudio in preferences at first start.
Otherwise, you will only hear distortions.

Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

gespeaker: python-error

Post#13 by Kulle » 22 Apr 2019, 19:16

Python errors occur again and again, for example:

Code: Select all

/tmp/usm/miro-6.0-x86_64-bundle.xzm is ready.

root@porteus:/home/guest# miro
using /usr/bin/miro.real
Traceback (most recent call last):
  File "/usr/bin/miro.real", line 46, in <module>
    import glib
  File "/usr/lib64/python2.7/site-packages/glib/__init__.py", line 22, in <module>
    from glib._glib import *
ImportError: /usr/lib64/python2.7/site-packages/glib/_glib.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8

Post Reply