Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QNAP: Error importing xxxx: invalid syntax (Plugin.py, line 118) #2749

Closed
h1ghju1ce opened this issue Feb 27, 2017 · 158 comments
Closed

QNAP: Error importing xxxx: invalid syntax (Plugin.py, line 118) #2749

h1ghju1ce opened this issue Feb 27, 2017 · 158 comments

Comments

@h1ghju1ce
Copy link

Getting an error loading plugins, from Uploaded.to, and rapidgator.net

was working all fine for months yesterday, stopped working on mine and my mates QNAP
(Firmware not changed)

Anyone else getting this? thanks

@GammaC0de
Copy link
Member

GammaC0de commented Feb 27, 2017

What python version are you running?

@h1ghju1ce
Copy link
Author

The NAS has 3.5.02 , and 2.7.3 installed, I've tried disabling 2.7.3 and restarting pyload, but I get the same error.

It seems the pyload package comes with its on version of python that it installs that isnt visible in the QNAP GUI, the pyload GUI reports version: Python: 2.5.5 (r255:77872, May 16 2010, 10:32:26) [GCC 4.2.1]

Which version should it be?

@TAL9000
Copy link

TAL9000 commented Feb 27, 2017

Same here and the log show this:
46860 27.02.2017 09:04:17 INFO ADDON UpdateManager: pyLoad is up to date!
46861 27.02.2017 09:04:17 INFO ADDON UpdateManager: New version of plugin: INTERNAL Plugin (v0.68 -> v0.69)
46862 27.02.2017 09:04:18 INFO ADDON UpdateManager: New version of plugin: INTERNAL SevenZip (v0.21 -> v0.22)
46863 27.02.2017 09:04:19 INFO ADDON UpdateManager: *** Plugins updated ***
46864 27.02.2017 09:04:19 WARNING ADDON UpdateManager: You have to restart pyLoad to use the updated plugins
46865 27.02.2017 09:04:20 INFO restarting pyLoad
46866 27.02.2017 09:04:20 INFO shutting down...
46867 27.02.2017 09:04:21 INFO starte pyLoad 0.4.9
46868 27.02.2017 09:04:21 INFO Benutze Home-Verzeichnis: /share/CACHEDEV1_DATA/.qpkg/pyload/data
46869 27.02.2017 09:04:27 ERROR Fehler beim importieren von UnSkipOnFail: invalid syntax (Plugin.py, line 118)
46870 27.02.2017 09:04:27 ERROR Fehler beim importieren von Captcha9Kw: invalid syntax (Plugin.py, line 118)
46871 27.02.2017 09:04:27 ERROR Fehler beim importieren von RestartFailed: invalid syntax (Plugin.py, line 118)
46872 27.02.2017 09:04:27 ERROR Fehler beim importieren von TransmissionRPC: invalid syntax (Plugin.py, line 118)
46873 27.02.2017 09:04:27 ERROR Fehler beim importieren von UpdateManager: invalid syntax (Plugin.py, line 118)
46874 27.02.2017 09:04:27 ERROR Fehler beim importieren von UserAgentSwitcher: invalid syntax (Plugin.py, line 118)
46875 27.02.2017 09:04:27 INFO Aktivierte Plugins:
46876 27.02.2017 09:04:27 INFO Deaktivierte Plugins: AndroidPhoneNotify, AntiStandby, AntiVirus, BypassCaptcha, CaptchaBrotherhood, Checksum, ClickNLoad, CloudFlareDdos, DeathByCaptcha, DeleteFinished, DownloadScheduler, EventMapper, ExpertDecoders, ExternalScripts, ExtractArchive, HotFolder, IRC, ImageTyperz, JustPremium, LinkFilter, LinkdecrypterComHook, LogMarker, MergeFiles, MultiHome, PushBullet, PushOver, SkipRev, WindowsPhoneNotify, XFileSharing, XMPP
46877 27.02.2017 09:04:27 INFO Downloadzeit: True

Think is a little bug at the new Plugin.py

TAL9000

PS: Good Job, thanks for PyLoad!

@GammaC0de
Copy link
Member

@TAL9000 I'm pretty sure that you are running python 2.5, that's why this error.

@h1ghju1ce Debug log please.

@GaryBlooper
Copy link

Got the same error with python version 2.5.6 and log output:

