Process 'command 'C:/Users/xxxx/python.exe'' finished with non-zero exit value 1

Viewed 234

Good morning,

I'm developing a chatbot in android studio and I'm integrating a python script into my bot. it was working fine using chaquopy, but then after I changed my application name, the whole project stopped working and it's giving me this error:

Build failed (with 1 error)

:clean (ok)

:app:clean (ok)

:app:preBuild (ok)

:app:preDebugBuild (ok)

:app:compileDebugAidl (ok)

:app:compileDebugRenderscript (ok)

:app:generateDebugBuildConfig (ok)

:app:extractPythonBuildPackages (ok)

:app:generateDebugPythonRequirements
Process 'command 'C:/Users/ashlibek/AppData/Local/Programs/Python/Python38/python.exe'' 
finished with non-zero exit value 1

Logcat is really long, and I couldn't figure out what is wrong from:

2021-03-20 09:02:44.558 7052-32520/? E/memtrack: Couldn't load memtrack module
2021-03-20 09:02:51.529 14219-15679/? E/msgr.msys: E[N rtchannel]_rt_mqtt_publish_callback(356)=>Failed to publish the request over MQTT. token:624691b3-7763-4912-ac36-fcda5324bd31, category:mcd-sync-data-task-category, requestId:11634, error:Error Domain=mqtt Code=3008
2021-03-20 09:02:51.538 14219-15679/? E/msgr.msys: E[N rtchannel]_rt_mqtt_publish_callback(356)=>Failed to publish the request over MQTT. token:d99da418-336b-452c-a712-6767184383f1, category:mcd-sync-data-task-category, requestId:14139, error:Error Domain=mqtt Code=3008
2021-03-20 09:02:51.539 14219-15669/? E/msgr.msys: E[S sync]_createResponseError(166)=>Network Response 624691b3-7763-4912-ac36-fcda5324bd31 contains sync error Error Domain=mqtt Code=3008 - Underlying error (null): Error Domain=mqtt Code=3008
2021-03-20 09:02:51.546 14219-15669/? E/msgr.msys: E[S sync]_createResponseError(166)=>Network Response d99da418-336b-452c-a712-6767184383f1 contains sync error Error Domain=mqtt Code=3008 - Underlying error (null): Error Domain=mqtt Code=3008
2021-03-20 09:02:54.296 4289-4348/? E/Watchdog: !@Sync 5646 [2021-03-20 09:02:54.295] FD count : 586
2021-03-20 09:03:00.005 5119-5119/? E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted
2021-03-20 09:03:00.040 5119-5119/? E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted
2021-03-20 09:03:19.903 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.905 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:19.927 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:19.930 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.943 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.946 4289-4504/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:19.949 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.955 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.958 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:19.972 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:19.969 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.974 19644-32531/? E/libc: Access denied finding property "net.dns1"
2021-03-20 09:03:19.974 19644-32531/? E/libc: Access denied finding property "net.dns2"
2021-03-20 09:03:19.975 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.979 3802-4025/? E/Netd: getNetworkForDns: getNetId from enterpriseCtrl is netid 0
2021-03-20 09:03:19.988 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.990 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.004 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.022 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.026 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.036 4289-4560/? E/NetdEventListenerService: handleMessage: { when=-1ms what=10001 obj=com.android.server.connectivity.NetdEventListenerService$DnsResultParams@968a043 target=com.android.server.connectivity.NetdEventListenerService$DnsEventHandler }
2021-03-20 09:03:20.048 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.050 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.066 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.069 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.590 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.605 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.608 4289-4504/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.623 4289-4504/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.680 4289-4504/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.683 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.691 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.704 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.720 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.722 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.722 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.736 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:21.563 14219-15679/? E/msgr.msys: E[N rtchannel]_rt_mqtt_publish_callback(356)=>Failed to publish the request over MQTT. token:fcc5503f-754c-4804-b5bc-1c002add4e7a, category:mcd-sync-data-task-category, requestId:21044, error:Error Domain=mqtt Code=3008
2021-03-20 09:03:21.570 14219-15669/? E/msgr.msys: E[S sync]_createResponseError(166)=>Network Response fcc5503f-754c-4804-b5bc-1c002add4e7a contains sync error Error Domain=mqtt Code=3008 - Underlying error (null): Error Domain=mqtt Code=3008
2021-03-20 09:03:21.570 14219-15679/? E/msgr.msys: E[N rtchannel]_rt_mqtt_publish_callback(356)=>Failed to publish the request over MQTT. token:58cbb60d-c846-4c76-a6e0-9b9c6c1c0a93, category:mcd-sync-data-task-category, requestId:8130, error:Error Domain=mqtt Code=3008
2021-03-20 09:03:21.578 14219-15669/? E/msgr.msys: E[S sync]_createResponseError(166)=>Network Response 58cbb60d-c846-4c76-a6e0-9b9c6c1c0a93 contains sync error Error Domain=mqtt Code=3008 - Underlying error (null): Error Domain=mqtt Code=3008
2021-03-20 09:03:24.309 4289-4348/? E/Watchdog: !@Sync 5647 [2021-03-20 09:03:24.309] FD count : 586 

Any help or advice is really appreciated..Thank you all in advance!

Screenshot of error

1 Answers

I got it solved, and this is what I did:

In build.gradle(Module), I had this:

python { 
        buildPython "C:/Users/xxx/Python38/python.exe"
        
        pip {
            install "chatterbot==1.0.4"
            install "PyYAML==3.13"
            install "chatterbot_corpus==1.2.0"
            install "click-7.1.2"
            install "joblib-1.0.1"
            install "mathparse-0.1.2"
            install "nltk-3.5"
            install "packaging-20.9"
            install "pint-0.16.1"
            install "pymongo-3.11.3"
            install "pyparsing-2.4.7"
            install "python-dateutil-2.7.5"
            install "regex-2020.11.13"
            install "six-1.15.0"
            install "sqlalchemy-1.2.19"
            install "tqdm-4.59.0"
        }
    }

Somehow, after I updated python from 3.7.8 to 3.8.6, the PiP block stopped running smoothley, for now I uncommented all these packages except for Chatterbot and my app is working fine again (I haven't gone through all its features but at least it's building fine for now).

I don't know why this happened and I'm gonna investigate it more just to understand it, but I hope my solution will save another one's time.

Thanks.

Related