Looking at the exception, I would say there's something up with how elasticsearch_dsl is creating the request to ElasticSearch. If you look at the code where the exception is being raised ( https://github.com/elastic/elasticsearch-dsl-py/blob/master/elasticsearch_dsl/document.py#L138), its done if an asterisk (*) is found in the index name.
Maybe try creating an issue on their Github? On Tue, Jul 17, 2018 at 11:37 PM, Sean Whalen <whalens...@gmail.com> wrote: > Looking at document.py > <https://github.com/elastic/elasticsearch-dsl-py/blob/master/elasticsearch_dsl/document.py#L138>, > that exception is only supposed to be raised when a save attempt is made on > an index name that contains *. > > I set the index name using a Meta class as as you can see here > <https://github.com/domainaware/parsedmarc/blob/master/parsedmarc/elastic.py#L136>, > and there is not any * in the index variable. > > Here's some basic sample code to reproduce the issue: > > *Note*: you must have an Elasticsearch instance running to reproduce the > issue. > > from elasticsearch_dsl import DocType, Text, connections > > class _ForensicReportDoc(DocType): > class Meta: > index = "sample_index" > > feedback_type = Text() > > connections.create_connection(hosts=["127.0.0.1"], timeout=20) > > doc = _ForensicReportDoc(feedback_type="foo") > doc.save() > > > > On Tue, Jul 17, 2018 at 4:00 AM, Armin Rigo <armin.r...@gmail.com> wrote: > >> Hi Sean, >> >> On 16 July 2018 at 22:46, Sean Whalen <whalens...@gmail.com> wrote: >> > I have some code that saves data to Elasticsearch. It runs fine in >> Python >> > 3.5.2 (cpython), but raises an exception when running on pypy 3 6.0.0 >> > (Python 3.5.3). Any ideas why? >> >> Not out of the box. If you provide some code that we can run and >> which gives different results, then we can investigate. >> >> >> A bientôt, >> >> Armin. >> > > > _______________________________________________ > pypy-dev mailing list > pypy-dev@python.org > https://mail.python.org/mailman/listinfo/pypy-dev > > -- Regards, Najam Ahmed Ansari
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev