omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Problem running piecash

    Pythonista
    4
    7
    2708
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ihf
      ihf last edited by ccc

      I did a pip install piecash (it's a python interface to GnuCash) . I had to add a couple of dependencies using pip that showed up when I did import piecash. Now I get the following:

      >>> import piecash
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages-2/piecash/__init__.py", line 15, in <module>
          from .core import (
        File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages-2/piecash/core/__init__.py", line 1, in <module>
          from .session import create_book, open_book, Version
        File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages-2/piecash/core/session.py", line 11, in <module>
          from piecash.core import factories
      ImportError: cannot import name factories
      
      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by ccc

        Related to https://forum.omz-software.com/topic/5748/stash-pip-on-python-v3-6

        Here you are installing into site-packages-2 but piecash no longer supports legacy Python.

        https://github.com/sdementen/piecash/blob/master/setup.py#L252-L254

        Also see: https://travis-ci.org/sdementen/piecash/jobs/566331812#L225

        1 Reply Last reply Reply Quote 0
        • ccc
          ccc last edited by ccc

          python interface to GnuCash

          Is GnuCash pure Python? https://github.com/Gnucash looks to be ~75% C code.

          1 Reply Last reply Reply Quote 0
          • ihf
            ihf last edited by ihf

            Not running GnuCash, just piecash which is an interface to the GnuCash SQLite dB. Will try with Python 3. Since pip does not run under Python 3, what is the best way to install piecash? Just move things from site packages 2 to 3?

            mikael 1 Reply Last reply Reply Quote 0
            • mikael
              mikael @ihf last edited by

              @ihf, I would take the zip from piecash Github and expand it to sitepackages.

              1 Reply Last reply Reply Quote 0
              • JonB
                JonB last edited by

                Does factories.py actually exist under piecash/core?

                It is probably also a good idea to force quit Pythonista.

                1 Reply Last reply Reply Quote 0
                • ihf
                  ihf last edited by

                  I am back to trying to get piecash to work with Pythonista. I can install piecash but if I try to open a mysql based Gnucash file. I get an error about MySQLdb module not found. If I try to install MySQLclient (which I believe has that module), I get:

                  [~/Documents]$ pip install mysqlclient
                  Querying PyPI ... 
                  Downloading package ...
                  Opening: https://files.pythonhosted.org/packages/de/79/d02be3cb942afda6c99ca207858847572e38146eb73a7c4bfe3bdf154626/mysqlclient-2.1.0.tar.gz
                  
                  Save as: /private/var/mobile/Containers/Data/Application/5CF6F970-CA4A-42FF-B937-D741C4282F1E/tmp//mysqlclient-2.1.0.tar.gz (87635 bytes)
                  [====================] 100.00% | 85.6KiB          
                  Extracting archive file ...
                  Archive extracted.
                  Running setup file ...
                  mysql_config --version
                  mariadb_config --version
                  mysql_config --libs
                  PermissionError(1, 'Operation not permitted')
                  Failed to run setup.py
                  Fall back to directory guessing ...
                  Error: Cannot locate packages. Manual installation required.
                  [~/Documents]$ pip install mysqldb
                  Querying PyPI ... 
                  Error: Failed to fetch package release urls```
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB Forums | Contributors