Djangosphinx failed to read searchd response - django

The error is djangosphinx.models.SearchError: failed to read searchd response
(status=2613, ver=11825, len=775174445, read=75)
Does anyone know how to solve it?
root#haoran-Lenovo:~/wiscode/apps/question# python try.py
<SphinxQuerySet instance>
Traceback (most recent call last):
File "try.py", line 84, in <module>
print results[0]
File "/usr/local/lib/python2.6/dist-packages/django_sphinx-2.1.4-py2.6.egg/djangosphinx/models.py", line 266, in __getitem__
return self._get_data()[0]
File "/usr/local/lib/python2.6/dist-packages/django_sphinx-2.1.4-py2.6.egg/djangosphinx/models.py", line 400, in _get_data
self._result_cache = list(self._get_results())
File "/usr/local/lib/python2.6/dist-packages/django_sphinx-2.1.4-py2.6.egg/djangosphinx/models.py", line 526, in _get_results
results = self._get_sphinx_results()
File "/usr/local/lib/python2.6/dist-packages/django_sphinx-2.1.4-py2.6.egg/djangosphinx/models.py", line 513, in _get_sphinx_results
raise SearchError, client.GetLastError()
djangosphinx.models.SearchError: failed to read searchd response (status=2613, ver=11825, len=775174445, read=75)

Related

MongoDB doesn't work locally because of SRV error (no answer)

Situation
We are working on the backend of our project consisting of two services written in Django and FastAPI. Both services use MongoDB as their database system.
In Django we use djongo==1.3.0 for ORM compatibility.
In FastAPI we use odmantic==0.3.4.
Both of these libraries use pymongo==3.11.3 underneath.
This MongoDB SRV error has been an issue for our Django service ever since we created it, but we managed to somehow work around it by not using the latest packages, such as:
Django==2.2.20
djongo==1.3.0
pymongo==3.11.3
Recently due to security risks we had to upgrade:
urllib3 from 1.25.8 to 1.26.5
pydantic from 1.8.1 to 1.8.2
Django from 2.2.20 to 2.2.22
Those were suggested by GitHub's dependabot.
Problem
When we run any of these services locally now they break with the following base exception:
dns.resolver.NoAnswer: The DNS response does not contain an answer to the question: _mongodb._tcp.cluster0.k1eh0.mongodb.net. IN SRV
Full log for Django:
> python manage.py test
Creating test database for alias 'default'...
Traceback (most recent call last):
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/djongo/database.py", line 10, in connect
return clients[db]
KeyError: 'djongo_test'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/dns/resolver.py", line 212, in __init__
rrset = response.find_rrset(response.answer, qname,
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/dns/message.py", line 341, in find_rrset
raise KeyError
KeyError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/dns/resolver.py", line 220, in __init__
crrset = response.find_rrset(response.answer,
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/dns/message.py", line 341, in find_rrset
raise KeyError
KeyError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/pymongo/srv_resolver.py", line 72, in _resolve_uri
results = resolver.query('_mongodb._tcp.' + self.__fqdn, 'SRV',
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/dns/resolver.py", line 1100, in query
return get_default_resolver().query(qname, rdtype, rdclass, tcp, source,
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/dns/resolver.py", line 1003, in query
answer = Answer(_qname, rdtype, rdclass, response,
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/dns/resolver.py", line 232, in __init__
raise NoAnswer(response=response)
dns.resolver.NoAnswer: The DNS response does not contain an answer to the question: _mongodb._tcp.database-test.avxhw.mongodb.net. IN SRV
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/core/management/commands/test.py", line 23, in run_from_argv
super().run_from_argv(argv)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/core/management/commands/test.py", line 53, in handle
failures = test_runner.run_tests(test_labels)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/test/runner.py", line 629, in run_tests
old_config = self.setup_databases(aliases=databases)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/test/runner.py", line 552, in setup_databases
return _setup_databases(
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/test/utils.py", line 170, in setup_databases
connection.creation.create_test_db(
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/db/backends/base/creation.py", line 58, in create_test_db
self._create_test_db(verbosity, autoclobber, keepdb)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/db/backends/base/creation.py", line 168, in _create_test_db
with self._nodb_connection.cursor() as cursor:
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 256, in cursor
return self._cursor()
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 233, in _cursor
self.ensure_connection()
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
self.connect()
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 195, in connect
self.connection = self.get_new_connection(conn_params)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/djongo/base.py", line 185, in get_new_connection
self.client_connection = Database.connect(db=name, **connection_params)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/djongo/database.py", line 13, in connect
clients[db] = MongoClient(**kwargs, connect=False)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/pymongo/mongo_client.py", line 639, in __init__
res = uri_parser.parse_uri(
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/pymongo/uri_parser.py", line 500, in parse_uri
nodes = dns_resolver.get_hosts()
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/pymongo/srv_resolver.py", line 102, in get_hosts
_, nodes = self._get_srv_response_and_hosts(True)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/pymongo/srv_resolver.py", line 83, in _get_srv_response_and_hosts
results = self._resolve_uri(encapsulate_errors)
File "/home/bk/inz/backend/authservice/venv/lib/python3.8/site-packages/pymongo/srv_resolver.py", line 79, in _resolve_uri
raise ConfigurationError(str(exc))
pymongo.errors.ConfigurationError: The DNS response does not contain an answer to the question: _mongodb._tcp.database-test.avxhw.mongodb.net. IN SRV
Full log for FastAPI:
> python -m src.main
Traceback (most recent call last):
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/pymongo/srv_resolver.py", line 72, in _resolve_uri
results = resolver.query('_mongodb._tcp.' + self.__fqdn, 'SRV',
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/dns/resolver.py", line 1321, in query
return resolve(qname, rdtype, rdclass, tcp, source,
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/dns/resolver.py", line 1305, in resolve
return get_default_resolver().resolve(qname, rdtype, rdclass, tcp, source,
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/dns/resolver.py", line 1202, in resolve
(answer, done) = resolution.query_result(response, None)
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/dns/resolver.py", line 674, in query_result
raise NoAnswer(response=answer.response)
dns.resolver.NoAnswer: The DNS response does not contain an answer to the question: _mongodb._tcp.cluster0.k1eh0.mongodb.net. IN SRV
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/bk/inz/backend/testservice/src/main.py", line 20, in <module>
client = AsyncIOMotorClient(MONGODB_URL)
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/motor/core.py", line 156, in __init__
delegate = self.__delegate_class__(*args, **kwargs)
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/pymongo/mongo_client.py", line 639, in __init__
res = uri_parser.parse_uri(
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/pymongo/uri_parser.py", line 500, in parse_uri
nodes = dns_resolver.get_hosts()
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/pymongo/srv_resolver.py", line 102, in get_hosts
_, nodes = self._get_srv_response_and_hosts(True)
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/pymongo/srv_resolver.py", line 83, in _get_srv_response_and_hosts
results = self._resolve_uri(encapsulate_errors)
File "/home/bk/inz/backend/testservice/venv/lib/python3.8/site-packages/pymongo/srv_resolver.py", line 79, in _resolve_uri
raise ConfigurationError(str(exc))
pymongo.errors.ConfigurationError: The DNS response does not contain an answer to the question: _mongodb._tcp.cluster0.k1eh0.mongodb.net. IN SRV
In our CI setup on GitHub Actions Django service tests are still run successfully. It's clear that the problem lies within the DNS aspect.
Questions
Are there any specific DNS servers which do not support MongoDB? I was using Google's 8.8.8.8 before and after it broke.
Why would the problem be caused by upgrading listed dependencies? Only urllib was upgraded for both services.
Is there any workaround?
Review https://github.com/mongodb/specifications/blob/master/source/initial-dns-seedlist-discovery/initial-dns-seedlist-discovery.rst for how SRV URIs work, then manually issue the relevant DNS queries using a tool such as dig to verify your environment has working DNS.

SSL certificate not updating in Debian

I installed an SSL certificate few months ago and now it's expired. When I am trying to update it using
certbot renew
it give me a following error.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Processing /etc/letsencrypt/renewal/www.bureaubureau.dk.conf
Cert is due for renewal, auto-renewing...
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/init.py", line 859, in emit
msg = self.format(record)
File "/usr/lib/python2.7/dist-packages/certbot/coloredlogging.py", line 41, i n format
else super(StreamHandler, self).format(record))
File "/usr/lib/python2.7/logging/init.py", line 732, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/init.py", line 471, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 335, in getMessage
msg = msg % self.args
TypeError: _str__ returned non-string (type Error)
Logged from file renewal.py, line 420
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/handlers.py", line 76, in emit
if self.shouldRollover(record):
File "/usr/lib/python2.7/logging/handlers.py", line 156, in shouldRollover
msg = "%s\n" % self.format(record)
File "/usr/lib/python2.7/logging/init.py", line 732, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/init.py", line 471, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 335, in getMessage
msg = msg % self.args
TypeError: str returned non-string (type Error)
Logged from file renewal.py, line 420
Processing /etc/letsencrypt/renewal/bureaubureau.dk.conf
Cert is due for renewal, auto-renewing...
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/init.py", line 859, in emit
msg = self.format(record)
File "/usr/lib/python2.7/dist-packages/certbot/coloredlogging.py", line 41, i n format
else super(StreamHandler, self).format(record))
File "/usr/lib/python2.7/logging/init.py", line 732, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/init.py", line 471, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 335, in getMessage
msg = msg % self.args
TypeError: _str__ returned non-string (type Error)
Logged from file renewal.py, line 420
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/handlers.py", line 76, in emit
if self.shouldRollover(record):
File "/usr/lib/python2.7/logging/handlers.py", line 156, in shouldRollover
msg = "%s\n" % self.format(record)
File "/usr/lib/python2.7/logging/init.py", line 732, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/init.py", line 471, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 335, in getMessage
msg = msg % self.args
TypeError: str returned non-string (type Error)
Logged from file renewal.py, line 420
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/www.bureaubureau.dk/fullchain.pem (failure)
/etc/letsencrypt/live/bureaubureau.dk/fullchain.pem (failure)
2 renew failure(s), 0 parse failure(s)
I have gone through similar questions but nothing helped.
I also used
sudo -H pip install -U requests
I get the same response
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirementset.preparefiles(finder, forcerootegginfo=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1097, in preparefiles
reqtoinstall, self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 194, in findrequirement
page = self.getpage(mainindexurl, req)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _getpage
session=self.session,
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 694, in getpage
req, link, "connection error: %s" % exc, url,
TypeError: _str__ returned non-string (type Error)
Storing debug log for failure in /root/.pip/pip.log
I finally solved it myself. The Debian 8 is deprecated and was not supported any more, so I upgraded my droplet to Debian 9 and upgraded all packages and certbot-auto and it fixed my problem.

How to resolve an error message when attempting to start Jupyter-Notebook?

I have Jupyter-Notebook on an AWS EC2 instance. It was working fine until I made a few changes/updates and now I'm getting the following error message when I attempt to use Jupyter-Notebook:
ubuntu#ip-10-0-0-5:~$ jupyter-notebook
[E 06:41:09.375 NotebookApp] Exception while loading config file /home/ubuntu/.jupyter/jupyter_notebook_config.json
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python2.7/site-packages/traitlets/config/application.py", line 562, in _load_config_files
config = loader.load_config()
File "/home/ubuntu/.local/lib/python2.7/site-packages/traitlets/config/loader.py", line 406, in load_config
dct = self._read_file_as_dict()
File "/home/ubuntu/.local/lib/python2.7/site-packages/traitlets/config/loader.py", line 412, in _read_file_as_dict
return json.load(f)
File "/usr/lib/python2.7/json/__init__.py", line 291, in load
**kw)
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 367, in decode
raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 17 column 1 - line 18 column 1 (char 255 - 257)
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/jupyter-notebook", line 10, in <module>
sys.exit(main())
File "/home/ubuntu/.local/lib/python2.7/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/ubuntu/.local/lib/python2.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/home/ubuntu/.local/lib/python2.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/home/ubuntu/.local/lib/python2.7/site-packages/notebook/notebookapp.py", line 1633, in initialize
self.init_server_extensions()
File "/home/ubuntu/.local/lib/python2.7/site-packages/notebook/notebookapp.py", line 1559, in init_server_extensions
section = manager.get(self.config_file_name)
File "/home/ubuntu/.local/lib/python2.7/site-packages/notebook/services/config/manager.py", line 25, in get
recursive_update(config, cm.get(section_name))
File "/home/ubuntu/.local/lib/python2.7/site-packages/notebook/config_manager.py", line 103, in get
recursive_update(data, json.load(f))
File "/usr/lib/python2.7/json/__init__.py", line 291, in load
**kw)
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 367, in decode
raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 17 column 1 - line 18 column 1 (char 255 - 257)
Can anyone help me troubleshoot this problem?

ConnectionAbortedError - if Celery stopped/failed or Redis is not started. How do I catch/except this error/

I have a Celery task that works with Redis:
#app.task(bind=True, name='task_a', max_retries=4, soft_time_limit_exception=300)
def task_a(self, a, b):
try:
# some code here
except Exception as e:
raise self.retry(exc=e, countdown=exponential_backoff(self))
def exponential_backoff(task_self):
minutes = task_self.default_retry_delay / 60
rand = random.uniform(minutes, minutes * 1.5)
return int(rand ** task_self.request.retries) * 60
I have the following issue:
If Redis is not working or celery workers are stopped/failed, the code is 'waiting' than continue the execution of code.
If I put try except block inside the task, or the task called inside try except, it cathches nothing, I get a ConnectionAbortedError.
What I want in this cases, is to catch this specific errors and do other operations, or ignore without calling retry.
#Pavel Minenkov answer suggest to use sentry.io, but the issue is that I don't know were to catch it.
See Traceback:
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 49301)
Traceback (most recent call last):
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 453, in _write
result = self.stdout.write(data)
File "D:\DevEnv\Python\lib\socketserver.py", line 796, in write
self._sock.sendall(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 141, in run
self.handle_error()
File "D:\DevEnv\PythonVENV\DjangoDev\lib\site-packages\django\core\servers\basehttp.py", line 86, in handle_error
super().handle_error()
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 368, in handle_error
self.finish_response()
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\DevEnv\Python\lib\socketserver.py", line 647, in process_request_thread
self.finish_request(request, client_address)
File "D:\DevEnv\Python\lib\socketserver.py", line 357, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "D:\DevEnv\Python\lib\socketserver.py", line 717, in __init__
self.handle()
File "D:\DevEnv\PythonVENV\DjangoDev\lib\site-packages\django\core\servers\basehttp.py", line 154, in handle
handler.run(self.server.get_app())
File "D:\DevEnv\Python\lib\wsgiref\handlers.py", line 144, in run
self.close()
File "D:\DevEnv\Python\lib\wsgiref\simple_server.py", line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
First of all implement monitoring system. I like Sentry: https://sentry.io/welcome/ It is free for 1 user
from raven import Client
...
#app.task(bind=True, name='task_a', max_retries=4, soft_time_limit_exception=300)
def task_a(self, a, b):
sentry = Client(dsn=<your>)
with sentry.capture_exceptions():
# some code here
Then you will be able found out what Exception(s) are raises, then you will able to workaround the issue

scipy.test() results in errors

Having some problems with scipy. Installed latest version using pip (0.17.0). Run scipy.test() and I'm getting the following errors. Are they okay to ignore? I'm using python 2.7.6.
Thanks for your help.
======================================================================
ERROR: test_add_function_ordered (test_catalog.TestCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 477, in test_add_function_ordered
q.add_function('f',string.upper)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 833, in add_function
self.add_function_persistent(code,function)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 849, in add_function_persistent
cat = get_catalog(cat_dir,mode)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
======================================================================
ERROR: test_add_function_persistent1 (test_catalog.TestCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 466, in test_add_function_persistent1
q.add_function_persistent('code',i)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 849, in add_function_persistent
cat = get_catalog(cat_dir,mode)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
======================================================================
ERROR: test_get_existing_files2 (test_catalog.TestCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 394, in test_get_existing_files2
q.add_function('code', os.getpid)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 833, in add_function
self.add_function_persistent(code,function)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 849, in add_function_persistent
cat = get_catalog(cat_dir,mode)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
======================================================================
ERROR: test_create_catalog (test_catalog.TestGetCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 286, in test_create_catalog
cat = catalog.get_catalog(pardir,'c')
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
Ran 20343 tests in 138.416s
FAILED (KNOWNFAIL=98, SKIP=1679, errors=4)
All these are in weave, which is not used anywhere else in scipy itself. So unless you're using weave directly, you're likely OK. And there is likely no reason to use weave in new code anyway.