AttributeError: 'HTTPClient' object has no attribute '_closed'

オープン
#65 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
django, python
領域
cli

調査の方向性

エントリポイント gaffer load Procfile から始め、gaffer/httpclient/base.py と gaffer/tornado_pyuv.py を調査してください。トレースバックから、初期化とクリーンアップが失敗していることが分かります。このパスで使用されている pyuv 統合の互換性を確認し、報告された Python 環境でコマンドを再現してください。Procfile の読み込みで _closed または unref の AttributeError が発生しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Gaffer version: gaffer version 0.5.2

I have a Django 2.0 application deployed on VPS with virtual environment setup using pipenv.

At present, using this command to run the application from terminal in background.

/root/.local/bin/pipenv run /home/user/.local/share/virtualenvs/app.application.com-IuTkL8w_/bin/gunicorn myapp.wsgi:application &

Now, I want to configure using Procfile and gaffer.

I added a file Procfile to root of the application directory with command

web: gunicorn myapp.wsgi --log-file - --log-level debug

and trying to load it with gaffer

$ cd myproject
$ gaffer load Procfile

but it is giving error as

Traceback (most recent call last):
  File "/usr/local/bin/gaffer", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/gaffer/cli/main.py", line 252, in main
    cli.run()
  File "/usr/local/lib/python3.6/site-packages/gaffer/cli/main.py", line 193, in run
    config = Config(self.args)
  File "/usr/local/lib/python3.6/site-packages/gaffer/cli/main.py", line 87, in __init__
    api_key=api_key, **self.client_options)
  File "/usr/local/lib/python3.6/site-packages/gaffer/httpclient/server.py", line 22, in __init__
    super(Server, self).__init__(uri, loop=loop, **options)
  File "/usr/local/lib/python3.6/site-packages/gaffer/httpclient/base.py", line 86, in __init__
    self.client = HTTPClient(loop=loop)
  File "/usr/local/lib/python3.6/site-packages/gaffer/httpclient/base.py", line 42, in __init__
    self._io_loop = IOLoop(_loop=loop)
  File "/usr/local/lib/python3.6/site-packages/gaffer/tornado_pyuv.py", line 54, in __init__
    self._waker = Waker(self._loop)
  File "/usr/local/lib/python3.6/site-packages/gaffer/tornado_pyuv.py", line 28, in __init__
    self._async.unref()
AttributeError: 'pyuv._cpyuv.Async' object has no attribute 'unref'
Exception ignored in: <bound method HTTPClient.__del__ of <gaffer.httpclient.base.HTTPClient object at 0x7f96746c5b00>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/gaffer/httpclient/base.py", line 50, in __del__
    self.close()
  File "/usr/local/lib/python3.6/site-packages/gaffer/httpclient/base.py", line 54, in close
    if not self._closed:
AttributeError: 'HTTPClient' object has no attribute '_closed'

How to solve this AttributeError: 'HTTPClient' object has no attribute '_closed' error?

主要言語
Python
スター
365
フォーク
32
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

benoitc/gaffer のほかの issue

benoitc/gaffer の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。