# Logstash translate filter throws error if dictionary file is empty

**URL:** <https://discuss.elastic.co/t/logstash-translate-filter-throws-error-if-dictionary-file-is-empty/164101>\
**Category:** Logstash\
**Created:** [January 14, 2019, 7:45am UTC](https://discuss.elastic.co/t/logstash-translate-filter-throws-error-if-dictionary-file-is-empty/164101 "2019-01-14T07:45:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Riddhesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/riddhesh/32/47232_2.png) [@Riddhesh](https://discuss.elastic.co/u/Riddhesh)\
**Post date:** [January 14, 2019, 7:45am UTC](https://discuss.elastic.co/t/logstash-translate-filter-throws-error-if-dictionary-file-is-empty/164101/1 "2019-01-14T07:45:05Z")

</div>

When using translate filter with yml file, if I have the file empty, logstash fails to start and throws error:

```auto
Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<RuntimeError: LogStash::Filters::Translate: no implicit conversion of false into Hash when loading dictionary file at filepath

```

Adding `{}` in to empty file fixes the error. I wanted to know is this expected and adding `{}` is correct or not? Also it would help if its documented.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 11, 2019, 7:45am UTC](https://discuss.elastic.co/t/logstash-translate-filter-throws-error-if-dictionary-file-is-empty/164101/2 "2019-02-11T07:45:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
