gslab-econ / gslab_python

Python tools for GSLab
MIT License
13 stars 11 forks source link

SaveData does not take pathlib paths #177

Closed zhizhongpu closed 2 months ago

zhizhongpu commented 4 months ago

When out_file or log_file take in Path objects, SaveData runs into error:

TypeError: expected string or bytes-like object, got 'PosixPath'

The temporary fix is to first transform these arguments using str() before passing them into the function.

Here we explore the possibility to allow SaveData to take PosixPath objects directly.

liaochris commented 2 months ago

Updated from master in https://github.com/gslab-econ/gslab_python/commit/e3d66eb5d78cd077b1c7cad056c51204c6d9bdd0

liaochris commented 2 months ago

In this issue we updated SaveData.py to take in Path objects as inputs for out_file and log_file.

latest version of issue branch: https://github.com/gslab-econ/gslab_python/commit/0cb01cd51fa5da74306da0c95c45c80fec49f565