|  06-23-2017, 07:34 AM | #31 | 
| Wizard            Posts: 1,841 Karma: 4985051 Join Date: Sep 2010 Location: Maryland Device: Kindle | 
			
			I've found after the initial failed restart of Calibre on a boot up of the computer, the restarts after that work. This is Win10 (1703 15063.413).
		 | 
|   |   | 
|  06-23-2017, 07:36 AM | #32 | 
| null operator (he/him)            Posts: 22,010 Karma: 30277294 Join Date: Mar 2012 Location: Sydney Australia Device: none | |
|   |   | 
|  06-23-2017, 07:38 AM | #33 | |
| null operator (he/him)            Posts: 22,010 Karma: 30277294 Join Date: Mar 2012 Location: Sydney Australia Device: none | Quote: 
 So calibre restart fails, you do a reboot, and now calibre restart works? What about a logoff/logon? BR | |
|   |   | 
|  06-23-2017, 07:41 AM | #34 | |
| Wizard            Posts: 1,841 Karma: 4985051 Join Date: Sep 2010 Location: Maryland Device: Kindle | Quote: 
 The automatic restart fails; I start calibre from the program icon, and if I restart from within the program it'll work. Haven't tried with a logoff. Too many browser tabs open at the moment.   | |
|   |   | 
|  06-23-2017, 07:54 AM | #35 | |
| null operator (he/him)            Posts: 22,010 Karma: 30277294 Join Date: Mar 2012 Location: Sydney Australia Device: none | Quote: 
 Are you saying when restart fails, you start it from desktop icon, and now restart works, what happens if you do another restart? BR | |
|   |   | 
|  06-23-2017, 08:12 AM | #36 | 
| Wizard            Posts: 1,841 Karma: 4985051 Join Date: Sep 2010 Location: Maryland Device: Kindle | 
			
			When attempting to restart Calibre within the program fails, I start it from the desktop icon. For whatever reason, I can then restart Calibre within the program (it's restarted multiple times). If I exit Calibre, re-open, and attempt a restart within the program, it will restart.
		 | 
|   |   | 
|  06-23-2017, 08:24 AM | #37 | 
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | 
			
			In my case the "restart" calibre command always fails if I am not running from source. @kovid: I replaced main.py with logging. Using the code: Code:                 x = subprocess.Popen([e] + args)
                prints('after Popen:', x, file=open('c:/users/charles/log.txt', 'a'))
                time.sleep(3)
                x.poll()
                prints('after poll:', x.returncode, file=open('c:/users/charles/log.txt', 'a'))It occurred to me that the startup might be fast enough where the restarted calibre is seeing the original one and refusing to start. One difference between Home and Pro might be the order that windows runs new processes. To test this I changed main.py as follows: - first discard all previous changes then: Code: def main(args=sys.argv):
    time.sleep(1)
    if iswindows and 'CALIBRE_REPAIR_CORRUPTED_DB' in os.environ:
        windows_repair()
        return 0 | 
|   |   | 
|  06-23-2017, 08:25 AM | #38 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			@chaley: That would imply something is happening before launching the child, which means the only way to debug is via replacing gui2/main.py in pylib.zip, I'm afraid. I suspect what is happening is that sys.executable is wrong probably does not contain the absolute path. So launching it is failing.
		 | 
|   |   | 
|  06-23-2017, 08:26 AM | #39 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			@chaley: Disregard my previous post, cross post.
		 | 
|   |   | 
|  06-23-2017, 08:27 AM | #40 | 
| null operator (he/him)            Posts: 22,010 Karma: 30277294 Join Date: Mar 2012 Location: Sydney Australia Device: none | 
			
			@copyrite - bizarro, hopefully your input might give kovid/chaley some clues. AFAIK & FWIW - you can't buy a MS Surface Pro, Laptop, Book or Studio with Windows 10 Home edition for love or money, even the new Win 10S they're putting on the Surface Laptop models upgrades to Pro. BR | 
|   |   | 
|  06-23-2017, 08:32 AM | #41 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			@chaley: I pushed a fix that should do the trick. Need to check restarting in debnug mode as well.
		 | 
|   |   | 
|  06-23-2017, 08:43 AM | #42 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 
   | |
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| calibre not working in windows 8.1 | snbhat1 | Calibre | 2 | 11-06-2015 12:58 PM | 
| Calibre Updates not working on Windows 8.1 | rex176 | Devices | 3 | 04-18-2014 08:07 PM | 
| Calibre Stops Working Windows 8 | Sydney's Mom | Calibre | 13 | 03-29-2013 08:01 PM | 
| Jetbook not working with Windows 7 | tselling | Ectaco jetBook | 4 | 01-15-2010 01:10 PM | 
| PRS-500 working fine on 64-bit windows | fleon | Calibre | 0 | 05-21-2009 04:46 AM |