You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working on Windows, using the latest version of the module, neither prisma generate throws an error when there's a non-ASCII character in the path ; for example, a grave accent in the name of a folder.
Traceback
Traceback (most recent call last):
File "C:\Users\Martin\Documents\Universit�\2023-2024\Cours\Q2\Technologies Web\Projet\.venv\Lib\site-packages\prisma\g
enerator\generator.py", line 109, in run
self._on_request(request)
File "C:\Users\Martin\Documents\Universit�\2023-2024\Cours\Q2\Technologies Web\Projet\.venv\Lib\site-packages\prisma\g
enerator\generator.py", line 162, in _on_request
self.generate(data)
File "C:\Users\Martin\Documents\Universit�\2023-2024\Cours\Q2\Technologies Web\Projet\.venv\Lib\site-packages\prisma\g
enerator\generator.py", line 251, in generate
shutil.copy(data.schema_path, packaged_schema)
File "C:\Users\Martin\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 419, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\Martin\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 256, in copyfile
with open(src, 'rb') as fsrc:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Martin\\Documents\\Université\\2023-2024\\Cours\\Q2\
\Technologies Web\\Projet\\prisma\\schema.prisma'
Note the accent in the traceback.
Tried in both PowerShell and classic CMD.
This behaviour does not appear on Linux at all.
I tried to debug it myself, because it's certainly a parsing somewhere that isn't working with UTF-8 consistently, but I didn't find what I was trying to find. Where should we look into?
EDIT: I tried to copy the project folder in my main user directory and prisma db push, and it worked, but it generated the client in the wrong path. It created a new folder alongside the one with a grave accent, and just put the client there. No "FileNotFoundError".
Console session
(.venv) PS C:\Users\Martin\Ceci est un test\Projet> prisma db push
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Datasource "db": MongoDB database "lte" at "lte.wmoyioi.mongodb.net"
The database is already in sync with the Prisma schema.
Running generate... - Prisma Client Python (v0.13.1)
✔ Generated Prisma Client Python (v0.13.1) to .....\Documents\Universit�\2023-2024\Cours\Q2\Technologies Web\Projet.v
env\Lib\site-packages\prisma in 270ms
How to reproduce
On Windows, create a virtual environment, using Python 3.11.3
Install the latest prisma-client-py version with pip
Create a dummy prisma/schema.prisma
In the console, using PowerShell or CMD, execute prisma db push
Expected behavior
The prisma client isn't generated, and we are instead greeted with a FileNotFoundError error, and a new folder on the disk, with every non-ASCII character replaced with a symbol.
Environment & setup
prisma : 5.11.0
@prisma/client : Not found
Computed binaryTarget : windows
Operating System : win32
Architecture : x64
Node.js : v20.12.2
Query Engine (Binary) : query-engine efd2449663b3d73d637ea1fd226bafbcf45b3102 (at ..\..\..\..\..\..\..\.cache\prisma-python\binaries\5.11.0\efd2449663b3d73d637ea1fd226bafbcf45b3102\node_modules\@prisma\engines\query-engine-windows.exe)
Schema Engine : schema-engine-cli efd2449663b3d73d637ea1fd226bafbcf45b3102 (at ..\..\..\..\..\..\..\.cache\prisma-python\binaries\5.11.0\efd2449663b3d73d637ea1fd226bafbcf45b3102\node_modules\@prisma\engines\schema-engine-windows.exe)
Schema Wasm : @prisma/prisma-schema-wasm 5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102
Default Engines Hash : efd2449663b3d73d637ea1fd226bafbcf45b3102
Studio : 0.499.0
OS: Windows 11
Database: MongoDB
Python version: 3.11.3
The text was updated successfully, but these errors were encountered:
Thanks for your answer.
I just tried on a new project, with the TypeScript client, in a path containing an accent, and it works :
prisma db push
Prisma schema loaded from prisma\schema.prisma
Datasource "db": SQLite database "database.db" at "file:database.db"
SQLite database database.db created at file:database.db
Your database is now in sync with your Prisma schema. Done in 81ms
Running generate... (Use --skip-generate to skip the generators)
added 1 package, and audited 722 packages in 7s
116 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
✔ Generated Prisma Client (v5.13.0) to .\node_modules\@prisma\client in 106ms
PS C:\Users\Martin\Documents\Université\Prisma Test\éé\Prisma Test>
Bug description
When working on Windows, using the latest version of the module, neither
prisma generate
throws an error when there's a non-ASCII character in the path ; for example, a grave accent in the name of a folder.Traceback
Note the accent in the traceback.
Tried in both PowerShell and classic CMD.
This behaviour does not appear on Linux at all.
I tried to debug it myself, because it's certainly a parsing somewhere that isn't working with UTF-8 consistently, but I didn't find what I was trying to find. Where should we look into?
EDIT: I tried to copy the project folder in my main user directory and
prisma db push
, and it worked, but it generated the client in the wrong path. It created a new folder alongside the one with a grave accent, and just put the client there. No "FileNotFoundError".Console session
(.venv) PS C:\Users\Martin\Ceci est un test\Projet> prisma db push
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Datasource "db": MongoDB database "lte" at "lte.wmoyioi.mongodb.net"
The database is already in sync with the Prisma schema.
Running generate... - Prisma Client Python (v0.13.1)
✔ Generated Prisma Client Python (v0.13.1) to .....\Documents\Universit�\2023-2024\Cours\Q2\Technologies Web\Projet.v
env\Lib\site-packages\prisma in 270ms
How to reproduce
prisma db push
Expected behavior
The prisma client isn't generated, and we are instead greeted with a FileNotFoundError error, and a new folder on the disk, with every non-ASCII character replaced with a symbol.
Environment & setup
The text was updated successfully, but these errors were encountered: