oeg-upm / mapeathor

Translator of spreadsheet mappings into R2RML, RML or YARRRML
https://morph.oeg.fi.upm.es/tool/mapeathor
Apache License 2.0
30 stars 10 forks source link

Error in PyPI package #27

Closed nleguillarme closed 2 years ago

nleguillarme commented 3 years ago

Hi.

Running Mapeathor installed from PyPI on your test file returns the following error :

...mapeathor/__init__.py", line 198, in reFormatFunction
if data_function[0]['Feature'] == 'nan' and data_function[0]['Value'] == 'nan':
IndexError: list index out of range

Everything works fine using Docker

daniel-dona commented 3 years ago

Bug confirmed and reproduced:

dani@dani-HP-Z600-Workstation:Mapeathor/use-cases/traffic$ python3 ../../code/mapeathor/mapeathor/__init__.py -i input/InputIncidences.xlsx -l YARRRML

Generating mapping file
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/dani/.local/lib/python3.6/site-packages/mapeathor/__main__.py", line 3, in <module>
    mapeathor.main()
  File "/home/dani/.local/lib/python3.6/site-packages/mapeathor/__init__.py", line 733, in main
    outputFile = generateMapping(inputFile, args.output_file)
  File "/home/dani/.local/lib/python3.6/site-packages/mapeathor/__init__.py", line 666, in generateMapping
    json = organizeJson(json)
  File "/home/dani/.local/lib/python3.6/site-packages/mapeathor/__init__.py", line 123, in organizeJson
    json['Function'] = reFormatFunction(data['Function'], json)
  File "/home/dani/.local/lib/python3.6/site-packages/mapeathor/__init__.py", line 198, in reFormatFunction
    if data_function[0]['Feature'] == 'nan' and data_function[0]['Value'] == 'nan':
IndexError: list index out of range

But is not related to PyPI, exists in the repository code. Maybe @anaigmo or @w0xter can have a look.

anaigmo commented 2 years ago

Solved