Git Product home page Git Product logo

Comments (5)

r-whites avatar r-whites commented on June 11, 2024 6

Hey! We have encountered the same issue in my team recently. It seems that the package datamodel-code-generator brings in a version of black that displays that error. We solved the issue by forcing our local version of black to 23.3.0.

from fastapi-code-generator.

nnashiki avatar nnashiki commented on June 11, 2024 1

It worked as described with Docker.
thank you. @r-whites

FROM python:3.11-slim

RUN pip install fastapi-code-generator black==23.3.0

WORKDIR /local

ENTRYPOINT ["fastapi-codegen"]
$ docker build -t fastapi-code-generator-container .
$ docker run --rm -v "${PWD}:/local" fastapi-code-generator-container --input /local/openapi.yml --output app

from fastapi-code-generator.

sefasenturk95 avatar sefasenturk95 commented on June 11, 2024 1

I had this same error, downgrading to the black version as suggested here using poetry worked for me.

from fastapi-code-generator.

DavidRV00 avatar DavidRV00 commented on June 11, 2024

Hello, I'm forcing black to version 23.3.0 as described above, but I'm still getting exactly the same error. I've installed both black and fastapi-code-generator using pipx, if that matters at all.

Anybody else still running into this, or have any ideas?

from fastapi-code-generator.

Ambujinee12 avatar Ambujinee12 commented on June 11, 2024

I was also facing the same issue, also downgrading black to 23.3.0 helped me here.

from fastapi-code-generator.

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.