2

yesterday I installed PostgreSQL as db for the website That I'm developing. After the installation the computer restarted.

What's wrong? I lost all the environment variables (i'm using windows 10). So I had to re add python to the path.

After That I created the db I replaced the data on settings.py. I run the website but it gave an error. So I installed the psycopg2 to let postgres work with django. No way.

I Decided to go back to sqlite3 for the moment, so I edited the settings.py and run the website. the error Told the there was no application named Taggit. (???) It's not normal. I installed it and everything was working fine. I reinstalled it (version 0.17.1).

I do not know If These events are connected ... this the reason I tell you everything. now: On every single projects where I use django Taggit I receive the same error (even on the One That I do not open from months) ...

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x00000181AA17DAE8>
Traceback (most recent call last):
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "C:\Python35\lib\site-packages\django\core\management\commands\runserver.py", line 113, in inner_run
    autoreload.raise_last_exception()
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 249, in raise_last_exception
    six.reraise(*_exception)
  File "C:\Python35\lib\site-packages\django\utils\six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "C:\Python35\lib\site-packages\django\__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Python35\lib\site-packages\django\apps\registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "C:\Python35\lib\site-packages\django\apps\config.py", line 199, in import_models
    self.models_module = import_module(models_module_name)
  File "C:\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "C:\Users\Marco\Documents\Progetti\GiemmeLift\website\blog\models.py", line 21, in <module>
    class Post(models.Model):
  File "C:\Users\Marco\Documents\Progetti\GiemmeLift\website\blog\models.py", line 34, in Post
    tags = TaggableManager()
  File "C:\Python35\lib\site-packages\taggit\managers.py", line 285, in __init__
    rel = TaggableRel(self, related_name, self.through, to=to)
  File "C:\Python35\lib\site-packages\taggit\managers.py", line 55, in __init__
    self.to = to
AttributeError: can't set attribute

I tried to reinstall django-taggit but nothing changed.

Could you please help me to understand why?

scotch
  • 171
  • 3
  • 14
  • 1
    Which version of Django are you using? According to [the changelog](https://github.com/alex/django-taggit/blob/master/CHANGELOG.txt), the latest version of django-taggit is 0.21.4, and it looks like 0.17.1 does not support Django 1.9+. – Alasdair Jan 12 '17 at 16:42

1 Answers1

8

I had the same problem, installed the latest version of django-taggit and it worked.

Deepak Sah
  • 313
  • 1
  • 3
  • 14