Skip to content

Python pdal reader driver inference failure with filespec #197

Description

@mrtgenet

Describe the bug
Using python pdal, the Reader automatic driver inference based on the input filename fails using filespec.

Sample code:

pipeline=pdal.Reader(
filename={
"path": "https://some_api.com/path/to/file.laz",
"headers": {'Authorization': 'Bearer XXX'}
}
).pipeline()

Error message:

infer_reader_driver(): incompatible function arguments. The following argument types are supported:

  1. (arg0: os.PathLike | str | bytes) -> str

Invoked with: {'path': 'https://some_api.com/path/to/file.laz', 'headers': {'Authorization': 'Bearer XXX'}}

Expected behavior
The driver inference should be made on filename["path"] instead of the whole filespec filename and thus be able to guess that the LAS reader is needed.

Note that the behavior is correct when using command line pdal pipeline.

System/installation information:

Details

$ uname -a:

Linux ALTALPT119 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

$ pdal --version:

pdal 2.9.3 (git-version: 8c2e7d)

$ conda list:

libpdal 2.9.3 h260171b_0 conda-forge
libpdal-arrow 2.9.3 hdea062b_0 conda-forge
libpdal-core 2.9.3 h9d23c72_0 conda-forge
libpdal-cpd 2.9.3 h2e8a393_0 conda-forge
libpdal-draco 2.9.3 h2e8a393_0 conda-forge
libpdal-e57 2.9.3 h1f3591b_0 conda-forge
libpdal-hdf 2.9.3 h01cf3b3_0 conda-forge
libpdal-icebridge 2.9.3 h01cf3b3_0 conda-forge
libpdal-nitf 2.9.3 h811f341_0 conda-forge
libpdal-pgpointcloud 2.9.3 hb16824e_0 conda-forge
libpdal-tiledb 2.9.3 h99d2d8e_0 conda-forge
libpdal-trajectory 2.9.3 h1ebb429_0 conda-forge
pdal 2.9.3 he7fbf59_0 conda-forge
pdal-plugins 1.6.6 pypi_0 pypi
python-pdal 3.5.3 np2py312hc4b51ad_2 conda-forge

$ conda info:

 active environment : suite
active env location : /home/mgenet/miniconda3/envs/suite
shell level : 2
user config file : /home/mgenet/.condarc
populated config files : /home/mgenet/.condarc
conda version : 25.11.1
conda-build version : not installed
python version : 3.11.11.final.0
solver : libmamba (default)
virtual packages : __archspec=1=skylake
__conda=25.11.1=0
__cuda=12.2=0
__glibc=2.39=0
__linux=6.6.87.2=0
__unix=0=0
base environment : /home/mgenet/miniconda3 (writable)
conda av data dir : /home/mgenet/miniconda3/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/mgenet/miniconda3/pkgs
/home/mgenet/.conda/pkgs
envs directories : /home/mgenet/miniconda3/envs
/home/mgenet/.conda/envs
platform : linux-64
user-agent : conda/25.11.1 requests/2.32.5 CPython/3.11.11 Linux/6.6.87.2-microsoft-standard-WSL2 ubuntu/24.04.3 glibc/2.39 solver/libmamba conda-libmamba-solver/25.11.0 libmambapy/2.4.0 aau/0.7.4 c/. s/. e/.
UID:GID : 1000:1000
netrc file : None
offline mode : False

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