Cannot use loguru handlers with spark due to lru_cache
See original GitHub issueI am running an application on a spark cluster.
The driver creates a telegram handler and adds it to loguru.
In older versions of loguru (e.g. 0.3.2) this was working.
In more recent versions of loguru, when the driver starts pickling objects to send them to the executors there are issues with unpickable objects, for example I get this error when adding the telegram handler:
Can't pickle <functools._lru_cache_wrapper object at 0x7f3d8688f4b0>: it's not the same object as urllib.parse.urljoin
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Code snippets and recipes for loguru
Several solutions are possible, tough, if you need to change the configured level of a handler. Chose the one that best fits your...
Read more >How do I log from my Python Spark script - Stack Overflow
Handler interface in a class that forwards log messages to log4j under Spark. Then use logging.root.addHandler() (and, optionally ...
Read more >how to get python to log Code Example - Code Grepper
import logging logging.basicConfig(level=logging.DEBUG) # logging.basicConfig(filename='app.log', filemode='w', format='%(name)s - %(levelname)s ...
Read more >pkg_desc_index « metadata - repo/sync/gentoo.git
... for users with access to system-wide Bitcoin services acct-group/bitflu 0: ... for netfilter/iptables related logging app-admin/usbview 2.2 3.0: Display ...
Read more >main - Anaconda repo
Package Latest Version Doc Dev License linux‑64 osx‑64 win‑64
7za 920 doc LGPL X
7zip 19.00 dev LGPL‑2.1‑or‑later X
_anaconda_depends 2022.05 doc dev BSD X X...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It works! Thanks for the solution.
@Delgan didn’t try yet, will test asap, thanks