The pdflatex: gave an error:
$ latexmk -pdf std
Rc files read:
latexmkrc
Latexmk: This is Latexmk, John Collins, 18 Nov. 2022. Version 4.78, version: 4.78.
Latexmk: Nothing to do for 'std.tex'.
Latexmk: All targets () are up-to-date
Collected error summary (may duplicate other messages):
pdflatex: gave an error
Latexmk: If appropriate, the -f option can be used to get latexmk
to try to force complete processing.
Maybe I miss something, but where is the error's description? Where is to see it? How do I know what the error is? Confused.
I am new in the python area but I would like to use biopython to align some DNA sequences. I got a script from internet and I ran it as follows (~ is the short for my home path):
~$ python
Python 3.5.1 (default, Jul 3 2016, 12:57:35)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio.Align.Applications import MuscleCommandline
>>> muscle_exe = r"/usr/bin/muscle"
>>> in_file = r"~/SpiderOak Hive/LAB/Lab book/Ery/Seqs/tester.fasta"
>>> out_file = "~/SpiderOak Hive/LAB/Lab book/Ery/Seqs/tester_aligned.fasta"
>>> muscle_cline = MuscleCommandline(muscle_exe, input=in_file, out=out_file)
>>> print(muscle_cline)
/usr/bin/muscle -in "~/SpiderOak Hive/LAB/Lab
book/Ery/Seqs/tester.fasta" -out "~/SpiderOak Hive/LAB/Lab
book/Ery/Seqs/tester_aligned.fasta"
but when lauching the application I got:
>>> muscle_cline()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/python3.5/lib/python3.5/site-packages/Bio/Application/__init__.py",
line 516, in __call__
stdout_str, stderr_str)
Bio.Application.ApplicationError: Non-zero return code 137 from
'/usr/bin/muscle -in "/home/gigiux/SpiderOak Hive/LAB/Lab
book/Ery/Seqs/tester.fasta" -out "/home/gigiux/SpiderOak Hive/LAB/Lab
book/Ery/Seqs/tester_aligned.fasta"', message 'MUSCLE v3.8.31 by
Robert C. Edgar'
>>>
What would be the issue? I have seen on internet that it might be due to memory problems; in that case is the code OK? and how could I run large alignments?
And also: why should I use = r"path" rather than simply "path"?
Many thanks,
Luigi
Your code seems to be correct, and it works with small alignments. The 137 status code might be related to an "Out Of Memory" kill like in this question. Check the last kernel messages with the command dmesg looking for lines like:
kernel: Out of memory: Kill process 52959 (java) score 164 or sacrifice child
this is driving me crazy, I already tried a lot of things,e.g. changing locale, but still getting this after workspace init and then doing catkin_make on subdir.
Running on a recent arch dist, ros-indigo, python2.7 and python 3.5 installed
johnny#localhost:~/ros$ catkin_make
Base path: /home/johnny/ros
Source space: /home/johnny/ros/src
Build space: /home/johnny/ros/build
Devel space: /home/johnny/ros/devel
Install space: /home/johnny/ros/install
####
#### Running command: "cmake /home/johnny/ros/src -DCATKIN_DEVEL_PREFIX=/home/johnny/ros/devel -DCMAKE_INSTALL_PREFIX=/home/johnny/ros/install -G Unix Makefiles" in "/home/johnny/ros/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/johnny/ros/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using default Python package layout
-- Using empy: /usr/lib/python2.7/site-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/johnny/ros/build/test_results
-- Found gtest: gtests will be built
CMake Warning at /opt/ros/indigo/share/catkin/cmake/test/nosetests.cmake:96 (message):
nosetests not found, Python tests can not be run (try installing package
'python3-nose')
Call Stack (most recent call first):
/opt/ros/indigo/share/catkin/cmake/all.cmake:147 (include)
/opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:52 (find_package)
-- catkin 0.6.18
-- BUILD_SHARED_LIBS is on
/opt/ros/indigo/share/catkin/cmake/em/order_packages.cmake.em:23: error: <class 'UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xc3 in position 205: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/em.py", line 3302, in <module>
if __name__ == '__main__': main()
File "/usr/lib/python2.7/site-packages/em.py", line 3300, in main
invoke(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/em.py", line 3283, in invoke
interpreter.wrap(interpreter.file, (file, name))
File "/usr/lib/python2.7/site-packages/em.py", line 2295, in wrap
self.fail(e)
File "/usr/lib/python2.7/site-packages/em.py", line 2284, in wrap
callable(*args)
File "/usr/lib/python2.7/site-packages/em.py", line 2359, in file
self.safe(scanner, done, locals)
File "/usr/lib/python2.7/site-packages/em.py", line 2401, in safe
self.parse(scanner, locals)
File "/usr/lib/python2.7/site-packages/em.py", line 2421, in parse
token.run(self, locals)
File "/usr/lib/python2.7/site-packages/em.py", line 1425, in run
interpreter.execute(self.code, locals)
File "/usr/lib/python2.7/site-packages/em.py", line 2595, in execute
_exec(statements, self.globals, locals)
File "<string>", line 17, in <module>
File "/usr/lib/python2.7/site-packages/catkin_pkg/topological_order.py", line 111, in topological_order
for path, package in find_packages(space).items():
File "/usr/lib/python2.7/site-packages/catkin_pkg/packages.py", line 83, in find_packages
packages = find_packages_allowing_duplicates(basepath, exclude_paths=exclude_paths, exclude_subspaces=exclude_subspaces, warnings=warnings)
File "/usr/lib/python2.7/site-packages/catkin_pkg/packages.py", line 110, in find_packages_allowing_duplicates
packages[path] = parse_package(os.path.join(basepath, path), warnings=warnings)
File "/usr/lib/python2.7/site-packages/catkin_pkg/package.py", line 370, in parse_package
return parse_package_string(f.read(), filename, warnings=warnings)
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 205: ordinal not in range(128)
CMake Error at /opt/ros/indigo/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/home/johnny/ros/build/catkin_generated/env_cached.sh
"/usr/bin/python" "/usr/lib/python2.7/site-packages/em.py" "--raw-errors"
"-F" "/home/johnny/ros/build/catkin_generated/order_packages.py" "-o"
"/home/johnny/ros/build/catkin_generated/order_packages.cmake"
"/opt/ros/indigo/share/catkin/cmake/em/order_packages.cmake.em") returned
error code 1
Call Stack (most recent call first):
/opt/ros/indigo/share/catkin/cmake/em_expand.cmake:25 (safe_execute_process)
/opt/ros/indigo/share/catkin/cmake/catkin_workspace.cmake:35 (em_expand)
CMakeLists.txt:63 (catkin_workspace)
-- Configuring incomplete, errors occurred!
See also "/home/johnny/ros/build/CMakeFiles/CMakeOutput.log".
See also "/home/johnny/ros/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed'
Thank you very much!
It looks like an unicode problem. In very brief summary, you have passed something that is being interpreted as a string of bytes to something that needs to decode it into Unicode characters, but the default codec (ascii) is failing.
More on this here.
there's a lot of solutions to this one. the one I suggest is doing this :
yassin#pc:/usr/local/lib/python2.7/site-packages# cat sitecustomize.py
# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
and to check if that works, you need to do the following :
yassin#pc:~/home# python
Python 2.7.6 (default, Dec 6 2013, 14:49:02)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> reload(sys)
<module 'sys' (built-in)>
>>> sys.getdefaultencoding()
'utf8'
>>>
Hope it helps ! Cheers.
Set the system default locale to en_IN.utf8 should solve the problem.
For example, if you use bash, you can add below lines into your ~/.bashrc:
LANG=en_IN.utf8
export LANG
The catkin toolkit use system default locale to load message or service files.
I downloaded z3 source codes from the master branch and tried to build it, which resulted in the following error:
c:\Program Files\z3>python --version
Python 3.3.2
c:\Program Files\z3>python scripts\mk_make.py
Traceback (most recent call last):
File "scripts\mk_make.py", line 9, in <module>
from mk_util import *
File "c:\Program Files\z3\scripts\mk_util.py", line 81
print "dos2unix '%s'" % fname
^
SyntaxError: invalid syntax
Am I doing something wrong?
The master branch only works with Python 2.7.x.
The unstable (working-in-progress) branch should work with Python 3.x.
Here are instructions to compile the working-in-progress branch.
I am seeing a strange problem with z3py on Mac, was wondering if anyone has seen this before:
$ cat bug.py
from z3 import *
x = Int('x')
s = Solver()
s.add(x > 5)
print(s.check())
print(s.model())
$ python bug.py
sat
[x = ]
The value of x is missing from the model. I tried both master and unstable branches with the same result. However, z3 itself does give the correct model if run on a similar .smt2 file. My configuration is Mac OSX 10.6.8, Python 2.7.4.
The problem is very specific for my setup, but maybe someone will run into it as well: the root cause is that a wrong version of libgomp was picked up by the dynamic loader -- i.e. the versions used to compile and to run do not match.
Here is a more severe manifestation of this issue:
$ python
Python 2.7.4 (default, May 9 2013, 18:51:46)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from z3 import *
>>> IntVal(1)
>>>
The numeric value is not printed, i.e. the correct output is
>>> IntVal(1)
1
>>>
Setting DYLD_LIBRARY_PATH to point to the correct version of the library fixes the issue.
I don't see any problems with Z3 4.1 and Python 2.7.2 on my Mac OSX 10.8.3. I wonder if it's some sort of terminal issue that eats the characters for whatever reason. What do you see if you redirect the output to a file? (i.e., try "python bug.py > out". Does the contents of the file "out" look OK?)