binarymatt / pyres

a resque clone in python
http://github.com/binarydud/pyres
MIT License
955 stars 130 forks source link

Module Import Error #148

Closed suniltholia closed 7 years ago

suniltholia commented 7 years ago

I have a module inside the project directory, in that module the class is implemented which contains queue attribute and perform method.

I started worker from shell.

Then I started the python script which enqueue the task, I got the following error:

Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/pyres/worker.py", line 256, in process return job.perform() File "/usr/local/lib/python3.4/dist-packages/pyres/job.py", line 67, in perform payload_class = self.safe_str_to_class(payload_class_str) File "/usr/local/lib/python3.4/dist-packages/pyres/__init__.py", line 93, in safe_str_to_class mod = my_import(module) File "/usr/local/lib/python3.4/dist-packages/pyres/__init__.py", line 81, in my_import mod = __import__(name) ImportError: No module named 'sun_logs'

I manually added my project path to python path but still same error, Please suggest some solution for this error.

suniltholia commented 7 years ago

I resolved the issue as I installed the module as package, script worked fine.