#783 closed defect (fixed)

python3-statsmodels: truncated filenames

Reported by: tdanckaert Owned by: osgeo4w-dev@…
Priority: normal Component: Package
Version: Keywords:
Cc:

Description

With current python3-statsmodels 0.12.1-1, import statsmodels.api fails with an ImportError:

ImportError: cannot import name '_univariate_diffuse' from 'statsmodels.tsa.statespace._filters' (C:\OSGEO4~1.22\apps\Python39\lib\site-packages\statsmodels\tsa\statespace\_filters\__init__.py)

Closer inspection reveals that the file for module _univariate_diffuse is there, but it is a native extension module with an incomplete filename: the file is simply called _univariate_diffuse.cp39-win (or similar, recalling from memory). Renaming the file to the full _univariate_diffuse.cp39-win_amd64.pyd fixes this particular import, but the we hit some other files with the same issue.

In the end, I had to rename a number of native extension modules with truncated file names in statsmodels.tsa.statespace and its _filters and _smoothers subpackages, in order to be able to import the package.

Possibly some filename length limit in the build process?

Change History (4)

comment:1 by jef, 13 months ago

not reproducable. Are you using a current installer?

download:~/osgeo4w/v2/x86_64/release/python3/python3-statsmodels$ tar --wildcards -tvf python3-statsmodels-0.12.1-1.tar.bz2 "*_univariate_diffuse*.pyd"
-rw-rw-rw- 0/0          211456 2020-11-08 22:11 apps/Python39/Lib/site-packages/statsmodels/tsa/statespace/_filters/_univariate_diffuse.cp39-win_amd64.pyd
-rw-rw-rw- 0/0          245248 2020-11-08 22:11 apps/Python39/Lib/site-packages/statsmodels/tsa/statespace/_smoothers/_univariate_diffuse.cp39-win_amd64.pyd
c:\OSGeo4W>dir /s /b _univariate*.pyd
c:\OSGeo4W\apps\Python39\Lib\site-packages\statsmodels\tsa\statespace\_filters\_univariate.cp39-win_amd64.pyd
c:\OSGeo4W\apps\Python39\Lib\site-packages\statsmodels\tsa\statespace\_smoothers\_univariate.cp39-win_amd64.pyd

comment:2 by tdanckaert, 13 months ago

Just had another try with OSGeo4W install, version 2.579, from another installation. Note that the dir command above will not include the problematic files because these files do not end in *pyd.

Listing files that do not end in pyd as well, I get the following:

C:\QGIS_3.24-INCA-0.3>dir /s /b _univariate*
C:\QGIS_3.24-INCA-0.3\apps\Python39\Lib\site-packages\sklearn\feature_selection\_univariate_selection.py
C:\QGIS_3.24-INCA-0.3\apps\Python39\Lib\site-packages\sklearn\feature_selection\__pycache__\_univariate_selection.cpython-39.pyc
C:\QGIS_3.24-INCA-0.3\apps\Python39\Lib\site-packages\statsmodels\tsa\statespace\_filters\_univariate.cp39-win_amd64.pyd
C:\QGIS_3.24-INCA-0.3\apps\Python39\Lib\site-packages\statsmodels\tsa\statespace\_filters\_univariate_diffuse.cp39-win_amd
C:\QGIS_3.24-INCA-0.3\apps\Python39\Lib\site-packages\statsmodels\tsa\statespace\_smoothers\_univariate.cp39-win_amd64.pyd
C:\QGIS_3.24-INCA-0.3\apps\Python39\Lib\site-packages\statsmodels\tsa\statespace\_smoothers\_univariate_diffuse.cp39-win_a

From the last 3 entries it seems that some kind of maximum path length truncates the file names.

comment:3 by jef, 13 months ago

Summary: python3-statsmodels: truncated filenamessetup: truncated filenames

comment:4 by jef, 13 months ago

Resolution: fixed
Status: newclosed
Summary: setup: truncated filenamespython3-statsmodels: truncated filenames

python3-statsmodels 0.12.1-2: change tar format to GNU instead of POSIX

Note: See TracTickets for help on using tickets.