"evalue": "VI_ERROR_RSRC_LOCKED (-1073807345): Specified type of lock cannot be obtained, or specified operation cannot be performed, because the resource is locked.",
"File \u001b[1;32m~\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\pyvisa\\ctwrapper\\highlevel.py:226\u001b[0m, in \u001b[0;36mIVIVisaLibrary._return_handler\u001b[1;34m(self, ret_value, func, arguments)\u001b[0m\n\u001b[0;32m 223\u001b[0m \u001b[38;5;66;03m# Set session back to a safe value\u001b[39;00m\n\u001b[0;32m 224\u001b[0m session \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m--> 226\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mhandle_return_value\u001b[49m\u001b[43m(\u001b[49m\u001b[43msession\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mret_value\u001b[49m\u001b[43m)\u001b[49m\n",
"\u001b[1;31mVisaIOError\u001b[0m: VI_ERROR_RSRC_LOCKED (-1073807345): Specified type of lock cannot be obtained, or specified operation cannot be performed, because the resource is locked."
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyvisa\resources\messagebased.py:157, in MessageBasedResource.write_raw(self, message)
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyvisa\highlevel.py:251, in VisaLibraryBase.handle_return_value(self, session, status_code)
248 self._last_status_in_session[session] = rv
250 if rv < 0:
--> 251 raise errors.VisaIOError(rv)
253 if rv in self.issue_warning_on:
254 if session and rv not in self._ignore_warning_in_session[session]:
VisaIOError: VI_ERROR_RSRC_LOCKED (-1073807345): Specified type of lock cannot be obtained, or specified operation cannot be performed, because the resource is locked.