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

update_by_field error #62

Closed
public-safety-lab opened this issue Sep 12, 2019 · 2 comments
Closed

update_by_field error #62

public-safety-lab opened this issue Sep 12, 2019 · 2 comments

Comments

@public-safety-lab
Copy link

public-safety-lab commented Sep 12, 2019

I am logging my s3 bucket activity with Airtable and AWS Lambda.

I used the following import:

from airtable.airtable import Airtable

[ERROR] AttributeError: 'Airtable' object has no attribute 'update_by_field'
Traceback (most recent call last):
File "/var/task/function.py", line 31, in lambda_handler
airtable.update_by_field('field1 field2')

Not sure what should I do next

@gtalarico
Copy link
Owner

gtalarico commented Sep 12, 2019

You rpbable have a name Clash between the module airtable and a variable with the same name.

Try this:

from airtable import Airtable
table = Airtable(args) 
table.update_by_field(args)

@vtennero
Copy link

Hi, I have the same issue with get_iter, I'm also using Lambda x airtable.

It would seem there is a conflict between airtable and airtable-python-wrapper but I don't know how to solve it.

error log:

  "errorMessage": "'Airtable' object has no attribute 'get_iter'",
  "errorType": "AttributeError",

In my lambda_function.py:

from airtable import Airtable 
...
table_output = Airtable(base_key, output_table_name, apikey)
output_pages = table_output.get_iter(view='Grid view')
...
table_output.insert({'abc':x.y})

In my root folder of my lambda:

airtable
airtable-0.4.8.dist-info
...
lambda_function.py
...
requirements.txt

In my requirements.txt:

airtable-python-wrapper
airtable

Note: with lambda, dependencies need to be uploaded in the same .zip as the main function for the app to run with its dependencies.

Thank you for your help

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

3 participants