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

ic| Error: Failed to access the underlying source code for analysis. #158

Open
rafaelcesar0 opened this issue Oct 8, 2023 · 6 comments
Open

Comments

@rafaelcesar0
Copy link

My first attempt with ice cream gave me this error.
ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution?

Some information that may be useful:

  • Tested with python3.11.5 and 3.10 of MiniConda
  • Try running using PowerShell and Prompt
  • I also tried installing via pip and account
    pip install ice cream
    conda install -c conda-forge ice cream
    -I was able to use it for a while when I reinstalled conda but soon the error came back again
@vindevoy
Copy link

vindevoy commented Oct 9, 2023

I confirm this error. I just created a new conda environment with Python 3.11 and I get this error. Works with 3.10.

I am running "current file" from PyCharm. But I have the same issue when running it through a "configuration" from PyCharm and from CLI (Dos terminal in my case)

@primalkriek
Copy link

primalkriek commented Oct 10, 2023

hey, same here.
freshly installed conda, python version 3.11.5
did a pip install icecream and running a basic .py file where I use ic() I get this error.
same in Jupyter notebook (version 7)

I see that in a previous thread around 3.11 the same error is posted, there they ask for the version of executing, if I am not mistaken, the version is 0.8.3. that seems to be the latest

@QinHuoBin
Copy link

The simplest way to solve this problem is to execute
pip install -U executing
(fixed in python 3.11.4)

@primalkriek
Copy link

no that did not solve it, as stated previously, executing is installed, and as far as I can see, this is still 0.8.3.

@QinHuoBin
Copy link

no that did not solve it, as stated previously, executing is installed, and as far as I can see, this is still 0.8.3.

You can try pip install executing==2.0.0
According to my debugging results, it is precisely because the name of the python bytecode instruction has changed and executing has not adapted to this change that the icecream cannot obtain the source code.

@primalkriek
Copy link

hi,
pretty strange, because the output is 'Requirement already satisfied: executing==2.0.0 in anaconda3/lib/python3.11/site-packages (2.0.0)'
I remember reading it somewhere before, so I had already done it before, but by doing the implicit pip install -U executing

but now icecream works. so thank you for the

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

4 participants