Giter Club home page Giter Club logo

Comments (4)

arachan avatar arachan commented on August 22, 2024

ifxPy v3.0.5 don't need install Informix CSDK.
But,Cannot connect informix.

I tried Debian10.
Don't connect Informix Database.
Don't load shared library.
Don't copy CSDK/ODBC driver to site-package.
Nothing onedb-odbc-driver.

import IfxPy

ConStr="SERVER=servername;DATABASE=dbname;HOST=hostip;SERVICE=port;UID=id;PWD=pw;PROTOCOL=onsoctcp;DB_LOCALE=ja_jp.sjis-s"


try:
    # netstat -a | findstr  9088
    conn = IfxPy.connect( ConStr, "", "")
except Exception as e:
    print ('ERROR: Connect failed')
    print ( e )
    quit()

(.venv) portal@pxeserver:~/py/ifxtest/ifxtest$ python test.py
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import IfxPy
ImportError: libifdmr.so: cannot open shared object file: No such file or directory

$ pwd
/home/portal/py/ifxtest/.venv/lib/python3.7/site-packages

$ ls -l
total 1016
drwxr-xr-x 2 portal portal   4096 Mar  9 11:41 IfxPy-3.0.5.dist-info
-rwxr-xr-x 1 portal portal 473912 Mar  9 11:41 IfxPy.cpython-37m-x86_64-linux-gnu.so
-rw-r--r-- 1 portal portal  56896 Mar  9 11:41 IfxPyDbi.py
drwxr-xr-x 2 portal portal   4096 Mar  9 11:41 __pycache__
drwxr-xr-x 3 portal portal   4096 Mar  9 11:40 _distutils_hack
drwxr-xr-x 8 portal portal   4096 Mar  9 11:40 _pytest
-rw-r--r-- 1 portal portal     18 Mar  9 11:39 _virtualenv.pth
-rw-r--r-- 1 portal portal   5662 Mar  9 11:39 _virtualenv.py
drwxr-xr-x 3 portal portal   4096 Mar  9 11:40 attr
drwxr-xr-x 2 portal portal   4096 Mar  9 11:40 attrs-20.3.0.dist-info
-rw-r--r-- 1 portal portal    152 Mar  9 11:39 distutils-precedence.pth
drwxr-xr-x 3 portal portal   4096 Mar  9 11:40 importlib_metadata
drwxr-xr-x 2 portal portal   4096 Mar  9 11:40 importlib_metadata-3.7.2.dist-info
drwxr-xr-x 3 portal portal   4096 Mar  9 11:40 more_itertools
drwxr-xr-x 2 portal portal   4096 Mar  9 11:40 more_itertools-8.7.0.dist-info
drwxr-xr-x 3 portal portal   4096 Mar  9 11:40 packaging
drwxr-xr-x 2 portal portal   4096 Mar  9 11:40 packaging-20.9.dist-info  
..etc...

I tried Windows10 too.
Copy onedb-odbc-driver.
But Don't connect Informix.
Don't load ifxpy.
Don't load DLL Library.

 PS> ls


    ディレクトリ: C:\Users\yusuke\git\sample\.venv\Lib\site-packages


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        2021/03/05     11:36                certifi
d-----        2021/03/05     11:36                certifi-2020.12.5.dist-info
d-----        2021/03/05     11:36                chardet
d-----        2021/03/05     11:36                chardet-4.0.0.dist-info
d-----        2021/03/05     11:36                idna
d-----        2021/03/05     11:36                idna-2.10.dist-info
d-----        2021/03/09     12:55                IfxPy-3.0.5-py3.9.egg-info
d-----        2021/03/09     12:55                onedb-odbc-driver
d-----        2021/03/05     11:37                pip
d-----        2021/03/05     11:37                pip-21.0.1.dist-info
...etc...

I tried this code on Windows10.

import IfxPy

ConStr="SERVER=SERVERNAME;DATABASE=DBNAME;HOST=IP;SERVICE=21435;UID=ID;PWD=PWD;PROTOCOL=onsoctcp;DB_LOCALE=ja_jp.sjis-s"


try:
    conn = IfxPy.connect( ConStr, "", "")
except Exception as e:
    print ('ERROR: Connect failed')
    print ( e )
    quit()

ImportError: DLL load failed while importing IfxPy: 指定されたモジュールが見つかりません。

from ifxpy.

deokershesh avatar deokershesh commented on August 22, 2024

@arachan, You might want to look previous issue "#41, ImportError: DLL load failed while importing IfxPy: The specified module could not be found."

from ifxpy.

deokershesh avatar deokershesh commented on August 22, 2024

@pepperblue, Yes, it would make more sense to replace platform.processor() with platform.machine(). The below article confirms platform.processor() not available on all platforms.

"Note: Many platforms do not provide this information. eg-NetBSD"

https://www.geeksforgeeks.org/platform-module-in-python/

from ifxpy.

plitter avatar plitter commented on August 22, 2024

I'm experiencing the same issue. Building manually with wheel seems to work, but it would be nice that this just worked...

from ifxpy.

Related Issues (20)

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.