Comments (23)
Hi,
Can you share a screenshot of what you're seeing? Make sure to block out any private information, of course.
from import-mailbox-to-gmail.
Nothing actually, no error message. I just run the command replacing the location of the json file and the mbox folder. But, nothing happens.
from import-mailbox-to-gmail.
try looking in the log file, which method are you using? Windows/Linux?
from import-mailbox-to-gmail.
Where I can view the log file? I am using Windows.
from import-mailbox-to-gmail.
The log file should be import-mbox-to-gmail.log
. If you can't find it, can you share a screenshot of the command you're running?
from import-mailbox-to-gmail.
Hi,
Please excuse me for jumping in on this thread, but I'm having the same issue. Using Win 2012 server... running the final command gets no response from the Windows Command line (as admin). However I do get syntax errors using the Python command line.
Created folders as instructed. c:\mbox\
User folder is [email protected]
I also placed the JSON file in the C:\mbox directory.
Here's the command I'm running...
import-mbox-to-gmail.py --json c:\mbox\GmailRestore-605fbe12b095.json --dir c:\mbox\[email protected] --replaceqp >> import-mbox-to-gmail.log 2>&1
I can't see the error. Do I need to include the actual .mbox file in the user directory folder in the path?
e.g. "c:\mbox\[email protected]\restored.mbox"
from import-mailbox-to-gmail.
- Even if you are migrating only one user, the folder you need to point the script at is still the one with the user's folder in it, not directly to the user's folder. In your case, you should run it with "
--dir c:\mbox
" instead of "--dir c:\mbox\[email protected]
", if I understand your setup correctly. - Yes, in this case, the mbox file would be in "
c:\mbox\[email protected]\restored.mbox
".
If it still doesn't work, check the contents of the log file (import-mbox-to-gmail.log), and share it here (with a screenshot of any errors you're seeing in the commandline). Please make sure it doesn't include any private information, of course (such as the JSON file contents, etc.).
from import-mailbox-to-gmail.
Hi guys,
if you type "c:\ more import-mbox-to-gmail.log
that should display the contents of the error log another method would be to remove everything after the --replaceqp so your command would look like this
mbox-to-gmail.py --json c:\mbox\GmailRestore-605fbe12b095.json --dir
c:\mbox\[email protected] --replaceqp
from import-mailbox-to-gmail.
log file contents
'import-mbox-to-gmail.py' is not recognized as an internal or external command,
operable program or batch file.
from import-mailbox-to-gmail.
Make sure you run the command from inside the importer directory see attached:
from import-mailbox-to-gmail.
- Make sure that you closed the Command Prompt window and opened a new one after installing Python. Otherwise, it won't recognize Python scripts.
- If it still doesn't work, try adding "python" in the beginning, e.g. instead of "import-mbox-to-gmail.py ..." use "python import-mbox-to-gmail.py ...".
- If that doesn't work either, try the full python.exe path, e.g. "C:\Python27\python.exe import-mbox-to-gmail.py ..."
from import-mailbox-to-gmail.
Boom! Got it!
Here are the issues I had to resolve:
- I had not created an "importer" file containing the import-mailbox-to-gmail.py as seen in the directory structure above
- Did a "save link as..." out of the browser for the .py file. Had to go back and copy the raw text into the .py file to get rid of HTML language in the save
- The command calls for "import-mbox-to-gmail.py" but the correct name is "import-mailbox-to-gmail.py"
- Adding C:\Python27\python.exe to the beginning of the command line was necessary.
Final working command:
C:\Python27\python.exe import-mailbox-to-gmail.py --json c:\importer\GmailRestore.json --dir c:\mbox\ --replaceqp >> import-mbox-to-gmail.log 2>&1
Thanks for everyones input. Makes my life a whole lot easier not having to restore user emails using Thunderbird.
from import-mailbox-to-gmail.
Thank you everyone for all the detailed steps. I am following them and will post back with an update about how it went for me.
from import-mailbox-to-gmail.
I updated the instructions based on your feedback - thanks! If you still encounter any issues please reopen this issue.
from import-mailbox-to-gmail.
I followed all the above steps. Now, after running the command, the cursor is blinking. Does that mean that it is in the process of importing?
Also, see I the folder named "Imported Messages" inside my gmail account. But, there are no messages in it.
from import-mailbox-to-gmail.
If the cursor is blinking it means it's running, yes. You should be able to see progress in the log (import-mbox-to-gmail.log).
If no messages are being imported, can you check for any errors/exceptions in the log?
from import-mailbox-to-gmail.
I am getting these errors HttpError 400 and HttpAccessTokenRefreshError
from import-mailbox-to-gmail.
For both errors, they should appear with some more context that would tell you why it failed.
Example for HttpError 400:
HttpError: <HttpError 400 when requesting https://www.googleapis.com/upload/gmail/v1/users/user%40domain.com/messages/import?internalDateSource=dateHeader&neverMarkSpam=true&fields=id&uploadType=multipart&processForCalendar=false&alt=json returned "Invalid From header">
In this case, the reason it failed is an invalid From header. To find which message you need to fix, look for a line above the error that say something like Processing message 2 in label 'INBOX'
, this will tell you which message in which mbox file failed.
Example for HttpAccessTokenRefreshError:
HttpAccessTokenRefreshError: invalid_grant: Not a valid email.
In this case, the reason it failed is that the email address isn't valid (doesn't exist).
If you've encountered different errors from these, please paste the full error text here and I'll take a look.
Thanks!
from import-mailbox-to-gmail.
Thanks. I will try the process again.
from import-mailbox-to-gmail.
I'm also having trouble with the last step. (Running on a Mac.)
My command is:
/Users/VG/Downloads/import-mailbox-to-gmail.py --json /Users/VG/Downloads/Gmail API-[INFO DELETED].json --dir /Users/VG/Desktop/mbox
And the log error is:
-bash: /Users/VG/Downloads/import-mailbox-to-gmail.py: Permission denied
I've tried running the first bit as in the README (./import-mailbox.... at the start) and tweaking other bits inc. file permissions, but with no success.
Any help greatly appreciated. Thanks.
from import-mailbox-to-gmail.
Try running it with:
python /Users/VG/Downloads/import-mailbox-to-gmail.py --json /Users/VG/Downloads/Gmail API-[INFO DELETED].json --dir /Users/VG/Desktop/mbox
i.e. add python
in the beginning.
from import-mailbox-to-gmail.
i contacted liron (the script author) and the README has been changed to fix this
from import-mailbox-to-gmail.
Fixed in commit 531e4ae.
from import-mailbox-to-gmail.
Related Issues (20)
- Access Token / Credentials Issue HOT 10
- Lots of 400 errors with no further details HOT 3
- Problem on Mac HOT 19
- Label Creation & Skipping Issue HOT 3
- Import Failed Messages? HOT 5
- import-mailbox-to-gmail.py: error: argument --dir is required HOT 12
- Attachments HOT 11
- Duplicate labels created when importing nested mboxes HOT 6
- oauth2client deprecated HOT 3
- os.walk error HOT 3
- No emails get imported HOT 4
- service = discovery.build error
- Add Dockerfile or instructions HOT 2
- Instructions are out of date or n/a HOT 1
- Issue when execute the commands HOT 1
- C
- Package 'rsa' requires a different Python: 2.7.18 not in '>=3.5, <4'
- How to show original sent date HOT 4
- Imports Duplicate Messages HOT 3
- NameError: name 'unicode' is not defined HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from import-mailbox-to-gmail.