Python Forum

Full Version: TypeError: coerce_kw_type() got an unexpected keyword argument 'dest'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone
I am new here and I am seeking for some help on python
I using Jupyter to practice
and I just got the following error while executing my code
TypeError: coerce_kw_type() got an unexpected keyword argument 'dest'
have look up this error on the net but can't get anything.

Here is my :

import sqlite3
import pandas as pd
from sqlalchemy import create_engine

file = 'un.xlsx'
output = 'output.xlsx'

engine = create_engine('sqlite://', echo=False)
df = pd.read_excel(file, sheet_name='Goma-Bukavu UN Agencies-NGO')
df.to_sql('contacts', engine, if_exists='replace', index=False)

results = engine.execute('select * from contacts')

final=pd.DataFrame(results, columns=df.columns)
final.to_excel(output, index=False)
final
Are you sure you are sharing the correct piece of code? Where do you call coerce_kw_type() anyway, or am I missing something? And please share the traceback, and as allready said, in the proper way.