Skip to content

Secondary flag is not valid for non-boolean flag. #294

@Guan612

Description

@Guan612

Error

info: in _run_module_as_main:198 TypeError: Secondary flag is not valid for non-boolean flag.

log:(.venv) C:\Users\Administrator\code\pyspur>pyspur init test

┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
│ in run_module_as_main:198 │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │ alter_argv = False │ │
│ │ code = <code object at 0x0000028EB55B0030, file │ │
│ │ "C:\Users\Administrator\code\pyspur.venv\Scripts\pyspur.exe_main
.py", │ │
│ │ line 1> │ │
│ │ main_globals = { │ │
│ │ │ 'name': 'main', │ │
│ │ │ 'doc': None, │ │
│ │ │ 'package': '', │ │
│ │ │ 'loader': <zipimporter object │ │
│ │ "C:\Users\Administrator\code\pyspur.venv\Scripts\pyspur.exe">, │ │
│ │ │ 'spec': ModuleSpec(name='main', loader=<zipimporter object │ │
│ │ "C:\Users\Administrator\code\pyspur.venv\Scripts\pyspur.exe">, │ │
│ │ origin='C:\Users\Administrator\code\pyspur\.venv\Scripts\pyspur.exe\… │ │
│ │ │ 'annotations': {}, │ │
│ │ │ 'builtins': <module 'builtins' (built-in)>, │ │
│ │ │ 'file': │ │
│ │ 'C:\Users\Administrator\code\pyspur\.venv\Scripts\pyspur.exe\_main… │ │
│ │ │ 'cached': │ │
│ │ 'C:\Users\Administrator\code\pyspur\.venv\Scripts\pyspur.exe\__pycac… │ │
│ │ │ 're': <module 're' from │ │
│ │ 'C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\… │ │
│ │ │ ... +2 │ │
│ │ } │ │
│ │ mod_name = 'main' │ │
│ │ mod_spec = ModuleSpec(name='main', loader=<zipimporter object │ │
│ │ "C:\Users\Administrator\code\pyspur.venv\Scripts\pyspur.exe">, │ │
│ │ origin='C:\Users\Administrator\code\pyspur\.venv\Scripts\pyspur.exe\… │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ in _run_code:88 │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │ cached = 'C:\Users\Administrator\code\pyspur\.venv\Scripts\pyspur.exe\_pycac… │ │
│ │ code = <code object at 0x0000028EB55B0030, file │ │
│ │ "C:\Users\Administrator\code\pyspur.venv\Scripts\pyspur.exe_main
.py", │ │
│ │ line 1> │ │
│ │ fname = 'C:\Users\Administrator\code\pyspur\.venv\Scripts\pyspur.exe\_main… │ │
│ │ init_globals = None │ │
│ │ loader = <zipimporter object │ │
│ │ "C:\Users\Administrator\code\pyspur.venv\Scripts\pyspur.exe"> │ │
│ │ mod_name = 'main' │ │
│ │ mod_spec = ModuleSpec(name='main', loader=<zipimporter object │ │
│ │ "C:\Users\Administrator\code\pyspur.venv\Scripts\pyspur.exe">, │ │
│ │ origin='C:\Users\Administrator\code\pyspur\.venv\Scripts\pyspur.exe\… │ │
│ │ pkg_name = '' │ │
│ │ run_globals = { │ │
│ │ │ 'name': 'main', │ │
│ │ │ 'doc': None, │ │
│ │ │ 'package': '', │ │
│ │ │ 'loader': <zipimporter object │ │
│ │ "C:\Users\Administrator\code\pyspur.venv\Scripts\pyspur.exe">, │ │
│ │ │ 'spec': ModuleSpec(name='main', loader=<zipimporter object │ │
│ │ "C:\Users\Administrator\code\pyspur.venv\Scripts\pyspur.exe">, │ │
│ │ origin='C:\Users\Administrator\code\pyspur\.venv\Scripts\pyspur.exe\… │ │
│ │ │ 'annotations': {}, │ │
│ │ │ 'builtins': <module 'builtins' (built-in)>, │ │
│ │ │ 'file': │ │
│ │ 'C:\Users\Administrator\code\pyspur\.venv\Scripts\pyspur.exe\_main… │ │
│ │ │ 'cached': │ │
│ │ 'C:\Users\Administrator\code\pyspur\.venv\Scripts\pyspur.exe\__pycac… │ │
│ │ │ 're': <module 're' from │ │
│ │ 'C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\… │ │
│ │ │ ... +2 │ │
│ │ } │ │
│ │ script_name = None │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ in :7 │
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\pyspur\cli\main.py:183 in main │
│ │
│ 180 │
│ 181 def main() -> None: │
│ 182 │ """PySpur CLI.""" │
│ > 183 │ app() │
│ 184 │
│ 185 │
│ 186 if name == "main": │
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\typer\main.py:328 in call
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\typer\main.py:311 in call
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\typer\main.py:350 in get_command │
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\typer\main.py:332 in get_group │
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\typer\main.py:483 in │
│ get_group_from_info │
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\typer\main.py:577 in │
│ get_command_from_info │
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\typer\main.py:553 in │
│ get_params_convertors_ctx_param_name_from_function │
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\typer\main.py:877 in get_click_param │
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\typer\core.py:489 in init
│ │
│ C:\Users\Administrator\code\pyspur.venv\Lib\site-packages\click\core.py:2852 in init
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
TypeError: Secondary flag is not valid for non-boolean flag.

pip list:

Package Version


aiofiles 25.1.0
aiohappyeyeballs 2.6.1
aiohttp 3.13.3
aioshutil 1.6
aiosignal 1.4.0
alembic 1.14.0
annotated-types 0.7.0
anyio 4.12.1
arrow 1.3.0
asgiref 3.11.0
asyncio 3.4.3
attrs 24.3.0
Authlib 1.3.1
backend 0.2.4.1
backoff 2.2.1
bcrypt 5.0.0
build 1.4.0
cached-property 2.0.1
certifi 2026.1.4
cffi 2.0.0
charset-normalizer 3.4.4
chevron 0.14.0
chroma-hnswlib 0.7.6
chromadb 0.6.2
click 8.3.1
colorama 0.4.6
coloredlogs 15.0.1
cryptography 46.0.4
datasets 3.2.0
defusedxml 0.7.1
Deprecated 1.3.1
deprecation 2.1.0
dill 0.3.8
distro 1.9.0
docstring_parser 0.17.0
docx2python 3.3.0
docx2txt 0.8
durationpy 0.10
exa-py 1.9.0
fastapi 0.115.6
filelock 3.20.3
firecrawl-py 1.10.2
flatbuffers 25.12.19
frozendict 2.4.7
frozenlist 1.8.0
fsspec 2024.9.0
genanki 0.13.1
gitdb 4.0.12
GitPython 3.1.46
google-api-core 2.29.0
google-api-python-client 2.159.0
google-auth 2.48.0
google-auth-httplib2 0.3.0
googleapis-common-protos 1.72.0
gotrue 2.12.4
greenlet 3.3.1
grpcio 1.69.0
grpcio-health-checking 1.69.0
grpcio-tools 1.69.0
h11 0.16.0
h2 4.3.0
hf-xet 1.2.0
hpack 4.1.0
httpcore 1.0.9
httplib2 0.31.2
httptools 0.7.1
httpx 0.27.2
huggingface_hub 1.3.4
humanfriendly 10.0
hyperframe 6.1.0
idna 3.11
importlib_metadata 8.7.1
importlib_resources 6.5.2
itsdangerous 2.2.0
Jinja2 3.1.6
jiter 0.12.0
jsonschema 4.26.0
jsonschema-specifications 2025.9.1
kubernetes 35.0.0
litellm 1.61.15
loguru 0.7.3
lxml 6.0.2
Mako 1.3.10
markdown-it-py 4.0.0
MarkupSafe 3.0.3
mdurl 0.1.2
mmh3 5.2.0
mpmath 1.3.0
multidict 6.7.1
multiprocess 0.70.16
nest-asyncio 1.6.0
numpy 2.2.1
oauthlib 3.3.1
ollama 0.4.5
onnxruntime 1.23.2
openai 1.109.1
opentelemetry-api 1.39.1
opentelemetry-exporter-otlp-proto-common 1.39.1
opentelemetry-exporter-otlp-proto-grpc 1.39.1
opentelemetry-instrumentation 0.60b1
opentelemetry-instrumentation-asgi 0.60b1
opentelemetry-instrumentation-fastapi 0.60b1
opentelemetry-proto 1.39.1
opentelemetry-sdk 1.39.1
opentelemetry-semantic-conventions 0.60b1
opentelemetry-util-http 0.60b1
orjson 3.11.5
overrides 7.7.0
packaging 26.0
pandas 2.2.3
paragraphs 1.0.1
pdf2image 1.17.0
phidata 2.7.8
pillow 12.1.0
pinecone 5.4.2
pinecone-plugin-inference 3.1.0
pinecone-plugin-interface 0.0.7
pip 25.3
portalocker 2.10.1
postgrest 0.19.3
posthog 7.7.0
praw 7.8.1
prawcore 2.4.0
propcache 0.4.1
proto-plus 1.27.0
protobuf 5.29.5
psycopg2-binary 2.9.10
py-zerox 0.0.7
pyarrow 23.0.0
pyasn1 0.6.2
pyasn1_modules 0.4.2
pycparser 3.0
pydantic 2.10.5
pydantic_core 2.27.2
pydantic-settings 2.12.0
PyGithub 2.5.0
Pygments 2.19.2
PyJWT 2.10.1
PyNaCl 1.6.2
pyparsing 3.3.2
pypdf 5.1.0
PyPDF2 3.0.1
PyPika 0.50.0
pyproject_hooks 1.2.0
pyreadline3 3.5.4
pyspur 0.1.18
python-dateutil 2.9.0.post0
python-dotenv 1.0.1
python-http-client 3.3.7
python-multipart 0.0.20
python-pptx 1.0.2
pytz 2025.2
pywin32 311
PyYAML 6.0.2
qdrant-client 1.12.2
realtime 2.5.3
redis 5.2.1
referencing 0.37.0
regex 2024.11.6
requests 2.32.3
requests-file 2.1.0
requests-oauthlib 1.3.1
resend 2.6.0
retrying 1.3.4
rich 13.9.4
rpds-py 0.30.0
rsa 4.9.1
sendgrid 6.11.0
setuptools 80.10.2
shellingham 1.5.4
six 1.17.0
slack_sdk 3.34.0
smmap 5.0.2
sniffio 1.3.1
SQLAlchemy 2.0.36
starkbank-ecdsa 2.2.0
starlette 0.41.3
storage3 0.11.3
StrEnum 0.4.15
supabase 2.11.0
supafunc 0.9.4
sympy 1.14.0
tenacity 8.3.0
tiktoken 0.7.0
tokenizers 0.22.2
tomli 2.4.0
tqdm 4.67.1
typer 0.9.0
typer-slim 0.21.1
types-python-dateutil 2.9.0.20260124
typing_extensions 4.15.0
typing-inspection 0.4.2
tzdata 2025.3
update-checker 0.18.0
uritemplate 4.2.0
urllib3 2.6.3
uvicorn 0.40.0
validators 0.34.0
watchfiles 1.1.1
weaviate-client 4.10.2
websocket-client 1.9.0
websockets 15.0.1
win32_setctime 1.2.0
wrapt 1.17.3
xlsxwriter 3.2.9
xxhash 3.6.0
yarl 1.22.0
youtube-transcript-api 0.6.3
zipp 3.23.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions