Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

TypeError: query() got an unexpected keyword argument 'method' #618

Closed
@dorothearos

Description

@dorothearos

`t = time.strftime('%Y-%m-%dT%H:%M:%S')
client = DataFrameClient(host, port, user, password, dbname)
headers = ['dateidx','tag1','tag2','field1','field2']
data = [[t,'MSFT','NYSE',1.3,2.5],[t,'APPL','NYSE',3.5,4.24]]
df = pd.DataFrame(data, columns=headers)
df['dateidx'] = pd.to_datetime(df['dateidx'])
df = df.set_index('dateidx')
tags = {'tag1': df[['tag1']], 'tag2': df[['tag2']]}
print("Create database: " + dbname)
client.create_database(dbname)

print("Write DataFrame")
client.write_points(df, 'ff', tags=tags, protocol=protocol)

print("Read DataFrame")
client.query("SELECT * FROM ff")

print("Delete database: " + dbname)
client.drop_database(dbname)`

I have tried to run the demo in #286 but I got the traceback:
Creating database: ff
Traceback (most recent call last):
File "testcase.py", line 41, in
main(host=args.host, port=args.port)
File "testcase.py", line 22, in main
client.create_database(dbname)
File "C:\Python\lib\site-packages\influxdb\client.py", line 579, in create_database
method="POST")
TypeError: query() got an unexpected keyword argument 'method'

I don't understand why I have got that error. Please help if anyone knows. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions