pournaki / twitter-explorer

A framework for observing Twitter through interactive networks.
GNU General Public License v3.0
69 stars 26 forks source link

Uncaught app exception #15

Open lakonis opened 13 hours ago

lakonis commented 13 hours ago

Hello, I just reinstalled twitter-explorer in a venv, but i get this uncaught app exception in the terminal :

$ /home/user/networkanalysis/venv/bin/twitterexplorer visualizer
You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8501
  Network URL: http://10.30.6.81:8501

2024-11-07 21:07:04.206 Uncaught app exception
Traceback (most recent call last):
  File "/home/user/networkanalysis/venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
    result = func()
             ^^^^^^
  File "/home/user/networkanalysis/venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec
    exec(code, module.__dict__)
  File "/home/user/networkanalysis/venv/lib/python3.12/site-packages/twitterexplorer/apps/visualizer.py", line 10, in <module>
    import pandas as pd
  File "/home/user/networkanalysis/venv/lib/python3.12/site-packages/pandas/__init__.py", line 22, in <module>
    from pandas.compat import is_numpy_dev as _is_numpy_dev  # pyright: ignore # noqa:F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/networkanalysis/venv/lib/python3.12/site-packages/pandas/compat/__init__.py", line 18, in <module>
    from pandas.compat.numpy import (
  File "/home/user/networkanalysis/venv/lib/python3.12/site-packages/pandas/compat/numpy/__init__.py", line 4, in <module>
    from pandas.util.version import Version
  File "/home/user/networkanalysis/venv/lib/python3.12/site-packages/pandas/util/__init__.py", line 2, in <module>
    from pandas.util._decorators import (  # noqa:F401
  File "/home/user/networkanalysis/venv/lib/python3.12/site-packages/pandas/util/_decorators.py", line 14, in <module>
    from pandas._libs.properties import cache_readonly
  File "/home/user/networkanalysis/venv/lib/python3.12/site-packages/pandas/_libs/__init__.py", line 13, in <module>
    from pandas._libs.interval import Interval
  File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

And in the browser : ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject with previous Traceback:

Here is the libraries versions contained in the venv :

$ pip list
Package                   Version
------------------------- -----------
altair                    5.4.1
attrs                     24.2.0
blinker                   1.8.2
cachetools                5.5.0
certifi                   2024.8.30
charset-normalizer        3.4.0
click                     8.1.7
click-config-file         0.6.0
click-plugins             1.1.1
configobj                 5.0.9
ebbe                      1.13.2
gitdb                     4.0.11
GitPython                 3.1.43
humanize                  4.11.0
idna                      3.10
igraph                    0.11.8
Jinja2                    3.1.4
jsonschema                4.23.0
jsonschema-specifications 2024.10.1
louvain                   0.8.2
markdown-it-py            3.0.0
MarkupSafe                3.0.2
mdurl                     0.1.2
narwhals                  1.13.2
numpy                     2.1.3
oauthlib                  3.2.2
packaging                 24.1
pandas                    1.5.3
pillow                    11.0.0
pip                       24.2
protobuf                  5.28.3
pyarrow                   18.0.0
pydeck                    0.9.1
Pygments                  2.18.0
python-dateutil           2.9.0.post0
python-igraph             0.11.8
pytz                      2024.2
referencing               0.35.1
requests                  2.32.3
requests-oauthlib         1.3.1
rich                      13.9.4
rpds-py                   0.21.0
six                       1.16.0
smmap                     5.0.1
streamlit                 1.40.0
tenacity                  9.0.0
texttable                 1.7.0
toml                      0.10.2
tornado                   6.4.1
tqdm                      4.67.0
twarc                     2.14.0
tweepy                    4.14.0
twitter                   2.0a2
twitterexplorer           0.7.1
twitwi                    0.19.2
typing_extensions         4.12.2
ural                      1.4.0
urllib3                   2.2.3
watchdog                  5.0.3

Any idea how to fix this ? Thanks in advance.

pournaki commented 12 hours ago

Hello @lakonis, thanks for bringing this to my attention. It was due to an incompatibility with numpy, because the required pandas version was too old. I fixed this dependency issue and uploaded a new version that you can install using:

pip install twitterexplorer --upgrade

Glad the tool is still being used!