linkml / linkml-project-cookiecutter

A cookiecutter for linkml projects. An equivalent of `linkml-ws new project-name`.
Creative Commons Zero v1.0 Universal
14 stars 16 forks source link

.decode error running make setup #73

Closed samwalrus closed 7 months ago

samwalrus commented 10 months ago

I got this error twice when running make setup:

AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?

With chat gpts help it said "Since strings in Python 3.x are already decoded (i.e., they are Unicode), they don't have a decode() method." and it told meto remove the .decode calls from line 127 owlgen.py and line 47 in shaclgen.py in my ~//.cache/pypoetry/virtualenvs/.. folders and then the make setup ran ok.

juliomateoslangerak commented 10 months ago

Same issue in shaclgen.py

jonathanunderwood commented 9 months ago

This is due to https://github.com/linkml/linkml/issues/1567

Fix for now is to pin to version 6 of rdflib. See #75 for a PR implementing that - it's a simple fix you can apply locally in the meantime.

pkalita-lbl commented 7 months ago

https://github.com/linkml/linkml/issues/1567 was fixed with LinkML 1.6.3 so you should no longer see this error when setting up a new project.