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

Registers ending with a whitespace are not shown correctly on the registers.keys() #38

Open
VicidominiLab opened this issue Jul 7, 2022 · 2 comments

Comments

@VicidominiLab
Copy link

VicidominiLab commented Jul 7, 2022

When a FPGA LabView code has been compiled with a register with a name ending with a whitespace like( "MyRegister " ) is not correctly reported in session.registers.keys() .
print(session.registers.keys())
shows a
dict_keys(["MyRegister"])
instead of
dict_keys(["MyRegister "])

and even if it is reported wrongly the
session.registers["MyRegister"].write(0.0)
throw an error
KeyError("MyRegister")

@strainmike
Copy link
Collaborator

What version of python are you using?

I wasn't able to reproduce this, but when searching, I did find a few python bugs in different versions related to the xml parser handling whitespace incorrectly.

@strainmike
Copy link
Collaborator

Someone pointed out to me that the XML spec ignores leading and trailing whitespace in tags. Unfortunately LabVIEW just stores register names (including whitespace) without caring about that. Thats likely the issue.

Unfortunately I don't see any easy solutions or flags we could pass into the parser to always include the whitespace. I'm going to leave this issue open for now.

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

2 participants