Bitmessage gets some errors on starting #896

Closed
opened 2016-08-30 16:05:24 +02:00 by joerndyherrn · 12 comments
joerndyherrn commented 2016-08-30 16:05:24 +02:00 (Migrated from github.com)

Today in the morning PyBitmessage worked well. But now I get some errors:

Traceback (most recent call last): File "../PyBitmessage/src/bitmessagemain.py", line 17, in <module> import singletonFile "/home/system/PyBitmessage/src/singleton.py", line 8, in <module> import sharedFile "/home/system/PyBitmessage/src/shared.py", line 982, in <module> from debug import loggerFile "/home/system/PyBitmessage/src/debug.py", line 26, in <module> helper_startup.loadConfig() File "/home/system/PyBitmessage/src/helper_startup.py", line 48, in loadConfigshared.config.read(shared.appdata + 'keys.dat') File "/usr/lib/python2.7/ConfigParser.py", line 305, in readself._read(fp, filename) File "/usr/lib/python2.7/ConfigParser.py", line 512, in _readraise MissingSectionHeaderError(fpname, lineno, line) ConfigParser.MissingSectionHeaderError: File contains no section headers.file: /home/system/.config/PyBitmessage/keys.dat, line: 1

Using PyBitmessage with Linux OS

Today in the morning PyBitmessage worked well. But now I get some errors: `Traceback (most recent call last): File "../PyBitmessage/src/bitmessagemain.py", line 17, in <module> import singletonFile "/home/system/PyBitmessage/src/singleton.py", line 8, in <module> import sharedFile "/home/system/PyBitmessage/src/shared.py", line 982, in <module> from debug import loggerFile "/home/system/PyBitmessage/src/debug.py", line 26, in <module> helper_startup.loadConfig() File "/home/system/PyBitmessage/src/helper_startup.py", line 48, in loadConfigshared.config.read(shared.appdata + 'keys.dat') File "/usr/lib/python2.7/ConfigParser.py", line 305, in readself._read(fp, filename) File "/usr/lib/python2.7/ConfigParser.py", line 512, in _readraise MissingSectionHeaderError(fpname, lineno, line) ConfigParser.MissingSectionHeaderError: File contains no section headers.file: /home/system/.config/PyBitmessage/keys.dat, line: 1` Using PyBitmessage with Linux OS
bmng-dev commented 2016-08-30 16:59:18 +02:00 (Migrated from github.com)

ConfigParser.MissingSectionHeaderError: File contains no section headers.

Your keys.dat is empty or otherwise malformed. Did you make any changes to it since PyBitmessage last worked?

> ConfigParser.MissingSectionHeaderError: File contains no section headers. Your keys.dat is empty or otherwise malformed. Did you make any changes to it since PyBitmessage last worked?
joerndyherrn commented 2016-08-30 17:14:19 +02:00 (Migrated from github.com)

No I didn't

No I didn't
joerndyherrn commented 2016-08-30 17:14:26 +02:00 (Migrated from github.com)

That's the problem
I shut down and now started and got these problems

That's the problem I shut down and now started and got these problems
PeterSurda commented 2016-08-30 17:51:53 +02:00 (Migrated from github.com)

There should be a backup file if something goes wrong with keys.dat. It looks like "keys.dat.20160830123456". Backup the broken file and copy the old backup as keys.dat, let's see if that helps.

There should be a backup file if something goes wrong with keys.dat. It looks like "keys.dat.20160830123456". Backup the broken file and copy the old backup as keys.dat, let's see if that helps.
joerndyherrn commented 2016-08-30 19:47:10 +02:00 (Migrated from github.com)

Where should this file be?
Edit: Searched everywhere with "find" command... nothing :/

Where should this file be? Edit: Searched everywhere with "find" command... nothing :/
joerndyherrn commented 2016-08-30 20:28:18 +02:00 (Migrated from github.com)

Just installed everything new and there are problems with python: http://hastebin.com/fusuraradi.rb / http://pastebin.com/u3ZHbE0m

Just installed everything new and there are problems with python: http://hastebin.com/fusuraradi.rb / http://pastebin.com/u3ZHbE0m
PeterSurda commented 2016-08-30 21:56:38 +02:00 (Migrated from github.com)

The new messages are informative, even though it says ERROR and prints a stack trace. You can try the "v0.6" branch if you want the default logs to be less chatty.

The backup file should be alongside the normal keys.dat, which on Linux is ~/.config/PyBitmessage/, or if you have the environment variable XGD_CONFIG_HOME set, under $XDG_CONFIG_HOME/PyBitmessage/.

The new messages are informative, even though it says ERROR and prints a stack trace. You can try the "v0.6" branch if you want the default logs to be less chatty. The backup file should be alongside the normal keys.dat, which on Linux is `~/.config/PyBitmessage/`, or if you have the environment variable `XGD_CONFIG_HOME` set, under `$XDG_CONFIG_HOME/PyBitmessage/`.
bmng-dev commented 2016-08-31 07:15:05 +02:00 (Migrated from github.com)

Perhaps informative ERRORs should have a reduced severity?

Personally though, I don't like the idea of informative errors - they are generally an indication of poor code or an incomplete function/class/module/feature and should be resolved. For example checking the existence of namecoin.conf before attempting to open it would eliminate the IOError: [Errno 2] No such file or directory: '/home/system/.namecoin/namecoin.conf. Not everything will be that simple of course but it demonstrates the point.

Perhaps informative ERRORs should have a reduced severity? Personally though, I don't like the idea of informative errors - they are generally an indication of poor code or an incomplete function/class/module/feature and should be resolved. For example checking the existence of namecoin.conf before attempting to open it would eliminate the `IOError: [Errno 2] No such file or directory: '/home/system/.namecoin/namecoin.conf`. Not everything will be that simple of course but it demonstrates the point.
PeterSurda commented 2016-08-31 10:16:03 +02:00 (Migrated from github.com)

I already reduced severity in recent commits, but thank you for the suggestion, I can add that too.

I already reduced severity in recent commits, but thank you for the suggestion, I can add that too.
PeterSurda commented 2016-08-31 10:27:42 +02:00 (Migrated from github.com)

@bmng-dev Is that better?

@bmng-dev Is that better?
bmng-dev commented 2016-08-31 11:44:09 +02:00 (Migrated from github.com)

@PeterSurda, you don't need my approval you know. You are in control and can do whatever you want. I'm just providing hopefully constructive criticism. Anyway it's a start and as long as it doesn't stop there I'm fine with it.

@PeterSurda, you don't need my approval you know. You are in control and can do whatever you want. I'm just providing hopefully constructive criticism. Anyway it's a start and as long as it doesn't stop there I'm fine with it.
PeterSurda commented 2017-03-01 17:52:30 +01:00 (Migrated from github.com)

Ok I reworked this and got no more complaints so I'm closing this.

Ok I reworked this and got no more complaints so I'm closing this.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-12-09#896
No description provided.