-
-
Notifications
You must be signed in to change notification settings - Fork 567
Closed
Description
Currently, on Linux it isn't possible to pickle the result of calling country_holidays.
Code to reproduce:
import pickle
import holidays
def main():
jp_holidays = holidays.country_holidays("JP")
result = pickle.dumps(jp_holidays)
if __name__ == "__main__":
main()The error: _pickle.PicklingError: Can't pickle <function func at 0x7f9098a8dd30>: attribute lookup func on __main__ failed.
It fails not on all countries. For example, it works for US and UK.
The error starts from version 0.22 (on 0.22 it is slightly different).
The problem can be fixed by using dill, but may be it is possible to adjust the code to work with native pickle.
Metadata
Metadata
Assignees
Labels
No labels