Open farnaudies opened 3 years ago
What version of JPype is being used? This error looks like what happens when a dependency is missing (so it can't find the jar) with version 0.7.x or earlier and a JPackage automatically assumed that getDatasetNames
is a package as a result.
For the user, make sure that you have all the required jars.
For the developer, consider upgrading to JPype 1.2.x series and using the import system rather than JPackage. It would have detected the missing dependency and then reported a more specific error.
I made this updates :
restart the kernel
I restarted the kernel and now I have no error but output is empty, why?
Le lun. 25 janv. 2021 à 19:10, Karl Nelson notifications@github.com a écrit :
What version of JPype is being used? This error looks like what happens when a dependency is missing (so it can't find the jar) with version 0.7.x or earlier and a JPackage automatically assumed that getDatasetNames is a package as a result.
For the user, make sure that you have all the required jars.
For the developer, consider upgrading to JPype 1.2.x series and using the import system rather than JPackage. It would have detected the missing dependency and then reported a more specific error.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/IBM/icp4d-customer-churn-classifier/issues/33#issuecomment-767009770, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPWKAGHXR6HQLLHFRGVLC3S3WX2RANCNFSM4WSCZM2Q .
Sorry cant help beyond fixing the source if the error message.
#############
Db2 Connection and Dataset data_df_1 then df_churn_pd = data_df_1
##############
use "Insert to code" and "pandas DataFrame"
to import the input data into the notebook.
Add asset from file system# @hidden_cell
from project_lib import Project project = Project.access()
Db2Wh_5nodes_metadata = project.get_connection(name="Db2Wh-5nodes")
import os, jaydebeapi, pandas as pd
Db2Wh_5nodes_url = 'jdbc:db2://{}:{}/{}'.format( Db2Wh_5nodes_metadata['host'], Db2Wh_5nodes_metadata.get('port', 50000), Db2Wh_5nodes_metadata['database'] )
Db2Wh_5nodes_connection = jaydebeapi.connect( 'com.ibm.db2.jcc.DB2Driver', Db2Wh_5nodes_url, [Db2Wh_5nodes_metadata['xxxxx'],Db2Wh_5nodes_metadata['yyyyy']] )
query = 'SELECT * FROM "CHURN"."MERGED_CUSTOMERS"' data_df_1 = pd.read_sql_query(query, con=Db2Wh_5nodes_connection) data_df_1.head()
########################## Error Step 3
TypeError Traceback (most recent call last)