this is actually the same error as you mentioned above. did you reinstall by any chance? i haven’t updated pypi yet, so install from source.
you use backticks for code like `code`. you can use triple ticks for block code:
```
code
on
multiple
lines
```
Oh! I thought you meant that the text in the docs was just written wrong! I didn’t realize that I needed to reinstall.
Is that correct? How are current users who are using this library connecting?
1 Like
need to install from source (git) not from pip. see instructions here: Installation — PyLabRobot documentation
1 Like
Hey, I am back on site and trying this out again, and I realized that I am still getting the same error even after reinstalling from source using the instructions you provided. When I run
from pylabrobot.centrifuge import Access2, VSpin
I get the error " ModuleNotFoundError: No module named ‘pylabrobot.centrifuge’ "
Do you have any advice on how to load the correct library to connect to a centrifuge and loader?
Update: the issue is that because I installed the packages in the virtual environment, it seems that I need to reenter the virtual environment when starting a new session in order to call it. I’m now able to import the necessary modules, however when I try to initialize I get errors.
If I run
centrifuge.setup()
I get this error:
" <coroutine object Machine.setup at 0x75fc7e28> "
If I try to run
await asyncio.gather( centrifuge.setup(), loader.setup())
I get:
" SyntaxError: ‘await’ outside function "
Any advice on how to initalize and test the loading and unloading functions? Thanks!
await can only be used in side async functions. so if running a python script, you would need
async def main(): # make an async function
await centrifuge.setup() # call async function
import asyncio
asyncio.run(main()) # call the asyncio function using asyncio.run
i would recommend making a new jupyter notebook and running the code from there. in a jupyter notebook, you don’t need the asyncio.run, you can have await centrifuge.setup() in a single cell
2 Likes