Knowledge-Graph-Hub / kg-microbe

https://knowledge-graph-hub.github.io/kg-microbe/index.html
BSD 3-Clause "New" or "Revised" License
15 stars 3 forks source link

TypeError in TraitsTransform due to Series when str expected #52

Closed caufieldjh closed 1 year ago

caufieldjh commented 1 year ago

Build currently encounters this problem:

14:33:09  Traceback (most recent call last):
14:33:09    File "run.py", line 121, in <module>
14:33:09      cli()
14:33:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
14:33:09      return self.main(*args, **kwargs)
14:33:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.8/site-packages/click/core.py", line 1055, in main
14:33:09      rv = self.invoke(ctx)
14:33:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
14:33:09      return _process_result(sub_ctx.command.invoke(sub_ctx))
14:33:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
14:33:09      return ctx.invoke(self.callback, **ctx.params)
14:33:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.8/site-packages/click/core.py", line 760, in invoke
14:33:09      return __callback(*args, **kwargs)
14:33:09    File "run.py", line 69, in transform
14:33:09      kg_transform(*args, **kwargs)
14:33:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/kg_microbe/transform.py", line 43, in transform
14:33:09      t.run()
14:33:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/kg_microbe/transform_utils/traits/traits.py", line 500, in run
14:33:09      write_node_edge_item(
14:33:09    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/kg_microbe/utils/transform_utils.py", line 83, in write_node_edge_item
14:33:09      fh.write(sep.join(data) + "\n")
14:33:09  TypeError: sequence item 2: expected str instance, Series found

This function attempts to write a single tab-delimited list of strings to a file, but in this case, it can't join the data because it's passed a pandas Series.

caufieldjh commented 1 year ago

Strangely enough, this completes as expected on a local run of python run.py transform -s TraitsTransform