Git Product home page Git Product logo

python-aqbanking's People

Contributors

dimka-abramov avatar jannh avatar monofox avatar thtomate avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

python-aqbanking's Issues

fatal error during install

I got the following error message when installing python-aqbanking:

gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/gwenhywfar4 -I/usr/include/aqbanking5 -I/usr/local/include/gwenhywfar4 -I/usr/local/include/aqbanking5 -I/home/philipp/anaconda3/include/python3.6m -c aqbanking/pyaqhandler.cpp -o build/temp.linux-x86_64-3.6/aqbanking/pyaqhandler.o -Wunused-variable -Wunused-function
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
aqbanking/pyaqhandler.cpp:5:29: fatal error: gwenhywfar/cgui.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

with gwenhywfar 4.15.2beta-2build1 installed.
Could you please help.

Segmentation fault in case of using Account from listacc()

Nice mail from a developer retrieved:
if we're trying to use a function directly from listacc()[x] the module segfaults.
The issue is always reproducable. It doesn't matter whether its just set_callback or whether it is a call for retrieving the balance.

Very simple test script:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import aqbanking
aqbanking.listacc()[2].balance()

Segfault with empty account no

The lib will create a SEGFAULT if incorrect parameters were used. This shall be handled gracefully in a pythonic way.

Starting program: /usr/bin/python3 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import aqbanking
>>> acc = aqbanking.Account(bank_code=10077777)
>>> acc.transactions()

Program received signal SIGSEGV, Segmentation fault.
0x0000000000543f84 in PyUnicode_AsUTF8AndSize ()
(gdb) bt
#0  0x0000000000543f84 in PyUnicode_AsUTF8AndSize ()
#1  0x00007ffff5eb565c in aqbanking_Account_transactions (self=0x7ffff674a660, args=0x7ffff7f79048, kwds=0x0) at aqbanking/aqbanking.cpp:778
#2  0x00000000004e9bc7 in PyCFunction_Call ()
#3  0x0000000000524414 in PyEval_EvalFrameEx ()
#4  0x000000000052d2e3 in ?? ()
#5  0x000000000052dfdf in PyEval_EvalCode ()
#6  0x00000000005fd2c2 in ?? ()
#7  0x00000000004583cd in PyRun_InteractiveOneObject ()
#8  0x0000000000458576 in PyRun_InteractiveLoopFlags ()
#9  0x00000000004585d0 in ?? ()
#10 0x00000000004cf26a in ?? ()
#11 0x00000000004cfe41 in main ()
(gdb) f 1
#1  0x00007ffff5eb565c in aqbanking_Account_transactions (self=0x7ffff674a660, args=0x7ffff7f79048, kwds=0x0) at aqbanking/aqbanking.cpp:778
778     aqbanking/aqbanking.cpp: No such file or directory.
(gdb) print self
$1 = (aqbanking_Account *) 0x7ffff674a660
(gdb) print self->no
$2 = (PyObject *) 0x0

Gcc fails on debian with gcc 4.6

Hi!
I've tinkered around with

#extra_compile_args=['-O0', '-g', '-Wunused-variable', '-std=gnu++11', '-DPy_DEBUG', '-Wunused-function', '-DDEBUG'],
extra_compile_args=['-Wunused-variable', '-Wunused-function', '-std=gnu++0x'],

but even with that to no result (but it got further than before without gnu++0x.
Can you tell me which compilers you used on which plattform successfully?

I'm running Raspbian GNU Linux 7

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14+rpi1) 

Here is the output:

running install
Checking .pth file support in /usr/local/lib/python3.2/dist-packages/
/usr/bin/python3 -E -c pass
TEST PASSED: /usr/local/lib/python3.2/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing python_aqbanking.egg-info/PKG-INFO
writing top-level names to python_aqbanking.egg-info/top_level.txt
writing dependency_links to python_aqbanking.egg-info/dependency_links.txt
package init file 'aqbanking/__init__.py' not found (or not a regular file)
reading manifest file 'python_aqbanking.egg-info/SOURCES.txt'
writing manifest file 'python_aqbanking.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv6l/egg
running install_lib
running build_py
running build_ext
building 'aqbanking' extension
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/gwenhywfar4 -I/usr/include/aqbanking5 -I/usr/local/include/gwenhywfar4 -I/usr/local/include/aqbanking5 -I/usr/include/python3.2mu -c aqbanking/pyaqhandler.cpp -o build/temp.linux-armv6l-3.2/aqbanking/pyaqhandler.o -Wunused-variable -Wunused-function -std=gnu++0x
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
In file included from /usr/include/python3.2mu/Python.h:8:0,
                 from aqbanking/pyaqhandler.hpp:4,
                 from aqbanking/pyaqhandler.cpp:7:
/usr/include/python3.2mu/pyconfig.h:1182:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:163:0: note: this is the location of the previous definition
/usr/include/python3.2mu/pyconfig.h:1204:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:165:0: note: this is the location of the previous definition
In file included from aqbanking/pyaqhandler.cpp:7:0:
aqbanking/pyaqhandler.hpp:23:26: sorry, unimplemented: non-static data member initializers
aqbanking/pyaqhandler.hpp:23:26: error: ‘constexpr’ needed for in-class initialization of static data member ‘callbackLog’ of non-integral type
aqbanking/pyaqhandler.hpp:24:31: sorry, unimplemented: non-static data member initializers
aqbanking/pyaqhandler.hpp:24:31: error: ‘constexpr’ needed for in-class initialization of static data member ‘callbackPassword’ of non-integral type
aqbanking/pyaqhandler.hpp:27:83: error: expected ‘;’ at end of member declaration
aqbanking/pyaqhandler.hpp:27:85: error: ‘override’ does not name a type
In file included from aqbanking/pyaqhandler.cpp:7:0:
aqbanking/pyaqhandler.hpp:28:150: error: expected ‘;’ at end of member declaration
aqbanking/pyaqhandler.hpp:28:152: error: ‘override’ does not name a type
aqbanking/pyaqhandler.hpp:29:85: error: expected ‘;’ at end of member declaration
aqbanking/pyaqhandler.hpp:29:87: error: ‘override’ does not name a type
aqbanking/pyaqhandler.cpp: In constructor ‘PyAqHandler::PyAqHandler()’:
aqbanking/pyaqhandler.cpp:13:8: error: ‘class PyAqHandler’ has no member named ‘callbackLog’
aqbanking/pyaqhandler.cpp:14:8: error: ‘class PyAqHandler’ has no member named ‘callbackPassword’
aqbanking/pyaqhandler.cpp: In member function ‘virtual int PyAqHandler::logHook(const char*, GWEN_LOGGER_LEVEL, const char*)’:
aqbanking/pyaqhandler.cpp:56:12: error: ‘class PyAqHandler’ has no member named ‘callbackLog’
aqbanking/pyaqhandler.cpp:62:28: error: ‘class PyAqHandler’ has no member named ‘callbackLog’
aqbanking/pyaqhandler.cpp: In member function ‘virtual int PyAqHandler::getPassword(uint32_t, const char*, const char*, const char*, char*, int, int, uint32_t)’:
aqbanking/pyaqhandler.cpp:72:12: error: ‘class PyAqHandler’ has no member named ‘callbackPassword’
aqbanking/pyaqhandler.cpp:77:37: error: ‘class PyAqHandler’ has no member named ‘callbackPassword’
aqbanking/pyaqhandler.cpp:87:39: error: ‘PyUnicode_AsUTF8’ was not declared in this scope
aqbanking/pyaqhandler.hpp: At global scope:
aqbanking/pyaqhandler.hpp:10:18: warning: ‘AqBankingInitializeError’ defined but not used [-Wunused-variable]
aqbanking/pyaqhandler.hpp:11:18: warning: ‘AqBankingDeInitializeError’ defined but not used [-Wunused-variable]
error: command 'gcc' failed with exit status 1

No methods available

I installed the module with python3 setup.py install --user.
After trying the module in the python shell, there are none of the
defined functions like hello or listacc.

Any hints?

How to set password callback?

Hello @monofox,
can you help me to use your library?
I'm trying to fetch transactions and account balance.
When using aqbanking.listacc()[0].balance() the output contains No password python CB defined! and python3: imexporter.c:1453: AB_ImExporterAccountInfo_GetFirstAccountStatus: Zusicherung »iea« nicht erfüllt.
I'm using Pin/Tan Authentication, how can I provide my pin using a password callback? How do I register it?

Regards
Enno

Distribution: Header file missing

If I try to to build it in a docker container (based on the python:3.5 container) with all requirement fullfiled, it fails:

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/gwenhywfar4 -I/usr/include/aqbanking5 -I/usr/local/include/gwenhywfar4 -I/usr/local/include/aqbanking5 -I/usr/local/include/python3.5m -c aqbanking/pyaqhandler.cpp -o build/temp.linux-x86_64-3.5/aqbanking/pyaqhandler.o -Wunused-variable -Wunused-function
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    aqbanking/pyaqhandler.cpp:7:27: fatal error: pyaqhandler.hpp: No such file or directory
     #include "pyaqhandler.hpp"
                               ^

I suspect (but not tested) this could be solved by adding aqbanking/ to the include path as stated here: https://docs.python.org/3/distutils/setupscript.html#preprocessor-options

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.