推送被拒绝,无法编译Python应用程序错误Discord.py [英] Push rejected, failed to compile Python app error Discord.py

查看:40
本文介绍了推送被拒绝,无法编译Python应用程序错误Discord.py的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试推动我时,出现此错误:

When I try to push my I get this error:

C:\Users\emirs\PycharmProjects\discordmasterbot>git push heroku master
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.6.10
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting git+https://github.com/Rapptz/discord.py@rewrite (from -r 
/tmp/build_9aeec3d177cff34ed7cd7b5bc8e84eca/requirements.txt (line 1))
remote:          Cloning https://github.com/Rapptz/discord.py (to revision rewrite) to /tmp/pip-req-build-pexa63lg 
build-pexa63lg
remote:          Running command git clone -q https://github.com/Rapptz/discord.py /tmp/pip-req- 
build-pexa63lg
remote:          WARNING: Did not find branch or tag 'rewrite', assuming revision or ref.
remote:          Running command git checkout -q rewrite
remote:          error: pathspec 'rewrite' did not match any file(s) known to git.
remote:        ERROR: Command errored out with exit status 1: git checkout -q rewrite Check the logs 
for full command output.
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to discordmasterbot.
remote:
To https://git.heroku.com/discordmasterbot.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/discordmasterbot.git'

我的requirements.txt是这样的:

And my requirements.txt is like that:

discord.py==1.3.3
PyNaCl==1.3.0
pandas
dnspython==1.16.0
async-timeout==3.0.1

我的程序的导入"部分:

And my programs "import" section:

import json
import os
import random
import shutil
from os import system
from random import randint
import praw
import discord
import youtube_dl
from discord.ext import commands, tasks
from discord.utils import get
import aiohttp
from itertools import cycle

我真的很想在Heroku中托管我的机器人,但我不能!我认为 requirements.txt 可能是个问题,所以这就是为什么我把整个导入部分都放在了

I really want to host my bot in Heroku, but I can't! I think that It might be a problem with the requirements.txt and so thats why I've put my whole import section

推荐答案

git + https://github.com/Rapptz/discord.py@rewrite 不再存在,因为现在重写master分支和异步版本(0.16.x)已弃用.

git+https://github.com/Rapptz/discord.py@rewrite no longer exists, as rewrite is now the master branch and the async version (0.16.x) has been deprecated.

您可以将 requirements.txt 中的该行替换为 discord.py == 1.3.3 (此答案时为最新版本)或删除<最后是code> @rewrite .

You can just replace that line in requirements.txt with discord.py==1.3.3 (most recent version at the time of this answer) or remove @rewrite from the end.

这篇关于推送被拒绝,无法编译Python应用程序错误Discord.py的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