Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 03-07-2014, 09:12 PM   #16
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: 45,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@charles: From looking at the traceback, it looks like buildfullreg in route.py is returning an expression that contains a regex with a named group named /ajax. Which presumably comes from self.routelist having a part with name=/ajax

Why it should be doing that puzzles me.
kovidgoyal is offline   Reply With Quote
Old 03-07-2014, 09:15 PM   #17
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: 45,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The only difference that I can see between the ajax routes and the rest are that the ajax routes are unicode strings, the rest are not, (because of the from __future__ import unicode_literals in ajax.py)

Presumably, changing those strings to bytestrings should fix it, though given that I dont understand what the bug in routes is, I have no way to be sure.
kovidgoyal is offline   Reply With Quote
Old 03-07-2014, 09:26 PM   #18
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: 45,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Looking through the routes code, I have to say I am not impressed. I shall look into getting rid of it when I do my content server refactor. Mapping URLs to functions should not be that hard

It may be that updating to routes 2.0 will fix the unicode issue since it purports to support python 3, but given that it may break other things, it's not something I want to do.
kovidgoyal is offline   Reply With Quote
Old 03-08-2014, 01:51 AM   #19
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,465
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
The only difference that I can see between the ajax routes and the rest are that the ajax routes are unicode strings, the rest are not, (because of the from __future__ import unicode_literals in ajax.py)

Presumably, changing those strings to bytestrings should fix it, though given that I dont understand what the bug in routes is, I have no way to be sure.
This is why I was asking about languages. I was wondering if we had some character encoding issue that prevented all that string manipulation in buildfullreg from working.
chaley is offline   Reply With Quote
Old 03-08-2014, 03:10 AM   #20
BumbleBernie
Member
BumbleBernie began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2014
Device: Kindle
Windows set to English, keyboard to German.
BumbleBernie is offline   Reply With Quote
Old 03-08-2014, 03:15 AM   #21
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: 45,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Well I have committed the change to convert all routes to bytestrings, which may fix it for you in the next release.
kovidgoyal is offline   Reply With Quote
Old 03-08-2014, 04:12 AM   #22
BumbleBernie
Member
BumbleBernie began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2014
Device: Kindle
Calibre behavior is unchanged in 1.27
Same error in 32 and 64 bit version
BumbleBernie is offline   Reply With Quote
Old 03-08-2014, 04:53 AM   #23
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by BumbleBernie View Post
Calibre behavior is unchanged in 1.27
Same error in 32 and 64 bit version
As 1.27 was released before Kovid made the change, you won't see this until 1.28.
davidfor is offline   Reply With Quote
Old 03-16-2014, 05:48 AM   #24
BumbleBernie
Member
BumbleBernie began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2014
Device: Kindle
Calibre 1.28 shows the same error

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
File "site-packages\cherrypy\_cprequest.py", line 628, in respond
File "site-packages\cherrypy\_cprequest.py", line 744, in get_resource
File "site-packages\cherrypy\_cpdispatch.py", line 478, in __call__
File "site-packages\cherrypy\_cpdispatch.py", line 493, in find_handler
File "site-packages\routes\__init__.py", line 22, in __setattr__
File "site-packages\routes\__init__.py", line 51, in load_wsgi_environ
File "site-packages\routes\mapper.py", line 690, in routematch
File "site-packages\routes\mapper.py", line 609, in _match
File "site-packages\routes\mapper.py", line 560, in create_regs
File "site-packages\routes\mapper.py", line 578, in _create_regs
File "site-packages\routes\route.py", line 306, in makeregexp
File "re.py", line 190, in compile
File "re.py", line 242, in _compile
error: bad character in group name '/ajax'
BumbleBernie is offline   Reply With Quote
Old 03-16-2014, 06:16 AM   #25
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,465
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BumbleBernie View Post
Calibre 1.28 shows the same error

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
File "site-packages\cherrypy\_cprequest.py", line 628, in respond
File "site-packages\cherrypy\_cprequest.py", line 744, in get_resource
File "site-packages\cherrypy\_cpdispatch.py", line 478, in __call__
File "site-packages\cherrypy\_cpdispatch.py", line 493, in find_handler
File "site-packages\routes\__init__.py", line 22, in __setattr__
File "site-packages\routes\__init__.py", line 51, in load_wsgi_environ
File "site-packages\routes\mapper.py", line 690, in routematch
File "site-packages\routes\mapper.py", line 609, in _match
File "site-packages\routes\mapper.py", line 560, in create_regs
File "site-packages\routes\mapper.py", line 578, in _create_regs
File "site-packages\routes\route.py", line 306, in makeregexp
File "re.py", line 190, in compile
File "re.py", line 242, in _compile
error: bad character in group name '/ajax'
Could you post a calibre debug log for a session where the error occurred? Start calibre, click the triangle/arrow next to preferences, choose "Restart in debug mode". After calibre restarts, attempt to connect to the content server, then quit calibre. Post the output that appears in the window that pops up.
chaley is offline   Reply With Quote
Old 03-16-2014, 07:26 AM   #26
BumbleBernie
Member
BumbleBernie began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2014
Device: Kindle
Here is the log:
--------------------
calibre Debug log
calibre 1.28 [64bit] isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.5
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Starting up...
Started up in 17.13 seconds with 1431 books
SMART_DEV ( 0.12: 0.125) _attach_to_port try ip address "" on port 9091
SMART_DEV ( 1.08: 0.827) startup_on_demand listening on port 9091
SMART_DEV ( 1.19: 0.047) _attach_to_port try ip address "" on port 54982
SMART_DEV ( 1.25: 0.000) startup_on_demand broadcast socket listening on port 54982
SMART_DEV ( 2.34: 1.029) run All IP addresses {'{846EE342-7039-11DE-9D20-806E6F6E6963}': [{'broadcast': '127.255.255.255', 'netmask': '255.0.0.0', 'addr': '127.0.0.1'}], '{161D3BC3-6121-4E1F-BD75-E40CFFE09088}': [{'addr': '169.254.143.203'}], '{0321AD0D-F905-447F-8FF8-6CE6AE12CD93}': [{'broadcast': '192.168.11.255', 'netmask': '255.255.255.0', 'addr': '192.168.11.4'}]}
-------------------------------------------

