SDM-TIB / SDM-RDFizer

An Efficient RML-Compliant Engine for Knowledge Graph Construction
https://doi.org/10.5281/zenodo.3872103
Apache License 2.0
107 stars 25 forks source link

Possibly hashing wrong data #40

Closed arenas-guerrero-julian closed 3 years ago

arenas-guerrero-julian commented 3 years ago

Hi!!!

I am using MySQL with GTFS-Madrid-bench.

Describe the bug I think that for MySQL data sources the engine is not hashing what it should. I am getting the following error:

Traceback (most recent call last):
  File "/home/julian/PycharmProjects/SDM-RDFizer/rdfizer/run_rdfizer.py", line 3, in <module>
    semantify(str(sys.argv[1]))
  File "/home/julian/PycharmProjects/SDM-RDFizer/rdfizer/rdfizer/semantify.py", line 3981, in semantify
    number_triple += executor.submit(semantify_mysql, row, row_headers, triples_map, triples_map_list, output_file_descriptor, wr, config[dataset_i]["name"], config[dataset_i]["host"], int(config[dataset_i]["port"]), config[dataset_i]["user"], config[dataset_i]["password"],config[dataset_i]["db"]).result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/julian/PycharmProjects/SDM-RDFizer/rdfizer/rdfizer/semantify.py", line 2812, in semantify_mysql
    hash_maker_array(cursor, triples_map_element, predicate_object_map.object_map)
  File "/home/julian/PycharmProjects/SDM-RDFizer/rdfizer/rdfizer/semantify.py", line 231, in hash_maker_array
    if "<" + string_substitution_array(parent_subject.subject_map.value, "{(.+?)}", row, row_headers,"object") + ">" not in hash_table[row[child_object.parent[0]]]:
TypeError: tuple indices must be integers or slices, not str

Environment Running RDFizer Ubuntu 20.04 LTS using python 3.8 mysql:5.7 docker image

Julián

eiglesias34 commented 3 years ago

Hello,

I have updated the SDM-RDFizer. Please confirm if the error has been corrected, so we can close this issue.

arenas-guerrero-julian commented 3 years ago

Working (tested).

Julián