Re: test-bugzilla-files.py issues
On 12/01/17 17:02, Nagy Ákos wrote: > Hey, > > I want to run test-bugzilla-files.py to make some test, but I got an error: > > /opt/libreoffice5.3/program/python > /opt/dev-tools/test-bugzilla-files/test-bugzilla-files.py > --soffice=/opt/libreoffice5.3/program/soffice /opt/testfiles/untitled1.ods > Traceback (most recent call last): > File "/opt/dev-tools/test-bugzilla-files/test-bugzilla-files.py", line > 612, in > runLoadFileTests(opts, args) > File "/opt/dev-tools/test-bugzilla-files/test-bugzilla-files.py", line > 567, in runLoadFileTests > files.extend(getFiles(file_list_name[0])) > File "/opt/dev-tools/test-bugzilla-files/test-bugzilla-files.py", line > 75, in getFiles > files = file_list.readlines() > File "/opt/libreoffice5.3/program/python-core-3.5.0/lib/codecs.py", > line 321, in decode > (result, consumed) = self._buffer_decode(data, self.errors, final) > UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 10: > invalid start byte > > > I mention that I'm not an expert deveopoer and try to run the test with > normal LibreOffice instalation. i'm afraid you're holding it wrong :) the file argument to test-bugzilla-files/test-bugzilla-files.py is not a document file but a file that contains a list of file-names, one per line. it's not really designed to be invoked manually, i run it via "new-control.py", which takes a directory with documents and starts up some number of parallel jobs; the configuration of output dirs and "soffice" is in the "config" file. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: test-bugzilla-files.py issues
Can't solve the problem. 2017. 01. 12. 18:07 keltezéssel, Jan Iversen írta: > >> UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 10: >> invalid start byte > > I have frequently the same problem with differen python scripts on > different machines. The problem is usually you locale setting. > > I added > export*LANG=*'' > export*LC_ALL=*en_US.UTF-8 > export*LC_CTYPE=*en_US.UTF-8 > > to .bashrc, and then the scripts I work. > > rgds > jan I. > > > ___ > LibreOffice mailing list > LibreOffice@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/libreoffice -- Ákos ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: test-bugzilla-files.py issues
> UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 10: > invalid start byte I have frequently the same problem with differen python scripts on different machines. The problem is usually you locale setting. I added export LANG='' export LC_ALL=en_US.UTF-8 export LC_CTYPE=en_US.UTF-8 to .bashrc, and then the scripts I work. rgds jan I.___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: 'test-bugzilla-files.py' issues
On Tue, Apr 15, 2014 at 8:37 PM, Markus Mohrhard wrote: > > It is a feature that it does not look in sub directories. That allows me > some freedom in organizing documents and moving broken documents around > without too much work. So I would be a bit reluctant to change that behavior > as it will break the script on the server. You can just use a script similar > to the one that I posted for you that iterates over all directories and > inspects each one. > Ok, guess ill just do something like this then: for dir in ./libreofficedocs/* do test-bugzilla-files.py $dir done or : find ./libreofficedocs/ -type d | while read dir do test-bugzilla-files.py $dir done Thanks for the help, Regards, John Smith ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: 'test-bugzilla-files.py' issues
Hey, On Tue, Apr 15, 2014 at 7:20 PM, John Smith wrote: > On Tue, Apr 15, 2014 at 6:53 PM, Markus Mohrhard > wrote: > > > > I already mentioned on IRC that this means it just did not find any test > > files. The connection is working otherwise the NoConnectException would > be > > repeated. You need to make sure that you point to the correct directory > and > > otherwise debug why the script is not finding the files in your case. It > > works for me so I can't tell you what is wrong in your setup. > > > > Hi, > > I think I got it. When I remove the comments before 'print(files)' and > 'print( dirs )', I only see the subdirs below > /usr/local/src/libreofficedocs/, but not the files located in those > subdirs. When I copy a file directly in libreofficedocs, the script > does find it. Looks like test-bugzilla-files.py doesnt descend into > the subdirectory's. Since > 'dev-tools/test-bugzilla-files/test-bugzilla-files.py' created this > directory structure, I assumed that test-bugzilla-files.py would be > able to parse that. > > I know next time nothing about python, but would it be possible and > reasonably easy/quick to make test-bugzilla-files.py look in all > subdirectory's you point it at too ? > > > It is a feature that it does not look in sub directories. That allows me some freedom in organizing documents and moving broken documents around without too much work. So I would be a bit reluctant to change that behavior as it will break the script on the server. You can just use a script similar to the one that I posted for you that iterates over all directories and inspects each one. Regards, Markus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: 'test-bugzilla-files.py' issues
On Tue, Apr 15, 2014 at 6:53 PM, Markus Mohrhard wrote: > > I already mentioned on IRC that this means it just did not find any test > files. The connection is working otherwise the NoConnectException would be > repeated. You need to make sure that you point to the correct directory and > otherwise debug why the script is not finding the files in your case. It > works for me so I can't tell you what is wrong in your setup. > Hi, I think I got it. When I remove the comments before 'print(files)' and 'print( dirs )', I only see the subdirs below /usr/local/src/libreofficedocs/, but not the files located in those subdirs. When I copy a file directly in libreofficedocs, the script does find it. Looks like test-bugzilla-files.py doesnt descend into the subdirectory's. Since 'dev-tools/test-bugzilla-files/test-bugzilla-files.py' created this directory structure, I assumed that test-bugzilla-files.py would be able to parse that. I know next time nothing about python, but would it be possible and reasonably easy/quick to make test-bugzilla-files.py look in all subdirectory's you point it at too ? Thanks for all the help, Regards, John Smith. # find /usr/local/src/libreofficedocs/ -type d /usr/local/src/libreofficedocs/ /usr/local/src/libreofficedocs/sxg /usr/local/src/libreofficedocs/pgm /usr/local/src/libreofficedocs/wmf /usr/local/src/libreofficedocs/psd /usr/local/src/libreofficedocs/xpm /usr/local/src/libreofficedocs/odb /usr/local/src/libreofficedocs/docx /usr/local/src/libreofficedocs/xlsx /usr/local/src/libreofficedocs/docbook /usr/local/src/libreofficedocs/pbm /usr/local/src/libreofficedocs/pcx /usr/local/src/libreofficedocs/svm /usr/local/src/libreofficedocs/cwk /usr/local/src/libreofficedocs/doc /usr/local/src/libreofficedocs/sgf /usr/local/src/libreofficedocs/sdd_i /usr/local/src/libreofficedocs/xltm /usr/local/src/libreofficedocs/ras /usr/local/src/libreofficedocs/dbf /usr/local/src/libreofficedocs/xltx /usr/local/src/libreofficedocs/cmx /usr/local/src/libreofficedocs/psw /usr/local/src/libreofficedocs/dxf /usr/local/src/libreofficedocs/sds /usr/local/src/libreofficedocs/sdp5 /usr/local/src/libreofficedocs/sti /usr/local/src/libreofficedocs/met /usr/local/src/libreofficedocs/vdx /usr/local/src/libreofficedocs/ppt /usr/local/src/libreofficedocs/potm /usr/local/src/libreofficedocs/sgl5 /usr/local/src/libreofficedocs/pcd /usr/local/src/libreofficedocs/pdb_palm /usr/local/src/libreofficedocs/smf5 /usr/local/src/libreofficedocs/xls /usr/local/src/libreofficedocs/ppotx /usr/local/src/libreofficedocs/pptm /usr/local/src/libreofficedocs/odt /usr/local/src/libreofficedocs/fods /usr/local/src/libreofficedocs/sdd_d /usr/local/src/libreofficedocs/sxs /usr/local/src/libreofficedocs/oth /usr/local/src/libreofficedocs/sxd /usr/local/src/libreofficedocs/sxm /usr/local/src/libreofficedocs/odg /usr/local/src/libreofficedocs/pdb_plucker /usr/local/src/libreofficedocs/otc /usr/local/src/libreofficedocs/602 /usr/local/src/libreofficedocs/tiff /usr/local/src/libreofficedocs/sxc /usr/local/src/libreofficedocs/pptx /usr/local/src/libreofficedocs/otg /usr/local/src/libreofficedocs/otp /usr/local/src/libreofficedocs/xlsm /usr/local/src/libreofficedocs/odm /usr/local/src/libreofficedocs/svg /usr/local/src/libreofficedocs/pict /usr/local/src/libreofficedocs/rtf /usr/local/src/libreofficedocs/docm /usr/local/src/libreofficedocs/eps /usr/local/src/libreofficedocs/fodg /usr/local/src/libreofficedocs/lrf /usr/local/src/libreofficedocs/key /usr/local/src/libreofficedocs/sldm /usr/local/src/libreofficedocs/sdd5 /usr/local/src/libreofficedocs/ppm /usr/local/src/libreofficedocs/sdw /usr/local/src/libreofficedocs/sds5 /usr/local/src/libreofficedocs/mml /usr/local/src/libreofficedocs/odf /usr/local/src/libreofficedocs/odp /usr/local/src/libreofficedocs/fodp /usr/local/src/libreofficedocs/dotm /usr/local/src/libreofficedocs/ppsm /usr/local/src/libreofficedocs/std /usr/local/src/libreofficedocs/cgm /usr/local/src/libreofficedocs/xbm /usr/local/src/libreofficedocs/wks /usr/local/src/libreofficedocs/wpg /usr/local/src/libreofficedocs/wpd /usr/local/src/libreofficedocs/ods /usr/local/src/libreofficedocs/sldx /usr/local/src/libreofficedocs/fb2 /usr/local/src/libreofficedocs/odc /usr/local/src/libreofficedocs/sdc /usr/local/src/libreofficedocs/ott /usr/local/src/libreofficedocs/sdc5 /usr/local/src/libreofficedocs/ots /usr/local/src/libreofficedocs/smf /usr/local/src/libreofficedocs/tga /usr/local/src/libreofficedocs/sxw /usr/local/src/libreofficedocs/pdb /usr/local/src/libreofficedocs/emf /usr/local/src/libreofficedocs/vsd /usr/local/src/libreofficedocs/otf /usr/local/src/libreofficedocs/hwp /usr/local/src/libreofficedocs/stc /usr/local/src/libreofficedocs/fodt /usr/local/src/libreofficedocs/cdr /usr/local/src/libreofficedocs/html /usr/local/src/libreofficedocs/bmp /usr/local/src/libreofficedocs/sxi /usr/local/src/libreofficedocs/ppsx /usr/local/src/libreofficedocs/wps /usr/local/src/libreofficedocs/sdw5 /usr/local/src/lib
Re: 'test-bugzilla-files.py' issues
Hey, On Tue, Apr 15, 2014 at 6:13 PM, John Smith wrote: > Markus, Stephan: > > Thanks. > > I rebuild with './configure --enable-python=internal', but I still get > the same results: > > # pwd > /usr/local/src > # /usr/local/src/libreoffice/instdir/program/python > dev-tools/test-bugzilla-files/test-bugzilla-files.py > --soffice=path:/usr/local/src/libreoffice/instdir/program/soffice > --userdir=file:///tmp/.config/libreoffice/4 > /usr/local/src/libreofficedocs/ > 12128 > OfficeConnection: connecting to: > > uno:pipe,name=pytest548aca44-c4b8-11e3-83c3-000c29d3;urp;StarOffice.ComponentContext > NoConnectException: sleeping... > kill > kill 12128 > > I already mentioned on IRC that this means it just did not find any test files. The connection is working otherwise the NoConnectException would be repeated. You need to make sure that you point to the correct directory and otherwise debug why the script is not finding the files in your case. It works for me so I can't tell you what is wrong in your setup. Regards, Markus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: 'test-bugzilla-files.py' issues
Markus, Stephan: Thanks. I rebuild with './configure --enable-python=internal', but I still get the same results: # pwd /usr/local/src # /usr/local/src/libreoffice/instdir/program/python dev-tools/test-bugzilla-files/test-bugzilla-files.py --soffice=path:/usr/local/src/libreoffice/instdir/program/soffice --userdir=file:///tmp/.config/libreoffice/4 /usr/local/src/libreofficedocs/ 12128 OfficeConnection: connecting to: uno:pipe,name=pytest548aca44-c4b8-11e3-83c3-000c29d3;urp;StarOffice.ComponentContext NoConnectException: sleeping... kill kill 12128 Regards, John Smith. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: 'test-bugzilla-files.py' issues
Hey, On Tue, Apr 15, 2014 at 5:29 PM, John Smith wrote: > On Tue, Apr 15, 2014 at 12:57 PM, Stephan Bergmann > wrote: > > > > * Never start soffice.bin directly, always use soffice instead. > > > Thanks, ill do that from now on. Ive re-tried with using 'soffice' > instead of 'soffice.bin', and the results are the same: using soffice > directly works. > > > > > > * At least in current gerrit.libreoffice.org/dev-tools there is no > dev-tools/test-bugzilla-files.py, > > but only non-executable > dev-tools/test-bugzilla-files/test-bugzilla-files.py > > > Im sorry, I cut n pasted that incorrectly in my email. You are right, > I mean (and have been using) the non-executable > dev-tools/test-bugzilla-files/test-bugzilla-files.py > > > > > > that you need to run as > "/usr/local/src/libreoffice/instdir/program/python > dev-tools/test-bugzilla-files/test-bugzilla-files.py ..." > > > Hrm. I must be doing something wrong with the build then, because i > dont have a '/usr/local/src/libreoffice/instdir/program/python' > > > # find /usr/local/src/libreoffice -name python > /usr/local/src/libreoffice/workdir/ScpTarget/scp2/source/python > /usr/local/src/libreoffice/workdir/ScpPreprocessTarget/scp2/source/python > /usr/local/src/libreoffice/workdir/AutoInstall/python > > /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/doc/html/boost/mpi/python > /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/boost/python > > /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/boost/parameter/aux_/python > /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/boost/mpi/python > > /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/tools/quickbook/test/python > /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/libs/python > > /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/libs/python/doc/tutorial/doc/html/python > > /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/libs/mpi/example/python > > /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/libs/mpi/src/python > > /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/libs/mpi/test/python > /usr/local/src/libreoffice/instdir/share/Scripts/python > /usr/local/src/libreoffice/instdir/sdk/examples/python > /usr/local/src/libreoffice/odk/examples/python > /usr/local/src/libreoffice/sw/qa/python > /usr/local/src/libreoffice/scripting/examples/python > /usr/local/src/libreoffice/scp2/source/python > /usr/local/src/libreoffice/unotest/source/python > > > You need to explicitly enable internal python. Use --enable-pytho=internal to get the internal python. I had a similar problem recently and forgot to put the topic on the ESC agenda. Regards, Markus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: 'test-bugzilla-files.py' issues
On 04/15/2014 05:29 PM, John Smith wrote: On Tue, Apr 15, 2014 at 12:57 PM, Stephan Bergmann wrote: that you need to run as "/usr/local/src/libreoffice/instdir/program/python dev-tools/test-bugzilla-files/test-bugzilla-files.py ..." Hrm. I must be doing something wrong with the build then, because i dont have a '/usr/local/src/libreoffice/instdir/program/python' Do you have --enable-python or --disable-python in your autogen.input? For PyUNO to work, certain settings must be present in the Python process. LO's bundled python executable takes care to make those settings, while a stock one won't (or might make the wrong settings for a distro's LO instance). Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: 'test-bugzilla-files.py' issues
On Tue, Apr 15, 2014 at 12:57 PM, Stephan Bergmann wrote: > > * Never start soffice.bin directly, always use soffice instead. > Thanks, ill do that from now on. Ive re-tried with using 'soffice' instead of 'soffice.bin', and the results are the same: using soffice directly works. > > * At least in current gerrit.libreoffice.org/dev-tools there is no > dev-tools/test-bugzilla-files.py, > but only non-executable dev-tools/test-bugzilla-files/test-bugzilla-files.py > Im sorry, I cut n pasted that incorrectly in my email. You are right, I mean (and have been using) the non-executable dev-tools/test-bugzilla-files/test-bugzilla-files.py > > that you need to run as "/usr/local/src/libreoffice/instdir/program/python > dev-tools/test-bugzilla-files/test-bugzilla-files.py ..." > Hrm. I must be doing something wrong with the build then, because i dont have a '/usr/local/src/libreoffice/instdir/program/python' # find /usr/local/src/libreoffice -name python /usr/local/src/libreoffice/workdir/ScpTarget/scp2/source/python /usr/local/src/libreoffice/workdir/ScpPreprocessTarget/scp2/source/python /usr/local/src/libreoffice/workdir/AutoInstall/python /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/doc/html/boost/mpi/python /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/boost/python /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/boost/parameter/aux_/python /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/boost/mpi/python /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/tools/quickbook/test/python /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/libs/python /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/libs/python/doc/tutorial/doc/html/python /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/libs/mpi/example/python /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/libs/mpi/src/python /usr/local/src/libreoffice/workdir/UnpackedTarball/boost/libs/mpi/test/python /usr/local/src/libreoffice/instdir/share/Scripts/python /usr/local/src/libreoffice/instdir/sdk/examples/python /usr/local/src/libreoffice/odk/examples/python /usr/local/src/libreoffice/sw/qa/python /usr/local/src/libreoffice/scripting/examples/python /usr/local/src/libreoffice/scp2/source/python /usr/local/src/libreoffice/unotest/source/python Regards, John Smith ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: 'test-bugzilla-files.py' issues
On 04/15/2014 10:23 AM, John Smith wrote: I seem to have some issues starting and/or connecting to soffice in headless mode. When i run 'soffice.bin -env:UserInstallation=file:///tmp/.config/libreoffice/4 --accept="pipe,name=pytest50f337fa-c471-11e3-93ba-000c29d3;urp" --quickstart=no --nofirststartwizard --norestore --nologo --headless --nodefault' 'lsof' shows the soffice pipe is created successfully. But when I run 'dev-tools/test-bugzilla-files.py --soffice=path:/usr/local/src/libreoffice/instdir/program/soffice --userdir=file:///tmp/.config/libreoffice/4 /usr/local/src/libreofficedocs/', the connection fails. The same thing happens when i use sockets instead of named pipes. This listens on a socket: soffice --headless --invisible --nologo --norestore "--accept=socket,port=8100" But this doesnt: python dev-tools/test-bugzilla-files.py --soffice=connect:socket,port=8100 /usr/local/src/libreofficedocs/ 'dev-tools/test-bugzilla-files.py' basically does the same thing as what i do on the command line. If anyone has an idea of what could be going wrong, or where to start troubleshooting, any and all help is appreciated. I cannot reproduce your problems here on recent master. Try to strip down the dev-tools/test-bugzilla-files.py side as much as possible to see why it fails to connect. Some more notes: * Never start soffice.bin directly, always use soffice instead. * At least in current gerrit.libreoffice.org/dev-tools there is no dev-tools/test-bugzilla-files.py, but only non-executable dev-tools/test-bugzilla-files/test-bugzilla-files.py that you need to run as "/usr/local/src/libreoffice/instdir/program/python dev-tools/test-bugzilla-files/test-bugzilla-files.py ..." Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice