Closed patquem closed 1 year ago
Can you provide an example of when this error takes place ? I fail to see why the change will fix anything. If "name" is not a string but a pathlib.Path the typerror will take place anyway.
@mfastudillo I think the problem is in the order of operations, the /
comes first in my testing. But this is not then a Windows problem, it is a problem everywhere.
@patquem Please cast name
to a str
before appending the suffix (or use pathlib
to append a suffix), and add a simple test.
Hello,
my PR just fixes a "basic" bug without recasting to str
or Pathlib
just by revisiting the order of operations ( Pathlib / (str + str) instead of (Pathlib / str) + str ).
I am sorry, but I am not a Brightway user and I am out of time for this. I just spent some time helping a friend of mine to find a solution in term of simapro-ecoinvent datasets compatibility.
If my PR is not enough, feel free to make and push your own bug fix with the dedicated test (if required) :)
TypeError: unsupported operand type(s) for +: 'WindowsPath' and 'str'