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

Encoding issues with SQLite #73

Open
gpoo opened this issue Sep 14, 2016 · 3 comments
Open

Encoding issues with SQLite #73

gpoo opened this issue Sep 14, 2016 · 3 comments

Comments

@gpoo
Copy link
Member

gpoo commented Sep 14, 2016

As reported by @MishiR in issue #72, it seems to be encoding issues when storing the data on SQLite.

sqlalchemy.exc.ProgrammingError: (sqlite3.ProgrammingError)
You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str).
It is highly recommended that you instead just switch your application to Unicode strings
[SQL: u'INSERT INTO messages (message_id, mailing_list_url, mailing_list, first_date,
                              first_date_tz, arrival_date, arrival_date_tz, subject,
                              message_body, is_response_of, mail_path)
 VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)']
[parameters: (
 u'<[email protected]<mailto:[email protected]>>',
 'https://mail.gnome.org/archives/gnome-devel-list',
 None,
'1999-12-25 18:09:52.000000',
 3600.0,
 '2000-05-11 23:18:34.000000',
 None,
 u'Re: Solaris_x86, libgtop and kstat...',
 u"Markus D\xf6hr <[email protected]<mailto:[email protected]>> writes:\n\n> I'm tryin' to compile gnome-utils-1.0.50 on a Intel SunOS 5.7 after\n> following the excellent document ... (1367 characters truncated) ... 't list -lkstat as a dependency -\nI'll fix this in LibGTop asap.\n\n-- \nMartin Baulig - [email protected]<mailto:[email protected]> - http://www.home-of-linux.org<http://www.home-of-linux.org/>\n\n", 'Markus D\xf6hr\'s message of "Thu, 23 Dec 1999 03:55:25 +0100"',
 None)]

The command line executed was:

$ sudo mlstats --db-driver=sqlite --db-name=gnome.db https://mail.gnome.org/archives/gnome-devel-list/
@gpoo
Copy link
Member Author

gpoo commented Sep 14, 2016

Nothing related, but sudo is not required and should not be used.

@MishiR
Copy link

MishiR commented Sep 14, 2016

Hi,

If I do not use sudo:

mlstats --db-driver=sqlite --db-name=gnome.db https://mail.gnome.org/archives/gnome-devel-list/

I get an error:

Unknown URL or directory: https://mail.gnome.org/archives/gnome-devel-list/. Skipping.
0 messages analysed
0 messages stored in database gnome.db
0 messages ignored by the parser
INFO: Everything seems to be ok.

/BR

Mehvish Rashid

From: Germán Poo-Caamaño [mailto:[email protected]]
Sent: 14 September 2016 01:35
To: MetricsGrimoire/MailingListStats
Cc: Mehvish.Rashid; Mention
Subject: Re: [MetricsGrimoire/MailingListStats] Encodoing issues with SQLite (#73)

Nothing related, but sudo is not required and should not be used.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/73#issuecomment-246870378, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ANq6cmw69HauaXzlGTsLfSufICljToMkks5qp0ElgaJpZM4J8Sbe.

@gpoo gpoo changed the title Encodoing issues with SQLite Encoding issues with SQLite Sep 15, 2016
@gpoo
Copy link
Member Author

gpoo commented Sep 17, 2016

Maybe you are running the command in a directory where your user does not permissions.

Nevertheless, I have not had time to look at the issue. I will try to replicate it.

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

2 participants