1
私はただのPython 3.4.3にアップグレードし、コードの一部を書きながら、私はこのエラーを取得されています:のPython 3.4+ PendingDeprecationWarning
PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
これは、Pythonのバージョン関連の問題のように思えます。 ありがとう!
編集:これは全体のエラーは、私は@ Aurora0001により示唆されるように、別のエラーを修正することによってこの問題を解決することができました
/usr/lib/python3.4/imp.py:32: PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
PendingDeprecationWarning)
Traceback (most recent call last):
File "twitter_reddit_bot_2.py", line 139, in <module>
main()
File "twitter_reddit_bot_2.py", line 100, in main
tweeter(post_titles, post_links, post_ids)
File "twitter_reddit_bot_2.py", line 124, in tweeter
api.update_status(tweet_content)
File "/usr/local/lib/python3.4/dist-packages/tweepy/api.py", line 194, in update_status
)(post_data=post_data, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/tweepy/binder.py", line 245, in _call
return method.execute()
File "/usr/local/lib/python3.4/dist-packages/tweepy/binder.py", line 229, in execute
raise TweepError(error_msg, resp, api_code=api_error_code)
tweepy.error.TweepError: [{'message': 'Status is a duplicate.', 'code': 187}]
sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=5, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('192.168.1.10', 50066), raddr=('104.244.42.2', 443)>
/usr/lib/python3.4/importlib/_bootstrap.py:2150: ImportWarning: sys.meta_path is empty
よく 'imp'モジュールは' importlib'のために推奨されていません。 'imp'の全ての使用法を' importlib'の対応する関数に置き換えるか、後で削除するように強制してください –
申し訳ありません 'それを使用してモジュールを変更すること今」。 –
自分自身の説明を良くするためにコメントを更新しました。あなたはこの警告を投げているのですか? –