Comments (8)
@de-y what parts didn't work for you?
I haven't been able to test this particular feature yet & haven't looked at how it needs to be implemented internally but I'd have thought that it wouldn't need any changes in the Python client.
Any details about issues you ran into would be incredibly helpful!
from prisma-client-py.
@de-y what parts didn't work for you?
I haven't been able to test this particular feature yet & haven't looked at how it needs to be implemented internally but I'd have thought that it wouldn't need any changes in the Python client.
Any details about issues you ran into would be incredibly helpful!
It says in the prisma docs for this that it should work like this:
But when I follow the method it states to add it, like so:
It leads to me getting the following issue, with multi-schema not being found:
from prisma-client-py.
Huh that's strange, you're on the latest version of Prisma Client Python?
from prisma-client-py.
Huh that's strange, you're on the latest version of Prisma Client Python?
Yep.
from prisma-client-py.
@de-y This generated correctly for me:
datasource db {
provider = "postgresql"
url = env("POSTGRESQL_URL")
schemas = ["base", "transactional"]
}
generator client {
provider = "prisma-client-py"
interface = "asyncio"
recursive_type_depth = -1
previewFeatures = ["multiSchema"]
enable_experimental_decimal = true
}
What does prisma version
output for you?
$ prisma version
prisma : 4.8.0
@prisma/client : Not found
Current platform : darwin-arm64
Query Engine (Binary) : query-engine d6e67a83f971b175a593ccc12e15c4a757f93ffe (at ../../.cache/prisma-python/binaries/4.8.0/d6e67a83f971b175a593ccc12e15c4a757f93ffe/node_modules/@prisma/engines/query-engine-darwin-arm64)
Migration Engine : migration-engine-cli d6e67a83f971b175a593ccc12e15c4a757f93ffe (at ../../.cache/prisma-python/binaries/4.8.0/d6e67a83f971b175a593ccc12e15c4a757f93ffe/node_modules/@prisma/engines/migration-engine-darwin-arm64)
Introspection Engine : introspection-core d6e67a83f971b175a593ccc12e15c4a757f93ffe (at ../../.cache/prisma-python/binaries/4.8.0/d6e67a83f971b175a593ccc12e15c4a757f93ffe/node_modules/@prisma/engines/introspection-engine-darwin-arm64)
Format Binary : prisma-fmt d6e67a83f971b175a593ccc12e15c4a757f93ffe (at ../../.cache/prisma-python/binaries/4.8.0/d6e67a83f971b175a593ccc12e15c4a757f93ffe/node_modules/@prisma/engines/prisma-fmt-darwin-arm64)
Format Wasm : @prisma/prisma-fmt-wasm 4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe
Default Engines Hash : d6e67a83f971b175a593ccc12e15c4a757f93ffe
Studio : 0.479.0
(Note that I haven't tested runtime behaviour of multiSchema
yet)
from prisma-client-py.
I don't know what is happening anymore with prisma, when I have it installed & try to run any command, it leads to the following traceback:
Installing Prisma CLI
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\accur\Documents\GitHub\app\venv\Scripts\prisma.exe\__main__.py", line 7, in <module>
File "C:\Users\accur\Documents\GitHub\app\venv\lib\site-packages\prisma\cli\cli.py", line 39, in main
sys.exit(prisma.run(args[1:]))
File "C:\Users\accur\Documents\GitHub\app\venv\lib\site-packages\prisma\cli\prisma.py", line 36, in run
entrypoint = ensure_cached().entrypoint
File "C:\Users\accur\Documents\GitHub\app\venv\lib\site-packages\prisma\cli\prisma.py", line 91, in ensure_cached
proc = npm.run(
File "C:\Users\accur\Documents\GitHub\app\venv\lib\site-packages\prisma\cli\_node.py", line 78, in run
env=_update_path_env(
File "C:\Users\accur\Documents\GitHub\app\venv\lib\site-packages\prisma\cli\_node.py", line 293, in _update_path_env
assert target_bin.exists(), 'Target `bin` directory does not exist'
AssertionError: Target `bin` directory does not exist
The problem is, I also have nodejs installed & have no idea what is going wrong here, I even uninstalled & reinstalled prisma, destroyed & created the venv again, but it is to no avail.
from prisma-client-py.
Okay. This is even stranger for me, I had to install the regular prisma client version & then generate with that to make my copy of prisma-client-py to even work. I don't even know how it works, but it did. But thanks for helping though.
from prisma-client-py.
It's probably the binary.
from prisma-client-py.
Related Issues (20)
- Avoid writing to `site-packages/prisma` HOT 1
- When generator client output is set, `prisma db push` fails with Permission Denied
- Is there a way to override use_enum_values?
- `prisma db push` does not work
- v0.13.0 - ImportError: cannot import name 'AbstractEngine' from 'prisma.engine' HOT 4
- Oracle Database not support like alchemy HOT 1
- Oracle not support HOT 1
- httpx.ConnectError: [Errno 111] Connection refused HOT 3
- RuntimeError('Event loop is closed') HOT 2
- schema.prisma on custom path HOT 3
- Bump Prisma version to latest 5.12.1
- Client extension support
- Not working with non-ASCII paths in Windows HOT 3
- Feature Request: Add Support for Selecting Specific Fields in Prisma Python HOT 2
- prisma generate on binary in venv generates js client instead? HOT 2
- Error: spawn prisma-client-py ENOENT}
- Allow to use Pydantic aliases for column names that shadow BaseModel attributes
- prisma.errors.FieldNotFoundError Error when creating item with nested item.
- Add support for a create_many_and_return method
- Audit Logs ? What is the best way to implement them
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prisma-client-py.