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

Error "has no attribute '_base_name'" for UDT #92

Open
IlyaEp opened this issue May 17, 2021 · 0 comments
Open

Error "has no attribute '_base_name'" for UDT #92

IlyaEp opened this issue May 17, 2021 · 0 comments

Comments

@IlyaEp
Copy link

IlyaEp commented May 17, 2021

Hello,
First of all, I want to thank you for pygraphblas.
I have a question. To ask the question I will reproduce the sequence of actions.

  1. I installed the latest version of pygraphblas via pip
  2. After that I tried to run your example for user-defined types in tests. For this I had to add the following imports
from pygraphblas.types import Type, binop
from pygraphblas import lib
  1. After that I ran the example. But I got an error
File "/home/ilya/.local/lib/python3.8/site-packages/pygraphblas/types.py", line 437, in __set_name__
    if cls._base_name == "UDT":
AttributeError: type object 'BF' has no attribute '_base_name'
  1. To fix this error, I had to add _base_name = "UDT" attribute to the class BF

After that the error disappeared. Can you please tell me this is how it should be done or the problem is something else.
I'm also interested in #65 too.

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

1 participant