gruns / icecream

🍦 Never use print() to debug again.
MIT License
9.21k stars 187 forks source link

icecream and python #159

Open t57042 opened 1 year ago

t57042 commented 1 year ago

Hello, just installed icecream and tested with this code:

from icecream import ic def foo(i): return i + 333 ic(foo(123))

I get this: 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?

when I remove ic(foo(123)) it runs

thanks Richard

Muhammad-Musab commented 1 year ago

ive tested the same code on my laptop, and it is running as intended, and showing the following output.

ic| foo(123): 456

Try to reinstall the icecream package and hope it works fine.