flask: GET error (exception)
JayBrown opened this issue · 1 comments
JayBrown commented
Tried it again today, but got an error, when trying to download the file locally. (I'm on macOS, even though it says Firefox on Windows.) Two tests, one with "localhost", one using the local IP address.
Could it be that my installed version of flask
(2.2.2) doesn't work anymore with curldrop
(requirements says: 1.0.2)?
[2022-11-27 15:29:02 +0100] [70735] [INFO] Starting gunicorn 20.1.0
[2022-11-27 15:29:02 +0100] [70735] [INFO] Listening at: http://0.0.0.0:8000 (70735)
[2022-11-27 15:29:02 +0100] [70735] [INFO] Using worker: sync
[2022-11-27 15:29:02 +0100] [70745] [INFO] Booting worker with pid: 70745
[2022-11-27 15:29:02 +0100] [70746] [INFO] Booting worker with pid: 70746
[2022-11-27 15:29:02 +0100] [70747] [INFO] Booting worker with pid: 70747
[2022-11-27 15:29:02 +0100] [70752] [INFO] Booting worker with pid: 70752
127.0.0.1 - - [27/Nov/2022:15:30:50 +0100] "PUT /TEST.txt HTTP/1.1" 200 30 "-" "curl/7.79.1"
[2022-11-27 15:31:14,119] ERROR in app: Exception on /85598c5 [GET]
Traceback (most recent call last):
File "/Users/*/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/Users/*/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/*/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/*/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/Users/*/Library/Python/3.8/lib/python/site-packages/curldrop/app.py", line 31, in download
return send_file(
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'
127.0.0.1 - - [27/Nov/2022:15:31:14 +0100] "GET /85598c5 HTTP/1.1" 500 265 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"
127.0.0.1 - - [27/Nov/2022:15:31:14 +0100] "GET /favicon.ico HTTP/1.1" 404 207 "http://localhost:8000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"
[2022-11-27 15:32:03,799] ERROR in app: Exception on /85598c5 [GET]
Traceback (most recent call last):
File "/Users/*/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/Users/*/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/*/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/*/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/Users/*/Library/Python/3.8/lib/python/site-packages/curldrop/app.py", line 31, in download
return send_file(
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'
1**.1**.1**.*** - - [27/Nov/2022:15:32:03 +0100] "GET /85598c5 HTTP/1.1" 500 265 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"
1***.1**.1**.*** - - [27/Nov/2022:15:32:04 +0100] "GET /favicon.ico HTTP/1.1" 404 207 "http://1**.1**.1**.***:8000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"
^C[2022-11-27 15:32:48 +0100] [70735] [INFO] Handling signal: int
[2022-11-27 15:32:48 +0100] [70752] [INFO] Worker exiting (pid: 70752)
[2022-11-27 15:32:48 +0100] [70746] [INFO] Worker exiting (pid: 70746)
[2022-11-27 15:32:48 +0100] [70747] [INFO] Worker exiting (pid: 70747)
[2022-11-27 15:32:48 +0100] [70745] [INFO] Worker exiting (pid: 70745)
[2022-11-27 15:32:48 +0100] [70735] [INFO] Shutting down: Master
JayBrown commented
OK, that seems to have been the problem. Re-installed older versions of the required packages, and all was well again.