|
From: | Josh Morman |
Subject: | Re: gr 3.9 OOT execution error: unknown base type gr::block |
Date: | Wed, 5 May 2021 12:41:23 -0400 |
Hi Josh - thanks for your help.from ./python/bindings/hermesNB_python.cc:
void bind_hermesNB(py::module& m)
{
using hermesNB = ::gr::hpsdr::hermesNB;
py::class_<hermesNB, gr::block, gr::basic_block,
std::shared_ptr<hermesNB>>(m, "hermesNB", D(hermesNB))
.def(py::init(&hermesNB::make),
py::arg("RxFreq0"),... long list of arguments...D(hermesNB,make))-- Tom, N5EGOn Wed, May 5, 2021 at 7:26 AM Josh Morman <mormjb@gmail.com> wrote:Tom,What does your hermesNB_python.cc look like?There should be a declaration for the binding in there that looks like:py::class_<block_name,
gr::sync_block,
gr::block,
gr::basic_block,or something to that effect. It could be that modtool didn't add the parent classes so that the inherited methods show up in the bindings. If so, that is a bug. I'm just thinking that what you are seeing would be the case if gr:;block wasn't a part of the declaration of the binding (which should happen automatically)I don't think it is related to the capitalization of the category name - in the code, the module is all lowercase.JoshOn Wed, May 5, 2021 at 10:20 AM Tom McDermott <tom.n5eg@gmail.com> wrote:I'm working on porting my OOT to gr 3.9 The 3.7 and 3.8 versions work fine.The ported code is compiled and make installed. My OOT is visible in GRC, andI've added to a new flowgraph.My OOT is in category HPSDR and the module is hermesNB (of several).When I try to execute a simple flowgraph in GRC with this OOT I get the following error:
Traceback (most recent call last):
File "/home/tom/Desktop/Test_AM.py", line 38, in <module>
import hpsdr
File "/usr/lib/python3/dist-packages/hpsdr/__init__.py", line 18, in <module>
from .hpsdr_python import *
ImportError: generic_type: type "hermesNB" referenced unknown base type "gr::block"Do I need to add code somewhere to import gr::block ??Is there an issue with capitalization of hpsdr vs. category name of HPSDR ??-- Tom, N5EG
[Prev in Thread] | Current Thread | [Next in Thread] |