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

Pulse generator instrument control using test.py #385

Closed
grahamnaylorccfe opened this issue Feb 10, 2017 · 5 comments
Closed

Pulse generator instrument control using test.py #385

grahamnaylorccfe opened this issue Feb 10, 2017 · 5 comments

Comments

@grahamnaylorccfe
Copy link

In the provided test.py program for the pulse generator instrument, I get the following error:


~/koheron-sdk$ python instruments/pulse_generator/test.py
Traceback (most recent call last):
File "instruments/pulse_generator/test.py", line 32, in
driver.set_dac()
File "/home/graham/koheron-sdk/instruments/pulse_generator/pulse.py", line 38, in set_dac
set_dac_data(self, dac_data_1 + 65536 * dac_data_2)
File "/home/graham/anaconda3/lib/python3.6/site-packages/koheron/koheron.py", line 98, in wrapper
self.client.send_command(device_id, cmd_id, cmd_args, *args)
File "/home/graham/anaconda3/lib/python3.6/site-packages/koheron/koheron.py", line 367, in send_command
cmd = make_command(device_id, cmd_id, cmd_args, *args)
File "/home/graham/anaconda3/lib/python3.6/site-packages/koheron/koheron.py", line 116, in make_command
buff += build_payload(args[2], args[3:])
File "/home/graham/anaconda3/lib/python3.6/site-packages/koheron/koheron.py", line 185, in build_payload
append_array(payload, args[i], get_std_array_params(arg['type']))
File "/home/graham/anaconda3/lib/python3.6/site-packages/koheron/koheron.py", line 147, in append_array
buff += bytearray(array)
TypeError: only integer arrays with one element can be converted to an index


I am running Python 3.6.0 :: Anaconda 4.3.0 (64-bit) (Ubuntu 16.04 VM).
Graham

@grahamnaylorccfe
Copy link
Author

OK, so I set up an environment to run with python 3.5 and it is good again! (Except that I don't get the graphics as it can't find pygtk and I have to set the backend for matplotlib as 'Agg' which doesn't seem to do anything).

@grahamnaylorccfe
Copy link
Author

Using matplotlib.use('TKAgg') does allow the graphics to show though - hooray!

@tvanderbruggen
Copy link
Member

I was just trying to get Matplotlib running with Python3. You solved my problem ! Also there is some missing parenthesis in the print.

Anyway, I'm glad it works !

@tvanderbruggen
Copy link
Member

If found similar issues in the decimator test. This should be fix by #386. Thanks for pointing the problem and the solution !

@grahamnaylorccfe
Copy link
Author

grahamnaylorccfe commented Feb 20, 2017 via email

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

No branches or pull requests

2 participants