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

Crashing when similar name in yaml file #11

Closed
lusamino opened this issue Aug 3, 2022 · 1 comment
Closed

Crashing when similar name in yaml file #11

lusamino opened this issue Aug 3, 2022 · 1 comment
Assignees
Labels
invalid This doesn't seem right question Further information is requested

Comments

@lusamino
Copy link

lusamino commented Aug 3, 2022

Hi all,

I have had a really weird error when providing the yaml file to the converter, and it truly took me some time to find out the reason.

The error looked as follows:

ValueError: The arguments list has not the same number of opening and closing brackets: "MPs.city")_birt

And I knew it was coming from one of the following lines in the yaml file:

    IF_NOT_EMPTY(NODE("City", "Location"), "BirthPlace_City") city_birth:
        + name = MPs.BirthPlace_City         
    IF_NOT_EMPTY(IF_REL_NOT_EXISTS(RELATION(person, "BORN_IN", city_birth)), "BirthPlace_City"):

but I could not understand the reason. I was suspecting the wrappers, and their order, might be causing the issue, but I could not find a pattern. Then, I finally realize it was all a conflict with

    IF_NOT_EMPTY(NODE("City", "Location"), "city") city:
        + name = EXTR_CITY(MPs.city)

It seems it all boils down to some conflict in naming between city and city_birth, because now the following is working:

    IF_NOT_EMPTY(NODE("City", "Location"), "BirthPlace_City") birth_city:
        + name = MPs.BirthPlace_City         
    IF_NOT_EMPTY(IF_REL_NOT_EXISTS(RELATION(person, "BORN_IN", birth_city)), "BirthPlace_City"):

Therefore, I believe this is a bug that needs to be solved, as it should not be happening, and it took way a lot of time to find out.

Thank you so much!

@jkminder jkminder self-assigned this Aug 3, 2022
@jkminder jkminder added the bug Something isn't working label Aug 3, 2022
@jkminder
Copy link
Owner

Hi, can you please check the version you are running? I was not able to reproduce the issue.

The error reminds me of how I parsed the schema config in older versions (was messy and couldn't handle such "overlapping" identifiers), see this issue. Since version 0.5.0 i'm using a more sophisticated parser based on regular grammars that should be able to handle this.

Thats why i'm suspecting you are running <0.5.0. Please make sure you are running the newest version 0.6.1 (or at least 0.5.0). If you can still reproduce this issue, can you post the complete config schema?

@jkminder jkminder added question Further information is requested and removed bug Something isn't working labels Aug 23, 2022
@jkminder jkminder added the invalid This doesn't seem right label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants