GithubHelp home page GithubHelp logo

gaubert / gmvault Goto Github PK

View Code? Open in Web Editor NEW
3.5K 3.5K 286.0 7.03 MB

gmail backup software

Home Page: http://www.gmvault.org

License: GNU Affero General Public License v3.0

Makefile 1.06% NSIS 1.88% Shell 0.52% Python 95.95% HTML 0.32% CSS 0.11% Batchfile 0.17%
backup gmail gmvault oauth2 python restore sync

gmvault's People

Contributors

adept avatar brcooley avatar dmd avatar erikvanzijst avatar f1sherman avatar gaubert avatar ghewgill avatar jinnko avatar joeyates avatar marcbelmont avatar srgvg avatar stp-ip avatar u1735067 avatar vasi avatar webspider avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmvault's Issues

python 2.6 needs argparse

argparse is not included by default in python2.6 and needs to be pulled from pypi. Modify setup.py to handle that.

MemoryError

Getting this error:

[...]
Process email num 4281 (imap_id:8908) from 2007-11.
Process email num 4282 (imap_id:8909) from 2007-11.
Process email num 4283 (imap_id:8911) from 2007-11.
Error: .

=== Exception traceback ===
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/gmv/gmv_cmd.py", line 511, in run
    self._sync(args, credential)
  File "/usr/local/lib/python2.6/dist-packages/gmv/gmv_cmd.py", line 464, in _sync
    db_cleaning = args['db-cleaning'], ownership_checking = args['ownership_control'], restart = args['restart'])
  File "/usr/local/lib/python2.6/dist-packages/gmv/gmvault.py", line 859, in sync
    self._create_update_sync(imap_ids, compress = compress_on_disk, ownership_control = ownership_checking)
  File "/usr/local/lib/python2.6/dist-packages/gmv/gmvault.py", line 665, in _create_update_sync
    email_data = self.src.fetch(the_id, imap_utils.GIMAPFetcher.GET_DATA_ONLY )
  File "/usr/local/lib/python2.6/dist-packages/gmv/imap_utils.py", line 112, in wrapper
    return the_func(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/gmv/imap_utils.py", line 326, in fetch
    return self.server.fetch(a_ids, a_attributes)
  File "/usr/local/lib/python2.6/dist-packages/imapclient/imapclient.py", line 673, in fetch
    typ, data = self._imap._command_complete('FETCH', tag)
  File "/usr/lib/python2.6/imaplib.py", line 888, in _command_complete
    typ, data = self._get_tagged_response(tag)
  File "/usr/lib/python2.6/imaplib.py", line 989, in _get_tagged_response
    self._get_response()
  File "/usr/lib/python2.6/imaplib.py", line 906, in _get_response
    resp = self._get_line()
  File "/usr/lib/python2.6/imaplib.py", line 999, in _get_line
    line = self.readline()
  File "/usr/local/lib/python2.6/dist-packages/gmv/mod_imap.py", line 82, in readline
    char = self.read(1)
  File "/usr/local/lib/python2.6/dist-packages/gmv/mod_imap.py", line 59, in read
    chunks.append(data)
MemoryError

=== End of Exception traceback ===

Now I restarted (gmvault sync [email protected] --restart) and it seems to work.
I'll report back if the error occurs again.

Sync does not continue where it left off

Each time I run ./gmvault sync [email protected] it processes emails 1 through 6000 (or so) then crashes with oauth issues. When I restart, it is back at 1 again.

To be clear, it is definitely downloading the same emails again and again because the size of my gmvault-db is not changing at all anymore (it hit 266985472 bytes and isn't growing beyond that). Interestingly that is just a hair below 255MB, coincidence? Also in the output I can see that it is downloading email from 2004, 2005, and 2006 and never going beyond that.

Output from running in debug mode is:

Use gmvault-db /Users/me/gmvault-db.
Activate debugging information.
Oauth will be used for authentication.

no ENV variable $GMVAULT_DIR defined. Set by default $GMVAULT_DIR to $HOME/.gmvault (/Users/me/.gmvault)
Use oauth credentials from /Users/me/.gmvault/[email protected].
Successfully read oauth credentials.

Connect to Gmail server.
66109 emails to be fetched.

Process imap id 1
Process email num 0 (imap_id:1) from 2004-10.
metadata for 1150318477995277245 already exists. Check if different.

Another related question, does gmvault re-download every email each time then discard ones it has already seen?

Thanks,

James

Download chats?

Is it possible for gmvault to download chats? It doesn't look like the full sync does so, and I even tried a custom search (gmvault sync -t custom -g 'is:chat' [email protected]) and they still didn't download.

I have the chats label enabled in the POP/IMAP tab of my account settings.

Full backup only downloads last 1000 emails on googleapps email account

This command
gmvault sync -d E:\mail [email protected]

Only backed up 1000 emails, in an account that easily has 5000 emails.
In the documentation default is set to Full backup?

Result: get all existing ids from disk got all existing ids from disk nb of ids to check: 1000 Number of reconnections: 0. Number of emails quarantined: 0. Number of emails that could not be fetched: 0. Number of emails that were returned empty by gmail: 0

Using a googleapps account with private domain name.
It worked fine with gmail account.

imap-req not working

I tried running this command to get the e-mails from where it had stopped:
./gmvault sync --type=custom --imap-req 'Since 1-Nov-2008 Before 10-Nov-2010' '[email protected]'
I got this error:
gmvault: error: unrecognized arguments: Before 10-Nov-2010 [email protected]

I've also tried this:
./gmvault sync --type custom --imap-req 'Since 1-Nov-2008' '[email protected]'
With error:
gmvault: error: unrecognized arguments: [email protected]

MemoryError on large restore

After restoring the first 19050 emails to a new gmail address (migrating from an old one), I received the following exception (win7 x64, 6gb ram, gmvault 1.5-beta):

Restore email with id 1319881181591886388.
Error: .

=== Exception traceback ===
Traceback (most recent call last):
File "gmv_cmd.py", line 515, in run
File "gmv_cmd.py", line 423, in _restore
File "gmvault.pyc", line 1032, in restore
MemoryError

=== End of Exception traceback ===

When retrying, it raised the same exception after restoring only 6550 mails. I already tried to see if it possible to adjust the amount of reserved memory for python application (as it is possible for Java for example), but apparently there is no such option as Python's memory manager takes care of that.

I haven't done any Python coding myself, but my first guess at a fix would be that some resources need to be freed after a successful iteration of the for-loop starting at line 960 of gmvault.py...

issue when CTRL^C as the .meta file can be zero bytes

=== Exception traceback ===
Traceback (most recent call last):
File "/Users/gaubert/Dropbox/gmvault-data/gmvault-1.6-beta-release/gmvault-v1.6-beta/lib/gmv_cmd.app/Contents/Resources/gmv_cmd.py", line 527, in run
File "/Users/gaubert/Dropbox/gmvault-data/gmvault-1.6-beta-release/gmvault-v1.6-beta/lib/gmv_cmd.app/Contents/Resources/gmv_cmd.py", line 437, in _restore
File "gmvault.pyc", line 974, in restore
File "gmvault.pyc", line 403, in unbury_email
File "gmvault.pyc", line 414, in unbury_metadata
File "json/init.pyc", line 278, in load
File "json/init.pyc", line 326, in loads
File "json/decoder.pyc", line 366, in decode
File "json/decoder.pyc", line 384, in raw_decode
ValueError: No JSON object could be decoded

=== End of Exception traceback ===

typo on home page

Gmvault deals with the most common issues and always let the user with an uncorrupted email database.

Debian Testing; complete failure

Installed by:
wget https://github.com/downloads/gaubert/gmvault/gmvault-v1.0-beta-MacOSX.tar.gz
tar zxvf gmvault-v1.0-beta-MacOSX.tar.gz
cd gmvault-v1.0-beta/bin

james@debian:~/gmvault-v1.0-beta/bin$ ./gmvault sync ############
/home/james/gmvault-v1.0-beta/bin/../lib/python-lib/bin/python: 1: /home/james/gmvault-v1.0-beta/bin/../lib/python-lib/bin/python: Syntax error: "(" unexpected

My installed version of Python is 2.7.2+ if that makes a difference, but I notice you bundled a version so prob not.

Change path of oauth token

Hi,

I save my mailboxes in :

/media/BackUp/Mails/#user#@gmail.com/

and I would like to put all my oauth tokens in :

/media/BackUp/Mails/.gmvault/.

To run backups as follows :

gmvault sync #user#@gmail.com -d /media/BackUp/Mails/#user#@gmail.com/@gmail.com/ -o /media/BackUp/Mails/.gmvault/

But it doesn't work ...

gmvault: error: unrecognized arguments: /media/BackUp/Mails/.gmvault/

Any ideas ?

Thanks for your time,

Regards

TypeError: file() argument 2 must be string, not int

After run gmvault (installed via virtualenv & pip), I got:

Traceback (most recent call last): File "/Users/mysz/gmvault/lib/python2.7/site-packages/gmv/gmv_cmd.py", line 511, in run self._sync(args, credential) File "/Users/mysz/gmvault/lib/python2.7/site-packages/gmv/gmv_cmd.py", line 464, in _sync db_cleaning = args['db-cleaning'], ownership_checking = args['ownership_control'], restart = args['restart']) File "/Users/mysz/gmvault/lib/python2.7/site-packages/gmv/gmvault.py", line 859, in sync self._create_update_sync(imap_ids, compress = compress_on_disk, ownership_control = ownership_checking) File "/Users/mysz/gmvault/lib/python2.7/site-packages/gmv/gmvault.py", line 670, in _create_update_sync gid = gstorer.bury_email(new_data[the_id], local_dir = the_dir, compress = compress) File "/Users/mysz/gmvault/lib/python2.7/site-packages/gmv/gmvault.py", line 254, in bury_email cipher = self.get_encryption_cipher() File "/Users/mysz/gmvault/lib/python2.7/site-packages/gmv/gmvault.py", line 126, in get_encryption_cipher self._encryption_key = credential_utils.CredentialHelper.get_secret_key('%s/%s' % (self._info_dir, self.ENCRYPTION_KEY_FILENAME)) File "/Users/mysz/gmvault/lib/python2.7/site-packages/gmv/credential_utils.py", line 158, in get_secret_key fdesc = open(a_filepath, os.O_CREAT|os.O_WRONLY, 0600) TypeError: file() argument 2 must be string, not int

Replacing line 158:
fdesc = open(a_filepath, os.O_CREAT|os.O_WRONLY, 0600)

to:
fdesc = open(a_filepath, 'w')

helps :)

