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

UnpickleError: (u'Could not unpickle', ImportError('cannot import name SmsRecord',)) #608

Closed
zt9 opened this issue Nov 13, 2015 · 5 comments

Comments

@zt9
Copy link

zt9 commented Nov 13, 2015

I have been struggling with an import issue that I cannot seem to resolve.

I have a django app (not using django-rq because of some issues I do not remember) and have been using rq nicely for a while now. I added another module to my django app, and I started getting importError. I confirmed there are no circular import issues. I suspect there is a problem in the namespace and so want to explain a bit. I also feel like the error messages are not indicative of the real problems.

I have a module called quicken module that has from sprint.models import SmsRecord. There were no problems. I later created a module called waze that also from sprint.models import SmsRecord, but now I get a UnpickleError: (u'Could not unpickle', ImportError('cannot import name SmsRecord',)). Here is the full traceback.

To see what is happening, I included a import waze in my worker.py to see the cause of the error, and I see slightly better error message without the unpickleError. Any clues as to how I might debug this better?

Version used: rq==0.5.6, redis==2.10.5 and django==1.8.4 all in osx environment.

@selwin
Copy link
Collaborator

selwin commented Dec 12, 2015

This doesn't seem to be a bug in RQ but in the way your environment is set up. I'm not familiar with the way your code is structured so I can't provide much insight.

@selwin selwin closed this as completed Dec 12, 2015
@coreyar
Copy link

coreyar commented Aug 27, 2016

I encountered this same problem and was able to solve it by ensuring I was running rq worker in the directory where the required module could be imported.

@wroscoe
Copy link

wroscoe commented Feb 15, 2018

upgrading to rq==0.10.0 fixed this error for me

@lifenautjoe
Copy link

Having this issue now on 1.1.0 😬

@paltman
Copy link

paltman commented Jun 19, 2020

Looks like this exception was removed in e1cbc37#diff-27817b1a9be843cacb4ebeb20393c486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants