Repository: pyvisa/pyvisa

Issue:
VI_ERROR_RSRC_NFOUND while connecting to a LeCroy using VICP
I am trying to connect to a LeCroy Wavesurfer which is connected to my local network. First, I attempted this code:

`import visa`
`rm = visa.ResourceManager()`
`scope = rm.open_resource("VICP::192.168.122.53::INSTR")`

This throws out an error: pyvisa.errors.VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.

I followed the bug report thread #168, but no luck. :( Likewise, I read through other related bug reports, as well as several StackOverflow threads, but nothing helped. I did manage to get other types of errors, but without understanding the problem, I don't really consider that an improvement. 

I am using Python 3.5.1 with PyVISA 1.8 running on a Win8.1 computer. If needed, I can provide any other relevant information.

Thanks in advance.


Discussion:

Patch:
diff --git a/pyvisa/rname.py b/pyvisa/rname.py
index 3c4ca0a..f383515 100644
--- a/pyvisa/rname.py
+++ b/pyvisa/rname.py
@@ -30,7 +30,7 @@ from . import constants, errors, logger
 if TYPE_CHECKING:
     from .resources import Resource  # noqa  # pragma: no cover
 
-#: Interface types for which a subclass of ResourName exists
+#: Interface types for which a subclass of ResourceName exists
 _INTERFACE_TYPES: Set[str] = set()
 
 #: Resource Class for Interface type
@@ -428,12 +428,13 @@ class VICPInstr(ResourceName):
     """VICP INSTR
 
     The syntax is:
-    VICP[board]::host address[::INSTR]
+    VICP::host address[::INSTR]
 
     """
 
-    #: Board to use.
-    board: str = "0"
+    #: VICP resource do not support a board index. But it is the only resource
+    #: in this case so we allow parsing one but set a default of ""
+    _unused: None = None
 
     #: Host address of the device (IPv4 or host name)
     host_address: str = ""


Test patch:
diff --git a/pyvisa/testsuite/test_rname.py b/pyvisa/testsuite/test_rname.py
index f4a3897..9a9ac85 100644
--- a/pyvisa/testsuite/test_rname.py
+++ b/pyvisa/testsuite/test_rname.py
@@ -300,8 +300,8 @@ class TestParsers(BaseTestCase):
             interface_type="VICP",
             resource_class="INSTR",
             host_address="192.168.134.102",
-            board="0",
-            canonical_resource_name="VICP0::192.168.134.102::INSTR",
+            _unused=None,
+            canonical_resource_name="VICP::192.168.134.102::INSTR",
         )
 
         self._parse_test(
@@ -309,26 +309,26 @@ class TestParsers(BaseTestCase):
             interface_type="VICP",
             resource_class="INSTR",
             host_address="dev.company.com",
-            board="0",
-            canonical_resource_name="VICP0::dev.company.com::INSTR",
+            _unused=None,
+            canonical_resource_name="VICP::dev.company.com::INSTR",
         )
 
         self._parse_test(
-            "VICP3::dev.company.com::INSTR",
+            "VICP::dev.company.com::INSTR",
             interface_type="VICP",
             resource_class="INSTR",
             host_address="dev.company.com",
-            board="3",
-            canonical_resource_name="VICP3::dev.company.com::INSTR",
+            _unused=None,
+            canonical_resource_name="VICP::dev.company.com::INSTR",
         )
 
         self._parse_test(
-            "VICP3::1.2.3.4::INSTR",
+            "VICP::1.2.3.4::INSTR",
             interface_type="VICP",
             resource_class="INSTR",
             host_address="1.2.3.4",
-            board="3",
-            canonical_resource_name="VICP3::1.2.3.4::INSTR",
+            _unused=None,
+            canonical_resource_name="VICP::1.2.3.4::INSTR",
         )
 
     def test_tcpip_socket(self):