jithurjacob / Windows-10-Toast-Notifications

Python library to display Windows 10 Toast Notifications
MIT License
970 stars 168 forks source link

Issues with python wrapper #28

Open Bluscream opened 6 years ago

Bluscream commented 6 years ago

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 :)

jithurjacob commented 6 years ago

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

Bluscream commented 6 years ago

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 commented 6 years ago

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 :)

jithurjacob commented 6 years ago

Are you able to import win32api separately?

Bluscream commented 6 years ago

by just adding an import win32api to which file?

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

jithurjacob commented 6 years ago

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

Bluscream commented 6 years ago

Like this?

or this?

jithurjacob commented 6 years ago

Second way.

Can you please try "pip install pypiwin32"

Bluscream commented 6 years ago

jithurjacob commented 6 years ago

Is PyTSon using different Python installation?

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

Bluscream commented 6 years ago

Your readme or pywin32's ?

jithurjacob commented 6 years ago

Mine

harmanvishnoi commented 6 years ago

_2018-02-27_15-37-07

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

Bluscream commented 6 years ago

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

micropicostack commented 6 years ago

@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?