-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running pelican -r -l
produces Pickle-related error
#3394
Comments
Upon further review, to be fair to @ben-n93, issue #3397 refers to running |
@cpitclaudel: It would seem that your PR #3293 is related to the new error reported in this issue. This error appears when running |
Sure, maybe the title should be changed to "Pickling error with The workaround I suggest is, generally, to change the log handler in order to solve the problem, and that is by adding the extra option So, |
make devserver
, and proposed solutionpelican -r -l
pelican -r -l
pelican -r -l
produces Pickle-related error
From my perspective, appending |
You are right, it is a workaround. One better fix is to remove the delattr(args, "log_handler") I'm not saying it's a complete solution, but it works, and you can call |
Hi all, sorry to hear about the trouble. @olivierverdier I tried to follow the repro, but I must have missed something:
What am I missing? |
@cpitclaudel: I can reproduce the error every time. Just to make sure, I followed the exact set of steps you listed, and I still get the error. (Python 3.12.6 on macOS Sonoma 14.7) |
Well, the step you printed out above are exactly what is needed to reproduce. 😅 Maybe it's OS related? An issue with MacOS perhaps? |
Fascinating. I'm on Ubuntu 24.04. Any chance you might share a backtrace? |
I suppose if the problem really is pickling then the following patch should help? main...cpitclaudel:pelican:cpc/formatter-pickle |
Yes, your patch works for me. |
That would likely do the trick. And I think it is related to how |
If anyone is interested in the traceback, here it is:
|
Thanks a lot for testing. I converted the patch to a pull request. |
I have read the Filing Issues and subsequent “How to Get Help” sections of the documentation.
I have searched the issues (including closed ones) and believe that this is not a duplicate.
OS version and name: MacOS 14.6.1
Python version: 3.12.6
Pelican version: 4.10.0
Link to theme: None
Links to plugins: None
Link to your site: None
Link to your source:
Link to a Gist with the contents of your settings file: Default settings
Issue
How to reproduce
Preliminary steps
With the very last pelican version (coming from github), create a new blog with
pelican-quick-start
. Go in the newly created site and runmake devserver
pelican -lr
.Outcome
Error coming from a pickle error, but which looks like:
Explanation
The problem is that the process
p1
created in__init__.main
contains an object of typeRichHandler
which can not get pickled.SolutionWorkaroundsUse
pelican -lr --log-handler=plain
until the problem is fixed.If you call
pelican -lr
frommake devserver
, modify theMakefile
by specifying a plain log hander, for instance by modifying the line containingPELICANOPTS
:PELICANOPTS=--log-handler plain
The text was updated successfully, but these errors were encountered: