teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

文章追加

2018/03/25 08:31

投稿

MAXGAMS
MAXGAMS

スコア7

title CHANGED
File without changes
body CHANGED
@@ -2,7 +2,8 @@
2
2
  超初心者です。
3
3
  Twitterの自動化ツールを作りたいと思っています。
4
4
  10分間に一回英単語をtweetするソフトを作成したいです。
5
- しかし、上手くいきません
5
+ 起動すれば一回目のツイートはできま
6
+ しかし、whileで数分毎にtweetしようとするとエラーが発生します。
6
7
  どうすれば良いですか?
7
8
 
8
9
  ### 発生している問題・エラーメッセージ

2

エラーの変更

2018/03/25 08:31

投稿

MAXGAMS
MAXGAMS

スコア7

title CHANGED
File without changes
body CHANGED
@@ -8,7 +8,18 @@
8
8
  ### 発生している問題・エラーメッセージ
9
9
 
10
10
  ```
11
+ Traceback (most recent call last):
12
+ File "loop.py", line 47, in <module>
13
+ main()
14
+ File "loop.py", line 36, in main
15
+ makeApi().update_status(random.choice(STATUS_DATA))
16
+ File "C:\Users\root\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tweepy\api.py", line 194, in update_status
17
+ )(post_data=post_data, *args, **kwargs)
18
+ File "C:\Users\root\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tweepy\binder.py", line 250, in _call
19
+ return method.execute()
20
+ File "C:\Users\root\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tweepy\binder.py", line 234, in execute
11
- IndentationError: unindent does not match any outer indentation level
21
+ raise TweepError(error_msg, resp, api_code=api_error_code)
22
+ tweepy.error.TweepError: [{'code': 187, 'message': 'Status is a duplicate.'}]
12
23
  ```
13
24
 
14
25
  #コード
@@ -55,8 +66,8 @@
55
66
  return tweepy.API(auth)
56
67
 
57
68
  while True:
58
- main()
69
+ main()
59
- print('1')
70
+ print('1')
60
71
  time.sleep(10)
61
72
  ```
62
73
  ```

1

コード

2018/03/25 08:04

投稿

MAXGAMS
MAXGAMS

スコア7

title CHANGED
File without changes
body CHANGED
@@ -13,6 +13,7 @@
13
13
 
14
14
  #コード
15
15
 
16
+ ```Python
16
17
  import tweepy
17
18
  import random
18
19
  import signal
@@ -56,4 +57,6 @@
56
57
  while True:
57
58
  main()
58
59
  print('1')
59
- time.sleep(10)
60
+ time.sleep(10)
61
+ ```
62
+ ```