Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '<frozen importlib._bootstrap>' (Django) [closed]

Ask Question

Want to improve this question? Add details and clarify the problem by editing this post .

Closed 3 years ago .

This post was edited and submitted for review 7 months ago and failed to reopen the post:

Original close reason(s) were not resolved

I ran into this error after executing python manage.py runserver . This was just after pulling the repository after not having worked on it in a while. I tried checking to see that I had the dependencies installed and that my virtual environment was active and I still get the error.

The last line of the error (also the title of the question) is

OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '<frozen importlib._bootstrap>'

See the screenshot below:

I am new to Django so I have no idea what the cause of this error is.

Please provide your traceback as a text instead of a screenshot. Please also provide related source code. – GwynBleidD May 16, 2019 at 10:47

I had the same issue here. After having suffering for a few hours stuck, I figured out the reason. It's very basic. We forgot to run the migrate commands. To fix, run the below commands in order:

python manage.py migrate
python manage.py makemigrations
python manage.py migrate

While the error notification is not relavance but this fix the error anyway :v.

You can read further information about migration Here.

The same issue is also occurred when someone misspell filename, directory name or app name... for example when someone create an app by the name of users and then he/she want to enlist the app in the INSTALLED_APPS List available in the setting.py file in misspell way like ............ users.app.UsersConfig instead of users.apps.UsersConfig

Thank you for this suggestion! I added a new app that kicked my server over, couldn't find the problem until It saw this. I had misspelled the app name in settings.py. Problem solved :) – Ross Jan 20, 2021 at 21:24 Thanks! that was my case. I mispelled one of my custom apps'name in settings.py INSTALLED_APPS – Tms91 Jan 21, 2021 at 23:02

I am sensing that you are trying to import bootstrap files for your website.This can be conveniently done by adding the hyperlink from the bootstrap cdn on your base template. Also you can download the boostrap package and copy the css and js files under the static folder in your project.

I don't think that's it actually. I just hit the same problem (which is how I found this question) and I haven't done anything with templates yet - still setting up models, so no bootstrap on my part. – michjnich Jul 19, 2019 at 17:35

In my case, I was missing the \ when using multiple lines to import:

from .models import Country, State, Locality, Address,\
PercentageAmount, Condominium, Condominium_expenses_report,\
    FunctionalUnit, Percentage, FunctionalUnit_expenses_report,\
        Expense, Bill, Judgment, Insurance, Concept