Error: Cannot find the python executable to set env var PYTHON_BIN on Mac 10.6

When I run gmvault I get the following error:

burkemw3$ gmvault sync [email protected]
Odd. Use default python2.7.x distribution
Error: Cannot find the python executable to set env var PYTHON_BIN.
Please check where your python binary is.

The only thing I've found like this is issue #44, but it doesn't look quite the same. I do not see any visible effect from setting the PYTHON_BIN environment variable.

I have tried various methods installing gmvault including in a virtualenv and with pip and easy_install. I have removed gmvault with pip. After removal and a locate.database update, the locate gmvault command returns nothing.

I am running Mac OS X 10.6.8 with python 2.6.1 at /usr/bin/python.

From pip, gmvault 1.6-beta is installed.

Here is some more debug info I saw requested in another issue:

burkemw3$ sh -x gmvault
+ umask 002
++ unset CDPATH
+++ dirname gmvault
++ cd .
++ pwd
+ HERE=/Users/burkemw3
++ unset CDPATH
++ cd /Users/burkemw3/..
++ pwd
+ GMVAULT_HOME=/Users
+ trap 'rm -f /tmp/gmvault.bootstrap.72868' EXIT
+ '[' -f /Users/lib/python-lib/bin/python ']'
+ '[' -f /Users/bin/python ']'
++ which python2.7
+ PYTHON_BIN=
+ echo 'Odd. Use default python2.7.x distribution'
Odd. Use default python2.7.x distribution
+ '[' '!' ']'
+ echo 'Error: Cannot find the python executable to set env var PYTHON_BIN.'
Error: Cannot find the python executable to set env var PYTHON_BIN.
+ echo 'Please check where your python binary is.'
Please check where your python binary is.
+ exit 1
+ rm -f /tmp/gmvault.bootstrap.72868

Bad CPU type in executable on MacOS?

Running 1.5 on Mac OS 10.6.8, I get the following:

% ./gmvault sync [email protected]
./gmvault: line 28: /Applications/gmvault-v1.5-beta/lib/gmv_cmd.app/Contents/MacOS/gmv_cmd: Bad CPU type in executable

This is an older Mac, the processor is a 1.66GHz Intel Core Duo. Does it lack some feature that your app needs? Any ideas?

thanks!

Gracefully handle outage when backing up to a remote directory

I'm using a Bitcasa folder as my backup directory but the same issue would occur in any scenario where the backup location was temporarily unavailable.

The specific error in this case was:

=== Exception traceback ===
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/gmv/gmv_cmd.py", line 511, in run
self._sync(args, credential)
File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/gmv/gmv_cmd.py", line 488, in _sync
ownership_checking = args['ownership_control'], restart = args['restart'])
File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/gmv/gmvault.py", line 859, in sync
self._create_update_sync(imap_ids, compress = compress_on_disk, ownership_control = ownership_checking)
File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/gmv/gmvault.py", line 610, in _create_update_sync
gstorer = GmailStorer(self.db_root_dir, self.use_encryption)
File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/gmv/gmvault.py", line 86, in init
gmvault_utils.makedirs(self._db_dir)
File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/gmv/gmvault_utils.py", line 353, in makedirs
os.makedirs(aPath)
File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)

