質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Q&A

解決済

2回答

1674閲覧

Herokuにデプロイしたい

Iksch

総合スコア15

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

0グッド

1クリップ

投稿2018/09/19 00:50

編集2018/09/19 14:13

発生している問題・エラーメッセージ

HerokuにPythonのbotをデプロイしたいのですが、pushしたときにエラーが出て困ってます

console

1$ git push heroku master
error: failed to push some refs to 'https://git.heroku.com/iksdisbot001.git'

補足情報(FW/ツールのバージョンなど)

win10
python3.6.5


回答にあったこちらを実行したところ

$ git push origin :branch-name fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. $ git push origin branch-name error: src refspec branch-name does not match any. error: failed to push some refs to 'origin'

追記

$ git push heroku :branch-name error: unable to delete 'branch-name': remote ref does not exist error: failed to push some refs to 'https://git.heroku.com/disiksbot2.git' $ git push heroku branch-name error: src refspec branch-name does not match any. error: failed to push some refs to 'https://git.heroku.com/disiksbot2.git'
$ git push heroku master Enumerating objects: 6, done. Counting objects: 100% (6/6), done. Delta compression using up to 4 threads Compressing objects: 100% (4/4), done. Writing objects: 100% (6/6), 1.91 KiB | 653.00 KiB/s, done. Total 6 (delta 0), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Python app detected remote: ! The latest version of Python 3.6 is python-3.6.6 (you are using python-3.6.5, which is unsupported). remote: ! We recommend upgrading by specifying the latest version (python-3.6.6). remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes remote: -----> Installing python-3.6.5 remote: -----> Installing pip ~(入りきらなかった為、中略)~ remote: No matching distribution found for pywin32==223 (from -r /tmp/build_aaa89c5c08ef59044e2244fc58efec64/requirements.txt (line 32)) remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to disiksbot2. remote: To https://git.heroku.com/disiksbot2.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/disiksbot2.git'

すみません...
pushする前にコミットの部分でエラーが出てました

$ git commit -m "my first commit" On branch master nothing to commit, working tree clean

更新遅くなりました
こちらの記事を参考に作成していました

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2018/09/19 02:47

origin ではなく herokuですね。
Iksch

2018/09/19 02:56

ありがとうございます。originをherokuに変えて入力したところ、error: unable to delete 'iksdisbot001': remote ref does not existとエラーが出たのですが、ブランチ名とはどこのことでしょうか。
退会済みユーザー

退会済みユーザー

2018/09/19 03:00

ブランチ名はmasterのことです。ただ、こちらも勘違いしていたようです。このQiitaの記事の件とは関係ないかもしれません。
退会済みユーザー

退会済みユーザー

2018/09/19 03:03

エラーの全文を見せていただけませんか
Iksch

2018/09/19 03:07

わかりました。もう少し過去記事を漁ってみます
Iksch

2018/09/19 03:16

一部省略しましたがpushした際のエラー文を載せさせて頂きました
退会済みユーザー

退会済みユーザー

2018/09/19 06:13

入り切らなかったため中略の部分が肝心な気がします。最初からどういう経緯で、どんなプロジェクトで構成されているのかまで詳細に記さないと判断する余地がありません。
退会済みユーザー

退会済みユーザー

2018/09/19 10:07

参考にした記事や書籍などがあれば追記おねがいします。
退会済みユーザー

退会済みユーザー

2018/09/19 15:01

ローカルの環境で動くことは確認しましたか?
Iksch

2018/09/19 17:57

必要以上のライブラリがよみこまれていたため、動いてなかったようです
guest

回答2

0

自己解決

pywin32がlinux環境では動かないようでパッケージが読み込まれずにエラーが起きていたようです。
virtualenvで仮想環境を作って必要なパッケージのみインストールして、pip freeze > requirements.txtで書き換えたところすんなりいけました

投稿2018/09/19 18:04

Iksch

総合スコア15

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

仮想環境を作り、必要なパッケージだけをインストールしたところ正常に動作しました。
pip freeze > requirements.txt

投稿2018/09/19 18:06

Iksch

総合スコア15

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問