internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: pyload/pyload

Issue:
File name changed
When i start downloading file all its fine. After few second name file changed. First and last character disappears.

Log

  Code:
1015   18.04.2015 19:45:32   INFO   Package finished: http://catshare.net/xYBs2Bh9GqsfeGSL/Vikings.S03E09.PLSUBBED.HDTV.XviD-CAMBiO.avi
1014   18.04.2015 19:45:32   INFO   Download finished: ikings.S03E09.PLSUBBED.HDTV.XviD-CAMBiO.av
1013   18.04.2015 19:40:58   INFO   Download starts: Vikings.S03E09.PLSUBBED.HDTV.XviD-CAMBiO.avi
1012   18.04.2015 19:40:57   INFO   Added package http://catshare.net/xYBs2Bh9GqsfeGSL/Vikings.S03E09.PLSUBBED.HDTV.XviD-CAMBiO.avi containing 1 links

Before start was Vikings.S03E09.PLSUBBED.HDTV.XviD-CAMBiO.avi
after ikings.S03E09.PLSUBBED.HDTV.XviD-CAMBiO.av



Discussion:

Resolving patch:
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -245,7 +245,7 @@ def secondsToMidnight(gmt=0):
 class SimpleHoster(Hoster):
     __name__    = "SimpleHoster"
     __type__    = "hoster"
-    __version__ = "1.38"
+    __version__ = "1.39"
 
     __pattern__ = r'^unmatchable$'
     __config__  = [("use_premium", "bool", "Use premium account if available", True)]
