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

grc: embedded python objects fail to load because of missing cpp_templates #3260

Closed
mormj opened this issue Mar 13, 2020 · 3 comments · Fixed by #3261
Closed

grc: embedded python objects fail to load because of missing cpp_templates #3260

mormj opened this issue Mar 13, 2020 · 3 comments · Fixed by #3261

Comments

@mormj
Copy link
Contributor

mormj commented Mar 13, 2020

AttributeError: 'EPyBlock' object has no attribute 'cpp_templates'
This is with latest master edaa88f

Reproduce by opening a blank flowgraph in grc, and adding "Python Block" or "Python Module"

Going to see if there is an easy fix, but wanted to go ahead and post the issue

@mormj
Copy link
Contributor Author

mormj commented Mar 13, 2020

As the classes that derive from block load and get passed to this decorator, the flags accumulate in all the classes

dummy - {}
epy_block - {show_id}
virtual_source - {show_id, cpp}
...

so by the time virtual source is added, the full list build_ins in each class has all the flags

def register_build_in(cls):
    cls.loaded_from = '(build-in)'
    build_ins[cls.key] = cls
    return cls

@dkozel
Copy link
Contributor

dkozel commented Mar 13, 2020

Do you know what changed caused these blocks to stop working?

@mormj
Copy link
Contributor Author

mormj commented Mar 13, 2020

Looks like some of the recent cpp_template changes. The underlying issue that these blocks have flags that they shouldn't was probably always there, but the recent change to access the cpp_templates member of a block is new, and that's where the exception was occuring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants