-
Notifications
You must be signed in to change notification settings - Fork 95
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug reproduced in version: 1.6.0
Environment info:
Win 10
Python 3.7.1
pyodata-1.6.0
lxml-4.5.2
Steps to reproduce:
Simplest is to use the script to open local metadata file, e.g. https://github.com/SAP/python-pyodata/blob/master/docs/usage/initialization.rst#get-the-service-with-local-metadata
$metadata content to reproduce the bug
<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData" Version="1.0">
<edmx:DataServices m:DataServiceVersion="2.0">
<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="FAA_MD_MANAGE_SRV" xml:lang="en" sap:schema-version="1">
<EntityType Name="C_AssetTPType" sap:label="Asset" sap:content-version="1">
<Property Name="IN_AssetIsResearchAndDev" Type="Edm.String" sap:label="R & D Asset" sap:quickinfo="India: R & D Asset"/>
</EntityType>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
Stacktrace:
File "C:\Python37\lib\site-packages\pyodata\v2\model.py", line 2428
File "src\lxml\etree.pyx", line 3519, in lxml.etree.parse
File "src\lxml\parser.pxi", line 1856, in lxml.etree._parseDocument
File "src\lxml\parser.pxi", line 1876, in lxml.etree._parseMemoryDocument
File "src\lxml\parser.pxi", line 1764, in lxml.etree._parseDoc
File "src\lxml\parser.pxi", line 1127, in lxml.etree._BaseParser._parseDoc
File "src\lxml\parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc
File "src\lxml\parser.pxi", line 711, in lxml.etree._handleParseResult
File "src\lxml\parser.pxi", line 640, in lxml.etree._raiseParseError
File "<string>", line 5
lxml.etree.XMLSyntaxError: xmlParseEntityRef: no name, line 5, column 75
Additional Notes:
Metadata are parsed correctly when you delete the '&' characters
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working