Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSubrata Mitra
Courses Plus Student 82 PointsI got an error when i try to migrate in django rest framework
I got an error when I try to migrate
treehouse:~/workspace/ed_reviews$ python manage.py migrate
Traceback (most recent call last):
File "/home/treehouse/workspace/ed_reviews/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/treehouse/.local/lib/python3.9/site-packages/django/core/management/init.py", line 338, in execute_from_command_line
utility.execute()
File "/home/treehouse/.local/lib/python3.9/site-packages/django/core/management/init.py", line 312, in execute
django.setup()
File "/home/treehouse/.local/lib/python3.9/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/treehouse/.local/lib/python3.9/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/home/treehouse/.local/lib/python3.9/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/treehouse/.local/lib/python3.9/site-packages/rest_framework/authtoken/models.py", line 11, in <module>
class Token(models.Model):
RuntimeError: __class_ not set defining 'Token' as <class 'rest_framework.authtoken.models.Token'>. Was classcell propagated to type.new?
1 Answer
Chris Freeman
Treehouse Moderator 68,454 PointsIt appears to be a development environment issue. Please send this to help@teamtreehouse.com.