-
Notifications
You must be signed in to change notification settings - Fork 112
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
AttributeError: 'NoneType' object has no attribute 'endswith' #512
Comments
Can you isolate the error from your code ? I can already see one issue : |
Does it work if you initialize like this instead ? from pyrpl import Pyrpl
self.pyrpl = Pyrpl(hostname=hostname, config='', gui=False)
self.redpitaya = self.pyrpl.rp |
Any updates on this? |
Are you experiencing the same issue ? If so, can you provide us a code that I can quickly test to recreate the error. |
This code works for me on a simulated RedPitaya
|
I solved this issue by initializing redpitaya this way.
rather than
|
I was running this code
`
from pyrpl import RedPitaya
class RedPitayaController():
def init(self, hostname: str, user: str = 'root', password: str = 'root', config: str = 'fermi',
gui: bool = False):
try:
self.redpitaya = RedPitaya(hostname=hostname, config=config, user=user, password=password)
except Exception as e:
print(e)
p = RedPitayaController(hostname='169.254.167.128')
p.reset()
`
and I ended up with the following error:
INFO:pyrpl.pyrpl.redpitaya:Successfully connected to Redpitaya with hostname 169.254.167.128.
Traceback (most recent call last):
File "rpcontrol.py", line 61, in
p.reset()
File "rpcontrol.py", line 19, in reset
self.set_iq0(output_direct='off')
File "rpcontrol.py", line 40, in set_iq0
output_signal=output_signal, quadrature_factor=quadrature_factor)
File "/root/miniconda3/envs/redpitaya/lib/python3.7/site-packages/pyrpl/pyrpl/modules.py", line 165, in setup
setattr(self, key, value)
File "/root/miniconda3/envs/redpitaya/lib/python3.7/site-packages/pyrpl/pyrpl/attributes.py", line 240, in set
value = self.validate_and_normalize(obj, value)
File "/root/miniconda3/envs/redpitaya/lib/python3.7/site-packages/pyrpl/pyrpl/hardware_modules/dsp.py", line 111, in validate_and_normalize
options = [o for o in self.options(obj) if o.endswith(value)]
File "/root/miniconda3/envs/redpitaya/lib/python3.7/site-packages/pyrpl/pyrpl/hardware_modules/dsp.py", line 111, in
options = [o for o in self.options(obj) if o.endswith(value)]
AttributeError: 'NoneType' object has no attribute 'endswith'
The text was updated successfully, but these errors were encountered: