-
Notifications
You must be signed in to change notification settings - Fork 94
ModuleNotFoundError: No module named 'checker' #3
Comments
Do you have access to / can you try with python 2.x ? |
Sorry I forgot to mention, I tried 2 & 3 and it's all the same... Thanks |
Same here. Using windows and Python 3.6. |
Can you try with revision d488213 ? |
Ok I just pulled the latest from GIT, still having problem with python 2 & 3 ~ pts/0 foo ~/Build >cd /home/foo/Build/extract_android_ota_payload ~ pts/0 foo ~/Build/extract_android_ota_payload >python3 extract_android_ota_payload.py payload.bin /tmp ~ pts/0 foo ~/Build/extract_android_ota_payload >python extract_android_ota_payload.py payload.bin /tmp |
I think you need to install python-protobuf. Not sure what is the exact package name with Slackware... |
@cyxx It's just protobuf or protobuf3 like it's normally called; http://slackbuilds.org/repository/14.2/misc/protobuf3/ I hope I can use protobuf3 for python3? Do you know anything about this Google Test, Google's C++ test framework? Google on my phone is about all I can stomach, but I certainly don't want any Google installed into my box, that's a big no no for me. Does protobuf3 just use Google Test as a Compile Dependency? |
I have no idea why googletest is listed on that page. Can we close this ? The original issue should be fixed now. |
Sorry I should of just read the protobuf3 (Google's data interchange format) So yeah lots of Google here... Ok I installed protobuf3-3.5.2 and still more problems; python3 extract_android_ota_payload.py payload.bin /tmp Traceback (most recent call last): |
Looks like protobuf has a dependency on python-six. |
@cyxx Hi, ok, I'll look into that... By the way, when we get done, hopefully figuring this out, hehe, it would be great if you made up a |
You are right, I will update the README with the protobuf dependency. |
@cyxx Six installed, at first I installed by mistake for python2 LOL... New problem now...
|
It seems the protoc compiler used to generate the update_metadata_pb2 expects python 2.x for the runtime. I added a check to error out on any other version for now. I will look at how to support python 3.x or generate code for protobuf3 (different issue). |
@cyxx it's working for python2! :) ~/Build/extract_android_ota_payload >python extract_android_ota_payload.py payload.bin /tmp And /tmp shows the images! So it looks like the two things needed outside a typical distro are;
THANKS |
@cyxx hi, is there anyway to write the code, so that extract_android_ota_payload can be self-contained without the need to install any dependencies? I know these are only a couple of things, compiling and packaging them isn't the problem, I'd rather wish I could simply take the contents of the pkg for both protobuf & six and place them under the extract_android_ota_payload directory and let it look for everything it needs in it's own path and work. Or maybe you can simply supply protobuf & six to it, and make this work? If you could that would really be great! Thanks |
I understand the need but this might be a bit out of scope. |
Well I gave it a shot, so not sure if an issue with pyinstaller, or not liking the code/source of extract_android_ota_payload? When I then tried running it I get this; ./extract_android_ota_payload payload.bin This is odd, so not sure what's going on, because pkgutil is in python2 and python3... To do this, I just ran; I ran the command in the Hey look, I understand this is not your concern, but if you're into this, maybe you can play with pyinstaller and make extract_android_ota_payload into a self contained app. It's just fun Geek stuff to play around with, if you don't mind? Me I'm lost and have no idea with this now... LOL By the way I found this other source and I used the two python files and ran pyinstaller on them and I was able to make this work. Maybe you'll find this source of interest; https://gist.github.com/ius/42bd02a5df2226633a342ab7a9c60f15 Thanks |
I have no experience with pyinstaller myself but I will try to check this. Thanks a lot for sharing the gist. I was not aware of it, I wrote the tool as I did not find anything, I guess I did not look hard enough ! |
@cyxx you did a great job! But not sure why pyinstaller wasn't working on extract_android_ota_payload and worked on the other. |
Hi,
I'm running Slackware 14.2 x64 and I have python3 3.6.6 installed, and when I run the script I get this at the terminal;
Traceback (most recent call last):
File "extract_android_ota_payload.py", line 12, in
import update_payload
File "/home/foo/Downloads/update_payload/init.py", line 9, in
from checker import CHECKS_TO_DISABLE
ModuleNotFoundError: No module named 'checker'
I've noticed the command showing running it on a zip so I tried it that way too;
python3 extract_android_ota_payload.py CARBON-CR-6.1-NOCT-RELEASE-mata-20180811-0405.zip /home/foo/Downloads/CR
But then I also extracted the zip and ran the command on the payload.bin, I extracted the rom and placed the contents of extract_android_ota_payload in the same directory as below;
META-INF
README.md
care_map.txt
compatibility.zip
extract_android_ota_payload.py
payload.bin
payload_properties.txt
update_payload
But I get the same message;
Traceback (most recent call last):
File "extract_android_ota_payload.py", line 12, in
import update_payload
File "/home/foo/Downloads/CARBON-CR-6.1-NOCT-RELEASE-mata-20180811-0405/update_payload/init.py", line 9, in
from checker import CHECKS_TO_DISABLE
ModuleNotFoundError: No module named 'checker'
Thanks
The text was updated successfully, but these errors were encountered: