[HOWTO] pyLoad 0.4.9 (self-made port)

Triumph

Dabbler
Joined
May 14, 2014
Messages
12
One thing I'm noticing is when I download a zipped file, Pyload will unzip the contents, but leave the zip file.
In the logs, it says 'Send2Trash lib not found'

is there a way to install this?
is it as simple as 'pkg install Send2Trash' ?

if so, is there any configurations needed within that package?
 

Gamer1400

Cadet
Joined
Feb 20, 2017
Messages
2
Hey Guys,

I am currently trying to install pyload on FreeNAS 9.10.1 using the information in this thread.
However since cloning the pyload port and make install clean in /pyload 2+ hours have passed and the dataset for the pyload jail is at 7gb now.
Im pretty sure that can't be normal (I saw a bunch of stuff about xorg and gallium3d flying past in the terminal?)
I hope someone can help me with that...

Thanks a lot in advance
 

Triumph

Dabbler
Joined
May 14, 2014
Messages
12
Hey Guys,

I am currently trying to install pyload on FreeNAS 9.10.1 using the information in this thread.
However since cloning the pyload port and make install clean in /pyload 2+ hours have passed and the dataset for the pyload jail is at 7gb now.
Im pretty sure that can't be normal (I saw a bunch of stuff about xorg and gallium3d flying past in the terminal?)
I hope someone can help me with that...

Thanks a lot in advance

I will take a look when I get home, I saved the instructions I used. It definitely shouldn't take 2+ hours.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hey Guys,

I am currently trying to install pyload on FreeNAS 9.10.1 using the information in this thread.
However since cloning the pyload port and make install clean in /pyload 2+ hours have passed and the dataset for the pyload jail is at 7gb now.
Im pretty sure that can't be normal (I saw a bunch of stuff about xorg and gallium3d flying past in the terminal?)
I hope someone can help me with that...

Thanks a lot in advance
That would make sense if you are making (compiling) pyload and all it's dependencies.
I suggest you instead install pyload's dependencies first from 'pkg' then make pyload.

Code:
pkg install python py27-sqlite3 py27-curl py27-imaging py27-pycrypto py27-django spidermonkey17 py27-openssl gocr tesseract tesseract-data unrar unzip
 

Gamer1400

Cadet
Joined
Feb 20, 2017
Messages
2
That would make sense if you are making (compiling) pyload and all it's dependencies.
I suggest you instead install pyload's dependencies first from 'pkg' then make pyload.

Code:
pkg install python py27-sqlite3 py27-curl py27-imaging py27-pycrypto py27-django spidermonkey17 py27-openssl gocr tesseract tesseract-data unrar unzip

Thanks a lot for the tip!
I will give that a try as soon as I have some time.
 

C0MM4ND3R

