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

Getting error when running captcha22 server engine. #4

Open
graham-eisele opened this issue Sep 2, 2020 · 4 comments
Open

Getting error when running captcha22 server engine. #4

graham-eisele opened this issue Sep 2, 2020 · 4 comments

Comments

@graham-eisele
Copy link

I get this error

`Class start
Checking if there is any new files
['./Unsorted\data.zip']
Start running
Copy files
Starting the copy of files
The syntax of the command is incorrect.
Traceback (most recent call last):
File "c:\users\user\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\user\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\user\anaconda3\Scripts\captcha22.exe_main
.py", line 7, in
sites = site.getsitepackages()
File "c:\users\user\anaconda3\lib\site-packages\captcha22_main
.py", line 267, in main
args.func(args)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\core\server.py", line 20, in server
server.main()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 512, in main
self.run_server()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 487, in run_server
self.check_files()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 396, in check_files
self.copy_files(file)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 256, in copy_files
os.system('mkdir ' + self.busy_URL + "/" + names[0] + "/" + names[1])
IndexError: list index out of range

C:\Users\user>captcha22 server engine
Class start
Checking if there is any new files
['./Unsorted\data.zip']
Start running
Copy files
Starting the copy of files
The syntax of the command is incorrect.
Traceback (most recent call last):
File "c:\users\user\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\user\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\user\anaconda3\Scripts\captcha22.exe_main
.py", line 7, in
sites = site.getsitepackages()
File "c:\users\user\anaconda3\lib\site-packages\captcha22_main
.py", line 267, in main
args.func(args)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\core\server.py", line 20, in server
server.main()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 512, in main
self.run_server()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 487, in run_server
self.check_files()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 396, in check_files
self.copy_files(file)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 256, in copy_files
os.system('mkdir ' + self.busy_URL + "/" + names[0] + "/" + names[1])
IndexError: list index out of range

C:\Users\user>captcha22 server engine
Class start
Checking if there is any new files
['./Unsorted\data.zip']
Start running
Copy files
Starting the copy of files
The syntax of the command is incorrect.
Traceback (most recent call last):
File "c:\users\user\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\user\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\user\anaconda3\Scripts\captcha22.exe_main
.py", line 7, in
sites = site.getsitepackages()
File "c:\users\user\anaconda3\lib\site-packages\captcha22_main
.py", line 267, in main
args.func(args)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\core\server.py", line 20, in server
server.main()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 512, in main
self.run_server()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 487, in run_server
self.check_files()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 396, in check_files
self.copy_files(file)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 256, in copy_files
os.system('mkdir ' + self.busy_URL + "/" + names[0] + "/" + names[1])
IndexError: list index out of range`

@TinusGreen
Copy link
Contributor

Hi there,

You are using the server directly and not through the API.

We are still creating an update which will allow to modify the data input names, but currently the format is fixed.

So that data.zip, you need to rename it before dropping it in the Unsorted folder.

The current naming convention is: <name1>_<name2>.zip

If you use the API, it would be <username>_<projectname>.zip. This is used for the directory structure of captcha22.

Try the name name and let me know if that solves the issue for you.

@graham-eisele
Copy link
Author

I do that but I get a different error

C:\Users\User>captcha22 server engine Class start Checking if there is any new files ['./Unsorted\\username_captcha_1.zip'] Start running Copy files Starting the copy of files The syntax of the command is incorrect. The syntax of the command is incorrect. The syntax of the command is incorrect. The syntax of the command is incorrect. The syntax of the command is incorrect. The syntax of the command is incorrect. The syntax of the command is incorrect. The syntax of the command is incorrect. The syntax of the command is incorrect. cp: cannot create regular file './Busy/Unsorted\username/captcha/1': No such file or directory unzip: cannot find or open ./Busy/Unsorted\username/captcha/1/Unsorted\username_captcha_1.zip, ./Busy/Unsorted\username/captcha/1/Unsorted\username_captcha_1.zip.zip or ./Busy/Unsorted\username/captcha/1/Unsorted\username_captcha_1.zip.ZIP. rm: cannot remove './Busy/Unsorted\username/captcha/1/Unsorted\username_captcha_1.zip': No such file or directory Create labels Directories is: ./Busy/Unsorted\username/captcha/1/data/ ./Busy/Unsorted\username/captcha/1/labels/ Traceback (most recent call last): File "c:\users\User\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\User\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\User\anaconda3\Scripts\captcha22.exe\__main__.py", line 7, in <module> sites = site.getsitepackages() File "c:\users\User\anaconda3\lib\site-packages\captcha22\__main__.py", line 267, in main args.func(args) File "c:\users\User\anaconda3\lib\site-packages/captcha22\lib\core\server.py", line 20, in server server.main() File "c:\users\User\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 512, in main self.run_server() File "c:\users\User\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 487, in run_server self.check_files() File "c:\users\User\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 398, in check_files self.label_captchas(file) File "c:\users\User\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 323, in label_captchas labels = open(write_dir + "training_labels.txt", "w") FileNotFoundError: [Errno 2] No such file or directory: './Busy/Unsorted\\username/captcha/1/labels/training_labels.txt'

@graham-eisele
Copy link
Author

Also when using the client api, how do you get the CaptchaID?

@TinusGreen
Copy link
Contributor

Hi there,

The current issue is because the code is not fully supported on Windows. Current full support only includes Unix and MacOS.

We will be releasing a new version later which will have Windows support as well.

In terms of the captchaID, it communicates with the server side API to retrieve this value. You can use the command list all captchas to retrieve the captchaIDs of the captchas your user owns.

I'll close this issue once we have Windows support.

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