Unsuccessful executions

We will post here the most common reasons for unsuccessful executions and how to solve them

Hi @jmlaigle, I can execute daisi remotely when I make it public but not able to do so when daisi is set to private. I have also added "import os
os.environ[“ACCESS_TOKEN”] = ‘my PA token’ " inside the code before calling the daisi. Attaching the stacktrace below.

My test.py code
test_daisi_code

Hi @kambojgurpreet, welcome to the community !

Your code looks good, with the only caveat that the variable name should be DAISI_ACCESS_TOKEN.

The following should work well:

import os
os.environ["DAISI_ACCESS_TOKEN"]= <your token here>
import pydaisi as pyd
test_daisi = pyd.Daisi("kambojgurpreet/test_daisi")
result = test_daisi.hello(name = "Gagan 123").value

Alternatively you can pass access_token to the constructor:

myd = pyd.Daisi("me/daisiname", access_token="abcdef01234567890")

If you found mention of “ACCESS_TOKEN” in the docs, could you point me to the page please ? We will fix it immediately.

Hi @jmlaigle, it seems like the daisi-doc.readthedocs.io is referring to old version of the docs. I was referring the same at https://daisi-doc.readthedocs.io/en/latest/pydaisi/authentication.html#in-python. Raised a PR for edit in the same docs.

1 Like

Oh I see.
Actually we have just migrated the doc to https://doc.daisi.io and let the “readthedocs” site live during the transition. We are going to shut it down this week, so please use https://doc.daisi.io for now on.

Thank you very much for reporting this !

This isn’t working for me, can you please check this one

And I have checked the other way also with a other Daisi also, but this isn’t working.
error2

How do i add a git repo here?
Can someone guide me with this!

Hi @Vijay ! Welcome to the community !

I see that you are using Python 3.7. To use pydaisi you will need Python 3.8+.
I would recommend to recreate an environment with Python 3.9, it should solve at least your first issue.

As a side note : if you want to call a private Daisi created by someone else, this Daisi would have to be shared with you by the owner. To do so, the owner has to create a Team, add you in the Team and add this Daisi in this Team too. There is no limit on the Teams size and the number of Daisies shared inside a Team.

I hope it helps :slight_smile:

The default Python kernel in Colab is Python 3.7… If you want to use pydaisi in Google Colab, you will have to upgrade the Python version of the kernel to Python 3.8+ (3.9 recommended). This discussion on StackOverflow might be useful: https://stackoverflow.com/questions/60775160/install-python-3-8-kernel-in-google-colaboratory

Yes sir, now I have updated my python environment in my colab, but now it shows that the module pydaisi isn’t available even after me giving the command '‘pip install --upgrade pydaisi’


It might be possible that the new pip and conda path are not in your Jupiter environment ?
Can you try either !/root/anaconda3/bin/pip install -U pydaisi ?
Or alternatively os.environ['PATH'] = '/root/anaconda3/bin:' + os.environ['PATH'] and then pip install -U pydaisi