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

AttributeError: 'list' object has no attribute 'upper' #36

Open
maxlcoder opened this issue Sep 30, 2020 · 4 comments
Open

AttributeError: 'list' object has no attribute 'upper' #36

maxlcoder opened this issue Sep 30, 2020 · 4 comments

Comments

@maxlcoder
Copy link

Hello,

I run

~/.virtualenvs/tap-facebook/bin/tap-facebook --config tap_facebook_config.json -p properties.json | ~/.virtualenvs/target-bigquery/bin/target-bigquery -c target_bigquery_config.json

returns

INFO Syncing adcreative, fields {'id'}
Traceback (most recent call last):
  File "/Users/akou/.virtualenvs/target-bigquery/bin/target-bigquery", line 8, in <module>
    sys.exit(main())
  File "/Users/akou/.virtualenvs/target-bigquery/lib/python3.8/site-packages/target_bigquery.py", line 300, in main
    state = persist_lines_stream(config['project_id'], config['dataset_id'], input, validate_records=validate_records)
  File "/Users/akou/.virtualenvs/target-bigquery/lib/python3.8/site-packages/target_bigquery.py", line 239, in persist_lines_stream
    tables[table] = bigquery.Table(dataset.table(table), schema=build_schema(schemas[table]))
  File "/Users/akou/.virtualenvs/target-bigquery/lib/python3.8/site-packages/google/cloud/bigquery/table.py", line 344, in __init__
    self.schema = schema
  File "/Users/akou/.virtualenvs/target-bigquery/lib/python3.8/site-packages/google/cloud/bigquery/table.py", line 410, in schema
    self._properties["schema"] = {"fields": _build_schema_resource(value)}
  File "/Users/akou/.virtualenvs/target-bigquery/lib/python3.8/site-packages/google/cloud/bigquery/schema.py", line 289, in _build_schema_resource
    return [field.to_api_repr() for field in fields]
  File "/Users/akou/.virtualenvs/target-bigquery/lib/python3.8/site-packages/google/cloud/bigquery/schema.py", line 289, in <listcomp>
    return [field.to_api_repr() for field in fields]
  File "/Users/akou/.virtualenvs/target-bigquery/lib/python3.8/site-packages/google/cloud/bigquery/schema.py", line 177, in to_api_repr
    answer["fields"] = [f.to_api_repr() for f in self.fields]
  File "/Users/akou/.virtualenvs/target-bigquery/lib/python3.8/site-packages/google/cloud/bigquery/schema.py", line 177, in <listcomp>
    answer["fields"] = [f.to_api_repr() for f in self.fields]
  File "/Users/akou/.virtualenvs/target-bigquery/lib/python3.8/site-packages/google/cloud/bigquery/schema.py", line 170, in to_api_repr
    "type": self.field_type.upper(),
AttributeError: 'list' object has no attribute 'upper'
@ghost
Copy link

ghost commented Sep 30, 2020

I got this using the tap-stripe

@YingWang-Clare
Copy link

I met this issue with tap-facebook as well. I also tried with target-csv and I could successfully get the output file in proper format. Does anyone have any idea to solve?

@bfirsh
Copy link

bfirsh commented Dec 18, 2020

Looks like #17 is the fix for this.

@ednarb29
Copy link

ednarb29 commented Dec 6, 2022

I also got that error and would appreciate it if the fix could be merged.

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

4 participants