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

How to fix these many errors? #1586

Open
computer2s opened this issue Jan 17, 2025 · 3 comments
Open

How to fix these many errors? #1586

computer2s opened this issue Jan 17, 2025 · 3 comments

Comments

@computer2s
Copy link

computer2s commented Jan 17, 2025

How to fix these errors:

          "
          Alembic mode:  online
          Traceback (most recent call last):
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 146, in __init__
              self._dbapi_connection = engine.raw_connection()
                                       ^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3302, in raw_connection
              return self.pool.connect()
                     ^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 449, in connect
              return _ConnectionFairy._checkout(self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 1263, in _checkout
              fairy = _ConnectionRecord.checkout(pool)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 712, in checkout
              rec = pool._do_get()
                    ^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 308, in _do_get
              return self._create_connection()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection
              return _ConnectionRecord(self)
                     ^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 674, in __init__
              self.__connect()
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 900, in __connect
              with util.safe_reraise():
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
              raise exc_value.with_traceback(exc_tb)
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 896, in __connect
              self.dbapi_connection = connection = pool._invoke_creator(self)
                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 643, in connect
              return dialect.connect(*cargs, **cparams)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 621, in connect
              return self.loaded_dbapi.connect(*cargs, **cparams)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/psycopg/connection.py", line 748, in connect
              raise last_ex.with_traceback(None)
          psycopg.OperationalError: connection failed: Connection refused
                  Is the server running on that host and accepting TCP/IP connections?
          
          The above exception was the direct cause of the following exception:
          
          Traceback (most recent call last):
            File "/usr/local/bin/alembic", line 8, in <module>
              sys.exit(main())
                       ^^^^^^
            File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 636, in main
              CommandLine(prog=prog).main(argv=argv)
            File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 626, in main
              self.run_cmd(cfg, options)
            File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 603, in run_cmd
              fn(
            File "/usr/local/lib/python3.11/site-packages/alembic/command.py", line 406, in upgrade
              script.run_env()
            File "/usr/local/lib/python3.11/site-packages/alembic/script/base.py", line 586, in run_env
              util.load_python_file(self.dir, "env.py")
            File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file
              module = load_module_py(module_id, path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py
              spec.loader.exec_module(module)  # type: ignore
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "<frozen importlib._bootstrap_external>", line 940, in exec_module
            File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
            File "/app/alembic/env.py", line 81, in <module>
              run_migrations_online()
            File "/app/alembic/env.py", line 70, in run_migrations_online
              with connectable.connect() as connection:
                   ^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3278, in connect
              return self._connection_cls(self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 148, in __init__
              Connection._handle_dbapi_exception_noconnection(
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2442, in _handle_dbapi_exception_noconnection
              raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 146, in __init__
              self._dbapi_connection = engine.raw_connection()
                                       ^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3302, in raw_connection
              return self.pool.connect()
                     ^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 449, in connect
              return _ConnectionFairy._checkout(self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 1263, in _checkout
              fairy = _ConnectionRecord.checkout(pool)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 712, in checkout
              rec = pool._do_get()
                    ^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 308, in _do_get
              return self._create_connection()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection
              return _ConnectionRecord(self)
                     ^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 674, in __init__
              self.__connect()
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 900, in __connect
              with util.safe_reraise():
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
              raise exc_value.with_traceback(exc_tb)
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 896, in __connect
              self.dbapi_connection = connection = pool._invoke_creator(self)
                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 643, in connect
              return dialect.connect(*cargs, **cparams)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 621, in connect
              return self.loaded_dbapi.connect(*cargs, **cparams)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.11/site-packages/psycopg/connection.py", line 748, in connect
              raise last_ex.with_traceback(None)
          sqlalchemy.exc.OperationalError: (psycopg.OperationalError) connection failed: Connection refused
                  Is the server running on that host and accepting TCP/IP connections?
          (Background on this error at: https://sqlalche.me/e/20/e3q8)"

when using docker run to run a local image?

Thanks a lot.

@wintonzheng
Copy link
Contributor

wintonzheng commented Jan 17, 2025

Curious how you run the image?

https://github.com/Skyvern-AI/skyvern?tab=readme-ov-file#docker-compose-setup-recommended

Skyvern instance along doesn't work. it needs to connect to a relational database (we use python sqlalchemy and a default postgres db image to power it). that's why we recommend running it with the docker compose command.

If you would like to run the skyvern image with docker run, pls make sure to set up these environment variables correctly at least: https://github.com/Skyvern-AI/skyvern/blob/main/docker-compose.yml#L33-L37

@computer2s
Copy link
Author

Curious how you run the image?

https://github.com/Skyvern-AI/skyvern?tab=readme-ov-file#docker-compose-setup-recommended

Skyvern instance along doesn't work. it needs to connect to a relational database (we use python sqlalchemy and a default postgres db image to power it). that's why we recommend running it with the docker compose command.

If you would like to run the skyvern image with docker run, pls make sure to set up these environment variables correctly at least: https://github.com/Skyvern-AI/skyvern/blob/main/docker-compose.yml#L33-L37

Thank you for your prompt reply.

However, how can one change the values of any variable in the "image: public.ecr.aws/skyvern/skyvern-ui:latest" if following your recommendation of "running it with the docker compose command"?

Thank you!

@universe2jouney
Copy link

Curious how you run the image?
https://github.com/Skyvern-AI/skyvern?tab=readme-ov-file#docker-compose-setup-recommended
Skyvern instance along doesn't work. it needs to connect to a relational database (we use python sqlalchemy and a default postgres db image to power it). that's why we recommend running it with the docker compose command.
If you would like to run the skyvern image with docker run, pls make sure to set up these environment variables correctly at least: https://github.com/Skyvern-AI/skyvern/blob/main/docker-compose.yml#L33-L37

How can one change the values of any variable in the "image: public.ecr.aws/skyvern/skyvern-ui:latest"? Thanks.

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