TouchSelfie-extended icon indicating copy to clipboard operation
TouchSelfie-extended copied to clipboard

Testers needed! Migrate to python 3.x

Open laurentalacoque opened this issue 6 years ago • 12 comments

Testers needed!

the [python3] branch contains the code migrated to python3 We need your help for the test and improvement of this branch. The code should be functionnal but some errors may arise.

To help us:

  • first clone the python3 branch: git clone https://github.com/laurentalacoque/TouchSelfie-extended.git git checkout python3
  • play with the app (don't forget to use python3 command instead of python to launch the script)
  • if something goes wrong, please report it here and paste the logfile that you'll find in scripts/touchselfie.log

Some Background

Some of the frameworks on which TouchSelfie relies (such as google-api-client) are marking python 2.X as deprecated (see this). This might cause broken functionalities as soon as 2020.

If you want to give a hand, please fork, improve and submit PR!

Thanks :)

laurentalacoque avatar Jan 31 '19 18:01 laurentalacoque

Testing python3 branch now. Everything seems to be working! -- setup.py Google Photo Album entry is not writeable (have to stick with default "Drop Box")

wyojustin avatar Feb 23 '19 17:02 wyojustin

BTW, I copied the oath2services script into our directory and it worked first try! Thanks! Give it a try and test for me if you don't mind: https://github.com/wyolum/TouchSelfie/tree/python3

wyojustin avatar Feb 23 '19 17:02 wyojustin

Testing python3 branch now. Everything seems to be working! -- setup.py Google Photo Album entry is not writeable (have to stick with default "Drop Box")

Thanks @wyojustin! Could you please describe this error?

  • is there any error in the console window?
  • did you see/try the Modify button and "create directory" item?

Note: in the new google phtoos api, you can't see your existing google photos albums : you only see albums created with TouchSelfie

laurentalacoque avatar Feb 24 '19 09:02 laurentalacoque

Ok, now I get it. Click Select to change the album. I found this code on the web, and it CAN see all album names if you want to take a look. https://gist.github.com/wyojustin/a41b7b98caee50ef1ede553e98480844

wyojustin avatar Feb 24 '19 12:02 wyojustin

I like the Long Press idea! Cool implementation. The first time I used it I thought the long press event would trigger automatically if I held long enought. Of course, it only triggers when I RELEASE the press. I modifed your code to trigger as soon as the long press duration has been reached using root.after. See __press, __release, and __trigger in this gist: https://gist.github.com/wyojustin/be3d2ac20020ebba8dbb8ae16442f694

update: We need to attach the LongPressDetector to the image, not root. Otherwise the button callbacks can happen first and hang for longer that a second.

wyojustin avatar Feb 24 '19 13:02 wyojustin

@wyojustin : thanks for the link about all albums recovery. Actually I already implemented it in a previous test version BUT, as a design choice, I preferred to limit the permissions to the strict minimum (append only). This way, we can't accidentally mess with user's files 😉

laurentalacoque avatar Feb 25 '19 20:02 laurentalacoque

Also thanks for the longpress modification. Seems nice, I'll implement it ASAP

laurentalacoque avatar Feb 25 '19 20:02 laurentalacoque

Just found a bug in long press detector... gist updated.

wyojustin avatar Feb 28 '19 00:02 wyojustin

@wyojustin Nice !

laurentalacoque avatar Feb 28 '19 09:02 laurentalacoque

Laurent, we added a annotation feature so you can write comments and thoughts. Please test when you get a chance. https://github.com/wyolum/touchselfie

wyojustin avatar Mar 09 '19 00:03 wyojustin

Hi Laurent, I used Touchselfie-extended since a few years but unfortunately i had to reinstall my pi. Now i'm trying to reinstall Touchselfie on a pi Bookworm version. When i run the setup.sh file i get these error: /home/pi/TouchSelfie-extended/scripts/setup.py:843: SyntaxWarning: "is" with a literal. Did you mean "=="? if config.selected_printer is "": config.selected_printer = selectedindex Traceback (most recent call last): File "/home/pi/TouchSelfie-extended/scripts/setup.py", line 32, in <module> import oauth2services File "/home/pi/TouchSelfie-extended/scripts/oauth2services.py", line 12, in <module> from apiclient import errors, discovery ModuleNotFoundError: No module named 'apiclient'

could you help me on this ?

karlzre avatar Dec 03 '23 17:12 karlzre

Karlzre, I'd try chainging "is" with "==" and see if that fixes the problem. Good luck! change

f config.selected_printer is "": config.selected_printer = selectedindex

to

f config.selected_printer == "": config.selected_printer = selectedindex

wyojustin avatar Dec 03 '23 22:12 wyojustin