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

"ValueError: incomplete format"? #4750

Closed
C80 opened this issue Mar 28, 2022 · 19 comments
Closed

"ValueError: incomplete format"? #4750

C80 opened this issue Mar 28, 2022 · 19 comments

Comments

@C80
Copy link

C80 commented Mar 28, 2022

Hi.

Is there no failsafe that allows the app to function even when it wasn't allowed through the firewall? The GUI just shuts down without even an error message, and then the cli sort-of gives more detail, but imo not enough for me to troubleshoot the issue myself. :-|

INFO ui_util: Initializing UI for MainWindow
INFO webkit: WebKit backend initializing
INFO thumbnail: Starting thumbnail server listening on port 31670
INFO transition_model: updating transitions model.
Traceback (most recent call last):
  File "C:/msys64/mingw64/lib/python3.8/site-packages/cx_Freeze/initscripts/__startup__.py", line 40, in run
  File "C:/msys64/mingw64/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 37, in run
  File "openshot_qt/launch.py", line 203, in <module>
  File "openshot_qt/launch.py", line 198, in main
  File "D:\Program Files (x86)\OpenShot Video Editor\classes\app.py", line 265, in gui
    self.window = MainWindow(mode=self.mode)
  File "D:\Program Files (x86)\OpenShot Video Editor\windows\main_window.py", line 2888, in __init__
    self.initModels()
  File "D:\Program Files (x86)\OpenShot Video Editor\windows\main_window.py", line 2769, in initModels
    self.transition_model.update_model()
  File "D:\Program Files (x86)\OpenShot Video Editor\windows\models\transition_model.py", line 152, in update_model
    trans_name = self.app._tr(trans_name) % suffix_number
ValueError: incomplete format
INFO app:             OpenShot's session ended
INFO app:             Mon Mar 28 18:44:23 2022
INFO app: ================================================
Sentry is attempting to send 1 pending error messages
Waiting up to 2 seconds
Press Ctrl-Break to quit
INFO version: Found current version: {'error_rate_stable': 0.16, 'openshot_version': '2.6.1', 'trans_rate_unstable': 0.001, 'error_rate_unstable': 0.05, 'trans_rate_stable': 0.01}
@JacksonRG
Copy link
Collaborator

Hi, could you include some more details about how this error happened? What version of openshot were you using (Release or daily build), and a description of the error (it sounds like it's crashing just after startup. Is that right?)

Last could you include your log full log files? Instructions on where to find them can be found here

@C80
Copy link
Author

C80 commented Mar 30, 2022

Hi, could you include some more details about how this error happened? What version of openshot were you using (Release or daily build), and a description of the error (it sounds like it's crashing just after startup. Is that right?)

is the "INFO version" line not enough? i just downloaded OpenShot-v2.6.1-x86_64 from the main button in the /download/ page. So i suppose it's "Release". And the description was in the first line: "The GUI just shuts down without even an error message, and then the cli sort-of gives more detail, but imo not enough for me to troubleshoot the issue myself. :-|"

Last could you include your log full log files? Instructions on where to find them can be found here

I can probably find the files... if they get generated. My main question however is how to set-up the cli to be more verbose on errors? (Since the GUI crashes on start-up, i can't do step #2 "From the top left menu bar select Preferences, on the Edit dropdown")
openshot-qt.log

@C80
Copy link
Author

C80 commented Apr 4, 2022

So there's no parameter to trigger a more verbose log / output?

Also, about this line in particular... "Sentry is attempting to send 1 pending error messages" -- does it mean there's no receiver available to catch that message and display it?

@JacksonRG
Copy link
Collaborator

If you're launching from a CLI, you can add --debug to the launch command to get more info.

@C80
Copy link
Author

C80 commented Apr 5, 2022

Well that didn't help, but at least it finally clicked that the stacktrace that python shows is in reverse order than the ones i'm used to from .NET... So the issue is from

trans_name = self.app._tr(trans_name) % suffix_number
... would it be too much to ask for a try + except being added there so that we can show the specific "self.app._tr(trans_name)" that throws?

@JacksonRG
Copy link
Collaborator

is the "INFO version" line not enough?

Actually that's grabbing the error reporting rates for all versions.

So checking debug in the settings will turn on more verbose output from our video encoding libraries. --debug will give more output from the user interface, which is where the bug appears to be.
Also, the sentry line you pointed out is regarding our error statistics service.

But now I understand this bug. We have a string that we replace %s into. So that's why this particular case is getting past our translation lang file testing. Are you using openshot translated? If so what language?

@JacksonRG
Copy link
Collaborator

@C80
Copy link
Author

C80 commented Apr 13, 2022

So checking debug in the settings will turn on more verbose output from our video encoding libraries.

Pretty sure no libraries get to be called... This happens before anything has a chance to show up, even a splash screen. (Although the taskbar does flash for a fraction of a second.)

--debug will give more output from the user interface, which is where the bug appears to be.

Not in this case, apparently. Using it doesn't give any significant detail over not using it.

Are you using openshot translated? If so what language?

Well, i don't intend to, but i've had apps auto-select their own lang files instead of waiting for me to make a choice about it. I'd pick English (UK) if i had the chance, but i don't. Any command line params for overriding the language?

Oh, but looking over the logs again, you're right:

15:36:34 INFO language: Qt Detected Languages: ['en-US']
[...]
15:36:34 DEBUG language: Successfully loaded OpenShot_ro_RO in ':/locale/'

WHY would you do that though, my system is set to have an English interface despite the regional location being set to Romania. -.-
log comparison.txt

@C80
Copy link
Author

C80 commented Apr 13, 2022

I just double-checked, and these are my computer settings. The only one that isn't EN is just to allow me to access the month names, day-of-the-week names, potentially currency name, etc ; and i expected it to only have effect on "dates and times", as it said in the info message, and maybe numbers (although for them i tend to use the period as decimal separator, not the comma as would be per local regional settings -- and they don't seem customizable from in here anyway).
image

@JacksonRG
Copy link
Collaborator

Any command line params for overriding the language?

Yep! Try --lang en_US

@JacksonRG
Copy link
Collaborator

If that (or reinstalling in English) helps, then we know there's an issue with Romanian translation. (At least in some cases with Romanian on Windows, as I can't get Romanian to crash)

C80 added a commit to C80/openshot-qt that referenced this issue Apr 14, 2022
The call to log.debug might need some tweaking, though.
@C80
Copy link
Author

C80 commented Apr 14, 2022

Yep, that helped, and the UI opened.

And since you can't repro on your system, can't you make a version [ daily? nightly? :-) ] that outputs that "trans_name" if debug is on? ( something like develop...C80:patch-1 ... and as mentioned in the comment there, "The call to log.debug might need some tweaking, though." ) Also, you'd need to let me know how i could get that specific version, probably package it up too, since i'm not familiar with compiling python apps.

