Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Phase 2: #3

Open
marufzanik opened this issue Sep 27, 2020 · 1 comment
Open

Error in Phase 2: #3

marufzanik opened this issue Sep 27, 2020 · 1 comment

Comments

@marufzanik
Copy link

When I run the script it stops giving this error.

ValueError Traceback (most recent call last)

in ()
271 title = str('/content/index')
272 if os.path.exists(pathToIndex): # check if the specified directory exists
--> 273 generateDirArray(pathToIndex)
274 generateHTML(dirData,appName,appVer,genDate,genTime,title,appLink,numFiles,numDirs,grandTotalSize,linkFiles)
275 else:

in generateDirArray(dirToScan)
138 totalSize = totalSize + fileSize
139 grandTotalSize = grandTotalSize + fileSize
--> 140 fileModifiedTime = datetime.datetime.fromtimestamp(os.path.getmtime(currentDir+'/'+file))
141 fileModifiedTime = fileModifiedTime.strftime("%d/%m/%Y %H:%M:%S")
142 currentDirArray.append(file+''+str(fileSize)+''+fileModifiedTime) # append file info to currentDirArray

ValueError: year 0 is out of range

@ZapperDJ
Copy link
Owner

Can't replicate here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants