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

Issue with FluidNC configuration parsing when connecting #2573

Closed
ColPaulR opened this issue Jul 25, 2024 · 2 comments
Closed

Issue with FluidNC configuration parsing when connecting #2573

ColPaulR opened this issue Jul 25, 2024 · 2 comments

Comments

@ColPaulR
Copy link

Version

2.1.7

Hardware / Firmware

FluidNC

What happened

I just got USG to connect to my FluidNC last night. Looking at the messages.log file, there was a problem reading the FluidNC configuration. Specifically the error message is:

SEVERE [FluidNCController]: Could not initialize the connection

mapping values are not allowed here
in 'string', line 3, column 34:
meta: (01.02.2022) by Skorpiboard: MKS TinyBee V1.0_001

Looking at this, I set the "meta" config item to a null string and UGS would connect just fine. I'm not sure that the "meta" config item is used for anything and there is no default syntax for this item. I'm assuming that the parsing routine should be modified to ignore this value. From the error message, it looks like it is barfing on the 2nd ":" in the line, as my prior meta configuration included a colon in the string. I'll confirm tonight that removing the : allows UGS to correctly parse the line.

How to reproduce

Use the attached YAML configuration or edit an existing configuration to set meta. Line from my YAML is:
``meta: (01.02.2022) by Skorpiboard: MKS TinyBee V1.0_001"
XYZAB_laser_24Jul24.yaml.txt

messages.log

Operating System

Windows 11

Anything else

No response

@breiler
Copy link
Collaborator

breiler commented Jul 26, 2024

Thanks for the report.

UGS uses a YAML library for reading the config file, which will fail due to the nested : that is not allowed in YAML. If you open the file through the file browser in https://installer.fluidnc.com/ you will see this error:
image

To solve this you should be able to simply wrap the text with " like this:

board: MKS TinyBee V1.0_001
name: CNC Router XYYZA 0-10V spindle and laser
meta: "(01.02.2022) by Skorpiboard: MKS TinyBee V1.0_001"
...

However these gets stripped when retrieving the config file through the command $Config/Dump and will still fail in UGS.

I will try to add a better error message in UGS to notify the user about the problem, and see if I can fix the $Config/Dump command in FluidNC.

In the meantime, you can edit the config and replace the meta text with just:

meta: (01.02.2022) by Skorpi

@ColPaulR
Copy link
Author

Thanks for working this for everyone (mainly me). I'll fix my YAML to omit the embedded ":". Another thought would be to strip out the board, name, and meta keys from the string before passing to the YAML parser, assuming those keys aren't actually used by UGS. I greatly appreciate the support.

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