Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Namespace' object has no attribute 'brokeName' #6047

Closed
MarcoPalomo opened this issue May 22, 2017 · 0 comments
Closed

AttributeError: 'Namespace' object has no attribute 'brokeName' #6047

MarcoPalomo opened this issue May 22, 2017 · 0 comments

Comments

@MarcoPalomo
Copy link

People! Greetings from Suriname!!
I try to get this up. What's the way to run this up?

Actual Behaviour

Namespace(SantBrK='brk01', SantQue='P35') Traceback (most recent call last): File "jSonTest02.py", line 18, in <module> brokk=requests.get('http://localhost:8161/api/jo...brokerName={}'.format(args.brokeName),auth=('login,mdp')) AttributeError: 'Namespace' object has no attribute 'brokeName'

The piece of code

#!/usr/bin/python
# -*- coding: utf-8 -*-

import argparse,sys,requests

#parser
parser = argparse.ArgumentParser(description='MOM.')

#diff arguments
parser.add_argument('-q', '--queuenum', type=str, dest='SantQue', action='store', help='un numero de queue')
parser.add_argument('-b', '--brknum',type=str, dest='brokeName', action='store', default='brk01', help='un num de broker')

args = parser.parse_args()

print (args)

queue=requests.get('http://localhost:8161/api/...')
brokk=requests.get('http://localhost:8161/api/...brokerName={}'.format(args.brokeName),auth=('...'))


if args.SantQue:
        print (queue.json())
else:
        print ("dong error")


#print (queue.json())
#print (queue)

#print (mountain.json())
#print (mountain)

Sorry for my incompetence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant