cmutel/perdu

webapp - Unable to download json-ld of matches

Opened this issue · 3 comments

reported using Chrome 78.0
builtins.ValueError
ValueError: Unable to infer MIME-type because no filename is available. Please set either attachment_filename, pass a filepath to filename_or_fp or set your own MIME-type via mimetype.

Also occurred with pandas csv download

Still occuring with all available download types

[2020-12-23 06:37:51,719] ERROR in app: Exception on /export/jsonld [POST]
Traceback (most recent call last):
  File "c:\users\wes\appdata\local\programs\python\python37\lib\site-packages\flask\app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "c:\users\wes\appdata\local\programs\python\python37\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "c:\users\wes\appdata\local\programs\python\python37\lib\site-packages\flask\app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "c:\users\wes\appdata\local\programs\python\python37\lib\site-packages\flask\_compat.py", line 35, in reraise
    raise value
  File "c:\users\wes\appdata\local\programs\python\python37\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "c:\users\wes\appdata\local\programs\python\python37\lib\site-packages\flask\app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Users\wes\perdu\perdu\webapp.py", line 127, in export_linked_data
    fp = write_matching_to_rdf(content, "json-ld", "json")
  File "C:\Users\wes\perdu\perdu\semantic_web.py", line 31, in write_matching_to_rdf
    if match["code"] not in node_dict:
KeyError: 'code'
127.0.0.1 - - [23/Dec/2020 06:37:51] "POST /export/jsonld HTTP/1.1" 500 -