Coder Social home page Coder Social logo

python-liborigin2's People

Contributors

filipdominec avatar gbm19 avatar giammi56 avatar saluev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

python-liborigin2's Issues

Crashes with 'std::out_of_range'

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.

Export an entire SpreadSheet

  1. Is there any starting guide?
  2. Is there a way to export an entire SpreadSheet from a parsed .opj?

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

doxygen Doxyfile running for hours

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...

Can't compile on Mac

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.

configuration error

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 ?

Can't compile python liborigin, missing boost/variant.hpp

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

Crashes when working directory not writable

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...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.