0

pyportal and nasa image viewer
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

pyportal and nasa image viewer

by Hethacker on Tue Apr 16, 2019 3:17 pm

hey, I keep getting a response on my pyportal about it not having enough internal memory to be able to run the program, I have tried everything but cannot figure out what the problem is.

Saving data to /cache.bmp
[Errno 30] Read-only filesystem
Traceback (most recent call last):
File "code.py", line 32, in <module>
File "code.py", line 29, in <module>
File "/lib/adafruit_pyportal.py", line 740, in fetch
File "/lib/adafruit_pyportal.py", line 737, in fetch
File "/lib/adafruit_pyportal.py", line 733, in fetch
File "/lib/adafruit_pyportal.py", line 733, in fetch
OSError:

No writable filesystem found for saving datastream. Insert an SD card or set internal filesystem to be unsafe by setting 'disable_concurrent_write_protection' in the mount options in boot.py

Hethacker
 
Posts: 35
Joined: Fri Apr 05, 2019 9:02 pm

Re: pyportal and nasa image viewer

by adafruit_support_carter on Tue Apr 16, 2019 3:29 pm

[Errno 30] Read-only filesystem

Looks like you haven't done the step to make the file system writable:
https://learn.adafruit.com/pyportal-nas ... dot-py-5-9

adafruit_support_carter
 
Posts: 12971
Joined: Tue Nov 29, 2016 2:45 pm

Re: pyportal and nasa image viewer

by Hethacker on Sun Apr 21, 2019 3:38 pm

Which step is that? do I need to convert the boot.py to a different type of file?

Hethacker
 
Posts: 35
Joined: Fri Apr 05, 2019 9:02 pm

Re: pyportal and nasa image viewer

by adafruit_support_carter on Sun Apr 21, 2019 9:36 pm

Basically it's just a file rename. When you downloaded the project zip, there should have been a file in there called unsafe_boot.py, which you probably copied over with everything else. So just need to rename it to boot.py and press reset.

adafruit_support_carter
 
Posts: 12971
Joined: Tue Nov 29, 2016 2:45 pm

Re: pyportal and nasa image viewer

by jonvarteresian on Tue Apr 23, 2019 11:36 pm

Hi,

So It looks like this Nasa viewer will not run without an SD card present. I have performed the unsafe_boot.py rename to boot.py and see the warning messages I am supposed to see, but I still couldn't actually process the image through the viewer. it would try and partially succeed and then throw an exception.

Maybe I was just running out of internal storage? Anyway, when I added an SD card everything just started working!

In a separate question, I would see the Nasa screen, then some error messages, then the pyportal would reboot and I couldn't read the error messages fast enough. How can I see those messages before they disappear?

thanks!

jonvarteresian
 
Posts: 3
Joined: Fri Jun 02, 2017 10:11 pm

Re: pyportal and nasa image viewer

by kevinjwalters on Sat May 18, 2019 8:54 am

The NASA application does not require an sd card to work, it's more likely to be a coincidence and some other action was required. It writes to the PyPortal's built-in flash storage, you should find a file called cache.bmp in root directory.

One thing I noted and was previously unaware of: boot.py isn't read/used if you press Control-D in REPL over serial to do a reload - you need to press reset button on the back of the device or power cycle. I would eject storage before that, particularly on Windows.

kevinjwalters
 
Posts: 432
Joined: Sun Oct 01, 2017 3:15 pm

Re: pyportal and nasa image viewer

by kevinjwalters on Thu May 23, 2019 5:07 pm

To add a bit more detail that I've recently discovered, I think the NASA viewer does take advantage of an SD card if it's present due to a feature in the library it uses, detail is in adafruit_pyportal library and SD card for cache.bmp.

I just added a (16GB) SD card but I've now hit this bug, PyPortal Error but a simple library upgrade should deal with that.
Last edited by kevinjwalters on Sat May 25, 2019 7:46 am, edited 1 time in total.

kevinjwalters
 
Posts: 432
Joined: Sun Oct 01, 2017 3:15 pm

Re: pyportal and nasa image viewer

by Hethacker on Fri May 24, 2019 8:47 pm

Okay, I bought a 64 GB micro SD card and inserted it into the pyportal, but I still have the same content length error. Is there something else I need to add to configure the SD card?

when I tried to normally add the boot.py from the zip file, I still have the same issue.

Hethacker
 
Posts: 35
Joined: Fri Apr 05, 2019 9:02 pm

Re: pyportal and nasa image viewer

by kevinjwalters on Sat May 25, 2019 7:39 am

64GB is a useful, common size nowadays but it puts you in SDXC/exFAT territory. I've got a cheap GoPro and I know it doesn't like these "big" cards and I've noticed one of my old USB sd card adapters doesn't work with a 128GB card - one has to be cautious above 32GB.

I've asked this question to check these are ok:
SD cards larger than 32GB in PyPortal + other Adafruit board. In the meantime it might be worth trying with a 32GB or less card if you have one to hand.

kevinjwalters
 
Posts: 432
Joined: Sun Oct 01, 2017 3:15 pm

Re: pyportal and nasa image viewer

by Hethacker on Wed May 29, 2019 12:18 am

Alrgiht, I did not have a spare SD card that low, but a quick trip to Best Buy got me a 16 GB card and that got the code working mostly, but the first 5-6 top lines of the image are black. otherwise, it seems to work fine.
IMG_2323 (1).jpg
nasa image, first top lines are missing it looks like
IMG_2323 (1).jpg (780.86 KiB) Viewed 1016 times

Hethacker
 
Posts: 35
Joined: Fri Apr 05, 2019 9:02 pm

Re: pyportal and nasa image viewer

by kevinjwalters on Wed May 29, 2019 4:26 am

Seems rare but I've had that too, see NASA image partially blank on PyPortal.

Did you have the serial console connected at the time? I didn't but I do now connect it up in case there's a revelation there on this problem.

kevinjwalters
 
Posts: 432
Joined: Sun Oct 01, 2017 3:15 pm

Re: pyportal and nasa image viewer

by Hethacker on Wed May 29, 2019 4:42 pm

I think it was an artifact of the image yesterday, when I opened it up today, I had the full picture of the spiral galaxy. Thank you for the help, it looks awesome!

Hethacker
 
Posts: 35
Joined: Fri Apr 05, 2019 9:02 pm

Please be positive and constructive with your questions and comments.