Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make_version.py exception 'str' object has no attribute 'decode' #7

Open
jinxiaoshu opened this issue Sep 16, 2023 · 13 comments
Open

Comments

@jinxiaoshu
Copy link

image
大佬,这个该如何解决
Boss, how can we solve this

@worawit
Copy link
Owner

worawit commented Sep 16, 2023

An error occurs in Dart make_version.py. I've never found this error.
Can you give me what Dart version is getting compiled.

@jinxiaoshu
Copy link
Author

image
this?

@jinxiaoshu
Copy link
Author

I just gave it a try and it is indeed a problem with Dart version. Dart version: 2.19.6 is acceptable

@worawit
Copy link
Owner

worawit commented Sep 17, 2023

Version 2.10.4 is too old for this project. I have no plan to support it.

From the error, I think it requires python 2.7 to run the script in Dart SDK project.
Even if you could build the SDK, I guess the blutter would not be compiled or run correctly.

@xiejiale123
Copy link

Dart version: 2.18.6, My mistake is the same as the one above. Is 2.18.6 unacceptable?

@uuyjp
Copy link

uuyjp commented Nov 22, 2023

I have solevd it by using other python which version is 3.11.

@Onekki
Copy link

Onekki commented Nov 22, 2023

I have the same issue with dart version 2.10.5

@Prince-cool
Copy link

meet same issue,how can i do for it?
image

@QAQQL
Copy link

QAQQL commented Jan 11, 2024

你可以修改以下代码
You can modify the following code

./blutter/dartsdk/v2.10.5/make_version.py
version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8'))
改为
change to
version = version.replace('{{COMMIT_TIME}}', version_time)

并根据报错的command手动执行一次编译
And manually execute a compilation according to the command that reported an error

 File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/make_version.py', '--output', 'runtime/vm/version.cc', '--input', 'runtime/vm/version_in.cc']' returned non-zero exit status 255.

例:
sample:

cd dartsdk/v2.10.5/
/usr/bin/python3 tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

继续执行你刚才的pyhton即可
and rerun your py command
python3 blutter.py ./arm64-v8a ./out

@Prince-cool
Copy link

你可以修改以下代码 You can modify the following code

./blutter/dartsdk/v2.10.5/make_version.py version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8')) 改为 change to version = version.replace('{{COMMIT_TIME}}', version_time)

并根据报错的command手动执行一次编译 And manually execute a compilation according to the command that reported an error

 File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/make_version.py', '--output', 'runtime/vm/version.cc', '--input', 'runtime/vm/version_in.cc']' returned non-zero exit status 255.

例: sample:

cd dartsdk/v2.10.5/
/usr/bin/python3 tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

继续执行你刚才的pyhton即可 and rerun your py command python3 blutter.py ./arm64-v8a ./out

my Dart version: 3.1.5, Snapshot: 7dbbeeb8ef7b91338640dca3927636de, Target: android arm64
image
it‘s replace right,but it wrong too

@QAQQL
Copy link

QAQQL commented Jan 11, 2024

你可以修改以下代码 You can modify the following code
./blutter/dartsdk/v2.10.5/make_version.py version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8')) 改为 change to version = version.replace('{{COMMIT_TIME}}', version_time)
并根据报错的command手动执行一次编译 And manually execute a compilation according to the command that reported an error

 File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/make_version.py', '--output', 'runtime/vm/version.cc', '--input', 'runtime/vm/version_in.cc']' returned non-zero exit status 255.

例: sample:

cd dartsdk/v2.10.5/
/usr/bin/python3 tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

继续执行你刚才的pyhton即可 and rerun your py command python3 blutter.py ./arm64-v8a ./out

my Dart version: 3.1.5, Snapshot: 7dbbeeb8ef7b91338640dca3927636de, Target: android arm64 image it‘s replace right,but it wrong too

请粘贴你报错的行数和提示
Please paste the number of lines you reported incorrectly and the prompt

@Prince-cool
Copy link

你可以修改以下代码 You can modify the following code
./blutter/dartsdk/v2.10.5/make_version.py version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8')) 改为 change to version = version.replace('{{COMMIT_TIME}}', version_time)
并根据报错的command手动执行一次编译 And manually execute a compilation according to the command that reported an error

 File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/make_version.py', '--output', 'runtime/vm/version.cc', '--input', 'runtime/vm/version_in.cc']' returned non-zero exit status 255.

例: sample:

cd dartsdk/v2.10.5/
/usr/bin/python3 tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

继续执行你刚才的pyhton即可 and rerun your py command python3 blutter.py ./arm64-v8a ./out

my Dart version: 3.1.5, Snapshot: 7dbbeeb8ef7b91338640dca3927636de, Target: android arm64 image it‘s replace right,but it wrong too

请粘贴你报错的行数和提示 Please paste the number of lines you reported incorrectly and the prompt

image

@QAQQL
Copy link

QAQQL commented Jan 14, 2024

你可以修改以下代码 You can modify the following code
./blutter/dartsdk/v2.10.5/make_version.py version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8')) 改为 change to version = version.replace('{{COMMIT_TIME}}', version_time)
并根据报错的command手动执行一次编译 And manually execute a compilation according to the command that reported an error

 File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/make_version.py', '--output', 'runtime/vm/version.cc', '--input', 'runtime/vm/version_in.cc']' returned non-zero exit status 255.

例: sample:

cd dartsdk/v2.10.5/
/usr/bin/python3 tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

继续执行你刚才的pyhton即可 and rerun your py command python3 blutter.py ./arm64-v8a ./out

my Dart version: 3.1.5, Snapshot: 7dbbeeb8ef7b91338640dca3927636de, Target: android arm64 image it‘s replace right,but it wrong too

请粘贴你报错的行数和提示 Please paste the number of lines you reported incorrectly and the prompt

image

你修改后是否执行了以下代码?
Did you execute the following code after modification?

cd ./dartsdk/v3.1.5
D:\\Program Files\\python39\\python.exe tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

参数请根据你的错误提示修改,目录请根据你实际目录修改。
Parameters Please modify according to your error prompt, directory Please modify according to your actual directory.

以上步骤为手动编译sdk,当你执行完这些,将跳过sdk重新下载并编译的步骤,这样会直接进行下一步
The above steps are for manually compiling the sdk. When you finish these steps, you will skip the step of re-downloading and compiling the sdk, which will proceed directly to the next step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants