# Set attribute to a session throw an exception

**URL:** <https://community.gatling.io/t/set-attribute-to-a-session-throw-an-exception/494>\
**Category:** Gatling (Open-Source)\
**Created:** [July 16, 2013, 3:10pm UTC](https://community.gatling.io/t/set-attribute-to-a-session-throw-an-exception/494 "2013-07-16T15:10:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Florian\_P](https://avatars.discourse-cdn.com/v4/letter/f/3be4f8/32.png) [@Florian\_P](https://community.gatling.io/u/Florian_P)\
**Post date:** [July 16, 2013, 3:10pm UTC](https://community.gatling.io/t/set-attribute-to-a-session-throw-an-exception/494/1 "2013-07-16T15:10:13Z")

</div>

Hello,

I am actually trying to create some scenario with Gatling 2M3. I want to set some session values and use the wiki page on github ([https://github.com/excilys/gatling/wiki/Session#wiki-functions](https://github.com/excilys/gatling/wiki/Session#wiki-functions)) and when I run my script, this exception is thrown:

> AnswerSimulation.scala:28: value setAttribute is not a member of io.gatling.core.session.Session

My import look like this:

> import io.gatling.core.Predef.\_  
> import io.gatling.core.session.Expression  
> import io.gatling.http.Predef.\_  
> import io.gatling.jdbc.Predef.\_  
> import io.gatling.http.Headers.Names.\_  
> import io.gatling.http.Headers.Values.\_  
> import scala.concurrent.duration.\_  
> import bootstrap.\_  
> import assertions.\_

So I don’t understand why I can’t run my scenario.

Let me know if more informations are required to solve my problem.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Nicolas\_R](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@Nicolas\_R](https://community.gatling.io/u/Nicolas_R)\
**Post date:** [July 16, 2013, 3:22pm UTC](https://community.gatling.io/t/set-attribute-to-a-session-throw-an-exception/494/2 "2013-07-16T15:22:38Z")

</div>

The wiki documentation is for Gatling 1.5.2

Gatling 2 is still a work in progress and especially the documentation. It’s gonna be one of our main focus in M4.  
Anyway, the correct information for you is here : [https://github.com/excilys/gatling/wiki/Gatling-2#wiki-session](https://github.com/excilys/gatling/wiki/Gatling-2#wiki-session)

cheers  
Nicolas

---

<div class="post-metadata">

**Author:** ![Shawna](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@Shawna](https://community.gatling.io/u/Shawna)\
**Post date:** [July 16, 2013, 11:07pm UTC](https://community.gatling.io/t/set-attribute-to-a-session-throw-an-exception/494/3 "2013-07-16T23:07:39Z")

</div>

[https://github.com/excilys/gatling/wiki/Gatling-2#wiki-session](https://github.com/excilys/gatling/wiki/Gatling-2#wiki-session)

This is for M2 or M3?

---

<div class="post-metadata">

**Author:** ![Nicolas\_R](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@Nicolas\_R](https://community.gatling.io/u/Nicolas_R)\
**Post date:** [July 17, 2013, 7:08am UTC](https://community.gatling.io/t/set-attribute-to-a-session-throw-an-exception/494/4 "2013-07-17T07:08:02Z")

</div>

We update the wiki after each milestone release, so M3 now.

cheers,  
Nicolas
