Repository: microsoft/Qcodes

Issue:
Snapshot(update=True) issues with several instruments
Such as 

```python
zi = ZIUHFLI('ZIUHFLI', 'dev2235')  # 192.168.15.106
zi.snapshot(update=True)
Traceback (most recent call last):

  File "<ipython-input-35-693c5f25bf16>", line 1, in <module>
    zi.snapshot(update=True)

  File "c:\users\jens\qcodes\qcodes\utils\metadata.py", line 32, in snapshot
    snap = self.snapshot_base(update=update)

  File "c:\users\jens\qcodes\qcodes\instrument\base.py", line 164, in snapshot_base
    snap['parameters'][name] = param.snapshot(update=update)

  File "c:\users\jens\qcodes\qcodes\utils\metadata.py", line 32, in snapshot
    snap = self.snapshot_base(update=update)

  File "c:\users\jens\qcodes\qcodes\instrument\parameter.py", line 189, in snapshot_base
    self.get()

  File "c:\users\jens\qcodes\qcodes\instrument\parameter.py", line 839, in get
    raise e

  File "c:\users\jens\qcodes\qcodes\instrument\parameter.py", line 834, in get
    value = self._get()

  File "c:\users\jens\qcodes\qcodes\utils\command.py", line 177, in __call__
    return self.exec_function(*args)

  File "c:\users\jens\qcodes\qcodes\instrument_drivers\ZI\ZIUHFLI.py", line 1668, in _get_sweep_time
    raise ValueError('No signals selected! Can not find sweep time.')

ValueError: ('No signals selected! Can not find sweep time.', 'getting ZIUHFLI_sweeper_sweeptime')
```

or 

```python
ks = Keysight_33500B_Channels('ks', 'TCPIP0::192.168.15.108::inst0::INSTR')
ks.snapshot(update=True)
Traceback (most recent call last):

  File "<ipython-input-36-16568e312fc6>", line 1, in <module>
    ks.snapshot(update=True)

  File "c:\users\jens\qcodes\qcodes\utils\metadata.py", line 32, in snapshot
    snap = self.snapshot_base(update=update)

  File "c:\users\jens\qcodes\qcodes\instrument\visa.py", line 178, in snapshot_base
    params_to_skip_update=params_to_skip_update)

  File "c:\users\jens\qcodes\qcodes\instrument\base.py", line 164, in snapshot_base
    snap['parameters'][name] = param.snapshot(update=update)

  File "c:\users\jens\qcodes\qcodes\utils\metadata.py", line 32, in snapshot
    snap = self.snapshot_base(update=update)

  File "c:\users\jens\qcodes\qcodes\instrument\parameter.py", line 189, in snapshot_base
    self.get()

  File "c:\users\jens\qcodes\qcodes\instrument\parameter.py", line 839, in get
    raise e

  File "c:\users\jens\qcodes\qcodes\instrument\parameter.py", line 834, in get
    value = self._get()

  File "c:\users\jens\qcodes\qcodes\utils\command.py", line 177, in __call__
    return self.exec_function(*args)

  File "c:\users\jens\qcodes\qcodes\utils\command.py", line 130, in call_by_str_parsed_out
    return self.output_parser(self.exec_str(self.cmd_str.format(*args)))

  File "c:\users\jens\qcodes\qcodes\instrument\parameter.py", line 862, in _valmapping_get_parser
    raise KeyError('Unmapped value from instrument: {!r}'.format(val))

KeyError: ("Unmapped value from instrument: 'CH1\\n'", 'getting ks_sync_source')
```


Discussion:
Had to fix this for SR830 in T3 drivers. Did that by overwriting snapshot_base to skip array parameters and conductance. Conductance can only be measured if channel1 is set to measure X (not R or ...) we cannot enforce that to be the case in snapshot so exclude it

```
    def snapshot_base(self, update=False, params_to_skip_update=None):
        if params_to_skip_update is None:
            params_to_skip_update = ('conductance', 'ch1_databuffer', 'ch2_databuffer')
        snap = super().snapshot_base(update=update,
                                     params_to_skip_update=params_to_skip_update)
        return snap
```

Resolving patch:
diff --git a/qcodes/instrument/base.py b/qcodes/instrument/base.py
--- a/qcodes/instrument/base.py
+++ b/qcodes/instrument/base.py
@@ -161,7 +161,11 @@ def snapshot_base(self, update: bool=False,
             update = update
             if params_to_skip_update and name in params_to_skip_update:
                 update = False
-            snap['parameters'][name] = param.snapshot(update=update)
+            try:
+                snap['parameters'][name] = param.snapshot(update=update)
+            except:
+                logging.info("Snapshot: Could not update parameter: {}".format(name))
+                snap['parameters'][name] = param.snapshot(update=False)
         for attr in set(self._meta_attrs):
             if hasattr(self, attr):
                 snap[attr] = getattr(self, attr)


Test patch: