import problem

Mohsen Pahlevanzadeh mohsen at pahlevanzadeh.org
Sun Sep 15 22:23:26 EDT 2013


Dear all,

i have the following two line codes:
############################
    	import  ui.interface.interface
	obj = ui.interface.interface.InterfaceCodes()
###########################333
I have same code in another package and work fine. but i get the :

#####################################################3
Traceback (most recent call last):
  File "./main.py", line 31, in <module>
    from materials.materials import *
  File "/home/mohsen/codes/amlak/amlak/src/materials/materials.py", line
40, in <module>
    from  ui.interface.interface import *  
  File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py",
line 32, in <module>
    from ui.materialsFrame import *
  File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line
24, in <module>
    from ui.materialsFindFrame import *
  File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFindFrame.py",
line 14, in <module>
    from common.objects.objects import *
  File "/home/mohsen/codes/amlak/amlak/src/common/objects/objects.py",
line 28, in <module>
    obj = ui.interface.interface.InterfaceCodes()
AttributeError: 'module' object has no attribute 'interface'
###########################################
When i changed the my code to:
#################################################33
    from  ui.interface.interface import *
    obj = ui.interface.interface.InterfaceCodes()
##############################################3

I get the :

#################################333
raceback (most recent call last):
  File "./main.py", line 31, in <module>
    from materials.materials import *
  File "/home/mohsen/codes/amlak/amlak/src/materials/materials.py", line
40, in <module>
    from  ui.interface.interface import *  
  File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py",
line 32, in <module>
    from ui.materialsFrame import *
  File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line
24, in <module>
    from ui.materialsFindFrame import *
  File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFindFrame.py",
line 14, in <module>
    from common.objects.objects import *
  File "/home/mohsen/codes/amlak/amlak/src/common/objects/objects.py",
line 28, in <module>
    Obj = ui.interface.interface.InterfaceCodes()
NameError: name 'ui' is not defined
###############################
Also if i delete "ui.interface.interface" i get the :
########################3333
Traceback (most recent call last):
  File "./main.py", line 31, in <module>
    from materials.materials import *
  File "/home/mohsen/codes/amlak/amlak/src/materials/materials.py", line
40, in <module>
    from  ui.interface.interface import *  
  File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py",
line 32, in <module>
    from ui.materialsFrame import *
  File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line
24, in <module>
    from ui.materialsFindFrame import *
  File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFindFrame.py",
line 14, in <module>
    from common.objects.objects import *
  File "/home/mohsen/codes/amlak/amlak/src/common/objects/objects.py",
line 28, in <module>
    Obj = InterfaceCodes()
NameError: name 'InterfaceCodes' is not defined
############################

You make mme happy if help me....
Yours,
Mohsen




More information about the Python-list mailing list