Windows-10-Toast-Notifications icon indicating copy to clipboard operation
Windows-10-Toast-Notifications copied to clipboard

Issues with python wrapper

Open Bluscream opened this issue 6 years ago • 15 comments

Hello, i wonder if you're still maintaining and keeping an eye on this, if so please respond so i don't waste my time explaining my problem to a wall :)

Bluscream avatar Feb 18 '18 03:02 Bluscream

Closing this as I don't have to waste my "time" reading your problem.

jithurjacob avatar Feb 18 '18 05:02 jithurjacob

Sorry, the wording was kinda bad, but i'm not a native english speaker so please forgive me. I just had the experience a few times that i've spent > an hour to explain my problem to a dead repo/account

Bluscream avatar Feb 18 '18 07:02 Bluscream

So i'm actually trying to use your lib in https://github.com/pathmann/pyTSon which is a custom C->python wrapper. the problem is that i can't get the toasts to work even tho i installed pypiwin32.

2/18/2018 03:22:38	pyTSon.PluginHost.reload	Error	Error loading python plugin from C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon\scripts\friendNotifications\: Traceback (most recent call last):
  File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/scripts\pluginhost.py", line 322, in reload
    cls.modules[base] = importlib.__import__(base)
  File "<frozen importlib._bootstrap>", line 1055, in __import__
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/scripts\friendNotifications\__init__.py", line 4, in <module>
    from win10toast import ToastNotifier
  File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/include\win10toast\__init__.py", line 19, in <module>
    from win32api import GetModuleHandle
ImportError: No module named 'win32api'

If you require more infos to understand it please tell me :)

Bluscream avatar Feb 18 '18 07:02 Bluscream

Are you able to import win32api separately?

jithurjacob avatar Feb 18 '18 09:02 jithurjacob

by just adding an import win32api to which file?

here's a overview of the installed packages after installing win10toast grafik

Bluscream avatar Feb 19 '18 00:02 Bluscream

I'm not familiar with PyTSon. Can you please open a new python cli in shell/cmd and try "import win32api"

jithurjacob avatar Feb 19 '18 05:02 jithurjacob

Like this?

or this?

Bluscream avatar Feb 19 '18 07:02 Bluscream

Second way.

Can you please try "pip install pypiwin32"

jithurjacob avatar Feb 19 '18 08:02 jithurjacob

Bluscream avatar Feb 19 '18 08:02 Bluscream

Is PyTSon using different Python installation?

Please open a new cmd and try the sample code given readme.

jithurjacob avatar Feb 19 '18 10:02 jithurjacob

Your readme or pywin32's ?

Bluscream avatar Feb 19 '18 10:02 Bluscream

Mine

jithurjacob avatar Feb 19 '18 11:02 jithurjacob

_2018-02-27_15-37-07

Notification is appearing like this .not showing content. clicking on it does nothing. (I have Win10)

harmanvishnoi avatar Feb 27 '18 10:02 harmanvishnoi

Sorry for not trying thus so far. Gonna do it today

Bluscream avatar Feb 27 '18 10:02 Bluscream

@harmanvishnoi I had the same issue, but it was solved by allowing 'Notifications' under 'System->Notifications & actions'

Should this be added to the readme as prerequisite?

micropicostack avatar Apr 03 '18 12:04 micropicostack