TypeError: unsupported operand type(s) for /: 'tuple' and 'str'
See original GitHub issueI have just discovered this library. But the example is not even running and there seems to be a problem which may be related to the issue reported here. What is the work-around just to get the library going - any older versions which would work?
We use poetry for package management
[tool.poetry.dependencies]
python = "^3.10"
fastapi-code-generator = "^0.3.4"
fastapi = "^0.74.1"
path = root / "pyproject.toml"
TypeError: unsupported operand type(s) for /: ‘tuple’ and ‘str’
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:10 (3 by maintainers)
Top Results From Across the Web
TypeError: unsupported operand type(s) for -: 'tuple' and 'tuple'
You're trying to substract two tuples (with RGB values), and arithmetic operations on tuples like * and - are not defined.
Read more >TypeError: unsupported operand type(s) for -: tuple and int
The Python "TypeError: unsupported operand type(s) for -: 'tuple' and 'int'" occurs when we try to use the subtraction operator with a tuple...
Read more >unsupported operand type(s) for /: 'int' and 'tuple' mean in ...
As the message indicates it means you are trying to add an int to a str. It is impossible to say exactly what...
Read more >TypeError: unsupported operand type(s) for &: 'str' and 'tuple'
I am stuck at this exercise: https://www.codecademy.com/courses/python-beginner-sRXwR/3/4?curriculum_id=4f89dab3d788890003000096# Error message is ...
Read more >TypeError: unsupported operand type(s) for -: 'str' and 'str'
The python error TypeError: unsupported operand type(s) for -: 'str' and 'str' occurs when you try to subtract a string from another that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Quick fix:
In the source code
/python3.9/site-packages/datamodel_code_generator/format.py
:I have changed manually in line 45
path = root / "pyproject.toml"
to
path = root[0] / "pyproject.toml"
The project was generated automatically after this change.
I think this issue should be closed.