Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Getting ValueError when trying to parse a file path with env var inside <spirit> tags #26

Open
@tpoikela

Description

@tpoikela

I ran into an issue like this:

Traceback (most recent call last):  File "uvmf/my_script.py", line 15, in <module>    ipxact_reader = IpxactReader(ipxact_file)  File "/userwork11/tpoikela/git/uvmf/uvmf_tb_gen/uvmf_tb_gen.py", line 107, in __init__    ipxact_comp.load(f)  File "/userwork11/tpoikela/git/uvmf/.venv/lib/python3.8/site-packages/ipyxact/ipyxact.py", line 108, in load    self.parse_tree(root, self.nsmap[self.nsversion])  File "/userwork11/tpoikela/git/uvmf/.venv/lib/python3.8/site-packages/ipyxact/ipyxact.py", line 144, in parse_tree    t.parse_tree(f, ns)  File "/userwork11/tpoikela/git/uvmf/.venv/lib/python3.8/site-packages/ipyxact/ipyxact.py", line 135, in parse_tree    t.parse_tree(f, ns)  File "/userwork11/tpoikela/git/uvmf/.venv/lib/python3.8/site-packages/ipyxact/ipyxact.py", line 123, in parse_tree    setattr(self, _name, eval(_type)(tmp.text))  File "/userwork11/tpoikela/git/uvmf/.venv/lib/python3.8/site-packages/ipyxact/ipyxact.py", line 62, in __new__    return int(expr.replace('_', ''), base)ValueError: invalid literal for int() with base 10: '${MODULESPATH}/module/doc/moduleprogmodel.xlsx'

In the IP-XACT file, I see that it has specified some filepaths like this:

<spirit:parameter>            <spirit:name>imported_from</spirit:name>            <spirit:value>${MODULES_PATH}/module/doc/module_prog_model.xlsx</spirit:value></spirit:parameter>

Expected result: The parser does not throw ValueError, and parses the structure and filepath with env var correctly. No env var expansion/substitution is expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp