Giter VIP home page Giter VIP logo

Comments (8)

RobertCraigie avatar RobertCraigie commented on June 3, 2024

@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 avatar de-y commented on June 3, 2024

@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:
image

But when I follow the method it states to add it, like so:
image

It leads to me getting the following issue, with multi-schema not being found:
image

from prisma-client-py.

RobertCraigie avatar RobertCraigie commented on June 3, 2024

Huh that's strange, you're on the latest version of Prisma Client Python?

from prisma-client-py.

de-y avatar de-y commented on June 3, 2024

Huh that's strange, you're on the latest version of Prisma Client Python?

Yep.

from prisma-client-py.

RobertCraigie avatar RobertCraigie commented on June 3, 2024

@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.

de-y avatar de-y commented on June 3, 2024

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.

de-y avatar de-y commented on June 3, 2024

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.

kivo360 avatar kivo360 commented on June 3, 2024

It's probably the binary.

from prisma-client-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.