Cadet
Joined
Jan 16, 2017
Messages
7
I installed PyLoad a few times on my FreeNAS machine but since i swapped to FreeNAS 11, everytime i try to install PyLoad following Triumph`s guide i end up getting this error:

Code:
Error a dependency refers to a non existing origin: /usr/ports/graphics/py-imaging in RUN_DEPENDS

And the make command just stops.
 
Last edited by a moderator:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Checking freshports.org it looks like it was replaced by py-pillow. so change that in the Makefile.
 
Last edited by a moderator:
Joined
Oct 29, 2017
Messages
1
I have pyload running, but the service runs always as root.
I have created a user "pyload", when i login as the user pyload i can start pyload via "python2 pyload"
When i try it as root user i use "su pyload python2 pyload", then i get this error:

python2: ¸: not found
python2: à: not found
python2: cannot create @@@ @@@@@@@À@@@@´: Permission denied
python2: 1: Syntax error: "(" unexpected
python2: 2: Syntax error: Error in command substitution
 

n3IVI0

Dabbler
Joined
Sep 7, 2015
Messages
33
Install pyLoad as an iocage jail:

1. iocage create -n pyload ip4_addr="em0|IP ADDRESS" -r 11.1-RELEASE
2. iocage start pyload
3. iocage console pyload
4. pkg update && portsnap fetch extract
5. pkg install tesseract tesseract-data ftp/py-pycurl www/py-django18 py27-qt4 py27-openssl
6. cd /usr/ports/graphics/py-pillow
7. make install clean
8. cd /usr/ports/devel/git
9. make install clean
10. During the compilation it will ask you for the configuration of required packages - leave everything as is but make sure that when it asks for CURL you select Cookies support - it's disabled by default. (use arrows to move and space to check and uncheck the fields, enter to continue)
11. cd /usr/ports/www
12. git clone https://github.com/mrhanky17/pyload-freebsd.git pyload
13. cd pyload
14. make makesum
15. make install clean (you'll get the [install] Error code 1 at the end, ignore it)
16. cd /usr/local/share/pyload
17. chmod +x pyLoadCli.py pyLoadCore.py pyLoadGui.py
18. cd module
19. edit setup.py
20. Change setup.py #L221 to:

pil = self.check_module("PIL")
21. pyload
22. go through the setup
23. echo 'pyload_enable="YES"' >> /etc/rc.conf
24. echo 'pyload_flags="--daemon"' >> /etc/rc.conf
25. echo 'pyload_pid="/var/run/pyload.pid" ' >> /etc/rc.conf
26. echo 'pyload_config="/mnt/config"' >> /etc/rc.conf -- Note that this is the config Path you choose in the pyload Setup. If you didn't change the Path it's '/root/pyload'.
27. ln -s /usr/ports/www/pyload/work/stage/usr/local/etc/rc.d/pyload /etc/rc.d/pyload
28. service pyload start
29. pyload should run and you should have access to it through web interface with IP you set in step 1 http://IP:8000/
30. To add storage enter the jail with iocage console pyload. Create the directories you will be mounting. Exit the jail. Edit the jail fstab with the command iocage fstab -a pyload /path/to/host/disk /path/to/jail/disk nullfs rw 0 0 This will create symlinks to those directories you made. Restart the jail with iocage restart pyload. Pyload will be running, and your storage should be mounted as RW.
 
Last edited:

laure

Cadet
Joined
Oct 31, 2016
Messages
1
Hi! Thx for your update but i get stucked @no.21 getting the following error:

Traceback (most recent call last):

File "/usr/local/bin/pyload", line 54, in <module>

from module.database import DatabaseBackend, FileHandler

File "/usr/local/share/pyload/module/database/__init__.py", line 1, in <module>

from DatabaseBackend import DatabaseBackend

File "/usr/local/share/pyload/module/database/DatabaseBackend.py", line 33, in <module>

import sqlite3

File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>

from dbapi2 import *

File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module>

from _sqlite3 import *

ImportError: /usr/local/lib/libsqlite3.so.0: Undefined symbol "fdatasync"

Any Ideas? - I'm running FreeNAS 11.0 RC4 - also had some issues with the ports - my "freebsd vers. is no longer supported" (vers. 11.0
-RELEASE-p1
) could handle this with an entry in the make.conf (allow_unsupported_system=yes) maybe this causes the error's in the installation progress?!?!

maybe you can help me
thx


Install pyLoad as an iocage jail:

1. iocage create -n pyload ip4_addr="em0|IP ADDRESS" -r 11.1-RELEASE
2. iocage start pyload
3. iocage console pyload
4. pkg update && portsnap fetch extract
5. pkg install tesseract tesseract-data ftp/py-pycurl www/py-django18 py27-qt4 py27-openssl
6. cd /usr/ports/graphics/py-pillow
7. make install clean
8. cd /usr/ports/devel/git
9. make install clean
10. During the compilation it will ask you for the configuration of required packages - leave everything as is but make sure that when it asks for CURL you select Cookies support - it's disabled by default. (use arrows to move and space to check and uncheck the fields, enter to continue)
11. cd /usr/ports/www
12. git clone https://github.com/mrhanky17/pyload-freebsd.git pyload
13. cd pyload/
14. make makesum
15. make install clean' (you'll get the [install] Error code 1 at the end, ignore it)
16. cd /usr/local/share/pyload
17. chmod +x pyLoadCli.py pyLoadCore.py pyLoadGui.py
18. cd module
19. edit setup.py
20. Change setup.py #L221 to:

pil = self.check_module("PIL")
21. pyload
22. go through the setup
23. echo 'pyload_enable="YES"' >> /etc/rc.conf
24. echo 'pyload_flags="--daemon"' >> /etc/rc.conf
25. echo 'pyload_pid="/var/run/pyload.pid" ' >> /etc/rc.conf
26. echo 'pyload_config="/mnt/config"' >> /etc/rc.conf -- Note that this is the config Path you choose in the pyload Setup. If you didn't change the Path it's '/root/pyload'.
27. ln -s /usr/ports/www/pyload/work/stage/usr/local/etc/rc.d/pyload /etc/rc.d/pyload
28. service pyload start
29. pyload should run and you should have access to it through web interface with IP you set in step 1 http://IP:8000/
 
Last edited:

n3IVI0

Dabbler
Joined
Sep 7, 2015
Messages
33
I am currently on FreeNAS 11.1-BETA1. Maybe you need to update your FreeNAS? I think it is needing FreeBSD 11.1 in order to work properly. Did you type make makesum before you kicked off make?
 
Last edited by a moderator:
Joined
Dec 15, 2017
Messages
3
Hi guys,

first of all thanks for the great tutorial, it was really helpful! After failing to install pyload into a conventional jail, I moved to the solution using iocage with which I was able to succeed on my FreeNAS 11.1 server.

I´m left with two "problems" now which seem to be menial to the Linux/BSD savvy amongst you but leave me with an insurmountable task:

1. Since I can´t administer iocage jails in the GUI ( in this case: "add storage" ), how do I symlink/mount the pyload download-folder to a folder that is part of my regular ZFS share that I can see as SMB-shares? Do I go about that with editing fstab?

2. How do I set an autostart command to the iocage-jail?

Thanks for helping me out!
 

n3IVI0

Dabbler
Joined
Sep 7, 2015
Messages
33
You're welcome. I wrote it so if I ever had it to do again, I wouldn't have to re-invent the wheel.

1. This involves editing the fstab for each jail. These are kept in /mnt/iocage/jails and the directory for each jail you create. You add symlinks to them with this command:
iocage fstab -a /path/to/host/disk /path/to/jail/disk


2. First, you have to edit /etc/rc.conf (the one in root, not the one in the jail). Add iocage_enable="YES". Then in root, for each jail, type
iocage set boot=on nameofjail
This will autostart them when the server boots up. Inside each jail, just like with the old warden jails, you have to enter sysrc "nameofapp_enable=YES" to get the program to run. You enter jails with the command iocage console nameofjail. Most of the instructions for setting up jails are the same. Here is a representative sampling: https://forums.freenas.org/index.ph...phones-jackett-ombi-transmission-organizr.58/

Here is a link to the documentation for iocage, which was helpful to me in learning how to control it: https://iocage.readthedocs.io/en/latest/basic-use.html
 
Last edited:
Joined
Dec 15, 2017
Messages
3
Thanks for the reply.

1. I was able to create fstab entries via the iocage command, however any attempts to mount data points through either an fstab entry or the appropriate mount command result in an error message as soon as I manually restart the jail:

root@freenas:/mnt/iocage/jails/pyload # iocage restart pyload

pyload is not running!

* Starting pyload

+ Start FAILED

mount: /mnt/nas/downloads/pyload: Operation not supported by device

All attempts to mount other directories failed as well, which leads me to thinking this isn´t working the conventional way in ZFS environments.

You got any ideas?

Thanks in advance
 

n3IVI0

Dabbler
Joined
Sep 7, 2015
Messages
33
Whoops, gave the wrong command for editing the fstab. Try this: iocage fstab -a nameofjail /path/to/host/disk /path/to/jail/disk nullfs rw 0 0

Here's my pyload fstab:

Code:
/mnt/warehouse14/configs/pyload /mnt/iocage/jails/pyload/root/mnt/config		nullfs  rw	  0	   0
/mnt/warehouse14/shares/files/Downloads /mnt/iocage/jails/pyload/root/mnt/download	  nullfs  rw	  0	   0


First I entered the pyload jail. Then I created two directories in /mnt, config and download. Then I exited the jail and created links to those directories with the aforementioned command. So for the config directory, I used the command iocage fstab -a pyload /mnt/warehouse14/configs/pyload /mnt/config nullfs rw 0 0

That should do the trick.
 
Joined
Dec 15, 2017
Messages
3
Whoops, gave the wrong command for editing the fstab. Try this: iocage fstab -a nameofjail /path/to/host/disk /path/to/jail/disk nullfs rw 0 0

Here's my pyload fstab:

Code:
/mnt/warehouse14/configs/pyload /mnt/iocage/jails/pyload/root/mnt/config		nullfs  rw	  0	   0
/mnt/warehouse14/shares/files/Downloads /mnt/iocage/jails/pyload/root/mnt/download	  nullfs  rw	  0	   0


First I entered the pyload jail. Then I created two directories in /mnt, config and download. Then I exited the jail and created links to those directories with the aforementioned command. So for the config directory, I used the command iocage fstab -a pyload /mnt/warehouse14/configs/pyload /mnt/config nullfs rw 0 0

That should do the trick.


That actually did the trick, thanks! I didn´t use 'nullfs' in the fstab entry, but now it works. Finally....
 

sandvaer

Cadet
Joined
May 18, 2014
Messages
8
Install pyLoad as an iocage jail:

1. iocage create -n pyload ip4_addr="em0|IP ADDRESS" -r 11.1-RELEASE
2. iocage start pyload
3. iocage console pyload
4. pkg update && portsnap fetch extract
5. pkg install tesseract tesseract-data ftp/py-pycurl www/py-django18 py27-qt4 py27-openssl
6. cd /usr/ports/graphics/py-pillow
7. make install clean
8. cd /usr/ports/devel/git
9. make install clean
10. During the compilation it will ask you for the configuration of required packages - leave everything as is but make sure that when it asks for CURL you select Cookies support - it's disabled by default. (use arrows to move and space to check and uncheck the fields, enter to continue)
11. cd /usr/ports/www
12. git clone https://github.com/mrhanky17/pyload-freebsd.git pyload
13. cd pyload
14. make makesum
15. make install clean (you'll get the [install] Error code 1 at the end, ignore it)
16. cd /usr/local/share/pyload
17. chmod +x pyLoadCli.py pyLoadCore.py pyLoadGui.py
18. cd module
19. edit setup.py
20. Change setup.py #L221 to:

pil = self.check_module("PIL")
21. pyload
22. go through the setup
23. echo 'pyload_enable="YES"' >> /etc/rc.conf
24. echo 'pyload_flags="--daemon"' >> /etc/rc.conf
25. echo 'pyload_pid="/var/run/pyload.pid" ' >> /etc/rc.conf
26. echo 'pyload_config="/mnt/config"' >> /etc/rc.conf -- Note that this is the config Path you choose in the pyload Setup. If you didn't change the Path it's '/root/pyload'.
27. ln -s /usr/ports/www/pyload/work/stage/usr/local/etc/rc.d/pyload /etc/rc.d/pyload
28. service pyload start
29. pyload should run and you should have access to it through web interface with IP you set in step 1 http://IP:8000/
30. To add storage enter the jail with iocage console pyload. Create the directories you will be mounting. Exit the jail. Edit the jail fstab with the command iocage fstab -a pyload /path/to/host/disk /path/to/jail/disk nullfs rw 0 0 This will create symlinks to those directories you made. Restart the jail with iocage restart pyload. Pyload will be running, and your storage should be mounted as RW.

Hello,
I have FreeNAS-11.2-RELEASE-U1 and set up iocage for pyload.

When I try this I'm unable to find and install "py27-gt4" and "www/py-django18". Is it possible to get pyload to work with FreeNAS 11.2?

Sincerely,
Sandvaer
 

vicmarto

Explorer
Joined
Jan 25, 2018
Messages
61
How can I run pyload as a service but as another user different than root?



Hello,
When I try this I'm unable to find and install "py27-gt4" and "www/py-django18". Is it possible to get pyload to work with FreeNAS 11.2?

Try with pkg install py27-django. About py27-gt4, I don't think it's really necessary if you're only going to use the web interface.
 
Last edited:

mic8585

Cadet
Joined
Oct 16, 2019
Messages
4
I have problem becouse it seems that pyload didn't installed... and the result of command "cd /usr/local/share/pyload" from point 16 is "/usr/local/share/pyload: No such file or directory."

Please help. :) I am running Freenas 11.2-U6.

root@pyload:~ # cd /usr/ports/www
root@pyload:/usr/ports/www # cd pyload
root@pyload:/usr/ports/www/pyload # make makesum
===> License GPLv3 accepted by the user
===> License GPLv3 accepted by the user
===> pyload-0.4.9_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by pyload-0.4.9_1 for building
root@pyload:/usr/ports/www/pyload # make install clean
===> Staging for pyload-0.4.9_1
===> pyload-0.4.9_1 depends on file: /usr/local/lib/python3.6/lib-dynload/_sqlite3.so - found
===> pyload-0.4.9_1 depends on file: /usr/local/lib/python3.6/site-packages/curl - found
===> pyload-0.4.9_1 depends on file: /usr/local/lib/python3.6/site-packages/django - not found
===> Staging for py36-django-1.11.25
===> py36-django-1.11.25 depends on package: py36-django111>=0 - not found
===> Installing for py36-django111-1.11.25
===> Checking if py36-django111 is already installed
===> Registering installation for py36-django111-1.11.25 as automatic
[pyload] Installing py36-django111-1.11.25...
pkg-static: py36-django111-1.11.25 conflicts with py27-django111-1.11.25 (installs files into the same place). Problematic file: /usr/local/man/man1/django-admin.1.gz
*** Error code 70

Stop.
make[5]: stopped in /usr/ports/www/py-django111
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/www/py-django111
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/www/py-django
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/www/py-django
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/pyload
*** Error code 1

Stop.
make: stopped in /usr/ports/www/pyload
root@pyload:/usr/ports/www/pyload # cd /usr/local/share/pyload
/usr/local/share/pyload: No such file or directory.
 
Top