For some time I am getting the following error (warning?):
ERROR! Session/line number was not unique in database. History logging moved to new session
when working with Jupyter notebook (<XXXX>
is a number, e.g. 9149).
As the same error has been reported for Spyder (Spyder's Warning: "Session/line number not unique in database") my guess is that there is some problem with the IPython kernel logging.
The question is: may there be any relation between running my code and the error?
Is it likely the error is caused by my code? I touch IPython API as following:
import IPython
def beep():
Python.display.display(IPython.display.Audio(url="http://www.w3schools.com/html/horse.ogg", autoplay=True))
def play_sound(self, etype, value, tb, tb_offset=None):
self.showtraceback((etype, value, tb), tb_offset=tb_offset)
beep()
get_ipython().set_custom_exc((Exception,), play_sound)
I use the beep()
function in my code. I also work with large data which results in MemoryError
exceptions.
And more importantly, may the error affect my code behaviour (given I do not try to access the logs)?
[EDIT] It seems the issue is different than Spyder's Warning: "Session/line number not unique in database" as I am able to reproduce it with Jupyter Notebook but not with Spyder.
IPython.display.Audio(url="http://www.w3schools.com/html/horse.ogg", autoplay=True)
inside the function and keep default value as None. Check if None then initiate the soundlogging
module and have rewritten thebeep()
function - the warning is still present.$IPYTHONDIR/profile_default/history.sqlite
file) and see if it still happens.