Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

passing parameter from GET function to python script in Restful server

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear javaranch members,

I have a small problem, in which i am struck for few days now.

Here is my Get Restful code, in this i use Pathparam to pass parameter via the web-browser.


As it can be seen from above code i pass the parameter using PAthParam to the python file Command.py. But when i enter the parameter value (i.e) name1=USB0::0x164E::0x13EC::TW00008555; which is the id of my instrument connected and command=*IDN?, which is SCPI command to get the name of the instrumnet, in the browser window i get an error: Command result NULL, but in reality i should get either 0 or 1.

But am kinda confused if the values i am passing in the browser window is actually passed in or not?

If not what i could do to pass this values? I have attached the image of the error,
Is my code correct? or am i missing something in it?

Any help would be very much appreciated. Thanks a ton in advance.!
rest.jpg
[Thumbnail for rest.jpg]
Server side error in Browser window after entering the parameter values
 
I think I'll just lie down here for a second. And ponder this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic