Skip to content

FAQ

How to solve the failure of uvloop installation?

It's optional

uvloop can improve concurrent performance, but it's optional. If you don't want to install uvloop, you can ignore this step.

On Windows, uvloop is not supported. If you failed installing uvloop on Linux or macOS, you can try to install it with system package manager like apt, yum or brew, pacakge managers provide prebuilt wheels for uvloop.

  • Install with apt
    sudo apt install python3-uvloop
    

attachments folder inside post directory is no need for me

You can set configuration option job.post_structure.attachments to ./

Set the configuration by prod.env dotenv file or system environment variables:

KTOOLBOX_JOB__POST_STRUCTURE__ATTACHMENTS=./

./ means attachments will be downloaded directly into the post directory.

Notice

For more information, please visit Configuration-Guide page.

Commands and flags should use - or _ as seperator?

Both is support, - is suggested.

Filename too long

In some cases, the filename or the post directory name can be too long and caused download failure. To solve this issue, you can set sequential filename or use custom post directory name

Set the configuration by prod.env dotenv file or system environment variables:

# Rename attachments in numerical order, e.g. `1.png`, `2.png`, ...
KTOOLBOX_JOB__SEQUENTIAL_FILENAME=True

# Set the post directory name to its release/publish date and ID, e.g. `[2024-1-1]11223344`
KTOOLBOX_JOB__POST_DIRNAME_FORMAT=[{published}]{id}

How to Configure a Proxy?

You can set the HTTPS_PROXY, HTTP_PROXY, and ALL_PROXY environment variables to achieve this.

Refer to: HTTPX - Environment Variables

For example, set it like this:

# Unix Shell
export HTTPS_PROXY=http://127.0.0.1:7897
export HTTP_PROXY=http://127.0.0.1:7897
export ALL_PROXY=socks5://127.0.0.1:7897
# Windows PowerShell
$env:HTTP_PROXY="http://127.0.0.1:7897"; $env:HTTPS_PROXY="http://127.0.0.1:7897"

GUI Configuration Editor Cannot Be Opened

Note

ktoolbox-pure-py does not support the graphical configuration editor.

By default, the dependencies for the graphical configuration editor are not installed. You can install them using the following command:

pip3 install ktoolbox[urwid]

If you are using pipx:

pipx install ktoolbox[urwid] --force

Kemono API Call Failed

For example:

ktoolbox sync-creator "https://coomer.su/onlyfans/user/hollyharper11" --start-time="2020-05-01" --end-time="2025-01-01"

2024-05-12 12:52:51.477 | INFO     | ktoolbox.cli:sync_creator:271 - Got creator information - {'name': 'hollyharper11', 'id': 'hollyharper11'}
2024-05-12 12:52:51.479 | INFO     | ktoolbox.action.job:create_job_from_creator:148 - Start fetching posts from creator hollyharper11
2024-05-12 12:52:56.477 | ERROR    | ktoolbox.api.base:_retry_error_callback:37 - Kemono API call failed - {'ret': APIRet(code=1002, message="1 validation error for Response\n  Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='<!DOCTYPE html>\\n<html>\\...>\\n  </body>\\n</html>\\n', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.7/v/json_invalid", exception=1 validation error for Response
  Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='<!DOCTYPE html>\n<html>\...>\n  </body>\n</html>\n', input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/json_invalid, data=None)}
1 validation error for Response
  Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='<!DOCTYPE html>\n<html>\...>\n  </body>\n</html>\n', input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/json_invalid

This is generally caused by frequent requests, so you can try setting a higher number of API retry attempts.

# .env / prod.env
KTOOLBOX_API__RETRY_TIMES=10

You can also set this through the graphical configuration editor: API - retry_times.

Others

A community-shared usage guide: #141