testdrivenio/django-on-docker

Getting stuck on "Media files"

pitastrudl opened this issue · 0 comments

I've followed the tutorial, getting stuck on creating the upload with startapp. I get the error:

(env) usr@thinkpad:~/django/django-on-docker$ docker-compose exec web python manage.py startapp medupsTraceback (most recent call last):                                                                                                        │
  File "manage.py", line 21, in <module>main()                                                                                                                                │
  File "manage.py", line 17, in mainexecute_from_command_line(sys.argv)                                                                                                   │
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_lineutility.execute()                                                                                                                     │
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in executeself.fetch_command(subcommand).run_from_argv(self.argv)                                                                               │
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 328, in run_from_argvself.execute(*args, **cmd_options)                                                                                                    │
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 369, in executeoutput = self.handle(*args, **options)                                                                                                │
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/startapp.py", line 14, in handlesuper().handle('app', app_name, target, **options)                                                                                    │
  File "/usr/local/lib/python3.8/site-packages/django/core/management/templates.py", line 159, in handlewith open(new_path, 'w', encoding='utf-8') as new_file:                                                                               │
OSError: [Errno 126] No error information: '/usr/src/app/medups/apps.py'                                        

This happens on the step where we build the dev environment and try to create a new app with start app. An empty dir is created with the name of the starapp in ./app directory. If you try to run the command again:

docker-compose exec web python manage.py startapp medups
CommandError: 'medups' conflicts with the name of an existing Python module and cannot be used as an app name. Please try another name.   │

I used "medups" because i thought "upload" was too generic and there was a conflict. The above error happens since the directory already exists. I tried cloning this repo and the same error happened. It seems like either some dependency updated and is too new, that is causing issues or it's my machine. Any help appreciated.

This happens on Ubuntu 20.04 LTS
Docker version 19.03.12, build 48a66213fe
docker-compose version 1.26.2, build unknown