Comments (9)
configuration.xmlの取得失敗後、その次に実行されたAPIでエラーが起きてるようですね。
エラーの内容から推測するとHTTP response headerが正しく取得(もしくは抽出)できていない
のかもしれません。
(setq twittering-debug-mode t)
としておくと通信に使用したbufferを消さずに残すようになります。
twmode-http-bufferという名前のbufferをチェックしてみてください。
nの部分の数字が大きいほど新しいbufferです。問題のエラーが、どういう
HTTP responseに対して起こっているかがわかれば対処できそうです。
ただ、気になる点としては
(setq twittering-use-ssl nil)
としているのに https://api.twitter.com/ にアクセスしているのが不思議です。
from twittering-mode.
ご回答ありがとうございました。
ただ、気になる点としては
(setq twittering-use-ssl nil)
としているのに https://api.twitter.com/ にアクセスしているのが不思議です。
先ほど(setq twittering-use-ssl nil)設定の反映が忘れたので通信がhttpsなっていたです。
改めて設定を反映して、debugモードで実行してみました。やはり、400エラーが出ています。
http通信ログ
[03/Oct/2011 13:31:25] "GET http://api.twitter.com/1/account/verify_credentials.xml HTTP/1.1" 200 - [03/Oct/2011 13:31:26] "GET http://api.twitter.com/1/help/configuration.xml HTTP/1.1" 400 - [03/Oct/2011 13:31:27] "GET http://api.twitter.com/1/statuses/home_timeline.xml?include_entities=true&count=20 HTTP/1.1" 200 -
2個目のリクエストのレスポンスコードが400です。
レスポンス内容は↓
<?xml version="1.0" encoding="UTF-8"?> <hash> <error>Rate limit exceeded. Clients may not make more than 150 requests per hour.</error> <request>/1/help/configuration.xml</request> </hash>
1個目と3個目以降のレスポンス内容は正しいようですが、ライムラインの表示ができないままでした。
from twittering-mode.
すみませんが、何か対処方法はないでしょうか?
from twittering-mode.
400であることが認識できているので、問題なのはconfiguration.xmlの取得の方ではないと思います。
実際、 configuration.xml は取得できなくてもデフォルトの値を使うだけで大きな問題にはならないはずです。
問題はその次に発行されるhome timeline 取得でのサーバ応答でしょうね。home timelineの方のbufferは残って
ないでしょうか?
また、
(setq debug-on-error t)
としておくと、split-stringのエラーのbacktraceが取得できると思います。どの関数でエラーになって
いるのかがわかるので手がかりになります。
ただ、 configuration.xml 取得のエラー内容は少し変です。OAuthの場合はrate limitは150ではなく350になる
はずです。さらにrate limitでエラーが出ているなら次のhome timeline 取得でも同じエラーになるはずですが
HTTP response status 200を返すのもおかしいです。
もしかして何か別のTwitter互換サービスをお使いだったりしますか?
from twittering-mode.
400であることが認識できているので、問題なのはconfiguration.xmlの取得の方ではないと思います。
実際、 configuration.xml は取得できなくてもデフォルトの値を使うだけで大きな問題にはならないはずです。
問題はその次に発行されるhome timeline 取得でのサーバ応答でしょうね。home timelineの方のbufferは残って
ないでしょうか?
実はconfiguration.xmlの取得は成功したり、失敗したりなのでした。
configuration.xml取得の成功、失敗に関わらずhome_timeline.xml間隔的取得で次のようなxmlが返してくれる。
<?xml version="1.0" encoding="UTF-8"?> <statuses type="array"> <status> ....省略 </status> <status> ....省略 </status> </statuses>
だが、_home_バッファーに何も表示されていない。
home_timeline.xml取得するたびにsplit-stringのエラーが起きる。
backtraceの内容が長すぎで、段取りして貼ります。
Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match(";" nil 0) split-string(nil ";") (cdr (split-string content-type ";")) (let* ((content-type ...) (parameters ...) (regexp "^[[:space:]]*chars (cond ((or ...) (debug-printf "connection-info=%s" connection-info) (l (case-string status-code (("200") (debug-printf "connection-info=%s" c (let ((status-line ...) (status-code ...)) (case-string status-code (. twittering-http-get-default-sentinel(#process *twmode-generic* 1 ex apply(twittering-http-get-default-sentinel #process *twmode-generic* 省略
内容から見るとtwittering-http-get-default-sentinel関数でhrader-infoリストから
Content-Type要素を参照しようとしているがnilで落ちている。
header-infoリストを確認したところ、Content-Type要素がなくて、小文字のcontent-type要素となって
いる。試しに小文字のcontent-type要素を参照するようにソースを直してみた、_home_バッファーにタ
イムラインの内容がちゃんと表示できた。;-)
次ぎはheader-infoの一部です。
header-info '( ("status-line" . "HTTP/1.0 200 OK") ("http-version" . "HTTP/1.0") ("status-code" . "200") ("reason-phrase" . "OK") ("Server" . "BaseHTTP/0.3 Python/2.6.3") ("Date" . "Tue, 04 Oct 2011 02:26:12 GMT") ("via" . "HTTP/1.1 GWA") ("vary" . "Accept-Encoding") ;; 省略 ("content-type" . "application/xml; charset=utf-8") ;; 省略 )
もしかして何か別のTwitter互換サービスをお使いだったりしますか?
いいえ、別のTwitter互換サービスは利用していないです。
ただしプロキシサーバーは自分のGAE appspotに乗っているサービスを利用しているけど、
それに関係するかもしれない。
一応問題解決できたのでIssueをクローズさせていただきます。
いろいろとアドバイスして頂いて、ありがとうございました。
from twittering-mode.
According to RFC2616, field names of HTTP header should be case-insensitve.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2.
So, this issue should be treated as a bug of twittering-mode. I will commit the fix of the bug soon.
Can I mention your name as the reporter of this bug in the ChangeLog of the fix?
If you allow it, which name do you prefer? luozengbin or other?
from twittering-mode.
thanks for you information about RFC2616. I would like to use luozengbin as the reporter name.
from twittering-mode.
I have commited the fix.
Would you please try it?
If it works well, close this issue, please.
from twittering-mode.
it works well. thanks.
from twittering-mode.
Related Issues (20)
- the newest curl doesn't spew binary without --output option
- no icons display and curl exiting with error HOT 2
- Add support for Twitter's new 280 character limit HOT 2
- Highlight current tweet HOT 1
- buffer stuck in right-to-left mode
- getting the cited-id from a newly posted tweet? HOT 1
- twittering-update-service-configuration-sentinel: Format "nil" is not supported HOT 3
- Saving my tweets
- displaying tweet information (likes, retweets, ...) HOT 2
- Doesn't work with emacs 27 development branch HOT 2
- epa--decode-coding-string not defined HOT 6
- Viewing :direct_messages buffer causes a 404
- Tweet too long in Retweets HOT 1
- Can I configure twmode to reauthorize less frequently? HOT 1
- Doc link is missing/moved. HOT 1
- Has this repo been abandoned? HOT 1
- Note to all who come hither: Package unmaintained, several deprecated dependencies
- Package cl is deprecated HOT 2
- 403 on all updates HOT 2
- Twitter mode hangs on encryption
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twittering-mode.