Closed lakonis closed 1 week 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!
Thank you for your answer!
I proceed the update, but I still have the issue :
pip install twitterexplorer --upgrade INT ✘ ditakepler-network
Requirement already satisfied: twitterexplorer in ./venv/lib/python3.12/site-packages (0.7.1)
Collecting twitterexplorer
Downloading twitterexplorer-0.7.2-py3-none-any.whl.metadata (6.3 kB)
Requirement already satisfied: streamlit<2,>=1.7.0 in ./venv/lib/python3.12/site-packages (from twitterexplorer) (1.40.0)
Requirement already satisfied: tweepy<5,>=4.6.0 in ./venv/lib/python3.12/site-packages (from twitterexplorer) (4.14.0)
Requirement already satisfied: pandas>=1.3.4 in ./venv/lib/python3.12/site-packages (from twitterexplorer) (1.5.3)
Requirement already satisfied: python-igraph<1,>=0.9.8 in ./venv/lib/python3.12/site-packages (from twitterexplorer) (0.11.8)
Requirement already satisfied: twitwi>=0.15.0 in ./venv/lib/python3.12/site-packages (from twitterexplorer) (0.19.2)
Requirement already satisfied: twarc<3,>=2.9.4 in ./venv/lib/python3.12/site-packages (from twitterexplorer) (2.14.0)
Requirement already satisfied: ebbe>=1.13.2 in ./venv/lib/python3.12/site-packages (from twitterexplorer) (1.13.2)
Requirement already satisfied: python-dateutil>=2.8.1 in ./venv/lib/python3.12/site-packages (from pandas>=1.3.4->twitterexplorer) (2.9.0.post0)
Requirement already satisfied: pytz>=2020.1 in ./venv/lib/python3.12/site-packages (from pandas>=1.3.4->twitterexplorer) (2024.2)
Requirement already satisfied: numpy>=1.21.0 in ./venv/lib/python3.12/site-packages (from pandas>=1.3.4->twitterexplorer) (2.1.3)
Requirement already satisfied: igraph==0.11.8 in ./venv/lib/python3.12/site-packages (from python-igraph<1,>=0.9.8->twitterexplorer) (0.11.8)
Requirement already satisfied: texttable>=1.6.2 in ./venv/lib/python3.12/site-packages (from igraph==0.11.8->python-igraph<1,>=0.9.8->twitterexplorer) (1.7.0)
Requirement already satisfied: altair<6,>=4.0 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (5.4.1)
Requirement already satisfied: blinker<2,>=1.0.0 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (1.8.2)
Requirement already satisfied: cachetools<6,>=4.0 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (5.5.0)
Requirement already satisfied: click<9,>=7.0 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (8.1.7)
Requirement already satisfied: packaging<25,>=20 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (24.1)
Requirement already satisfied: pillow<12,>=7.1.0 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (11.0.0)
Requirement already satisfied: protobuf<6,>=3.20 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (5.28.3)
Requirement already satisfied: pyarrow>=7.0 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (18.0.0)
Requirement already satisfied: requests<3,>=2.27 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (2.32.3)
Requirement already satisfied: rich<14,>=10.14.0 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (13.9.4)
Requirement already satisfied: tenacity<10,>=8.1.0 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (9.0.0)
Requirement already satisfied: toml<2,>=0.10.1 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (0.10.2)
Requirement already satisfied: typing-extensions<5,>=4.3.0 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (4.12.2)
Requirement already satisfied: gitpython!=3.1.19,<4,>=3.0.7 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (3.1.43)
Requirement already satisfied: pydeck<1,>=0.8.0b4 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (0.9.1)
Requirement already satisfied: tornado<7,>=6.0.3 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (6.4.1)
Requirement already satisfied: watchdog<6,>=2.1.5 in ./venv/lib/python3.12/site-packages (from streamlit<2,>=1.7.0->twitterexplorer) (5.0.3)
Requirement already satisfied: click-config-file>=0.6 in ./venv/lib/python3.12/site-packages (from twarc<3,>=2.9.4->twitterexplorer) (0.6.0)
Requirement already satisfied: click-plugins>=1 in ./venv/lib/python3.12/site-packages (from twarc<3,>=2.9.4->twitterexplorer) (1.1.1)
Requirement already satisfied: humanize>=3.9 in ./venv/lib/python3.12/site-packages (from twarc<3,>=2.9.4->twitterexplorer) (4.11.0)
Requirement already satisfied: requests-oauthlib>=1.3 in ./venv/lib/python3.12/site-packages (from twarc<3,>=2.9.4->twitterexplorer) (1.3.1)
Requirement already satisfied: tqdm>=4.62 in ./venv/lib/python3.12/site-packages (from twarc<3,>=2.9.4->twitterexplorer) (4.67.0)
Requirement already satisfied: oauthlib<4,>=3.2.0 in ./venv/lib/python3.12/site-packages (from tweepy<5,>=4.6.0->twitterexplorer) (3.2.2)
Requirement already satisfied: twitter==2.0a2 in ./venv/lib/python3.12/site-packages (from twitwi>=0.15.0->twitterexplorer) (2.0a2)
Requirement already satisfied: ural>=0.31.1 in ./venv/lib/python3.12/site-packages (from twitwi>=0.15.0->twitterexplorer) (1.4.0)
Requirement already satisfied: certifi in ./venv/lib/python3.12/site-packages (from twitter==2.0a2->twitwi>=0.15.0->twitterexplorer) (2024.8.30)
Requirement already satisfied: jinja2 in ./venv/lib/python3.12/site-packages (from altair<6,>=4.0->streamlit<2,>=1.7.0->twitterexplorer) (3.1.4)
Requirement already satisfied: jsonschema>=3.0 in ./venv/lib/python3.12/site-packages (from altair<6,>=4.0->streamlit<2,>=1.7.0->twitterexplorer) (4.23.0)
Requirement already satisfied: narwhals>=1.5.2 in ./venv/lib/python3.12/site-packages (from altair<6,>=4.0->streamlit<2,>=1.7.0->twitterexplorer) (1.13.2)
Requirement already satisfied: configobj>=5.0.6 in ./venv/lib/python3.12/site-packages (from click-config-file>=0.6->twarc<3,>=2.9.4->twitterexplorer) (5.0.9)
Requirement already satisfied: gitdb<5,>=4.0.1 in ./venv/lib/python3.12/site-packages (from gitpython!=3.1.19,<4,>=3.0.7->streamlit<2,>=1.7.0->twitterexplorer) (4.0.11)
Requirement already satisfied: six>=1.5 in ./venv/lib/python3.12/site-packages (from python-dateutil>=2.8.1->pandas>=1.3.4->twitterexplorer) (1.16.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./venv/lib/python3.12/site-packages (from requests<3,>=2.27->streamlit<2,>=1.7.0->twitterexplorer) (3.4.0)
Requirement already satisfied: idna<4,>=2.5 in ./venv/lib/python3.12/site-packages (from requests<3,>=2.27->streamlit<2,>=1.7.0->twitterexplorer) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./venv/lib/python3.12/site-packages (from requests<3,>=2.27->streamlit<2,>=1.7.0->twitterexplorer) (2.2.3)
Requirement already satisfied: markdown-it-py>=2.2.0 in ./venv/lib/python3.12/site-packages (from rich<14,>=10.14.0->streamlit<2,>=1.7.0->twitterexplorer) (3.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in ./venv/lib/python3.12/site-packages (from rich<14,>=10.14.0->streamlit<2,>=1.7.0->twitterexplorer) (2.18.0)
Requirement already satisfied: smmap<6,>=3.0.1 in ./venv/lib/python3.12/site-packages (from gitdb<5,>=4.0.1->gitpython!=3.1.19,<4,>=3.0.7->streamlit<2,>=1.7.0->twitterexplorer) (5.0.1)
Requirement already satisfied: MarkupSafe>=2.0 in ./venv/lib/python3.12/site-packages (from jinja2->altair<6,>=4.0->streamlit<2,>=1.7.0->twitterexplorer) (3.0.2)
Requirement already satisfied: attrs>=22.2.0 in ./venv/lib/python3.12/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit<2,>=1.7.0->twitterexplorer) (24.2.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in ./venv/lib/python3.12/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit<2,>=1.7.0->twitterexplorer) (2024.10.1)
Requirement already satisfied: referencing>=0.28.4 in ./venv/lib/python3.12/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit<2,>=1.7.0->twitterexplorer) (0.35.1)
Requirement already satisfied: rpds-py>=0.7.1 in ./venv/lib/python3.12/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit<2,>=1.7.0->twitterexplorer) (0.21.0)
Requirement already satisfied: mdurl~=0.1 in ./venv/lib/python3.12/site-packages (from markdown-it-py>=2.2.0->rich<14,>=10.14.0->streamlit<2,>=1.7.0->twitterexplorer) (0.1.2)
Downloading twitterexplorer-0.7.2-py3-none-any.whl (63 kB)
Installing collected packages: twitterexplorer
Attempting uninstall: twitterexplorer
Found existing installation: twitterexplorer 0.7.1
Uninstalling twitterexplorer-0.7.1:
Successfully uninstalled twitterexplorer-0.7.1
Successfully installed twitterexplorer-0.7.2
Then :
$ /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://192.168.1.113:8501
2024-11-08 14:13:11.303 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
Notice that I cannot launch twitterexplorer directly, but I have to specify the full path to my venv..
If I don't specify, this occurs :
$ twitterexplorer visualizer
Traceback (most recent call last):
File "/home/user/.local/bin/twitterexplorer", line 5, in <module>
from twitterexplorer.launcher import main
ModuleNotFoundError: No module named 'twitterexplorer'
I fixed it by upgrading manually pandas in the venv.
I did notice yesterday that twitterexplorer was still dependent to pandas 1.15, therefore I manually installed an old version. But upgrading twitterexplorer from 0.7.1 to 0.7.2 did not upgrade pandas.
Thanks ! I let you close the issue :)
Hello, I just reinstalled twitter-explorer in a venv, but i get this uncaught app exception in the terminal :
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 :
Any idea how to fix this ? Thanks in advance.