"Duplicate folder name" during restore

New user of v1.0-beta. Happy user. I downloaded all 20,000 emails from one Gmail account and restored them to another. Everything worked, even more easily than I hoped.

So, then I tried the same thing with another Gmail account. Downloaded all 2,000 emails as problem-free as before. But when I went to restore them to another Gmail account, only two of the emails were restored before I hit this error:

Error create failed: '[ALREADYEXISTS] Duplicate folder name (Failure)'. For more information see log file.

I can't find the log file. It's not in the .gmvault directory. It's not in the gm-vault.db directory. It's not in the directory where gmvault itself is installed. Rerunning with --debug doesn't seem to create a log file, either. In both cases, a log is dumped to the screen (which is where I pulled the error message above), but I can't find any more information about what this error means or how to get around it. It's repeatable.

Help, please.

Add clean Windows installer/uninstaller

Add a windows uninstaller that cleans the Gmvault installation.
Integrate Gmvault in Windows in order for it to be uninstallable from the Control Panel Remove Program.
Have a proper installation that do not need Admin privileges (No install in C:\Program Files)

gmvault must be run from a specific directory

$ bin/gmvault
bin/gmvault: line 43: /Users/danielheath/projects/gmvault/../lib/python-lib/bin/python: No such file or directory

Could gmvault detect the right load path instead of requiring that it be run from a specific folder?

"No module named response_parser" while building on Arch Linux

Hello.

I'm trying to create PKGBUILD for Arch Linux. I'm not very experienced in python, therefore maybe I'm missing something.

My PKGBUILD is plain simple. But building using "pip install gmvault" gives me following error:

Downloading/unpacking gmvault
  Downloading gmvault-1.5-beta.tar.gz (51Kb): 51Kb downloaded
  Running setup.py egg_info for package gmvault
    PATH = /home/kraken/abs/gmvault-beta/src/gmvault-1.5-beta/build/gmvault/./src/gmv/gmv_cmd.py

    1.5-beta
    Gmvault version = 1.5-beta


Downloading/unpacking Logbook==0.3 (from gmvault)
  Downloading Logbook-0.3.tar.gz (89Kb): 89Kb downloaded
  Running setup.py egg_info for package Logbook

