I am having an issue connect to a LeCroy oscilloscope using PyVisa v1.9.
If I trying to connect using the code:
import visa
from pyvisa.resources import MessageBasedResource
visa.log_to_screen()
rm = visa.ResourceManager()
my_instrument = rm.open_resource('VICP::10.2.72.141:INSTR', resource_pyclass=MessageBasedResource)
I get the error: VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.
However, if I change to:
my_instrument = rm.open_resource('TCPIP::10.2.72.141:INSTR', resource_pyclass=MessageBasedResource)
The code with connect with the instrument, but the functions in my driver no longer work. Read commands also respond with:
‘WARNING : CURRENT REMOTE CONTROL INTERFACE IS TCPIP’
I never saw an issue before moving to version 1.9 of pyvisa.
Python version is 2.7 64-bit, running on windows 10 64bit
Any hints would be appreciated.
Related
I am using GNU Health and I have installed trytond server 6.0.24 and tryton desktop 6.0.10 and when I install trytond web client it was installed successfully but when I open it on localhost it shows the error Version Mismatch.
How can I match the version of the tryton web client with the trytond server?
This is the error shown on the browser
I have tried to find to version of tryton web client but it never works.
The error is right, you installed the wrong version of the web client. You should install the 6.0 series of tryton-sao. Sao is the name of web client is not the same as the desktop client. For example, you can install the 6.0.27 version (which is the latest at time of writing) which should work for your setup. Note that you should also remove the current installed version to avoid conflicts.
This is because tryton requires all clients (web and desktop) to run the same series (two first digits of version) as the server you are connecting to.
I have a multiplexor KEYSIGHT 34972A.
I want to control this unit with python under Ubuntu 18.04.I have installed d virtual box and Ubuntu 18.04.6.
I have installed pyvisa and pyvisa-py. Unfortunately I dont know how to configure the IVI backend. Please help, how to install and configure Keysight VISA for Ubuntu.
I have installed the KEYSIGHT IO Connection Expert on Ubuntu and it works perfectly.
I connected KEYSIGHT 34972A with USB cable on my PC USB port and the app Connection Expert discovers the 34972A and connects to it.
However if I try to connect with pyvisa and python it gives me error Device not found.
This is my python code:
import pyvisa
VISA_ADDRESS = 'USB0::0x0957::0x2007::MY59002789::0::INSTR'
try:
resourceManager = pyvisa.ResourceManager('/usr/bin/io-ce')
session = resourceManager.open_resource(VISA_ADDRESS)
if session.resource_name.startswith('ASRL') or session.resource_name.endswith('SOCKET'):
session.read_termination = '\n'
session.write('*IDN?')
idn = session.read()
print('*IDN? returned: %s' % idn.rstrip('\n'))
session.close()
resourceManager.close()
This code gives error "Device not found".
It is written in pyvisa documentation:
If no backend is specified, pyvisa uses the IVI backend if any IVI library has been installed. Failing that, it uses the pyvisa-py backend. The IVI backend requires that you install first the IVI-VISA library.
In most cases PyVISA will be able to find the location of the shared visa library. If this does not work or you want to use another one, you need to provide the library path to the ResourceManager constructor:
rm = ResourceManager('Path to library')
Do you know what is the path for the IVI backend that the Connection Expert uses?
I think my code does not find the IVI KEYSIGHT VISA beckend and uses pyvisa-py beckend.
Once again please help, how to install and configure IVI Keysight VISA beckend on Ubunto.
I don't know how to install KEYSIGHT VISA on Ubuntu and don't know how to configure the KEYSIGHT IVI backend (I don't know what path to put in the resource manager).
I am trying to install CKAN on a raspberry pi using the instructions found here. The RPi is running the latest Raspberry Pi OS (w/desktop / January 11th 2021 / Kernel 5.4) All is successful and CKAN seems to function normally when viewed on the local machine, but any attempt to access CKAN from other machines on the network get Connection Refused. Is CKAN blocking requests from external machines by default, and if so how do I change this? Both jetty and solr are accessible from external machines, and I don't have a firewall in between these machines.
Many thanks for your help.
This was solved by passing a host and port variable when running the ckan server. Adding -H 0.0.0.0 to the run command enabled listening on all interfaces.
I'm trying to setup a python script that uses the requests library to get data from a website. The script works without issues running in a virtual environment on my windows 10 pc or on a azure vm.
However, when I try to create a docker container using the python:3.6-slim image I get DH_KEY_TOO_SMALL errors. Testing the website on ssllabs.com revealed that it supports weak DH key exchange parameters. What could be causing this error and how can I fix it?
I've managed to fix the issue. The problem was caused by openssl versions. Both my windows 10 pc and ubuntu 18.04 vm run an older version that had no problem connecting to the website. The python docker images contain a newer version of openssl that refused to connect.
I'm working with STM32 (NUCLEO-L476RG) - uploading code via Workbench, sometimes using ST-Link Utility to connect to it.
Additionally, I've some python code that listens to STM via serial port.
Till yesterday everything was working fine, but today (without changing anything connected to STM, drivers etc.) pyserial can't connect to the device, showing message:
File "C:\python37\lib\site-packages\serial\serialwin32.py", line 62, in open raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'COM7': FileNotFoundError(2, 'Nie można odnaleźć określonego pliku.', None, 2)
I can upload code using Workbench or connect to STM via ST-Link Utility without any problems. Port is not used by any other application.
When I list ports by serial.tools.list_ports.comports() it shows properly as STMicroelectronics STLink Virtual COM Port (COM7).
In 'Device Manager' there's a yellow triangle next to the COM, but I'm not sure if it were there earlier (probably yes) - it says that the device driver is not signed.
I tried to:
reinstall the drivers to these provided by STM
reinstall pyserial
use older python
use older pyserial
change COM to another
change cable to new one
connect the device to all possible USB ports
but any of that changed anything.
My setup:
Windows 7
python 3.7.1
pyserial 3.4
STM 32 NUCLEO-L476RG
System Workbench for STM32 & ST-Link Utility, which are working perfectly fine
This setup was working for half a year (!) and I didn't change anything connected to it in the last couple of days. Only thing I did yesterday was installing PostgreSQL, but it seems highly unbelievable that it could cause my current problem...
Thank you in advance for any help - I don't really have an idea what should I try next, so I appreciate any piece of advice.