Skip to content

Conversation

@Aathish04
Copy link
Member

@Aathish04 Aathish04 commented Jul 25, 2020

Fixes a bug where a KeyError would be thrown when rendering a Text() mobject.

List of Changes

  • Import file_writer_config from config.py
  • Use file_writer_config['text_dir'] to obtain text_dir instead of config['text_dir']

Motivation

Without this fix, you will be unable to render Text() objects, like, at all.

Explanation for Changes

config does not contain text_dir, but file_writer_config does. Hence, replacing config with file_writer_config will ensure that the text_dir is obtained when required.

Testing Status

We should probably edit the test test_writing to ensure that it picks up on stuff like this.
Mentioning @huguesdevimeux for his thoughts.

EDIT: huguesdevimeux has provided the necessary solution and it has been committed in this PR.

Acknowledgement

Fixes a bug where a keyerror would be thrown when rendering a Text() mobject.
@Aathish04 Aathish04 added the pr:bugfix Bug fix for use in PRs solving a specific issue:bug label Jul 25, 2020
@huguesdevimeux
Copy link
Member

Related to #188. It fixes it, I think.

Pingin @leotrs , as we had this discussion together.

@eulertour
Copy link
Member

It looks like this was missed because we can't test Write(). It may be helpful to have a test that just ensures a Text mobject can be instantiated properly.

@huguesdevimeux huguesdevimeux merged commit 7f28769 into ManimCommunity:master Jul 26, 2020
@Aathish04 Aathish04 deleted the fix-text branch July 27, 2020 12:23
Aathish04 added a commit to huguesdevimeux/manim that referenced this pull request Jul 28, 2020
Aathish04 added a commit to huguesdevimeux/manim that referenced this pull request Jul 28, 2020
…animCommunity#220)

* Use file_writer_config instead if config for Text()

Fixes a bug where a keyerror would be thrown when rendering a Text() mobject.

* Make testing_utils.py use file_writer_config.

Thank you @huguesdevimeux !

Co-authored-by: Aathish Sivasubrahmanian <[email protected]>
huguesdevimeux added a commit that referenced this pull request Aug 12, 2020
* added caching functionnality

* deleted comments

* fixed wait bug

* added docstrings

* fixed minor typo in doc

* added cache cleaner

* added disable_caching option

* supported camera_config, and hashing functions

* use now digital naming when disable_caching

* added an option to flush the cache.

* fixed shameful typo

* added max_cached_files

* fixed merge issues

* added digital naming when disable_caching

* foxed skip_animations dlag that #98 broke

* removed cairo context from hash

* removed deprecated code

* fixed tests by setting write_to_movie to False

* removed useless code

* Revert "Use file_writer_config instead of config to get text_dir for Text() (#220)"

This reverts commit 7f28769.

* Apply suggestions from code review

Thanks @pgsuper !

Co-authored-by: Pg Biel <[email protected]>

* fixed max_files_cached typo

* Use file_writer_config instead of config to get text_dir for Text() (#220)

* Use file_writer_config instead if config for Text()

Fixes a bug where a keyerror would be thrown when rendering a Text() mobject.

* Make testing_utils.py use file_writer_config.

Thank you @huguesdevimeux !

Co-authored-by: Aathish Sivasubrahmanian <[email protected]>

* removed useless code

* used self.camera instead of __dict__

* Apply suggestions from code review

Thanks @pgsuper !

Co-authored-by: Pg Biel <[email protected]>

* more pythonic

* fixed bug related to dict keys

When a dict containing keys not of the right type it caused an error.

thanks to @Aatish04.

* fixed minor bufg of the last commit

* Now clean_cache can remove multiple files.

* fixed bug when rendering multiple scenes.

skp_animations was not reset to a default value. Appeared in #98

* fixed bug related to nested dict with wrong keys

See previous commit.

* added infinity support for max_file_cached

and changed default

* changed default value of max_files_cached to 100

* deleted comments

* fixed docstrings

* fixed format (maybe)

* fixed format

* fixed tests

* Update expected.txt

Fixes logging tests.

* fixed merge conflict

* fixed logging test

* fixed docstrings

* minor doc improvement

* Apply suggestions from code review

Thank you Captain Docs !

Co-authored-by: Pg Biel <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pg Biel <[email protected]>

* fixed typo of the last commit -_-

Co-authored-by: Aathish <[email protected]>
Co-authored-by: Aathish Sivasubrahmanian <[email protected]>
Co-authored-by: Pg Biel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:bugfix Bug fix for use in PRs solving a specific issue:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants