Skip to content

.decode error running make setup #73

Closed
@samwalrus

Description

@samwalrus

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.

Activity

juliomateoslangerak

juliomateoslangerak commented on Sep 5, 2023

@juliomateoslangerak

Same issue in shaclgen.py

added a commit that references this issue on Sep 14, 2023
50b2272
jonathanunderwood

jonathanunderwood commented on Sep 14, 2023

@jonathanunderwood

This is due to linkml/linkml#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

pkalita-lbl commented on Dec 1, 2023

@pkalita-lbl
Contributor

linkml/linkml#1567 was fixed with LinkML 1.6.3 so you should no longer see this error when setting up a new project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jonathanunderwood@samwalrus@juliomateoslangerak@pkalita-lbl

        Issue actions

          .decode error running make setup · Issue #73 · linkml/linkml-project-cookiecutter