Downloading/unpacking IMAPClient==0.8.1 (from gmvault)
  Downloading IMAPClient-0.8.1.zip (107Kb): 107Kb downloaded
  Running setup.py egg_info for package IMAPClient
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/home/kraken/abs/gmvault-beta/src/gmvault-1.5-beta/build/IMAPClient/setup.py", line 14, in <module>
        import imapclient
      File "imapclient/__init__.py", line 22, in <module>
        from response_parser import *
    ImportError: No module named response_parser
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/home/kraken/abs/gmvault-beta/src/gmvault-1.5-beta/build/IMAPClient/setup.py", line 14, in <module>

    import imapclient

  File "imapclient/__init__.py", line 22, in <module>

    from response_parser import *

ImportError: No module named response_parser

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/kraken/abs/gmvault-beta/src/gmvault-1.5-beta/build/IMAPClient
Storing complete log in /home/kraken/.pip/pip.log

Hangs on specific email, eats up all computer memory and CPU until full system hang

I've been trying to backup my Gmail account using the standard command (./gmvault sync email) a few times now, but unfortunately it always hangs on a specific email (num 7045 of 13213).

While it moves smoothly through the previous 7044 emails, it stops moving on #7045 while consuming all the available memory. This morning I woke up to the OS X out of memory window, with most of the other apps on my system completely frozen. I had to to a hard reboot using the power botton.

It has been stuck on #7045 for about 45 minutes now. The gmv_cmd uses 1,20GB Memory and 99,9% of the CPU. If I don't cancel it soon, my system'll hang like it did last night.

ImportError: No module named gmv.gmv_cmd

Getting this after installing via pip:

> gmvault sync [email protected]
Odd. Use default python2.7.x distribution
Traceback (most recent call last):
  File "/tmp/gmvault.bootstrap.1637", line 1, in <module>
    import gmv.gmv_cmd as runner
ImportError: No module named gmv.gmv_cmd

I noticed Python 2.6 and 2.7 installed:

> dpkg --get-selections | grep python
libpython2.6                    install
python                      install
python-apt                  install
python-central                  install
python-gnupginterface               install
python-minimal                  install
python-pkg-resources                install
python-pycurl                   install
python-setuptools               install
python-software-properties          install
python-support                  install
python2.6                   install
python2.6-minimal               install
python2.7                   install
python2.7-minimal               install

So I uninstalled python2.7 and python2.7-minimal and now I get

> gmvault sync [email protected]
Odd. Use default python2.7.x distribution
Error: Cannot find the python executable to set env var PYTHON_BIN.
Please check where your python binary is.

Even if I set PYTHON_BIN it doesn't work:

> which python
/usr/bin/python

> export PYTHON_BIN=/usr/bin/python

> echo $PYTHON_BIN
/usr/bin/python

> gmvault sync [email protected]
Odd. Use default python2.7.x distribution
Error: Cannot find the python executable to set env var PYTHON_BIN.
Please check where your python binary is.

I might have messed it up and it might now be directly related to Gmvault but I would appreciate any ideas how I could solve this...
Thanks!

restart option is not available

My first sync attempt failed after email 9035 (throttled) so I'd like to use the restart feature. Using gmvault sync --restart results in an error:

gmvault: error: unrecognized arguments: --restart

Cannot find the python executable to set env var PYTHON_BIN

When gmvault is installed with pip install --user gmvault, attempting to run gmvault sync [email protected] fails with the following error:

Cannot find the python executable to set env var PYTHON_BIN.
Please check where your python binary is.

Editing the the gmvault script to set $PYTHON_BIN=python fixes it, but that's probably not ideal.

Suggestion: Option to disable email compression

I'd like to be able to easily disable the use of gzip compression on the archived emails, in favour of being able to compress them myself for long term storage using a better compression algorithm like xz.

Enhance Error Reporting

The error reporting needs to be enhanced and saved somewhere in a file.
Create a format that could be reused by a tool to clean these emails out from Gmail

gmvault sync -t custom -g 'in:labelname' not working

I'm running the latest version of the gmvault (installed via the windows installer, downloaded today) on Win7. When I try backing up a specific label then nothing gets downloaded:

gmvault-shell>gmvault sync --type custom -g 'in:programs' --debug [email protected]

Use gmvault-db located in C:\Users\Hrafnkell/gmvault-db.

Activate debugging information.
Debugging logs are going to be saved in file C:\Users\Hrafnkell/gmvault.log.

