Dashboards & Visualizations
Highlighted

'unicode' object has no attribute 'get'

Contributor

When using the advanced xml... i am doing an inverted-flow layout with text-boxes to filter a simple results table.

Whenever i type something in the text boxes i get "PARSER: Applying intentions failed 'unicode' object has no attribute 'get'. Am i missing a module? Select boxes seem to be working fine... it's only the textboxes.

I tried to mimic the example in simple xml then do showsource=1 .. and i haven't been able to identify any difference.

thoughts?

thanks, Kirby

EDIT: added textbox example

> <module name="ExtendedFieldSearch">
>   <param name="replacementMap">
>     <param name="arg">
>       <param name="hostip"/>
>     </param>
>   </param>
>   <param name="field">Host IP:</param>
>     <param name="intention">
>       <param name="name">stringreplace</param>
>         <param name="arg">
>         <param name="hostip">
>           <param name="default">*</param>
>           <param name="fillOnEmpty">True</param>
>         </param>    
>     </param>
> ...
Tags (2)
Highlighted

Re: 'unicode' object has no attribute 'get'

SplunkTrust
SplunkTrust

Im afraid there's a known issue at the moment, - the showsource=1 code that converts <form> views from the simplified XML format to the advanced format doesnt work right now and hits this error.

im afraid i dont know of a workaround and Im not sure of an ETA.

What's happening is that the conversion is stripping out a bunch of bits from ConvertToIntention's configuration that have to be there.

In the meantime all I can say is that you can study the advanced xml form search examples in the UI examples app

Highlighted

Re: 'unicode' object has no attribute 'get'

Contributor

ok i'll get on that

0 Karma
Highlighted

Re: 'unicode' object has no attribute 'get'

Communicator

here is my workaround :

for example , the original source code are :

  <param name="replacementMap">
    <param name="arg">
      <param name="sourcetypeToken"/>
    </param>
  </param>

please modify it as below :

  <param name="replacementMap">
    <param name="arg">
      <param name="sourcetypeToken">
        <param name="value"></param>
      </param>
    </param>
  </param>

I tried , it works. Regards,

View solution in original post

Highlighted

Re: 'unicode' object has no attribute 'get'

Contributor

i added a code segment to what i have above? i couldn't seem to correctly implement your suggestion.

0 Karma
Highlighted

Re: 'unicode' object has no attribute 'get'

Splunk Employee
Splunk Employee

This answer is correct.

0 Karma
Highlighted

Re: 'unicode' object has no attribute 'get'

Contributor

I'll take your word for it.. but adding a param of value did not fix my issue. rearranging the modules did. who knows.. likely my mistake.

0 Karma
Highlighted

Re: 'unicode' object has no attribute 'get'

Contributor

thanks, this answer is correct and is helpful for us. hope splunk's advanced XML syntax can be more rigorous

0 Karma
Highlighted

Re: 'unicode' object has no attribute 'get'

Influencer

very useful, unsure why converting from simpleXML to advanced using "?showsource=1" doesn't work correctly

0 Karma
Highlighted

Re: 'unicode' object has no attribute 'get'

Path Finder

just add this line?

    <param name="value"></param>

didnt work for me no change

0 Karma