Skip to content

Instantly share code, notes, and snippets.

@ivan-hilckov
Created August 17, 2016 09:25
Show Gist options
  • Select an option

  • Save ivan-hilckov/ddfca3714985db9995851378e57a2d9b to your computer and use it in GitHub Desktop.

Select an option

Save ivan-hilckov/ddfca3714985db9995851378e57a2d9b to your computer and use it in GitHub Desktop.
Environment:
Request Method: PATCH
Request URL: http://api.idwell.nxngame.com/api/profile/34/
Django Version: 1.10
Python Version: 3.5.1
Installed Applications:
['django.contrib.sites',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.postgres',
'django_filters',
'rest_framework',
'rest_framework.authtoken',
'rest_auth',
'rest_auth.registration',
'haystack',
'idwellregistration',
'idwell',
'forum',
'translate',
'bill',
'nested_inline',
'django_q',
'meter',
'allauth',
'allauth.account',
'mail_templated']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/usr/local/lib/python3.5/shutil.py" in move
538. os.rename(src, real_dst)
During handling of the above exception ([Errno 2] No such file or directory: '/app/uploads/public/z1516-_0204-os305.jpg' -> '/app/uploads/public/avatar/z1516-_0204-os305.jpg'), another exception occurred:
File "/usr/local/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)
File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.5/site-packages/django/views/decorators/csrf.py" in wrapped_view
58. return view_func(*args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/rest_framework/viewsets.py" in view
87. return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/rest_framework/views.py" in dispatch
466. response = self.handle_exception(exc)
File "/usr/local/lib/python3.5/site-packages/rest_framework/views.py" in dispatch
463. response = handler(request, *args, **kwargs)
File "/app/idwell/profile/views.py" in partial_update
155. serializer.save()
File "/usr/local/lib/python3.5/site-packages/rest_framework/serializers.py" in save
186. self.instance = self.update(self.instance, validated_data)
File "/app/idwell/profile/serializers.py" in update
189. ava.move_to_avatar()
File "/app/idwell/file/models.py" in move_to_avatar
200. shutil.move(old_orig, new_orig)
File "/usr/local/lib/python3.5/shutil.py" in move
552. copy_function(src, real_dst)
File "/usr/local/lib/python3.5/shutil.py" in copy2
251. copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/local/lib/python3.5/shutil.py" in copyfile
115. with open(dst, 'wb') as fdst:
Exception Type: FileNotFoundError at /api/profile/34/
Exception Value: [Errno 2] No such file or directory: '/app/uploads/public/avatar/z1516-_0204-os305.jpg'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment