ycd/manage-fastapi

Error during startproject [ ModuleNotFoundError: No module named 'termios' ]

syfqpie opened this issue · 7 comments

Hi all.

So I'm trying to generate a project by using
fastapi startproject core --interactive

But this error below pops out of my terminal
Traceback (most recent call last):
File "c:\users\x\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\x\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\x\Documents\Development\Playground\test-fastapi\env\Scripts\fastapi.exe\__main__.py", line 4, in <module>
File "c:\users\x\documents\development\playground\test-fastapi\env\lib\site-packages\manage_fastapi\main.py", line 11, in <module>
from manage_fastapi.helpers import bullet, launch_cli, yes_no
File "c:\users\x\documents\development\playground\test-fastapi\env\lib\site-packages\manage_fastapi\helpers.py", line 4, in <module>
from bullet import Bullet, SlidePrompt, colors
File "c:\users\x\documents\development\playground\test-fastapi\env\lib\site-packages\bullet\__init__.py", line 1, in <module>
from .client import Bullet
File "c:\users\x\documents\development\playground\test-fastapi\env\lib\site-packages\bullet\client.py", line 4, in <module>
from . import utils
File "c:\users\x\documents\development\playground\test-fastapi\env\lib\site-packages\bullet\utils.py", line 3, in <module>
import tty, termios
File "c:\users\x\appdata\local\programs\python\python39\lib\tty.py", line 5, in <module>
from termios import *
ModuleNotFoundError: No module named 'termios'

And I'm running this on Windows 10 machine. I've read somewhere that termios is only unix and not windows. Is this true?

You're right. It looks like bullet doesn't have support for Windows.

@ycd Should we make bullet optional and not use it interactively on Windows?

ycd commented

sure, maybe we can stop depending on it and find another cross-platform library someday.

So for the time being, this package cannot be used on Windows right?

There is questionary that is cross-platform, but it depends on prompt-toolkit and will bring a lot of sub-dependencies.

I'm going to check that today. Thanks @frostming :)

+1 for Windows support if its doable. Would like to check this out in the future. Thanks!

Support for Windows will be available on manage-fastapi 1.1.0 🎉