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

Runtime exception when running leetscrape without any parameter #11

Open
gonciarz opened this issue Sep 4, 2024 · 1 comment
Open

Comments

@gonciarz
Copy link

gonciarz commented Sep 4, 2024

Tested on ArchLinux (virtual env) and inside docker container:

python -m venv .
source bin/activate
pip install leetscrape
leetscrape
cat Dockerfile 
FROM python:3
RUN pip install leetscrape # --no-cache-dir -r requirements.txt
docker build . -t test --no-cache
docker run test leetscrape

Traceback (most recent call last):
  File "/usr/local/bin/leetscrape", line 5, in <module>
    from leetscrape.scripts import leetscrape
  File "/usr/local/lib/python3.12/site-packages/leetscrape/__init__.py", line 2, in <module>
    from .generate_code_stub import GenerateCodeStub
  File "/usr/local/lib/python3.12/site-packages/leetscrape/generate_code_stub.py", line 9, in <module>
    from .question import GetQuestion
  File "/usr/local/lib/python3.12/site-packages/leetscrape/question.py", line 5, in <module>
    import pandas as pd
  File "/usr/local/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 "/usr/local/lib/python3.12/site-packages/pandas/compat/__init__.py", line 18, in <module>
    from pandas.compat.numpy import (
  File "/usr/local/lib/python3.12/site-packages/pandas/compat/numpy/__init__.py", line 4, in <module>
    from pandas.util.version import Version
  File "/usr/local/lib/python3.12/site-packages/pandas/util/__init__.py", line 2, in <module>
    from pandas.util._decorators import (  # noqa:F401
  File "/usr/local/lib/python3.12/site-packages/pandas/util/_decorators.py", line 14, in <module>
    from pandas._libs.properties import cache_readonly
  File "/usr/local/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
@nikhil-ravi
Copy link
Owner

Will have time over the weekend to look into this, but my guess is that you need to downgrade your numpy. Check out this question on Stackoverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants