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

Langflow does not start in airgapped environment despite setting DO_NOT_TRACK=true #5327

Open
gaduffl opened this issue Dec 18, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@gaduffl
Copy link

gaduffl commented Dec 18, 2024

Bug Description

Langflow does not start in airgapped environment despite setting DO_NOT_TRACK=true
Also tried setting the variable in the .env file, same result.

Console input + error:

(langflow) C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow>set DO_NOT_TRACK=true
(langflow) C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow>uv run langflow run
[12/18/24 10:54:25] ERROR    2024-12-18 10:54:25 - ERROR    - version - Error fetching latest versionTraceback (most recent call last):           version.py:88
                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_transports\default.py", line 69, in map_httpcore_exceptions
                                 yield
                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_transports\default.py", line 233, in handle_request
                                 resp = self._pool.handle_request(req)
                                        |    |     |              -> <Request >
                                        |    |     -> <function ConnectionPool.handle_request at 0x000001CAE1EFF760>
                                        |    -> <ConnectionPool [Requests: 0 active, 0 queued | Connections: 0 active, 0 idle]>
                                        -> <httpx.HTTPTransport object at 0x000001CA9542AE30>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpcore\_sync\connection_pool.py", line 256, in handle_request
                                 raise exc from None

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpcore\_sync\connection_pool.py", line 236, in handle_request
                                 response = connection.handle_request(
                                            |          -> <function HTTPConnection.handle_request at 0x000001CAE1EFEB90>
                                            -> <HTTPConnection [CONNECTION FAILED]>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpcore\_sync\connection.py", line 101, in handle_request
                                 raise exc

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpcore\_sync\connection.py", line 78, in handle_request
                                 stream = self._connect(request)
                                          |    |        -> <Request >
                                          |    -> <function HTTPConnection._connect at 0x000001CAE1EFEC20>
                                          -> <HTTPConnection [CONNECTION FAILED]>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpcore\_sync\connection.py", line 124, in _connect
                                 stream = self._network_backend.connect_tcp(**kwargs)
                                          |    |                |             -> {'host': 'pypi.org', 'port': 443, 'local_address': None,
                             'timeout': 5.0, 'socket_options': None}
                                          |    |                -> <function SyncBackend.connect_tcp at 0x000001CAE19D8310>
                                          |    -> <httpcore.SyncBackend object at 0x000001CA954502B0>
                                          -> <HTTPConnection [CONNECTION FAILED]>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpcore\_backends\sync.py", line 207, in connect_tcp
                                 with map_exceptions(exc_map):
                                      |              -> {<class 'TimeoutError'>: <class 'httpcore.ConnectTimeout'>, <class 'OSError'>: <class
                             'httpcore.ConnectError'>}
                                      -> <function map_exceptions at 0x000001CAE19A7010>

                               File "C:\Prg64\python3.10.4\lib\contextlib.py", line 153, in __exit__
                                 self.gen.throw(typ, value, traceback)
                                 |    |   |     |    |      -> <traceback object at 0x000001CA94597140>
                                 |    |   |     |    -> gaierror(11001, 'getaddrinfo failed')
                                 |    |   |     -> <class 'socket.gaierror'>
                                 |    |   -> <method 'throw' of 'generator' objects>
                                 |    -> <generator object map_exceptions at 0x000001CA948AB4C0>
                                 -> <contextlib._GeneratorContextManager object at 0x000001CA954507C0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
                                 raise to_exc(exc) from exc
                                       -> <class 'httpcore.ConnectError'>

                             httpcore.ConnectError: [Errno 11001] getaddrinfo failed


                             The above exception was the direct cause of the following exception:



                             Traceback (most recent call last):

                               File "C:\Prg64\python3.10.4\lib\runpy.py", line 196, in _run_module_as_main
                                 return _run_code(code, main_globals, None,
                                        |         |     -> {'__name__': '__main__', '__doc__': None, '__package__': 'langflow', '__loader__':
                             <_frozen_importlib_external.SourceFileLoad...
                                        |         -> <code object <module> at 0x000001CADF4245B0, file "C:\Users\REDACTED_USER\OneDrive - 
                             Group\Project Eng\Code\langflow\.ven...
                                        -> <function _run_code at 0x000001CADEFCA3B0>

                               File "C:\Prg64\python3.10.4\lib\runpy.py", line 86, in _run_code
                                 exec(code, run_globals)
                                      |     -> {'__name__': '__main__', '__doc__': None, '__package__': 'langflow', '__loader__':
                             <_frozen_importlib_external.SourceFileLoad...
                                      -> <code object <module> at 0x000001CADF4245B0, file "C:\Users\REDACTED_USER\OneDrive\Project
                             Eng\Code\langflow\.ven...

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\langflow\__main__.py", line 611, in <module>
                                 main()
                                 -> <function main at 0x000001CA94965240>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\langflow\__main__.py", line 606, in main
                                 app()
                                 -> <typer.main.Typer object at 0x000001CAE4DDD3C0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\typer\main.py", line 323, in __call__
                                 return get_command(self)(*args, **kwargs)
                                        |           |      |       -> {}
                                        |           |      -> ()
                                        |           -> <typer.main.Typer object at 0x000001CAE4DDD3C0>
                                        -> <function get_command at 0x000001CAE2E7CB80>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\click\core.py", line 1157, in __call__
                                 return self.main(*args, **kwargs)
                                        |    |     |       -> {}
                                        |    |     -> ()
                                        |    -> <function TyperGroup.main at 0x000001CAE2E5DBD0>
                                        -> <TyperGroup >

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\typer\core.py", line 743, in main
                                 return _main(
                                        -> <function _main at 0x000001CAE2E5CF70>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\typer\core.py", line 198, in _main
                                 rv = self.invoke(ctx)
                                      |    |      -> <click.core.Context object at 0x000001CA9491BFD0>
                                      |    -> <function MultiCommand.invoke at 0x000001CAE12FAE60>
                                      -> <TyperGroup >

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\click\core.py", line 1688, in invoke
                                 return _process_result(sub_ctx.command.invoke(sub_ctx))
                                        |               |       |       |      -> <click.core.Context object at 0x000001CA9494A7A0>
                                        |               |       |       -> <function Command.invoke at 0x000001CAE12FA950>
                                        |               |       -> <TyperCommand run>
                                        |               -> <click.core.Context object at 0x000001CA9494A7A0>
                                        -> <function MultiCommand.invoke.<locals>._process_result at 0x000001CA949657E0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\click\core.py", line 1434, in invoke
                                 return ctx.invoke(self.callback, **ctx.params)
                                        |   |      |    |           |   -> {'env_file': '.env', 'host': None, 'workers': None, 'worker_timeout':
                             None, 'port': None, 'components_path': WindowsPath('C:/...
                                        |   |      |    |           -> <click.core.Context object at 0x000001CA9494A7A0>
                                        |   |      |    -> <function run at 0x000001CA949653F0>
                                        |   |      -> <TyperCommand run>
                                        |   -> <function Context.invoke at 0x000001CAE12F96C0>
                                        -> <click.core.Context object at 0x000001CA9494A7A0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\click\core.py", line 783, in invoke
                                 return __callback(*args, **kwargs)
                                                    |       -> {'env_file': '.env', 'host': None, 'workers': None, 'worker_timeout': None,
                             'port': None, 'components_path': WindowsPath('C:/...
                                                    -> ()

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\typer\main.py", line 698, in wrapper
                                 return callback(**use_params)
                                        |          -> {'host': None, 'workers': None, 'worker_timeout': None, 'port': None, 'components_path':
                             WindowsPath('C:/Users/REDACTED_USER/OneDri...
                                        -> <function run at 0x000001CA94964B80>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\langflow\__main__.py", line 215, in run
                                 run_on_windows(host, port, log_level, options, app)
                                 |              |     |     |          |        -> <fastapi.applications.FastAPI object at 0x000001CA9494B370>
                                 |              |     |     |          -> {'bind': '127.0.0.1:7860', 'workers': 1, 'timeout': 300}
                                 |              |     |     -> 'critical'
                                 |              |     -> 7860
                                 |              -> '127.0.0.1'
                                 -> <function run_on_windows at 0x000001CA94964D30>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\langflow\__main__.py", line 263, in run_on_windows
                                 print_banner(host, port)
                                 |            |     -> 7860
                                 |            -> '127.0.0.1'
                                 -> <function print_banner at 0x000001CA94965120>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\langflow\__main__.py", line 341, in print_banner
                                 notice = build_version_notice(langflow_version, package_name)
                                          |                    |                 -> 'Langflow'
                                          |                    -> '1.1.1'
                                          -> <function build_version_notice at 0x000001CA94964F70>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\langflow\__main__.py", line 307, in build_version_notice
                                 latest_version = fetch_latest_version(package_name, include_prerelease=langflow_is_pre_release(current_version))
                                                  |                    |                                |                       -> '1.1.1'
                                                  |                    |                                -> <function is_pre_release at
                             0x000001CA8E6E93F0>
                                                  |                    -> 'Langflow'
                                                  -> <function fetch_latest_version at 0x000001CA8E6E9C60>

                             > File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\langflow\utils\version.py", line 80, in fetch_latest_version
                                 response = httpx.get(f"https://pypi.org/pypi/{package_name}/json")
                                            |     -> <function get at 0x000001CAE2027A30>
                                            -> <module 'httpx' from 'C:\\Users\\REDACTED_USER\\OneDrive\\Project
                             Eng\\Code\\langflow\\.venv\\lib\\site-packages\...

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_api.py", line 198, in get
                                 return request(
                                        -> <function request at 0x000001CAE130D3F0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_api.py", line 106, in request
                                 return client.request(
                                        |      -> <function Client.request at 0x000001CAE2026440>
                                        -> <httpx.Client object at 0x000001CA9542ABF0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_client.py", line 827, in request
                                 return self.send(request, auth=auth, follow_redirects=follow_redirects)
                                        |    |    |             |                      -> False
                                        |    |    |             -> None
                                        |    |    -> <Request('GET', 'https://pypi.org/pypi/langflow/json')>
                                        |    -> <function Client.send at 0x000001CAE20265F0>
                                        -> <httpx.Client object at 0x000001CA9542ABF0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_client.py", line 914, in send
                                 response = self._send_handling_auth(
                                            |    -> <function Client._send_handling_auth at 0x000001CAE2026680>
                                            -> <httpx.Client object at 0x000001CA9542ABF0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_client.py", line 942, in _send_handling_auth
                                 response = self._send_handling_redirects(
                                            |    -> <function Client._send_handling_redirects at 0x000001CAE2026710>
                                            -> <httpx.Client object at 0x000001CA9542ABF0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_client.py", line 979, in _send_handling_redirects
                                 response = self._send_single_request(request)
                                            |    |                    -> <Request('GET', 'https://pypi.org/pypi/langflow/json')>
                                            |    -> <function Client._send_single_request at 0x000001CAE20267A0>
                                            -> <httpx.Client object at 0x000001CA9542ABF0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_client.py", line 1015, in _send_single_request
                                 response = transport.handle_request(request)
                                            |         |              -> <Request('GET', 'https://pypi.org/pypi/langflow/json')>
                                            |         -> <function HTTPTransport.handle_request at 0x000001CAE20243A0>
                                            -> <httpx.HTTPTransport object at 0x000001CA9542AE30>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_transports\default.py", line 232, in handle_request
                                 with map_httpcore_exceptions():
                                      -> <function map_httpcore_exceptions at 0x000001CAE19A5510>

                               File "C:\Prg64\python3.10.4\lib\contextlib.py", line 153, in __exit__
                                 self.gen.throw(typ, value, traceback)
                                 |    |   |     |    |      -> <traceback object at 0x000001CA9543D8C0>
                                 |    |   |     |    -> ConnectError(gaierror(11001, 'getaddrinfo failed'))
                                 |    |   |     -> <class 'httpcore.ConnectError'>
                                 |    |   -> <method 'throw' of 'generator' objects>
                                 |    -> <generator object map_httpcore_exceptions at 0x000001CA948AB3E0>
                                 -> <contextlib._GeneratorContextManager object at 0x000001CA954505E0>

                               File "C:\Users\REDACTED_USER\OneDrive\Project 
                             Eng\Code\langflow\.venv\lib\site-packages\httpx\_transports\default.py", line 86, in map_httpcore_exceptions
                                 raise mapped_exc(message) from exc
                                       |          -> '[Errno 11001] getaddrinfo failed'
                                       -> <class 'httpx.ConnectError'>

                             httpx.ConnectError: [Errno 11001] getaddrinfo failed
                             ╭─────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────╮
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpx\_transports\default.py:69 in map_httpcore_exceptions             │
                             │                                                                                                                  │
                             │    66 @contextlib.contextmanager                                                                                 │
                             │    67 def map_httpcore_exceptions() -> typing.Iterator[None]:                                                    │
                             │    68 │   try:                                                                                                   │
                             │ ❱  69 │   │   yield                                                                                              │
                             │    70 │   except Exception as exc:                                                                               │
                             │    71 │   │   mapped_exc = None                                                                                  │
                             │    72                                                                                                            │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpx\_transports\default.py:233 in handle_request                     │
                             │                                                                                                                  │
                             │   230 │   │   │   extensions=request.extensions,                                                                 │
                             │   231 │   │   )                                                                                                  │
                             │   232 │   │   with map_httpcore_exceptions():                                                                    │
                             │ ❱ 233 │   │   │   resp = self._pool.handle_request(req)                                                          │
                             │   234 │   │                                                                                                      │
                             │   235 │   │   assert isinstance(resp.stream, typing.Iterable)                                                    │
                             │   236                                                                                                            │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpcore\_sync\connection_pool.py:256 in handle_request                │
                             │                                                                                                                  │
                             │   253 │   │   │   │   closing = self._assign_requests_to_connections()                                           │
                             │   254 │   │   │                                                                                                  │
                             │   255 │   │   │   self._close_connections(closing)                                                               │
                             │ ❱ 256 │   │   │   raise exc from None                                                                            │
                             │   257 │   │                                                                                                      │
                             │   258 │   │   # Return the response. Note that in this case we still have to manage                              │
                             │   259 │   │   # the point at which the response is closed.                                                       │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpcore\_sync\connection_pool.py:236 in handle_request                │
                             │                                                                                                                  │
                             │   233 │   │   │   │                                                                                              │
                             │   234 │   │   │   │   try:                                                                                       │
                             │   235 │   │   │   │   │   # Send the request on the assigned connection.                                         │
                             │ ❱ 236 │   │   │   │   │   response = connection.handle_request(                                                  │
                             │   237 │   │   │   │   │   │   pool_request.request                                                               │
                             │   238 │   │   │   │   │   )                                                                                      │
                             │   239 │   │   │   │   except ConnectionNotAvailable:                                                             │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpcore\_sync\connection.py:101 in handle_request                     │
                             │                                                                                                                  │
                             │    98 │   │   │   │   │   │   )                                                                                  │
                             │    99 │   │   except BaseException as exc:                                                                       │
                             │   100 │   │   │   self._connect_failed = True                                                                    │
                             │ ❱ 101 │   │   │   raise exc                                                                                      │
                             │   102 │   │                                                                                                      │
                             │   103 │   │   return self._connection.handle_request(request)                                                    │
                             │   104                                                                                                            │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpcore\_sync\connection.py:78 in handle_request                      │
                             │                                                                                                                  │
                             │    75 │   │   try:                                                                                               │
                             │    76 │   │   │   with self._request_lock:                                                                       │
                             │    77 │   │   │   │   if self._connection is None:                                                               │
                             │ ❱  78 │   │   │   │   │   stream = self._connect(request)                                                        │
                             │    79 │   │   │   │   │                                                                                          │
                             │    80 │   │   │   │   │   ssl_object = stream.get_extra_info("ssl_object")                                       │
                             │    81 │   │   │   │   │   http2_negotiated = (                                                                   │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpcore\_sync\connection.py:124 in _connect                           │
                             │                                                                                                                  │
                             │   121 │   │   │   │   │   │   "socket_options": self._socket_options,                                            │
                             │   122 │   │   │   │   │   }                                                                                      │
                             │   123 │   │   │   │   │   with Trace("connect_tcp", logger, request, kwargs) as trace:                           │
                             │ ❱ 124 │   │   │   │   │   │   stream = self._network_backend.connect_tcp(**kwargs)                               │
                             │   125 │   │   │   │   │   │   trace.return_value = stream                                                        │
                             │   126 │   │   │   │   else:                                                                                      │
                             │   127 │   │   │   │   │   kwargs = {                                                                             │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpcore\_backends\sync.py:207 in connect_tcp                          │
                             │                                                                                                                  │
                             │   204 │   │   │   OSError: ConnectError,                                                                         │
                             │   205 │   │   }                                                                                                  │
                             │   206 │   │                                                                                                      │
                             │ ❱ 207 │   │   with map_exceptions(exc_map):                                                                      │
                             │   208 │   │   │   sock = socket.create_connection(                                                               │
                             │   209 │   │   │   │   address,                                                                                   │
                             │   210 │   │   │   │   timeout,                                                                                   │
                             │                                                                                                                  │
                             │ C:\Prg64\python3.10.4\lib\contextlib.py:153 in __exit__                                                          │
                             │                                                                                                                  │
                             │   150 │   │   │   │   # tell if we get the same exception back                                                   │
                             │   151 │   │   │   │   value = typ()                                                                              │
                             │   152 │   │   │   try:                                                                                           │
                             │ ❱ 153 │   │   │   │   self.gen.throw(typ, value, traceback)                                                      │
                             │   154 │   │   │   except StopIteration as exc:                                                                   │
                             │   155 │   │   │   │   # Suppress StopIteration *unless* it's the same exception that                             │
                             │   156 │   │   │   │   # was passed to throw().  This prevents a StopIteration                                    │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpcore\_exceptions.py:14 in map_exceptions                           │
                             │                                                                                                                  │
                             │   11 │   except Exception as exc:  # noqa: PIE786                                                                │
                             │   12 │   │   for from_exc, to_exc in map.items():                                                                │
                             │   13 │   │   │   if isinstance(exc, from_exc):                                                                   │
                             │ ❱ 14 │   │   │   │   raise to_exc(exc) from exc                                                                  │
                             │   15 │   │   raise  # pragma: nocover                                                                            │
                             │   16                                                                                                             │
                             │   17                                                                                                             │
                             ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
                             ConnectError: [Errno 11001] getaddrinfo failed

                             The above exception was the direct cause of the following exception:

                             ╭─────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────╮
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\langflow\utils\version.py:80 in fetch_latest_version                   │
                             │                                                                                                                  │
                             │   77 │                                                                                                           │
                             │   78 │   package_name = package_name.replace(" ", "-").lower()                                                   │
                             │   79 │   try:                                                                                                    │
                             │ ❱ 80 │   │   response = httpx.get(f"https://pypi.org/pypi/{package_name}/json")                                  │
                             │   81 │   │   versions = response.json()["releases"].keys()                                                       │
                             │   82 │   │   valid_versions = [v for v in versions if include_prerelease or not                                  │
                             │      is_pre_release(v)]                                                                                          │
                             │   83 │   │   if not valid_versions:                                                                              │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\httpx\_api.py:198  │
                             │ in get                                                                                                           │
                             │                                                                                                                  │
                             │   195 │   Note that the `data`, `files`, `json` and `content` parameters are not available                       │
                             │   196 │   on this function, as `GET` requests should not include a request body.                                 │
                             │   197 │   """                                                                                                    │
                             │ ❱ 198 │   return request(                                                                                        │
                             │   199 │   │   "GET",                                                                                             │
                             │   200 │   │   url,                                                                                               │
                             │   201 │   │   params=params,                                                                                     │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\httpx\_api.py:106  │
                             │ in request                                                                                                       │
                             │                                                                                                                  │
                             │   103 │   │   timeout=timeout,                                                                                   │
                             │   104 │   │   trust_env=trust_env,                                                                               │
                             │   105 │   ) as client:                                                                                           │
                             │ ❱ 106 │   │   return client.request(                                                                             │
                             │   107 │   │   │   method=method,                                                                                 │
                             │   108 │   │   │   url=url,                                                                                       │
                             │   109 │   │   │   content=content,                                                                               │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpx\_client.py:827 in request                                        │
                             │                                                                                                                  │
                             │    824 │   │   │   timeout=timeout,                                                                              │
                             │    825 │   │   │   extensions=extensions,                                                                        │
                             │    826 │   │   )                                                                                                 │
                             │ ❱  827 │   │   return self.send(request, auth=auth, follow_redirects=follow_redirects)                           │
                             │    828 │                                                                                                         │
                             │    829 │   @contextmanager                                                                                       │
                             │    830 │   def stream(                                                                                           │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpx\_client.py:914 in send                                           │
                             │                                                                                                                  │
                             │    911 │   │                                                                                                     │
                             │    912 │   │   auth = self._build_request_auth(request, auth)                                                    │
                             │    913 │   │                                                                                                     │
                             │ ❱  914 │   │   response = self._send_handling_auth(                                                              │
                             │    915 │   │   │   request,                                                                                      │
                             │    916 │   │   │   auth=auth,                                                                                    │
                             │    917 │   │   │   follow_redirects=follow_redirects,                                                            │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpx\_client.py:942 in _send_handling_auth                            │
                             │                                                                                                                  │
                             │    939 │   │   │   request = next(auth_flow)                                                                     │
                             │    940 │   │   │                                                                                                 │
                             │    941 │   │   │   while True:                                                                                   │
                             │ ❱  942 │   │   │   │   response = self._send_handling_redirects(                                                 │
                             │    943 │   │   │   │   │   request,                                                                              │
                             │    944 │   │   │   │   │   follow_redirects=follow_redirects,                                                    │
                             │    945 │   │   │   │   │   history=history,                                                                      │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpx\_client.py:979 in _send_handling_redirects                       │
                             │                                                                                                                  │
                             │    976 │   │   │   for hook in self._event_hooks["request"]:                                                     │
                             │    977 │   │   │   │   hook(request)                                                                             │
                             │    978 │   │   │                                                                                                 │
                             │ ❱  979 │   │   │   response = self._send_single_request(request)                                                 │
                             │    980 │   │   │   try:                                                                                          │
                             │    981 │   │   │   │   for hook in self._event_hooks["response"]:                                                │
                             │    982 │   │   │   │   │   hook(response)                                                                        │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpx\_client.py:1015 in _send_single_request                          │
                             │                                                                                                                  │
                             │   1012 │   │   │   )                                                                                             │
                             │   1013 │   │                                                                                                     │
                             │   1014 │   │   with request_context(request=request):                                                            │
                             │ ❱ 1015 │   │   │   response = transport.handle_request(request)                                                  │
                             │   1016 │   │                                                                                                     │
                             │   1017 │   │   assert isinstance(response.stream, SyncByteStream)                                                │
                             │   1018                                                                                                           │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpx\_transports\default.py:232 in handle_request                     │
                             │                                                                                                                  │
                             │   229 │   │   │   content=request.stream,                                                                        │
                             │   230 │   │   │   extensions=request.extensions,                                                                 │
                             │   231 │   │   )                                                                                                  │
                             │ ❱ 232 │   │   with map_httpcore_exceptions():                                                                    │
                             │   233 │   │   │   resp = self._pool.handle_request(req)                                                          │
                             │   234 │   │                                                                                                      │
                             │   235 │   │   assert isinstance(resp.stream, typing.Iterable)                                                    │
                             │                                                                                                                  │
                             │ C:\Prg64\python3.10.4\lib\contextlib.py:153 in __exit__                                                          │
                             │                                                                                                                  │
                             │   150 │   │   │   │   # tell if we get the same exception back                                                   │
                             │   151 │   │   │   │   value = typ()                                                                              │
                             │   152 │   │   │   try:                                                                                           │
                             │ ❱ 153 │   │   │   │   self.gen.throw(typ, value, traceback)                                                      │
                             │   154 │   │   │   except StopIteration as exc:                                                                   │
                             │   155 │   │   │   │   # Suppress StopIteration *unless* it's the same exception that                             │
                             │   156 │   │   │   │   # was passed to throw().  This prevents a StopIteration                                    │
                             │                                                                                                                  │
                             │ C:\Users\REDACTED_USER\OneDrive\Project                                                              │
                             │ Eng\Code\langflow\.venv\lib\site-packages\httpx\_transports\default.py:86 in map_httpcore_exceptions             │
                             │                                                                                                                  │
                             │    83 │   │   │   raise                                                                                          │
                             │    84 │   │                                                                                                      │
                             │    85 │   │   message = str(exc)                                                                                 │
                             │ ❱  86 │   │   raise mapped_exc(message) from exc                                                                 │
                             │    87                                                                                                            │
                             │    88                                                                                                            │
                             │    89 HTTPCORE_EXC_MAP = {                                                                                       │
                             ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
                             ConnectError: [Errno 11001] getaddrinfo failed
╭───────────────────────────────────────────────────────────────────╮
│ Welcome to ⛓ Langflow                                             │
│                                                                   │
│                                                                   │
│ Collaborate, and contribute at our GitHub Repo 🌟                 │
│                                                                   │
│ We collect anonymous usage data to improve Langflow.              │
│ You can opt-out by setting DO_NOT_TRACK=true in your environment. │
│                                                                   │
│ Access http://127.0.0.1:7860                                      │
╰───────────────────────────────────────────────────────────────────╯
Starting Langflow v1.1.1...
Exception in thread Thread-6 (_fetch_latest_version):
Traceback (most recent call last):
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\urllib3\connection.py", line 199, in _new_conn
    sock = connection.create_connection(
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\urllib3\util\connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "C:\Prg64\python3.10.4\lib\socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\urllib3\connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\urllib3\connectionpool.py", line 490, in _make_request   
    raise new_e
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\urllib3\connectionpool.py", line 466, in _make_request   
    self._validate_conn(conn)
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\urllib3\connectionpool.py", line 1095, in _validate_conn 
    conn.connect()
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\urllib3\connection.py", line 693, in connect
    self.sock = sock = self._new_conn()
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\urllib3\connection.py", line 206, in _new_conn
    raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x000001CA9ED4CA00>: Failed to resolve 'pypi.org' ([Errno 11001] getaddrinfo failed)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\requests\adapters.py", line 667, in send
    resp = conn.urlopen(
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\urllib3\connectionpool.py", line 843, in urlopen
    retries = retries.increment(
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\urllib3\util\retry.py", line 519, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/composio-core/json (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001CA9ED4CA00>: Failed to resolve 'pypi.org' ([Errno 11001] getaddrinfo failed)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Prg64\python3.10.4\lib\threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "C:\Prg64\python3.10.4\lib\threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\composio\utils\warnings.py", line 18, in _fetch_latest_version
    request = requests.get(COMPOSIO_PYPI_METADATA, timeout=10.0)
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\requests\api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\requests\sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\REDACTED_USER\OneDrive\Project Eng\Code\langflow\.venv\lib\site-packages\requests\adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/composio-core/json (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001CA9ED4CA00>: Failed to resolve 'pypi.org' ([Errno 11001] getaddrinfo failed)"))

Reproduction

Steps to reproduce:

  1. Disconnect from network
  2. set DO_NOT_TRACK=true
  3. start langflow using uv or python

Expected behavior

Langflow should start without internet connection if DO_NOT_TRACK=true

Who can help?

No response

Operating System

Windows 10

Langflow Version

1.1.1

Python Version

3.10

Screenshot

No response

Flow File

No response

@gaduffl gaduffl added the bug Something isn't working label Dec 18, 2024
Copy link

dosubot bot commented Dec 18, 2024

Hey @gaduffl! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this together!

A similar issue was previously reported where Langflow failed to start without an internet connection due to a version checking process that attempts to fetch data from PyPI. The suggested solution involves modifying the code to handle the absence of an internet connection gracefully. Specifically, you can wrap the network request in a try-except block to catch exceptions and log a warning instead of failing to start [1].

To address this issue, you might consider modifying the fetch_latest_version function in the version.py file to include a try-except block around the HTTP request. This would prevent the application from crashing when it cannot reach PyPI due to the lack of an internet connection.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@gaduffl
Copy link
Author

gaduffl commented Dec 18, 2024

@dosu The change mentioned by you was already merged

Copy link

dosubot bot commented Dec 18, 2024

If the change has already been merged, ensure that you have the latest version of the code. You might need to update your local repository to include the latest changes. If the issue persists even after updating, it could be helpful to check if there are any additional configurations or environment variables that need to be set for the airgapped environment. Additionally, reviewing the logs for any other errors or warnings might provide more insight into the problem. If everything seems correct and the issue continues, consider reaching out to the maintainers for further assistance.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant