critical python
In the console
ModuleNotFoundError: No module named 'module'
ImportError: No module named module
Python could not import a module. It is not installed in this server's environment, or the import name differs from the package name (for example 'discord' comes from the 'discord.py' package, 'dotenv' from 'python-dotenv').
How to fix it
- Add the package to requirements.txt (or the egg's 'additional python packages' variable) and restart so it gets installed.
- Check the package name on pypi.org: the import name and the pip name are not always the same.
- If it is your own module, check the file exists and that the working directory is the server root.
error python
In the console
ImportError: cannot import name 'name'
The module exists but no longer (or not yet) contains 'that name'. The installed version of a package differs from the one the code was written for, or two of your files import each other (circular import).
How to fix it
- Pin the package version the code expects in requirements.txt (for example discord.py>=2.3).
- If the error mentions a partially initialized module, restructure the imports to break the circular import.
critical python
In the console
SyntaxError: message
Python could not parse a file: message. Mixed tabs and spaces cause IndentationError/TabError; new syntax (match, :=, f-string changes) needs a newer Python.
How to fix it
- Open the file and line shown just above the error and fix it.
- Use spaces consistently for indentation.
- If the code needs a newer Python, choose that version's Docker image on the Startup page.
warning python
In the console
Traceback (most recent call last):
The program raised an exception. The last line of the traceback names the error and the lines above show where it happened.
How to fix it
- Read the last line of the traceback (the error type and message).
- Follow the file names upward to the first one that is your code; that is where to look.
- If the program exits after this, wrap that part in try/except or fix the cause.
error python
In the console
Could not open requirements file
No such file or directory: ' … requirements.txt'
The startup tried to install packages from requirements.txt but the file is missing from the server's root folder.
How to fix it
- Upload requirements.txt to the server root, or
- Clear the requirements file startup variable if the project does not use one.
error python
In the console
No matching distribution found for package
Could not find a version that satisfies the requirement package
requires a different Python
pip has no release of the package for this Python version or platform, or the name or version in requirements.txt is wrong.
How to fix it
- Check the package name and version pin in requirements.txt against pypi.org.
- Some packages only support certain Python versions; pick a matching Docker image or relax the version pin.
error python
In the console
externally-managed-environment
Newer Debian/Ubuntu based images protect the system Python. pip must install into a virtual environment or the user site instead.
How to fix it
- Use the egg's own install mechanism (it normally passes --user or uses a virtual environment).
- If you control the startup command, install with 'pip install --user -r requirements.txt' or create a venv in the server folder.
info python
In the console
Unclosed client session
Task was destroyed but it is pending
The program exited or restarted without closing a network session or finishing a background task. Harmless on its own, but frequent messages mean resources are leaking.
How to fix it
- Close aiohttp sessions (async with ClientSession() as session) and cancel tasks on shutdown.
- Shut the bot down with its close() method instead of killing the loop.