473,231 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 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 1963
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

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

Similar topics

2
by: Jordan Willms | last post by:
Hi there. I am working with lom metadata and I am a little confused with how to form the following xml element: <lom xmlns="http://www.imsglobal.org/xsd/imsmd_v1p2"...
2
by: bjam | last post by:
Hi, I am hoping someone can answer the following question it seems when I put in an & in the query string to be translated as the link in the XML to HTML I get an error, just using the ? mark is...
2
by: piraticman | last post by:
Hi. I have some code for a javascript jump menu... It validated with HTML 4.0 but now does not validate with XHTML strict 1.0. I have used name atributes in my code which aparantly are not...
2
by: Varun | last post by:
Hello Despite all the advise i have recieved from everyone on this group i still cannot fix this error. I am fast approachin my deadline so i need to fix this asap :o I get the error whenever i...
9
by: M.N.A.Smadi | last post by:
HI; I am having the following error. I am using someone else's code and all they are doing is pass an argv to a function then def execute_action(manager, argv): method_name =...
5
by: AdSR | last post by:
Hi, I'm having a problem with the Amara toolkit. Try this: >>> from amara import binderytools >>> raw = '<pq:test xmlns="http://example.com/namespace" xmlns:pq="http://pq.com/ns2"/>' >>> rwd...
1
by: emma_middlebrook | last post by:
Hi Goal: trying to validate a string to see if it can be a valid XML attribute name and, if not, replace any of the invalid characters with an underscore (to fix it up). Is there anything in...
10
by: Phil Latio | last post by:
I am inserting data into user table which contains 5 fields, sounds simple enough normally but 2 of the fields are designated as UNIQUE. If someone does enter a value which already exists, how do I...
2
by: Nathan Sokalski | last post by:
I am attempting to create icons for controls I have created using VB.NET by using the System.Drawing.ToolboxBitmap attribute. I have managed to do this in C# by specifying the path to the *.ico...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.