-
Notifications
You must be signed in to change notification settings - Fork 219
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
Unhandled exception: NoneType #820
Comments
Can you reproduce this error while running bit with --debug option and post the complete output? |
The fault happens very rarely. How much output does --debug produce? |
Not very much. The output appears on the console. So you have to start bit on shell. @Germar Would the Did you copy and paste the error message? I can not find |
Sure. Debugging messages from
|
No, I have made no changes whatsoever to the source. BiT was installed from the opensuse repository, v1.1.20-3.3.1. I presume you submit the application for inclusion. -rw-r--r-- 1 root root 50750 Apr 21 00:25 tools.py |
The error finally recurred. There was nothing in the BiT log file itself that contained "keyring." The command line: The additional output: |
Hello: But I see that #820 has also been closed but there's no mention of a fix for it. Please advise. Thanks in advance. PCL |
I am confused also. ;) We are here at Issue 820 which is open. But you say that #820 was closed? |
Hello: Hmm ... Too early, not enough coffee. 8^° Sorry. Best, PCL |
Related Debian report |
@jim-moe There is a new forming maintaining team and we do review all issues. Is this problem still relevant for you or did you find a solution? |
Hello:
The news is that I am now getting this warning, which I did not get before:
In any case, BiT seems to be doing its job and I don't know if it is a keyring issue or not. Best, JHM |
Maybe it helps when you install one of the python-keyring packages? |
Hello: Here is what I have installed on my Devuan installation:
At least, it is what I have available in the Devuan repository, the installation being up to date:
After having some espresso, I recalled that I originally attempted to find an answer on the Devuan forum last year and what I got answers led me to post the bug report here. If you do a search with the text Thanks for your input. Best, JHM |
Hello:
I have checked and have not been able to find a good reason for having
Or for They are not dependencies, they are Just shooting in the dark, but ... One way to find out: I'll post back if I get another message or in a fortnight, whatever comes first. Best, JHM |
I have not seen this error, NoneType, in a very long time (years). |
Hello:
It would seem that BiT does not need Any ideas? Edit: But a --> Q: What links BiT and I searched yet some more and found a lead of sorts here: The OP had purged
Thought I'd post all this as it may have some bearing ie: the Thanks in advance. Best, PCL |
Maybe related to #1321 (fixing there)...
You can save your password for your private SSH key and EncFS password (local encryption) in a supported keyring in the BiT GUI:
If the job is scheduled in the settings it is added to Note: It is important to configure a supported keyring backend in a config file if |
Hello: I have not had this issue again since my Sept 25th. post and the usual was once every week or so. FWIW, I had purged and the reinstalled gnome-keyring before posting. Like I mentioned before, BiT was doing its job properly (as far as I can tell) in spite of the error. Thanks for your input. Best, PCL |
To everyone involved: Would you say this Issue can be closed? |
Hello:
I would suggest leaving it open till the end of this month so I see if it crops up again. Unless it crops up again. 8^° I sort of don't like 1. not knowing exactly what caused it, 2. think that it got solved the MS way. Thanks, |
Agreed, we'll give this Issue a 4-week timeout. |
Hello: Right, thank you. Best, PCL |
Hello:
As you can see, the error is the same. These are the last 10 lines of that particular script:
So I'd say this issue should remain open. My box run Linux Devuan Beowulf with a backported kernel:
BiT 1.1.24.0
Best, PCL |
May be a multi-threading issue Could you move the line 1458 after 1464 so that the sleep function is imported before the thread starts?... Then wait and see ;-) Edit: If it fails you could try a variant: |
Hello: Thanks for the prompt reply. 8^)
Better if I report back when/if I get another notification and get further instructions. Just to check, is this it?:
Obviously no renumbering needed as these are generated by Thanks for your input. Best, PCL |
Exactly like I described it! I have just checked it (using Git master branch - but your code looks older, it imports _thread instead of threading, but this shouldn't matter here). Good luck (we should propose a new Github badge: Heisenberg bug hunter ;-) To be sure not to break your backups you could also start the BiT GUI since it always executes this code path and should trigger the warning in the console (if you already got it before - otherwise you wouldn't have seen the NoneType error):
|
Hello:
Good.
No idea how that could be. If any application from the Debian repository has some I expect that the version I have installed should be the same one presently available in the Debian Buster (10.4) repository.
Heisenbug ...
The curious thing is that BiT is (apparently) working properly.
I think it may be best to let it run in the same conditions the error cropped up in. And I am not fond of the so called harmless notices. 8^/ I'll edit the *.py file now, reboot and report back when/if I get another notification. Thanks for your input. Best, PCL |
You are using an old but commonly installed BiT version that is probably based on the Debian package (that is OK so far, even Ubuntu 20.04 is using this version). I think this a new kind of bug (race-alike condition between package loading and usage; it already happened earlier which I could see in @emtiu I would like to keep this bug open, since there is no other way of reproducing it but together with the OP. Note to self: Add a hint to the warning how to fix this (eg. link to github README)... |
Hello:
This what is listed there:
There is a newer version in the Debian Bullseye repository (1.2.1-3) and this is reflected in the Devuan Chimaera repository.
Right. Thanks for taking care of this. Best, PCL |
Hello: @aryoda
Previous one was 13 days ago, the only difference being the memory address ie: Edit: I have gone back to the previouys version of Please advise. Thanks in advance, PCL |
@pclinuxer OK, then undo the manual code change. I will keep this issue in my watch list until I find the time for more experiments on this problem... |
Hello:
Best, PCL |
Hello:
@aryoda: I keep getting the same error in my system mail. As always, completely at random and no discernible way to trigger it. Today I came across this article from last year: https://www.freecodecamp.org/news/typeerror-int-object-is-not-callable-how-to-fix-in-python
I cannot make heads or tails from any of that but thought it may be of help to you. Best, PCL |
Excellent hint, the article describes "name shadowing" and would explain our bug if I see one such possible constellation in the code: Lines 39 to 48 in e22c7f2
The variable name I am currently totally busy and will try to provide an experimental code change (rename to I think we even already have a function to check for an available keyring... |
Hello:
Good!
As I never got past rudimentary DOS batch files, I'll take your word for it. 8^D
No problem, I undertsand.
Then that would make it a win-win. Thanks in advance. Best, PCL |
I am just preparing a fix for this (solving the name shadowing) and saw two more problems in the code:
To get rid of 2. solving 1. is key. The usual solution for circular dependencies is to refactor the functions of one module (that are called by the other module) into a new 3rd module. Since Lines 53 to 56 in 1b9e3b3
backintime/qt/qtsystrayicon.py Lines 174 to 178 in 1b9e3b3
|
I will look deeper into it. I assume that wraplines can be replace by vanilla Python module |
Strike, looks very promising! I will move the old function from |
Good plan. "Make it so!" |
…s not callable") * Fix bug: Unhandled exception "TypeError: 'NoneType' object is not callable" in tools.py function __log_keyring_warning (bit-team#820). Logging thread removed and logger module correctly initialized as fix. Is "Heisenbug" so 100 % retesting was not possible. * Refactor: Solved circular dependency between tools.py and logger.py to fix bit-team#820
I would like to close this issue after the fix is merged since it is quite lengthy now and the underlying code is almost completely changed by fix so that I think it is better to start a new issue if it should re-occur. Testing was indeed difficult since it is a "Heisenbug" (sporadic non-reproducible bug)... Please veto if this issue should be kept open... |
Hello: Hope you started off 2024 in form. 8^) On 4 Jan 2024 at 15:22, aryoda wrote:
I had never come across a "Heisenbug" (or had any idea about such a thing) before but due to how it behaves, my guess is that 'lengthy' is just part of the description. That said, thank you very much for staying on top of it.
The very same ones always, never any change but with no discernible parttern but as I have mentioned in my posts, it does not seem (?) to affect BiT peformance but could not swear to that.
Not a veto. But you may want to consider closing issue #820 once the fix is incorporated into the Debian repositories and can be installed via apt update / apt upgrade which is what most (if not all) users will do as part of their 'good practises' routine and I expect would reach the vast majority of Debian/Devuan based distributions. That way, any issue will by default be against the new fixed version. Thank you very much for your patience and steady work with this. Best, PCL |
Our challenge is that we (= BiT developers) do only maintain the source code for the most-recent BiT release (based on our source code) and back porting patches to older BiT versions in distro packages is the job of the package maintainers (in your case Jonathan Wiltshire for Back In Time 1.1.24-0.1 which is quite an old version now - more than 5 years ago). We have decided a few month ago that an issue will be closed once a fix is merged into our "dev" branch Updating distro packages (like for Debian or Devuan) is a downstream process (out of our control and therefore responsibility) so we cannot keep our issues open until each and every distro has incorporated the fixes (and created a new release package). Our next release that includes this fix is planned for end of January 2024 and there is a chance that updating your BiT installation from our source code release may not work due to newer dependencies that may not be fulfill-able on Devuan/Buster (eg. python3 is still 3.7.3 but BiT requires 3.8 since #1358). Applying the patch file of my bug fix for v1.2.4 will also not work I guess since I have also changed a renamed file that What I can offer you is to prepare a patch file for the source code of v1.2.4 that you could use for your installation and also to ask the package maintainer and in the corresponding Debian bug report to incorporate this patch. This would also help to test the fix.
Always happy to help (and would have been helpless without your help 😉 ) |
A distinction must be made between upstream and GNU Linux distributions. Our (upstream) repo including its tickets (Issues & PRs) is focused on upstream and nothing else. It is the policy of the project and do save our spare resources. If the distro package version is to old you have to open a ticket at your distro (and link it here) and wait for response of the package maintainer or take over the packaging at your distro. Especially in your case I see you do use "oldoldstable". You can upgrade to "stable" to be a bit more "fresh" with BIT. If you want a distro package with this Issue fixed you need to wait until the next distro release. Debian (and I assume Devuan, too) won't backport such a trivial bug. Maybe you can trigger the creation of a BIT package in the backports repo of Debian/Devuan. Debian do has an automatic system connecting bug tickets to upstream bug tickets and closing them when upstream was fixed and the related upstream version is packaged for Debian. Not sure why you use "oldoldstable" but asking for backporting a trivial bug fix. I recommend to discuss this topic in your Devuan community to get more insight about how Debian/Devuan do handle such situations. You can also consider using one of the PPAs. I do not like PPAs, too but sometimes there are reasons. All this is on the side of us as upstream. |
…allable * Fix bug: Unhandled exception "TypeError: 'NoneType' object is not callable" in tools.py function __log_keyring_warning (#820). Logging thread removed and logger module correctly initialized as fix. Is "Heisenbug" so 100 % retesting was not possible. * Refactor: Solved circular dependency between tools.py and logger.py to fix #820 Co-authored-by: aryoda <11374410+aryoda@users.noreply.github.com>
@pclinuxer We are preparing our next release soon (scheduled for mid to end of January). |
Hello:
Yes, I understand.
Thanks for the offer but I think you have more than enough on your collective plate/s. I reserve a very strong animosity for the often encountered 'won't fix' replies to a bug report. To me, a 'won't fix' reply is the equivalent of sanctioning sloppy/lazy coding and absolutely opposite to the basic Unix/Linux philosophy. ie: dirt swept under the rug that eventually turns into a mole-hill that people will, sooner or later, trip over.
Abandoned applications I am fond of eg: WiCD and for which I have not found a half-decent alternative, just the useless bloat that seems to be the norm these days. SLiM was also on that list but fortunately someone took up the slack and forked it, so now it is alive again. My ca. 2007 Sun Microsystems Ultra24 WS (Q9550 8Gb) with a three screen setup runs Devuan Beowulf on a backported kernel and a couple of VBox VMs, one headless for PiHole/Unbound DNS. After few HW upgrades during the second/third year, it is still doing a wonderful job as my daily workhorse.
Won't do that, as you say it is trivial and (as far as I have seen) does not affect BiT's performance.
Not a chance, have to use .appimage files every so often but that is about it. Once again, thanks for getting to the bottom of the issue. Best, PCL |
Kudos to you! ❤️ I strongly agree here. But it is the first time I do read this from someone else. |
Hello:
Not being a coder/developer/maintainer usually puts me in a difficult position when I speak out about something as obvious as this, but not saying anything only helps to maintain the status quo. ie: only makes things worse. Thanks for your comment. Best, PCL |
Hello: Just one last word re: #820. Took a while but I finally upgraded my Devuan Beowulf system (via Chimaera) to Daedalus. Once again, thank you very much for your work. Best, PCL |
opensuse 42.2
linux 4.4.87-18.29-default x86_64
backintime 1.1.20
I occasionally receive the error message below during a backup. Probably not a Good Thing.
Unhandled exception in thread started by <function __log_keyring_warning at 0x7fd39670a400>
Traceback (most recent call last):
File "/usr/share/backintime/common/tools.py", line 1463, in __log_keyring_warning
TypeError: 'NoneType' object is not callable
The text was updated successfully, but these errors were encountered: