incompatible with python 3.11
getargspec was removed from the inspect module AFAICT. First reported in #190
Until this is fixed in master, you can try this workaround (if you're calling ntfy from python)
def hack(*args, **kwargs):
raise RuntimeError("TODO")
import inspect
inspect.getargspec = hack
from ntfy.cli import main as ntfy_main
ntfy_main([
'-b', 'some_backend',
'-t', 'TITLE',
'send', 'BODY',
])
The error hander isn't used on the "happy path" so doesn't matter much what exactly you put into hack function.
Hotfix with the additional version of python for your mac:
brew install [email protected]
pip3.9 install ntfy
sed -I '' -E 's/[0-9]+.[0-9]+/3.9/g' /opt/homebrew/bin/ntfy
At least on my machine, changing getargspec to getfullargspec in init.py got ntfy working again on python 3.11.2.
@zakariassen do you know if getfullargspec also existed in older versions of python (ie: is that backwards compatible fix?)
@zakariassen do you know if
getfullargspecalso existed in older versions of python (ie: is that backwards compatible fix?)
AFAIK, It is present in all versions of Python 3, from v3.0 forwards.
https://docs.python.org/3.0/library/inspect.html#inspect.getfullargspec
Just dumb luck on my account, testing if it would function as a drop-in replacement :)
simple fix on ubutnu 23.10 with python 3.11
sed -i 's/getargspec/getfullargspec/' /usr/local/lib/python3.11/dist-packages/ntfy/__init__.py