-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working
Description
Describe the bug
I've tried using pyright --createstub but it doesn't seem to be generating anything.
Repro steps:
mkdir repro
cd repro
npm install pyright
python3.14 -m venv .venv
.venv\Scripts\Activate.ps1
pip install pypdfium2
.\node_modules\.bin\pyright --createstub pypdfium2 --verbose
The output is the following:
No include entries specified; assuming c:\Users\Jakub\work\repro
Auto-excluding **/node_modules
Auto-excluding **/__pycache__
Auto-excluding **/.*
Assuming Python version 3.14.0.final.0
Execution environment: python
Extra paths:
(none)
Python version: 3.14.0.final.0
Python platform: Windows
Search paths:
c:\Users\Jakub\work\repro\node_modules\pyright\dist\typeshed-fallback\stdlib
c:\Users\Jakub\work\repro
c:\Users\Jakub\work\repro\typings
c:\Users\Jakub\work\repro\node_modules\pyright\dist\typeshed-fallback\stubs\...
c:\Users\Jakub\AppData\Local\Python\pythoncore-3.14-64\DLLs
c:\Users\Jakub\AppData\Local\Python\pythoncore-3.14-64\Lib
c:\Users\Jakub\AppData\Local\Python\pythoncore-3.14-64
c:\Users\Jakub\work\repro\.venv
c:\Users\Jakub\work\repro\.venv\Lib\site-packages
Could not import 'PIL' in file 'c:\Users\Jakub\work\repro\.venv\Lib\site-packages\pypdfium2\_helpers\bitmap.py'
Could not import 'PIL.Image' in file 'c:\Users\Jakub\work\repro\.venv\Lib\site-packages\pypdfium2\_helpers\bitmap.py'
Could not import 'numpy' in file 'c:\Users\Jakub\work\repro\.venv\Lib\site-packages\pypdfium2\_helpers\bitmap.py'
Could not import 'PIL' in file 'c:\Users\Jakub\work\repro\.venv\Lib\site-packages\pypdfium2\_helpers\pageobjects.py'
Could not import 'PIL.Image' in file 'c:\Users\Jakub\work\repro\.venv\Lib\site-packages\pypdfium2\_helpers\pageobjects.py'
Completed in 0.715sec
I then checked whether there's anything new in the current directory, but there wasn't. I tried explicitly making the typings directory (which, as far as I understand, is the output directory, assuming the default stubsPath) but that didn't change anything. When running without --verbose, there's not a single line of console output.
Code or Screenshots
There's no code needed, here's the output of pip freeze though:
(.venv) PS C:\Users\Jakub\work\repro> pip freeze
charset-normalizer==3.4.4
h11==0.16.0
jh2==5.0.10
niquests==3.15.2
pypdfium2==4.30.0
qh3==1.5.5
urllib3-future==2.14.905
wassima==2.0.2VS Code extension or command-line
Running pyright from command-line:
(.venv) PS C:\Users\Jakub\work\repro> .\node_modules\.bin\pyright --version
pyright 1.1.406
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working