ps6000SigGen.py

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
royhersh
Newbie
Posts: 0
Joined: Tue Nov 13, 2018 5:40 pm

ps6000SigGen.py

Post by royhersh » Tue Nov 13, 2018 5:57 pm

hello,

we have picoscope 6404D are trying to write python code that will make sweep on sound range.
we found the git and this siggen.py file https://github.com/picotech/picosdk-pyt ... 0SigGen.py, however when we try to run it we fail.

we have picoscope gui and picoSDK 64bit from your download center, we have downloaded numpy and mathplot (maybe i misspelled this one).

Traceback (most recent call last):
File "C:\Users\username\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\ps6000SigGen.py", line 12, in <module>
from picosdk.ps6000 import ps6000 as ps
ImportError: No module named 'picosdk'
we got this error message

when we try out
setup.py build
we got build package and when we run it we got this message
Traceback (most recent call last):
File "C:\Users\username\Desktop\build\lib\ps6000SigGen.py", line 13, in <module>
from picosdk.ps6000 import ps6000 as ps
File "C:\Users\username\Desktop\build\lib\picosdk\ps6000.py", line 19, in <module>
ps6000 = Ps6000lib()
File "C:\Users\username\Desktop\build\lib\picosdk\ps6000.py", line 16, in __init__
super(Ps6000lib, self).__init__("ps6000")
File "C:\Users\username\Desktop\build\lib\picosdk\library.py", line 97, in __init__
self._clib = self._load()
File "C:\Users\username\Desktop\build\lib\picosdk\library.py", line 118, in _load
raise CannotFindPicoSDKError("PicoSDK (%s) not found, check %s" % (self.name, env_var_name))
picosdk.library.CannotFindPicoSDKError: PicoSDK (ps6000) not found, check PATH

thanks roy.

Hitesh
Site Admin
Site Admin
Posts: 2847
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: ps6000SigGen.py

Post by Hitesh » Wed Nov 14, 2018 9:27 am

Hi Roy,

Please ensure that you have installed the PicoSDK (32-bit/64-bit depending on your version of Python) available from https://www.picotech.com/downloads.

Regards,
Hitesh

Software Dev. Engineer

royhersh
Newbie
Posts: 0
Joined: Tue Nov 13, 2018 5:40 pm

Re: ps6000SigGen.py

Post by royhersh » Sun Nov 18, 2018 6:34 pm

hello,
after reinstalling the picosdk and moving the python files to some other directory.
I got new error message, when i try to run "python3 setup.py install".
This error is very odd since i did not install any 32 bit program.

Code: Select all

"C:\Users\user\AppData\Local\Programs\Python\Python35-32\python.exe" "C:/Users/user/Desktop/picosdk-python-wrappers-master/picosdk-python-wrappers-master/ps6000Examples/ps6000SigGen.py"
Traceback (most recent call last):
C:\Program Files\Pico Technology\SDK\lib\ps6000.dll 32
  File "C:\Users\user\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\picosdk\library.py", line 124, in _load
    result = WinDLL(library_path)
  File "C:\Users\user\AppData\Local\Programs\Python\Python35-32\lib\ctypes\__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/user/Desktop/picosdk-python-wrappers-master/picosdk-python-wrappers-master/ps6000Examples/ps6000SigGen.py", line 11, in <module>
    from picosdk.ps6000 import ps6000 as ps
  File "C:\Users\user\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\picosdk\ps6000.py", line 19, in <module>
    ps6000 = Ps6000lib()
  File "C:\Users\user\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\picosdk\ps6000.py", line 16, in __init__
    super(Ps6000lib, self).__init__("ps6000")
  File "C:\Users\user\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\picosdk\library.py", line 97, in __init__
    self._clib = self._load()
  File "C:\Users\user\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\picosdk\library.py", line 130, in _load
    raise CannotOpenPicoSDKError("PicoSDK (%s) not compatible (check 32 vs 64-bit): %s" % (self.name, e))
picosdk.library.CannotOpenPicoSDKError: PicoSDK (ps6000) not compatible (check 32 vs 64-bit): [WinError 193] %1 is not a valid Win32 application

Process finished with exit code 1

Post Reply