Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Cannot use Jupyter Notebook to communicate with the device on v8.0.0 #16375

Open
smeng9 opened this issue Sep 27, 2024 · 0 comments
Open
Labels

Comments

@smeng9
Copy link

smeng9 commented Sep 27, 2024

Overview

Our lab need access to the opentrons' Jupyter notebook server to run some automated protocol.

However we cannot connect to the device because it is always busy. Additionally a few files like /data/robot_settings.json are missing.

Steps to reproduce

We followed the steps on https://docs.opentrons.com/v2/new_advanced_running.html?highlight=jupyter#protocol-structure to create a new cell with the following content

import opentrons.execute
protocol = opentrons.execute.get_protocol_api("2.20")
protocol.home()

However it did not run and throws the following error below.

Current behavior

/data/robot_settings.json not found. Loading defaults
Exception in Thread Manager build
Traceback (most recent call last):
File "/opt/opentrons-robot-server/opentrons/hardware_control/thread_manager.py", line 314, in _build_and_start_loop
managed_obj = loop.run_until_complete(builder(*args, loop=loop, **kwargs))
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/opt/opentrons-robot-server/opentrons/hardware_control/ot3api.py", line 382, in build_hardware_controller
backend = await OT3Controller.build(
File "/opt/opentrons-robot-server/opentrons/hardware_control/backends/ot3controller.py", line 294, in build
inst = cls(
File "/opt/opentrons-robot-server/opentrons/hardware_control/backends/ot3controller.py", line 323, in init
self._drivers = self._build_system_hardware(
File "/opt/opentrons-robot-server/opentrons/hardware_control/backends/ot3controller.py", line 448, in _build_system_hardware
gpio = OT3GPIO("hardware_control")
File "/opt/opentrons-robot-server/opentrons_hardware/drivers/gpio/init.py", line 50, in init
self._estop_out_line.request(
OSError: [Errno 16] Device or resource busy
from_conf None default {<InstrumentProbeType.PRIMARY: 1>: '/data/pressure_sensor_data.csv'}


ThreadManagerException Traceback (most recent call last)
Input In [3], in <cell line: 2>()
1 import opentrons.execute
----> 2 protocol = opentrons.execute.get_protocol_api("2.19")

File /opt/opentrons-robot-server/opentrons/execute.py:180, in get_protocol_api(version, bundled_labware, bundled_data, extra_labware)
177 robot_type = _get_robot_type()
178 deck_type = guess_deck_type_from_global_config()
--> 180 hardware_controller = _get_global_hardware_controller(robot_type)
182 if checked_version < ENGINE_CORE_API_VERSION:
183 context = _create_live_context_non_pe(
184 api_version=checked_version,
185 deck_type=deck_type,
(...)
189 extra_labware=extra_labware,
190 )

File /opt/opentrons-robot-server/opentrons/execute.py:708, in _get_global_hardware_controller(robot_type)
704 if robot_type == "OT-3 Standard":
705 # Conditional import because this isn't installed on OT-2s.
706 from opentrons.hardware_control.ot3api import OT3API
--> 708 _THREAD_MANAGED_HW = ThreadManager(
709 OT3API.build_hardware_controller,
710 feature_flags=HardwareFeatureFlags.build_from_ff(),
711 )
712 else:
713 _THREAD_MANAGED_HW = ThreadManager(
714 OT2API.build_hardware_controller,
715 feature_flags=HardwareFeatureFlags.build_from_ff(),
716 )

File /opt/opentrons-robot-server/opentrons/hardware_control/thread_manager.py:289, in ThreadManager.init(self, builder, *args, **kwargs)
287 thread.start()
288 if blocking:
--> 289 object.getattribute(self, "managed_thread_ready_blocking")()

File /opt/opentrons-robot-server/opentrons/hardware_control/thread_manager.py:294, in ThreadManager.managed_thread_ready_blocking(self)
292 object.getattribute(self, "_is_running").wait()
293 if not object.getattribute(self, "managed_obj"):
--> 294 raise ThreadManagerException("Failed to create Managed Object")

ThreadManagerException: Failed to create Managed Object

Expected behavior

Device should get the protocol API without a problem

Operating system

Mac

System and robot setup or anything else?

8.0.0
Wi-Fi
Opentrons Flex

@smeng9 smeng9 added the bug label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant