473,396 Members | 1,894 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,396 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 1970
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.