Miss-configured from command line and can no longer access user configuration

Asked by Silviu Popescu

I did something wrong when trying to set some parameters from command line using
# timexpra ....
I don't know how to fix it because I can no longer visualize the configuration.

In the admin UI I get "Unexpected ERROR getting user configuration. Please inspect Timekpr-nExT log file

2021-05-07 17:36:13.743974: init user (andrei) configuration manager
2021-05-07 17:36:13.744246: finish user configuration manager
2021-05-07 17:36:13.745385: init user (andrei) control
2021-05-07 17:36:13.745568: finish init user control
2021-05-07 17:36:13.746803: Unexpected ERROR (getUserInformation): list index out of range
2021-05-07 17:36:13.747039: de-init user configuration manager
2021-05-07 17:36:13.747062: de-init user control

Not sure if this happened after this command (or similar I have tried):
sudo timekpra --setplaytimealloweddays andrei '1;2;3;4;5'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/timekpr/client/timekpra.py", line 29, in <module>
    _timekprAdminClient.startTimekprAdminClient(*sys.argv)
  File "/usr/lib/python3/dist-packages/timekpr/client/admin/adminprocessor.py", line 82, in startTimekprAdminClient
    self.checkAndExecuteAdminCommands(*args)
  File "/usr/lib/python3/dist-packages/timekpr/client/admin/adminprocessor.py", line 252, in checkAndExecuteAdminCommands
    self.processSetPlayTimeAllowedDays(args[paramIdx+1], args[paramIdx+2])
  File "/usr/lib/python3/dist-packages/timekpr/client/admin/adminprocessor.py", line 694, in processSetPlayTimeAllowedDays
    result, message = self._timekprAdminConnector.setPlayTimeAllowedDaysForDays(pUserName, dayMap)
AttributeError: 'timekprAdminConnector' object has no attribute 'setPlayTimeAllowedDaysForDays'

How can I do a configuration reset from command line ? (UI is blocked)

Question information

Language:
English Edit question
Status:
Solved
For:
Timekpr-nExT Edit question
Assignee:
No assignee Edit question
Solved by:
Eduards Bezverhijs
Solved:
Last query:
Last reply:
Revision history for this message
Best Eduards Bezverhijs (mjasnik) said :
#1

Ok, that's easy to fix, but before fix, please send me existing configuration and command you ran.
The command is easy to get, just press UP key until you see the command.

Config files are in /var/lib/timekpr/config and /var/lib/timekpr/work. Please zip them up and send them to me.

The fix is just remove the files with andrei in the name, I think you will not need to even restart timekpr, it should work. If not, stop timekpr, remove config / work with andrei in the name and start it up.

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#2

If you used commands and did not edit files by hand, this very much looks like a bug, that's why I need config files.
If files are broken, timekpr ahould have fixed them, but it seems that this is not happening :(

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#4

On the second thought, please submit a bug for this.

Revision history for this message
Silviu Popescu (silviutpopescu) said :
#5

not sure which one broke it, this is from the history in chronological order:

sudo timekpra --setplaytimealloweddays andrei 1
sudo timekpra --setplaytimealloweddays andrei '1;2'
sudo timekpra --setplaytimelimits andrei '0;0;0;0'
sudo timekpra --settimeallowed andrei 0
sudo timekpra --setplaytimeleft andrei 0
sudo timekpra --setplaytimeleft andrei - 80000
sudo timekpra --setplaytimeleft andrei = 0
sudo timekpra --setplaytimeleft andrei = 1

https://drive.google.com/file/d/1FklLjHvoaDPRcTfm3mLagyVm7q_HAnue/view?usp=sharing

thank you!

Revision history for this message
Silviu Popescu (silviutpopescu) said :
#6

Thanks Eduards Bezverhijs, that solved my question.