When I instantiate a RotatingFileHandler in the build of my Panda3D application I get an IOError in file.py at line 100. This problem did not occur when I ran the code (without making a build). Any idea what could be the cause?
You can find my code here. The instantiation is at line 28.
I suspect it’s complaining because the directory you’re writing to doesn’t necessarily exist in the runtime version (the runtime by default runs in a different directory than the current directory).
Try using the call “os.mkdir(‘logs’)” to ensure that directory exists before you try to open your logfile.