Project

General

Profile

Defect #73

Binary version of Synclosure version 0.2 doesn't work

Added by Deoren Moor over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
Configuration
Target version:
Start date:
01/04/2011
Due date:
% Done:

0%

Estimated time:
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

Revision 116 (diff)
Added by Deoren Moor over 6 years ago

Creating 0.2 branch from r77 on the trunk (same rev/location that the 0.2 tag was created from). This branch will be used to fix issue #73 and release version 0.2.1.

Revision 117 (diff)
Added by Deoren Moor over 6 years ago

[issues #73]
Applying fix for broken compiled script (0.2 release) to the trunk.

Revision 118 (diff)
Added by Deoren Moor over 6 years ago

[issues #73]
Applying fix for broken compiled script (0.2 release) from r117 of trunk.

Revision 119 (diff)
Added by Deoren Moor over 6 years ago

[issues #73]
Tagging 0.2.1 release. Contains fix for #73.

History

#1 Updated by Deoren Moor over 6 years 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 6 years ago

  • Target version changed from 0.3 to 0.2.1

#3 Updated by Deoren Moor over 6 years ago

This is what I've come up with:

Index: synclosure.py
===================================================================
--- synclosure.py    (revision 116)
+++ synclosure.py    (working copy)
@@ -11,6 +11,7 @@
 # Built-in modules
 import sys
 import os
+import os.path
 import urllib2
 import ConfigParser

@@ -54,9 +55,15 @@

     feedlist, enclosures, oldenclosures, nl = [], [], [], '\n'

+    # Has the script been "wrapped" into an executable?
+    if hasattr(sys, "frozen"):
+        config_path = os.path.split(sys.executable)[0]
+    else:
+        config_path = sys.path[0]
+
     #OptParse is a pain, so as of now i'm sticking to that custom format
-    configfile = sys.path[0] + os.sep + 'sources.ini'
-    cache = sys.path[0] + os.sep + 'cache.ini'
+    configfile = config_path + os.sep + 'sources.ini'
+    cache = config_path + os.sep + 'cache.ini'

#4 Updated by Deoren Moor over 6 years ago

  • Status changed from Assigned to Closed
  • Resolution set to Fixed

#5 Updated by Deoren Moor over 6 years 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.

Also available in: Atom PDF