Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 support #614

Closed
SolarAquarion opened this issue Aug 13, 2019 · 19 comments
Closed

Python3 support #614

SolarAquarion opened this issue Aug 13, 2019 · 19 comments

Comments

@SolarAquarion
Copy link
Contributor

do you know when you'll be able to port the python2 parts of the app to python3

@tizonia
Copy link
Collaborator

tizonia commented Sep 24, 2019

Hi! thanks for taking the time to reach out. Apologies for such a slow reply. I've been really busy in the last few months, I'm now slowly starting to catch up.

The migration to Python3 is something that is high in my list. I'm planning to start looking into this soon. I hoping that at this time, all of Tizonia's Python dependencies are now Python3 friendly, so I suppose there are no impediments to migrate Tizonia as well.

So I'm marking this as enhancement, but hopefully to be started soon.

@tizonia
Copy link
Collaborator

tizonia commented Sep 24, 2019

And of course, if anybody wants to contribute, any help would be greatly appreciated!

@tizonia
Copy link
Collaborator

tizonia commented Nov 14, 2019

This is in progress in the python3 branch
https://github.com/tizonia/tizonia-openmax-il/tree/python3

@tizonia tizonia added this to the v0.19.0 milestone Nov 14, 2019
@SolarAquarion
Copy link
Contributor Author

@tizonia

<string>:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
[Google Play Music] (TypeError) : file must have 'read', 'readinto' and 'readline' attributes

@tizonia tizonia changed the title Question: Python3 Python3 support Nov 28, 2019
@tizonia
Copy link
Collaborator

tizonia commented Nov 28, 2019

@SolarAquarion

Thanks for bringing this to my attention. It is now fixed in the develop branch.

The Python3 branch was merged into 'develop' a few days ago, hopefully I will be cutting a new release of Tizonia soon.

@SolarAquarion
Copy link
Contributor Author

[Google Play Music] (TypeError) : write() argument must be str, not bytes

@juanrubio
Copy link
Member

which command reproduces it? Is that an error in 'develop'?

You can export this to see the exception line number:

export TIZONIA_GMUSICPROXY_DEBUG=1

@SolarAquarion
Copy link
Contributor Author

SolarAquarion commented Nov 28, 2019 via email

@tizonia
Copy link
Collaborator

tizonia commented Nov 28, 2019

Thanks!, I think this is fixed by 23ce594

@SolarAquarion
Copy link
Contributor Author

I don't know what this is categorized, but, I got a coredump

/usr/lib/../share/gcc-9.2.0/python/libstdcxx/v6/xmethods.py:731: SyntaxWarning: list indices must be integers or slices, not str; perhaps you missed a comma?
  refcounts = ['_M_refcount']['_M_pi']

@juanrubio
Copy link
Member

Would it be possible to have a full stack trace?

@SolarAquarion
Copy link
Contributor Author

I think the thing is occurring in "mpris"

0x00007ffff735f8b8 in Tiz::DBus::BusDispatcher::enter() () from /usr/lib/libtizdbus-c++.so.0
(gdb) thread apply all bt full

Thread 59 (Thread 0x7fffda7a7700 (LWP 4149157)):
#0  0x00007ffff71ed9ef in poll () from /usr/lib/libc.so.6
No symbol table info available.
#1  0x00007ffff525dc14 in ?? () from /usr/lib/libpulse.so.0
No symbol table info available.
#2  0x00007ffff526b059 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
No symbol table info available.
#3  0x00007ffff5275301 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
No symbol table info available.
#4  0x00007ffff52753b1 in pa_mainloop_run () from /usr/lib/libpulse.so.0
No symbol table info available.
#5  0x00007ffff526561e in ?? () from /usr/lib/libpulse.so.0
No symbol table info available.
#6  0x00007ffff51e9d1c in ?? () from /usr/lib/pulseaudio/libpulsecommon-13.0.so
No symbol table info available.
#7  0x00007ffff72e34cf in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#8  0x00007ffff71f82d3 in clone () from /usr/lib/libc.so.6
No symbol table info available.

Thread 58 (Thread 0x7fffda9a8700 (LWP 4149155)):
#0  0x00007ffff72e9c45 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
No symbol table info available.
#1  0x00007ffff731e07f in tiz_cond_wait () from /usr/lib/libtizplatform.so.0
No symbol table info available.
#2  0x00007ffff731eaeb in tiz_queue_receive () from /usr/lib/libtizplatform.so.0
No symbol table info available.
#3  0x00007ffff4bbe907 in il_sched_thread_func () from /usr/lib/libtizonia.so.0
No symbol table info available.
#4  0x00007ffff72e34cf in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#5  0x00007ffff71f82d3 in clone () from /usr/lib/libc.so.6
--Type <RET> for more, q to quit, c to continue without paging--
No symbol table info available.

Thread 57 (Thread 0x7fffdb448700 (LWP 4149149)):
#0  0x00007ffff72e9c45 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
No symbol table info available.
#1  0x00007ffff731e07f in tiz_cond_wait () from /usr/lib/libtizplatform.so.0
No symbol table info available.
#2  0x00007ffff731eaeb in tiz_queue_receive () from /usr/lib/libtizplatform.so.0
No symbol table info available.
#3  0x00007ffff4bbe907 in il_sched_thread_func () from /usr/lib/libtizonia.so.0
No symbol table info available.
#4  0x00007ffff72e34cf in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#5  0x00007ffff71f82d3 in clone () from /usr/lib/libc.so.6
No symbol table info available.

Thread 55 (Thread 0x7ffff4bb2700 (LWP 4145703)):
#0  0x00007ffff72e9c45 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
No symbol table info available.
#1  0x00007ffff731e07f in tiz_cond_wait () from /usr/lib/libtizplatform.so.0
No symbol table info available.
#2  0x00007ffff731eaeb in tiz_queue_receive () from /usr/lib/libtizplatform.so.0
No symbol table info available.
#3  0x00007ffff4bbe907 in il_sched_thread_func () from /usr/lib/libtizonia.so.0
No symbol table info available.
#4  0x00007ffff72e34cf in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#5  0x00007ffff71f82d3 in clone () from /usr/lib/libc.so.6
No symbol table info available.

Thread 5 (Thread 0x7ffff5b3a700 (LWP 4144932)):
#0  0x00007ffff72e9c45 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#1  0x00007ffff731e07f in tiz_cond_wait () from /usr/lib/libtizplatform.so.0
No symbol table info available.
#2  0x00007ffff731eaeb in tiz_queue_receive () from /usr/lib/libtizplatform.so.0
No symbol table info available.
#3  0x00007ffff72fe67c in il_core_thread_func () from /usr/lib/libtizcore.so.0
No symbol table info available.
#4  0x00007ffff72e34cf in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#5  0x00007ffff71f82d3 in clone () from /usr/lib/libc.so.6
No symbol table info available.

Thread 4 (Thread 0x7ffff5d3b700 (LWP 4144931)):
#0  0x00007ffff735f8b8 in Tiz::DBus::BusDispatcher::enter() () from /usr/lib/libtizdbus-c++.so.0
No symbol table info available.
#1  0x0000555555764017 in ?? ()
No symbol table info available.
#2  0x0000555555764390 in ?? ()
No symbol table info available.
#3  0x00007ffff72e34cf in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#4  0x00007ffff71f82d3 in clone () from /usr/lib/libc.so.6
No symbol table info available.

Thread 3 (Thread 0x7ffff5f3c700 (LWP 4144930)):
#0  0x00007fffde6eda5c in ?? () from /usr/lib/python3.8/site-packages/lxml/etree.cpython-38-x86_64-linux-gnu.so
No symbol table info available.
#1  0x00007ffff7fe2add in _dl_fini () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#2  0x00007ffff71376a7 in __run_exit_handlers () from /usr/lib/libc.so.6
No symbol table info available.
#3  0x00007ffff713785e in exit () from /usr/lib/libc.so.6
No symbol table info available.
#4  0x00005555555a6ced in ?? ()
--Type <RET> for more, q to quit, c to continue without paging--
No symbol table info available.
#5  0x00005555555a6e34 in ?? ()
No symbol table info available.
#6  0x00005555556193aa in ?? ()
No symbol table info available.
#7  0x000055555561c9df in ?? ()
No symbol table info available.
#8  0x000055555561cb50 in ?? ()
No symbol table info available.
#9  0x00007ffff72e34cf in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#10 0x00007ffff71f82d3 in clone () from /usr/lib/libc.so.6
No symbol table info available.

Thread 2 (Thread 0x7ffff613d700 (LWP 4144929)):
#0  0x00007ffff71f860e in epoll_wait () from /usr/lib/libc.so.6
No symbol table info available.
#1  0x00007ffff73256a3 in epoll_poll () from /usr/lib/libtizplatform.so.0
No symbol table info available.
#2  0x00007ffff7324d1c in event_loop_thread_func () from /usr/lib/libtizplatform.so.0
No symbol table info available.
#3  0x00007ffff72e34cf in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#4  0x00007ffff71f82d3 in clone () from /usr/lib/libc.so.6
No symbol table info available.

