can't figure out error: module has no attribute...

Chris_147 chris.van.bael at gmail.com
Tue May 23 09:55:51 EDT 2006


but it seems to depend on from where I start the Python shell.

so I've got a module selfservicelabels.py with some variables defined,
like this:
BtnSave             = "link=label.save"
DeliveryAutomaat    = "//input[@id='deliveryMethod' and @value='AU']"
This module is in the Lib directory.

Now when I do
import selfservicelabels
selfservicelabels.BtnSave
                   -> link=nmbs.label.save
selfservicelabels.DeliveryAutomaat
                   -> AttributeError: 'module' object has no attribute
'DeliveryAutomaat'

to make it more strange: PyCrust and Idle recognise DeliveryAutomaat
perfectly.
Everything above is done with Python 2.4.3 on Windows XP SP2

So after some testing it seems to depend on from which partition I
start Python.
So open commandline and navigate to a dir on C: everything works
perfectly.
Close python shell en navigate to D: some variables in
selfservicelabels.py are not known.
What is going on here?  Is this a known error?




More information about the Python-list mailing list