You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Ecospold2DataExtractor silently fails to parse multiline comment tags if they include empty tags.
Example source:
<?xml version="1.0" encoding="utf-8"?>
<ecoSpoldxmlns="http://www.EcoInvent.org/EcoSpold02">
<childActivityDataset>
<activityDescription>
<activityid="c40e3c0a-292f-45a5-88cd-ed18265cb7d7"activityNameId="06ffc039-f73b-440c-a5a0-8dc7393a5e71"parentActivityId="0fcbe58d-60b6-46d9-86bf-183d14732a4d"inheritanceDepth="-1"type="1"specialActivityType="0"energyValues="0">
<activityNamexml:lang="en">concrete block production</activityName>
<includedActivitiesStartxml:lang="en">Includes start stuff</includedActivitiesStart>
<includedActivitiesEndxml:lang="en">Includes end stuff</includedActivitiesEnd>
<generalComment>
<textxml:lang="en"index="0">Things and stuff and whatnot</text>
<textxml:lang="en"index="1">a Kikki comment</text>
<textxml:lang="en"index="2"></text>
</generalComment>
</activity>
</xml>
The previous xmls snippet should produce the following string (when using the Ecospold2DataExtractor.condense_multilne_comment() method on it):
"Things and stuff and whatnot\na Kikki comment\n\n"
but it yields an empty string, producing the following diff in the tests:
- 'comment': 'Things and stuff and whatnot\n'- 'Included activities end: Includes some stuff\n'+ 'comment': 'Included activities end: Includes some stuff\n'
Expected
The condense_multiline_comment method of the Ecospold2DataExtractor class should should process correctly "comment" sections in ecospold2 xml files, either by omitting empty "text" tags, or by adding a line break for such.
The text was updated successfully, but these errors were encountered:
tngTUDOR
added a commit
to tngTUDOR/brightway2-io
that referenced
this issue
Dec 19, 2024
Current
The
Ecospold2DataExtractor
silently fails to parse multiline comment tags if they include empty tags.Example source:
The previous xmls snippet should produce the following string (when using the
Ecospold2DataExtractor.condense_multilne_comment()
method on it):"Things and stuff and whatnot\na Kikki comment\n\n"
but it yields an empty string, producing the following diff in the tests:
Expected
The
condense_multiline_comment
method of theEcospold2DataExtractor class should
should process correctly "comment" sections in ecospold2 xml files, either by omitting empty "text" tags, or by adding a line break for such.The text was updated successfully, but these errors were encountered: