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
I get the following error when calling one of my functions:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "python-3.7.2.amd64\lib\site-packages\pyclibrary\c_library.py", line 230, in __getattr__
obj = self(k, n)
File "python-3.7.2.amd64\lib\site-packages\pyclibrary\c_library.py", line 210, in __call__
self._objs_[typ][name] = self._make_obj_(typ, name)
File "python-3.7.2.amd64\lib\site-packages\pyclibrary\c_library.py", line 272, in _make_obj_
return self._get_function(n)
File "python-3.7.2.amd64\lib\site-packages\pyclibrary\c_library.py", line 338, in _get_function
func_name, self._lock_calls_)
File "python-3.7.2.amd64\lib\site-packages\pyclibrary\c_library.py", line 416, in __init__
if conv in self.sig[0]:
AttributeError: 'Type' object has no attribute 'remove'
This is the corresponding code in c_library.py:
for conv in ['__stdcall', '__cdecl']:
if conv in self.sig[0]:
self.sig[0].remove(conv)
I added a print statement to see the value of self.sig:
As a workaround, I commented out the for loop. The error disappears and everything works as expected. I cannot judge the side-effects though.
Removing the __stdcall qualifier also prevents the issue.
The library is proprietary, so I cannot share it. But if the information provided here is not sufficient to pinpoint the issue, I can try to provide a minimal example, let me now.
The text was updated successfully, but these errors were encountered:
Wow it has been a long time since I looked at that code. It looks like the idea was (at least at one point) to avoid confusing the type with a function type by removing the qualifier. Honestly I would need to dive a bit more than I have time at the moment.
I would suggest you look at the res_type attribute of the function object and figure out if it makes sense. If it does, it may mean we can actually remove that loop but I would have to dive again a bit more in the type evaluation logic.
I get the following error when calling one of my functions:
This is the corresponding code in c_library.py:
I added a print statement to see the value of self.sig:
As a workaround, I commented out the for loop. The error disappears and everything works as expected. I cannot judge the side-effects though.
Removing the __stdcall qualifier also prevents the issue.
The library is proprietary, so I cannot share it. But if the information provided here is not sufficient to pinpoint the issue, I can try to provide a minimal example, let me now.
The text was updated successfully, but these errors were encountered: