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

Unable to overwrite previously exported Gcode of the same name with SuperSlicer #3

Closed
Stefkeys opened this issue Dec 15, 2021 · 4 comments

Comments

@Stefkeys
Copy link

Stefkeys commented Dec 15, 2021

Unable to export Gcode file if I have already exported a previously sliced file of the same name. I believe this is due to the .sqv.bak file that is saved along with the Gcode file. If I delete the previous .sqv.bak I am then able to export with the post processing script.

Post-processing script C:\Python310\python.exe C:\Users\acste\Documents\FastGyroidInfill.py on file C:\Users\acste\Desktop\3D printing\GCode\Eevee_Switch_Stand.gcode failed.
Error code: 1

Running script in CMD

Traceback (most recent call last):
File "C:\Users\acste\Documents\FastGyroidInfill.py", line 16, in
os.rename(sourceFile, destFile+".sqv.bak")
WindowsError: [Error 183] Cannot create a file when that file already exists

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\acste\Documents\FastGyroidInfill.py", line 17, in
except FileExistsError:
NameError: name 'FileExistsError' is not defined

@RomRider
Copy link
Owner

Seems like you're using python2 and not python3 as NameError: name 'FileExistsError' is not defined is typical of python2.

@Stefkeys
Copy link
Author

Seems like you're using python2 and not python3 as NameError: name 'FileExistsError' is not defined is typical of python2.

I definitely had Python 3 installed. But I went ahead and removed all Python instances and reinstalled 3.10.1

now I get this error

C:\Users\acste>C:\Users\acste\AppData\Local\Programs\Python\Python310\python.exe C:\Users\acste\Documents\FastGyroidInfill.py on file C:\Users\acste\Desktop\3D_printing\GCode\Eevee_Switch_Stand.gcode
Traceback (most recent call last):
File "C:\Users\acste\Documents\FastGyroidInfill.py", line 10, in
with open(sourceFile, "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'on'

@RomRider
Copy link
Owner

RomRider commented Dec 15, 2021

remove on file from your command line ;)
C:\Users\acste\AppData\Local\Programs\Python\Python310\python.exe C:\Users\acste\Documents\FastGyroidInfill.py C:\Users\acste\Desktop\3D_printing\GCode\Eevee_Switch_Stand.gcode

@Stefkeys
Copy link
Author

Stefkeys commented Dec 15, 2021

remove on file from your command line ;) C:\Users\acste\AppData\Local\Programs\Python\Python310\python.exe C:\Users\acste\Documents\FastGyroidInfill.py C:\Users\acste\Desktop\3D_printing\GCode\Eevee_Switch_Stand.gcode

Gosh darn it! I was scouring those lines to find "on" and my eyes failed me miserably!

It works!
Closing issue

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