# Alway get an error "No attribute named 'name' is defined" if try to process multiple lines from csv data feed

**URL:** <https://community.gatling.io/t/alway-get-an-error-no-attribute-named-name-is-defined-if-try-to-process-multiple-lines-from-csv-data-feed/4375>\
**Category:** Gatling (Open-Source)\
**Created:** [June 18, 2018, 6:26am UTC](https://community.gatling.io/t/alway-get-an-error-no-attribute-named-name-is-defined-if-try-to-process-multiple-lines-from-csv-data-feed/4375 "2018-06-18T06:26:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Linda](https://avatars.discourse-cdn.com/v4/letter/l/67e7ee/32.png) [@Linda](https://community.gatling.io/u/Linda)\
**Post date:** [June 18, 2018, 6:26am UTC](https://community.gatling.io/t/alway-get-an-error-no-attribute-named-name-is-defined-if-try-to-process-multiple-lines-from-csv-data-feed/4375/1 "2018-06-18T06:26:46Z")

</div>

Hi,

In my test script I try to process 100 lines data from csv data feed via “private val scn = scenario(“test\_scn”).feed(insertFeeder, 100).exec(httpReq)”. But I always get an error “[ERROR] HttpRequestAction - ‘httpRequest-1’ failed to execute: No attribute named ‘name’ is defined”.

Could you please help me to find out the root cause? thank you.

Here is the script:

private val insertFeeder = csv(“test\_data.csv”).queue  
private val csvHeader = GeneralUtil.readFirstLine("“test\_data.csv”")

private val httpConf = http  
.baseURL(“[http://serviceURL](http://serviceURL)”)  
.disableFollowRedirect  
.disableWarmUp  
.shareConnections

/\* Prepare http request \*/  
private var httpReq = http(“insert\_request”)  
.post("/insert")

for (i ← 0 to 99) {  
val paramsInArray = csvHeader.split(",")  
for (param ← paramsInArray) {  
if (param.equalsIgnoreCase(“name”)) {  
httpReq = httpReq.formParam((“name” + “[” + i +"]").el[String] , “${name}”)  
}  
if (param.equalsIgnoreCase(“url”)) {  
httpReq = httpReq.formParam((“url” + “[” + i +"]").el[String] , “${url}”)  
}

if (!param.equalsIgnoreCase(“name”) && !param.equalsIgnoreCase(“url”)) {  
val firstArg = param + “[” + i + “]”  
val secondArg = “${” + param + “}”  
httpReq = httpReq.formParam(firstArg, secondArg)  
}  
}  
}

private val scn = scenario(“test\_scn”)  
.feed(insertFeeder, 100)  
.exec(httpReq)

setUp(  
scn.inject(  
constantUsersPerSec(1) during (1200 seconds)  
).protocols(httpConf)  
).assertions(global.failedRequests.count.lte(5))

And the data in test\_data.csv is:  
name,url,price,size,gender  
image\_1,http://image\_1\_url,100,xl,male  
image\_2,http://image\_2\_url,90,m,female  
image\_3,http://image\_3\_url,10,s,female  
…  
image\_2000,http://image\_2000\_url,200,xl,male

By the way, if I process only 1 line, it works well.

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [June 18, 2018, 6:32am UTC](https://community.gatling.io/t/alway-get-an-error-no-attribute-named-name-is-defined-if-try-to-process-multiple-lines-from-csv-data-feed/4375/2 "2018-06-18T06:32:26Z")

</div>

Please properly read the documentation, the detailed explanation is in there: [https://gatling.io/docs/current/session/feeder/](https://gatling.io/docs/current/session/feeder/)

---

<div class="post-metadata">

**Author:** ![Linda](https://avatars.discourse-cdn.com/v4/letter/l/67e7ee/32.png) [@Linda](https://community.gatling.io/u/Linda)\
**Post date:** [June 18, 2018, 6:51am UTC](https://community.gatling.io/t/alway-get-an-error-no-attribute-named-name-is-defined-if-try-to-process-multiple-lines-from-csv-data-feed/4375/3 "2018-06-18T06:51:35Z")

</div>

Thank you. I noticed “attribute names, will be suffixed”.

在 2018年6月18日星期一 UTC+8下午2:33:01，Stéphane Landelle写道：
