I have some code that I can run locally on my windows 10 machine that writes to a table on a DB2 sql database and runs perfectly. For reasons I can't seem to figure out, it doesn't work on the windows server 2008 R2 machine.
Works fine locally, but am at a total loss as to why it won't work on the server.
engine = create_engine('ibm_db_sa://{}:{}@host:port/db'.format('uid','pwd'))
df.to_sql(name=table, con=engine, if_exists='append', schema='schema', index=False)
I get the following error:
KeyError: '\x02'
Again, it works totally fine on my local machine, but deployment on a server gives me the above error. I've been trying to figure this out for the last few hours and it's driving me insane. Any help will be very very appreciated!!