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

G28 arguments not parsed correctly #14

Open
Commod0re opened this issue Nov 7, 2017 · 1 comment
Open

G28 arguments not parsed correctly #14

Commod0re opened this issue Nov 7, 2017 · 1 comment
Labels

Comments

@Commod0re
Copy link

The profile for my i3 MK2 in Slic3r PE uses G28 W in the out of the box, which raises an exception:

Traceback (most recent call last):
  File "/usr/bin/yagv", line 503, in <module>
    App().main()
  File "/usr/bin/yagv", line 42, in main
    self.load(path)
  File "/usr/bin/yagv", line 70, in load
    self.model = parser.parseFile(path)
  File "/usr/lib/yagv/gcodeParser.py", line 22, in parseFile
    self.parseLine()
  File "/usr/lib/yagv/gcodeParser.py", line 45, in parseLine
    getattr(self, "parse_"+code)(args)
  File "/usr/lib/yagv/gcodeParser.py", line 79, in parse_G28
    self.model.do_G28(self.parseArgs(args))
  File "/usr/lib/yagv/gcodeParser.py", line 55, in parseArgs
    coord = float(bit[1:])
ValueError: could not convert string to float:

parseArgs assumes all arguments are in the form [A-Z][0-9]+ for print head movement, but this is not the case for G28. Changing line 79 to self.model.do_G28(args.split()) at least allows it to continue past that point. Otherwise, parseArgs should not assume all arguments are always in that format.

@petterreinholdtsen
Copy link

Do you have a test file demonstrating this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants