Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculation fail when comparing similar datasets from different databases #1330

Open
1 task done
romainsacchi opened this issue Aug 1, 2024 · 5 comments
Open
1 task done
Labels
bug Issues/PRs related to bugs

Comments

@romainsacchi
Copy link

Updating AB

  • Yes, I have updated AB and still experience this issue

What happened?

Ab 2.10.0

A calculation setup with similar datasets from different databases will fail.

Screenshot 2024-08-01 at 17 28 20

Relevant errors

17:19:41 | INFO | Redoing LCI
17:19:41 | INFO | Redoing LCI
17:19:41 | INFO | Redoing LCI
17:19:41 | INFO | Redoing LCI
17:19:41 | INFO | Redoing LCI
17:19:41 | INFO | Redoing LCI
17:19:42 | INFO | Redoing LCI
17:19:42 | INFO | Redoing LCI
17:19:42 | INFO | Created LCA object
/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/activity_browser/ui/figures.py:234: UserWarning: constrained_layout not applied because axes sizes collapsed to zero.  Try making figure larger or Axes decorations smaller.
  self.canvas.draw()
17:19:43 | ERROR | ValueError: Length mismatch: Expected axis has 1 elements, new values have 8 elements
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tab.py", line 58, in generate_setup
    new_tab = LCAResultsSubTab(data, self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 136, in __init__
    self.setup_tabs()
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 145, in setup_tabs
    self._update_tabs()
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 156, in _update_tabs
    tab.update_tab()
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 534, in update_tab
    super().update_tab()
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 317, in update_tab
    self.update_table()
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 575, in update_table
    self.parent.contributions.inventory_df(inventory_type=inventory),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/activity_browser/bwutils/multilca.py", line 651, in inventory_df
    return self._build_inventory(*data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/activity_browser/bwutils/multilca.py", line 631, in _build_inventory
    df.columns = Contributions.get_labels(columns, max_length=30)
    ^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/pandas/core/generic.py", line 6313, in __setattr__
    return object.__setattr__(self, name, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "properties.pyx", line 69, in pandas._libs.properties.AxisProperty.__set__
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/pandas/core/generic.py", line 814, in _set_axis
    self._mgr.set_axis(axis, labels)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/pandas/core/internals/managers.py", line 238, in set_axis
    self._validate_set_axis(axis, new_labels)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/ab/lib/python3.11/site-packages/pandas/core/internals/base.py", line 98, in _validate_set_axis
    raise ValueError(
ValueError: Length mismatch: Expected axis has 1 elements, new values have 8 elements

Operating system

MacOS

Conda environment

# packages in environment at /opt/homebrew/Caskroom/miniforge/base/envs/ab:
#
# Name                    Version                   Build  Channel
activity-browser          2.10.0             pyhd8ed1ab_0    conda-forge
annotated-types           0.7.0              pyhd8ed1ab_0    conda-forge
anyio                     4.4.0              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
appnope                   0.1.4              pyhd8ed1ab_0    conda-forge
argon2-cffi               23.1.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py311heffc1b2_4    conda-forge
arrow                     1.3.0              pyhd8ed1ab_0    conda-forge
asteval                   1.0.0              pyhd8ed1ab_0    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
astunparse                1.6.3              pyhd8ed1ab_0    conda-forge
async-lru                 2.0.4              pyhd8ed1ab_0    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
babel                     2.14.0             pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.3             pyha770c72_0    conda-forge
bleach                    6.1.0              pyhd8ed1ab_0    conda-forge
blinker                   1.8.2              pyhd8ed1ab_0    conda-forge
brightway2                2.4.6              pyhd8ed1ab_0    conda-forge
brotli                    1.1.0                hb547adb_1    conda-forge
brotli-bin                1.1.0                hb547adb_1    conda-forge
brotli-python             1.1.0           py311ha891d26_1    conda-forge
brotlicffi                1.1.0.0         py311ha891d26_1    conda-forge
bw2analyzer               0.10               pyhd8ed1ab_0    conda-forge
bw2calc                   1.8.2           py311h267d04e_0    conda-forge
bw2data                   3.6.6              pyhd8ed1ab_0    conda-forge
bw2io                     0.8.12             pyhd8ed1ab_0    conda-forge
bw2parameters             1.1.0              pyhd8ed1ab_0    conda-forge
bw_migrations             0.2                pyhd8ed1ab_0    conda-forge
bzip2                     1.0.8                h93a5062_5    conda-forge
ca-certificates           2024.7.4             hf0a4a13_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
certifi                   2024.7.4           pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py311h4a08483_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.2.2              pyhd8ed1ab_0    conda-forge
contourpy                 1.2.1           py311hcc98501_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
debugpy                   1.8.2           py311hb9542d7_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
dill                      0.3.8              pyhd8ed1ab_0    conda-forge
docopt                    0.6.2                      py_1    conda-forge
ecoinvent_interface       2.4.1              pyhd8ed1ab_0    conda-forge
eight                     1.0.1              pyhd8ed1ab_4    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
et_xmlfile                1.1.0              pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.2              pyhd8ed1ab_0    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
fasteners                 0.17.3             pyhd8ed1ab_0    conda-forge
flask                     3.0.3              pyhd8ed1ab_0    conda-forge
fonttools                 4.53.1          py311hd3f4193_0    conda-forge
fqdn                      1.5.1              pyhd8ed1ab_0    conda-forge
freetype                  2.12.1               hadb7bae_2    conda-forge
future                    1.0.0              pyhd8ed1ab_0    conda-forge
giflib                    5.2.2                h93a5062_0    conda-forge
glib                      2.80.3               h59d46d9_1    conda-forge
glib-tools                2.80.3               h8ba3eef_1    conda-forge
gmp                       6.3.0                h7bae524_2    conda-forge
gst-plugins-base          1.24.5               h40577aa_0    conda-forge
gstreamer                 1.24.5               h430e707_0    conda-forge
h11                       0.14.0             pyhd8ed1ab_0    conda-forge
h2                        4.1.0              pyhd8ed1ab_0    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
httpcore                  1.0.5              pyhd8ed1ab_0    conda-forge
httpx                     0.27.0             pyhd8ed1ab_0    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
icu                       73.2                 hc8870d7_0    conda-forge
idna                      3.7                pyhd8ed1ab_0    conda-forge
importlib-metadata        8.0.0              pyha770c72_0    conda-forge
importlib_metadata        8.0.0                hd8ed1ab_0    conda-forge
importlib_resources       6.4.0              pyhd8ed1ab_0    conda-forge
inflate64                 1.0.0           py311h05b510d_1    conda-forge
ipykernel                 6.29.5             pyh57ce528_0    conda-forge
ipython                   8.26.0             pyh707e725_0    conda-forge
isoduration               20.11.0            pyhd8ed1ab_0    conda-forge
itsdangerous              2.2.0              pyhd8ed1ab_0    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
json5                     0.9.25             pyhd8ed1ab_0    conda-forge
jsonpointer               3.0.0           py311h267d04e_0    conda-forge
jsonschema                4.23.0             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.12.1          pyhd8ed1ab_0    conda-forge
jsonschema-with-format-nongpl 4.23.0               hd8ed1ab_0    conda-forge
jupyter-lsp               2.2.5              pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.2              pyhd8ed1ab_0    conda-forge
jupyter_core              5.7.2           py311h267d04e_0    conda-forge
jupyter_events            0.10.0             pyhd8ed1ab_0    conda-forge
jupyter_server            2.14.2             pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.5.3              pyhd8ed1ab_0    conda-forge
jupyterlab                4.2.4              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.3.0              pyhd8ed1ab_1    conda-forge
jupyterlab_server         2.27.3             pyhd8ed1ab_0    conda-forge
kiwisolver                1.4.5           py311he4fd1f5_1    conda-forge
krb5                      1.21.3               h237132a_0    conda-forge
lcms2                     2.16                 ha0e7c42_0    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
libblas                   3.9.0           22_osxarm64_openblas    conda-forge
libbrotlicommon           1.1.0                hb547adb_1    conda-forge
libbrotlidec              1.1.0                hb547adb_1    conda-forge
libbrotlienc              1.1.0                hb547adb_1    conda-forge
libcblas                  3.9.0           22_osxarm64_openblas    conda-forge
libclang-cpp15            15.0.7          default_he012953_5    conda-forge
libclang13                18.1.8          default_hfc66aa2_0    conda-forge
libcxx                    18.1.8               h167917d_0    conda-forge
libdeflate                1.20                 h93a5062_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libexpat                  2.6.2                hebf3989_0    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgfortran               5.0.0           13_2_0_hd922786_3    conda-forge
libgfortran5              13.2.0               hf226fd6_3    conda-forge
libglib                   2.80.3               h59d46d9_1    conda-forge
libhwloc                  2.11.0          default_h7685b71_1000    conda-forge
libiconv                  1.17                 h0d3ecfb_2    conda-forge
libintl                   0.22.5               h8fbad5d_2    conda-forge
libintl-devel             0.22.5               h8fbad5d_2    conda-forge
libjpeg-turbo             3.0.0                hb547adb_1    conda-forge
liblapack                 3.9.0           22_osxarm64_openblas    conda-forge
libllvm15                 15.0.7               h2621b3d_4    conda-forge
libllvm18                 18.1.8               h5090b49_0    conda-forge
libogg                    1.3.5                h99b78c6_0    conda-forge
libopenblas               0.3.27          openmp_h517c56d_1    conda-forge
libopus                   1.3.1                h27ca646_1    conda-forge
libpng                    1.6.43               h091b4b1_0    conda-forge
libpq                     16.3                 h7afe498_0    conda-forge
libsodium                 1.0.18               h27ca646_1    conda-forge
libsqlite                 3.46.0               hfb93653_0    conda-forge
libtiff                   4.6.0                h07db509_3    conda-forge
libvorbis                 1.3.7                h9f76cd9_0    conda-forge
libwebp                   1.4.0                h54798ee_0    conda-forge
libwebp-base              1.4.0                h93a5062_0    conda-forge
libxcb                    1.16                 hf2054a2_0    conda-forge
libxml2                   2.12.7               ha661575_1    conda-forge
libxslt                   1.1.39               h223e5b9_0    conda-forge
libzlib                   1.3.1                hfb2fe0b_1    conda-forge
llvm-openmp               18.1.8               hde57baf_0    conda-forge
lxml                      4.9.3           py311hdef8331_3    conda-forge
lxmlh                     1.3.3              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.5           py311h05b510d_0    conda-forge
matplotlib-base           3.9.1           py311hba6b155_0    conda-forge
matplotlib-inline         0.1.7              pyhd8ed1ab_0    conda-forge
metis                     5.1.0             h13dd4ca_1007    conda-forge
mistune                   3.0.2              pyhd8ed1ab_0    conda-forge
mpfr                      4.2.1                h41d338b_1    conda-forge
mrio_common_metadata      0.2.1              pyhd8ed1ab_0    conda-forge
multiprocess              0.70.16         py311h05b510d_0    conda-forge
multivolumefile           0.2.3              pyhd8ed1ab_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mysql-common              8.3.0                hd1853d3_4    conda-forge
mysql-libs                8.3.0                hf036fc4_4    conda-forge
nbclient                  0.10.0             pyhd8ed1ab_0    conda-forge
nbconvert-core            7.16.4             pyhd8ed1ab_1    conda-forge
nbformat                  5.10.4             pyhd8ed1ab_0    conda-forge
ncurses                   6.5                  hb89a1cb_0    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
networkx                  3.3                pyhd8ed1ab_1    conda-forge
notebook-shim             0.2.4              pyhd8ed1ab_0    conda-forge
nspr                      4.35                 hb7217d7_0    conda-forge
nss                       3.102                hc42bcbf_0    conda-forge
numpy                     1.24.0          py311ha92fb03_0    conda-forge
openjpeg                  2.5.2                h9f1df11_0    conda-forge
openpyxl                  3.1.4           py311h1fc4b72_0    conda-forge
openssl                   3.3.1                hfb2fe0b_2    conda-forge
overrides                 7.7.0              pyhd8ed1ab_0    conda-forge
packaging                 24.1               pyhd8ed1ab_0    conda-forge
pandas                    2.2.2           py311h4b4568b_1    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.4              pyhd8ed1ab_0    conda-forge
pathos                    0.3.2              pyhd8ed1ab_1    conda-forge
patsy                     0.5.6              pyhd8ed1ab_0    conda-forge
pcre2                     10.44                h297a79d_0    conda-forge
peewee                    3.17.6          py311h5c455b8_0    conda-forge
pexpect                   4.9.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.4.0          py311hd7951ec_0    conda-forge
pint                      0.21               pyhd8ed1ab_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.2.2              pyhd8ed1ab_0    conda-forge
pox                       0.3.4              pyhd8ed1ab_0    conda-forge
ppft                      1.7.6.8            pyhd8ed1ab_0    conda-forge
prometheus_client         0.20.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.47             pyha770c72_0    conda-forge
psutil                    6.0.0           py311hd3f4193_0    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.3              pyhd8ed1ab_0    conda-forge
py7zr                     0.21.1             pyhd8ed1ab_0    conda-forge
pybcj                     1.0.2           py311h05b510d_0    conda-forge
pycasreg                  0.1.0              pyhd8ed1ab_0    conda-forge
pycparser                 2.22               pyhd8ed1ab_0    conda-forge
pycryptodomex             3.20.0          py311hd3f4193_0    conda-forge
pydantic                  2.8.2              pyhd8ed1ab_0    conda-forge
pydantic-core             2.20.1          py311h98c6a39_0    conda-forge
pydantic-settings         2.3.4              pyhd8ed1ab_0    conda-forge
pyecospold                3.5.3              pyhd8ed1ab_0    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
pyobjc-core               10.3.1          py311h5f135c3_0    conda-forge
pyobjc-framework-cocoa    10.3.1          py311h5f135c3_0    conda-forge
pyparsing                 3.1.2              pyhd8ed1ab_0    conda-forge
pyperclip                 1.9.0              pyh534df25_0    conda-forge
pyppmd                    1.1.0           py311hbaf5611_0    conda-forge
pyprind                   2.11.2          py311h267d04e_1005    conda-forge
pyside2                   5.15.8          py311h737ae55_4    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.11.9          h932a869_0_cpython    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-dotenv             1.0.1              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.20.0             pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.7              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
pyyaml                    6.0.1           py311heffc1b2_1    conda-forge
pyzmq                     26.0.3          py311h9bed540_0    conda-forge
pyzstd                    0.16.0          py311h4a6b76e_0    conda-forge
qhull                     2020.2               h420ef59_3    conda-forge
qt-main                   5.15.8              hcd44e0d_22    conda-forge
qt-webengine              5.15.8               h850e111_4    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
referencing               0.35.1             pyhd8ed1ab_0    conda-forge
requests                  2.32.3             pyhd8ed1ab_0    conda-forge
rfc3339-validator         0.1.4              pyhd8ed1ab_0    conda-forge
rfc3986-validator         0.1.1              pyh9f0ad1d_0    conda-forge
rpds-py                   0.19.1          py311h98c6a39_0    conda-forge
salib                     1.5.0              pyhd8ed1ab_0    conda-forge
scikit-umfpack            0.3.3           py311hefe60d2_1    conda-forge
scipy                     1.14.0          py311hceeca8c_1    conda-forge
seaborn                   0.12.1               hd8ed1ab_0    conda-forge
seaborn-base              0.12.1             pyhd8ed1ab_0    conda-forge
send2trash                1.8.3              pyh31c8845_0    conda-forge
setuptools                70.2.0             pyhd8ed1ab_0    conda-forge
setuptools-scm            8.1.0              pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.3.1              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
stats_arrays              0.6.6              pyhd8ed1ab_0    conda-forge
statsmodels               0.14.2          py311h5d790af_0    conda-forge
suitesparse               5.10.1               h79486c6_3    conda-forge
tabulate                  0.9.0              pyhd8ed1ab_1    conda-forge
tbb                       2021.12.0            h420ef59_2    conda-forge
terminado                 0.18.1             pyh31c8845_0    conda-forge
texttable                 1.7.0              pyhd8ed1ab_0    conda-forge
tinycss2                  1.3.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h5083fa2_1    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tornado                   6.4.1           py311hd3f4193_0    conda-forge
tqdm                      4.66.4             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.3             pyhd8ed1ab_0    conda-forge
types-python-dateutil     2.9.0.20240316     pyhd8ed1ab_0    conda-forge
typing-extensions         4.12.2               hd8ed1ab_0    conda-forge
typing_extensions         4.12.2             pyha770c72_0    conda-forge
typing_utils              0.1.0              pyhd8ed1ab_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
unicodecsv                0.14.1             pyhd8ed1ab_2    conda-forge
unidecode                 1.3.8              pyhd8ed1ab_0    conda-forge
uri-template              1.3.0              pyhd8ed1ab_0    conda-forge
urllib3                   2.2.2              pyhd8ed1ab_1    conda-forge
voluptuous                0.15.2             pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_0    conda-forge
webcolors                 24.6.0             pyhd8ed1ab_0    conda-forge
webencodings              0.5.1              pyhd8ed1ab_2    conda-forge
websocket-client          1.8.0              pyhd8ed1ab_0    conda-forge
werkzeug                  3.0.3              pyhd8ed1ab_0    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
whoosh                    2.7.4           py311h267d04e_8    conda-forge
wrapt                     1.16.0          py311h05b510d_0    conda-forge
xlrd                      2.0.1              pyhd8ed1ab_3    conda-forge
xlsxwriter                3.1.9              pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hb547adb_0    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zeromq                    4.3.5                hcc0f68c_4    conda-forge
zipfile-deflate64         0.2.0           py311heffc1b2_4    conda-forge
zipp                      3.19.2             pyhd8ed1ab_0    conda-forge
zstandard                 0.22.0          py311h4a6b76e_1    conda-forge
zstd                      1.5.6                hb46c0d2_0    conda-forge
@romainsacchi romainsacchi added the bug Issues/PRs related to bugs label Aug 1, 2024
@mrvisscher
Copy link
Collaborator

@marc-vdm do you think this may have to do with the CS caching? I remember you talking about a similar issue a while back, but my memory is a bit hazy

@marc-vdm
Copy link
Member

marc-vdm commented Aug 7, 2024 via email

@mrvisscher
Copy link
Collaborator

@romainsacchi I can't seem to quickly replicate the issue, would you be willing to export your project and send it to me via e-mail? I'd love to see what's going on under the hood.

Kind regards,

Marin

@romainsacchi
Copy link
Author

Screenshot 2024-08-08 at 15 44 46

Another related issue which I often encounter. Unlike the issue above, the datasets are all differently named, but from the same database. But similarly to the issue above, it seems related to the dataframe building.

Reset metadata.
Loaded project:ei310
Current shape and databases in the MetaDataStore:(0, 0)set()
Adding:ecoinvent-3.10-biosphere
Adding:ei_cutoff_3.10_remind_SSP2-PkBudg1150_2020_SPS1 2024-07-25
/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/activity_browser/ui/figures.py:216: UserWarning: constrained_layout not applied because axes sizes collapsed to zero.  Try making figure larger or axes decorations smaller.
  self.canvas.draw()
Traceback (most recent call last):
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tab.py", line 62, in generate_setup
    new_tab = LCAResultsSubTab(data, self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 136, in __init__
    self.setup_tabs()
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 143, in setup_tabs
    self._update_tabs()
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 154, in _update_tabs
    tab.update_tab()
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 635, in update_tab
    self.lca_overview_widget.update_tab()
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/activity_browser/layouts/tabs/LCA_results_tabs.py", line 747, in update_tab
    self.df = self.parent.contributions.lca_scores_df(normalized=self.relative)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/activity_browser/bwutils/multilca.py", line 587, in lca_scores_df
    return self._build_lca_scores_df(scores)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/activity_browser/bwutils/multilca.py", line 572, in _build_lca_scores_df
    joined = Contributions.join_df_with_metadata(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/activity_browser/bwutils/multilca.py", line 469, in join_df_with_metadata
    joined = metadata.join(df, how='outer')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/pandas/core/frame.py", line 10412, in join
    return merge(
           ^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/pandas/core/reshape/merge.py", line 183, in merge
    return op.get_result(copy=copy)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/pandas/core/reshape/merge.py", line 883, in get_result
    join_index, left_indexer, right_indexer = self._get_join_info()
                                              ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/pandas/core/reshape/merge.py", line 1119, in _get_join_info
    join_index, left_indexer, right_indexer = left_ax.join(
                                              ^^^^^^^^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 267, in join
    join_index, lidx, ridx = meth(self, other, how=how, level=level, sort=sort)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 4622, in join
    return self._join_multi(other, how=how)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/romain/anaconda3/envs/ab/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 4745, in _join_multi
    raise ValueError("cannot join with no overlapping index names")
ValueError: cannot join with no overlapping index names


@romainsacchi
Copy link
Author

@mrvisscher I am sending you a link to the project backup file (use bw2io.restore_project_directory to restore).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues/PRs related to bugs
Projects
None yet
Development

No branches or pull requests

3 participants