Thread 1 (Thread 0x7ffff6143cc0 (LWP 4144303)):
#0  0x00007ffff72ec704 in do_futex_wait.constprop () from /usr/lib/libpthread.so.0
No symbol table info available.
#1  0x00007ffff72ec7f8 in __new_sem_wait_slow.constprop.0 () from /usr/lib/libpthread.so.0
No symbol table info available.
#2  0x00007ffff731d94c in tiz_sem_wait () from /usr/lib/libtizplatform.so.0
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#3  0x0000555555761df0 in ?? ()
No symbol table info available.
#4  0x000055555561a6a1 in ?? ()
No symbol table info available.
#5  0x000055555561a84d in ?? ()
No symbol table info available.
#6  0x00005555555ab860 in ?? ()
No symbol table info available.
#7  0x00005555555d435b in ?? ()
No symbol table info available.
#8  0x00005555555be0d0 in ?? ()
No symbol table info available.
#9  0x00005555555bb3a0 in ?? ()
No symbol table info available.

@SolarAquarion
Copy link
Contributor Author

                Stack trace of thread 178799:
                #0  0x00007f0813a2c8b8 _ZN3Tiz4DBus13BusDispatcher5enterEv (libtizdbus-c++.so.0)
                #1  0x000055e87683a017 n/a (tizonia)
                #2  0x000055e87683a390 n/a (tizonia)
                #3  0x00007f08139b04cf start_thread (libpthread.so.0)
                #4  0x00007f08138c52d3 __clone (libc.so.6)
                
                Stack trace of thread 178801:
                #0  0x00007f08139b6c45 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
                #1  0x00007f08139eb07f tiz_cond_wait (libtizplatform.so.0)
                #2  0x00007f08139ebaeb tiz_queue_receive (libtizplatform.so.0)
                #3  0x00007f08139cb67c il_core_thread_func (libtizcore.so.0)
                #4  0x00007f08139b04cf start_thread (libpthread.so.0)
                #5  0x00007f08138c52d3 __clone (libc.so.6)
                
                Stack trace of thread 178792:
                #0  0x00007f08139b9704 do_futex_wait.constprop.0 (libpthread.so.0)
                #1  0x00007f08139b97f8 __new_sem_wait_slow.constprop.0 (libpthread.so.0)
                #2  0x00007f08139ea94c tiz_sem_wait (libtizplatform.so.0)
                #3  0x000055e876837df0 n/a (tizonia)
                #4  0x000055e8766f06a1 n/a (tizonia)
                #5  0x000055e8766f084d n/a (tizonia)
                #6  0x000055e8766812e8 n/a (tizonia)
                #7  0x000055e8766aa35b n/a (tizonia)
                #8  0x000055e876692c90 n/a (tizonia)
                #9  0x000055e8766913a0 n/a (tizonia)
                #10 0x000055e876671865 n/a (tizonia)
                #11 0x00007f08137ed153 __libc_start_main (libc.so.6)
                #12 0x000055e87667cbae n/a (tizonia)
                
                Stack trace of thread 178798:
                #0  0x00007f08139b6c45 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
                #1  0x00007f08139eb07f tiz_cond_wait (libtizplatform.so.0)
                #2  0x00007f08139ebaeb tiz_queue_receive (libtizplatform.so.0)
                #3  0x000055e8766f2b88 n/a (tizonia)
                #4  0x00007f08139b04cf start_thread (libpthread.so.0)
                #5  0x00007f08138c52d3 __clone (libc.so.6)
                
                Stack trace of thread 178916:
                #0  0x00007f08139b6c45 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
                #1  0x00007f08139eb07f tiz_cond_wait (libtizplatform.so.0)
                #2  0x00007f08139ebaeb tiz_queue_receive (libtizplatform.so.0)
                #3  0x00007f081128b907 il_sched_thread_func (libtizonia.so.0)
                #4  0x00007f08139b04cf start_thread (libpthread.so.0)
                #5  0x00007f08138c52d3 __clone (libc.so.6)
                
                Stack trace of thread 178862:
                #0  0x00007f08139b6c45 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
                #1  0x00007f08139eb07f tiz_cond_wait (libtizplatform.so.0)
                #2  0x00007f08139ebaeb tiz_queue_receive (libtizplatform.so.0)
                #3  0x000055e87670c1a7 n/a (tizonia)
                #4  0x00007f08139b04cf start_thread (libpthread.so.0)
                #5  0x00007f08138c52d3 __clone (libc.so.6)
                
                Stack trace of thread 179689:
                #0  0x00007f08139b6c45 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
                #1  0x00007f08139eb07f tiz_cond_wait (libtizplatform.so.0)
                #2  0x00007f08139ebaeb tiz_queue_receive (libtizplatform.so.0)
                #3  0x00007f081128b907 il_sched_thread_func (libtizonia.so.0)
                #4  0x00007f08139b04cf start_thread (libpthread.so.0)
                #5  0x00007f08138c52d3 __clone (libc.so.6)
                
                Stack trace of thread 179210:
                #0  0x00007f08138ba9ef __poll (libc.so.6)
                #1  0x00007f0810d4c317 n/a (libspotify.so.12)
                #2  0x00007f0810d4c78d n/a (libspotify.so.12)
                #3  0x00007f0810c8608d n/a (libspotify.so.12)
                #4  0x00007f08139b04cf start_thread (libpthread.so.0)
                #5  0x00007f08138c52d3 __clone (libc.so.6)
                
                Stack trace of thread 181869:
                #0  0x00007f08138ba9ef __poll (libc.so.6)
                #1  0x00007f081192ac14 n/a (libpulse.so.0)
                #2  0x00007f0811938059 pa_mainloop_poll (libpulse.so.0)
                #3  0x00007f0811942301 pa_mainloop_iterate (libpulse.so.0)
                #4  0x00007f08119423b1 pa_mainloop_run (libpulse.so.0)
                #5  0x00007f081193261e n/a (libpulse.so.0)
                #6  0x00007f08118b6d1c n/a (libpulsecommon-13.0.so)
                #7  0x00007f08139b04cf start_thread (libpthread.so.0)
                #8  0x00007f08138c52d3 __clone (libc.so.6)
                
                Stack trace of thread 178797:
                #0  0x00007f08138c560e epoll_wait (libc.so.6)
                #1  0x00007f08139f26a3 epoll_poll (libtizplatform.so.0)
                #2  0x00007f08139f1d1c event_loop_thread_func (libtizplatform.so.0)
                #3  0x00007f08139b04cf start_thread (libpthread.so.0)
                #4  0x00007f08138c52d3 __clone (libc.so.6)
                
                Stack trace of thread 179209:
                #0  0x00007f08139b9704 do_futex_wait.constprop.0 (libpthread.so.0)
                #1  0x00007f08139b97f8 __new_sem_wait_slow.constprop.0 (libpthread.so.0)
                #2  0x00007f0810ccc1f8 n/a (libspotify.so.12)
                #3  0x00007f0810c8608d n/a (libspotify.so.12)
                #4  0x00007f08139b04cf start_thread (libpthread.so.0)
                #5  0x00007f08138c52d3 __clone (libc.so.6)

