471,313 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,313 software developers and data experts.

Attribute Error: can someone advise how to fix

1
I guess this is in Whatsup module. I just started using python today, so I don't have any idea of what the problem is. Supposedly a collegue is using this script without a problem using an earlier version of Whatsup and Python

Thanks

Traceback (most recent call last):
File "B:\jeffc_func_tests\mvlite2\hammer.py", line 10, in testNavigateLanding
self.ie.Navigate("http://convert.widemile.com/marble/jeffc_func_tests/mvlite2/mvlite2.html")
AttributeError: WatsupIE instance has no attribute 'Navigate'

================================================== ====================
ERROR: testNavigateLanding (__main__.burkester_ie)
----------------------------------------------------------------------
Traceback (most recent call last):
File "B:\jeffc_func_tests\mvlite2\hammer.py", line 18, in tearDown
self.ie.Quit()
AttributeError: WatsupIE instance has no attribute 'Quit'

Python code:


Expand|Select|Wrap|Line Numbers
  1. import unittest, time
  2. from watsup.wie import WatsupIE
  3.  
  4. class burkester_ie(unittest.TestCase):
  5.    def setUp(self):
  6.       self.ie=WatsupIE()
  7.  
  8.    def testNavigateLanding(self):
  9.       for cnt in range (200):
  10.          self.ie.Navigate("http://convert.widemile.com/marble/jeffc_func_tests/mvlite2/mvlite2.html")
  11.          time.sleep(1)
  12.          self.ie.ClickLink("Click Me")
  13.          time.sleep(1)
  14.          self.assertEqual(self.ie.LocationName(),"Click Me")
  15.          time.sleep(1)
  16.  
  17.    def tearDown(self):
  18.       self.ie.Quit()
  19.  
  20. if __name__ == '__main__':
  21.     unittest.main()
Jul 25 '07 #1
3 1894
pbmods
5,821 Expert 4TB
Heya, jtbaca. Welcome to TSDN!

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

I'm going to go ahead and move this thread to the Python forum, where one of our resident Experts will be more likely to be able to help you out.
Jul 25 '07 #2
bartonc
6,596 Expert 4TB
Yes. The error is due to trying to call a method that does not exist:

AttributeError: WatsupIE instance has no attribute 'Quit'

Try Close()
or quit()

or get the documentation that lists interface to this module
or
Expand|Select|Wrap|Line Numbers
  1. from watsup.wie import WatsupIE 
  2. help(WatsupIE )
may tell you what you need to know.

Hope that helps.
Jul 25 '07 #3
bartonc
6,596 Expert 4TB
Yes. The error is due to trying to call a method that does not exist:

AttributeError: WatsupIE instance has no attribute 'Quit'

Try Close()
or quit()

or get the documentation that lists interface to this module
or
Expand|Select|Wrap|Line Numbers
  1. from watsup.wie import WatsupIE 
  2. help(WatsupIE )
may tell you what you need to know.

Hope that helps.
There is also a thing called "Module Docs" that goes through all your install (importable) modules and converts all the defs and doc strings into html for viewing in your web browser. That has come in very handy for me when I lacked documentation.
Jul 25 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by piraticman | last post: by
9 posts views Thread by M.N.A.Smadi | last post: by
5 posts views Thread by AdSR | last post: by
10 posts views Thread by Phil Latio | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.