Defect #73
Binary version of Synclosure version 0.2 doesn't work
| Status: | Closed | Start date: | 01/04/2011 | |
|---|---|---|---|---|
| Priority: | Urgent | Due date: | ||
| Assignee: | Deoren Moor | % Done: | 0% |
|
| Category: | Configuration | |||
| Target version: | 0.2.1 | |||
| Affected Version: | 0.2 | Resolution: | Fixed |
Description
Looks like this has been broken since the modifications in r72 for #52. That's embarrassing.
Output from running:
Synclosure dev-svn-r115 ----------------------------------------------------------------- Copyright (c) 2004 Raphael Balimann Copyright (c) 2007 deoren of WhyAskWhy.org Licensed under the GPL. See License.txt for details. ----------------------------------------------------------------- [error] couldnt create/access/read file (C:\Program Files\WhyAskWhy.org\Synclosure\synclosure.exe\sources.ini), check permissions.
Error:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec code in m.__dict__
File "synclosure.py", line 490, in <module>
File "synclosure.py", line 416, in main
TypeError: object of type 'bool' has no len()
Associated revisions
[issues #73]
Applying fix for broken compiled script (0.2 release) to the trunk.
History
#1 Updated by Deoren Moor over 1 year ago
This is telling:
Synclosure\synclosure.exe\sources.ini
Basically the
sys.path[0]value reads differently depending on whether the code is "frozen" or not.
#2 Updated by Deoren Moor over 1 year ago
- Target version changed from 0.3 to 0.2.1
#3 Updated by Deoren Moor over 1 year ago
This is what I've come up with:
1Index: synclosure.py
2===================================================================
3--- synclosure.py (revision 116)
4+++ synclosure.py (working copy)
5@@ -11,6 +11,7 @@
6 # Built-in modules
7 import sys
8 import os
9+import os.path
10 import urllib2
11 import ConfigParser
12
13@@ -54,9 +55,15 @@
14
15 feedlist, enclosures, oldenclosures, nl = [], [], [], '\n'
16
17+ # Has the script been "wrapped" into an executable?
18+ if hasattr(sys, "frozen"):
19+ config_path = os.path.split(sys.executable)[0]
20+ else:
21+ config_path = sys.path[0]
22+
23 #OptParse is a pain, so as of now i'm sticking to that custom format
24- configfile = sys.path[0] + os.sep + 'sources.ini'
25- cache = sys.path[0] + os.sep + 'cache.ini'
26+ configfile = config_path + os.sep + 'sources.ini'
27+ cache = config_path + os.sep + 'cache.ini'
#4 Updated by Deoren Moor over 1 year ago
- Status changed from Assigned to Closed
- Resolution set to Fixed
#5 Updated by Deoren Moor over 1 year ago
- Subject changed from Binary version of Synclosure > 0.1 doesn't work to Binary version of Synclosure version 0.2 doesn't work
Updating title as it was too broad.