title: When trying to read from Dymo USB scale, I get Error: hid.HIDException: unable to open device
body: <p>I am trying to use the <code>hid</code> package in Python to read from a Dymo USB scale. The code I am using comes from this <a href="https://gist.github.com/TheEnbyperor/94909bfe3e79696f16721b06566e4e10" rel="nofollow noreferrer">Gist</a> and it works on my Mac. However, when I run the code (which launches through a NodeJS process) on my Windows machine, I get this error:</p>
  <pre><code>    ChildProcess._handle.onexit @ node:internal/child_process:291
  C:\Users\cody\Documents\scalereader\dist\utils\dymo.utils.js:56 Error: hid.HIDException: unable to open device
      at PythonShell.parseError (C:\Users\cody\Documents\scalereader\node_modules\python-shell\index.js:295:21)
      at terminateIfNeeded (C:\Users\cody\Documents\scalereader\node_modules\python-shell\index.js:190:32)
      at ChildProcess.&lt;anonymous&gt; (C:\Users\cody\Documents\scalereader\node_modules\python-shell\index.js:182:13)
      at ChildProcess.emit (node:events:527:28)
      at ChildProcess._handle.onexit (node:internal/child_process:291:12)
      ----- Python Traceback -----
      File &quot;C:\Users\cody\Documents\scalereader\dist\utils\dymo.py&quot;, line 64, in &lt;module&gt;
        main()  # Uncomment to execute the python operation.
      File &quot;C:\Users\cody\Documents\scalereader\dist\utils\dymo.py&quot;, line 14, in main
        dev = hid.Device(vid=2338, pid=32771)
      File &quot;C:\Users\cody\AppData\Local\Programs\Python\Python310\lib\site-packages\hid\__init__.py&quot;, line 132, in __init__
        raise HIDException('unable to open device')
  (anonymous) @ C:\Users\cody\Documents\scalereader\dist\utils\dymo.utils.js:56
  (anonymous) @ index.ts:58
  terminateIfNeeded @ index.ts:58
  (anonymous) @ index.ts:58
  emit @ node:events:527
  ChildProcess._handle.onexit @ node:internal/child_process:291
  index.js:5 Uncaught (in promise) Error: hid.HIDException: unable to open device
      at PythonShell.parseError (C:\Users\cody\Documents\scalereader\node_modules\python-shell\index.js:295:21)
      at terminateIfNeeded (C:\Users\cody\Documents\scalereader\node_modules\python-shell\index.js:190:32)
      at ChildProcess.&lt;anonymous&gt; (C:\Users\cody\Documents\scalereader\node_modules\python-shell\index.js:182:13)
      at ChildProcess.emit (node:events:527:28)
      at ChildProcess._handle.onexit (node:internal/child_process:291:12)
      ----- Python Traceback -----
      File &quot;C:\Users\cody\Documents\scalereader\dist\utils\dymo.py&quot;, line 64, in &lt;module&gt;
        main()  # Uncomment to execute the python operation.
      File &quot;C:\Users\cody\Documents\scalereader\dist\utils\dymo.py&quot;, line 14, in main
        dev = hid.Device(vid=2338, pid=32771)
      File &quot;C:\Users\cody\AppData\Local\Programs\Python\Python310\lib\site-packages\hid\__init__.py&quot;, line 132, in __init__
        raise HIDException('unable to open device')
  parseError @ index.ts:58
  terminateIfNeeded @ index.ts:58
  (anonymous) @ index.ts:58
  emit @ node:events:527
  ChildProcess._handle.onexit @ node:internal/child_process:291
  Promise.then (async)
  step @ index.js:6
  (anonymous) @ index.js:7
  __awaiter @ index.js:3
  getDymoData @ index.ts:53
  (anonymous) @ index.ts:19
  </code></pre>
  <p>Anyone have any ideas on how to troubleshoot this?</p>