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

Parsing error with Invalid character 0xd #2320

Open
vinsha2k opened this issue Nov 7, 2024 · 3 comments
Open

Parsing error with Invalid character 0xd #2320

vinsha2k opened this issue Nov 7, 2024 · 3 comments
Labels
is:bug Bug description. status:invalid Issue is not reproducible or the behavior is intended.

Comments

@vinsha2k
Copy link

vinsha2k commented Nov 7, 2024

Hi,
libyang-2.1.55 - I am facing issue where client is not able to parse get-schema reply from server, getting error as "ly ERROR: Invalid character 0xd. (Line number 76.)". below is the snippet of schema where parse error occurred.

      leaf object-unit-id {
        type uint8;
        description
          "Antenna path id (counting from 0) is used for the object-unit-id for the 
           vendor-specific-measurement-result, for which object-unit is VSWR, TX_OUTPOWER or TX_INPOWER 
         
        For the vendor-specific-measurement-result where object-unit is RSSI, object-unit-id is encode the followin way: 
        bit 7..4:\tAntenna path (counting from 0) 
        bit 3..0:    Carrier Id per path (counting from 0)";
      }
      leaf object-unit-id {
        type uint8;
        description
          "Antenna path id (counting from 0) is used for the object-unit-id for the
           vendor-specific-measurement-result, for which object-unit is VSWR, TX_OUTPOWER or TX_INPOWER   <==== Parse error occurs here

                   For the vendor-specific-measurement-result where object-unit is RSSI, object-unit-id is encode the followin way:
                   bit 7..4:\tAntenna path (counting from 0)
                   bit 3..0:    Carrier Id per path (counting from 0)";
      }

Please help what could cause this.

@michalvasko
Copy link
Member

I am pretty sure that if you update libyang, it will work. If not, attach the problematic YANG module so that I can reproduce the issue.

@michalvasko michalvasko added the is:bug Bug description. label Nov 7, 2024
@vinsha2k
Copy link
Author

Thanks Michal, please find the yang attached.
[email protected]

Also if you could suggest fix specific for this issue on libyang-2.1.55 version, that would help.

@michalvasko
Copy link
Member

I could not reproduce the issue with the latest versions of the projects. That is the solution we provide, you can update your versions and it will work. If you only want a patch, you have to find the relevant commit(s) yourself. It should be changes in libyang connected to newline handling.

@michalvasko michalvasko added the status:invalid Issue is not reproducible or the behavior is intended. label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Bug description. status:invalid Issue is not reproducible or the behavior is intended.
Projects
None yet
Development

No branches or pull requests

2 participants