Skip to content

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

@IlyaEp

Description

@IlyaEp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions