Open brainwane opened 7 years ago
That's fascinating. I don't remember ever seeing this error, and I don't see an obvious answer in line 117 or weakref.py
. I'll keep an eye out for this in future installs and make a note here if I see it.
I'm now getting a seemingly related error:
Traceback (most recent call last):
File "manage.py", line 24, in <module>
from django.core.management import execute_from_command_line
File "/home/cdonnelly/OTS/repos/swoptact/lib/python3.5/site-packages/django/__init__.py", line 1, in <module>
from django.utils.version import get_version
File "/home/cdonnelly/OTS/repos/swoptact/lib/python3.5/site-packages/django/utils/version.py", line 5, in <module>
import subprocess
File "/usr/lib/python3.5/subprocess.py", line 50, in <module>
import signal
File "/usr/lib/python3.5/signal.py", line 3, in <module>
from functools import wraps as _wraps
File "/home/cdonnelly/OTS/repos/swoptact/lib/python3.5/functools.py", line 23, in <module>
from weakref import WeakKeyDictionary
File "/home/cdonnelly/OTS/repos/swoptact/lib/python3.5/weakref.py", line 12, in <module>
from _weakref import (
ImportError: cannot import name '_remove_dead_weakref'
I don't know why I can't import _remove_dead_weakref
, but I'm guessing it's a version problem. I'll report back!
The delightful @nttaylor found this mailing list message, in which someone gets the same error when trying to install python 3.5. Note that this is on python 3.5.3 specifically, which was just released on January 17 and which I am also using. Suspicious! Unfortunately the message has not gotten any responses yet.
I'm seeing the same with mod_wsgi (randomly found this ticket through google) and python 3.5.3, just thought I'd share because it's very likely it's a python 3.5.3 issue.
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site.py", line 563, in <module>
main()
File "/usr/local/lib/python3.5/site.py", line 550, in main
known_paths = addsitepackages(known_paths)
File "/usr/local/lib/python3.5/site.py", line 327, in addsitepackages
addsitedir(sitedir, known_paths)
File "/usr/local/lib/python3.5/site.py", line 206, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/local/lib/python3.5/site.py", line 177, in addpackage
import traceback
File "/usr/local/lib/python3.5/traceback.py", line 5, in <module>
import linecache
File "/usr/local/lib/python3.5/linecache.py", line 8, in <module>
import functools
File "/usr/local/lib/python3.5/functools.py", line 23, in <module>
from weakref import WeakKeyDictionary
File "/usr/local/lib/python3.5/weakref.py", line 12, in <module>
from _weakref import (
ImportError: cannot import name '_remove_dead_weakref'
Could be fixed with this commit in 3.5 branch: https://github.com/python/cpython/commit/9cd7e17640a49635d1c1f8c2989578a8fc2c1de6
Hey, thanks @thijstriemstra for taking the time to drop a comment here. We're usually running stock Debian, with whatever Python 3 is packaged in Debian 'testing' distro, so we'll see that change arrive in our installed Python soon. Once it does, we can test and see if the bug is still present.
(We could also build Python from source now and try it, of course, but since that train will be coming along any day now it probably makes more sense for us to work on other bugs in the meantime.)
I too was getting this. Upon closer inspection, I was on 3.5.3. I updated to 3.6.1 and I am no longer getting the error.
Thanks, @mehemken! Glad that worked for you.
Since Python no longer supports 3.4 or 3.5 (3.7 is the oldest version that is still getting security updates right now), I suggest we address this issue by upgrading the minimum installed version of Python to 3.7 in INSTALL.md
and elsewhere.
That would be the best solution, I think. However, we're not currently maintaining this software. That could always change, depending on what leads walk in the door, of course, but for now it's dormant. We certainly welcome anyone else picking it up, of course, and if they would prefer to work on it here I'm happy to discuss opening up push access.
Also of note that I tried to upgrade django, once upon a time, and that failed for a number of reasons. Upgrading python to latest without django may not work like you'd like?
Yeah -- a full refresh is what's called for here.
When I run a
python manage.py
commands, even if the commands seem to be running successfully, I sometimes get an error:TypeError: 'NoneType' object is not callable
.Example: when I ran
python manage.py migrate auth
and got that error, I thought the migration application hadn't finished, but evidently it had (as I found out when I ran it the second time). And then I ranpython manage.py migrate
and did not get the error.So I got the TypeError on the first migrate command, but not the second. Why?
And then:
But the superuser had been created successfully.