MANAGE.PY RUNSERVER ERROR

1,120 views
Skip to first unread message

Peter Mwai

unread,
Nov 15, 2022, 7:54:12 PM11/15/22
to Django users
Hello experts,
I was trying to start the server using 'python manage.py runserver' but encountered this error,

Exception ignored in thread started by: <function check_errors.<locals>.wrapper
 at 0x00000202E609EDE0>
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\core\management\commands\runserver.py", line 109, in inner_run

    autoreload.raise_last_exception()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\autoreload.py", line 248, in raise_last_exception      
    raise _exception[1]
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\core\management\__init__.py", line 337, in execute
    autoreload.check_errors(django.setup)()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\apps\registry.py", line 112, in populate
    app_config.import_models()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\apps\config.py", line 198, in import_models
    self.models_module = import_module(models_module_name)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\impo
rtlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked  
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\contrib\auth\models.py", line 94, in <module>
    class Group(models.Model):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\db\models\base.py", line 139, in __new__
    new_class.add_to_class(obj_name, obj)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\db\models\base.py", line 304, in add_to_class
    value.contribute_to_class(cls, name)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\db\models\fields\related.py", line 1583, in contribute_to_clas
s
    self.remote_field.through = create_many_to_many_intermediary_model(self, cl
s)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\db\models\fields\related.py", line 1051, in create_many_to_man
y_intermediary_model
    'verbose_name': _('%(from)s-%(to)s relationship') % {'from': from_, 'to': t
o},
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
~~
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\functional.py", line 149, in __mod__
    return str(self) % rhs
           ^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\functional.py", line 113, in __text_cast
    return func(*self.__args, **self.__kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\translation\__init__.py", line 75, in gettext
    return _trans.gettext(message)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\translation\trans_real.py", line 286, in gettext        
    _default = _default or translation(settings.LANGUAGE_CODE)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\translation\trans_real.py", line 199, in translation    
    _translations[language] = DjangoTranslation(language)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\translation\trans_real.py", line 90, in __init__        
    self._init_translation_catalog()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\translation\trans_real.py", line 131, in _init_translati
on_catalog
    translation = self._new_gnu_trans(localedir)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site
-packages\django\utils\translation\trans_real.py", line 119, in _new_gnu_trans
    return gettext_module.translation(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: translation() got an unexpected keyword argument 'codeset'

Kasper Laudrup

unread,
Nov 16, 2022, 4:10:54 AM11/16/22
to django...@googlegroups.com
On 15/11/2022 18.49, Peter Mwai wrote:
> Hello experts,
> I was trying to start the server using 'python manage.py runserver' but
> encountered this error,
>

You have a bug somewhere in your code. That most likely happened after
you made a change somewhere.

Look into what you changed, fix the bug and the error should disappear.

Hope that helps.

Kind regards,

Kasper Laudrup

Raúl Luján Delgado

unread,
Nov 16, 2022, 5:35:21 AM11/16/22
to django...@googlegroups.com
Hello Kasper,

Probably is a Windows problem, because if you follow the rules of differents tutorials, is easy to run the runserver,

Sincerely,

Raúl Luján Delgado





--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/27422127-db9b-b4f0-bca7-204642edaeb0%40stacktrace.dk.

Jitendra kumar Patra

unread,
Nov 16, 2022, 6:28:31 AM11/16/22
to django...@googlegroups.com
Could you share what type of error you are getting?

Kasper Laudrup

unread,
Nov 16, 2022, 7:00:53 AM11/16/22
to django...@googlegroups.com
On 16/11/2022 11.33, Raúl Luján Delgado wrote:
> Hello Kasper,
>
> Probably is a Windows problem, because if you follow the rules of
> differents tutorials, is easy to run the runserver,
>

Could be. Could be any kind of problem really. Your guess is as good as
mine.

Only Peter Mwai knows but it doesn't seem like he find it necessary to
share the relevant details so we can only guess.

Kind regards,
Kasper Laudrup

Kasper Laudrup

unread,
Nov 16, 2022, 7:01:48 AM11/16/22
to django...@googlegroups.com
On 16/11/2022 12.27, Jitendra kumar Patra wrote:
> Could you share what type of error you are getting?
>

I'm not getting any errors. I don't know any more than you. We have to
wait and see if Peter Mwai finds it relevant to share what is needed for
any of us to help him.

Kind regards,
Kasper Laudrup

Peter Mwai

unread,
Nov 16, 2022, 7:23:51 AM11/16/22
to django...@googlegroups.com
After activating the virtual environment it has finally accepted to run

You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/LjXq_S6L8I0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAN3bF7Gdm%2BTK8nKAgq%3DCv-yXEP2uCJ-cO_1jei5Bb2KH1sxjXw%40mail.gmail.com.

Balogun Awwal

unread,
Nov 16, 2022, 8:10:42 AM11/16/22
to django...@googlegroups.com

What is the output given 
Sent from awwal

On 16 Nov 2022, at 1:23 PM, Peter Mwai <peter...@gmail.com> wrote:



Peter Mwai

unread,
Nov 16, 2022, 8:31:36 AM11/16/22
to django...@googlegroups.com
> python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Django version 4.1.3, using settings 'pyshop.settings'
Starting development server at http://127.0.0.1:8000/

Reply all
Reply to author
Forward
0 new messages