ERROR     Error importing UploadedTo: invalid syntax (Plugin.py, line 118)
Traceback (most recent call last):
  File "/usr/share/pyload/pyLoadCore.py", line 667, in <module>
    main()
  File "/usr/share/pyload/pyLoadCore.py", line 658, in main
    pyload_core.start()
  File "/usr/share/pyload/pyLoadCore.py", line 433, in start
    self.accountManager.getAccountInfos()
  File "/usr/share/pyload/module/utils.py", line 165, in new
    return func(*args)
  File "/usr/share/pyload/module/plugins/AccountManager.py", line 175, in getAccountInfos
    p = self.getAccountPlugin(p)
  File "/usr/share/pyload/module/plugins/AccountManager.py", line 55, in getAccountPlugin
    self.plugins[plugin] = self.core.pluginManager.loadClass("accounts", plugin)(self, self.accounts[plugin])
TypeError: 'NoneType' object is not callable

I'm pretty sure that you are running python 2.5, that's why this error.

Does this mean python 2.5 won't be supported anymore?

@GammaC0de
Copy link
Member

Maybe, it's being considered (#2741 (comment))

Can't you upgrade to python 2.7?

@GaryBlooper
Copy link

Ahh, i see, thanks for the clarification. An upgrade is indeed no problem for me.

@TAL9000
Copy link

TAL9000 commented Feb 27, 2017

GammaC0de: I'm pretty sure that you are running python 2.5, that's why this error.

OK, i check with python --version and the System say Python 2.7.3,
but pyLoad says Python: 2.5.5 (r255:77872, May 13 2010, 22:27:01) [GCC 4.2.3]
???

Need help Step by Step to Upgrade/repair this...

TAL9000

Sorry for my bad English

@GammaC0de
Copy link
Member

@TAL9000 How did you installed pyLoad?

@GammaC0de
Copy link
Member

QNAP package uses python 2.5 explicity:
You should edit /share/CACHEDEV1_DATA/.qpkg/pyload/pyload.sh line 57 and change 2.5 to 2.7:

	  /bin/echo "Starting pyLoad"	  
	  ${QPKG_DIR}/opt/bin/python2.5 ${QPKG_DIR}/pyLoadCore.py --daemon  
	;;
	stop)
		/bin/echo "Stopping pyLoad"
		${QPKG_DIR}/opt/bin/python2.5 ${QPKG_DIR}/pyLoadCore.py --quit
		/bin/sleep 1

@simoleso
Copy link

Hi, I got the same problem on QNAP TS-251, since yesterday (without any updates or change) I got:
27.02.2017 21:04:49 INFO Starting pyLoad 0.4.9
27.02.2017 21:04:49 INFO Using home directory: /share/CACHEDEV1_DATA/.qpkg/pyload/data
27.02.2017 21:04:49 DEBUG Remote activated: True
27.02.2017 21:04:50 DEBUG created index of plugins
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.hooks.EventMapper -> userplugins.hooks.EventMapper
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Addon -> userplugins.internal.Addon
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Plugin -> userplugins.internal.Plugin
27.02.2017 21:04:50 ERROR Error importing EventMapper: invalid syntax (Plugin.py, line 118)
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.hooks.ExternalScripts -> userplugins.hooks.ExternalScripts
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Addon -> userplugins.internal.Addon
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Plugin -> userplugins.internal.Plugin
27.02.2017 21:04:50 ERROR Error importing ExternalScripts: invalid syntax (Plugin.py, line 118)
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.hooks.ClickNLoad -> userplugins.hooks.ClickNLoad
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Addon -> userplugins.internal.Addon
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Plugin -> userplugins.internal.Plugin
27.02.2017 21:04:50 ERROR Error importing ClickNLoad: invalid syntax (Plugin.py, line 118)
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.hooks.UnSkipOnFail -> userplugins.hooks.UnSkipOnFail
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Addon -> userplugins.internal.Addon
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Plugin -> userplugins.internal.Plugin
27.02.2017 21:04:50 ERROR Error importing UnSkipOnFail: invalid syntax (Plugin.py, line 118)
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.hooks.ExtractArchive -> userplugins.hooks.ExtractArchive
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Addon -> userplugins.internal.Addon
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Plugin -> userplugins.internal.Plugin
27.02.2017 21:04:50 ERROR Error importing ExtractArchive: invalid syntax (Plugin.py, line 118)
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.hooks.XFileSharing -> userplugins.hooks.XFileSharing
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Addon -> userplugins.internal.Addon
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Plugin -> userplugins.internal.Plugin
27.02.2017 21:04:50 ERROR Error importing XFileSharing: invalid syntax (Plugin.py, line 118)
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.hooks.UpdateManager -> userplugins.hooks.UpdateManager
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Addon -> userplugins.internal.Addon
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Plugin -> userplugins.internal.Plugin
27.02.2017 21:04:50 ERROR Error importing UpdateManager: invalid syntax (Plugin.py, line 118)
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.hooks.UserAgentSwitcher -> userplugins.hooks.UserAgentSwitcher
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Addon -> userplugins.internal.Addon
27.02.2017 21:04:50 DEBUG Redirected import module.plugins.internal.Plugin -> userplugins.internal.Plugin
27.02.2017 21:04:50 ERROR Error importing UserAgentSwitcher: invalid syntax (Plugin.py, line 118)
27.02.2017 21:04:50 INFO Activated plugins:
27.02.2017 21:04:50 INFO Deactivate plugins: AndroidPhoneNotify, AntiStandby, AntiVirus, BypassCaptcha, Captcha9Kw, CaptchaBrotherhood, Checksum, CloudFlareDdos, DeathByCaptcha, DeleteFinished, DownloadScheduler, ExpertDecoders, HotFolder, IRC, ImageTyperz, JustPremium, LinkFilter, LinkdecrypterComHook, LogMarker, MergeFiles, MultiHome, PushBullet, PushOver, RestartFailed, SkipRev, TransmissionRPC, WindowsPhoneNotify, XMPP
27.02.2017 21:04:50 INFO Downloadtime: True
27.02.2017 21:04:50 INFO Starting ThriftBackend: 0.0.0.0:7227
27.02.2017 21:04:50 INFO Free space: 2.13 TiB
27.02.2017 21:04:50 WARNING SSL certificates not found.
27.02.2017 21:04:50 INFO Starting builtin webserver: 0.0.0.0:8100
27.02.2017 21:04:50 INFO Activating Accounts...
27.02.2017 21:04:50 INFO Activating Plugins...
27.02.2017 21:04:50 INFO pyLoad is up and running

Pyload is running but is unable to dowload or update plugins. I've tried a recursive grep searching for pyload.org and I've found many matches: is it possible that the UpdateManager is still trying to point to the old domain? In this case, where is the configuration file to be modified with new paths?

Thanks in adavance for your attention,

Simone

@GammaC0de
Copy link
Member

@saintego See #2749 (comment)

@GammaC0de GammaC0de changed the title ERROR Error importing xxxx: invalid syntax (Plugin.py, line 118) QNAP: Error importing xxxx: invalid syntax (Plugin.py, line 118) Feb 27, 2017
@simoleso
Copy link

simoleso commented Feb 27, 2017

Sorry @GammaC0de but changing python version lead to a disaster:
$ which python2.7
/usr/bin/python2.7

$ head -n 67 /share/CACHEDEV1_DATA/.qpkg/pyload/pyload.sh|tail -n 20

case "$1" in
start)
[ -d /root/.pyload ] || /bin/ln -sf $QPKG_DIR /root/.pyload

            [ -d ${BASE}/${DOWNLOAD_SHARE}/pyload ] || /bin/mkdir -p ${BASE}/${DOWNLOAD_SHARE}/pyload
            [ -d ${QPKG_DIR}/data/Downloads ] || /bin/ln -sf ${BASE}/${DOWNLOAD_SHARE}/pyload ${QPKG_DIR}/data/Downloads

      /bin/echo "Starting pyLoad"     
      #${QPKG_DIR}/opt/bin/python2.5 ${QPKG_DIR}/pyLoadCore.py --daemon  
      /usr/bin/python2.7 ${QPKG_DIR}/pyLoadCore.py --daemon  
    ;;
    stop)
            /bin/echo "Stopping pyLoad"
            #${QPKG_DIR}/opt/bin/python2.5 ${QPKG_DIR}/pyLoadCore.py --quit
            /usr/bin/python2.7 ${QPKG_DIR}/pyLoadCore.py --quit
            /bin/sleep 1
    ;;
    restart)
            $0 stop

