Skip to content
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

Build fails with python2 #191

thekad opened this issue Jan 17, 2016 · 1 comment

Build fails with python2 #191

thekad opened this issue Jan 17, 2016 · 1 comment


Copy link

thekad commented Jan 17, 2016

Was using sigal with python 2 and I was doing some imports in the config file, which was making the build break with the following stack trace:

Traceback (most recent call last):
  File "/home/familia/.virtualenvs/sigal/bin/sigal", line 11, in <module>
  File "/home/familia/.virtualenvs/sigal/lib/python2.7/site-packages/click/", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/familia/.virtualenvs/sigal/lib/python2.7/site-packages/click/", line 696, in main
    rv = self.invoke(ctx)
  File "/home/familia/.virtualenvs/sigal/lib/python2.7/site-packages/click/", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/familia/.virtualenvs/sigal/lib/python2.7/site-packages/click/", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/familia/.virtualenvs/sigal/lib/python2.7/site-packages/click/", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/familia/.virtualenvs/sigal/lib/python2.7/site-packages/sigal/", line 142, in build
  File "/home/familia/.virtualenvs/sigal/lib/python2.7/site-packages/sigal/", line 615, in build
    for res in self.pool.imap_unordered(worker, media_list):
  File "/usr/lib/python2.7/multiprocessing/", line 668, in next
    raise value
cPickle.PicklingError: Can't pickle <type 'module'>: attribute lookup __builtin__.module failed

Switched to python 3 to discard issues and this time I got this message instead:

CRITICAL: Failed to process files with the multiprocessing feature. This can be caused by some module import or object defined in the settings file, which can't be serialized.

Which is just what I needed. Looking at it looks to me as if the except block should also consider cPickle.PicklingError (for python 2)

Copy link

saimn commented Jan 18, 2016

Thanks for the report @thekad !

@saimn saimn closed this as completed Jan 18, 2016
@saimn saimn added this to the 1.1.0 milestone Jan 18, 2016
kontza pushed a commit to kontza/sigal that referenced this issue Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants