saluev / python-liborigin2 Goto Github PK
View Code? Open in Web Editor NEWPython wrapper for Origin files loader library.
License: GNU General Public License v3.0
Python wrapper for Origin files loader library.
License: GNU General Public License v3.0
With some recent origin files (if interested, I can send you an example), liborigin2 just crashes and brings down the python program using it as well.
liborigin: 34% done terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 5) > this->size() (which is 2)
Fatal Python error: Aborted
I suggest there should be some sanity check that at least raises a decent exception.
Looking at the calsses I figure out the following procedure, but it is suitable for just one column at the time..
file_contents = liborigin.parseOriginFile("myproj.opj")
file_contents['spreads'][0].columns[0].data
the command doxygen Doxyfile
is running for hours, but it seems not stuck. Is it the symptom of a bug?
Example localization.cpp was already documented. Ignoring documentation found here.
Searching for enumerations...
Searching for documented typedefs...
Searching for members imported via using declarations...
Searching for included using directives...
Searching for documented variables...
Building interface member list...
Building member list...
Searching for friends...
Searching for documented defines...
Computing class inheritance relations...
Computing class usage relations...
I completed all the installation steps prior to 'cythonization'. When I try to do it, I get:
python setup.py build_ext --inplace
Compiling liborigin.pyx because it changed.
[1/1] Cythonizing liborigin.pyx
/Users/daria/opt/anaconda3/lib/python3.8/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /Users/daria/python-liborigin2/liborigin.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
return result
cdef makeSpreadSheet(const objects.SpreadSheet &sht):
result = SpreadSheet()
result.copy(&sht)
print "Loading book #%d(%s/%s) (%d sheets, %d columns)" % (result.objectID, result.name, result.label.replace(b"\n", b""), result.sheets, len(result.columns))
^
------------------------------------------------------------
liborigin.pyx:725:10: Syntax error in simple statement list
Traceback (most recent call last):
File "setup.py", line 25, in <module>
setup(
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
self.build_extensions()
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/Cython/Distutils/build_ext.py", line 130, in build_extension
new_ext = cythonize(
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/Users/daria/opt/anaconda3/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: liborigin.pyx
I am not sure what exactly is the problem judging from this log. Can you please help me with this step? My system is: MacOs Big Sur 11.7.4, cmake version 3.27.7, Python 3.8.18, Cython version 3.0.6.
I have obtained the following error running cmake ../
as recommended. I do not know enough of CMake to debug this one,
-- Boost version: 1.58.0
CMake Error: File /somepath/python-liborigin2/config.h.in does not exist.
CMake Error at CMakeLists.txt:14 (configure_file):
configure_file Problem configuring file
Any hints ?
Hi, Tigran, I am very interested in using the liborigin in my new project for quick data file browsing (https://github.com/FilipDominec/plotcommander). Did you try compiling liborigin for Python3?
Hi there,
I run into a problem when trying to compile liborigin python module:
python setup.py build_ext --inplace
running build_ext
skipping 'liborigin.cpp' Cython extension (up-to-date)
building 'liborigin' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c liborigin.cpp -o build/temp.linux-x86_64-2.7/liborigin.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
liborigin.cpp:346:29: fatal error: boost/variant.hpp: No such file or directory
#include "boost/variant.hpp"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I have boost package installed and liborigin has been compiled successfully (well, it couldn't find the 'config.h.in', so I have assumed that 'config.h' should have had this name and renamed it accordingly). In the python case it seems that the script doesn't acknowledge the true boost headers location defined by variable BOOST_INCLUDEDIR and expects it to be in the installation directory with liborigin source files - alas dependencies are broken.
Do you have any idea how to fix it?
Thanks!
Povilas
Hi, have you noticed that the library crashes when opening an OPJ file, while the working directory is not allowed to write the temporary opjfile
?
Could not open opjfile.log !
Fatal Python error: Segmentation fault
It is quite important - I keep checking shared OPJ files on a read-only network mount drive...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.