pathmann / pyTSon

pyTSon is a plugin for the TeamSpeak 3 client, it offers a python interface for the plugin sdk
https://pytson.4qt.de
GNU General Public License v3.0
79 stars 12 forks source link

sqlit3 #112

Closed ghost closed 5 years ago

ghost commented 5 years ago

It seems like I cannot import sqlite3 properly, posting here desperately for help 👍

`2018-12-12 23:57:00 pyTSon.PluginHost.reload Error Error loading python plugin from H:/Program Files/TeamSpeak 3 Client/config/plugins/pyTSon\scripts\tsbot\: Traceback (most recent call last):

File "H:/Program Files/TeamSpeak 3 Client/config/plugins/pyTSon/scripts\pluginhost.py", line 322, in reload cls.modules[base] = importlib.import(base)

File "", line 1055, in import File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlocked File "", line 673, in _load_unlocked File "", line 665, in exec_module File "", line 222, in _call_with_frames_removed File "H:/Program Files/TeamSpeak 3 Client/config/plugins/pyTSon/scripts\tsbot__init__.py", line 7, in import channelupdate

File "H:\Program Files\TeamSpeak 3 Client\config\plugins\pyTSon\scripts\tsbot\channelupdate.py", line 4, in import database File "H:\Program Files\TeamSpeak 3 Client\config\plugins\pyTSon\scripts\tsbot\database.py", line 4, in import sqlite3 File "H:/Program Files/TeamSpeak 3 Client/config/plugins/pyTSon/lib\sqlite3__init__.py", line 23, in from sqlite3.dbapi2 import *

File "H:/Program Files/TeamSpeak 3 Client/config/plugins/pyTSon/lib\sqlite3\dbapi2.py", line 50, in version_info = tuple([int(x) for x in version.split(".")]) NameError: name 'version' is not defined `

ghost commented 5 years ago

After reinstalling pYTson completely I now get this error instead

from _sqlite3 import *

ImportError: DLL load failed: The specified module could not be found.

pathmann commented 5 years ago

Yeah, I think I missed some important files bundling the windows plugin. If you wanna test it, you can download python from here for 64bit or from here for 32bit and copy the file sqlite3.dll to %APPDATA%\TS3Client\plugins\pyTSon\lib\lib-dynload (I hope I got the path right on windows).

ghost commented 5 years ago

Reinstalled sqlite3 completely and moved the sqlite3.dll to the path you suggested and now it's working like a charm Thanks a ton!

pathmann commented 5 years ago

OK, I'll fix the bundle script soon.

pathmann commented 5 years ago

Should be fixed in e3abd16.

Please retest with the build from here https://repo.4qt.de/pyTSon/nightlies/2018-12-14/e3abd16/ (will be available as soon as the automatic build is completed.