LCA-ActivityBrowser / activity-browser

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

AB project folder has different hash than brightway 2.5 made in python #1232

Closed PGjedde closed 4 months ago

PGjedde commented 4 months ago

Updating AB

What happened?

Using Brightway2.5 I created a project using:

import bw2data as bd
import bw2io as bi

name_of_project = "my_project"
bi.install_project(
    project_key='ecoinvent-3.8-biosphere',
    project_name = name_of_project,
)
bd.projects.set_current(name_of_project)

I then link my biosphere database to the ecoinvent 3.8 ecospold database folder and everything works well within my "python world". But then when I open up activity browser from the anaconda prompt

(ab) activity-browser

I get to see the name of my project, but it is empty. I can see that in my project directory I also have 2 files:

Ergo, I believe there is a creation of another project folder which, unless I look directly into the directory have the exact same name aside from the hash. But the has created last becomes longer than the previous one? Because of this I cannot work with the python version brightway2.5 but still set up my LCI in activity-browser. In short, I am forced to choose which platform I want to work on, and that makes me a little bit sad because I like both 😿❀️.

Relevant errors

There are no error codes, no error is caught, it even seems like it is kind of on purpose when I look into the filesystem.safe_filename module. Could the error be here?

def safe_filename(
    string: Union[str, bytes], add_hash: bool = True, full: bool = False
) -> str:
    """Convert arbitrary strings to make them safe for filenames. Substitutes strange characters, and uses unicode normalization.

    if `add_hash`, appends hash of `string` to avoid name collisions.

    From http://stackoverflow.com/questions/295135/turn-a-string-into-a-valid-filename-in-python"""
    safe = re.sub(
        r"[-\s]+",
        "-",
        str(re_slugify.sub("", unicodedata.normalize("NFKD", str(string))).strip()),
    )
    if add_hash:
        if isinstance(string, str):
            string = string.encode("utf8")
        if full:
            safe += "." + hashlib.md5(string).hexdigest()
        else:
            safe += "." + hashlib.md5(string).hexdigest()[:8]
    return safe

### Operating system

Windows 10

### Conda environment

