dfki-ric / phobos

An add-on for Blender allowing to create URDF, SDF and SMURF robot models in a WYSIWYG environment.
BSD 3-Clause "New" or "Revised" License
665 stars 110 forks source link

Bug in phobos/core/multiple.py #363

Open m0rsch1 opened 1 month ago

m0rsch1 commented 1 month ago

https://github.com/dfki-ric/phobos/blob/e359008a2302cb7307e6ce9e0dc7e80feb5b3c4f/phobos/core/multiple.py#L173

The inputfile can be None but is not checked before calling os.path.abspath(inputfile)

AlpenAalAlex commented 3 weeks ago

Can you give me the python traceback to this error?

m0rsch1 commented 3 weeks ago

Well, i dont have a trace right now. But i think its not needed here: If i pass no inputfile to the __init__ function of the Arrangement class, then it is set to None per default. In that case the line i have highlighted will fail, because os.path.abspath(None) is an invalid call.

m0rsch1 commented 3 weeks ago

So, either the inputfile argument is needed, then it should not be set to None per default or (which i think has been intended) the self.inputfile attribute has to be initialized to None as well and overwritten only if the argument inputfile is not None (there is an if statement for that already later in the __init__ constructor).

hwiedPro commented 2 weeks ago

Please check with pre_v2.1.0 ;)

m0rsch1 commented 2 weeks ago

After a quick look into the affected file i dont see this bug fixed there.

hwiedPro commented 1 week ago

But now it is;)