-
Notifications
You must be signed in to change notification settings - Fork 9
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
TypeError with board["id"] prevents importing #26
Comments
This is very strange as it seems like the API responded with an array instead of an object. I suppose that there is an issue with the Nextcloud instance. The version of deck should not be the problem as I added a compatibility check some time ago. The JSON in your Downloads folder is not the problem. Can you edit the file |
This seems to return the list of boards I already have on that cloud instance:
|
Ok that indicates that trello-to-deck somehow sends a GET instead of a POST. I'll see whether I can find a reason 'Feedback Leo' already existed on the server, right? |
Can you execute this curl command? It creates a board called xyz. That works for me. curl -X POST $base_url/index.php/apps/deck/api/v1.0/boards --header "Content-Type: application/json" --data '{"title":"xyz","color":""}' --header "OCS-APIRequest: true" -u $user:$token_password I suppose that your nextcloud server is returning a redirect http code here. |
returns the following:
|
and it did create the board |
And you executed the curl command as-is, right without |
yes, just prepended it with the variable assignments, i.e. I've also asked our IT to give me some details on versions of both nextcloud and decks installation, but have to wait till I hear back. |
Which python-requests version are you using? |
2.25.1 just a quick follow-up on the |
Oke, next steps would be to create a minimal example in python. I'll do this in the next days. |
Probably the issue is not the python code but the server: https://stackoverflow.com/questions/26149181/python-requests-post-doing-a-get Can you send me the url of the server via mail? [email protected] Did you maybe use http:// instead of https://? |
I was indeed using http:// :( Replacing the calls with https allowed me to import my jsons. Thanks for hunting this down and sorry it turned out to be such a simple mistake on my part.. Issue can be closed, unless you want me to still send you stuff/test things. And thanks for the amazing tool and your support! |
Good to hear! I almost went crazy while looking at the 2 lines of code which do weird stuff! :) I will leave this open, as it still is bad behavior. I probably will prohibit redirects and simply abort the import with a proper error message. Therefore, I'll leave this open :) |
Import fails with the following traceback message:
To Reproduce
Steps to reproduce the behavior:
up till now, no obvious issues (a deprecation warning during the install mentions a change in pip 21.3 functionality, but it works as intended, as far as I can tell)..
and then the import:
before the trace-back, I get some "stats" on the json:
Operating system:
Ubuntu 20.04.2 LTS
with python 3.8.5
Nextcloud version:
It's my uni's cloud instance, so cannot say much about it. But also doesn't seem relevant.
If useful for debugging, could post the json.
The text was updated successfully, but these errors were encountered: