kivy / python-for-android

Turn your Python application into an Android APK
https://python-for-android.readthedocs.io
MIT License
8.28k stars 1.84k forks source link

Python3 Numpy fails on np.save() #1776

Closed JohnBuckleyGitHub closed 2 months ago

JohnBuckleyGitHub commented 5 years ago

Versions

Description

The command np.save(filename, numpy array) fails with the error:

File "/home/anon/.local/share/python-for-android/build/python-installs/vsbike/numpy/lib/npyio.py", line 521, in save 15867-16128/com.velosense.bikeano I/python: [WARNING] [2019-03-29 12|44|31.150] stderr: File "/home/anon/.local/share/python-for-android/build/python-installs/vsbike/numpy/lib/format.py", line 604, in write_array 15867-16128/com.velosense.bikeano I/python: [WARNING] [2019-03-29 12|44|31.151] stderr: OSError: seeking file failed

I can replicate this by simply calling:

import numpy as np np.save('temp_file', np.array([1, 2, 3]))

However, if I use the compressed file version of save:

import numpy as np np.savez_compressed('temp_file', np.array([1, 2, 3]))

I do not have the problem

buildozer.spec

I am using p4a direct with the following command:

p4a apk --debug --dist_name=bikeAno --bootstrap sdl2 --requirements=android,python3==3.7,kivy,plyer,numpy,boto3,botocore,urllib3,python-dateutil,jmespath,s3transfer --arch armeabi-v7a --name bike --version 2.2 --package com.something.else --android_api=28 --permission ACCESS_FINE_LOCATION --permission ACCESS_COARSE_LOCATION --permission INTERNET --permission ACCESS_NETWORK_STATE --add-jar android_antlib-restricted_4-15-0.jar --add-jar channel.jar --presplash splash.jpg --icon Favicon-ExtraRounded.png --orientation portrait --wakelock --color=always --private .

JohnBuckleyGitHub commented 5 years ago

What is strange, is that it is failing on the seek() command, which is the same as this issue: https://github.com/kivy/python-for-android/issues/1768

But that one only affects Python2

misl6 commented 4 months ago

Since numpy recipe has been updated, does this issue is still reproducible on your side when using latest python-for-android develop version?

github-actions[bot] commented 2 months ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have the means to take action. Please reach out if you have or find the answers we need so that we can investigate further.