Hi Jim

sure looks to me like it's the import; it seems interesting to me that it
can't find module "future" rather than "future.utils" - almost like the
name resolution is a problem.

I see you have "from ." in your other import statements so it seems there
is some relationship to path in the import statements that I have not
struck in my python scripts yet (all on windows)

On Wed, Sep 26, 2018 at 5:27 AM Jim Oberholtzer <midrangel@xxxxxxxxxxxxxxxxx>

IBM i V7R2 (most recent groups/cumulative) : sqlalchemy version 1.2.12

I'm trying to get an sqlalchemy test to work and it stops with the

bash-4.4$ python3.6 alchemy_test.py
Traceback (most recent call last):
File "alchemy_test.py", line 3, in <module>
import ibm_db_sa.ibm_db_sa
File "/QOpenSys/pkgs/lib/python3.6/site-packages/ibm_db_sa/init.py", line
22, in <module>
from . import ibm_db, pyodbc, base, zxjdbc
File "/QOpenSys/pkgs/lib/python3.6/site-packages/ibm_db_sa/ibm_db.py", line
20, in <module>
from .base import DB2ExecutionContext, DB2Dialect
File "/QOpenSys/pkgs/lib/python3.6/site-packages/ibm_db_sa/base.py", line
30, in <module>
from . import reflection as ibm_reflection
File "/QOpenSys/pkgs/lib/python3.6/site-packages/ibm_db_sa/reflection.py",
line 26, in <module>
from future.utils import iteritems
ModuleNotFoundError: No module named 'future'

If I am readying this right, the module "future.utils" is part of the
sqalchemy package. The code calling it is:

import sqlalchemy
from sqlalchemy import *
import ibm_db_sa.ibm_db_sa
db2 =
metadata = MetaData()
users = Table('users', metadata,
Column('user_id', Integer, primary_key = True),
Column('user_name', String(16), nullable = False),
Column('email_address', String(60), key='email'),
Column('password', String(20), nullable = False)
metadata.bind = db2
users_table = Table('users', metadata, autoload=True, autoload_with=db2)

I think it's the import* that's causing the issue.

This is just a see if it can connect script and I lifted it from the IBM
page on sqlalchemy (which of course has no reference to IBM i)


Jim Oberholtzer

Agile Technology Architects

This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.