GNU gdb (GDB) 8.3.1
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...

warning: /usr/lib/python3.7/site-packages/voltron/entry.py: No such file or directory
Reading symbols from /usr/bin/tizonia...
Reading symbols from /usr/lib/debug/usr/bin/tizonia.debug...
(No debugging symbols found in /usr/lib/debug/usr/bin/tizonia.debug)
[New LWP 178799]
[New LWP 178801]
[New LWP 178792]
[New LWP 178798]
[New LWP 178916]
[New LWP 178862]
[New LWP 179689]
[New LWP 179210]
[New LWP 181869]
[New LWP 178797]
[New LWP 179209]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `tizonia --spotify-recommendations-by-artist-id 67ZMMtA88DDO0gTuRrzGjn'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f0813a2c8b8 in Tiz::DBus::BusDispatcher::enter() () from /usr/lib/libtizdbus-c++.so.0
[Current thread is 1 (Thread 0x7f0812408700 (LWP 178799))]
/usr/lib/../share/gcc-9.2.0/python/libstdcxx/v6/xmethods.py:731: SyntaxWarning: list indices must be integers or slices, not str; perhaps you missed a comma?
  refcounts = ['_M_refcount']['_M_pi']

@SolarAquarion
Copy link
Contributor Author

Yeah, it seeems to be mpris and dbus

@tizonia
Copy link
Collaborator

tizonia commented Nov 29, 2019

uhg.. yes, the DBUS MPRIS implementation is a bit buggy.

Does that go away if you disable it in your config file?

mpris-enabled = false

@SolarAquarion
Copy link
Contributor Author

SolarAquarion commented Nov 29, 2019 via email

@SolarAquarion
Copy link
Contributor Author

https://github.com/jamesturk/validictory can you move the code that use validictory to jsonschema?

@tizonia
Copy link
Collaborator

tizonia commented Dec 9, 2019

If I'm not mistaken, validictory is an indirect dependency. Please see this pull request in the gmusicapi project:
simon-weber/gmusicapi#656

@tizonia
Copy link
Collaborator

tizonia commented Dec 13, 2019

Closing this issue for now. The code is now in the master branch, to be released very soon.

@tizonia tizonia closed this as completed Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants