woocommerce / wc-api-python

A Python wrapper for the WooCommerce API.
https://pypi.org/project/WooCommerce/
MIT License
212 stars 112 forks source link

import woocommerce from kivy app crashes the app - Solved and Closed #45

Closed peethamber closed 5 years ago

peethamber commented 5 years ago

Hi,

I have used the following import from woocommerce import API

in a kivy app the runs on android. The app continues to crash when it encounters this import. It works fine on my laptop. I am using Buildozer to build the .apk file on Android. Can you kindly advice.

peethamber commented 5 years ago

I realised later that the app crashes on Import Requests within the woocommerce api.py package when run from the android studio. Can someone throw any light on why Import requests fails with NoModuleFound Error in spite of having pip installed the requests package in both python 2.7 and 3.5

peethamber commented 5 years ago

I have resolved this after running the app in the android studio debugger and realised that the buildozer file was looking for a particular version of the woocommerce python package whiagsin which was 2.1.0 in my case. The api.py file of the woocommerce package was expecting a lower version of the requests package which again is 2.1.0. I had a higher version of the requests package installed on my laptop. Downgrading the versions of the woocommerce and requests package and then re-running the buildozer file solved the problem.