Celery Error dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not found - python-2.7

I'm trying to run celery on my local using this command celery -A cms worker --app=cms.celery_app:celery_app -l info
Getting this error
Traceback (most recent call last):
File "/Users/davgarg/Documents/grofers-cms-dashboard/venv/bin/celery", line 5, in <module>
from celery.__main__ import main
File "/Users/davgarg/Documents/grofers-cms-dashboard/venv/lib/python2.7/site-packages/celery/__init__.py", line 133, in <module>
from celery import five # noqa
File "/Users/davgarg/Documents/grofers-cms-dashboard/venv/lib/python2.7/site-packages/celery/five.py", line 20, in <module>
from kombu.five import monotonic
File "/Users/davgarg/Documents/grofers-cms-dashboard/venv/lib/python2.7/site-packages/kombu/five.py", line 56, in <module>
absolute_to_nanoseconds = CoreServices.AbsoluteToNanoseconds
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 379, in __getattr__
func = self.__getitem__(name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 384, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not found

Related

AttributeError: 'EntryPoints' object has no attribute 'get' with superset

I am installing superset and at the level of superset db upgrade I got an error saying: AttributeError: 'EntryPoints' object has no attribute 'get'
Error:
python datavisual\Scripts\superset db upgrade
Traceback (most recent call last):
File "datavisual\Scripts\superset", line 18, in <module>
from superset.cli import superset
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\superset\__init__.py", line 21, in <module>
from superset.app import create_app
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\superset\app.py", line 29, in <module>
from superset.extensions import (
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\superset\extensions.py", line 126, in <module>
celery_app = celery.Celery()
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\celery\local.py", line 470, in __getattr__
[name])
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\celery\app\__init__.py", line 2, in <module>
from celery import _state
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\celery\_state.py", line 15, in <module>
from celery.utils.threads import LocalStack
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\celery\utils\__init__.py", line 16, in <module>
from .nodenames import nodename, nodesplit, worker_direct
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\celery\utils\nodenames.py", line 6, in <module>
from kombu.entity import Exchange, Queue
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\kombu\entity.py", line 7, in <module>
from .serialization import prepare_accept_content
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\kombu\serialization.py", line 440, in <module>
for ep, args in entrypoints('kombu.serializers'): # pragma: no cover
File "C:\Users\user\Desktop\superset\datavisual\lib\site-packages\kombu\utils\compat.py", line 82, in entrypoints
for ep in importlib_metadata.entry_points().get(namespace, [])
AttributeError: 'EntryPoints' object has no attribute 'get'

How to solve error while launching scrapy shell?

when i executed scrapy shell 'https://scrapy.org' the following error occured, i followed the instructions from the scrapy documentation https://doc.scrapy.org/en/latest/topics/shell.html#launch-the-shell
Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 11, in <module>
sys.exit(execute())
File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 150, in execute
_run_print_help(parser, _run_command, cmd, args, opts)
File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 90, in _run_print_help
func(*a, **kw)
File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 157, in _run_command
cmd.run(args, opts)
File "/usr/local/lib/python2.7/dist-packages/scrapy/commands/shell.py", line 65, in run
crawler = self.crawler_process._create_crawler(spidercls)
File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 203, in _create_crawler
return Crawler(spidercls, self.settings)
File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 55, in __init__
self.extensions = ExtensionManager.from_crawler(self)
File "/usr/local/lib/python2.7/dist-packages/scrapy/middleware.py", line 58, in from_crawler
return cls.from_settings(crawler.settings, crawler)
File "/usr/local/lib/python2.7/dist-packages/scrapy/middleware.py", line 34, in from_settings
mwcls = load_object(clspath)
File "/usr/local/lib/python2.7/dist-packages/scrapy/utils/misc.py", line 44, in load_object
mod = import_module(module)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/dist-packages/scrapy/extensions/memusage.py", line 16, in <module>
from scrapy.mail import MailSender
File "/usr/local/lib/python2.7/dist-packages/scrapy/mail.py", line 25, in <module>
from twisted.internet import defer, reactor, ssl
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/ssl.py", line 230, in <module>
from twisted.internet._sslverify import (
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/_sslverify.py", line 15, in <module>
from OpenSSL._util import lib as pyOpenSSLlib
ImportError: No module named _util
It's a problem in scrapy installation. Maybe this can help:
sudo pip install pyopenssl --user --upgrade

ImportError: cannot import name requests while installing Tensorflow

I have installed Anaconda2 on my windows 10 with python 2.7.15 version. Now, I need to install tensorflow and Keras, however, I am consistently getting the error while installing using "conda" or "pip". I googled it a lot about this error, but to no avail. Please help me out in finding the lead to resolving this issue. TIA, Priya Arora
The stack trace is as below:
(base) C:\Users\ARORAP1\anaconda2>conda install jupyter
Traceback (most recent call last):
File "C:\Users\ARORAP1\anaconda2\Scripts\conda-script.py", line 10, in <module
>
sys.exit(main())
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\cli\main.py", line 11
3, in main
return conda_exception_handler(_main, *args)
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\exceptions.py", line
1112, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\exceptions.py", line
822, in __call__
return self.handle_exception(exc_val, exc_tb)
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\exceptions.py", line
864, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb)
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\exceptions.py", line
876, in handle_unexpected_exception
self.print_unexpected_error_report(error_report)
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\exceptions.py", line
947, in print_unexpected_error_report
from .cli.main_info import get_env_vars_str, get_main_info_str
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\cli\main_info.py", li
ne 25, in <module>
from ..core.subdir_data import SubdirData
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\core\subdir_data.py",
line 28, in <module>
from ..core.package_cache_data import PackageCacheData
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\core\package_cache_da
ta.py", line 13, in <module>
from .path_actions import CacheUrlAction, ExtractPackageAction
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\core\path_actions.py"
, line 25, in <module>
from ..gateways.connection.download import download
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\conda\gateways\connection\_
_init__.py", line 16, in <module>
from pip._vendor.requests import ConnectionError, HTTPError, Session
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\pip\_vendor\requests\__init
__.py", line 83, in <module>
from pip._internal.compat import WINDOWS
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\pip\_internal\__init__.py",
line 42, in <module>
from pip._internal import cmdoptions
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\pip\_internal\cmdoptions.py
", line 16, in <module>
from pip._internal.index import (
File "C:\Users\ARORAP1\anaconda2\lib\site-packages\pip\_internal\index.py", li
ne 15, in <module>
from pip._vendor import html5lib, requests, six
ImportError: cannot import name requests
(base) C:\Users\ARORAP1\anaconda2>

johnny cache 1.4 in Django 1.6 does not work?

I installed johnny-cache 1.4 in Django 1.6 using the instructions but does not work:
# add johnny's middleware
MIDDLEWARE_CLASSES = (
'johnny.middleware.LocalStoreClearMiddleware',
'johnny.middleware.QueryCacheMiddleware',
# ...
)
# some johnny settings
CACHES = {
'default' : dict(
BACKEND = 'johnny.backends.memcached.MemcachedCache',
LOCATION = ['127.0.0.1:11211'],
JOHNNY_CACHE = True,
)
}
JOHNNY_MIDDLEWARE_KEY_PREFIX='jc_myproj'
the error that comes out is:
$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/diegoug/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/home/diegoug/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/diegoug/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/home/diegoug/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 75, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/home/diegoug/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/diegoug/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/runserver.py", line 6, in <module>
from django.contrib.staticfiles.handlers import StaticFilesHandler
File "/home/diegoug/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 8, in <module>
from django.contrib.staticfiles.views import serve
File "/home/diegoug/local/lib/python2.7/site-packages/django/contrib/staticfiles/views.py", line 15, in <module>
from django.contrib.staticfiles import finders
File "/home/diegoug/local/lib/python2.7/site-packages/django/contrib/staticfiles/finders.py", line 12, in <module>
from django.contrib.staticfiles.storage import AppStaticStorage
File "/home/diegoug/local/lib/python2.7/site-packages/django/contrib/staticfiles/storage.py", line 8, in <module>
from django.core.cache import (get_cache, InvalidCacheBackendError,
File "/home/diegoug/local/lib/python2.7/site-packages/django/core/cache/__init__.py", line 138, in <module>
cache = get_cache(DEFAULT_CACHE_ALIAS)
File "/home/diegoug/local/lib/python2.7/site-packages/django/core/cache/__init__.py", line 130, in get_cache
"Could not find backend '%s': %s" % (backend, e))
django.core.cache.backends.base.InvalidCacheBackendError: Could not find backend 'johnny.backends.memcached.MemcachedCache': 'module' object has no attribute 'CacheClass'
Investigate and say the problem is more of Django, I would like to fix it, because this is a great tool and it would be great help.
Upgrade to Django version 1.7 which updated today, continuing the same problem, what I did was upgrade to version johnny cache development:
johnny-cache==1.6.1a
python-memcached==1.53
with this I am resolved the problem temporarily until they update

mac os import pymongo cause error

How can I fix this problem ? tks
>>> import pymongo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/pymongo-2.5.2-py2.7-macosx-10.7-intel.egg/pymongo/__init__.py", line 80, in <module>
File "/Library/Python/2.7/site-packages/pymongo-2.5.2-py2.7-macosx-10.7-intel.egg/pymongo/connection.py", line 39, in <module>
File "/Library/Python/2.7/site-packages/pymongo-2.5.2-py2.7-macosx-10.7-intel.egg/pymongo/mongo_client.py", line 44, in <module>
File "/Library/Python/2.7/site-packages/pymongo-2.5.2-py2.7-macosx-10.7-intel.egg/bson/__init__.py", line 41, in <module>
File "/Library/Python/2.7/site-packages/pymongo-2.5.2-py2.7-macosx-10.7-intel.egg/bson/_cbson.py", line 7, in <module>
File "/Library/Python/2.7/site-packages/pymongo-2.5.2-py2.7-macosx-10.7-intel.egg/bson/_cbson.py", line 4, in __bootstrap__
File "build/bdist.macosx-10.7-intel/egg/pkg_resources.py", line 914, in resource_filename
%s
File "build/bdist.macosx-10.7-intel/egg/pkg_resources.py", line 1601, in get_resource_filename
"""Retrieve a PEP 302 "importer" for the given path item
File "build/bdist.macosx-10.7-intel/egg/pkg_resources.py", line 1629, in _extract_resource
from pkgutil import get_importer, ImpImporter
File "build/bdist.macosx-10.7-intel/egg/pkg_resources.py", line 990, in get_cache_path
AttributeError: ResourceManager instance has no attribute '_warn_unsafe_extraction'