mikeizbicki / cmc-csci143

big data course materials
40 stars 76 forks source link

Denormalized Code not Passing on GitHub but Passes on Lambda Server. #487

Closed echen4628 closed 7 months ago

echen4628 commented 7 months ago

Did anyone run into an issue with github actions for the normalized case? My code seems to pass all the tests on the lambda server, but when i commit to github, I'm getting the following error.

twitter_postgres_pg_normalized_1
load normalized
2024-04-05 00:49:09.393231 test-data.zip
Traceback (most recent call last):
  File "/home/runner/work/twitter_postgres/twitter_postgres/load_tweets.py", line 461, in <module>
    insert_tweet(connection,tweet)
  File "/home/runner/work/twitter_postgres/twitter_postgres/load_tweets.py", line 106, in insert_tweet
    with connection.begin() as trans:
  File "/home/runner/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 868, in begin
    raise exc.InvalidRequestError(
sqlalchemy.exc.InvalidRequestError: This connection has already initialized a SQLAlchemy Transaction() object via begin() or autobegin; can't call begin() here unless rollback() or commit() is called first.

(The denormalized case passes on github actions). Thanks!

epaisano commented 7 months ago

Take a look at the pinned issue! It explains how to solve that problem.