watson-developer-cloud / python-sdk

:snake: Client library to use the IBM Watson services in Python and available in pip as watson-developer-cloud
https://pypi.org/project/ibm-watson/
Apache License 2.0
1.46k stars 828 forks source link

When creating a solr cluster passing in a cluster size fails. #87

Closed Mikemosca closed 8 years ago

Mikemosca commented 8 years ago

When creating a solr cluster passing in a cluster size fails. It may be a case where we just need to import long

retrieve_and_rank.create_solr_cluster(cluster_name='pythonCluster', cluster_size=10)
self = <watson_developer_cloud.retrieve_and_rank_v1.RetrieveAndRankV1 object at 0x0000000003BC1940>
cluster_name = 'pythonCluster', cluster_size = 10

    def create_solr_cluster(self, cluster_name=None, cluster_size=None):
>       if cluster_size and isinstance(cluster_size, (int, long)):
E       NameError: name 'long' is not defined

File "C:\Users\IBM_ADMIN\Documents\Work\Watson\DevExp\python-sdk\watson_developer_cloud\retrieve_and_rank_v1.py", line 36
NameError    
germanattanasio commented 8 years ago

in python 3 there is no long so you are probably getting the error because it's python 3.0