Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print_config does not work in Python 3.8 #780

Closed
ZhuBaohe opened this issue Nov 19, 2020 · 2 comments
Closed

print_config does not work in Python 3.8 #780

ZhuBaohe opened this issue Nov 19, 2020 · 2 comments

Comments

@ZhuBaohe
Copy link

I follow the example of Sacred 0.8.1 Documentation in python 3.8.5:

from sacred import Experiment

ex = Experiment('hello_config')

@ex.config
def my_config():
    recipient = "world"
    message = "Hello %s!" % recipient

@ex.automain
def my_main(message):
    print(message)

When I run the code, an exception is thrown:

$ python hello_config.py print_config
INFO - hello_config - Running command 'print_config'
INFO - hello_config - Started
ERROR - hello_config - Failed after 0:00:00!
Exception originated from within Sacred.
Traceback (most recent calls):
  File "D:\anaconda3\envs\nlp\lib\site-packages\sacred\commands.py", line 61, in _non_unicode_repr
    repr_string, isreadable, isrecursive = pprint._safe_repr(
TypeError: _safe_repr() missing 1 required positional argument: 'sort_dicts'
@ZhuBaohe ZhuBaohe changed the title An exception of print_config print_config does not work in Python 3.8 Nov 19, 2020
@thequilo
Copy link
Collaborator

This is already fixed on the master (#763, #719). I hope to get to creating a release that can be pushed to pypi soon.

@thequilo
Copy link
Collaborator

I'll close this since it is fixed in sacred 0.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants