0
I am trying to get a value of a very simple class, but I have a problem that I cannot solve. Follow the codes below:
Main class:
from directores.directores import Directores
# A classe Directores encontra-se em directores/directores.py
def main():
print (Strings.start_description)
# Sobrescrever arquivos encontrados
arcpy.env.overwriteOutput = True
# Criando todos os diretรณrios
directores = Directores(Parameters.main_folder + r"\\")
print(directores.getInput_folder_SRTM())
The class Directors:
class Directores(object):
def __init__(self, main_folder):
# Diretórios secundários de entrada - INPUT
self.input_folder = main_folder + r"\Input\\"
self.input_folder_SRTM = self.input_folder + r"SRTMs\\"
def getInput_folder_SRTM(self):
return self.input_folder_SRTM
With the following error:
Runtime error
Traceback (most recent call last):
File "<string>", line 50, in <module>
File "<string>", line 36, in main
AttributeError: 'Directores' object has no attribute 'getInput_folder_SRTM'
In each folder I created an empty file __init__.py
If you need more information I will be at your disposal. And if you give me some tips I would also appreciate it very much!
We have no way to test your code, as there are dependencies that are not explicit in the question, such as
String
,arcpy
andParameters
, however, in a basic test, removing these dependencies, its code did not reproduce the cited error: https://repl.it/@acwoss/Sweetadorableinterface. Could then [Dit] and create a [mcve] that demonstrates the error?– Woss