Almenon / AREPL-vscode

Program python in real-time
MIT License
262 stars 31 forks source link

Fails on first/fresh install #469

Open alanmun opened 1 day ago

alanmun commented 1 day ago

Describe the bug Fails on install

To Reproduce Steps to reproduce the behavior:

  1. install ext in wsl ubuntu
  2. click on cat when you have a python file open
  3. see this error

Expected behavior it works

This is the error output in the "AREPL - app.py" screen that opens when I clicked the cat.

Error in the AREPL extension! err code: 1

Print Output:

Traceback (most recent call last): File "/home/redacted/.vscode-server/extensions/almenon.arepl-2.0.5/node_modules/arepl-backend/python/arepl_python_evaluator.py", line 94, in <module> from arepl_pickler import specialVars, pickle_user_vars, pickle_user_error File "/home/redacted/.vscode-server/extensions/almenon.arepl-2.0.5/node_modules/arepl-backend/python/arepl_pickler.py", line 49, in <module> import arepl_jsonpickle.ext.pandas as jsonpickle_pandas File "/home/redacted/.vscode-server/extensions/almenon.arepl-2.0.5/node_modules/arepl-backend/python/arepl_jsonpickle/ext/pandas.py", line 6, in <module> import pandas as pd File "redacted/path/lib/python3.9/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 "redacted/path/lib/python3.9/site-packages/pandas/compat/__init__.py", line 18, in <module> from pandas.compat.numpy import ( File "redacted/path/lib/python3.9/site-packages/pandas/compat/numpy/__init__.py", line 4, in <module> from pandas.util.version import Version File "redacted/path/lib/python3.9/site-packages/pandas/util/__init__.py", line 2, in <module> from pandas.util._decorators import ( # noqa:F401 File "redacted/path/lib/python3.9/site-packages/pandas/util/_decorators.py", line 14, in <module> from pandas._libs.properties import cache_readonly File "redacted/path/lib/python3.9/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

Variables:

Almenon commented 1 day ago

Hi there, thanks for the detailed bug report. May I ask what version of numpy you have installed? Does it work on a file that doesn't import numpy?

Unfortunately there are a number of issues with Numpy, like https://github.com/Almenon/AREPL-vscode/issues/386

alanmun commented 20 hours ago

The file I used it on doesn't directly import numpy anywhere. Maybe it imports a module that then uses numpy?

installed: 2.0.2 numpy in my pipenv project

Almenon commented 6 hours ago

Ah, looking at the traceback you posted actually it looks like the exception comes from my code, sorry. Well, specifically in https://jsonpickle.github.io, which I bundle into my codebase.

However, I can't reproduce the issue with pandas==1.5.2. What version of pandas do you have installed?