Hi Marcus,
here is some info about my system as you asked for:
Python 3.9.1 (default, Dec 8 2020, 07:51:42)
[GCC 10.2.0] on linux
>>> import gpredict
>>> print(gpredict.__file__)
/usr/local2/lib/python3/dist-packages/gpredict/__init__.py
That is ok for my configuration I think. I installed the newest version
but get the error again, even in the examples directory.
Then I deleted all .py files and the directory __pycache__and at the
moment it works.
I am wondering about the cause and will inform you again when there is a
more reproducible situation.
73, Tom
On 27.02.21 15:55, Marcus Müller wrote:
> Hi Tom,
>
> 1. Make sure your gr-gpredict-doppler checkout is recent enough to include Mike's 3.9-porting.
> Then: This error typically happens when you think you've imported something that contains
> a symbol, but didn't. In case of a C++ module, I'd assume there was something in the
> bindings missing, but as gr-gpredict-doppler is python only, and doppler.py is right
> there, my guess is you're accidentally importing an older installation or something else.
> open your python3, type in "import gpredict", then enter, then "print(gpredict.__file__)".
> Is that what you're hoping it is?
>
>
> Best regards,
> Marcus
>
> On 27.02.21 14:15, Tom Breyer wrote:
>> Hi to all,
>>
>> I work with grc 3.9.0.0 und linux Debian 11.
>>
>> Since the last days I am trying to find out some very mystic (in my eyes):
>>
>> I created a very simple flowgraph with
>>
>> Error:
>>
>> File "/home/tom/grc-data-3.9/gr-gpredict-doppler/examples/gpredict.py", line 81, in __init__
>> self.gpredict_doppler_0 = gpredict.doppler('127.0.0.1', 4532, True)
>> AttributeError: type object '*gpredict' has no attribute 'doppler'*
>>
>> --------------------------------------------------------
>>
>> But:
>>
>> I want to get gr_predict-doppler running and it works, even it can communicate with the
>> GPredict satellite program.
>>
>> --------------------------------------------------------
>>
>> This works:
>>
>> Generating: '/home/tom/grc-data-3.9/gr-gpredict-doppler/examples/test_doppler.py'
>>
>> Executing: /usr/bin/python3 -u
>> /home/tom/grc-data-3.9/gr-gpredict-doppler/examples/test_doppler.py
>>
>> [doppler] Waiting for connection on: 127.0.0.1:4532
>> [doppler] Connected from: 127.0.0.1:46078
>> [doppler] New frequency: 145826597
>> [doppler] New frequency: 145826598
>> [doppler] New frequency: 145826599
>>
>> --------------------------------------------------------
>>
>> When starting the same flowgraph in my regular working directory I get an error:
>>
>> Generating: '/home/tom/grc-data-3.9/test_doppler.py'
>>
>> Executing: /usr/bin/python3 -u /home/tom/grc-data-3.9/test_doppler.py
>>
>> Traceback (most recent call last):
>> File "/home/tom/grc-data-3.9/test_doppler.py", line 210, in <module>
>> main()
>> File "/home/tom/grc-data-3.9/test_doppler.py", line 188, in main
>> tb = top_block_cls()
>> File "/home/tom/grc-data-3.9/test_doppler.py", line 136, in __init__
>> self.gpredict_doppler_0 = gpredict.doppler('127.0.0.1', 4532, True)
>> AttributeError: module '*gpredict' has no attribute 'doppler'*
>>
>> --------------------------------------------------------
>>
>> When moving it again to ...examples it works again.
>>
>> I find out that maybe the directory __pycache__ can have an impact on my trials...
>>
>> What is wrong in my setup (or thinking)?
>>
>> 73, Tom
>>
>>
>>
>>
No comments:
Post a Comment