SPSCommerce / redlock-py

Redis distributed locks in Python
MIT License
572 stars 117 forks source link

NameError: name 'basestring' is not defined #7

Closed karsep5 closed 9 years ago

karsep5 commented 9 years ago

Getting the following issue when using redlock with python 3.4

Traceback (most recent call last): File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/redlock/init.py", line 27, in init if isinstance(connection_info, basestring): NameError: name 'basestring' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/kp/.virtualenvs/celery_test/bin/celery", line 11, in sys.exit(main()) File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/celery/main.py", line 30, in main main() File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/celery/bin/celery.py", line 81, in main cmd.execute_from_commandline(argv) File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/celery/bin/celery.py", line 769, in execute_from_commandline super(CeleryCommand, self).execute_from_commandline(argv))) File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/celery/bin/base.py", line 305, in execute_from_commandline argv = self.setup_app_from_commandline(argv) File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/celery/bin/base.py", line 465, in setup_app_from_commandline self.app = self.find_app(app) File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/celery/bin/base.py", line 485, in find_app return find_app(app, symbol_by_name=self.symbol_by_name) File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/celery/app/utils.py", line 229, in find_app sym = symbol_by_name(app, imp=imp) File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/celery/bin/base.py", line 488, in symbol_by_name return symbol_by_name(name, imp=imp) File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/kombu/utils/init.py", line 92, in symbol_by_name module = imp(module_name, package=package, kwargs) File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/celery/utils/imports.py", line 101, in import_from_cwd return imp(module, package=package) File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/importlib/init.py", line 109, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 2254, in _gcd_import File "", line 2237, in _find_and_load File "", line 2226, in _find_and_load_unlocked File "", line 1200, in _load_unlocked File "", line 1129, in _exec File "", line 1471, in exec_module File "", line 321, in _call_with_frames_removed File "/Users/kp/repo/playground/celery_test/task.py", line 12, in dlm = Redlock([{'host': app.conf.REDIS_HOST, 'port': app.conf.REDIS_PORT, 'db': app.conf.REDIS_DB }, ]) File "/Users/kp/.virtualenvs/celery_test/lib/python3.4/site-packages/redlock/init.py", line 33, in init** raise Warning(str(e)) Warning: name 'basestring' is not defined

josegonzalez commented 9 years ago

@karsep5 is this still an issue for you?