Possible bug with `fileinfo` command in SBC mode
adammhaile last edited by dc42
I'm working on a git-like interface to pull/push/sync files between Duet and a local folder - everything worked well on DWC 3.1 but I'm running into a weird issue on 3.2 and 3.3 when trying to query the file info for non-gcode files.
CodeParserException in GetFileInfo: Failed to parse major M-code number (ap) in line 1
Now, I realize that heightmap.csv was moved in later RRF and this file isn't used anymore but I see no reason why it should give a gcode parse error when trying to query the file info.
This also happens with filaments.csv and I tested with files with other names - it seems something specific to the content of filaments/heightmap.csv as it only seemed to fail if I copied those contents into the test files... such as:
RepRapFirmware height map file v2 generated at 2021-07-13 16:12 xmin,xmax,ymin,ymax,radius,xspacing,yspacing,xnum,ynum 30.00,280.00,66.00,300.00,-1.00,125.00,117.00,3,3 -0.005, 0.099, -0.035 -0.051, 0.061, -0.029 -0.057, 0.046, -0.030
But still - see no reason why it would care what the file contents is. I assume it's trying to parse the layer information (since that shows up in the normal output) but could it not ignore this if the file isn't a .g/.gcode file at least?
I can work around it for now by just deleting those files as they aren't needed anymore - but that's a weird thing to tell users of the tool I'm writing and I'll probably also have to code around it.
Sindarius last edited by Sindarius
I’ll need to double check but what I remember offhand is the fileinfo call is designed to parse the gcode contents to get info such as size, layer height, etc. you’re making a call that is trying to fetch gcode metadata essentially so the error makes sense.
Nurgelrot last edited by Nurgelrot
@adammhaile Not really helping you current issue but have you considered other ways to do this rather than going through http? I'm basically backup all my printers "sd card" files with a simple rsync script. Since the SBC is gateway to a UNIX file-system why not use it?
I set up the ssh key from my fileserver to the printers and run a job through cron. My stuff all dumps onto a ZFS volume on my fileserver so I even get version control since snapshots are turned on for that filesystem.
I'm sure there are a ton of utilities you could use to do the same thing with Windows (powershell could do 90% of it alone I think). And MacOS is of course just wrapped up pretty UNIX tools... so no issues there.
I can confirm RRF only parses filenames ending with
.gc. I'll change DSF to do the same.
@chrishamm we should probably include .nc files too.
@dc42 Yes, good idea.