Authentication performed with Gmail XOAuth token.

no ENV variable $GMVAULT_DIR defined. Set by default $GMVAULT_DIR to $HOME/.gmvault (C:\Users\Hrafnkell/.gmvault)
Get XOAuth credential from C:\Users\Hrafnkell/.gmvault/[email protected].

Successfully read oauth credentials.

Connect to Gmail server.
Perform custom synchronisation with request: 'in:labelname'
0 emails to be fetched.
db_cleaning is off so ignore removing deleted emails from disk.

================================================================
Number of reconnections: 0.
Number of emails quarantined: 0.
Number of emails that could not be fetched: 0.
Number of emails that were returned empty by gmail: 0
================================================================

gmvault-shell>gmvault sync -t custom -g 'in:programs' --debug [email protected]

Note that searching web gmail for in:labelname returns plenty of results. Running gmvault sync [email protected] works fine.

Am I doing something wrong or is this an actual issue?

Error 'NoneType' object is not iterable.

Downloaded gmvault-v1.0-beta onto a Mac running Mac OS 10.7.3 (Lion).

Successfully connected using OAuth but unable to read any mail due to error. Here is the complete console:

○ ./gmvault sync [email protected]

Use gmvault-db /Users/mark/gmvault-db.
Oauth will be used for authentication.

Use oauth credentials from /Users/mark/.gmvault/[email protected].
Successfully read oauth credentials.

Connect to Gmail server.
Error 'NoneType' object is not iterable. For more information see log file

usage: gmvault [-h] [-v] {restore,sync} ...

optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit

subcommands:
{restore,sync} valid subcommands.
sync synchronize with given gmail account.
restore restore gmvault-db to a given email account.

Examples:

a) Get help for each of the individual commands

> gmvault sync -h

> gmvault restore --help

I am unable to find the log to see any additional information.

Subsequent attempts result in the same error. Attempt using -p parameter and account password also fails with the same error.

Encryption

On http://gmvault.org/ it says Gmvault can encrypt the backed up mails.
I couldn't find any info on that in the documentation. Is this a feature that's planned for the future?

Problem with PYTHONHOME

When I run the application on Debian linux I get:
./gmvault
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
ImportError: No module named site

Cannot get XOAuth token from Gmail

Below is the error that I get wen I try to sync my gmail account. It is not allowing me to authenticate for some reason. I'm attempting this on Windows Home Server 2011 (essentially Win 7). I am behind a firewall and a router if that makes a difference. Also, there does not appear to be an issue with the time. Thanks.


Welcome to gmvault (version 1.5-beta).

Run gmvault --help to display the help.
Run gmvault {command} --help to display help for specific commands.

gmvault-shell>gmvault sync [email protected]

Use gmvault-db located in C:\Users\Administrator/gmvault-db.

Authentication performed with Gmail XOAuth token.

Initiate interactive session to get XOAuth token from Gmail.

Is your system clock up to date? See the FAQ http://code.google.com/p/googlecl/w
iki/FAQ#Timestamp_too_far_from_current_time
Error: Cannot get XOAuth token from Gmail. See Gmail error message.

=== Exception traceback ===
Traceback (most recent call last):
File "gmv_cmd.py", line 507, in run
File "credential_utils.pyc", line 315, in get_credential
Exception: Cannot get XOAuth token from Gmail. See Gmail error message

=== End of Exception traceback ===

gmvault-shell>

MaxOSX : image not found

Hi,

when I try to launch gmailvault, I've got the following :

~/Downloads/gmvault-v1.0-beta/bin $ ./gmvault 
dyld: Library not loaded: @executable_path/../.Python
  Referenced from: /Users/jp/Downloads/gmvault-v1.0-beta/bin/../lib/python-lib/bin/python
  Reason: image not found
./gmvault: line 43:   569 Trace/BPT trap          $PYTHON_BIN /tmp/rnpicker.bootstrap.$$ $ARGS

MacOSX 10.6.8

error when restoring mail

using windows gmvault 1.0beta

when restoring mail to another address

I get this error:

