$ python ../SDM-RDFizer/rdfizer/run_rdfizer.py config.ini
Semantifying...
Traceback (most recent call last):
File "../SDM-RDFizer/rdfizer/run_rdfizer.py", line 3, in <module>
semantify(str(sys.argv[1]))
File "...SDM-RDFizer\rdfizer\rdfizer\semantify.py", line 3280, in semantify
number_triple += executor.submit(semantify_postgres, row, row_headers, triples_map, triples_map_list, output_file_descriptor, wr, config[dataset_i]["name"],config[dataset_i]["user"], config[dataset_i]["password"], config[dataset_i]["db"], config[dataset_i]["host"]).result()
File "...\Python\Python37\lib\concurrent\futures\_base.py", line 425, in result
return self.__get_result()
File "...\Python\Python37\lib\concurrent\futures\_base.py", line 384, in __get_result
raise self._exception
File "...\Python\Python37\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "...SDM-RDFizer\rdfizer\rdfizer\semantify.py", line 2881, in semantify_postgres
output_file_descriptor.write(rdf_type)
UnboundLocalError: local variable 'rdf_type' referenced before assignment
In addition to fixing the bug, please consider this:
I assume this error doesn't happen on MySQL. But I can't imagine that rdf_type needs different handling on MySQL vs Postgres.
This suggests that the code needs to be refactored into common functions, and only the specific database connection and access should be in separate functions.
Thanks for fixing the bugs thus far! A new one:
In addition to fixing the bug, please consider this: I assume this error doesn't happen on MySQL. But I can't imagine that
rdf_type
needs different handling on MySQL vs Postgres. This suggests that the code needs to be refactored into common functions, and only the specific database connection and access should be in separate functions.