google / google/python-fire

AttributeError when calling a method which returns a BeautifulSoup object

オープン
#245 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
28.2k
フォーク
1.5k
PR マージ指標
30日以内にマージされた PR はありません

説明

This is a small example to reproduce the error:

```
import bs4
import fire

assert fire.__version__ == "0.3.1"

class Test:
def get_soup(self):
soup = bs4.BeautifulSoup("

hi

")
return soup

fire.Fire(Test)
```

If I run this file via

```
python test.py get_soup
```

I get the error "AttributeError: 'NoneType' object has no attribute 'get'".

If I run

```
python test.py get_soup -- --interactive
```

the variable result does not contain the expected soup object, but instead ">"

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

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

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