toxygen-project / toxygen

Toxygen is pythonic Tox client
GNU General Public License v3.0
280 stars 46 forks source link

Does Toxygen work with c-toxcore? #78

Closed skeletonium closed 4 years ago

skeletonium commented 4 years ago

Hi,

I found out about Toxygen just recently while contributing to the Tox wiki. It is impressive how many features Toxygen seems to support despite being of the lesser-known clients, and that the project managed to stay alive until now. I think it should be more well-known and supported for this reason.

I wanted to test Toxygen so I could make some updated screenshots and an installation guide to add to the wiki. So I installed all the dependencies (python-pyqt5, pyaudio, numpy, opencv, and portaudio19-dev), cloned the source code, compiled the latest version of c-toxcore from https://github.com/TokTok/c-toxcore, and tried to run Toxygen using python3 main.py.

Traceback (most recent call last):
  File "/home/user/toxygen/toxygen/libtox.py", line 54, in __init__
    self._lib_tox_encrypt_save = CDLL('libtoxencryptsave.so')
  File "/usr/lib/python3.7/ctypes/__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libtoxencryptsave.so: cannot open shared object file: No such file or directory

I looked in /usr/local/lib and there is indeed no libtoxencryptsave.so, but /usr/local/include/tox/ has toxencryptsave.h.

So, since I just wanted to test Toxygen, I tried to disable all the code related to ToxES. But now Toxygen didn't start because of missing ToxAV:

Traceback (most recent call last):
  File "/home/user/toxygen/toxygen/libtox.py", line 35, in __init__
    self._libtoxav = CDLL('libtoxav.so')
  File "/usr/lib/python3.7/ctypes/__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libtoxav.so: cannot open shared object file: No such file or directory

So I tried to disable ToxAV as well. After that, the profile creation window of Toxygen started, but still failed while creating the profile: name 'ToxES' is not defined

I did not read through the code that much, but I guess ToxES is needed in some way.

So I tried the prealpha version instead (v0.5.0). With the latest version of Toxcore, that needed no changes to the code and started normally. I created the profile and continued, but as soon as it is loaded:

Traceback (most recent call last):
  File "main.py", line 51, in <module>
    main()
  File "main.py", line 47, in main
    toxygen.main()
  File "/home/user/toxygen/toxygen/app.py", line 80, in main
    self._create_dependencies()
  File "/home/user/toxygen/toxygen/app.py", line 366, in _create_dependencies
    messages_items_factory)
  File "/home/user/toxygen/toxygen/contacts/contacts_manager.py", line 29, in __init__
    self._load_contacts()
  File "/home/user/toxygen/toxygen/contacts/contacts_manager.py", line 487, in _load_contacts
    self._load_groups()
  File "/home/user/toxygen/toxygen/contacts/contacts_manager.py", line 498, in _load_groups
    self._contacts.extend(self._contact_provider.get_all_groups())
  File "/home/user/toxygen/toxygen/contacts/contact_provider.py", line 42, in get_all_groups
    group_numbers = range(self._tox.group_get_number_groups())
  File "/home/user/toxygen/toxygen/wrapper/tox.py", line 1941, in group_get_number_groups
    result = Tox.libtoxcore.tox_group_get_number_groups(self._tox_pointer)
  File "/home/user/toxygen/toxygen/wrapper/libtox.py", line 21, in __getattr__
    return self._libtoxcore.__getattr__(item)
  File "/usr/lib/python3.7/ctypes/__init__.py", line 369, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.7/ctypes/__init__.py", line 374, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/libtoxcore.so: undefined symbol: tox_group_get_number_groups

I would try the releases but they are not signed and seem very big. Why 123 MB? Speaking of signing, do you have a GPG key you could sign commits and releases with? I would add its fingerprint to the installation guide.

Hopefully in the future we could get pre-built packages like qTox and uTox.

IngvarX commented 4 years ago

Hello!

the project managed to stay alive until now

Good joke, I like it :smiley:

Regarding c-toxcore. Toxygen doesn't support c-toxcore fork. 0.4.x branch uses old toxcore and 0.5.x branch uses NGC toxcore which is far ahead of c-toxcore

I would try the releases but they are not signed and seem very big. Why 123 MB?

Releases have all deps packed into single archive, including python, toxcore, pyqt5 and other stuff.

Hopefully in the future we could get pre-built packages like qTox and uTox.

I afraid it won't happen because development is stopped