You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the following self-contained example I'm hit with an AttributeError
Traceback (most recent call last):
File "/home/user/env/lib/python3.11/site-packages/jurigged/codetools.py", line 493, in _process_child_correspondence
orig.apply_correspondence(
File "/home/user/env/lib/python3.11/site-packages/jurigged/codetools.py", line 704, in apply_correspondence
new_obj = self.reevaluate(corr.new.node, glb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/env/lib/python3.11/site-packages/jurigged/codetools.py", line 801, in reevaluate
conform(self.get_object(), new_obj)
File "/home/user/env/lib/python3.11/site-packages/codefind/registry.py", line 118, in conform
self.conform(obj1, obj2.__code__)
File "/home/user/env/lib/python3.11/site-packages/codefind/registry.py", line 123, in conform
fv1 = obj1.__code__.co_freevars
^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__code__'
What seems to happen is that the codefind module collects function codes first when it is loaded (when import jurigged happens), and then when new files are imported. The functions in asynctgtest.py are therefore not picked up, because they are defined after the collection, but also after the file is imported.
I'll try to come up with a proper solution (and maybe a better error message), but in the meantime you can move import jurigged after the definition of main and it should work.
When running the following self-contained example I'm hit with an
AttributeError
Any idea of what could be going wrong?
The text was updated successfully, but these errors were encountered: