Skip to content

HttpError: Metadata request did not return XML (Again) #55

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

Closed
ghost opened this issue Aug 27, 2019 · 1 comment
Closed

HttpError: Metadata request did not return XML (Again) #55

ghost opened this issue Aug 27, 2019 · 1 comment
Labels
V4 OData V4

Comments

@ghost
Copy link

ghost commented Aug 27, 2019

Hi there! Running into an issue that you've encountered before but the fixes from #7 and #11 aren't working for me.

OS: Windows 10 Pro
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32

certifi 2018.10.15
chardet 3.0.4
enum34 1.1.6
idna 2.7
lxml 4.2.5
pip 19.2.3
pyodata 1.2.3
requests 2.19.1
setuptools 28.8.0
urllib 1.23

Steps to reproduce:
import pyodata
import requests

samples_url = "https://soil-chem.information.qld.gov.au/odata/Samples"

api = pyodata.Client(samples_url, requests.Session())

Expected results:
A new client object

Actual result:
File "", line 1, in
runfile('file path', wdir='C:/Users/Ryan Joshua LI/Desktop/DSM Datathon/Code')

File "file path\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 668, in runfile
execfile(filename, namespace)

File "file path\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "file path", line 8, in
api = pyodata.Client(results_url, requests.Session())

File "file path\Anaconda3\lib\site-packages\pyodata\client.py", line 43, in new
resp)

HttpError: Metadata request did not return XML, MIME type: text/html, body:
...... (adding anymore loses a lot of it)

Same error returned by the following URLs:
https://soil-chem.information.qld.gov.au/odata/SiteLabMethod
https://soil-chem.information.qld.gov.au/odata/SiteLabMethodResults

Any help would be very much appreciated! Thanks!

@filak-sap
Copy link
Contributor

Hi @Pyrowombat, thank you for taking the time to report this issue.

There are two problems:

  1. The URL should be an OData service root, in your case: https://soil-chem.information.qld.gov.au/odata/
  2. We support only OData V2 and your service is V4 - we are working on adding support for V4 (Add support for V4 #39)

By the way, you have created a perfect bug report. Really appreciated!

@filak-sap filak-sap added the V4 OData V4 label Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V4 OData V4
Projects
None yet
Development

No branches or pull requests

1 participant