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

argname sample code raises VarnameRetrievingError #106

Closed
krwhelan opened this issue Mar 22, 2024 · 1 comment
Closed

argname sample code raises VarnameRetrievingError #106

krwhelan opened this issue Mar 22, 2024 · 1 comment

Comments

@krwhelan
Copy link

I am running python 3.11 with Pythonnet
opened IDLE
Following the sample code in readme, I entered:

from varname import argname
def func(a, b=1):
print(argname('a'))
x=2

func(x)
Traceback (most recent call last):
File "<pyshell#4>", line 1, in
func(x)
File "<pyshell#2>", line 2, in func
print(argname('a'))
File "C:\Users\502751870\AppData\Local\Programs\Python\Python311\Lib\site-packages\varname\core.py", line 451, in argname
raise VarnameRetrievingError(
varname.utils.VarnameRetrievingError: Cannot retrieve the node where the function is called.

@pwwang
Copy link
Owner

pwwang commented Mar 22, 2024

@pwwang pwwang closed this as completed May 3, 2024
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