-
Notifications
You must be signed in to change notification settings - Fork 95
Authorization header not found #156
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
Comments
Hi @julzpalomiano - from the code it is not possible to know what happened. Try the script with the pyodata logging enabled. You can even "go deeper", by enabling logging for the actual http traffic...
Hope that helps and the problem is apparent. If not, please post the logging information, so far this issue is neither reproducible nor actionable. |
Hello @phanak-sap, I have added your code at the top. My code:
the result:
any help will be appreciated. Thanks |
Hi @julzpalomiano - this is still not enough to determine if it is problem from networking or metadata parsing. You provided the stack trace - that one part of the puzzle - but in the console log you should have logs of actual response returned from the server. Please check that the response is valid XML document from the $metadata. A) If not - its hard to investigate not on your computer...You can paste the entire console log with the http request/response logging enabled.. lets see what you see. B} If yes , then it is not invalid response or networking problem, but trueproblem with parsing of the XML with metadata. We need the $metadata XML from your service? Either you posted the entire console log - so we know the response now, or you can create your own Gist, or you can create PR to the following repository for this particular purpose - https://github.com/phanak-sap/pyodata-issue-files. |
Hi @phanak-sap , Thank you for your response. attached the whole console log response. Please let me know if this is enough. Thank you. |
Hi @julzpalomiano - ok, it is valid XML response. Could you anyway pls create PR to the https://github.com/phanak-sap/pyodata-issue-files with the XML of the $metadata (you can use the URL https://192.168.xx.xx:50000/b1s/v1$metadata in the browser to see the XML file). Saves the time with the re-formatting/trimming from console output |
Hi @phanak-sap, I have created a PR already. Thank you for your quick response. |
OK thanks, I didn't read properly the console log but it seems I have found the problem. Your $metadata file declares` <edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0"> which is Odata Version 3. Pyodata so far supports only Odata v2 - support for v4 (together with v3) is pending; watch #39 If you are not forced to use python, I can recommend our "sibling" library from nodejs world, https://github.com/SAP/odata-library, which does support odata v1-4. |
Hi @phanak-sap , Ok, I understand. I started my project already. right now I am using the http request like.
Thank you for your time looking into my issue :) |
OK, I am closing the issue as essentially dupe of #39 |
Hello, I was trying to login on SAP B1 but I'm always getting an error 'Authorization header not found'. Here is my code
The text was updated successfully, but these errors were encountered: