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

LuaLock name error #217

Closed
jessekrubin opened this issue Oct 2, 2019 · 5 comments
Closed

LuaLock name error #217

jessekrubin opened this issue Oct 2, 2019 · 5 comments

Comments

@jessekrubin
Copy link

I get this error:

D:\myproject>mrq-run a.Fetch url http://www.google.com
�[37mMonkey-patching MongoDB methods...�[0m
Traceback (most recent call last):
  File "c:\miniconda3\envs\dgpy-dev\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\miniconda3\envs\dgpy-dev\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\miniconda3\envs\dgpy-dev\Scripts\mrq-run.exe\__main__.py", line 9, in <module>
  File "c:\miniconda3\envs\dgpy-dev\lib\site-packages\mrq\bin\mrq_run.py", line 56, in main
    worker_class = load_class_by_path(cfg["worker_class"])
  File "c:\miniconda3\envs\dgpy-dev\lib\site-packages\mrq\utils.py", line 99, in __missing__
    ret = self[key] = f(key)
  File "c:\miniconda3\envs\dgpy-dev\lib\site-packages\mrq\utils.py", line 113, in load_class_by_path
    taskpath)),
  File "c:\miniconda3\envs\dgpy-dev\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "c:\miniconda3\envs\dgpy-dev\lib\site-packages\mrq\worker.py", line 18, in <module>
    from redis.lock import LuaLock
ImportError: cannot import name 'LuaLock' from 'redis.lock' (c:\miniconda3\envs\dgpy-dev\lib\site-packages\redis\lock.py)
@jessekrubin
Copy link
Author

Welp I cloned the repo and the problem went away.

That error was from the pip install

@marsch
Copy link

marsch commented Feb 20, 2020

just ran into this again - think that might have something todo that the last release has been awhile

@marsch
Copy link

marsch commented Feb 20, 2020

if someone runs into this - just use the referenced redis-version and it should be fine

@leiyang
Copy link

leiyang commented Jan 20, 2021

the same issue here

@leiyang
Copy link

leiyang commented Jan 20, 2021

redis-py 3.0 drops support for the pipeline-based Lock and now only supports the Lua-based lock. In doing so, LuaLock has been renamed to Lock. This also means that redis-py Lock objects require Redis server 2.6 or greater. I see the code has update accordingly in github version

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

3 participants