LCA-ActivityBrowser / activity-browser

GUI for brightway2
GNU Lesser General Public License v3.0
134 stars 50 forks source link

Wrong file type error when trying to import an Excel parameter-scenarios file #1139

Open leabrd opened 7 months ago

leabrd commented 7 months ago

Issue

Hi,

I am currently using the AB with a group of students and many encounter the exact same issue when trying to import a parameter-scenarios file in the Scenario LCA calculation setup. The issue arise for Mac and Windows users (see error message below).

At first, we thought that it was due to the fact that the Excel default separator was a comma (and not a dot). It turns out that this is not the explanation - some students encounter the issue while their Excel has the dot separator. Else, the content of the Excel files seem OK and I can run scenario analyses on my computer (using the same Excel files).

Did anyone encounter this problem already?

I cannot reproduce the issue on my computer so I am not able to give much more information for now. Here is an parameter-scenarios Excel file that one of the students used and raised the error (while it worked fine on my computer): parameter-scenarios.xlsx.

image

Thanks in advance for your help!

marc-vdm commented 7 months ago

Hi @leabrd

I see nothing immediately wrong with the file. However, as the file works on your computer and not those of your students, I expect something may be wrong with the parameters on your students' computers. Have you verified the parameters are exactly the same there?

Also; it could help us resolve the issue if you also share the database (assuming there is no confidential information in there)

Also; in general we currently don't recommend using parameters. This is more of an experimental feature and as you see, there are still many issues that need to be resolved.

leabrd commented 7 months ago

Hi @marc-vdm

Thanks for your prompt reply!

Here is an example of a database and parameter-scenarios file which work on my computer (I have the version 2.8.0 of the AB) but does not work for my students who have a more up-to-date version of the AB (e.g., 2.9.0 or 2.9.2).

coffee_db.xlsx scenario_table_coffee_Q6.xlsx

We eliminated all possible errors coming from the default Excel separator (or other settings) and syntax. The only difference we could identify is the version of the AB we are using.

Also - question slightly off topic - why are activity parameters automatically generated (which have the same name as the activities themselves) when creating database parameters? I could not find the answer anywhere..

Again, thanks in advance for your help!

marc-vdm commented 7 months ago

Thanks for sharing, while we work on a solution, I suggest your students use 2.8.0, which can be installed with; conda create -n ab -c conda-forge activity-browser=2.8, which will give a warning of overwriting the environment, which they can just confirm. Their projects and databases will be safe, only AB will change.

Sorry for the inconvenience.