Restore email with id 1372317707363560697.
Error 'int' object has no attribute 'split'. For more information see log file

cannot execute binary file

Hi,

I've got some problems with gmvault on Linux. Here's some information about my system:

  • What version of Gmvault do you use ?

v1.0-beta

  • What version of Gmvault do you use ?

CentOS 5 (2.6.18-274.12.1.el5xen #1 SMP Tue Nov 29 14:18:21 EST 2011 x86_64 x86_64 x86_64 GNU/Linux)

  • Type of requests (Bug, documentation issue, features) ?

It's a bug, I suppose.

  • Explain the request subject (issue details, feature details):
  • In case of bug or issue, please detail how we can reproduce the problem:

When I try to start gmvault, I get the following error:

bin » ./gmvault sync [email protected]             
./gmvault: line 43: /home/phil/gmvault-v1.0-beta/bin/../lib/python-lib/bin/python: cannot execute binary file
bin »      

Any ideas?

Execution fails on Ubuntu 12.04

When I try to run this on Ubuntu 12.04 I get the following error:

gmvault-v1.0-beta/bin$ ./gmvault
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
ImportError: No module named site

TypeError: 'NoneType' object is not iterable while trying default sync

  • What version of Gmvault do you use ?

Gmvault v1.0-beta

  • On what Operating System (Linux flavour, MacOSX, Win7/XP/Vista) ?

Windows 7

  • Type of requests (Bug, documentation issue, features) ?

Bug

  • Explain the request subject (issue details, feature details):

Note I did not install it to default Program Files (I installed it on another hdd). Problem occurs with and without admin privileges.

Tried out the sync using the tutorial on the website (so gmvault sync myemail@gmail.com). After granting access I get an error. This is in gmvault.log:

[2012-05-07 15:05]:CRITICAL:oauth:Oauth will be used for authentication.

[2012-05-07 15:05]:DEBUG:gmvault_utils:no ENV variable $GMVAULT_DIR defined. Set by default $GMVAULT_DIR to $HOME/.gmvault (C:\Users\David/.gmvault)
[2012-05-07 15:05]:CRITICAL:oauth:Use oauth credentials from C:\Users\David/.gmvault/myemail@gmail.com.oauth.
[2012-05-07 15:05]:CRITICAL:oauth:Successfully read oauth credentials.

[2012-05-07 15:05]:CRITICAL:gmv:Connect to Gmail server.
[2012-05-07 15:05]:CRITICAL:gmv:Error 'NoneType' object is not iterable. For more information see log file

[2012-05-07 15:05]:ERROR:gmv:Traceback (most recent call last):
File "gmv_cmd.py", line 471, in run
File "gmv_cmd.py", line 415, in _sync
File "gmvault.pyc", line 450, in init
File "imap_utils.pyc", line 234, in connect
File "imapclient\imapclient.pyc", line 296, in select_folder
File "imapclient\imapclient.pyc", line 826, in _encode_folder_name
File "imapclient\imap_utf7.pyc", line 37, in encode
TypeError: 'NoneType' object is not iterable

Traceback (most recent call last):
File "gmv_cmd.py", line 471, in run
File "gmv_cmd.py", line 415, in _sync
File "gmvault.pyc", line 450, in init
File "imap_utils.pyc", line 234, in connect
File "imapclient\imapclient.pyc", line 296, in select_folder
File "imapclient\imapclient.pyc", line 826, in _encode_folder_name
File "imapclient\imap_utf7.pyc", line 37, in encode
TypeError: 'NoneType' object is not iterable

ValueError: No JSON object could be decoded

running 1.5beta on linux I have the following error after processing a few thousand emails with enabled --debug option:

Cannot read file 1270201418045012345.meta. Try to fetch the data again
Traceback (most recent call last):
File "/home/ratson/Downloads/gmvault-1.5-beta/local/lib/python2.7/site-packages/gmv/gmvault.py", line 547, in check_email_on_disk
return a_gstorer.unbury_metadata(a_id, a_dir)
File "/home/ratson/Downloads/gmvault-1.5-beta/local/lib/python2.7/site-packages/gmv/gmvault.py", line 405, in unbury_metadata
metadata = json.load(meta_fd)
File "/usr/lib/python2.7/json/init.py", line 278, in load
**kw)
File "/usr/lib/python2.7/json/init.py", line 326, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Error: file() argument 2 must be string, not int.

