Ignoring non-RECORD field with mismatched mode: - error
IAmBotmaker opened this issue · 2 comments
Hi, when trying to recreate the example (using Ubuntu and venv)
I have the following problems
user@DESKTOP:/mnt/c/X/venv_dir$ cat > file.data.json
{ "a": [1, 2] }
{ "i": 3 }
Ctrl-D
user@DESKTOP:/mnt/c/X/venv_dir$ generate-schema < file.data.json > file.schema.json
Traceback (most recent call last):
File "/home/user/.local/bin/generate-schema", line 7, in
from bigquery_schema_generator.generate_schema import main
File "/home/user/.local/lib/python3.5/site-packages/bigquery_schema_generator/generate_schema.py", line 303
f'Ignoring non-RECORD field with mismatched mode: '
^
SyntaxError: invalid syntax
What might be wrong with this?
You are using Python 3.5. At some point, I started using f-strings, which needs at least 3.6. Here is what I get on my Ubuntu 18.04:
$ generate-schema
{ "a": [1, 2] }
{ "i": 3 }
INFO:root:Processed 2 lines
[
{
"mode": "REPEATED",
"name": "a",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "i",
"type": "INTEGER"
}
]
Closing due to no response.