Open alda30 opened 11 months ago
Hi @alda30, could you indicate where this appears in the code?
I was trying to run the tutorials and in the first one (cpt) I got this error. The error occurs when the command "cpt.to_excel(output_path="Excel export.xlsx")" is used. The full log of the error is given below:
cpt.to_excel(output_path="Excel export.xlsx")
File "/home/XXXX/.local/lib/python3.8/site-packages/groundhog/siteinvestigation/insitutests/pcpt_processing.py", line 1876, in to_excel
writer.save()
AttributeError: 'XlsxWriter' object has no attribute 'save'
Which version of the xlsxwriter
package do you have? The groundhog requirements file has this one:
xlsxwriter==1.3.9
groundhog has a unit test for the Excel export which runs successfully with this version of the package.
I had this issue in other projects with latests versions of xlsxwriter (currently 3.+). The function changed to "_save()". I think is something easy to fix, so it can be compatible with latest versions
@snakesonabrain I can make a PR to solve this issue if you want. Just let me know
Thanks for flagging this. If you make a pull request, please make sure that all tests in the pipeline are successful. Currently, groundhog still has support for Python 3.7 and we need to make sure there is compatibility.
Xlsxwriter is not compatible with save() anymore
save() should be replaced by close() in the source code