Closed der-ule closed 2 years ago
Thanks for reporting.
I'll look into it
I cannot recreate this. I put additional logging in the plugin and I'd like to ask you if you can try again and send me back the .log file. You might want to trim the .log file as it reveals a lot of information (all environment variables)
@der-ule ping.
Can you provide any additional feedback on this? As I can not recreate it I'll close the issue otherwise.
Hi Mitja, thank you for the reminder, I am attaching the new generated log files.
Currently I am working in three projects and those where the projects where I got the error to begin with, so I open KiCAD and ran the script in the first project, all worked as expected, from KiCAD I opened the next project, ran the script and got the error as before, I opened the next project, ran the script and the error appeared again, I took a peek to the log file and somehow the path of the models was still referencing the first project that I opened.
I closed KiCAD, opened again with the last Project loaded and ran the script again, the errors where gone and the log output looks fines unfortunately the previous log file got lost.
archive_project1.log OK archive_project2.log NOK archive_project3.log OK
I hope this helps
I can confirm that there is a bug in KiCad. If you open one project, open pcbnew, start python console and run
import os
os.getenv("KIPRJMOD")
you'll get the path to the currently opened project. But if you then close this project and open another one, open pcbnew, start the python console and run the same code again, you'll get the path to the previous project. I reported this.
Thanks for help and debugging. I'll close this issue when there is a fix in KiCad
Thank you for the extremely useful plugins and the time that you put on this, I am very glad that I could somehow help :)
This is now fixed in testing build of 5.1.x branch. Once 5.1.7 is released I'll close the issue.
If somebody wants to stay at 5.1.6 or lower he/she can implement a workaround by adding a line
os.environ["KIPRJMOD"] = os.path.abspath(os.path.dirname(board.GetFileName()))
in beginning of archive_3D_models
function
Hello Mitja, first of all, I really appreciate all the effort that you have put to this and your other plugins and I would like to thank you for them, they are such a time saver.
I started using the Archive Project plugin and it works great! However, I noticed that when I had run it already once, if I wanted to run it again on a project that has been achieved already, it kinds of get "confused" when trying to overwrite the existing 3D models.
Here is an screenshot with the error message and the folder containing the 3D models previously archived, as you can see, the already exist in the path that the software tries to save them and instead of reporting that, the software reports that they do not exists.
This is of course a nitpick and low priority, just something that I noticed.
I hope this helps, take care!
archive_project.log