Opened 3 years ago

Closed 3 years ago

#728 closed enhancement (worksforme)

Add PDAL python bindings

Reported by: nicogodet Owned by: jef
Priority: major Component: Package
Version: Keywords:
Cc:

Description

Title says it all.

https://pdal.io/python.html

Change History (9)

comment:1 by jef, 3 years ago

Resolution: fixed
Status: newclosed

comment:2 by nicogodet, 3 years ago

Resolution: fixed
Status: closedreopened

When I try to import pdal, I have this error:

>>> import pdal
Traceback (most recent call last):
  File "C:\OSGeo4W\apps\Python39\lib\code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGeo4W\apps\Python39\lib\site-packages\pdal\__init__.py", line 8, in <module>
    inject_pdal_drivers()
  File "C:\OSGeo4W\apps\Python39\lib\site-packages\pdal\drivers.py", line 62, in inject_pdal_drivers
    drivers = json.loads(
  File "C:\OSGeo4W\apps\Python39\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\OSGeo4W\apps\Python39\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\OSGeo4W\apps\Python39\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

comment:3 by nicogodet, 3 years ago

As QGIS provides PDAL 2.3.0, maybe you should use PDAL==2.3.0 for pypi package https://pypi.org/project/PDAL/2.3.0/

Instead of latest

comment:4 by nicogodet, 3 years ago

Import works from python-qgis.bat but not from embedded python console in QGIS

Version 0, edited 3 years ago by nicogodet (next)

comment:5 by jef, 3 years ago

Owner: changed from osgeo4w-dev@… to jef
Status: reopenednew

Not reproducable - in a fresh install of qgis-full with python-pdal I can load pdal in the python console just fine.

comment:6 by nicogodet, 3 years ago

Import fails when QGIS is started using .exe

Import OK when QGIS is started using .bat

Last edited 3 years ago by nicogodet (previous) (diff)

comment:7 by jef, 3 years ago

Doesn't seem to make any difference here either.

comment:8 by nicogodet, 3 years ago

Yeah, local issue not linked to my qgis install (which is fresh) but my computer or dunnow...

OK on another computer with with .bat and .exe.

You can close this.

comment:9 by jef, 3 years ago

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.