brightway-lca / brightway2-data

Tools for the management of inventory databases and impact assessment methods. Part of the Brightway LCA framework.
https://docs.brightway.dev/
BSD 3-Clause "New" or "Revised" License
8 stars 23 forks source link

Fix a type error in ProjectManager's report() function #160

Closed n8downs closed 10 months ago

n8downs commented 10 months ago

I wanted to introspect the state of my ProjectManager via bw2data.projects.report() as recommended in ProjectManager#__repr__(), but I hit the following error.

    sum(os.path.getsize(root / name) for name in files)
TypeError: unsupported operand type(s) for /: 'str' and 'str'

Looks like a pretty straightforward issue of using pathlib operators where actually we have strings. I've switched to use Path() and updated test_report to a minimum characterization test that runs the function.

I've also added the steps I took to get the environment off the ground to the README, since it wasn't clear (maybe it would be obvious to a more practiced python developer). Feel free to omit that if it's inappropriate or incorrect.

cmutel commented 10 months ago

Nice, thanks!

cmutel commented 10 months ago

@n8downs Could you reach out to me at cmutel@gmail.com? I would love to hear about what someone with your background in doing in the sustainability space, and explore opportunities for collaboration.

haaami01 commented 9 months ago

@cmutel thanks for the great link