UVa11751 - Installing Diagnostic Software

面对老旧网络设备及线路问题,本文介绍了一种通过安装特定软件来有效监控并及时响应网络故障的方法。通过对网络节点进行合理选择,确保每条线路至少被一个端点监控,同时最小化软件安装总成本。

Problem J: Installing Diagnostic Software

You have recently been appointed as the administrator for a wired network of devices. Unfortunately, your predecessor used very poor quality lines to connect the devices. The board of executives is currently deciding if they want to fund an upgrade to a wireless network, or simply replace the existing wires with ones of better quality. As expected, this decision is being weighed down with bureaucratic nonsense; it looks like it will take some time before anything is approved.

Meanwhile, you still have to deal with the problem at hand. You have access to an antiquated version of Newton Network Monitor which is a software package that, once installed on a machine, will monitor all lines connected to that machine and immediately alert the user when a line has failed. This should help reduce your response time to any failures.

Your task is to install the software on some machines so each line is being monitored by at least one of its endpoint devices. For various technical reasons, the time it takes to install the software varies from device to device so you want to minimize the total amount of time spent installing the software. You cannot install on more than one machine at a time (since you only have one copy of the software) meaning the total time spent installing the software is exactly the sum of the installation times on each machine.

Input Format

Each input case begins with two numbers n,m with 1 ≤ n ≤ 1,000 and 0 ≤ m ≤ 25,000. Following this are m pairs of distinct integers between 0 and n-1 which describe a wire connecting the two devices. The time spent installing the software on machine numbered i is 2i. The input is terminated with n = m = 0; this should not be processed.

Output Format

For each input case, there is to be one line of output containing a sequence of n bits with no spaces. The i'th bit is 1 if the software is installed on machine i, and 0 if not.

Sample Input

3 2
0 2
1 2
3 1
1 2
0 0

Sample Output

110
010

Zachary Friggstad

题目大意是给你n个点m条边,要你在每条边上的两个点至少有一个点装上一个软件,每个点的编号是0~n-1,花费是 2i

让你安排一种方案使花费最小

贪心的策略为从编号大的开始遍历  如果它的儿子不是树枝,那么就不取它,直接取它的儿子(根据二进制的大小关系)



#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
const int maxn = 1000+10;
struct line{
    int from,to;
    line(int from ,int to):from(from),to(to){}
    friend bool operator <(line a,line b){
        if(a.from != b.from) return a.from > b.from;
        else   return a.to < b.to;
    }
};
vector<line> vl;
vector<int> g[maxn];
int n,m;
bool vis[maxn];

int main(){

    while(cin >> n >> m && n+m){
        vl.clear();
        memset(vis,0,sizeof vis);
        while(m--){
            int a,b;
            cin >> a >> b;
            if(a < b) swap(a,b);
            vl.push_back(line(a,b));
        }
        sort(vl.begin(),vl.end());
        for(int i  = 0; i < n; i++) g[i].clear();
        for(int i = 0; i < vl.size(); ){
             int t = vl[i].from,j=i;
             while(vl[j].from == t&&j<vl.size()){
                    g[t].push_back(vl[j].to);
                    g[vl[j].to].push_back(t);
                    j++;
             }
             i = j;
        }
        for(int i = n-1; i >= 0; i--){
            bool flag = 0;
            if(vis[i]) continue;
            for(int k = 0; k < g[i].size(); k++){
                if(g[g[i][k]].size()==0){
                    flag = 1;
                    break;
                }
            }
            if(flag)  vis[i] = 1;
            else{
                for(int k = 0; k < g[i].size(); k++)
                    vis[g[i][k]]  = 1;
            }
        }
        for(int i = 0; i < n; i++)
            cout<<vis[i];
        cout<<endl;
    }
    return 0;
}


The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 1164│ try: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 1165│ if buffer is not None: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: → 1166│ return self._sslobj.read(len, buffer) - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 1167│ else: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 1168│ return self._sslobj.read(len) - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 1169│ except SSLError as x: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: The following error occurred when trying to handle this error: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: ReadTimeoutError - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/site-packages/urllib3/response.py:759 in _error_catcher - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 755│ - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 756│ except SocketTimeout as e: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 757│ # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 758│ # there is yet no clean way to get at it from this context. - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: → 759│ raise ReadTimeoutError(self._pool, None, "Read timed out.") from e # type: ignore[arg-type] - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 760│ - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 761│ except BaseSSLError as e: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 762│ # FIXME: Is there a better way to differentiate between SSLErrors? - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 763│ if "read operation timed out" not in str(e): - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: The following error occurred when trying to handle this error: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: ConnectionError - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/site-packages/requests/models.py:826 in generate - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 822│ raise ConnectionError(e) - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 823│ except SSLError as e: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 824│ raise RequestsSSLError(e) - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 825│ else: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: → 826│ # Standard file-like object. - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 827│ while True: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 828│ chunk = self.raw.read(chunk_size) - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 829│ if not chunk: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: 830│ break - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: Cannot install multidict. - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: - Installing opentelemetry-api (1.27.0) - Downgrading packaging (25.0 -> 24.2) - Installing propcache (0.3.1) - Installing proto-plus (1.26.1) - Installing pydantic-core (2.23.4): Failed TimeoutError The read operation timed out at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/ssl.py:1166 in read 1162│ if self._sslobj is None: 1163│ raise ValueError("Read on closed or unwrapped SSL socket.") 1164│ try: 1165│ if buffer is not None: → 1166│ return self._sslobj.read(len, buffer) 1167│ else: 1168│ return self._sslobj.read(len) 1169│ except SSLError as x: 1170│ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: The following error occurred when trying to handle this error: ReadTimeoutError HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/site-packages/urllib3/response.py:759 in _error_catcher 755│ 756│ except SocketTimeout as e: 757│ # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but 758│ # there is yet no clean way to get at it from this context. → 759│ raise ReadTimeoutError(self._pool, None, "Read timed out.") from e # type: ignore[arg-type] 760│ 761│ except BaseSSLError as e: 762│ # FIXME: Is there a better way to differentiate between SSLErrors? 763│ if "read operation timed out" not in str(e): The following error occurred when trying to handle this error: ConnectionError HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. at ~/shared-nvme/miniconda3/envs/dify/lib/python3.11/site-packages/requests/models.py:826 in generate 822│ raise ConnectionError(e) 823│ except SSLError as e: 824│ raise RequestsSSLError(e) 825│ else: → 826│ # Standard file-like object. 827│ while True: 828│ chunk = self.raw.read(chunk_size) 829│ if not chunk: 830│ break Cannot install pydantic-core. - Installing pyyaml (6.0.2) - Installing referencing (0.36.2) - Downgrading requests (2.32.3 -> 2.31.0) - Installing six (1.17.0) - Installing tqdm (4.67.1) (dify) root@p-03bc3295a0a9-ackcs-00gjelba:~/shared-nvme/dify/api#
最新发布
05-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值