# Error: Expected one of #, input, filter, output at line 1, column 1 (byte 1) after {:level=\>:error}

**URL:** <https://discuss.elastic.co/t/error-expected-one-of-input-filter-output-at-line-1-column-1-byte-1-after-level-error/51431>\
**Category:** Logstash\
**Created:** [May 31, 2016, 1:20pm UTC](https://discuss.elastic.co/t/error-expected-one-of-input-filter-output-at-line-1-column-1-byte-1-after-level-error/51431 "2016-05-31T13:20:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diego\_Gomez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/diego_gomez/32/12893_2.png) [@Diego\_Gomez](https://discuss.elastic.co/u/Diego_Gomez)\
**Post date:** [May 31, 2016, 1:20pm UTC](https://discuss.elastic.co/t/error-expected-one-of-input-filter-output-at-line-1-column-1-byte-1-after-level-error/51431/1 "2016-05-31T13:20:17Z")

</div>

Hi all, I have a problem , run logstash and no problem I could see data Kibana but off to logstash and when I run again pulls me this error.

Error: Expected one of #, input, filter, output at line 1, column 1 (byte 1) after {:level=\>:error}

Here is the code

```
  input {
      file {
            path => "/home/rack/bolsa.csv"
            start_position =>"beginning"
            type => "stock"
            sincedb_path => "NUL"
            }
}
  filter {
    csv {
            columns =>["date_of_record","open","high","low","close","volume","adj_close","company","ip"]
            separator => ","
    }

    date {
            match => ["date_of_record", "yyyy-MM-dd"]
            locale => "es-ES"
            target => "@timestamp"
    }

    mutate {
            convert => ["open","float"]
            convert => ["high","float"]
            convert => ["low","float"]
            convert => ["close","float"]
            convert => ["volume","integer"]
            convert => ["adj_close","float"]
            convert => ["company","string"]
    }
}

output{
     elasticsearch {
            index => ["logstash-bolsa-%{+yyyy}"]
            hosts => ["localhost:9200"]
            }
    stdout { codec => rubydebug }
}
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 31, 2016, 8:38pm UTC](https://discuss.elastic.co/t/error-expected-one-of-input-filter-output-at-line-1-column-1-byte-1-after-level-error/51431/2 "2016-05-31T20:38:40Z")

</div>

I copied and pasted that snippet to a file and it worked fine for me so I suspect you have some unexpected stuff at the beginning of the file, like a byte-order mark. Passing the file through `hexdump -C` can be useful for checking that.

---

<div class="post-metadata">

**Author:** ![Diego\_Gomez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/diego_gomez/32/12893_2.png) [@Diego\_Gomez](https://discuss.elastic.co/u/Diego_Gomez)\
**Post date:** [June 1, 2016, 3:20pm UTC](https://discuss.elastic.co/t/error-expected-one-of-input-filter-output-at-line-1-column-1-byte-1-after-level-error/51431/3 "2016-06-01T15:20:37Z")

</div>

> [@magnusbaeck](#):
>
> hexdump -C

thank you

---

<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:** [July 6, 2017, 4:55am UTC](https://discuss.elastic.co/t/error-expected-one-of-input-filter-output-at-line-1-column-1-byte-1-after-level-error/51431/4 "2017-07-06T04:55:01Z")

</div>


