-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Hi @hackanons
thanks for your great project. I tried to run "Image Edit Html Button Run Python Script" on Ubuntu/Linux and everything almost works fine but I get the following error which seems to be caused by the wrong path output. Could you please have a look at it. Any help would be great.
[01/Jun/2021 23:13:47] "GET / HTTP/1.1" 200 763
Not Found: /favicon.ico
image is birdie1.png
file raw url birdie1.png
file full url /home/felix/ucmr/button-python-click/Image_Edit_Html_Button_Run_Python_Script/buttonpython/media/birdie1.png
template url /media/birdie1.png
CompletedProcess(args=['/home/felix/anaconda3/envs/ucmr/bin/python', '//home//felix//ucmr//button-python-click//Image_Edit_Html_Button_Run_Python_Script//test.py', 'upload'], returncode=0, stdout=b'Hi upload welcome to Hackanons & time is 2021-06-01 23:13:54.782867\n')
b'/media/temp.png\n'
[01/Jun/2021 23:13:54] "POST /external/ HTTP/1.1" 200 1074
[01/Jun/2021 23:13:54] "GET /media/birdie1.png HTTP/1.1" 200 103100
Internal Server Error: /external/b'/media/temp.png/n'
Traceback (most recent call last):
File "/home/felix/anaconda3/envs/ucmr/lib/python3.7/site-packages/django/utils/datastructures.py", line 78, in __getitem__
list_ = super().__getitem__(key)
KeyError: 'image'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/felix/anaconda3/envs/ucmr/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/felix/anaconda3/envs/ucmr/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/felix/anaconda3/envs/ucmr/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/felix/ucmr/button-python-click/Image_Edit_Html_Button_Run_Python_Script/buttonpython/buttonpython/views.py", line 19, in external
image=request.FILES['image']
File "/home/felix/anaconda3/envs/ucmr/lib/python3.7/site-packages/django/utils/datastructures.py", line 80, in __getitem__
raise MultiValueDictKeyError(key)
django.utils.datastructures.MultiValueDictKeyError: 'image'
[01/Jun/2021 23:13:54] "GET /external/b'/media/temp.png/n' HTTP/1.1" 500 80443
Metadata
Metadata
Assignees
Labels
No labels