pyTSon icon indicating copy to clipboard operation
pyTSon copied to clipboard

ts3lib functions missing from PyCharm's "Intellisense"

Open Bluscream opened this issue 8 years ago • 13 comments

Since you added the include/ts3lib.py all of the initial ts3lib.* functions are missing from pyCharm's "Intellisense" (The part where you see autocomplete suggestions). Could you give any advice how to get them back?

Bluscream avatar Nov 12 '17 00:11 Bluscream

Never used PyCharm, but I doubt, that it ever was possible to use autocompletion.

The ts3lib module (and all its functions are) is built in the library, so to inspect it (I assume PyCharm uses inspection for this) is nearly impossible.

The only source to get info from is this help function: https://github.com/pathmann/pyTSon/blob/master/generated/pregen/ts3help.py

pathmann avatar Nov 13 '17 16:11 pathmann

Well, i close this for now and hope someone else has a solution.

Bluscream avatar Nov 16 '17 02:11 Bluscream

Would you push the nightly changes to master so people that require the new functions and bugfixes don't have to download the nightly anymore?

Bluscream avatar Dec 19 '17 19:12 Bluscream

I guess by "master" you mean myteamspeak? The addons page is a pain in the ass and my connection is not that great to upload for each arch/platform 30MB packages. So to host it on my server is a good workaround (at least for me, and ofc: it's automatic!).

If not: the nightlies are automatically built with every commit to the master repo here on github (the version string should match the commit hash it was made from). So the master and the nightlies are always in sync.

pathmann avatar Dec 19 '17 20:12 pathmann

I mostly meant the github releases page. MyTeamspeak would just be even more convinient for the end-users :)

Bluscream avatar Dec 19 '17 20:12 Bluscream

When I have the time to write the changelog ...

pathmann avatar Dec 19 '17 20:12 pathmann

Where there so many changes?

  • Added wrapper around the ts3lib with convinience functions like ts3lib.getClientVariable(),ts3.getChannelVariable(),...
  • Fixed some bugs regarding lists to reduce crashes

Bluscream avatar Dec 19 '17 20:12 Bluscream

I have to consider all commits since e5f6c1cef42da0891bd25cdef5dfd1b442f1641f.

pathmann avatar Dec 20 '17 14:12 pathmann

uhh ehm yeah thats quite a bit since then. I'll see what i can do.

Bluscream avatar Dec 20 '17 14:12 Bluscream

Thx, but I'll write it myself.

pathmann avatar Dec 20 '17 17:12 pathmann

So, to give a little update i tried adding empty functions to the ts3lib.py

https://github.com/Bluscream/pyTSon_plugins/blob/6ddf68b5860ed020f97246b8dd7210fdbbced15d/include/ts3lib.py#L268-L273

and leaving your iterator at the bottom to re-overwrite them

https://github.com/Bluscream/pyTSon_plugins/blob/6ddf68b5860ed020f97246b8dd7210fdbbced15d/include/ts3lib.py#L2898-L2901

but for some reason that just causes some weird error that prevents pytson from loading:

2018-12-10 14:04:12.705651|ERROR   |pyTSon        |   |Initializing PythonHost failed with "Error calling PluginHost.init
                                                       Traceback (most recent call last):
                                                         File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/scripts\pluginhost.py", line 68, in init
                                                           pytson._setup()
                                                         File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/include\pytson.py", line 107, in _setup
                                                           if not os.path.isdir(getConfigPath()):
                                                         File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/include\pytson.py", line 88, in getConfigPath
                                                           return os.path.join(ts3lib.getConfigPath(), "pyTSon", *args)
                                                         File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/lib\ntpath.py", line 113, in join
                                                           genericpath._check_arg_types('join', path, *paths)
                                                         File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/lib\genericpath.py", line 143, in _check_arg_types
                                                           (funcname, s.__class__.__name__)) from None
                                                       TypeError: join() argument must be str or bytes, not 'NoneType'
                                                       "
2018-12-10 14:04:12.706627|ERROR   |pyTSon        |   |Error calling PluginHost.shutdown

Bluscream avatar Dec 10 '18 14:12 Bluscream

What did you expect? You replace the builtin functions (getConfigPath to be exact in this case) with empty functions implicitly returning None. So it's not a surprise that all usages of these functions that require a specific type to be returned will fail.

It's like removing the wheels of a car and wondering, that it won't drive anymore.

pathmann avatar Dec 10 '18 17:12 pathmann

Thanks, adding dummy returns and removing the if func not in globals(): fixed it. #111

Bluscream avatar Dec 11 '18 02:12 Bluscream