I did notice that port 8080 does not show up, but the port for wireless device connection 9091 (which I set instead of 9090). According to a responce from Steve, Calibre Companion) this should make no difference.

I now set to port to 9090 and suddenly the local access via Firefox worked.
Here is the log:
-------------------
calibre Debug log
calibre 1.28 [64bit] isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.5
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Starting up...
Started up in 14.44 seconds with 1431 books
SMART_DEV ( 0.02: 0.016) _attach_to_port try ip address "" on port 9090
SMART_DEV ( 1.00: 0.873) startup_on_demand listening on port 9090
SMART_DEV ( 1.09: 0.031) _attach_to_port try ip address "" on port 54982
SMART_DEV ( 1.17: 0.000) startup_on_demand broadcast socket listening on port 54982
SMART_DEV ( 2.25: 1.029) run All IP addresses {'{846EE342-7039-11DE-9D20-806E6F6E6963}': [{'broadcast': '127.255.255.255', 'netmask': '255.0.0.0', 'addr': '127.0.0.1'}], '{161D3BC3-6121-4E1F-BD75-E40CFFE09088}': [{'addr': '169.254.143.203'}], '{0321AD0D-F905-447F-8FF8-6CE6AE12CD93}': [{'broadcast': '192.168.11.255', 'netmask': '255.255.255.0', 'addr': '192.168.11.4'}]}
-------------------------------------

Why is the wireless port selected causing this being unable to connect to the server on 8080?

I am puzzled. I did try this now 3 times 9090 wireless works, 9091 wireless fails.

Addition:
The 3 times I did not restart Calibre.
After restarting it using 9090 - no error.
Changing to 9091 again and restarting Calibre - no error.

Still puzzled - but it works now.

Thanks for all the help !

Last edited by BumbleBernie; 03-16-2014 at 07:35 AM.
BumbleBernie is offline   Reply With Quote
Old 03-16-2014, 07:45 AM   #27
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,465
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BumbleBernie View Post
Addition:
The 3 times I did not restart Calibre.
After restarting it using 9090 - no error.
Changing to 9091 again and restarting Calibre - no error.

Still puzzled - but it works now.

Thanks for all the help !
I agree with you, this is very puzzling. I wonder if the wireless device driver configuration file was somehow corrupted, and changing the port rewrote it. Or perhaps Kovid's changes made the difference, but they required changing a config file. I can see no reason that either of these should be the case, but clearly something changed.

BTW: Steve is correct. You can use 9091 as the CC if you want to. I am the author of the wireless device driver and co-author of calibre companion (CC). Does CC now work for you as it should?
chaley is offline   Reply With Quote
Old 03-16-2014, 08:59 AM   #28
BumbleBernie
Member
BumbleBernie began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2014
Device: Kindle
Yes, CC works - but it needs always connection to Calibre, unless one downloads all books to the CC (too much for several 1000 books). I thought it could download just the catalog too.
BumbleBernie is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Content Server and Windows Home Server 2011 HughMcC Calibre 8 10-01-2014 07:26 AM
500 Internal Server Error accessing content server Calibre 0.8.8 DaddyO57 Calibre 1 07-20-2012 06:08 PM
PRS-T1 to access the Content Server martingUSA Devices 6 12-24-2011 02:05 PM
Content server not serving all content. False_Chicken Calibre 0 10-19-2011 05:56 PM
Access calibre content server with Nook Color astrodad Nook Color & Nook Tablet 18 06-02-2011 11:05 AM


All times are GMT -4. The time now is 04:24 PM.


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