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

Infinite loading #110

Open
nrydanov opened this issue Oct 16, 2024 · 15 comments
Open

Infinite loading #110

nrydanov opened this issue Oct 16, 2024 · 15 comments

Comments

@nrydanov
Copy link

nrydanov commented Oct 16, 2024

Hello, thank you for adding virtual environment support.

I've just installed latest Pylyzer version from Cargo, added Pylyzer as source for nvim_lsp and I see infinite loading on "checking files...". However, it seems like using pylyzer on single file from terminal works fine.

Problem reproduces for VSCode too.

Useful information:
Pylyzer: 0.0.66
OS: MacOS Sequoia 15.0.1
Python version: 3.10.13
Package manager: Rye/UV
Processor: Apple M1

Any thoughts what can be wrong?

@nrydanov nrydanov changed the title Infinite loading Infinite loading in Neovim Oct 16, 2024
@nrydanov nrydanov changed the title Infinite loading in Neovim Infinite loading Oct 17, 2024
@ohseunghyeon
Copy link

+2

@BrunoMarinhoM
Copy link

BrunoMarinhoM commented Oct 17, 2024

Hey guys! I'm not a maintainer but I ran in a similar issue, turned out that running

$USER /path/to/pylyzer --server

Printed the following errors:

[ERR] ERG_PATH not found
[ERR] ERG_PATH not found
[ERR] ERG_PATH/lib/pystd not found
[ERR] ERG_PATH not found
[ERR] ERG_PATH/lib/core.d not found
[ERR] ERG_PATH not found
[ERR] ERG_PATH/lib/std not found

which was already solved in this issue

So I reinstalled it using the sistems package manager and it did exported the correct environment variables;

So, since you guys are on MacOS, I'd try using homebrew
or following the solution on the issue I said:

If for some reason the files under lib cannot be installed, you can reinstall them using the following method.

  • pip reinstall
pip install --force-reinstall pylyzer
  • cargo reinstall
cargo install --force pylyzer
python3 <(curl -L https://github.com/mtshiba/ergup/raw/main/ergup.py)

Hope it helps

@agrin96
Copy link

agrin96 commented Oct 18, 2024

+3 the above solution with reinstalling did not work for me. Running pylyzer from cli is also stuck

@nrydanov
Copy link
Author

nrydanov commented Oct 18, 2024

Didn't helped for me too, Pylyzer is ok with finding env variables or libraries, but still fails to load.

@ethanthoma
Copy link

I'm having the same issue. I setup pylyzer through nix shell using 0.0.66 (I made an overlay for it). My CLI is also stuck in a loop forever.

@nrydanov
Copy link
Author

@mtshiba Still reproduces on v0.0.67

@agrin96
Copy link

agrin96 commented Oct 19, 2024

Could problem be in using python 3.12 typing features? I've managed to show the parser produces a stack-overflow on my code and its all written with generics and 3.12 typing.

@FahimAnayet
Copy link

Same problem version 0.67.0 and 0.68.0 too

@nrydanov
Copy link
Author

UPD. Some of my old projects using poetry works fine.

@nrydanov
Copy link
Author

UPD 2. Found repo with Poetry, where error is still reproduces, so there's probably no dependency between package managers.

Also, if I remove .venv in any of these projects, Pylyzer is not stuck anymore. Looks like specific virtual environment state breaks pylyzer.

@OliverGuy
Copy link

I've been having similar issues; fixed the ERG_PATH not found through cargo install erg but still got the infinite loading in e.g. pylyzer app.py.

To debug this, I've pip installed different versions of pylyzer to try them on the same (miniconda) virtual environment and test file.

After trying out versions 0.0.53, 54, 55 and 56, I've tried switching back to the latest version of pylyzer, it now prints errors instead of hanging (it now fails to load modules, but that's another issue entirely) !

I'm assuming there's some sort of dependency or environment variable that used to be set via setup.py and didn't get unset when upgrading.

@mtshiba
Copy link
Owner

mtshiba commented Nov 4, 2024

It seems that a bug in the Erg compiler was causing the checker to hang.
I applied a patch to fix the issue and confirmed that it was fixed in some Python packages, but it is unclear whether the problem has been completely resolved.

@jensenbox
Copy link

Not great for a first experience:

christian@christian-desktop:/projects/core$ pip install pylyzer
Collecting pylyzer
  Downloading pylyzer-0.0.69-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.6 kB)
Downloading pylyzer-0.0.69-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.5/12.5 MB 65.4 MB/s eta 0:00:00
Installing collected packages: pylyzer
Successfully installed pylyzer-0.0.69

[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
christian@christian-desktop:/projects/core$ pylyzer
[ERR] ERG_PATH not found
[ERR] ERG_PATH not found
[ERR] ERG_PATH/lib/pystd not found 
[ERR] ERG_PATH not found
[ERR] ERG_PATH/lib/core.d not found 

Never completes, never does anything. Is there something I am missing here?

@nrydanov
Copy link
Author

Sorry, but it still reproduces with UV. Analysis ends only for test.py file located in root folder.

All files in src folder are still hanged forever.

@artkpv
Copy link

artkpv commented Nov 20, 2024

Same issue here. See #83 (comment)

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

10 participants