0
For some reason I haven’t been able to identify the python is unable to locate the path.
for profile in sorted(profile_ids):
path = '/FileStore/tables/'
filename = 'google_analytics_data_%s_1.csv'
with open(path + filename % profile.lower(), 'wt') as f:
writer = csv.writer(f, lineterminator='\n')
if __name__ == '__main__': main(sys.argv)
print("Profile done. Next profile...")
Filenotfounderror: [Errno 2] No such file or directory: '/Filestore/Tables/google_analytics_data_
If you didn’t find it, it’s because it doesn’t exist. I saw that yours
path
starts with a slider, indicating that the path is absolute relative to the system root. Should that be true? It seems that you intended to access a relative path.– Woss
I understood that I should start with / because it is a DBFS walk and even taking out / the error persists
– Rafael
Replaces
path = '/FileStore/tables/'
forpath =f'/FileStore/tables/'
.– Solkarped
@Solkarped, solved the problem, thank you!
– Rafael
Glad you solved it. Just a hint: avoid using
+
to mount your path, for paths existsos.path.join()
– Paulo Marques