question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

got an unexpected keyword argument 'data_only'

See original GitHub issue

I use elasticsearch-dsl == 6.2.1

{
  "name" : "67G84Xb",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "C4Q4oVYHTIyTWtpUyUP_lA",
  "version" : {
    "number" : "6.2.4",
    "build_hash" : "ccec39f",
    "build_date" : "2018-04-12T20:37:28.497551Z",
    "build_snapshot" : false,
    "lucene_version" : "7.2.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

Got error:

  File "/elasticsearch_dsl/field.py", line 163, in _wrap
    return self._doc_class.from_es(data, data_only=True)
TypeError: from_es() got an unexpected keyword argument 'data_only'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
honzakralcommented, Jul 8, 2018

Problem is that PriceCondition cannot extend DocType but must be extending InnerDoc.I will make a note to fix it so that it won’t break but for now just change its base from BaseDocType to InnerDoc and it should help.

0reactions
littlehome-eugenecommented, Feb 18, 2019

I’m having similar issue, with

elasticsearch==6.3.1 elasticsearch-dsl==6.3.1

 class ReviewMeta(InnerDoc):

     id = Integer()
     name = Keyword()
     tags = Keyword()
     location = GeoPoint()
     area_names = Keyword()


 class ReviewMetaSearchClickLogDoc(DocType):

     id = Integer()
     created_at = Date()
     search_log_id = Integer()
     review_meta = Object(ReviewMeta)
     position = Integer()

     class Index:
         name = REVIEWMETA_SEARCH_CLICK_LOG_INDEX


 class ReviewMetaSearchLogDoc(DocType):

     id = Integer()
     created_at = Date()
     user = Object(User)
     result_count = Integer()
     search_data = Object(dynamic=True)
     clicks = Nested(ReviewMetaSearchClickLogDoc, include_in_parent=True)

     class Index:
         name = REVIEWMETA_SEARCH_LOG_INDEX

I guess the problem is Nested(ReviewMetaSearchClickLogDoc, include_in_parent=True) , why is it a problametic, and how can I fix it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: _open() got an unexpected keyword argument ...
I've had this error before. The TLDR is that you can't assume all of your data is clean and able to be parsed....
Read more >
TypeError: __init__() got an unexpected keyword argument 'id ...
Reading the file case.xlsx with from openpyxl import load_workbook...
Read more >
How to debug task "got an unexpected keyword argument"
I wondering if someone might have a bright idea how I can debug the following error, which get periodically in production. I've searched...
Read more >
PyMC error: TypeError: dict_to_dataset() got an unexpected ...
... 459 dims=self.dims, --> 460 default_dims=[], 461 ) 462 TypeError: dict_to_dataset() got an unexpected keyword argument 'default_dims'.
Read more >
Failed to test real-time endpoint request() got an unexpected ...
Failed to test real-time endpoint request() got an unexpected keyword argument 'tenant_id' · KVUri = f"<<endpoint url here>>" · credential = ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found