Open ieCecchetti opened 1 year ago
yes, that should work similar to how the data viewer is opened for notebook variables. It sounds like there's some character in there that we don't handle, but I'm not seeing anything when taking a quick glance at the xml file.
I will give you more info to reproduce it. the xml is parsed with the use of these variables:
XPATH = "//gml:featureMember/*"
NAMESPACE = {
"ms": "http://mapserver.gis.umn.edu/mapserver",
"gml": "http://www.opengis.net/gml",
"wfs": "http://www.opengis.net/wfs",
"ogc": "http://www.opengis.net/ogc",
"xsi": "http://www.w3.org/2001/XMLSchema-instance"
}
and the istruction used is:
df = pd.read_xml(xml_content, namespaces=NAMESPACE , xpath=XPATH )
the variable xml content is given as:
xml = requests.get(my_url).content
if isinstance(xml, str):
xml_content = io.StringIO(xml)
elif isinstance(xml, bytes):
xml_content = io.BytesIO(xml)
else;
.... exeption
Applies To
What happened?
Im debugging my code on VSCode. I start my code with:
pytest -K 'TestClass' -v
and I have my breakpoints after the df acquisition. I can assure that the df is valid cause i can normally print it fully or a slice and obtaining this:I downloaded the datas from here
and parsed as
df = pd.read_xml(xml_content, namespaces=used_namespaces, xpath=xpath_filter)
When i try to use the function to show the df (View value in DataViewer) I encounter errors. I never lunched jupiter as notebook but im only using normal py code. So i dont have a .ipynb file I know that the extention should work too for visualize the data content. right? or am i wrong?
Someone knows whats happening?
VS Code Version
1.84.2
Jupyter Extension Version
v2023.10.1003070148
Jupyter logs
Coding Language and Runtime Version
No response
Language Extension Version (if applicable)
3.9
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
None