Return argument type bytes1 is not implicitly convertible to expected type (type of first return variable) bytes memory.
时间: 2023-05-17 21:07:45 浏览: 92
这个错误提示意味着你尝试将一个 bytes1 类型的参数转换为 bytes memory 类型,但是这两种类型并不兼容。你需要修改代码以确保返回值的类型与函数声明中的类型匹配。可能需要使用类型转换或者重新设计函数的返回值。
相关问题
Plain typing.NoReturn is not valid as type argument怎么解决
要解决Plain typing.NoReturn is not valid as type argument错误,可以按照以下步骤进行:
1. 首先,根据引用中的描述,该错误通常是由Python版本过低引起的。因此,需要将Python升级到较高的版本。如果你使用的是anaconda环境,可以使用conda命令进行升级。具体的命令是:conda install python==3.7.2。
2. 当执行升级命令时,可能会出现“Proceed ([y]/n)?”的提示。你需要输入y,并按回车键确认。
3. 当看到“Executing transaction: done”时,表示升级成功。此时再次执行产生错误的操作,就不会再出现Plain typing.NoReturn is not valid as type argument的错误了。
请注意,以上解决方案是基于Python版本过低导致的错误。如果你在安装其他Python库时遇到相同的错误,也可以尝试使用相同的解决方案。希望这能帮助到你解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [【Python】处理TypeError: Plain typing.NoReturn is not valid as type argument](https://blog.csdn.net/weixin_43896318/article/details/126446332)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [TypeError: Plain typing.NoReturn is not valid as type argument解决方案](https://blog.csdn.net/weixin_43178406/article/details/132054244)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [2009 达内Unix学习笔记](https://download.csdn.net/download/lq_1987/2058996)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
Argument of type 'any' is not assignable to parameter of type 'never'.
这个错误通常出现在 TypeScript 中,它表示你试图将一个类型为 `any` 的值赋给一个类型为 `never` 的参数或变量。`never` 表示不可能出现的值,因此不能将任何值赋给它。
解决这个问题的方法是检查代码中的类型声明和类型推断,并尽可能地明确类型。如果你使用了第三方库或 API,可以查看它们的类型声明文件,以便更好地将其与你的代码集成。另外,在使用 `never` 类型时,确保它只出现在函数返回类型或其他特定的上下文中。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)