cilynx / pantomath

Pantomath knows about things
GNU General Public License v3.0
1 stars 0 forks source link

Ugly failure when /Scan/Mode isn't defined like on a new installation #41

Open cilynx opened 1 month ago

cilynx commented 1 month ago

19:34:06: Debug: Config.Read(('/Scan/Mode',)) = 19:38:49: Debug: Config.Write(('/Scan/Source', 'ADF Duplex')) 19:38:49: Debug: Config.Read(('/Scan/Device',)) = epsonds:net:192.168.7.159 19:38:50: Debug: Config.Read(('/Scan/Source', 'ADF')) = ADF Duplex 19:38:50: Debug: Scan Source: ADF Duplex Exception in thread Thread-2 (_scan_adf): Traceback (most recent call last): File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner 19:38:50: Debug: Config.Read(('/Scan/Mode',)) = self.run() File "/usr/lib/python3.12/threading.py", line 1010, in run self._target(*self._args, **self._kwargs) File "/home/rcw/Documents/pantomath/src/scanner.py", line 175, in _scan_adf self.device.mode = self.frame.config.Read('/Scan/Mode') ^^^^^^^^^^^^^^^^ File "/home/rcw/Documents/pantomath/.venv/lib/python3.12/site-packages/sane.py", line 206, in setattr result = d['dev'].set_option(opt.index, value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _sane.error: Invalid argument

cilynx commented 1 month ago

Fixed by https://github.com/cilynx/pantomath/commit/3fa5e8726d019f1e5ec0f7729a2976b8a49ec535