$ python
Python 2.7.5 (default, Feb 13 2017, 01:56:54)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

$ /etc/init.d/pyload.sh start
Starting pyLoad
Traceback (most recent call last):
File "/share/CACHEDEV1_DATA/.qpkg/pyload/pyLoadCore.py", line 48, in
from module.network.RequestFactory import RequestFactory
File "/share/CACHEDEV1_DATA/.qpkg/pyload/module/network/RequestFactory.py", line 22, in
from Browser import Browser
File "/share/CACHEDEV1_DATA/.qpkg/pyload/module/network/Browser.py", line 6, in
from HTTPRequest import HTTPRequest
File "/share/CACHEDEV1_DATA/.qpkg/pyload/module/network/HTTPRequest.py", line 20, in
import pycurl
ImportError: No module named pycurl

Meanwhile using pyhton 2.5 (build-in the pyload package) almost permit to the deamon to start: the problem is finding download plugins.
Is it possible that pyload try to reach the old pyload.org domain? I've launched a grep finding some matches:
$ grep pyload.org /share/CACHEDEV1_DATA/.qpkg/pyload/*
pavement.py: url="http://pyload.org",
pavement.py: download_url='http://pyload.org/download',

@GaryBlooper
Copy link

Actually i was a bit rash with the problem-free python upgrade on my system.
I'm using pyload on my MyBook Live with python 2.5 installed through Optware. As installing python 2.7 is indeed possible, there a no additional modules like python-curl available through the preferred feed of my system:
http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/stable/
I will keep digging and try to find another way to install the needed dependencies on my system (apt-get is not an option, since it would pull in a lot of libraries, which could brick my NAS).
Thanks anyway and keep up the good work

@GammaC0de
Copy link
Member

@simoleso do opkg install python python-pip python-crypto python-curl python-openssl pillow tesseract js unrar and then retry.

@GaryBlooper I am running pyLoad with python 2.7 on MyBook Live without problems:
You should switch to optware-ng: see #2480 (comment).

@UserX404
Copy link

same here, running in Qnap NAS.
Had also troubles installing pycurl, which forced me to use pyload with python2.5.
Im not able to get the debendencies installed. Tried with ipkg and pip.
@GammaC0de i don't have opkg

@TAL9000
Copy link

TAL9000 commented Feb 27, 2017

@GammaC0de: i dont remember all, but there was Problems using the QPKG System and i type many Commands from Google Search pages to fix it. At one Point pyload was running and i leave it at this Point.

Python 2.7 is installed [/share/CACHEDEV1_DATA/.qpkg/Python/bin/python2.7]
Python 2.5 at [/share/CACHEDEV1_DATA/.qpkg/pyload/opt/bin/python2.5]

change /share/CACHEDEV1_DATA/.qpkg/pyload/pyload.sh
delete ${QPKG_DIR}/opt/bin/python2.5
add /share/CACHEDEV1_DATA/.qpkg/Python/bin/python2.7

 	  /bin/echo "Starting pyLoad"	  
 	  /share/CACHEDEV1_DATA/.qpkg/Python/bin/python2.7 ${QPKG_DIR}/pyLoadCore.py --daemon  
 	;;
 	stop)
 		/bin/echo "Stopping pyLoad"
 		/share/CACHEDEV1_DATA/.qpkg/Python/bin/python2.7 ${QPKG_DIR}/pyLoadCore.py --quit
 		/bin/sleep 1

then the Failure massage equal simoleso

opkg install python python-pip python-crypto python-curl python-openssl pillow tesseract js unrar

dont work at QNAP (opkg Command no found) equal UserX82

Must make a Break, go to Bed, then Work and then i read again here.
PLS make Plugin.py 0.70 Python2.5 compatible...

TAL9000

@GammaC0de
Copy link
Member

GammaC0de commented Feb 27, 2017

@TAL9000 You have to install the Entware package and the you will have opkg

https://github.com/Entware-ng/Entware-ng/wiki/Install-on-QNAP-NAS

For the long run I would ask QNAP to update their pyLoad package to use python 2.7

@donaufisch66
Copy link

Hello,
I have the same problem and same errors!
I use pyload on my Qnap with python 2.7.3 for several month. Since yesterday it doesnt work anymore. First I wasnt able to and files by ClickNLoad. Then I tried to reinstall pyload. I installed pyLoad_4.9_x86.zip. That would work, but doesnt because of old plugins. So I have to update plugins by copying the Modules/plugin folder from stable.zip to Userplugins folder.
Normally I would also copy UpdateManager.py to /plugins/hooks folder.
from the moment I update the plugin folder, Pyload doesnt work any more. No Clicknload , no accounts and pyload.py errors.
(without plugins update clickNload would work, but nothing else would work! )
So, cince yesterday I cannot use pyload anymore on Pyload. What can I do?
Did you change anything within the last days? Was there an automatic update?
How shall I install pyload on Qnap Nas TS453?

@donaufisch66
Copy link

Hello,
if I try to add a shareonlinebiz account, I get this error:
Error importing ShareonlineBiz: invalid syntax (Plugin.py, line 118)

@GammaC0de
Copy link
Member

@donaufisch66

  1. Install Entware package
  2. From the console enter opkg install python python-pip python-crypto python-curl python-openssl pillow tesseract js unrar
  3. Edit /share/CACHEDEV1_DATA/.qpkg/pyload/pyload.sh: change python2.5 to python2.7
  4. Retry

@simoleso
Copy link

@GammaC0de I've followed your instructions but:
[730993.436631] python2.7[11438]: segfault at 0 ip 00007fef488c5555 sp 00007fef40dc33f0 error 6 in libpython2.7.so.1.0[7fef4882f000+179000]
[731216.477653] python2.7[20058]: segfault at ef ip 00007f85bb889523 sp 00007f85a77f9430 error 4 in libpython2.7.so.1.0[7f85bb81a000+179000]
[731351.647128] traps: python2.7[24906] general protection ip:7f4201d6a74b sp:7f41eeff9f90 error:0 in libc-2.23.so[7f4201cf7000+195000]

Now, my qnap is used to store important files (like my photos): i not feel comfortable installing software not certified.

Only one question: I pretty sure I've not upgrade anything on the fully working pyload. I used it successfully on Saturday and yesterday stops working by itself. What have you changed? Why it stops working suddenly?

@GaryBlooper
Copy link

@GammaC0de Thanks for the tip with optware-ng, worked like a charm *thumbs up*

@GammaC0de
Copy link
Member

@simoleso This is because we consider stop supporting python 2.5
python 2.5 is VERY old, it's time to move on...

Entware is not supposed to do any harm to your NAS because it installs everything to /opt directory, leaving the system intact.

Have you installed Entware or Entware-ng?
You should have installed Entware-ng because I know it supposed to work (see #2696 (comment))

The best thing would be if you ask QNAP support to build a new pyLoad package that works on python 2.7

@donaufisch66
Copy link

Hello,
I just installed pyload by "opkg pyload". Now I can add files and accounts again, but I cannot download becouse of not enough space left on device. . How can I change the downloadfolder to any other folder? Terminal says that in Downloads is no space left. There shall be some TB of space. I would like to change the folder to my formaly Download share.?

@donaufisch66
Copy link

Hello,
I have solved the download folder issue by myself. I restated the setup and defined the whole path to my download folder.

There is one issue left! How shall I tell my Qnap NAS to restart pyload at Startup?

Before I had to reinstall pyload, I used a Qnap installer file, where I just had to update some files. But this installer made a small Icon in my Qnap Appcenter, where I could define the start/stop/restart options.
Can you tell me how to do anything similar? I dont want to use SSh or a terminal to check or restart pyload
Shall I use a Startup Skript? Do I Have to add my user/pass to that script od can I only start pyload with the command "python" or "python pyload" ?

@GammaC0de
Copy link
Member

@donaufisch66 That's great news.

First of all, please describe step by step how did you installed pyLoad so others can benefit from it.

As for your question, I will to make a better tutor that works as normal pyLoad QNAP package, but for that I need your step by step instructions.

@h1ghju1ce
Copy link
Author

h1ghju1ce commented Feb 28, 2017

So I've installed EnWare-NG , and downloaded Python using the commandline you gave

opkg install python python-pip python-crypto python-curl python-openssl pillow tesseract js unrar

It installs that to .Qpkg\Entware-ng\lib\python2.7

The log now says its running, and updating plugins etc, but I now cant get to the webinterface!

I didnt change the conf line: int port : "Port" = 5003

and the log reports: INFO Starting builtin webserver: 0.0.0.0:5003
but I cant get it to load :(

I've tried editing the pyload.conf to enable the debug mode (bool debug_mode = True) , but either thats not right, or it doesnt create the debug log??

I guess I now have the issue similar to this one:

#2696 (comment)

BUT I dont get any errors loading the webserver

28.02.2017 10:06:19 INFO Starting ThriftBackend: 0.0.0.0:7227
28.02.2017 10:06:21 INFO Starting builtin webserver: 0.0.0.0:5003

Is there now a limitation on what ports it will load on?

@GammaC0de
Copy link
Member

Now the problem is the "Segmentation fault".

I suggest you uninstall Entware-ng and pyLoad apps and ensure you delete /share/HDA_DATA/.qpkg/pyload/
/share/HDA_DATA/.qpkg/Entware-ng/ and start the installation again

@dexter1212
Copy link

dexter1212 commented Mar 15, 2017

I did. Uninstalled/deleted everything, rebooted the QNAP and followed your guide again. It is still hanging at:

15.03.2017 23:45:14 INFO ADDON UpdateManager: All plugins are up to date!
15.03.2017 23:45:15 INFO ADDON ClickNLoad: Proxy listening on 0.0.0.0:9666

and after some time: Segmentation fault.
Is there anyone who runs pyload successfully after following these steps?

@thestulle
Copy link

@dexter1212
test this
/share/HDA_DATA/.qpkg/Entware-ng/bin/python2.7 /share/HDA_DATA/.qpkg/pyload/pyLoadCore.py -d

@ghost
Copy link

ghost commented Mar 16, 2017

@dexter1212 Pyload is now running on my QNAP. I followed these instructions:

  1. Download and unpack the Source-Code https://github.com/pyload/pyload/archive/stable.zip on your NAS

  2. Stop but KEEP pyload from QNAP APP center

  3. Backup your Pyload-Files:
    cp /share/CACHEDEV1_DATA/.qpkg/pyload/. /share/CACHEDEV1_DATA/.qpkg/pyload-backup/

  4. Delete Pyload from QNAP APP and restart QNAP NAS

  5. Go to Entware-ng, download the package from top of site and install manually in Qnap App center.
    Link to Entware: https://github.com/Entware-ng/Entware-ng/wiki/Install-on-QNAP-NAS
    ---> in my case it was the X86-64 package. First I installed a wrong version and got an segmentation fault!

  6. Open Terminal (putty)

  7. opkg update

  8. opkg install python python-pip python-crypto python-curl python-openssl pillow tesseract js unrar

  9. (Optional) pip install Send2Trash:
    In my case I got an error and this is why I don't use it. Maybe this could be the solution:

  • pip install --upgrade setuptools
  • pip install ez_setup
  • pip install Send2Trash
  1. Install Pyload from QNAP APP

  2. Stop Plyoad

  3. Edit /share/CACHEDEV1_DATA/.qpkg/pyload/pyload.sh and change every
    "${QPKG_DIR}/opt/bin/python2.5" to "${BASE}/.qpkg/Entware-ng/bin/python2.7":
    /bin/echo "Starting pyLoad" ${QPKG_DIR}/opt/bin/python2.5 ${QPKG_DIR}/pyLoadCore.py --daemon ;; stop) /bin/echo "Stopping pyLoad" ${QPKG_DIR}/opt/bin/python2.5 ${QPKG_DIR}/pyLoadCore.py --quit /bin/sleep 1

  4. Copy the downloaded Source over the installation. Example:
    cp -r /share/CACHEDEV1_DATA/.qpkg/pyload-stable/. /share/CACHEDEV1_DATA/.qpkg/pyload/

  5. Write back the config:
    cp /share/CACHEDEV1_DATA/.qpkg/pyload-backup/data/pyload.conf /share/CACHEDEV1_DATA/.qpkg/pyload/data/
    cp /share/CACHEDEV1_DATA/.qpkg/pyload-backup/data/plugin.conf /share/CACHEDEV1_DATA/.qpkg/pyload/data/
    cp /share/CACHEDEV1_DATA/.qpkg/pyload-backup/data/accounts.conf /share/CACHEDEV1_DATA/.qpkg/pyload/data/
    cp /share/CACHEDEV1_DATA/.qpkg/pyload-backup/data/files.db /share/CACHEDEV1_DATA/.qpkg/pyload/data/
    cp /share/CACHEDEV1_DATA/.qpkg/pyload-backup/data/files.db-journal /share/CACHEDEV1_DATA/.qpkg/pyload/data/
    cp /share/CACHEDEV1_DATA/.qpkg/pyload-backup/data/files.version /share/CACHEDEV1_DATA/.qpkg/pyload/data/
    cp /share/CACHEDEV1_DATA/.qpkg/pyload-backup/data/unrar_passwords.txt /share/CACHEDEV1_DATA/.qpkg/pyload/data/

  6. Get the code of the UpdateManager.py from Github and paste it into /share/CACHEDEV1_DATA/.qpkg/pyload/module/plugins/hooks/UpdateManager.py

  7. Insert the following code in the second line of /share/CACHEDEV1_DATA/.qpkg/pyload/pyload.sh: PATH=%PATH%;/opt/bin

  8. Start pyload from QNAP APP center

  9. Restart QNAP

IMPORTANT: When I restarted my QNAP, pyload started automatically but I could not login via WebUI. So I had to stop and start pyload via QNAP App Center and after a few seconds I could login via WebUI. I have to do this after every reboot!

@GammaC0de
Copy link
Member

in my case it was the X86-64 package. First I installed a wrong version and got an segmentation fault!

OK, so maybe that is the problem..

@h1ghju1ce
Copy link
Author

I have a TS-869 Pro (2012) (Intel Atom D2700)

and my pyload (when its working) doesnt ever give me a segment fault

My friend has a TS-453A (2016) (Intel Celeron N3150)

and I setup pyload the same way I did on mine, but he gets the segment fault.

both machines are on the same FW, and the Intel spec sheets say they are both x64 capable CPUs
but I wonder if his newer CPU needs a different version of Entware or python perhaps ?

thats pretty much the only differences (I think he also had HDSatation enabled, maybe that affects it...)

@dexter1212 - what model QNAP do you have?

@GammaC0de
Copy link
Member

@h1ghju1ce Maybe add

unset LD_LIBRARY_PATH
unset LD_PRELOAD

before "PATH=... line in pyload.sh

I this does not help, I would even try set PATH=/share/CACHEDEV1_DATA/.qpkg/Entware-ng/bin:/share/CACHEDEV1_DATA/.qpkg/Entware-ng/sbin (ignoring the old PATH)

@h1ghju1ce
Copy link
Author

Yeah tried that, made sure both LD were empty, and only had Entware entries in it

added Entware to the $PATH as well, still segment fault

@dexter1212
Copy link

dexter1212 commented Mar 16, 2017

@h1ghju1ce I have an TS-120, I think its an ARM cpu.

I will try your suggestions now!

edit:
@mcmacfitter you are genius! pyload up and running again! thank you guys very much for your help! for your information: I exactly followed his guide some posts above.

@thestulle
Copy link

OK, i have creat a new OPKG-File. Can everyone test it?

  1. Go to Entware-ng, download the package from top of site and install manually in Qnap App center.
    Link to Entware: https://github.com/Entware-ng/Entware-ng/wiki/Install-on-QNAP-NAS
  2. download pyload_4.9.qpkg.zip and unzip it. install manually in Qnap App center
  3. Pyload is ready

@h1ghju1ce
Copy link
Author

Maybe units with Entware issues have the malware app installed on their QNAP?

https://forum.qnap.com/viewtopic.php?f=351&t=116737&sid=2f8a7895df1d368a6b1aec2f7926f18b

"Malware Remover package blocks Entware - uninstall it and do not install later"

@dexter1212
Copy link

so downloading is working, but I am getting the following unrar error:
Archive error | unrar: symbol lookup error: /opt/lib/libstdc++.so.6: undefined symbol: _ZNSt8numpunctIcE2idE, version GLIBCXX_3.4

@thestulle
Copy link

I have no problem with unrar.

I use 7zip

@dexter1212
Copy link

@thestulle you do not use the ExtractArchive plugin? I cannot find a 7zip plugin for pyload

@thestulle
Copy link

I have use my Windows for Download and extract

@GammaC0de
Copy link
Member

@dexter1212 Just uninstall unrar and then issue opkg install p7zip and restart pyload.

@donaufisch66
Copy link

Hello,
since the old python2.5 support is back, I use the old opkg setupfile . That works good, but Send2Trash doesn´t.
Send2Trash has been installed on my NAS, but pyload cannot find that plugin! How can I update the path to the plugin?
my path is "/share/CACHEDEV1_DATA/.qpkg/Entware-ng/lib/python2.7/site-packages".
I dont want to remove und install pyload again, because it work now!

@GammaC0de
Copy link
Member

@donaufisch66 Why would you want to use send2trash on a NAS?
Does QNAP have a trash can?

@donaufisch66
Copy link

I just want to delete rar/zip files automatically after extracting. "ExtractAcrchive" tells me, that Send2Trash is missing, eaven if "deleting" is "ON".
Is there any there option to delete these files automatically?

@thestulle
Copy link

@donaufisch66
the old pyload-opkg have python 2.5 onboard. This installation do not use Entware-ng.

You must copy the Send2trash Files in the pyload/opt/ directory.

@donaufisch66
Copy link

@thestulle : the old pyload stopped working again. I will try your knew opkg file. Is there anything elese I have to do, after Entware and the small Pyload-opkg file installation?
At what port will pyload by installed? On 8100 I cannot open the WEBUI

@donaufisch66
Copy link

@thestulle : the new Qnap install file doesnt work for me!

@GammaC0de
Copy link
Member

@donaufisch66 send2trash is used to move the file to the trash (e.g. recycle bin on windows), it has no use for NASs.
Just disable "Move to trash instead delete" on ExtractArchive's configuration.

@thestulle
Copy link

thestulle commented Mar 20, 2017

@donaufisch66
Can you install the OPKG over ssh
sh /.../pyload_4.9.qpkg
Please post the log!

@thestulle
Copy link

@donaufisch66
the QNAP NAS have a Trash to. Sent2Trash can be used!

@donaufisch66
Copy link

Since the python2.5 issue, I have installed pyload manually on my NAS several times. This is how it works for me. The new opkg file just added a shortcut but didnt work.

INSTALL Manual for QNAP NAS TS453 and others:

1-7 for pyload installation. Then you can start/top pyload with any terminal.
If you want pyload to start automatically at startup, continue with 8!

  1. install Entware-ng manually in QNAP Apps and open "putty" for a SSH connection to your NAS and type:
  2. opkg update
  3. opkg install python python-pip python-crypto python-curl python-openssl pillow tesseract js unrar
  4. opkg install pyload
  5. pyload # (follow the setup..)
  6. pyload # (restart and wait for updates.)
  7. check WebUI and Settings
    --END
  • Additional I added an autostart Skript for pyload:
  1. with Putty open a SSH connection to your QNAP NAS (adapt your "sdx6" folder !)

  2. Flash memory: [~]# mount -t ext2 /dev/sdx6/tmp/config

  3. start editor: [~]# vi /tmp/config/autorun.sh

  4. insert two lines into the file: (klick "i" to insert text)
    #!/bin/sh
    python /opt/share/pyload/pyLoadCore.py --daemon

  5. click "Esc" ":" "w" "q" for save and quit

  6. make file executable: [~]# chmod +x autorun.sh

  7. Flash unmounten: [~]# umount /tmp/config #dont forget to do! thats very important!!!

  8. reboot Qnap NAS! --- END - thats it!

If you want to activate and deactivate pyload autostart easily or add other Apps to autostart, try this:

  1. modify "/share/HDA_DATA" to your HDD folder and change this line in "autorun.sh"
    add this line:
    /share/HDA_DATA/autostart/autostart.sh
    and remove the "pyload" line.
    python /opt/share/pyload/pyLoadCore.py --daemon

  2. open Putty and create "autostart" folder and file on NAS: (you could choose any other name!)
    []# cd /share/HDA_DATxxxxxx
    [
    ]# mkdir autostart
    []# touch autostart/autostart.sh
    [
    ]# chmod +x autostart/autostart.sh

  3. edit new autostart.sh file with "vi",insert with "i" and save/quit with "w" "q". Or you use any other editor.
    That file can be found easily with your filebrowser! After the "pyload ..." line, you can add your special code to be executed at startup! Uncomment if you want to disable any line.

#!/bin/sh
python /opt/share/pyload/pyLoadCore.py --daemon

now my pload starts at Startup and runs without any problems!

@github-actions
Copy link

This ticket has been automatically locked since there has not been any recent activity after it was closed.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests