Skip to main content
Tweeted twitter.com/StackBlender/status/674932869245083648
error and code markup
Source Link
p2or
  • 16.1k
  • 10
  • 87
  • 146

does anyone know how to delete a file from inside blender script? i tried to use os.removeos.remove, but it gives me an error: TypeError: unlink: illegal type for path parameter

TypeError: unlink: illegal type for path parameter

the path i put into the os.removeos.remove is the same path i use to load the file, where i save it into a variable. i tried changing the string variable to subtype = "FILE_PATH"subtype = "FILE_PATH" but no effect. the loading goes fine, but if i input the same path to remove it doesn't work

is there any other way to do this?

does anyone know how to delete a file from inside blender script? i tried to use os.remove, but it gives me an error: TypeError: unlink: illegal type for path parameter

the path i put into the os.remove is the same path i use to load the file, where i save it into a variable. i tried changing the string variable to subtype = "FILE_PATH" but no effect. the loading goes fine, but if i input the same path to remove it doesn't work

is there any other way to do this?

does anyone know how to delete a file from inside blender script? i tried to use os.remove, but it gives me an error:

TypeError: unlink: illegal type for path parameter

the path i put into the os.remove is the same path i use to load the file, where i save it into a variable. i tried changing the string variable to subtype = "FILE_PATH" but no effect. the loading goes fine, but if i input the same path to remove it doesn't work

is there any other way to do this?

Source Link
Joe
  • 33
  • 1
  • 4

Delete file in blender python script

does anyone know how to delete a file from inside blender script? i tried to use os.remove, but it gives me an error: TypeError: unlink: illegal type for path parameter

the path i put into the os.remove is the same path i use to load the file, where i save it into a variable. i tried changing the string variable to subtype = "FILE_PATH" but no effect. the loading goes fine, but if i input the same path to remove it doesn't work

is there any other way to do this?