#python3: can't open file '//main.py': [Errno 2] No such file or directory

15 messages · Page 1 of 1 (latest)

grave vale
#

I'm trying to run my Discord bot, however, it's saying that /main.py doesn't exist, which it does?

glad finch
grave vale
#

Yup, it'll just resort to

python3: can't open file '//./main.py': [Errno 2] No such file or directory

glad finch
glad wolf
#

What's your startup command?

grave vale
grave vale
glad wolf
#

What egg are you using? That's not the full startup in the generic Python egg.

grave vale
#

Eggdactyl with this install script


# Move to Pterodactyl server directory
cd / || exit 1

# Update and install required packages
apt-get update
apt-get install -y python3 python3-pip git curl

# Ensure 'python' points to 'python3'
if ! command -v python &> /dev/null; then
  ln -s /usr/bin/python3 /usr/bin/python
fi

# Clone repo into this directory if GIT_REPO is set
if [ -n "$GIT_REPO" ]; then
  git clone -b "$GIT_BRANCH" "https://${GIT_PAT:+$GIT_PAT@}$GIT_REPO" .
fi

# Upgrade pip and install dependencies
python3 -m pip install --upgrade pip
pip3 install -U discord.py

if [ -f requirements.txt ]; then
  pip3 install -r requirements.txt
fi

echo "✅ Bot setup complete. Running bot..."
eval ${STARTUP_CMD}```
#

@glad wolf

glad wolf
#

Multi-eggs aren't supported here, and if it comes with an install script besides the one built into the egg, that just adds more complexity. Try the generic Python egg and I'll bet it works right off the bat.

cosmic ospreyBOT
grave vale
#

Oh, sorry, it's not Eggdactyl, it's one I found online