Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting script by download or export failed (on Ubuntu, Fixed) #30

Open
ghvau opened this issue Mar 25, 2023 · 18 comments
Open

Getting script by download or export failed (on Ubuntu, Fixed) #30

ghvau opened this issue Mar 25, 2023 · 18 comments
Labels
bug Something isn't working fixed! This issue is fixed

Comments

@ghvau
Copy link

ghvau commented Mar 25, 2023

I play a little bit with the jama-gui and get the following situations:

  1. Creation mpy script, store it on device, can run it in the expected way, but the DOWNLOAD function general get message: "An error has occurred"
  2. Use different Jama Funcs as expected, but the EXPORT function general get message: "An error occurred while exporting this function"

Ubuntu 22.04, source code running (github), ESP32+CP2102

@jczic
Copy link
Owner

jczic commented Mar 26, 2023

Hello @ghvau and thank you for using the soft and for your comment!
I understand that the software opens a dialog box to "load" or "save" a file is a problem for you.
In my opinion it is a problem of access rights to the default folder on which the dialog box opens.
Try to launch the software with more rights? It is probably too restricted.

@ghvau
Copy link
Author

ghvau commented Mar 26, 2023 via email

@jczic
Copy link
Owner

jczic commented Mar 26, 2023

@ghvau, maybe I found the cause of the rights problem for the default folder on your Linux.
Just telle me, do you see the save dialog box correctly if you click on the "this template" button in the "Jama Funcs" page?

Also, I added a default directory for all dialog boxes : 9d59fe3
Can you try the latest sources of the repository?
Then you tell me. 👍🏻 Thank you @ghvau

@jczic jczic added the bug Something isn't working label Mar 26, 2023
@ghvau
Copy link
Author

ghvau commented Mar 26, 2023 via email

@jczic
Copy link
Owner

jczic commented Mar 26, 2023

I did not receive any particular private email?
Strings are used in copyfile function.

To tell the truth, I never tested it directly under Linux but maybe @happenpappen can help us?

It is strange that it plants in this place.
Does the modification I made allow you to see all the dialogs at least?
(Also, if you export the template from the top of page Jama Funcs, that's works?)

So, if I see well, it is important that I understand how the Python copyfile works under Linux.

@ghvau
Copy link
Author

ghvau commented Mar 26, 2023

... send private mail again !

@ghvau
Copy link
Author

ghvau commented Mar 26, 2023

... "Does the modification I made allow you to see all the dialogs at least? .."
For me, there is no change inside the EXPORT dialog and function.

Maybe there is a different dialog depending used os ?

My sended modification (string modification inside Export Jama Funcs) works for me.
Maybe there is an equal situation inside DOWNLOAD Code Editor.

@jczic
Copy link
Owner

jczic commented Mar 26, 2023

Ok, I seen your mail and I fixed that, thank you!
I've just used "str()" to transtype the objc -> 340b421
Can you retry with latest sources please?
Thank you again 👍🏻

@ghvau
Copy link
Author

ghvau commented Mar 27, 2023

I am sorry but this "easy" type conversion don't work, i get the same error/situation. I try it also before i found the other solution, maybe not the best way, but working in Ubuntu environment.

a = ('/', 'h', 'o', 'm', 'e', '/', 'n', 'o', 'd', 'e', 'm', 'c', 'u', '/')
print(a)
('/', 'h', 'o', 'm', 'e', '/', 'n', 'o', 'd', 'e', 'm', 'c', 'u', '/')
print(str(a))
('/', 'h', 'o', 'm', 'e', '/', 'n', 'o', 'd', 'e', 'm', 'c', 'u', '/')
an=''.join(str(x) for x in a)
print(an)
/home/nodemcu/

@ghvau
Copy link
Author

ghvau commented Mar 27, 2023

This will be the smallest modification, which run in my env:
copyfile(filename, ''.join(r))

@ghvau
Copy link
Author

ghvau commented Mar 27, 2023

A other approach maybe to find out, why the target file name for disk writing was a type "tuple" and not "string" ?!

@jczic
Copy link
Owner

jczic commented Mar 27, 2023

Ok @ghvau it's done with join().
Indeed, it's very strange that the return of the file dialogs is a Tuple on your Linux distribution. I have to report this to the pywebview developer.
So the source update should work on you now.
Thanks to you. 👍🏻

@ghvau
Copy link
Author

ghvau commented Mar 27, 2023

... downloaded, used, solution confirmed !
Thank you also

@jczic
Copy link
Owner

jczic commented Mar 27, 2023

Thanks for your interest in this software, I hope you like it and that it displays well on your OS (animations etc) 😊

@jczic jczic changed the title Getting script by download or export failed Getting script by download or export failed (on Ubuntu, Fixed) Mar 27, 2023
@jczic jczic added the fixed! This issue is fixed label Mar 27, 2023
@happenpappen
Copy link
Contributor

Is this resolved or does it need further testing? I could look after this this evening, yesterday has been quite busy 😁 .

@jczic
Copy link
Owner

jczic commented Mar 28, 2023

Hello @happenpappen, yes it's ok thanks.
Have you been able to test the latest features?

@happenpappen
Copy link
Contributor

Hello @happenpappen, yes it's ok thanks. Have you been able to test the latest features?

Yesterday evening i fetched the current version and tried it using a Seeed Studio XIAO ESP32C3 which worked very good. I tried to step through all major functions and did not encounter any errors. Do you have a specific feature in mind which needs testing?

@jczic
Copy link
Owner

jczic commented Mar 30, 2023

Hi @happenpappen, that's great, thanks a lot 👍🏻
There are mostly new features like last Jama funcs, SD card, Ethernet connection and now I just updated a new feature to allow to retrieve the state of some configurations automatically at boot (autonomously in the chip)
:)

@jczic jczic closed this as completed Mar 31, 2023
@jczic jczic reopened this Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed! This issue is fixed
Projects
None yet
Development

No branches or pull requests

3 participants