Skip to content

Conversation

@OwenMcDonnell
Copy link
Contributor

Change base64.py example to src_base64.py to avoid shadowing built in base64 module

Description

When trying to run existing image control examples in folder with one example named base64.py the import of python's base64 module is shadowed

@FeodorFitsner
Copy link
Contributor

How do you import it?

@cloudflare-workers-and-pages
Copy link

Deploying flet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7a795c3
Status: ✅  Deploy successful!
Preview URL: https://522cfbe3.flet-docs.pages.dev
Branch Preview URL: https://base64-example-fix.flet-docs.pages.dev

View logs

@OwenMcDonnell
Copy link
Contributor Author

You mean the base64 module? It's part of Python library. So when you try to run the example from a directory with a file named base64.py, that file gets loaded instead of the python library one.

@FeodorFitsner
Copy link
Contributor

Ah, OK.

@FeodorFitsner FeodorFitsner merged commit 555ad7e into main Aug 13, 2025
3 of 4 checks passed
@FeodorFitsner FeodorFitsner deleted the base64-example-fix branch August 13, 2025 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants