The requested URL returned error:406 while accessing https

当IP超过匿名配额后,需通过Google授权访问Googlesource.com。步骤包括登录并授权,将信息追加到~/.netrc文件,执行初始化命令。确保顺利访问Googlesource平台。

 
"The requested URL returned error:406 while accessing https://...."

google了一下,原来是当某个ip超过匿名的配额后,就会被服务器拒绝,这是就需要用google授权访问,。
解决办法:
1.登录https://android.googlesource.com/new-password,并授权googlesource.com访问
2.点击允许授权后将得到

machine android.googlesource.com login git-<userName>.gmail.com password <password>
machine android-review.googlesource.com login git-<userName>.gmail.com password <password>

3.将这两行信息追加到~/.netrc 内(如果没有此文件创建追加进入即可)
4.执行:repo init -u https://android.googlesource.com/a/platform/manifest 

non zero exit code 1 Python 3.11.2 pip 22.3.1 from F:\ESP32-1\Espressif\python_env\idf5.5_py3.11_env\Lib\site-packages\pip (python 3.11) WARNING: The following issue occurred while accessing the ESP-IDF version file in the Python environment: [Errno 2] No such file or directory: 'F:\\ESP32-1\\Espressif\\python_env\\idf5.5_py3.11_env\\idf_version.txt'. (Diagnostic information. It can be ignored.) Downloading https://dl.espressif.com/dl/esp-idf/espidf.constraints.v5.5.txt Destination: F:\ESP32-1\Espressif\espidf.constraints.v5.5.txt.tmp 0% 100% Done Looking in indexes: http://mirrors.aliyun.com/pypi/simple/ Requirement already satisfied: pip in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (22.3.1) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. WARNING: There was an error checking the latest version of pip. Looking in indexes: http://mirrors.aliyun.com/pypi/simple/ Requirement already satisfied: setuptools in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (71.0.0) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. WARNING: There was an error checking the latest version of pip. Looking in indexes: http://mirrors.aliyun.com/pypi/simple/, https://dl.espressif.com/pypi Ignoring importlib_metadata: markers 'python_version < "3.8"' don't match your environment Requirement already satisfied: setuptools in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (from -r F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\requirements\requirements.core.txt (line 7)) (71.0.0) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. Requirement already satisfied: packaging in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (from -r F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\requirements\requirements.core.txt (line 8)) (25.0) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. Requirement already satisfied: click in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (from -r F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\requirements\requirements.core.txt (line 11)) (8.1.8) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. Requirement already satisfied: pyserial in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (from -r F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\requirements\requirements.core.txt (line 12)) (3.5) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. Requirement already satisfied: cryptography in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (from -r F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\requirements\requirements.core.txt (line 13)) (44.0.3) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. Requirement already satisfied: pyparsing in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (from -r F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\requirements\requirements.core.txt (line 14)) (3.2.3) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. Requirement already satisfied: pyelftools in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (from -r F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\requirements\requirements.core.txt (line 15)) (0.32) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. Requirement already satisfied: idf-component-manager~=2.2 in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (from -r F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\requirements\requirements.core.txt (line 16)) (2.2.2) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. Requirement already satisfied: esp-coredump in f:\esp32-1\espressif\python_env\idf5.5_py3.11_env\lib\site-packages (from -r F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\requirements\requirements.core.txt (line 17)) (1.14.0) WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. ERROR: Cannot install esptool because these package versions have conflicting dependencies. The conflict is caused by: The user requested esptool The user requested (constraint) esptool~=4.10.dev1 To fix this you could try to: 1. loosen the range of package versions you've specified 2. remove package versions to allow pip attempt to solve the dependency conflict ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'. [notice] A new release of pip available: 22.3.1 -> 23.3.1 [notice] To update, run: F:\ESP32-1\Espressif\python_env\idf5.5_py3.11_env\Scripts\python.exe -m pip install --upgrade pip Upgrading pip... Upgrading setuptools... Installing Python packages Constraint file: F:\ESP32-1\Espressif\espidf.constraints.v5.5.txt Requirement files: - F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\requirements\requirements.core.txt Traceback (most recent call last): File "F:\ESP32-1\Espressif\frameworks\esp-idf-v5.5\tools\idf_tools.py", line 3592, in <module> main(sys.argv[1:]) File "F:\ESP32-1\Espressif\frameworks\esp-idf-v5.5\tools\idf_tools.py", line 3582, in main action_func(args) File "F:\ESP32-1\Espressif\frameworks\esp-idf-v5.5\tools\idf_tools.py", line 2914, in action_install_python_env subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr, env=env_copy) File "subprocess.py", line 413, in check_call subprocess.CalledProcessError: Command '['F:\\ESP32-1\\Espressif\\python_env\\idf5.5_py3.11_env\\Scripts\\python.exe', '-m', 'pip', 'install', '--no-warn-script-location', '-r', 'F:/ESP32-1/Espressif/frameworks/esp-idf-v5.5/tools\\requirements\\requirements.core.txt', '--upgrade', '--constraint', 'F:\\ESP32-1\\Espressif\\espidf.constraints.v5.5.txt', '--extra-index-url', 'https://dl.espressif.com/pypi']' returned non-zero exit status 1.
最新发布
08-19
引用[1]: The requested URL returned error: 503 Service Unavailable。这个错误表示请求的URL返回了503错误,即服务不可用。这可能是由于服务器过载、维护或其他原因导致的。当服务器无法处理请求时,会返回503错误。 解决这个问题的方法有以下几种: 1. 检查URL是否正确:确保你输入的URL是正确的,并且没有任何拼写错误或其他错误。 2. 检查服务器状态:如果你确定URL是正确的,那么可能是服务器出现了问题。你可以尝试等待一段时间,然后再次尝试。如果问题仍然存在,你可以联系服务器管理员或技术支持团队以获取帮助。 3. 检查网络连接:确保你的网络连接正常。你可以尝试使用其他网络连接或设备来确认问题是否与你的网络有关。 4. 检查服务器配置:如果你是服务器管理员,你可以检查服务器的配置文件和日志,以查找可能导致503错误的问题。你可能需要调整服务器的配置或增加服务器资源来解决问题。 5. 使用备用URL或镜像站点:如果你无法解决503错误,你可以尝试使用备用URL或镜像站点来获取所需的内容。 以下是一个示例代码,演示了如何处理503错误: ```python import requests url = "https://example.com" try: response = requests.get(url) response.raise_for_status() print("Request successful!") except requests.exceptions.HTTPError as err: if response.status_code == 503: print("The requested URL returned error: 503 Service Unavailable") else: print("An HTTP error occurred:", err) except requests.exceptions.RequestException as err: print("An error occurred:", err) ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值