-
Notifications
You must be signed in to change notification settings - Fork 38
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
Problem when importing CasdoorSDK or AsyncCasdoorSDK #67
Comments
@uestc-wxy |
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 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 |
Fixed by: #68 |
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 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! |
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. |
Yes,you can open a new issue. |
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! |
@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. 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: casdoor-python-sdk/src/tests/test_oauth.py Lines 23 to 50 in a2ec1f5
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.
The text was updated successfully, but these errors were encountered: