haseebs / OWE

Pytorch code for An Open-World Extension to Knowledge Graph Completion Models (AAAI 2019)
https://aaai.org/ojs/index.php/AAAI/article/view/4162
37 stars 9 forks source link

unsupported operand type #20

Closed Balabala0792 closed 2 years ago

Balabala0792 commented 2 years ago

Hi there, I found that when I loaded pretrained embeddings from Complex model , there is a mistake that "unsupported operand type(s) for / : 'str' and 'str' " And the corresponding code is "entity_r_file = emb_dir / "entities_r.p" " Hope you can help me.

haseebs commented 2 years ago

Maybe you are using a different python version. Just do a string concatenation

entity_r_file = emb_dir + "/entities_r.p"

Balabala0792 commented 2 years ago

Ok,thank you. Could you please tell me which python version you are using?

haseebs commented 2 years ago

Unfortunately, I do not remember as it was a very long time ago since I last worked on this. Try 2.7 and 3.9 maybe.

Balabala0792 commented 2 years ago

ok, thank you so much