@jonoomph
Copy link
Member

jonoomph commented May 8, 2022

@C80 Can you please try our latest daily build: https://openshot.org/download/#daily. We have changed many of the projections around how we generate, and validate translations, and I am curious if you are still experiencing a crash during launch, in your own language. Thx!

@C80
Copy link
Author

C80 commented May 10, 2022

or reinstalling in English

Btw, @JacksonRG , how would i do that? The setup doesn't ask about my preferred language... it doesn't even ask if i want to install in a different folder. -.-

These 2 are the only choices i get to make. :-|
image
image

As for the latest daily, yes @jonoomph it kinda worked... Managed to not crash on that first hurdle, so i could get to editing preferences and changed the language from "default" to good old english. However, i'd still like to know WHICH bit was the culprit, so that it could get fixed. :-)

@C80
Copy link
Author

C80 commented May 11, 2022

And in case i'm missing something, here's the log for the last few sessions, going back and forth between the stable and the daily. Don't see anything relevant, but i didn't really expect to, since that transition_model.py didn't get changed.
openshot-qt (2022-05).log

@JacksonRG
Copy link
Collaborator

@C80 I'm a little confused, as there have been a few suggested solutions, and I'm not sure what's worked. What Openshot behavior are you currently experiencing? Is openshot still failing to open? And does --lang en_US or --lang en_GB cause any change?

@C80
Copy link
Author

C80 commented May 20, 2022

@JacksonRG well i'd consider them work-arounds, since IMO a solution would make the default (release) version work out of the box. Currently, it doesn't do that; i can only open the app if i start the daily version, or if i start the release with --lang.

And about my previous question, how do i "reinstall in English" ... you seem to have no comment? ^^

As for the initial "more details about how this error happened"... guess you don't care about identifying which part of the RO translation is invalid, considering that you now DO have some sort of failsafe for it?

@JacksonRG
Copy link
Collaborator

We are still interested in finding the problem translation. I just wanted re-establish what issues we're trying to fix.

If the daily version works without the --lang option, that's great! That means the fix will be included in the next release. By "reinstall in English" I was mistaken. I didn't realize that is just the language used during setup.

@JacksonRG
Copy link
Collaborator

Since this is fixed in the daily build, I'm closing this issue. The fix will make it into the next release version.

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

No branches or pull requests

3 participants