-
Notifications
You must be signed in to change notification settings - Fork 1
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
Using the opentrons without the app #201
Comments
It should run a relatively complicated pipelined protocol that uses the pipettor a lot. If you leave off the Basically,
This is run as a pipeline, with up to eleven drops in progress at any time, each starting with a different random combination of fragments. What happens when you run it? To run a simpler script, the easiest thing is to create your own The class TestTransfer(Task):
def __init__(self) -> None:
super().__init__(name="test-transfer", description="Simple pipettor transfer test")
def run(self, board: Board, system: System, args: Namespace) -> None:
r = Reagent.find("R")
in_ep = board.extraction_points[0]
out_ep = board.extraction_points[1]
path = Path.teleport_into(in_ep, reagent=reagent).to_pad(out_ep.pad).teleport_out()
path.schedule() Then in your script (see exerciser = PlatormChoiceExerciser.for_task(TestTransfer,
platforms=(joey.PlatformTask,),
pipettors=(opentrons.PipettorConfig,))
exerciser.parse_args_and_run() If you just run this, you'll get it simulated on the display. If you run it with Finally, you need to create a {
"reagents": [
{
"name": "R",
"wells": [
{ "plate": 0, "well": "A1", "quantity": 200, "use": "input" }
]
}
]
} Migrated from internal repository. Originally created by @EvanKirshenbaum on Sep 15, 2022 at 11:21 AM PDT. |
The pipettor is just moving back and forth a little over the trash can (doesn't actually leave it's location). The console says this:
I did adjust the I'm assuming it's hanging bc of this:
Trying to figure out why this pipettor is not responding Migrated from internal repository. Originally created by Mark Huber on Sep 15, 2022 at 3:13 PM PDT. |
I'd actually be surprised if the OT2 protocol didn't die if you didn't specify both pipettors, as it was written with the assumption that they would both be there. I can probably change things pretty easily to work with only the small pipettor. (If you only have the large one, you won't be able to dispense a small enough volume, but with only the small one, it'll just make more trips.) Let me see what I can do. Migrated from internal repository. Originally created by @EvanKirshenbaum on Sep 15, 2022 at 3:38 PM PDT. |
Just out of curiosity, since when I started my Opentrons app it asked whether I wanted to update from 5.0.2 to 6.0.1, what version are you running? If you're on 6, it's possible (likely) that the HTTP protocol changed again, and I'll have to figure out how to talk to it again. Migrated from internal repository. Originally created by @EvanKirshenbaum on Sep 15, 2022 at 4:23 PM PDT. |
We are on 6.0.1, I will test tomorrow. I think it should work since it's having a connection Migrated from internal repository. Originally created by Mark Huber on Sep 15, 2022 at 7:35 PM PDT. |
I updated my branch to the latest: I did modify
and i'm still having the same issue and same log message, no errors thrown. The pipettor is moving though. This should mean that the http connection works right? Migrated from internal repository. Originally created by Mark Huber on Sep 16, 2022 at 10:50 AM PDT. |
I think i was wrong, seems like they did change the HTTP endpoints between the versions, I'm checking out the docs here:
Migrated from internal repository. Originally created by Mark Huber on Sep 16, 2022 at 11:07 AM PDT. |
I downgraded the Opentrons version to 5.0.2 but I'm still having the same issue. wondering if I'm doing something wrong on my end. The pipettes look like this: and should match the setup in the json above. Migrated from internal repository. Originally created by Mark Huber on Sep 16, 2022 at 11:35 AM PDT. |
Weird. Same trace? In particular, it gets a result from creating the session and gets to the "not idle" message (which indicates that there's work to do) and nothing further? We may have to do this the hard way, with a debugging session over Zoom, since I can't connect to your robot from here. Migrated from internal repository. Originally created by @EvanKirshenbaum on Sep 17, 2022 at 4:16 PM PDT. |
Just out of curiosity, can you check your firewall logs to see if you've been blocking connection requests on port 8087? That would do it. If you need to pick a different port, we can easily make that a command-line parameter. (I'm not sure why it isn't already.) But we do need the robot to be able to open up an HTTP connection to your computer. Migrated from internal repository. Originally created by @EvanKirshenbaum on Sep 17, 2022 at 4:22 PM PDT. |
same trace:
I don't seem to have this folder: I tried to turn my firewall off but it's managed by McAffee and needs a special password to turn it off. I tried to turn off the windows firewall here: but it just turns itself back on again. I checked the event logs in McAffee but there's only adobe events that got blocked. Migrated from internal repository. Originally created by Mark Huber on Sep 19, 2022 at 11:47 AM PDT. |
I opened port 8087 but still the same issue Migrated from internal repository. Originally created by Mark Huber on Sep 19, 2022 at 12:43 PM PDT. |
I tried connecting to the robot with curl and my own python script, following the tutorial here but with curl and python and on both versions (5.0.2 and 6.0.1) I get the following error:
I downloaded the logs from the robot but it only said it's a 422 http error:
Migrated from internal repository. Originally created by Mark Huber on Sep 19, 2022 at 2:27 PM PDT. |
Ah ok, this method only works with versions 4.7 and lower. @EvanKirshenbaum what version are you currently running? https://support.opentrons.com/s/article/Downgrade-to-an-older-software-version Migrated from internal repository. Originally created by Mark Huber on Sep 20, 2022 at 9:44 AM PDT. |
I'm on 5.0.2. Getting it to work with version 5 was an effort in and of itself (#82). Looking at the log history, though, I'm not actually sure what made it start working. The last commit message was
but it definitely works for me now. Migrated from internal repository. Originally created by @EvanKirshenbaum on Sep 20, 2022 at 10:28 AM PDT. |
Look at If you're getting the Migrated from internal repository. Originally created by @EvanKirshenbaum on Sep 20, 2022 at 10:47 AM PDT. |
made some progress, followed this tutorial to install requests on the opentrons. It now turns on the light and throws an error. Migrated from internal repository. Originally created by Mark Huber on Sep 21, 2022 at 12:00 PM PDT. |
The error message seem to have gone away with restarting my computer (was an error message in regards to port 8087. json seems to be installed on the opentrons:
Migrated from internal repository. Originally created by Mark Huber on Sep 21, 2022 at 12:22 PM PDT. |
getting the same behavior though, except light is turning on now, so i'm assuming we got further:
Earlier I saw an error message in the terminal: Traceback (most recent call last): During handling of the above exception, another exception occurred:
downloaded the log run:
seems like it cannot read Will downgrade the opentrons version to version 5 and see if it works with that Migrated from internal repository. Originally created by Mark Huber on Sep 21, 2022 at 12:31 PM PDT. |
Downgrading to 5.0.2 got us somewhere but there is still an error thrown in the protocols tab:
seems like this is an issue with my pc mentioned here [comment by @EvanKirshenbaum on Sep 17, 2022 at 4:22 PM PDT] Migrated from internal repository. Originally created by Mark Huber on Sep 21, 2022 at 12:59 PM PDT. |
yah, seems to be my computer that is the problem, I changed the port to 9090 and still had the same error:
will check with IT on how to whitelist a port Migrated from internal repository. Originally created by Mark Huber on Sep 21, 2022 at 1:04 PM PDT. |
Yeah, the first thing that should happen is that the light turns on. Then it creates a self.message(f"Creating the robot. Callback endpoint is {self.endpoint}") which makes an HTTP call back to print the message. This is presumably what's failing. What appears to be happening is that the response is (or contains, it's hard to tell) HTML rather than the JSON it expects, and the JSON decoder is unable to cope with it. But what printed out is a
This lends credence to the notion that (1) version 6 changed the payloads of the messages and (2) there's something on the network actively preventing the connection. Migrated from internal repository. Originally created by @EvanKirshenbaum on Sep 21, 2022 at 1:30 PM PDT. |
out of curiosity, how does your setup look like? Do you also have McAffee and all this big brother software on your machine? Do you also have windows 10? Wondering why this is blocking. The opentrons is not on the hp inc network but our own wifi (still at hp). So it should not have proxy issues. Migrated from internal repository. Originally created by Mark Huber on Sep 21, 2022 at 7:01 PM PDT. |
I've got Norton 360 on my machine, and I don't recall having to have added any special rules. You might try using a port in the ephemeral range: 49,152-65,535 (C000 - FFFF). You might also want to try to connect to your machine on port 8087 (from another computer) while the protocol's running. The Migrated from internal repository. Originally created by @EvanKirshenbaum on Sep 21, 2022 at 10:07 PM PDT. |
got a second machine (ubuntu only) and typed in the ip address of my laptop:
so that means it's not a firewall issue. Migrated from internal repository. Originally created by Mark Huber on Sep 23, 2022 at 12:07 PM PDT. |
I asked IT, he said there is no proxy on the wifi (the opentrons is not on the company wifi). I also tried running the script from my ubuntu machine but had the same result. There was an error message related to the ui but i got the same logging infos in the console:
it did not print out these messages:
but did turn on the light, will try to copy over the exact error message later. When I checked in the opentrons app, it also had the same timeout error as on the windows machine. Migrated from internal repository. Originally created by Mark Huber on Sep 23, 2022 at 12:22 PM PDT. |
here's the error from my ubuntu machine, doesn't look like it has anything to do with our issue of the opentrons making a request back to the laptop though:
Migrated from internal repository. Originally created by Mark Huber on Sep 23, 2022 at 5:16 PM PDT. |
I could ssh into the opentrons and try to ping my laptop and see if i get a response Migrated from internal repository. Originally created by Mark Huber on Sep 23, 2022 at 5:16 PM PDT. |
after a couple of reboots I was able to get it to work again. I tried printing log messages after the "Creating the robot..." but it wouldn't print. So I commented that line out and instead added other log messages: so it seems like the first log message: "robot init" gets printed out twice because I'm assuming Now I'm getting a bunch of log messages this seems to fail Migrated from internal repository. Originally created by Mark Huber on Oct 03, 2022 at 6:29 PM PDT. |
Tried adding a bunch of log messages and exceptions according to the docs but now it seems to be stuck in this post request exception, it just sits in the exception and doesn't time out. Will try more things on a different day. Migrated from internal repository. Originally created by Mark Huber on Oct 03, 2022 at 7:19 PM PDT. |
I think the ip address is wrong? It seems to post the call to @EvanKirshenbaum I'm not sure I understand where the ip is coming from. It seems to come from Migrated from internal repository. Originally created by Mark Huber on Oct 07, 2022 at 10:55 AM PDT. |
Okay, I can answer the last question easily, if not satisfactorily. There's a reason the code in that file keeps checking for the presence of a variable named With Opentrons version 5, that was no longer possible, so the protocol that's actually uploaded is (more-or-less) a concatenation of the three Python files, an assignment of what would have been loaded from Now you understand why I called the flag variable a kludge. Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 11:07 AM PDT. |
lmao, that is the reason, I hardcoded it as my ip address and now it's doing something Migrated from internal repository. Originally created by Mark Huber on Oct 07, 2022 at 11:08 AM PDT. |
so whatever happens, it uses the wrong ip address, it's working now Migrated from internal repository. Originally created by Mark Huber on Oct 07, 2022 at 11:10 AM PDT. |
How long does the looping protocol run ? Migrated from internal repository. Originally created by Mark Huber on Oct 07, 2022 at 11:10 AM PDT. |
The callback endpoint can be specified explicitly in if not "endpoint" in config:
host_name = socket.gethostname()
ip = socket.gethostbyname(host_name)
config["endpoint"] = {
"ip": ip,
"port": listener_port
} Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 11:12 AM PDT. |
It runs until the local protocol tells it it's done. In the case of What arguments are you using? Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 11:15 AM PDT. |
And do I understand by your comment that the robot is actually moving now? Congratulations! Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 11:15 AM PDT. |
Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 11:19 AM PDT. |
And just to be clear, there isn't an Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 11:21 AM PDT. |
using the following arguments:
yup, it's working 🙌 🙌 🙌
the following ip came over: 192.169.223.1, the screenshot of the logs in the protocol shows it here [comment by Mark Huber on Oct 03, 2022 at 5:18 PM PDT] Migrated from internal repository. Originally created by Mark Huber on Oct 07, 2022 at 11:27 AM PDT. |
Looking at the code (
Wonderful. Now, let's get it working without the hard-coding.
That's weird. You're not on multiple networks simultaneously, are you? What happens if you just run host_name = socket.gethostname()
ip = socket.gethostbyname(host_name)
print(f"host: {host_name}, IP: {ip}") on your laptop? Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 11:34 AM PDT. |
Out of curiosity, what do you get for the connected ethernet connections if you run Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 11:43 AM PDT. |
I shouldn't, the HP Inc. network was down till yesterday and the ubuntu machine i have never connected to any other network than the IonTouch network (our private wifi to which the opentrons is connected to)
hmm, that's weird, I don't have my virtual machine running, why would python take that ip address? I thought the virtual machine is disconnected from the regular OS Migrated from internal repository. Originally created by Mark Huber on Oct 07, 2022 at 11:46 AM PDT. |
even more confusing why my ubuntu machine seem to have behaved in a similar way, let me check what my ubuntu machine says Migrated from internal repository. Originally created by Mark Huber on Oct 07, 2022 at 11:49 AM PDT. |
Oh, that's interesting! I'm not sure quite what to do in that situation. I guess I can add a command-line argument to allow you to specify your local IP address for situations like this. I'll have to poke around to see if I can detect the situation and give a warning. Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 11:49 AM PDT. |
It looks as though it should be pretty straightforward to at least warn that this is going to be a problem. I've opened up a new issue for it (#209). Just to see what it looks like in your situation, can you run import socket
info = socket.getaddrinfo(socket.gethostname(), None)
for i in info:
print(i) on your laptop? Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 12:15 PM PDT. |
Migrated from internal repository. Originally created by Mark Huber on Oct 07, 2022 at 12:18 PM PDT. |
Well, that's a pain. I was hoping that there would be something I could use to distinguish them. Out of curiosity, when you run Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 1:58 PM PDT. |
Migrated from internal repository. Originally created by Mark Huber on Oct 07, 2022 at 2:42 PM PDT. |
I'm working on this, but I'm seeing that the protocol doesn't seem to shut down properly. (When run with n=1, it freezes on the ready call after finishing everything and emptying the waste well, while with n=2, it freezes just before removing the second product). I'm going to reopen #82 and see if I can figure out what's going on. Are you seeing the same behavior with your robot? Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 07, 2022 at 3:29 PM PDT. |
yes, i did saw something freezing but then Napoleon took over so I can't check anymore :D Migrated from internal repository. Originally created by Mark Huber on Oct 07, 2022 at 3:32 PM PDT. |
As of commit e64c066, there's now an Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 10, 2022 at 4:19 PM PDT. |
Okay, I think I've got the multiple-IP-address problem (#209) handled. You can now provide the following command-line arguments:
If you don't provide these arguments and the machine has multiple local address, the first one will still be used, but a warning will be logged listing the available options. For your case, you would want to run either with I've committed this and merged it into the master branch, but I haven't actually gotten a chance to try it out on a machine with multiple IP addresses (since I don't have one), so I'd appreciate it, Mark Huber, if you could try it out (without args to check the warning, and with Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 10, 2022 at 4:43 PM PDT. |
Note that this issue is still open and I'm working on it in #82 (comment [comment by @EvanKirshenbaum on Oct 07, 2022 at 3:30 PM PDT]). Migrated from internal repository. Originally created by @EvanKirshenbaum on Oct 10, 2022 at 4:47 PM PDT. |
To run the opentrons with our own scripts:
@EvanKirshenbaum:
Migrated from internal repository. Originally created by Mark Huber on Sep 14, 2022 at 4:25 PM PDT.
The text was updated successfully, but these errors were encountered: