Thursday, March 27, 2014

Re: populating my postgres with openpyxl

I keep getting this error, saying that there is 0207.xlsx is not there,
but it is in the directory.

File "", line 34, in <module>
wb = load_workbook(filename = fname, use_iterators=True)
line 125, in load_workbook
raise InvalidFileException(unicode(e))
openpyxl.shared.exc.InvalidFileException: [Errno 2] No such file or
directory: '0207.xlsx'

It looks like os.walk() needs you to add the starting point (BASEDIR) to
the resulting file name.

Something like

... load_workbook(filename = os.path.join(BASEDIR, fname),...)


- Tom

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment