takehaya / peewee_seed

peewee_seed is a seed library which provides initial data to database using peewee.
2 stars 4 forks source link

Issue loading from yaml fixtures #4

Open simonsd opened 2 years ago

simonsd commented 2 years ago

When running seeds.create_table_all() using yaml fixtures, I get the following error:

Traceback (most recent call last):
  File "seed.py", line 13, in <module>
    main()
  File "seed.py", line 8, in main
    seeds.create_table_all()
  File "/usr/local/lib/python3.6/site-packages/peewee_seed/__init__.py", line 41, in create_table_all
    tables_list = self.get_tables(models_path_list)
  File "/usr/local/lib/python3.6/site-packages/peewee_seed/__init__.py", line 30, in get_tables
    _, models_path_list = self.load_fixtures(fixture_data)
  File "/usr/local/lib/python3.6/site-packages/peewee_seed/__init__.py", line 117, in load_fixtures
    fixture_data = self.load_fixture_files(self.fixture_files)
  File "/usr/local/lib/python3.6/site-packages/peewee_seed/__init__.py", line 82, in load_fixture_files
    data = yaml.load(f)
TypeError: load() missing 1 required positional argument: 'Loader'

I see this issue has already been resolved in https://github.com/takehaya/peewee_seed/commit/f13e311cf208b92bb5fce692ad86df904176b1c2

However this change is not yet present in the latest release on pypi (0.1.8) Would it be possible to create a new release for this and push it out on pypi, so as to prevent people from having to patch manually?

Current workaround is to install using VCS notation:

pip install git+https://github.com/takehaya/peewee_seed.git@51bdf5145937f0e5d7032e88702ef91f10bfc3ef#egg=peewee_seed
takehaya commented 2 years ago

hi misonsd. thanks for the report.

so as to prevent people from having to patch manually?

I will push it soon :ok:

rockstar commented 2 years ago

I will push it soon

Just hit this issue, almost a year later. Any update?