Describe the problem
refresh-code-excerpts.sh currently throws an exception when it tries to process a file type that it doesn't recognize
Expected fix
When refresh-code-excerpts.sh encounters a file type that it doesn't recognize it should handle that file gracefully instead of throwing an exception.
Additional context
There were some tensorflow binaries in the codelabs repo which broke refresh-code-excerpts.sh. The FormatException comes from the dart:convert package, so the file are probably not UTF-8 files, but we assume they are.
Logs:
root@da0fe728b924:/app# ./tool/refresh-code-excerpts.sh
╔════════════════════════════════════════════════════════════════════════════╗
║ Analytics reporting disabled. In order to enable it, run: ║
║ ║
║ dart --enable-analytics ║
║ ║
╚════════════════════════════════════════════════════════════════════════════╝
[INFO] Generating build script completed, took 510ms
[INFO] Reading cached asset graph completed, took 185ms
[INFO] Checking for updates since last build completed, took 3.7s
[INFO] Running build completed, took 95ms
[INFO] Caching finalized dependency graph completed, took 121ms
[SEVERE] code_excerpter:code_excerpter on examples/codelabs/tfserving-flutter/codelab1/mm_spam_savedmodel/123/keras_metadata.pb (cached):
FormatException: Missing extension byte (at offset 2)
[SEVERE] code_excerpter:code_excerpter on examples/codelabs/tfserving-flutter/codelab1/mm_spam_savedmodel/123/variables/variables.data-00000-of-00001 (cached):
FormatException: Unexpected extension byte (at offset 0)
[SEVERE] code_excerpter:code_excerpter on examples/codelabs/tfserving-flutter/codelab3/mm_update_spam_savedmodel/123/keras_metadata.pb (cached):
FormatException: Missing extension byte (at offset 2)
[SEVERE] code_excerpter:code_excerpter on examples/codelabs/tfserving-flutter/codelab3/mm_update_spam_savedmodel/123/variables/variables.data-00000-of-00001 (cached):
FormatException: Unexpected extension byte (at offset 3)
[SEVERE] code_excerpter:code_excerpter on examples/codelabs/tfserving-flutter/codelab3/mm_update_spam_savedmodel/123/saved_model.pb (cached):
FormatException: Unexpected extension byte (at offset 3)
[SEVERE] code_excerpter:code_excerpter on examples/codelabs/tfserving-flutter/codelab1/mm_spam_savedmodel/123/saved_model.pb (cached):
FormatException: Missing extension byte (at offset 4)
[SEVERE] code_excerpter:code_excerpter on examples/codelabs/tfserving-flutter/codelab1/mm_spam_savedmodel/123/variables/variables.index (cached):
FormatException: Unexpected extension byte (at offset 45)
[SEVERE] code_excerpter:code_excerpter on examples/codelabs/tfserving-flutter/codelab3/mm_update_spam_savedmodel/123/variables/variables.index (cached):
FormatException: Unexpected extension byte (at offset 45)
[SEVERE] Failed after 256ms
root@da0fe728b924:/app#
Describe the problem
refresh-code-excerpts.sh currently throws an exception when it tries to process a file type that it doesn't recognize
Expected fix
When refresh-code-excerpts.sh encounters a file type that it doesn't recognize it should handle that file gracefully instead of throwing an exception.
Additional context
There were some tensorflow binaries in the codelabs repo which broke refresh-code-excerpts.sh. The FormatException comes from the dart:convert package, so the file are probably not UTF-8 files, but we assume they are.
Logs: