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

solar_capture_monitor 'type' output has an extraneous b' #8

Open
abrunnin-xilinx opened this issue Mar 19, 2024 · 2 comments
Open

solar_capture_monitor 'type' output has an extraneous b' #8

abrunnin-xilinx opened this issue Mar 19, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@abrunnin-xilinx
Copy link
Contributor

abrunnin-xilinx commented Mar 19, 2024

This is an outstanding minor bug from the python3 conversion. When outputting the type of the nodes, it stringifies it to b'name' instead of just plain name
Which means it's got a 'bytes' rather than a string.

image

There's possibly other output where this should be corrected as well, I didn't exhaustively check yet, just noticed this one.

I think this output comes from action_nodes in solar_capture_monitor - but it wold probably be better to correct it in stringify_table (in tabulate.py) - which currently just does str(f) on the field it's going to print, but could be improved to something different based in data type.

@abrunnin-xilinx

This comment was marked as duplicate.

@abrunnin-xilinx abrunnin-xilinx changed the title solar_capture solar_capture_monitor 'type' output has an extraneous b' Mar 19, 2024
@abrunnin-xilinx abrunnin-xilinx added enhancement New feature or request good first issue Good for newcomers labels Mar 19, 2024
@abrunnin-xilinx
Copy link
Contributor Author

abrunnin-xilinx commented Mar 20, 2024

Something like:

def stringify(field):
  try:
     return field.decode('utf-8')
   except:
     return str(field)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant