Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"team is not a property in Employee" for getting started lesson 5 #42

Open
dwinston opened this issue Oct 19, 2021 · 5 comments
Open

"team is not a property in Employee" for getting started lesson 5 #42

dwinston opened this issue Oct 19, 2021 · 5 comments
Assignees

Comments

@dwinston
Copy link
Contributor

In getting_started/lesson_5 when I get to

terminusdb alldocs --type Employee -q team=it

the output is

terminusdb_client.errors.InterfaceError: team is not a proerty in Employee

At this point in the lesson, my schema.py has a team property in EmployeesFromCSV but not in Employee.

I am using terminusdb-client==10.0.19 with terminusdb/terminusdb-server:v10.0.4.

@Cheukting
Copy link
Contributor

@dwinston I have made some changes last Friday maybe try again with the new code in the tutorial?

@dwinston
Copy link
Contributor Author

Hmm, different error now:

terminusdb_client.errors.DatabaseError:
Error: query_error(unknown_type(enum('terminusdb:///schema#Team',
['terminusdb:///schema#Team/marketing','terminusdb:///schema#Team/it'])))

@dwinston
Copy link
Contributor Author

The schema appears to be in the db though:

(terminus) mbp-16:getting_started dwinston$ terminusdb alldocs --schema
[
    {
        "@base": "terminusdb:///data/",
        "@documentation": {
            "@authors": [
                "Destiny Norris",
                "Fabian Dalby"
            ],
            "@description": "Database storing all the contact details of all employees in Awesome Startup",
            "@title": "Phonebook for Awesome Startup"
        },
        "@schema": "terminusdb:///schema#",
        "@type": "@context"
    },
    {
        "@documentation": {
            "@comment": "Home address of Employee",
            "@properties": {
                "postcode": "Postal Code",
                "street": "Street name.",
                "street_num": "Street number.",
                "town": "Town name."
            }
        },
        "@id": "Address",
        "@key": {
            "@type": "Random"
        },
        "@subdocument": [],
        "@type": "Class",
        "postcode": "xsd:string",
        "street": "xsd:string",
        "street_num": "xsd:integer",
        "town": "xsd:string"
    },
    {
        "@documentation": {
            "@comment": "Employee of the Company"
        },
        "@id": "Employee",
        "@type": "Class",
        "address": "Address",
        "contact_number": "xsd:string",
        "manager": {
            "@class": "Employee",
            "@type": "Optional"
        },
        "name": "xsd:string",
        "team": "Team",
        "title": "xsd:string"
    },
    {
        "@id": "Team",
        "@type": "Enum",
        "@value": [
            "marketing",
            "it"
        ]
    },
    {
        "@id": "EmployeesFromCSV",
        "@type": "Class",
        "employee_id": "xsd:string",
        "manager": {
            "@class": "EmployeesFromCSV",
            "@type": "Optional"
        },
        "name": {
            "@class": "xsd:string",
            "@type": "Optional"
        },
        "team": {
            "@class": "xsd:string",
            "@type": "Optional"
        },
        "title": {
            "@class": "xsd:string",
            "@type": "Optional"
        }
    }
]

@Cheukting
Copy link
Contributor

Hmm, different error now:

terminusdb_client.errors.DatabaseError:
Error: query_error(unknown_type(enum('terminusdb:///schema#Team',
['terminusdb:///schema#Team/marketing','terminusdb:///schema#Team/it'])))

At which step when you get this error?

@mwtillotson
Copy link

mwtillotson commented Nov 2, 2021

Hey -- I'm using TerminusX rather than a local database, but received the same error message working through getting_started/lesson_5.

My bet is that it's a TerminusDB Server code bug regarding Enum queries, not a tutorial-specific issue; the query started working for me, presumably because TerminusX was updated.

I'd recommend trying again with the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants