seandepagnier / mbtiles-nautical-tools

tools for manipulating and converting mbtiles for nautical purposes
9 stars 1 forks source link

mbtiles2kaps.py", line 175, in <module> subprocess.call(pngquantcommand) #2

Open Pacific8118 opened 5 years ago

Pacific8118 commented 5 years ago

Hello, I came across those utilities and wanted to use them to create KAP files for OpenCPN. Very usefull but error when launching Mbtiles2kap.py :

I installed accordingly but got following error messages : ( I have no understanding of Python but I managed to launch it with the debugger to get as much as possible information ( further below )) Without debugger : frederic@ubuntu-VirtualBox:~/mbtiles-nautical-tools$ sudo ./mbtiles2kaps.py ../manchelarge.mbtiles /home/frederic/manche 9 charts for zoom 9
16 charts for zoom 10
31 charts for zoom 11
65 charts for zoom 12
128 charts for zoom 13
will generate 249 charts 0.0% converting (-6.328125, 48.922499, 0.703125, 50.289339) 9 30 tiles pngquant 127 -f --ext .png /home/frederic/manche/9/0.png Traceback (most recent call last): File "./mbtiles2kaps.py", line 175, in subprocess.call(pngquantcommand) File "/usr/lib/python2.7/subprocess.py", line 172, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python2.7/subprocess.py", line 394, in init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory frederic@ubuntu-VirtualBox:~/mbtiles-nautical-tools$

With Debugger : frederic@ubuntu-VirtualBox:~/mbtiles-nautical-tools$ sudo python -m pdb mbtiles2kaps.py ../manchelarge.mbtiles /home/frederic/manche

/home/frederic/mbtiles-nautical-tools/mbtiles2kaps.py(10)() -> import os (Pdb) continue 9 charts for zoom 9
16 charts for zoom 10
31 charts for zoom 11
65 charts for zoom 12
128 charts for zoom 13
will generate 249 charts 0.0% converting (-6.328125, 48.922499, 0.703125, 50.289339) 9 30 tiles pngquant 127 -f --ext .png /home/frederic/manche/9/0.png Traceback (most recent call last): File "/usr/lib/python2.7/pdb.py", line 1314, in main pdb._runscript(mainpyfile) File "/usr/lib/python2.7/pdb.py", line 1233, in _runscript self.run(statement) File "/usr/lib/python2.7/bdb.py", line 400, in run exec cmd in globals, locals File "", line 1, in File "mbtiles2kaps.py", line 10, in import os File "/usr/lib/python2.7/subprocess.py", line 172, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python2.7/subprocess.py", line 394, in init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program /usr/lib/python2.7/subprocess.py(1047)_execute_child() -> raise child_exception (Pdb) continue Post mortem debugger finished. The mbtiles2kaps.py will be restarted

seandepagnier commented 5 years ago

do you have the command "pngquant" installed and available in the path?

On 2/8/19, Pacific8118 notifications@github.com wrote:

Hello, I came across those utilities and wanted to use them to create KAP files for OpenCPN. Very usefull but error when launching Mbtiles2kap.py :

I installed accordingly but got following error messages : ( I have no understanding of Python but I managed to launch it with the debugger to get as much as possible information ( further below )) Without debugger : frederic@ubuntu-VirtualBox:~/mbtiles-nautical-tools$ sudo ./mbtiles2kaps.py ../manchelarge.mbtiles /home/frederic/manche 9 charts for zoom 9 16 charts for zoom 10 31 charts for zoom 11 65 charts for zoom 12 128 charts for zoom 13 will generate 249 charts 0.0% converting (-6.328125, 48.922499, 0.703125, 50.289339) 9 30 tiles pngquant 127 -f --ext .png /home/frederic/manche/9/0.png Traceback (most recent call last): File "./mbtiles2kaps.py", line 175, in subprocess.call(pngquantcommand) File "/usr/lib/python2.7/subprocess.py", line 172, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python2.7/subprocess.py", line 394, in init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory frederic@ubuntu-VirtualBox:~/mbtiles-nautical-tools$

With Debugger : frederic@ubuntu-VirtualBox:~/mbtiles-nautical-tools$ sudo python -m pdb mbtiles2kaps.py ../manchelarge.mbtiles /home/frederic/manche

/home/frederic/mbtiles-nautical-tools/mbtiles2kaps.py(10)() -> import os (Pdb) continue 9 charts for zoom 9 16 charts for zoom 10 31 charts for zoom 11 65 charts for zoom 12 128 charts for zoom 13 will generate 249 charts 0.0% converting (-6.328125, 48.922499, 0.703125, 50.289339) 9 30 tiles pngquant 127 -f --ext .png /home/frederic/manche/9/0.png Traceback (most recent call last): File "/usr/lib/python2.7/pdb.py", line 1314, in main pdb._runscript(mainpyfile) File "/usr/lib/python2.7/pdb.py", line 1233, in _runscript self.run(statement) File "/usr/lib/python2.7/bdb.py", line 400, in run exec cmd in globals, locals File "", line 1, in File "mbtiles2kaps.py", line 10, in import os File "/usr/lib/python2.7/subprocess.py", line 172, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python2.7/subprocess.py", line 394, in init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program /usr/lib/python2.7/subprocess.py(1047)_execute_child() -> raise child_exception (Pdb) continue Post mortem debugger finished. The mbtiles2kaps.py will be restarted

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/seandepagnier/mbtiles-nautical-tools/issues/2

Pacific8118 commented 5 years ago

My mistake I did install the pngquant.py wrapper instead of the pngquant-bin. It works now !!!! Thank you sir.