-
Notifications
You must be signed in to change notification settings - Fork 295
Closed
Description
Hi!
I have trouble with python-magic.
Environment:
Request Method: POST
Request URL: http://example.so/cdn/upload/example/video/?example_id=2
Django Version: 1.8.2
Python Version: 2.7.6
Installed Applications:
('django.contrib.contenttypes',
'api',
'storage_engine',
'raven.contrib.django.raven_compat',
'djrill',
'watson')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
132. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view
58. return view_func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/http.py" in inner
45. return func(request, *args, **kwargs)
File "/home/djuser/example-django/project/helpers.py" in internal
38. return func(*args) if allowed_access else error_response(error_code)
File "/home/djuser/example-django/project/helpers.py" in inner
67. return func(*args)
File "/home/djuser/example-django/storage_engine/views.py" in upload_example_video
156. if not magic.from_buffer(uploaded_file, mime=True) == 'video/mp4':
File "/usr/local/lib/python2.7/dist-packages/magic.py" in from_buffer
132. return m.from_buffer(buffer)
File "/usr/local/lib/python2.7/dist-packages/magic.py" in from_buffer
66. return magic_buffer(self.cookie, buf)
File "/usr/local/lib/python2.7/dist-packages/magic.py" in magic_buffer
215. return _magic_buffer(cookie, buf, len(buf))
File "/usr/local/lib/python2.7/dist-packages/magic.py" in errorcheck_null
168. raise MagicException(err)
Exception Type: MagicException at /cdn/upload/example/video/
Exception Value: cannot allocate 320768704 bytes (Cannot allocate memory)video/mp4
Do you have any ideas about what is going on?
Thank you very much!
Metadata
Metadata
Assignees
Labels
No labels