Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

ts3lib functions missing from PyCharm's "Intellisense" #74

Open
Bluscream opened this issue Nov 12, 2017 · 13 comments
Open

ts3lib functions missing from PyCharm's "Intellisense" #74

Bluscream opened this issue Nov 12, 2017 · 13 comments
Labels

Comments

@Bluscream
Copy link
Contributor

Bluscream commented Nov 12, 2017

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 Bluscream changed the title Clientlib functions missing from PyCharm's "Intellisense" ts3lib functions missing from PyCharm's "Intellisense" Nov 12, 2017
@pathmann
Copy link
Owner

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

@Bluscream
Copy link
Contributor Author

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

@Bluscream
Copy link
Contributor Author

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?

@pathmann
Copy link
Owner

pathmann commented Dec 19, 2017

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.

@Bluscream
Copy link
Contributor Author

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

@pathmann
Copy link
Owner

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

@Bluscream
Copy link
Contributor Author

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

@pathmann
Copy link
Owner

I have to consider all commits since e5f6c1c.

@Bluscream
Copy link
Contributor Author

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

@pathmann
Copy link
Owner

Thx, but I'll write it myself.

@Bluscream
Copy link
Contributor Author

Bluscream commented Dec 10, 2018

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 Bluscream reopened this Dec 10, 2018
@pathmann
Copy link
Owner

pathmann commented Dec 10, 2018

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.

@Bluscream
Copy link
Contributor Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants