ERROR: AttributeError: 'str' object has no attribute 'get'

1,425 views
Skip to first unread message

aalv...@securityscorecard.io

unread,
Feb 10, 2017, 5:10:46 PM2/10/17
to codename-taurus
Hi I am trying to execute following command on Linux Cent OS Mahcine using Python 2.7.5: 


TestBlaze.yml -o modules.blazemeter.browser-open=false -o execution.0.concurrency=1 -o execution.0.hold-for=1m -o execution.0.ramp-up=30s -o execution.0.iterations=1 -o execution.0.scenario.variables.server=vvt-app.hh.us -o execution.1.concurrency=1 -o execution.1.hold-for=1m -o execution.1.ramp-up=30s -o execution.1.iterations=1 -o execution.1.scenario.variables.server=vvt-app.hh.us

And I get follwoing error:

22:05:00 ERROR: Failed to apply override execution.0.scenario.variables.server=vvt-app.hh.us
22:05:00 ERROR: AttributeError: 'str' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/bzt/cli.py", line 160, in perform
    self.__configure(configs)
  File "/usr/lib/python2.7/site-packages/bzt/cli.py", line 143, in __configure
    overrider.apply_overrides(self.options.option, self.engine.config)
  File "/usr/lib/python2.7/site-packages/bzt/cli.py", line 282, in apply_overrides
    self.__apply_single_override(dest, name, value)
  File "/usr/lib/python2.7/site-packages/bzt/cli.py", line 314, in __apply_single_override
    pointer = pointer.get(part)
AttributeError: 'str' object has no attribute 'get'

But On my Windows 10 MAchine using Pyton 2.7.13 it runs fine, maybe is python version on linux the issue? Any ideas?

Thanks as always for your help!

Andrey Pokhilko

unread,
Feb 11, 2017, 6:57:21 AM2/11/17
to codenam...@googlegroups.com

Hi,

Can you show here your config file TestBlaze.yml ?


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/a1d8e7de-3375-4f91-b330-39000269b700%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

alexis....@abstracta.com.uy

unread,
Feb 13, 2017, 7:45:14 AM2/13/17
to codename-taurus, andrey....@contractor.ca.com
Hi Andrey,

Sure let me attach it to you. Pls notice if remove:    -o execution.0.scenario.variables.server=vvt-app.hh.us and -o execution.1.scenario.variables.server=vvt-app.hh.us the scripts works fine on Centos OS.

Best,
        Alexis A.
TestBlaze.yml

pri...@blazemeter.com

unread,
Feb 14, 2017, 3:01:46 AM2/14/17
to codename-taurus, andrey....@contractor.ca.com
Hi,

All your command-line overrides work fine on my Ubuntu machine. What shell are you using?

You can try to quote the `execution.0.scenario.variables.server` override in case your shell somehow transforms it before passing it to Taurus.


  Dmitri

fabianb...@gmail.com

unread,
Feb 15, 2017, 4:36:13 PM2/15/17
to codename-taurus, andrey....@contractor.ca.com
Hello guys, same error faced here using Jenkins. 
Some clues? 

Dmitri Pribysh

unread,
Feb 15, 2017, 6:27:35 PM2/15/17
to fabianb...@gmail.com, Andrey Pokhilko, codename-taurus
Can you share a bzt.log?

--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taurus+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/2451662d-e372-4368-b4fb-f0c18d8f48bc%40googlegroups.com.

Andrey Pokhilko

unread,
Feb 16, 2017, 2:59:48 AM2/16/17
to fabianb...@gmail.com, codename-taurus

Hi Fabian,

Can you provide more details, your config file, your command line and bzt.log?

That would help us catching the bug.

--

Andrey

alexis....@abstracta.com.uy

unread,
Feb 16, 2017, 9:29:51 AM2/16/17
to codename-taurus, fabianb...@gmail.com, Andrey....@contractor.ca.com
Hi, let me share with you the files since Fabian and I are working on the same team.

Command Line: TestBlaze.yml -o modules.blazemeter.browser-open=false -o execution.0.concurrency=1 -o execution.0.hold-for=1m -o execution.0.ramp-up=30s -o execution.0.iterations=1 -o execution.0.scenario.variables.server=vvt-app.hearthflow.us -o execution.1.concurrency=1 -o execution.1.hold-for=1m -o execution.1.ramp-up=30s -o execution.1.iterations=1 -o execution.1.scenario.variables.server=vvt-app.hearthflow.us

Thanks for your help!

bzt.log
Login.jmx
LoginAndFilter.jmx
TestBlaze.yml

Dmitri Pribysh

unread,
Feb 16, 2017, 11:15:12 AM2/16/17
to alexis....@abstracta.com.uy, codename-taurus, fabianb...@gmail.com, Andrey....@contractor.ca.com
Your bzt.log contains a suspicious line:

[2017-02-16 00:07:37,659 DEBUG Engine.Configuration] Configs: ['/etc/bzt.d/10-base.json', '/etc/bzt.d/99-installID.yml', '/etc/bzt.d/quick-test.yml']

It indicates that there's an additional file 'quick-test.yml' in the
directory which Taurus looks for base configs in. I'm pretty confident
that this file is loaded before TestBlaze.yml and generates the first
element of `execution`. And then Taurus fails to override it with
`execution.1.scenario.variables.server` key.

Move the `/etc/bzt.d/quick-test.yml` outside of `/etc/bzt.d` directory
and overrides are going to work fine.


Dmitri

On 02/16/2017 05:29 PM, alexis....@abstracta.com.uy wrote:
> Hi, let me share with you the files since Fabian and I are working on
> the same team.
>
> Command Line: TestBlaze.yml -o modules.blazemeter.browser-open=false
> -o execution.0.concurrency=1 -o execution.0.hold-for=1m -o
> execution.0.ramp-up=30s -o execution.0.iterations=1 -o
> execution.0.scenario.variables.server=vvt-app.hearthflow.us
> <http://vvt-app.hh.us/>-o execution.1.concurrency=1 -o
> execution.1.hold-for=1m -o execution.1.ramp-up=30s -o
> execution.1.iterations=1 -o
> execution.1.scenario.variables.server=vvt-app.hearthflow.us
> <http://vvt-app.hh.us/>
>
> Thanks for your help!
>
>
> Read our ebook, "A Complete Introduction to Functional Test
> Automation," here
> <http://t.sidekickopen68.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs4Ws1MYW1pgWDW8qSMPRN6H8tgQ1rq1pf2ssMTR03?t=http%3A%2F%2Fbit.ly%2F2cuva1g&si=5103344377135104&pi=1891b56f-18c9-447e-ddc2-202daee7f05a>
> --
> You received this message because you are subscribed to the Google
> Groups "codename-taurus" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to codename-taur...@googlegroups.com
> <mailto:codename-taur...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/codename-taurus/e74ec7eb-2984-4c31-9340-ed701fb08503%40googlegroups.com
> <https://groups.google.com/d/msgid/codename-taurus/e74ec7eb-2984-4c31-9340-ed701fb08503%40googlegroups.com?utm_medium=email&utm_source=footer>.

alexis....@abstracta.com.uy

unread,
Feb 17, 2017, 9:15:44 AM2/17/17
to codename-taurus, alexis....@abstracta.com.uy, fabianb...@gmail.com, Andrey....@contractor.ca.com
Hi Dmitri,

 I just tried what you mentioned but I am still gettin same error. Let me share latest bzt.log so you can read it. 

Thanks for your help!
bzt-1.log

Dmitri Pribysh

unread,
Feb 17, 2017, 10:08:09 AM2/17/17
to alexis....@abstracta.com.uy, codename-taurus, fabianb...@gmail.com, Andrey....@contractor.ca.com

Now you're hitting another error because you're overriding 'variables' section with a string value 'vvt.app.heartflow.us', and 'variables' should be a dictionary.

Replace both `execution.X.scenario.variables=vvt.app.heartflow.us` overrides with `execution.X.scenario.variables.server=vvt.app.heartflow.us` and it should work as expected.


  Dmitri

Read our ebook, "A Complete Introduction to Functional Test Automation," here --
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/bdd3b6c8-a388-41e7-8d79-5dbd173aa3f7%40googlegroups.com.

alexis....@abstracta.com.uy

unread,
Feb 20, 2017, 4:00:55 PM2/20/17
to codename-taurus, alexis....@abstracta.com.uy, fabianb...@gmail.com, Andrey....@contractor.ca.com
Resolved, thanks!
Reply all
Reply to author
Forward
0 new messages