#pythorhead

posts tagged #pythorhead

0

v0.34.0: New dependency with loguru

preview

The last release has added a new dependency to loguru in pythorhead/classes/admin.py[^1] without adding it to the pyproject.toml file.

It rises an error after trying to update my script dependencies to the pythorhead v0.34.0:

boring error log

carlesmu@solaria:~/Desenvolupament/lemmy2/apc-lemmy-bot$ /usr/local/bin/apc-lemmy-bot-test.sh Traceback (most recent call last): File “<frozen runpy>”, line 198, in _run_module_as_main File “<frozen runpy>”, line 88, in _run_code File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/apc_lemmy_bot/__main__.py”, line 30, in <module> main() File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/apc_lemmy_bot/__main__.py”, line 24, in main from apc_lemmy_bot.cli.__main__ import run File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/apc_lemmy_bot/cli/__main__.py”, line 23, in <module> from . import app, db, post, show File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/apc_lemmy_bot/cli/db.py”, line 32, in <module> from apc_lemmy_bot.lemmy import LemmyException, login, create_event_post, upload_img File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/apc_lemmy_bot/lemmy.py”, line 23, in <module> from pythorhead import Lemmy File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/.venv/lib/python3.11/site-packages/pythorhead/__init__.py”, line 6, in <module> from pythorhead.lemmy import Lemmy File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/.venv/lib/python3.11/site-packages/pythorhead/lemmy.py”, line 20, in <module> from pythorhead import class_methods File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/.venv/lib/python3.11/site-packages/pythorhead/class_methods.py”, line 1, in <module> from pythorhead.classes.admin import LemmyRegistrationApplication, LemmyLocalUser File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/.venv/lib/python3.11/site-packages/pythorhead/classes/admin.py”, line 8, in <module> from loguru import logger ModuleNotFoundError: No module named ‘loguru’ ___

[^1]: See: github.com/db0/pythorhead/…/v0.33.0...v0.34.0

The last release has added a new dependency to loguru in pythorhead/classes/admin.py[^1] without adding it to the pyproject.toml file.

It rises an error after trying to update my script dependencies to the pythorhead v0.34.0:

boring error log

carlesmu@solaria:~/Desenvolupament/lemmy2/apc-lemmy-bot$ /usr/local/bin/apc-lemmy-bot-test.sh Traceback (most recent call last): File “<frozen runpy>”, line 198, in _run_module_as_main File “<frozen runpy>”, line 88, in _run_code File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/apc_lemmy_bot/__main__.py”, line 30, in <module> main() File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/apc_lemmy_bot/__main__.py”, line 24, in main from apc_lemmy_bot.cli.__main__ import run File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/apc_lemmy_bot/cli/__main__.py”, line 23, in <module> from . import app, db, post, show File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/apc_lemmy_bot/cli/db.py”, line 32, in <module> from apc_lemmy_bot.lemmy import LemmyException, login, create_event_post, upload_img File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/apc_lemmy_bot/lemmy.py”, line 23, in <module> from pythorhead import Lemmy File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/.venv/lib/python3.11/site-packages/pythorhead/__init__.py”, line 6, in <module> from pythorhead.lemmy import Lemmy File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/.venv/lib/python3.11/site-packages/pythorhead/lemmy.py”, line 20, in <module> from pythorhead import class_methods File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/.venv/lib/python3.11/site-packages/pythorhead/class_methods.py”, line 1, in <module> from pythorhead.classes.admin import LemmyRegistrationApplication, LemmyLocalUser File “/home/carlesmu/Desenvolupament/lemmy2/apc-lemmy-bot/.venv/lib/python3.11/site-packages/pythorhead/classes/admin.py”, line 8, in <module> from loguru import logger ModuleNotFoundError: No module named ‘loguru’ ___

[^1]: See: github.com/db0/pythorhead/…/v0.33.0...v0.34.0

0

Sending PMs to other servers?

preview

Hello!

I’m toying with the idea of building one of those oldtime slow action-point games (you earn action points every hour or day) here on lemmy.

My needs would be to send updates, and recieve commands over private messages (or as comments in posts, but I would need to send results on PMs at least), and pythorhead seems to fit the bill with the exception that I can’t figure out how to send messages to a user on another server.

I can easily send messages from lemmy.mindoki.com to a user on that same server, but not to a user on say world.com (sending a pm manually is working).

Is this a wanted limitation or am I just bad at programming?

Cheers & thanks for the good work!

Hello!

I’m toying with the idea of building one of those oldtime slow action-point games (you earn action points every hour or day) here on lemmy.

My needs would be to send updates, and recieve commands over private messages (or as comments in posts, but I would need to send results on PMs at least), and pythorhead seems to fit the bill with the exception that I can’t figure out how to send messages to a user on another server.

I can easily send messages from lemmy.mindoki.com to a user on that same server, but not to a user on say world.com (sending a pm manually is working).

Is this a wanted limitation or am I just bad at programming?

Cheers & thanks for the good work!