```shell
activity browser:

(ab) C:\Users\pgjed>conda list
# packages in environment at C:\Users\pgjed\anaconda3\envs\ab:
#
# Name                    Version                   Build  Channel
activity-browser          2.9.6              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
arrow                     1.3.0              pyhd8ed1ab_0    conda-forge
asteval                   0.9.31             pyhd8ed1ab_0    conda-forge
astunparse                1.6.3              pyhd8ed1ab_0    conda-forge
blinker                   1.7.0              pyhd8ed1ab_0    conda-forge
brightway2                2.4.4              pyhd8ed1ab_0    conda-forge
brotli                    1.1.0                hcfcfb64_1    conda-forge
brotli-bin                1.1.0                hcfcfb64_1    conda-forge
brotli-python             1.1.0           py311h12c1d0e_1    conda-forge
brotlicffi                1.1.0.0         py311h12c1d0e_1    conda-forge
bw2analyzer               0.10               pyhd8ed1ab_0    conda-forge
bw2calc                   1.8.2           py311h1ea47a8_0    conda-forge
bw2data                   3.6.6              pyhd8ed1ab_0    conda-forge
bw2io                     0.8.10             pyhd8ed1ab_0    conda-forge
bw2parameters             1.1.0              pyhd8ed1ab_0    conda-forge
bw_migrations             0.2                pyhd8ed1ab_0    conda-forge
bzip2                     1.0.8                hcfcfb64_5    conda-forge
ca-certificates           2024.2.2             h56e8100_0    conda-forge
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py311ha68e1ae_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           win_pyh7428d3b_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
contourpy                 1.2.0           py311h005e61a_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
dill                      0.3.8              pyhd8ed1ab_0    conda-forge
docopt                    0.6.2                      py_1    conda-forge
eidl                      2.0.1              pyhd8ed1ab_0    conda-forge
eight                     1.0.1              pyhd8ed1ab_4    conda-forge
et_xmlfile                1.1.0              pyhd8ed1ab_0    conda-forge
fasteners                 0.17.3             pyhd8ed1ab_0    conda-forge
flask                     3.0.2              pyhd8ed1ab_0    conda-forge
fonttools                 4.48.1          py311ha68e1ae_0    conda-forge
freetype                  2.12.1               hdaf720e_2    conda-forge
future                    0.18.3             pyhd8ed1ab_0    conda-forge
gettext                   0.21.1               h5728263_0    conda-forge
glib                      2.78.3               h12be248_0    conda-forge
glib-tools                2.78.3               h12be248_0    conda-forge
gst-plugins-base          1.22.9               h001b923_0    conda-forge
gstreamer                 1.22.9               hb4038d2_0    conda-forge
icu                       73.2                 h63175ca_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
importlib-metadata        7.0.1              pyha770c72_0    conda-forge
importlib_metadata        7.0.1                hd8ed1ab_0    conda-forge
inflate64                 1.0.0           py311ha68e1ae_1    conda-forge
intel-openmp              2024.0.0         h57928b3_49841    conda-forge
itsdangerous              2.1.2              pyhd8ed1ab_0    conda-forge
jinja2                    3.1.3              pyhd8ed1ab_0    conda-forge
kiwisolver                1.4.5           py311h005e61a_1    conda-forge
krb5                      1.21.2               heb0366b_0    conda-forge
lcms2                     2.16                 h67d730c_0    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libblas                   3.9.0              21_win64_mkl    conda-forge
libbrotlicommon           1.1.0                hcfcfb64_1    conda-forge
libbrotlidec              1.1.0                hcfcfb64_1    conda-forge
libbrotlienc              1.1.0                hcfcfb64_1    conda-forge
libcblas                  3.9.0              21_win64_mkl    conda-forge
libclang                  15.0.7          default_h77d9078_3    conda-forge
libclang13                15.0.7          default_h77d9078_3    conda-forge
libdeflate                1.19                 hcfcfb64_0    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libglib                   2.78.3               h16e383f_0    conda-forge
libhwloc                  2.9.1                h51c2c0f_0    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
libjpeg-turbo             3.0.0                hcfcfb64_1    conda-forge
liblapack                 3.9.0              21_win64_mkl    conda-forge
libogg                    1.3.4                h8ffe710_1    conda-forge
libpng                    1.6.42               h19919ed_0    conda-forge
libsqlite                 3.45.1               hcfcfb64_0    conda-forge
libtiff                   4.6.0                h6e2ebb7_2    conda-forge
libvorbis                 1.3.7                h0e60522_0    conda-forge
libwebp                   1.3.2                hcfcfb64_1    conda-forge
libwebp-base              1.3.2                hcfcfb64_0    conda-forge
libxcb                    1.15                 hcd874cb_0    conda-forge
libxml2                   2.10.4               hc3477c8_0    conda-forge
libxslt                   1.1.37               h0192164_0    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
lxml                      4.9.2           py311h5942461_0    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markupsafe                2.1.5           py311ha68e1ae_0    conda-forge
matplotlib-base           3.8.2           py311h6e989c2_0    conda-forge
mkl                       2024.0.0         h66d3029_49657    conda-forge
mrio_common_metadata      0.2.1              pyhd8ed1ab_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
multiprocess              0.70.16         py311ha68e1ae_0    conda-forge
multivolumefile           0.2.3              pyhd8ed1ab_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
networkx                  3.2.1              pyhd8ed1ab_0    conda-forge
numpy                     1.23.5          py311h95d790f_0    conda-forge
openjpeg                  2.5.0                h3d672ee_3    conda-forge
openpyxl                  3.1.2           py311ha68e1ae_1    conda-forge
openssl                   3.2.1                hcfcfb64_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pandas                    2.1.4           py311hf63dbb6_0    conda-forge
pathos                    0.3.2              pyhd8ed1ab_1    conda-forge
patsy                     0.5.6              pyhd8ed1ab_0    conda-forge
pcre2                     10.42                h17e33f8_0    conda-forge
peewee                    3.17.1          py311had142b2_0    conda-forge
pillow                    10.2.0          py311h4dd8a23_0    conda-forge
pint                      0.21               pyhd8ed1ab_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pox                       0.3.4              pyhd8ed1ab_0    conda-forge
ppft                      1.7.6.8            pyhd8ed1ab_0    conda-forge
psutil                    5.9.8           py311ha68e1ae_0    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
py7zr                     0.20.8             pyhd8ed1ab_1    conda-forge
pybcj                     1.0.2           py311ha68e1ae_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pycryptodomex             3.19.0          py311ha68e1ae_1    conda-forge
pypardiso                 0.4.3              pyhd8ed1ab_0    conda-forge
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
pyperclip                 1.8.2              pyhd8ed1ab_2    conda-forge
pyppmd                    1.1.0           py311h12c1d0e_0    conda-forge
pyprind                   2.11.2          py311h1ea47a8_1005    conda-forge
pyside2                   5.15.8          py311h2411a93_2    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
python                    3.11.7          h2628c8c_1_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python_abi                3.11                    4_cp311    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pyxlsb                    1.0.10             pyhd8ed1ab_0    conda-forge
pyzstd                    0.15.9          py311he5d195f_1    conda-forge
qt-main                   5.15.8              h9e85ed6_18    conda-forge
qt-webengine              5.15.8               h4bf5c4e_4    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
salib                     1.4.7              pyhd8ed1ab_0    conda-forge
scipy                     1.12.0          py311h0b4df5a_2    conda-forge
seaborn                   0.13.2               hd8ed1ab_0    conda-forge
seaborn-base              0.13.2             pyhd8ed1ab_0    conda-forge
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
setuptools-scm            8.0.4              pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
stats_arrays              0.6.6              pyhd8ed1ab_0    conda-forge
statsmodels               0.14.1          py311h59ca53f_0    conda-forge
tabulate                  0.9.0              pyhd8ed1ab_1    conda-forge
tbb                       2021.9.0             h91493d7_0    conda-forge
texttable                 1.7.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tqdm                      4.66.2             pyhd8ed1ab_0    conda-forge
types-python-dateutil     2.8.19.20240106    pyhd8ed1ab_0    conda-forge
typing-extensions         4.9.0                hd8ed1ab_0    conda-forge
typing_extensions         4.9.0              pyha770c72_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
unicodecsv                0.14.1             pyhd8ed1ab_2    conda-forge
unidecode                 1.3.8              pyhd8ed1ab_0    conda-forge
urllib3                   2.2.0              pyhd8ed1ab_0    conda-forge
vc                        14.3                hcf57466_18    conda-forge
vc14_runtime              14.38.33130         h82b7239_18    conda-forge
voluptuous                0.14.2             pyhd8ed1ab_0    conda-forge
vs2015_runtime            14.38.33130         hcb4865c_18    conda-forge
werkzeug                  3.0.1              pyhd8ed1ab_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
whoosh                    2.7.4           py311h1ea47a8_8    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
wrapt                     1.16.0          py311ha68e1ae_0    conda-forge
xlrd                      2.0.1              pyhd8ed1ab_3    conda-forge
xlsxwriter                3.1.9              pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
zipfile-deflate64         0.2.0           py311ha68e1ae_4    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zstd                      1.5.5                h12be248_0    conda-forge

---

Brightway 2.5:

(bw25) C:\Users\pgjed>conda list
# packages in environment at C:\Users\pgjed\anaconda3\envs\bw25:
#
# Name                    Version                   Build  Channel
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
asteval                   0.9.31             pyhd8ed1ab_0    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
astunparse                1.6.3              pyhd8ed1ab_0    conda-forge
brightway25               1.0.6                     py_10    cmutel
brotli                    1.1.0                hcfcfb64_1    conda-forge
brotli-bin                1.1.0                hcfcfb64_1    conda-forge
brotli-python             1.1.0           py312h53d5487_1    conda-forge
bw2analyzer               0.11.7             pyhd8ed1ab_0    conda-forge
bw2calc                   2.0.dev16                  py_0    cmutel
bw2data                   4.0.dev33                  py_0    cmutel
bw2io                     0.9.dev26                  py_0    cmutel
bw2parameters             1.1.0              pyhd8ed1ab_0    conda-forge
bw_migrations             0.2                pyhd8ed1ab_0    conda-forge
bw_processing             0.9                pyhd8ed1ab_0    conda-forge
bzip2                     1.0.8                hcfcfb64_5    conda-forge
ca-certificates           2024.2.2             h56e8100_0    conda-forge
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.2.1              pyhd8ed1ab_0    conda-forge
contourpy                 1.2.0           py312h0d7def4_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
debugpy                   1.8.1           py312h53d5487_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
et_xmlfile                1.1.0              pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
fonttools                 4.48.1          py312he70551f_0    conda-forge
freetype                  2.12.1               hdaf720e_2    conda-forge
fs                        2.4.16             pyhd8ed1ab_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
importlib-metadata        7.0.1              pyha770c72_0    conda-forge
importlib_metadata        7.0.1                hd8ed1ab_0    conda-forge
intel-openmp              2024.0.0         h57928b3_49841    conda-forge
ipykernel                 6.29.2             pyha63f2e9_0    conda-forge
ipython                   8.21.0             pyh7428d3b_0    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.0              pyhd8ed1ab_0    conda-forge
jupyter_core              5.7.1           py312h2e8e312_0    conda-forge
kiwisolver                1.4.5           py312h0d7def4_1    conda-forge
lcms2                     2.16                 h67d730c_0    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libblas                   3.9.0              21_win64_mkl    conda-forge
libbrotlicommon           1.1.0                hcfcfb64_1    conda-forge
libbrotlidec              1.1.0                hcfcfb64_1    conda-forge
libbrotlienc              1.1.0                hcfcfb64_1    conda-forge
libcblas                  3.9.0              21_win64_mkl    conda-forge
libdeflate                1.19                 hcfcfb64_0    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libhwloc                  2.9.3           default_haede6df_1009    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
libjpeg-turbo             3.0.0                hcfcfb64_1    conda-forge
liblapack                 3.9.0              21_win64_mkl    conda-forge
libpng                    1.6.42               h19919ed_0    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libsqlite                 3.45.1               hcfcfb64_0    conda-forge
libtiff                   4.6.0                h6e2ebb7_2    conda-forge
libwebp-base              1.3.2                hcfcfb64_0    conda-forge
libxcb                    1.15                 hcd874cb_0    conda-forge
libxml2                   2.12.5               hc3477c8_0    conda-forge
libxslt                   1.1.39               h3df6e99_0    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
lxml                      5.1.0           py312hd086842_0    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
matplotlib-base           3.8.2           py312h26ecaf7_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
matrix_utils              0.4.1              pyhd8ed1ab_0    conda-forge
mkl                       2024.0.0         h66d3029_49657    conda-forge
mrio_common_metadata      0.2.1              pyhd8ed1ab_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
numpy                     1.26.4          py312h8753938_0    conda-forge
openjpeg                  2.5.0                h3d672ee_3    conda-forge
openpyxl                  3.1.2           py312he70551f_1    conda-forge
openssl                   3.2.1                hcfcfb64_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pandas                    2.2.0           py312h2ab9e98_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
peewee                    3.17.1          py312h0149c05_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.2.0          py312he768995_0    conda-forge
pint                      0.23               pyhd8ed1ab_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
platformdirs              4.2.0              pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.42             pyha770c72_0    conda-forge
psutil                    5.9.8           py312he70551f_0    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pygments                  2.17.2             pyhd8ed1ab_0    conda-forge
pypardiso                 0.4.3              pyhd8ed1ab_0    conda-forge
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
python                    3.12.1          h2628c8c_1_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pywin32                   306             py312h53d5487_2    conda-forge
pyxlsb                    1.0.10             pyhd8ed1ab_0    conda-forge
pyzmq                     25.1.2          py312h1ac6f91_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
scipy                     1.12.0          py312h8753938_2    conda-forge
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
setuptools-scm            8.0.4              pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
stats_arrays              0.6.6              pyhd8ed1ab_0    conda-forge
tabulate                  0.9.0              pyhd8ed1ab_1    conda-forge
tbb                       2021.11.0            h91493d7_1    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tornado                   6.3.3           py312he70551f_1    conda-forge
tqdm                      4.66.2             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.1             pyhd8ed1ab_0    conda-forge
typing-extensions         4.9.0                hd8ed1ab_0    conda-forge
typing_extensions         4.9.0              pyha770c72_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
unidecode                 1.3.8              pyhd8ed1ab_0    conda-forge
urllib3                   2.2.0              pyhd8ed1ab_0    conda-forge
vc                        14.3                hcf57466_18    conda-forge
vc14_runtime              14.38.33130         h82b7239_18    conda-forge
voluptuous                0.14.2             pyhd8ed1ab_0    conda-forge
vs2015_runtime            14.38.33130         hcb4865c_18    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
whoosh                    2.7.4           py312h2e8e312_8    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
wrapt                     1.16.0          py312he70551f_0    conda-forge
xlrd                      2.0.1              pyhd8ed1ab_3    conda-forge
xlsxwriter                3.1.9              pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
zeromq                    4.3.5                h63175ca_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zstd                      1.5.5                h12be248_0    conda-forge
PGjedde commented 4 months ago

Btw, I also write my dabase to disk. I am able to go all the way and perform lca calculations from within my python world. The two platforms simply don't speak together.

marc-vdm commented 4 months ago

Hey thanks for making this issue. We currently don't support BW2.5 and BW2.5 projects are not backwards compatible with BW2 or AB.

We plan to start supporting BW2.5, but it's a big and complex task for us, so it will take a while to complete this. You can share your thoughts/wishes here in this thread, we are very happy to hear from the community on this :) :

PGjedde commented 4 months ago

Hi Marc, thanks for such a quick response πŸ˜„ Too bad brightway2 is so impossible to install these days then. If you have any tips please let me know. Following the docs for installation of bw2 (legacy) on the official website or even on anacondas own website no longer works. But that is an issue for other people and not activity browser I guess.

marc-vdm commented 4 months ago

Too bad brightway2 is so impossible to install these days then

Hmm interesting, what seems to be the problem?

You can create a Brightway 2 environment with conda like the following: conda create -n ENV_NAME -c conda-forge brightway2=2.4

You just need to specify a version lower than 2.5 and it should work. What you can also do is just use the AB environment, that also install Brightway 2.

If the docs/guides for BW2 are out of date, I'm afraid I can't really help, that's indeed an issue that should be fixed by the Brightway developers.

michaelweinold commented 4 months ago

Too bad brightway2 is so impossible to install these days then.(...) Following the docs for installation of bw2 (legacy) on the official website or even on anacondas own website no longer works.

😯 We (over at the Brightway documentation) are sorry to hear that! I suggest you open an issue in our repository.

I just resolved an issue kindly reported by @marc-vdm (https://github.com/brightway-lca/brightway2-data/issues/117#issuecomment-1945807320) - I am now looking into your issue.

PGjedde commented 4 months ago

Hi Michael, Thanks for looking into it. The official documentation says to use conda and that did not work. However, I have now succeeded in installing Brightway in a conda environment but using pip:

conda create -n bw20 -c conda-forge pip conda activate bw20 pip install brightway2==2.4.5

With AB in another conda environment they still work perfectly together. I just prefer to have AB and bw2 in different environments for the sake of also pulling in other packages for custom plots and so. And it looks like 2.4.5 is the newest/last legacy version of bw2 right? Thank you for the work you put into it 😊

Philip

From: Michael Weinold @.> Sent: Thursday, February 15, 2024 11:58 AM To: LCA-ActivityBrowser/activity-browser @.> Cc: Philip Gjedde @.>; State change @.> Subject: Re: [LCA-ActivityBrowser/activity-browser] AB project folder has different hash than brightway 2.5 made in python (Issue #1232)

Too bad brightway2 is so impossible to install these days then.(...) Following the docs for installation of bw2 (legacy) on the official website or even on anacondas own website no longer works.

😯 We (over at the Brightway documentation) are sorry to hear that! I suggest you open an issue in our repositoryhttps://github.com/brightway-lca/brightway-documentation/issues.

I just resolved an issue kindly reported by @marc-vdmhttps://github.com/marc-vdm (brightway-lca/brightway2-data#117 (comment)https://github.com/brightway-lca/brightway2-data/issues/117#issuecomment-1945807320) - I am now looking into your issue.

β€” Reply to this email directly, view it on GitHubhttps://github.com/LCA-ActivityBrowser/activity-browser/issues/1232#issuecomment-1945850737, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXYKYKCXM2RDTGCD7YZVSVTYTXS3HAVCNFSM6AAAAABDGLIFDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBVHA2TANZTG4. You are receiving this because you modified the open/close state.Message ID: @.***>

michaelweinold commented 4 months ago

and that did not work.

...and what part of it did not work? πŸ™ˆ

And it looks like 2.4.5 is the newest/last legacy version of bw2 right?

You are correct - as you can see from the release history on PyPi, we're currently on 2.4.5.

PGjedde commented 4 months ago

Nono, pip did work 😊 but conda did not. This does not work: https://docs.brightway.dev/en/legacy/content/installation/installation.html And I am afraid that is where most people end up first when wanting to install Brightway 2.

Best, Philip

From: Michael Weinold @.> Sent: Thursday, February 15, 2024 12:12 PM To: LCA-ActivityBrowser/activity-browser @.> Cc: Philip Gjedde @.>; State change @.> Subject: Re: [LCA-ActivityBrowser/activity-browser] AB project folder has different hash than brightway 2.5 made in python (Issue #1232)

and that did not work.

...and what part of it did not work? πŸ™ˆ

And it looks like 2.4.5 is the newest/last legacy version of bw2 right?

You are correct - as you can see from the release history on PyPihttps://pypi.org/project/brightway2/#history, we're currently on 2.4.5.

β€” Reply to this email directly, view it on GitHubhttps://github.com/LCA-ActivityBrowser/activity-browser/issues/1232#issuecomment-1945874889, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXYKYKC57EIUYNRNIYKQGNDYTXUOVAVCNFSM6AAAAABDGLIFDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBVHA3TIOBYHE. You are receiving this because you modified the open/close state.Message ID: @.**@.>>

michaelweinold commented 4 months ago

...you will need to help me out just a little more:

  1. What platform are you trying to install on (macOS, Windows, Linux, ..?)
  2. What is the error message you are getting?
PGjedde commented 4 months ago

Okay, the first message on the issue here gives a list of the packages in the environment. And the OS is windows 10. And initially there was no error message.

There was no error message because AB, brightway2, and brightway 2.5 all worked fine separately. I was at the point of making this issue not aware that brightway 2.5 and AB are not compatible with each other, so I just saw in the directory file that I suddenly had two different project folders that only changed by hash. Knowing that the softwares don't speak together this makes sense though.

I have already solved the issue I had regarding the installment of the different versions and seen why they are not compatible, and if you would like I will go to the documentation of brigthway 2.5 and mention there in the beginning of the documentation of 2.5 that this version is not compatible with brightway 2 or AB. I know this is mentioned other places, but I also know a bunch of people that are not even sure which version they are working in when using brightway. In the conda environments you see multiple packages, and only the brightway 2.5 is called "2.5", all others are still "2". In short, we are a few in the community who are a bit confused about what the different versions can do, but since I found out I'll be happy to add it to the documentation :) And I I'll show exactly what I mean here. If you google brightway, most people end up here: https://docs.brightway.dev/en/latest/index.html And then the installment guide here: https://docs.brightway.dev/en/latest/content/installation/index.html And being careful about installments they may even read here: https://docs.brightway.dev/en/latest/content/faq/brightway.html

Those websites are all about brighway 2.5, but for anyone that does not already know that there is no backwards compatibility it is not easy to figure out, except for one place that says that brightway 2.0 runs with AB. I'll just add somewhere, that brigthway 2.5 does not, and then all is good I hope?

michaelweinold commented 4 months ago

Ah, I see - I added an FAQ entry to our documentation to make the compatibility issues with the Activity Browser and Brightway25 more explicit.

I would like to point out that even before my edit, our installation instructions had explicitly listed "basic knowledge of the difference between Brightway2 and Brightway25" as a prerequisite to proceeding with the installation:

Screenshot 2024-02-15 at 16 22 33

If users do not read the documentation, I am afraid that they will get stuck irregardless of how well we well we attempt to describe the installation process etc.

Thank you for pointing out the issue - I hope I was able to help.

PGjedde commented 4 months ago

I am glad the issue is fixed, thank you :) And I see you also added the warning in the link regarding installation that you just send a screenshot of. image That is super nice and I am sure installation of the right versions becomes easier now, you've been a really good help and with super fast response time Thank you πŸ˜ƒ