Skip to content

Windows paths failure in 1.12.3 and later #90

@kmitcham

Description

@kmitcham

When attempting to get/use pom files on windows, file not found errors result.
This happened with python 3.10, 3.11, 3.12, and 3.13, all running on Microsoft Windows Server 2025 10.0.26100

I thought it was a path escaping problem, but looking at the version diff I suspect it might be a file location problem?

C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\scyjava\_jvm.py:202: in start_jvm
    env = jgo.build(
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\jgo\__init__.py:281: in build
    return builder.from_endpoint(endpoint=endpoint, update=update)
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\jgo\env\_builder.py:276: in from_endpoint
    locked_deps, min_java_version = self._build_environment(
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\jgo\env\_builder.py:764: in _build_environment
    resolved_inputs, resolved_transitive = dependencies[0].context.resolver.resolve(
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\jgo\maven\_resolver.py:328: in resolve
    model = Model(
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\jgo\maven\_model.py:135: in __init__
    self._import_boms(self.dep_mgmt.copy())
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\jgo\maven\_model.py:440: in _import_boms
    bom_model = Model(
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\jgo\maven\_model.py:83: in __init__
    parent = self.context.pom_parent(pom)
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\jgo\maven\_core.py:233: in pom_parent
    parent_pom = POM(parent_path)
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\jgo\maven\_pom.py:84: in __init__
    else ElementTree.parse(source)
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\xml\etree\ElementTree.py:1222: in parse
    tree.parse(source, parser)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <xml.etree.ElementTree.ElementTree object at 0x0000029A216B7D90>
source = WindowsPath('C:/ProgramData/m2/ome/formats-gpl/8.0.1/formats-gpl-8.0.1.pom/../..')
parser = None

    def parse(self, source, parser=None):
        """Load external XML document into element tree.
    
        *source* is a file name or file object, *parser* is an optional parser
        instance that defaults to XMLParser.
    
        ParseError is raised if the parser fails to parse the document.
    
        Returns the root element of the given source document.
    
        """
        close_source = False
        if not hasattr(source, "read"):
>           source = open(source, "rb")
E           PermissionError: [Errno 13] Permission denied: 'C:\\ProgramData\\m2\\ome\\formats-gpl\\8.0.1\\formats-gpl-8.0.1.pom\\..\\..'

C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\xml\etree\ElementTree.py:569: PermissionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions