Closed ahmad-alkadri closed 10 months ago
@seriouszyx @ComradeProgrammer @Resulte
@uestc-wxy
The problem will be solved soon.Wait for a minute.
The problem will be solved soon.Wait for a minute.
Thank you @uestc-wxy I appreciate it.
EDIT I don't know if this could help you guys or not, and I'm not 100% sure if this is preferred by you, but to be transparent fully here: I finally managed to make it working by changing all instances of from src.casdoor
to from .main
.
Details in this commit: https://github.com/ahmad-alkadri/casdoor-python-sdk/commit/dec84d40ff8611ae3c1f5fac59ecbe7577b78284
Hope this helps.
The problem will be solved soon.Wait for a minute.
Thank you @uestc-wxy I appreciate it.
EDIT I don't know if this could help you guys or not, and I'm not 100% sure if this is preferred by you, but to be transparent fully here: I finally managed to make it working by changing all instances of
from src.casdoor
tofrom .main
.Details in this commit: ahmad-alkadri@dec84d4
Hope this helps.
yes,I had made one PR. I fixed it the same way you did.I'm sorry to trouble you
casdoor1.16.2 has released. You can use it by pip.
Tried and tested it; I can confirm it works well for my app.
There's still some problem of the unit tests not working (the ones in the src > tests
folder) but I think that's a topic for a different day.
If you guys allow it I can try contribute on it later.
Again, thanks a lot for the very quick response. Really awesome.
@ahmad-alkadri contribution is welcome, thanks!
Tried and tested it; I can confirm it works well for my app.
There's still some problem of the unit tests not working (the ones in the
src > tests
folder) but I think that's a topic for a different day.If you guys allow it I can try contribute on it later.
Again, thanks a lot for the very quick response. Really awesome.
In that case, I'd appreciate it. The code for the unit test was written by someone else, and I ran it unsuccessfully, too.If you are committed to solving this problem, thank you again.
Tried and tested it; I can confirm it works well for my app. There's still some problem of the unit tests not working (the ones in the
src > tests
folder) but I think that's a topic for a different day. If you guys allow it I can try contribute on it later. Again, thanks a lot for the very quick response. Really awesome.In that case, I'd appreciate it. The code for the unit test was written by someone else, and I ran it unsuccessfully, too.If you are committed to solving this problem, thank you again.
@uestc-wxy Did you run it unsuccessfully using both the previous and this fixed version of the module too? I tried running both and both returned a lot of errors.
Also if you prefer I'll open a new issue later so we can discuss this.
can try contribute on it
Yes,you can open a new issue.
Tried and tested it; I can confirm it works well for my app. There's still some problem of the unit tests not working (the ones in the
src > tests
folder) but I think that's a topic for a different day. If you guys allow it I can try contribute on it later. Again, thanks a lot for the very quick response. Really awesome.In that case, I'd appreciate it. The code for the unit test was written by someone else, and I ran it unsuccessfully, too.If you are committed to solving this problem, thank you again.
@uestc-wxy Did you run it unsuccessfully using both the previous and this fixed version of the module too? I tried running both and both returned a lot of errors.
Also if you prefer I'll open a new issue later so we can discuss this.
I had made one PR. It fixed the bug that related functions could not be found after the project structure was reorganized.But the code of unit test was written by someone else. Last time I test it,too many errors were found and I had no ideas about how to solve them.If you could try contribute on it ,I can't thank you enough. My running results are as follows:
At a glance, it seems that the target casdoor url doesn't work, and thus no return to our requests were made.
I think it means we should have a self-hosted casdoor up and running for the purpose of the tests.
Let's work on it; I'll start making some commits and open a draft PR so we can go through it bit by bit.
At a glance, it seems that the target casdoor url doesn't work, and thus no return to our requests were made.
I think it means we should have a self-hosted casdoor up and running for the purpose of the tests.
Let's work on it; I'll start making some commits and open a draft PR so we can go through it bit by bit.
I'm glad to go through it with you! Last time I laso changed the target casdoor url, such as http://localhost:8000.The test failed ,too.But it ran faster.Maybe there were some errors in the functions. My running results are as follows:
@ahmad-alkadri @uestc-wxy you don't need to start a Casdoor server, you can use our demo site in CI: https://github.com/casdoor/casdoor#online-demo
If you only do GET operations, use door.casdoor.com
If you also need to Update/Add/Delete, use demo.casdoor.com
@ahmad-alkadri @uestc-wxy you don't need to start a Casdoor server, you can use our demo site in CI: https://github.com/casdoor/casdoor#online-demo
If you only do GET operations, use door.casdoor.com
If you also need to Update/Add/Delete, use demo.casdoor.com
Thanks @hsluoyz. I'm aware of casdoor's public APIs and I've tested them. The thing is that for some tests, using the public APIs (door.casdoor.com) work well.
On the other hand, most (I haven't tested all) methods related to getting the oauth token doesn't work.
It doesn't surprise me, for it seems that we'd need the code, username, password, clientid, and all other things related to the casdoor instance, and the way to get them is by replacing the values in the current test file with the ones from our own instance:
Unless casdoor's public APIs have those values that are available for public testing? In that case, could you share them please? Thank you in advance.
@ahmad-alkadri use real information in demo site, like: https://github.com/casdoor/casdoor-python-vue-sdk-example#configuration , just using this config would be OK
Use admin/123 as username/password
client_secret and certificate content on the demo site are also public to use
Thanks @hsluoyz. I'll definitely test it out and will keep you guys updated.
Parameters
pip install casdoor
venv
Issue
Cannot import neither
CasdoorSDK
norAsyncCasdoorSDK
. Followed the guide in README.md, tried both:and
And they either return:
for the
CasdoorSDK
or:for the
AsyncCasdoorSDK
.At a first glance it seems to me there's some error in the paths of the modules within.
Any help would be appreciated.