#Cleveland Art Museum image conversion problem

1 messages Β· Page 1 of 1 (latest)

topaz widget
#

I'm gonna start a thread

true charm
#

ha! good idea πŸ™‚

#
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "test.py", line 18, in <module>
  File "adafruit_pyportal/__init__.py", line 336, in fetch
  File "adafruit_pyportal/network.py", line 179, in process_image
  File "adafruit_pyportal/network.py", line 122, in image_converter_url
AttributeError: 'Network' object has no attribute '_secrets'
>>> 
#

im running into that trying to update to latest libs - including overriding the frozen portalbase

#

seems like like a toml/secrets sync issue between the libs

topaz widget
#

but you were using the libs from the latest LIBRARY bundle, I thought?

#

maybe I misread

true charm
#

i sure think i am πŸ™‚

#

adafruit-circuitpython-bundle-8.x-mpy-20230912.zip

topaz widget
#

I'm using circup which is fetching them from the same place

true charm
#

all .mpy files

#

all copied from adafruit-circuitpython-bundle-8.x-mpy-20230912.zip

topaz widget
#

Why don't you .zip up your CIRCUITPY (after removing your secrets), and I will just try it as it is

#

I can do the same

true charm
#

it only happens when trying to override the frozen adafruit_portalbase module. you aren't doing that.

#

oops. also. you left secrets in.

#

deleted your zip

topaz widget
#

the secrets was redacted, no problem

#

it had foo for all the values

true charm
#

ok. i didn't even look

topaz widget
#

do you mean that the errors are showing up only when you have a .py portablbase at /?

true charm
#

.mpy

#

from same bundle zip

#

just placing in root to override frozen

topaz widget
#

even the .mpy's will cause a lot of RAM to be used up, so sounds like a memory problem

#

'cause importing .mpy's puts them in RAM, except if they are frozen

true charm
#

you should get same?

topaz widget
#

I didn't try yours yet, sorry, was just multitasking and doing 8.2.6 release

true charm
#

i'm getting same issue using your zip 😦

#

did a storage.erase()

#

copied your zip over

#

added my secrets

#

same issue

topaz widget
#

could you change your timezone to mine? That's the only diff I know of in secrets

true charm
#

'timezone' : "America/Los_Angeles",

#

what's yours?

#

oh. nvm. its in your not secret secrets.

#

same issue with your timezone

topaz widget
#

AttributeError: 'Network' object has no attribute '_secrets', so I should remove the local portalbase?

true charm
#

yah

#

it works with an older version of the library - the same one that is frozen

#

so if its a RAM issue, must be right on the edge

topaz widget
#

ok, with your zip removing /adafruit_portalbase, it works, and displays an image

#

so it' something different about our networks

true charm
#

but if i replace file.write(i) with print(i) it works

#

just dumps a bunch of raw bytes to screen

topaz widget
#

both SD and ESP32 are using the SPI bus, so if the traffic is different on the SPI bus, that could be causing some issue. different traffic on the SPI bus would be due to differences in the network traffic

true charm
#

like how slow my internet is? πŸ™‚

topaz widget
#

maybe.... I wonder if the packet size or chunking is different

#

did you try it with your phone as a hotspot?

#

can you do that/

true charm
#

what do you get if you add a print(len(i))?

#

did not try phone yet

#

but probably not worth it. my phone data is also potato quality and limited

topaz widget
#

still could be different

#

but can I instrument portalbase without hitting the "no attribute" error above?

#

or just remove settings.toml??

#

ok, now it's working ,odd

true charm
#

i was hitting that issue trying to instrument using latest library release

#

had to use older version

topaz widget
#

could you try changing the chunk size in there from 12000 to something smaller?

true charm
#

its 512

#

same issue through phone

#

although it's not obvious if it's actually using cell data or just going through same wifi

topaz widget
#

well, I guess you could go to the public library or starbucks or something πŸ™‚ at some point

#

I finished the release, so I'll take a walk and cogitate a bit on this. It's kind of crazy

#

I looked for internet providers on your island: some claim better speeds (the 5g-based ones or whatever)

true charm
#

ok. lemme go give library a try while you're oot-n-aboot.

#

there's "on island" and then there's "on island and available in your neck of the woods"

#

i'm not even on google maps πŸ™‚

topaz widget
#

assuming the library doesn't have some forced sign-in to get on their wifi network

#

Another difference we haven’t completely eliminated his SD cards. Walking now

#

Are you using a regular PyPortal or a Titano?

true charm
#

pyportal. only one i have. don't have titano or pynt.

#

exact same behavior at library

#

it does seem like some kind of SPI contention though

#

another simple test - replace file.write(i) with file.write(bytes([23]*512))

#

results in same issue

#

but not exactly the same - more . get printed, so it gets through the iterator loop further

#

reducing 512 so it writes fewer bytes lets it get even further

#

must go all the way down to 1 for it to get all the way through the iterator though

topaz widget
#

I hope going to the library was at least a nice excursion πŸ™‚ .
Do you have a SanDisk 4GB card, or do you have one of the small 128MB or 512MB cards AF sells? I'd like to try to get us on the same card.

#

I have some Micro Center 8GB, 16GB, 32GB cards, but may not match with anything your have

topaz widget
#

I tried a 512MB card, still fine.

#

Tried on a TItano, also works

#

my Pynt seems to be defunct

#

something weird and interesting: The NINA-FW firmware in the TItano is 1.2.2, but it worked fine.

#

it's not clear to me it was necessary to update NINA-FW when the cert IO depended on expired. What was necessary was to update the Arduino libraries that loaded only a single cert.

true charm
#

OK -** this may be SD card related**. the one I have been using worked when I reverted CP to 6.x. so consider it OK. but just now tried swapping SD cards (should have tried this sooner i guess) and the simple test code is now working:

Reply is OK!
Saving data to  /sd/cache.bmp
............................................................................................................................................................................................................................................................................................Created file of 144138 bytes in 13.0 seconds
>>>
topaz widget
#

we were just discussing this in slack in #embedded-dev. What kind of card is the non-working card?