首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >https://rinkeby.infura.io/v3/$WEB3_INFURA_PROJECT_ID : HTTPError: 401客户端错误:未经授权的url: HTTPError

https://rinkeby.infura.io/v3/$WEB3_INFURA_PROJECT_ID : HTTPError: 401客户端错误:未经授权的url: HTTPError
EN

Ethereum用户
提问于 2022-07-05 07:00:30
回答 1查看 74关注 0票数 0

在运行脚本时,我将遵循Patrick的坚实教程:

代码语言:javascript
复制
brownie run scripts/1_deploy_token.py --network rinkeby

我知道这个错误:

代码语言:javascript
复制
INFO: Could not find files for the given pattern(s).
Brownie v1.16.4 - Python development framework for Ethereum

Python-dotenv could not parse statement starting at line 1
Python-dotenv could not parse statement starting at line 2
Python-dotenv could not parse statement starting at line 4
Python-dotenv could not parse statement starting at line 5
Python-dotenv could not parse statement starting at line 7
Python-dotenv could not parse statement starting at line 8
Python-dotenv could not parse statement starting at line 9
Python-dotenv could not parse statement starting at line 1
Python-dotenv could not parse statement starting at line 2
Python-dotenv could not parse statement starting at line 4
Python-dotenv could not parse statement starting at line 5
Python-dotenv could not parse statement starting at line 7
Python-dotenv could not parse statement starting at line 8
Python-dotenv could not parse statement starting at line 9
Erc20TokenProject is the active project.

Running 'scripts\1_deploy_token.py::main'...
  File "C:\Users\Dev, line line, in in
    return_value, frame = run(
  File "C:\Users\Dev, line line, in in
    return_value = f_locals[method_name](*args, **kwargs)
  File ".\scripts\1_deploy_token.py", line 10, in main
    our_token = OurToken.deploy(initial_supply, {"from": account})
  File "C:\Users\Dev, line line, in in
    return tx["from"].deploy(
  File "C:\Users\Dev, line line, in in
    receipt, exc = self._make_transaction(
  File "C:\Users\Dev, line line, in in
    gas_price, gas_strategy, gas_iter = self._gas_price(gas_price)
  File "C:\Users\Dev, line line, in in
    return web3.eth.generate_gas_price(), None, None
  File "C:\Users\Dev, line line, in in
    return self._generate_gas_price(transaction_params)
  File "C:\Users\Dev, line line, in in
    return self.gasPriceStrategy(self.web3, transaction_params)
  File "C:\Users\Dev, line line, in in
    return web3.manager.request_blocking(RPC.eth_gasPrice, [])
  File "C:\Users\Dev, line line, in in
    response = self._make_request(method, params)
  File "C:\Users\Dev, line line, in in
    return request_func(method, params)
  File "cytoolz\functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
  File "C:\Users\Dev, line line, in in
    response = make_request(method, params)
  File "C:\Users\Dev, line line, in in
    return make_request(method, params)
  File "cytoolz\functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
  File "C:\Users\Dev, line line, in in
    response = make_request(method, params)
  File "C:\Users\Dev, line line, in in
    response = make_request(method, params)
  File "cytoolz\functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
  File "C:\Users\Dev, line line, in in
    response = make_request(method, params)
  File "cytoolz\functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
  File "C:\Users\Dev, line line, in in
    response = make_request(method, params)
  File "cytoolz\functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
  File "C:\Users\Dev, line line, in in
    response = make_request(method, params)
  File "C:\Users\Dev, line line, in in
    return make_request(method, params)
  File "C:\Users\Dev, line line, in in
    return make_request(method, params)
  File "C:\Users\Dev, line line, in in
    raw_response = make_post_request(
  File "C:\Users\Dev, line line, in in
    response.raise_for_status()
  File "C:\Users\Dev, line line, in in
    raise HTTPError(http_error_msg, response=self)
HTTPError: 401 Client Error: Unauthorized for url: https://rinkeby.infura.io/v3/$WEB3_INFURA_PROJECT_ID

我从上面的url中编辑了愤怒的id,但是在错误中显示在url中的id与我的.env文件中的id不同。该怎么办呢。

EN

回答 1

Ethereum用户

发布于 2022-07-06 05:10:10

在您的WEB3_INFURA_PROJECT_ID文件中提供的值( .env )似乎有问题,请检查

  • 提供的键或值中有任何错误。
  • .env文件中有任何空行(如果是,请删除它们)
票数 2
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/131205

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档