=== Exception traceback ===
Traceback (most recent call last):
File "/home/ratson/Downloads/gmvault-1.5-beta/local/lib/python2.7/site-packages/gmv/gmv_cmd.py", line 511, in run
self._sync(args, credential)
File "/home/ratson/Downloads/gmvault-1.5-beta/local/lib/python2.7/site-packages/gmv/gmv_cmd.py", line 464, in _sync
db_cleaning = args['db-cleaning'], ownership_checking = args['ownership_control'], restart = args['restart'])
File "/home/ratson/Downloads/gmvault-1.5-beta/local/lib/python2.7/site-packages/gmv/gmvault.py", line 859, in sync
self._create_update_sync(imap_ids, compress = compress_on_disk, ownership_control = ownership_checking)
File "/home/ratson/Downloads/gmvault-1.5-beta/local/lib/python2.7/site-packages/gmv/gmvault.py", line 670, in _create_update_sync
gid = gstorer.bury_email(new_data[the_id], local_dir = the_dir, compress = compress)
File "/home/ratson/Downloads/gmvault-1.5-beta/local/lib/python2.7/site-packages/gmv/gmvault.py", line 254, in bury_email
cipher = self.get_encryption_cipher()
File "/home/ratson/Downloads/gmvault-1.5-beta/local/lib/python2.7/site-packages/gmv/gmvault.py", line 126, in get_encryption_cipher
self._encryption_key = credential_utils.CredentialHelper.get_secret_key('%s/%s' % (self._info_dir, self.ENCRYPTION_KEY_FILENAME))
File "/home/ratson/Downloads/gmvault-1.5-beta/local/lib/python2.7/site-packages/gmv/credential_utils.py", line 158, in get_secret_key
fdesc = open(a_filepath, os.O_CREAT|os.O_WRONLY, 0600)
TypeError: file() argument 2 must be string, not int

=== End of Exception traceback ===

No attribute ‘InternalDate’

The imapclient module makes use of imaplib2's InternalDate and Mon2Num. However, in imaplib2 those objects aren't exposed in the all declaration and thus gmvault fails:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gmv/gmv_cmd.py", line 511, in run
    self._sync(args, credential)
  File "/usr/local/lib/python2.7/dist-packages/gmv/gmv_cmd.py", line 464, in _sync
    db_cleaning = args['db-cleaning'], ownership_checking = args['ownership_control'], restart = args['restart'])
  File "/usr/local/lib/python2.7/dist-packages/gmv/gmvault.py", line 859, in sync
    self._create_update_sync(imap_ids, compress = compress_on_disk, ownership_control = ownership_checking)
  File "/usr/local/lib/python2.7/dist-packages/gmv/gmvault.py", line 635, in _create_update_sync
    new_data = self.src.fetch(the_id, imap_utils.GIMAPFetcher.GET_ALL_BUT_DATA )
  File "/usr/local/lib/python2.7/dist-packages/gmv/imap_utils.py", line 112, in wrapper
    return the_func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gmv/imap_utils.py", line 326, in fetch
    return self.server.fetch(a_ids, a_attributes)
  File "/usr/local/lib/python2.7/dist-packages/imapclient/imapclient.py", line 685, in fetch
    return parse_fetch_response(data, self.normalise_times, self.use_uid)
  File "/usr/local/lib/python2.7/dist-packages/imapclient/response_parser.py", line 95, in parse_fetch_response
    msg_data[word] = _convert_INTERNALDATE(value, normalise_times)
  File "/usr/local/lib/python2.7/dist-packages/imapclient/response_parser.py", line 136, in _convert_INTERNALDATE
    mo = imaplib.InternalDate.match('INTERNALDATE "%s"' % date_string)
AttributeError: 'module' object has no attribute 'InternalDate'

This is Python 2.7 on Ubuntu 10.04. imaplib v2.28, imapclient v0.81, gmvault v1.5-beta.

Cheers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.