Return argument type bytes1 is not implicitly convertible to expected type (type of first return variable) bytes memory.
时间: 2023-05-17 08:07:44 浏览: 151
这个错误提示表明函数返回的类型是 bytes1,但是函数定义中第一个返回变量的类型是 bytes memory,这两个类型不兼容。需要修改函数定义或者返回值类型,使它们匹配。具体的修改方法需要根据具体的代码情况来确定。
相关问题
join() argument must be str or bytes, not 'list'
This error occurs when you try to use the `join()` method with a list as an argument. The `join()` method can only be used with strings or bytes, not with a list.
To fix this error, you need to convert the list to a string or byte object before using the `join()` method. For example:
```
my_list = ['a', 'b', 'c']
my_string = ''.join(my_list)
print(my_string)
```
Output:
```
'abc'
```
In this example, we first create a list `my_list` with three elements. We then convert the list to a string using the `join()` method and store the result in a variable `my_string`. Finally, we print the value of `my_string` which is `'abc'`.
阅读全文