Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问下为什么我命令行执行方式无法传参?会直接报错 #293

Open
huguangzheng opened this issue Jun 5, 2024 · 1 comment

Comments

@huguangzheng
Copy link

问题1:命令行执行方式报参数问题,这里KeymouseGo 是应该是KeymouseGo.exe还是python3 KeymouseGo.py scripts/auto_connect_vpn.txt

对应的命令行我放在bat中,打算做成定时任务定时触发。
./KeymouseGo scripts/auto_connect_vpn.txt

报错如下:
2024-06-05 11:40:50.913 | INFO | main:single_run:82 - Script path:scripts/auto_connect_vpn.txt
2024-06-05 11:40:50.914 | ERROR | main:single_run:107 - too many values to unpack (expected 2)

但是我将命令改成:python KeymouseGo.py scripts/auto_connect_vpn-hgz.txt
是可以执行的。

@lengdong863
Copy link

lengdong863 commented Aug 14, 2024

我想也实现相同的功能,大佬能不能指点一下应该怎么做?
我在Python中执行了
python KeymouseGo.py scripts/001.txt

报错是这样的
File "", line 1
python KeymouseGo.py scripts/001.txt
^
SyntaxError: invalid decimal literal
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants