# Help with csv converter

**URL:** <https://www.ruby-forum.com/t/help-with-csv-converter/257729>\
**Category:** Uncategorized\
**Created:** [March 6, 2020, 5:03pm UTC](https://www.ruby-forum.com/t/help-with-csv-converter/257729 "2020-03-06T17:03:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nigeloconnor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a183cd/32.png) [@nigeloconnor](https://www.ruby-forum.com/u/nigeloconnor)\
**Post date:** [March 6, 2020, 5:03pm UTC](https://www.ruby-forum.com/t/help-with-csv-converter/257729/1 "2020-03-06T17:03:17Z")

</div>

Hi, I have the following and I am getting NoMethodError: undefined method `arity’ for nil:NilClass - Can someone explain what is happening?

```
CSV::Converters[:RemoveChars] = lambda do |field| 
    field.gsub(/^[^a-z0-9\.,]{1,}/i, '')
  rescue
    field
  end

def parse_csv(csv)
        options = {
          encoding: "bom|utf-8",
          skip_blanks: true, 
          headers: true,
          converters: :remove_chars
        }

```

# loop through csv here