@@ -501,7 +501,7 @@ def download(self, url, get={}, post={}, ref=True, cookies=True, disposition=Fal
         try:
             if disposition:
                 content = urllib2.urlopen(url).info()['Content-Disposition'].split(';')
-                self.pyfile.name = (content[1].split('filename=')[1][1:-1]
+                self.pyfile.name = (content[1].split('filename=')[1].strip('"\'')
                                     or urlparse.urlparse(urllib.unquote(url)).path.split('/')[-1]
                                     or self.pyfile.name)
         finally:


Test patch:
Repository: pyload/pyload

Issue:
ExtractArchive delete error
ExtractArchive: Unable to move GRM.S01E01.HDTV.XviD.LOL_arc.part1.rar to trash

i have this on all rar files

this happens only the last 3 days



Discussion:

Resolving patch:
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -110,7 +110,7 @@ def remove(self, item):
 class ExtractArchive(Hook):
     __name__    = "ExtractArchive"
     __type__    = "hook"
-    __version__ = "1.42"
+    __version__ = "1.43"
 
     __config__ = [("activated"      , "bool"              , "Activated"                                 , True                                                                     ),
                   ("fullpath"       , "bool"              , "Extract with full paths"                   , True                                                                     ),
@@ -187,6 +187,11 @@ def coreReady(self):
 
     @threaded
     def extractQueued(self, thread):
+        if self.extracting:  #@NOTE: doing the check here for safty (called by coreReady)
+            return
+
+        self.extracting = True
+
         packages = self.queue.get()
         while packages:
             if self.lastPackage:  #: called from allDownloadsProcessed
@@ -200,6 +205,8 @@ def extractQueued(self, thread):
 
             packages = self.queue.get()  #: check for packages added during extraction
 
+        self.extracting = False
+
 
     @Expose
     def extractPackage(self, *ids):
@@ -222,7 +229,7 @@ def packageFinished(self, pypack):
 
     def allDownloadsProcessed(self):
         self.lastPackage = True
-        if not self.extracting:
+        if self.getConfig('waitall') and not self.extracting:
             self.extractQueued()
 
 
@@ -231,8 +238,6 @@ def extract(self, ids, thread=None):  #@TODO: Use pypack, not pid to improve met
         if not ids:
             return False
 
-        self.extracting = True
-
         processed = []
         extracted = []
         failed    = []
@@ -374,7 +379,6 @@ def extract(self, ids, thread=None):  #@TODO: Use pypack, not pid to improve met
 
             self.queue.remove(pid)
 
-        self.extracting = False
         return True if not failed else False
 
 


Test patch:
Repository: pyload/pyload

Issue:
[BasePlugin] URL Issue
SAMPLELINKS:
https://yadi.sk/d/-qPy1E3n6DR8M
https://yadi.sk/d/-1dTkAmTR5eV7

I have this problem only if the URL contains the "-".

P.s. I have to use a different UserAgent, that is works for usual urls.

```
689 05.05.2015 16:23:00 DEBUG   Run Info Fetching for BasePlugin
690 05.05.2015 16:23:00 INFO    Added package Musik containing 2 links
691 05.05.2015 16:23:00 DEBUG   Finished Info Fetching for BasePlugin
692 05.05.2015 16:23:02 INFO    Download starts: https://yadi.sk/d/-1dTkAmTR5eV7
693 05.05.2015 16:23:02 DEBUG   UserAgentSwitcher: Use custom user-agent string: Mozilla/5.0  (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36
694 05.05.2015 16:23:02 DEBUG   BasePlugin: Redirect #0 to: https://yadi.sk/d/-1dTkAmTR5eV7 
695 05.05.2015 16:23:02 WARNING Download failed: -1dTkAmTR5eV7 | File not found
696 05.05.2015 16:23:02 INFO    UnSkipOnFail: Looking for skipped duplicates of: -1dTkAmTR5eV7 (pid:201)
697 05.05.2015 16:23:02 INFO    UnSkipOnFail: No duplicates found
698 05.05.2015 16:23:04 INFO    Download starts: https://yadi.sk/d/-qPy1E3n6DR8M
699 05.05.2015 16:23:04 DEBUG   UserAgentSwitcher: Use custom user-agent string: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36
700 05.05.2015 16:23:04 DEBUG   BasePlugin: Redirect #0 to: https://yadi.sk/d/-qPy1E3n6DR8M
701 05.05.2015 16:23:05 WARNING Download failed: -qPy1E3n6DR8M | File not found
702 05.05.2015 16:23:05 INFO    UnSkipOnFail: Looking for skipped duplicates of: -qPy1E3n6DR8M (pid:201)
703 05.05.2015 16:23:05 INFO    UnSkipOnFail: No duplicates found
```



Discussion:

Resolving patch:
diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py
--- a/module/plugins/hoster/YadiSk.py
+++ b/module/plugins/hoster/YadiSk.py
@@ -10,9 +10,9 @@
 class YadiSk(SimpleHoster):
     __name__    = "YadiSk"
     __type__    = "hoster"
-    __version__ = "0.04"
+    __version__ = "0.05"
 
-    __pattern__ = r'https?://yadi\.sk/d/\w+'
+    __pattern__ = r'https?://yadi\.sk/d/.+'
 
     __description__ = """Yadi.sk hoster plugin"""
     __license__     = "GPLv3"


Test patch:
Repository: pyload/pyload

Issue:
Smoozed
Hello,

Smooth is free in the moment for 10GB a day but the hooks said that it is not a premium account.

Would be great if somebody can have a look on it.

Thanks



Discussion:

Resolving patch:
diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py
--- a/module/plugins/accounts/SmoozedCom.py
+++ b/module/plugins/accounts/SmoozedCom.py
@@ -34,7 +34,6 @@ class SmoozedCom(Account):
 
 
     def loadAccountInfo(self, user, req):
-        # Get user data from premiumize.me
         status = self.getAccountStatus(user, req)
 
         self.logDebug(status)
@@ -51,7 +50,10 @@ def loadAccountInfo(self, user, req):
                     'hosters'    : [hoster["name"] for hoster in status["data"]["hoster"]]}
 
             if info['validuntil'] < time.time():
-                info['premium'] = False
+                if float(status["data"]["user"].get("user_trial", 0)) > time.time():
+                    info['premium'] = True
+                else:
+                    info['premium'] = False
             else:
                 info['premium'] = True
 


Test patch:
Repository: pyload/pyload

Issue:
Downloading from Oboom.com without premium ERROR
It can't download the file. I get the Error "recaptcha html not found".
Everything is up2date...:(



Discussion:

Resolving patch:
diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py
--- a/module/plugins/hoster/OboomCom.py
+++ b/module/plugins/hoster/OboomCom.py
@@ -13,9 +13,9 @@
 class OboomCom(Hoster):
     __name__    = "OboomCom"
     __type__    = "hoster"
-    __version__ = "0.31"
+    __version__ = "0.32"
 
-    __pattern__ = r'https?://(?:www\.)?oboom\.com/(#(id=|/)?)?(?P<ID>\w{8})'
+    __pattern__ = r'https?://(?:www\.)?oboom\.com/(?:#(?:id=|/)?)?(?P<ID>\w{8})'
 
     __description__ = """oboom.com hoster plugin"""
     __license__     = "GPLv3"
@@ -33,6 +33,7 @@ def setup(self):
     def process(self, pyfile):
         self.pyfile.url.replace(".com/#id=", ".com/#")
         self.pyfile.url.replace(".com/#/", ".com/#")
+        self.html = self.load(pyfile.url)
         self.getFileId(self.pyfile.url)
         self.getSessionToken()
         self.getFileInfo(self.sessionToken, self.fileId)


Test patch:
Repository: pyload/pyload

Issue:
MegaCoNz.py
Uptaded plugin to v27 and this message apears:
fallido'builtin_function_or_method' object has no attribute 'randint' 0.00 BMegaCoNz



Discussion:

Resolving patch:
diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py
--- a/module/plugins/hoster/MegaCoNz.py
+++ b/module/plugins/hoster/MegaCoNz.py
@@ -48,7 +48,7 @@
 class MegaCoNz(Hoster):
     __name__    = "MegaCoNz"
     __type__    = "hoster"
-    __version__ = "0.27"
+    __version__ = "0.28"
 
     __pattern__ = r'(?:https?://(?:www\.)?mega(\.co)?\.nz/|mega:|chrome:.+?)#(?P<TYPE>N|)!(?P<ID>[\w^_]+)!(?P<KEY>[\w,-]+)'
 
@@ -82,7 +82,7 @@ def api_response(self, **kwargs):
         """ Dispatch a call to the api, see https://mega.co.nz/#developers """
 
         # generate a session id, no idea where to obtain elsewhere
-        uid = random.random.randint(10 << 9, 10 ** 10)
+        uid = random.randint(10 << 9, 10 ** 10)
 
         res = self.load(self.API_URL, get={'id': uid}, post=json_dumps([kwargs]))
         self.logDebug("Api Response: " + res)


Test patch:
Repository: pyload/pyload

Issue:
External script package finished
Hello, is it possible that only the in external script the package_finished folder work with script?
I have also copy the script into the Folder package_extracted and to test in archive_extrackted and pyload load on start the script but if an download is extracted, the scripts did not run. Only the Script in Package_finished did run.



Discussion:
Can confirm, neither package_extracted nor archive_extracted were executed.

Same here, hope there will be a fix soon!


Resolving patch:
diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py
--- a/module/plugins/hooks/ExternalScripts.py
+++ b/module/plugins/hooks/ExternalScripts.py
@@ -10,7 +10,7 @@
 class ExternalScripts(Hook):
     __name__    = "ExternalScripts"
     __type__    = "hook"
-    __version__ = "0.40"
+    __version__ = "0.41"
 
     __config__ = [("activated", "bool", "Activated"         , True ),
                   ("waitend"  , "bool", "Wait script ending", False)]
@@ -25,17 +25,17 @@ class ExternalScripts(Hook):
 
     interval   = 0  #@TODO: Remove in 0.4.10
 
+    event_list = ["archive_extract_failed", "archive_extracted"     ,
+                  "package_extract_failed", "package_extracted"     ,
+                  "all_archives_extracted", "all_archives_processed",
+                  "allDownloadsFinished"  , "allDownloadsProcessed" ,
+                  "packageDeleted"]
+
 
     def setup(self):
         self.info    = {'oldip': None}
         self.scripts = {}
 
-        self.event_list = ["archive_extract_failed", "archive_extracted"     ,
-                           "package_extract_failed", "package_extracted"     ,
-                           "all_archives_extracted", "all_archives_processed",
-                           "allDownloadsFinished"  , "allDownloadsProcessed" ,
-                           "packageDeleted"]
-
         folders = ["pyload_start", "pyload_restart", "pyload_stop",
                    "before_reconnect", "after_reconnect",
                    "download_preparing", "download_failed", "download_finished",


Test patch:
Repository: pyload/pyload

Issue:
[SkipRev] broken - cannot import name SkipDownload
SkipRev plugin failed to import with following error:
Errore durante l'importazione SkipRev: cannot import name SkipDownload

I already tried following, without success: http://forum.pyload.org/viewtopic.php?f=7&t=4335

Debian GNU/Linux 7.8 (wheezy) x64
Python 2.7.3
pyLoad 0.4.9
SkipRev 0.30



Discussion:

Resolving patch:
diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py
--- a/module/plugins/hooks/SkipRev.py
+++ b/module/plugins/hooks/SkipRev.py
@@ -8,13 +8,13 @@
 
 from module.PyFile import PyFile
 from module.plugins.internal.Hook import Hook
-from module.plugins.internal.Plugin import SkipDownload
+from module.plugins.internal.Plugin import Skip
 
 
 class SkipRev(Hook):
     __name__    = "SkipRev"
     __type__    = "hook"
-    __version__ = "0.30"
+    __version__ = "0.31"
 
     __config__ = [("mode"     , "Auto;Manual", "Choose recovery archives to skip"               , "Auto"),
                   ("revtokeep", "int"        , "Number of recovery archives to keep for package", 0     )]
@@ -35,7 +35,7 @@ def setup(self):
     def _setup(self):
         self.pyfile.plugin._setup()
         if self.pyfile.hasStatus("skipped"):
-            raise SkipDownload(self.pyfile.statusname or self.pyfile.pluginname)
+            raise Skip(self.pyfile.statusname or self.pyfile.pluginname)
 
 
     def _name(self, pyfile):


Test patch:
Repository: pyload/pyload

Issue:
Plugin DlProtectCom doesn't work
Trying to download http://www.dl-protect.com/2C964B88 gives the rror 'NoneType' object has no attribute 'group' 0.00 B



Discussion:

Resolving patch:
diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py
--- a/module/plugins/crypter/DlProtectCom.py
+++ b/module/plugins/crypter/DlProtectCom.py
@@ -11,7 +11,7 @@
 class DlProtectCom(SimpleCrypter):
     __name__    = "DlProtectCom"
     __type__    = "crypter"
-    __version__ = "0.03"
+    __version__ = "0.04"
 
     __pattern__ = r'https?://(?:www\.)?dl-protect\.com/((en|fr)/)?\w+'
     __config__  = [("use_premium"       , "bool", "Use premium account if available"   , True),
@@ -36,7 +36,7 @@ def getLinks(self):
         post_req = {'key'       : re.search(r'name="key" value="(.+?)"', self.html).group(1),
                     'submitform': ""}
 
-        if "Please click on continue to see the content" in self.html:
+        if "Please click on continue to see the links" in self.html:
             post_req['submitform'] = "Continue"
             self.wait(2)
 
@@ -51,11 +51,10 @@ def getLinks(self):
                 post_req['pwd'] = self.getPassword()
 
             if "Security Code" in self.html:
-                captcha_id   = re.search(r'/captcha\.php\?uid=(.+?)"', self.html).group(1)
-                captcha_url  = "http://www.dl-protect.com/captcha.php?uid=" + captcha_id
-                captcha_code = self.decryptCaptcha(captcha_url, imgtype="gif")
-
-                post_req['secure'] = captcha_code
+                m = re.search(r'/captcha\.php\?key=(.+?)"', self.html)
+                if m:
+                    captcha_code = self.decryptCaptcha("http://www.dl-protect.com/captcha.php?key=" + m.group(1), imgtype="gif")
+                    post_req['secure'] = captcha_code
 
         self.html = self.load(self.pyfile.url, post=post_req)
 


Test patch:
Repository: pyload/pyload

Issue:
plugins/hoster/HighWayMe.py Syntax Error
22.06.2015 07:35:41 ERROR Error importing HighWayMe: invalid syntax (HighWayMe.py, line 27)
65 22.06.2015 07:35:41 WARNING Error calling event handler pluginConfigChanged: >, ('HighWayMe', 'activated', True), 'NoneType' object has no attribute 'HighWayMe'
6



Discussion:
The Syntax Error is caused by an Double Doubelpoint in /hoster/HighWayMe.py line 27:
        if self.html.get('code') == 302::
should be:
         if self.html.get('code') == 302: 

But I dont now how to fix the second one.


Resolving patch:
diff --git a/module/plugins/hooks/HighWayMe.py b/module/plugins/hooks/HighWayMeHook.py
similarity index 97%
rename from module/plugins/hooks/HighWayMe.py
rename to module/plugins/hooks/HighWayMeHook.py
--- a/module/plugins/hooks/HighWayMe.py
+++ b/module/plugins/hooks/HighWayMeHook.py
@@ -7,7 +7,7 @@
 class HighWayMeHook(MultiHook):
     __name__    = "HighWayMeHook"
     __type__    = "hook"
-    __version__ = "0.02"
+    __version__ = "0.03"
 
     __config__ = [("pluginmode"    , "all;listed;unlisted", "Use for plugins"                     , "all"),
                   ("pluginlist"    , "str"                , "Plugin list (comma separated)"       , ""   ),
diff --git a/module/plugins/hoster/HighWayMe.py b/module/plugins/hoster/HighWayMe.py
--- a/module/plugins/hoster/HighWayMe.py
+++ b/module/plugins/hoster/HighWayMe.py
@@ -9,7 +9,7 @@
 class HighWayMe(MultiHoster):
     __name__    = "HighWayMe"
     __type__    = "hoster"
-    __version__ = "0.11"
+    __version__ = "0.12"
 
     __pattern__ = r'https?://.+high-way\.my'
     __config__  = [("use_premium", "bool", "Use premium account if available", True)]
@@ -24,7 +24,7 @@ def setup(self):
 
 
     def checkErrors(self):
-        if self.html.get('code') == 302::  #@NOTE: This is not working. It should by if 302 Moved Temporarily then ... But I don't now how to implement it.
+        if self.html.get('code') == 302:  #@NOTE: This is not working. It should by if 302 Moved Temporarily then ... But I don't now how to implement it.
             self.account.relogin(self.user)
             self.retry()
 


Test patch:
Repository: pyload/pyload

Issue:
premiumize.me hook is broken
account says username and password is ok

but the log always shows:

4   01.08.2015 19:50:13 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
5   01.08.2015 19:51:05 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
6   01.08.2015 19:51:13 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
7   01.08.2015 19:52:05 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
8   01.08.2015 19:52:13 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
9   01.08.2015 19:53:05 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
10  01.08.2015 19:53:13 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry

so i guess the hook is broken

premiumize.me hook is broken
account says username and password is ok

but the log always shows:

4   01.08.2015 19:50:13 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
5   01.08.2015 19:51:05 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
6   01.08.2015 19:51:13 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
7   01.08.2015 19:52:05 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
8   01.08.2015 19:52:13 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
9   01.08.2015 19:53:05 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry
10  01.08.2015 19:53:13 WARNING HOOK PremiumizeMe: 'password' | Waiting 1 minute and retry

so i guess the hook is broken



Discussion:

Resolving patch:
diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py
--- a/module/plugins/hoster/PremiumizeMe.py
+++ b/module/plugins/hoster/PremiumizeMe.py
@@ -7,7 +7,7 @@
 class PremiumizeMe(MultiHoster):
     __name__    = "PremiumizeMe"
     __type__    = "hoster"
-    __version__ = "0.19"
+    __version__ = "0.20"
     __status__  = "testing"
 
     __pattern__ = r'^unmatchable$'  #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate
@@ -31,13 +31,13 @@ def handle_premium(self, pyfile):
             pyfile.name = ".".join(temp)
 
         #: Get account data
-        user, data = self.account.select()
+        user, info = self.account.select()
 
         #: Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api)
         data = json_loads(self.load("http://api.premiumize.me/pm-api/v1.php",  #@TODO: Revert to `https` in 0.4.10
                                     get={'method'       : "directdownloadlink",
                                          'params[login]': user,
-                                         'params[pass]' : data['password'],
+                                         'params[pass]' : info['login']['password'],
                                          'params[link]' : pyfile.url}))
 
         #: Check status and decide what to do


Test patch:
Repository: pyload/pyload

Issue:
[ExternalScripts] Global names 'encode' and 'map' not defined
In [line 86 of the ExternalScripts hook](https://github.com/pyload/pyload/blob/07ada1c7e1e7abb22a8889382c1f898ed7a3274c/module/plugins/hooks/ExternalScripts.py#L86) currently an error is thrown: `Runtime error: global name 'encode' is not defined` and it seems that `map` is undefined as well.
Is there currently a bigger change in the plugins/hooks code developed?



Discussion:

Resolving patch:
diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py
--- a/module/plugins/hooks/ExternalScripts.py
+++ b/module/plugins/hooks/ExternalScripts.py
@@ -3,6 +3,7 @@
 import os
 import subprocess
 
+from module.plugins.internal.Plugin import encode
 from module.plugins.internal.Addon import Addon, Expose
 from module.utils import fs_encode, save_join as fs_join
 
@@ -10,7 +11,7 @@
 class ExternalScripts(Addon):
     __name__    = "ExternalScripts"
     __type__    = "hook"
-    __version__ = "0.46"
+    __version__ = "0.47"
     __status__  = "testing"
 
     __config__ = [("activated", "bool", "Activated"         , True ),
@@ -66,7 +67,8 @@ def init_folder(self, name, path):
                 self.log_debug(e)
                 return
 
-        for file in os.listdir(path):
+        for filename in os.listdir(path):
+            file = fs_join(path, filename)
             if not os.path.isfile(file):
                 continue
 
@@ -77,13 +79,14 @@ def init_folder(self, name, path):
                 self.log_warning(_("Script not executable: [%s] %s") % (name, file))
 
             self.scripts[name].append(file)
+            self.log_info(_("Registered script: [%s] %s") % (name, file))            
 
 
     @Expose
     def call(self, script, args=[], lock=False):
         try:
             script = os.path.abspath(script)
-            args   = [script] + map(encode, args)
+            args   = [script] + map(lambda arg: encode(arg) if isinstance(arg, basestring) else encode(str(arg)), args)
 
             self.log_info(_("EXECUTE [%s] %s") % (os.path.dirname(script), args))
             p = subprocess.Popen(args, bufsize=-1)  #@NOTE: output goes to pyload


Test patch: