IsADirectoryError on __pychache__ dir
MichaelPak opened this issue · 1 comments
MichaelPak commented
I'm trying to migrate, but I get errors:
Traceback (most recent call last):
File "./manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/Users/michaelpak/.local/share/virtualenvs/price_back-jeBXFL4O/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
utility.execute()
File "/Users/michaelpak/.local/share/virtualenvs/price_back-jeBXFL4O/lib/python3.6/site-packages/django/core/management/__init__.py", line 317, in execute
settings.INSTALLED_APPS
File "/Users/michaelpak/.local/share/virtualenvs/price_back-jeBXFL4O/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/Users/michaelpak/.local/share/virtualenvs/price_back-jeBXFL4O/lib/python3.6/site-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/Users/michaelpak/.local/share/virtualenvs/price_back-jeBXFL4O/lib/python3.6/site-packages/django/conf/__init__.py", line 106, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/Users/michaelpak/.local/share/virtualenvs/price_back-jeBXFL4O/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/michaelpak/projects/filtrak/price_back/src/price/settings/__init__.py", line 11, in <module>
optional('local.py')
File "/Users/michaelpak/.local/share/virtualenvs/price_back-jeBXFL4O/lib/python3.6/site-packages/split_settings/tools.py", line 101, in include
with open(included_file, 'rb') as to_compile:
IsADirectoryError: [Errno 21] Is a directory: '/Users/michaelpak/projects/filtrak/price_back/src/price/settings/components/__pycache__
My settings/__init__.py
:
import os
from split_settings.tools import optional, include
ENV = os.environ.get('DJANGO_ENV') or 'development'
include(
'components/*',
'environments/%s.py' % ENV,
optional('local.py')
)
MichaelPak commented
'components/*'
is wrong pattern. It must be 'components/*.py'
.