camelot-dev / excalibur

A web interface to extract tabular data from PDFs
https://excalibur-py.readthedocs.io
MIT License
1.59k stars 231 forks source link

Internal Server Error can't Download data #158

Closed kyuzh closed 2 years ago

kyuzh commented 2 years ago

image

kkin1995 commented 2 years ago

Facing the same issue on macOS Monterey 12.4 with camelot version 8.9.0 and excalibur version 0.4.3.

The error message in the terminal shown is:

TypeError: send_from_directory() missing 1 required positional argument: 'path'

The error is thrown from the file:

excalibur/www/views.py
graykimbrough commented 2 years ago

I am seeing the same issue on macOS Monterey 12.4 with camelot 8.9.0 and excalibur 0.4.3. I receive this error when I click "Download" in either Safari or Chrome, no matter what file format I select. Here is the full traceback:

[2022-06-16 09:01:49,261] ERROR in app: Exception on /download [POST] Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2077, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1525, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/usr/local/lib/python3.9/site-packages/excalibur/www/views.py", line 265, in download return send_from_directory( TypeError: send_from_directory() missing 1 required positional argument: 'path'

kyuzh commented 2 years ago

look here https://stackoverflow.com/questions/67591467/flask-shows-typeerror-send-from-directory-missing-1-required-positional-argum.

Just replace filename by path at line 263 in views.py. image