Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-21-2011, 07:12 AM   #1
forceps
Enthusiast
forceps doesn't litterforceps doesn't litter
 
Posts: 26
Karma: 168
Join Date: May 2005
Location: Wuhan, China
Device: Kindle DXG
HTTP Error 504 when fetch news from an intranet

Running calibre 0.8 on debian squeeze, when fetch New York Times from a corporate network, calibre give following error message:

Traceback (most recent call last):
File "site.py", line 58, in main
File "site-packages/calibre/ebooks/conversion/cli.py", line 282, in main
File "site-packages/calibre/ebooks/conversion/plumber.py", line 920, in run
File "site-packages/calibre/customize/conversion.py", line 204, in __call__
File "site-packages/calibre/web/feeds/input.py", line 101, in convert
File "site-packages/calibre/web/feeds/news.py", line 632, in __init__
File "/tmp/calibre_0.8.0_tmp_w1kmw3/calibre_0.8.0_ZFyno8_recipes/recipe0.py", line 326, in get_browser
br.open('http://www.nytimes.com/auth/login')
File "site-packages/mechanize/_mechanize.py", line 203, in open
File "site-packages/mechanize/_mechanize.py", line 255, in _mech_open
httperror_seek_wrapper: HTTP Error 504: Gateway Timeout

new york times is the only recipe failed so far. On the same LAN, The NY times website open without any problem in firefox. I tried pipe all traffic through a local http proxy, which itself use a upsteam socks proxy, to bypass the corporate proxy or filter server, but get the same error message.

Any suggestions?
forceps is offline   Reply With Quote
Old 07-29-2011, 11:26 PM   #2
forceps
Enthusiast
forceps doesn't litterforceps doesn't litter
 
Posts: 26
Karma: 168
Join Date: May 2005
Location: Wuhan, China
Device: Kindle DXG
Solved.

nytimes needs https, however, calibre currently ignore https proxy setting. After modified /src/calibre/__init__.py, the nytimes recipe works again.

----------------------------------------------------------------------------
https_proxy = get_proxies().get('https', None)
if https_proxy:
opener.set_proxies({'https':http_proxy})
if http_proxy and https_proxy:
opener.set_proxies({'https':http_proxy, 'http':http_proxy})
----------------------------------------------------------------------------
forceps is offline   Reply With Quote
Advert
Old 07-30-2011, 12:01 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Added.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion error in news fetch kwolf Calibre 3 08-23-2010 03:38 PM
Fetch News error CSSRuleList rjaaa Calibre 2 05-02-2010 07:23 PM
Can't Fetch News Catew Calibre 2 07-19-2009 07:46 PM
Error in .91 Fetch news Mitchll Calibre 15 10-05-2008 04:52 PM
Error in the Fetch News luck0602 Calibre 11 08-11-2008 03:11 AM


All times are GMT -4. The time now is 09:35 PM.


MobileRead.com is a privately owned, operated and funded community.