GmailFS for Mac OS X
By Jean-Matthieu on Thursday 18 January 2007, 11:26 - Software - Permalink
A couple of days ago, Amit Singh announced that he has ported Linux's FUSE module to OS X. It only took me a couple of hours to be able to use GmailFS, a filesystem which uses your Gmail account as its storage medium by Richard Jones.
Phase 1: Get the stuff
There are a couple of stuff that you need to download first. Open the Terminal application and create a new folder somewhere on your disk like ~/Desktop/fuse/ and then 'cd' to it.- MacFuse (http://code.google.com/p/macfuse)
- Download the Python FUSE bindings from FUSE's CVS repository.
Checkout the python module using:
cvs -d:pserver:anonymous@fuse.cvs.sourceforge.net:/cvsroot/fuse co -P python - Download a copy of libgmail. Recent releases currently work however if you experience problems you may wish to grab the CVS version of libgmail by following the instructions here.
- Download gmailfs-0.7.2.tar.gz.
Phase 2: Install
Start by installing MacFuse. Mount the disk image, open the installation package and simply walk through the assistant. Restart when you're done.Then, open the Terminal and do the following
$ cd ~/Desktop/fuse
Let's start with libgmail
$ tar -zxvf libgmail-0.1.5.1.tar.gz
$ cd libgmail-0.1.5.1
$ python setup.py build
$ sudo python setup.py install
Password : <<enter your password here >>
Now let's move on to FUSE python bindings. This is the complex part. Before you can compile the bindings, you need to create a file to inform pkg-config where is your fuse installation.
Copy/Paste what's below and save it to ~/Desktop/fuse/fuse.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: fuse
Description: Filesystem in Userspace
Version: 2.6.1
Libs: -L${libdir} -lfuse -pthread
Cflags: -I${includedir}/fuse -D__FreeBSD__=10 -D_FILE_OFFSET_BITS=64
Now, copy the file somewhere inside your PKG_CONFIG_PATH
$ sudo cp ~/Desktop/fuse/fuse.pc /usr/local/lib/pkg-config/
Of course if pkg-config is not installed on your system, you need it too :
Get it there : http://pkgconfig.freedesktop.org/wiki/.
To compile and install pkg-config as a set of Universal binaries, do the following:
$ tar -xzvf pkg-config-<version>.gz$ cd pkg-config-<version>/
$ CFLAGS="-O -g -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
LDFLAGS="-arch i386 -arch ppc" \
./configure --prefix=/usr/local --disable-dependency-tracking
$ make
$ sudo make install
This installs pkg-config under the /usr/local/ hierarchy.
You are now ready to build the python bindings, so go there
$ cd ~/Desktop/fuse/python
$ python setup.py build
Should this fail or complain about something called osreldate.h, just go to the header that includes osreldate.h
and comment out the inclusion for now.
$ sudo python setup.py install
Password : <<enter your password here >>
The last thing you install is gmailfs itself. Go to your download directory again and prepare the stuff
$ cd ~/Desktop/fuse
$ tar -zxvf gmailfs-0.7.2.tar.gz
$ cd gmailfs-0.7.2
$ sudo cp mount.gmailfs /sbin/mount_gmailfs
$ sudo cp gmailfs.py /usr/local/bin/
Now gmailfs is installed on your system. We're almost there.
Phase 3: Configuration
In ~/Desktop/fuse/gmailfs-0.7.2 there is a file called gmailfs.conf. Open it and insert your personal info (like your username and password to Google Gmail service). Then copy this file to your /private/etc folder$ sudo cp gmailfs.conf /private/etc
Create a test folder that will become your mountpoint
$ mkdir ~/gmailfs
Inform FUSE_PYTHON_COMPAT
$ export FUSE_PYTHON_COMPAT=ALL
Alternatively, you can set FUSE_PYTHON_COMPAT=0.1 is the mount command fails
Try to mount your GMail Disk :
$ mount -ovolname=bla -t gmailfs /usr/local/bin/gmailfs.py ~/gmailfs
Looks like -ovolname is ignore ...
$ df -h
Filesystem Size Used Available Capacity Mounted on
/dev/disk0s5 90Gi 32Gi 58Gi 36% /
devfs 114Ki 114Ki 0B 100% /dev
fdesc 1.0Ki 1.0Ki 0B 100% /dev
/dev/disk0s3 59Gi 51Gi 8.5Gi 86% /Volumes/HD 150Go
automount -fstab [110] 0B 0B 0B 100% /automount/Servers
automount -static [110] 0B 0B 0B 100% /automount/static
python@0 2.7Gi 0B 2.7Gi 0% /Users/jms/gmailfs
When this is done, you can copy stuff there and it will be saved on gmail space automatically
$ cp intro.mov ~/gmailfs
Well that about it. I hope you have something new to play with too.
I could not get it to work properly with the Finder (Drag and drop doesn't work all the time, got some .DS_Store annoyance too) but I probably just did not look hard enough. Anyway, if you have a solution, feel free to post it below, for now, <ad>i'll stick to gDisk</ad>.
Comments
Thanks! This was the quickstart for my 'nice, now how can i use python with macfuse?' question. The only thing with my custom python2.5 on PPC thing was with _fusemodule.so vs _fuse.so (had to rename manually)
I have this error when at the end i do :
mount -ovolname=bla -t gmailfs /usr/local/bin/gmailfs.py ~/gmailfs
i have :
Traceback (most recent call last):
File "/sbin/mount_gmailfs", line 159, in ?
import gmailfs
File "/usr/local/bin/gmailfs.py", line 20, in ?
from fuse import Fuse
ImportError: No module named fuse
Hi,
I'm hanging at "You are now ready to build the python bindings, so go there \$ cd ~/Desktop/fuse/python \$ python setup.py build"
I just can't find what makes the bug. Here is what happens in the shell. Any idea or help ?
thanks
herode:~/Desktop/fuse/python jeremy$ python setup.py build
pkg-config could not find fuse:
you might need to adjust PKG_CONFIG_PATH or your
FUSE installation is very old (older than 2.1-pre1)
Traceback (most recent call last):
File "setup.py", line 37, in ?
iflags = [x[2:] for x in cflags.split() if x[0:2] == '-I']
NameError: name 'cflags' is not defined
...
OK, uncommenting some lines in setup.py, I could make the stup, and install, after having and solving the "osreldate.h" bug.
But now, when testing, it says :
$ mount -ovolname=bla -t gmailfs /usr/local/bin/gmailfs.py ~/gmailfs
Traceback (most recent call last):
File "/sbin/mount_gmailfs", line 159, in <module>
import gmailfs
File "/usr/local/bin/gmailfs.py", line 28, in <module>
import libgmail
ImportError: No module named libgmail
...
Having re-installed libgmail :
$ mount -ovolname=bla -t gmailfs /usr/local/bin/gmailfs.py ~/gmailfs
Traceback (most recent call last):
File "/sbin/mount_gmailfs", line 164, in <module>
main(mountpoint, namedOptions, useEncfs)
File "/sbin/mount_gmailfs", line 90, in main
gmailfs.main(mountpoint, namedOptions)
File "/usr/local/bin/gmailfs.py", line 1130, in main
server = Gmailfs(mountpoint, **namedOptions)
File "/usr/local/bin/gmailfs.py", line 542, in __init__
Fuse.__init__(self, mountpoint, **kw)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/fuse.py", line 603, in __init__
self.parser = parserclass(*args, **kw)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/fuse.py", line 264, in __init__
SubbedOptParse.__init__(self, *args, **kw)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/fuseparts/subbedopts.py", line 240, in __init__
OptionParser.__init__(self, *args, **kw)
TypeError: __init__() got multiple values for keyword argument 'usage'
Awesome stuff, works here ... the Finder operation *does* work but normally what I will end up doing is mounting it a first time as root (sudo) so that the kext is loaded, then unmount and remount as my normal user and then everything is fine.
Thanks for this!
- Jon
After commenting the "osreldate.h" in pyport.h (fink) I get this when running the setup.py ... :
$ python setup.py build
running build
running build_py
running build_ext
building 'fuseparts._fusemodule' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/fuse -I/sw/include/python2.4 -c fuseparts/_fusemodule.c -o build/temp.darwin-8.8.0-Power_Macintosh-2.4/fuseparts/_fusemodule.o -D__FreeBSD__=10 -D_FILE_OFFSET_BITS=64
In file included from /sw/include/python2.4/pymem.h:8,
from /sw/include/python2.4/Python.h:74,
from fuseparts/_fusemodule.c:25:
/sw/include/python2.4/pyport.h:72: error: redefinition of typedef 'Py_uintptr_t'
/sw/include/python2.4/pyport.h:72: error: previous declaration of 'Py_uintptr_t' was here
/sw/include/python2.4/pyport.h:73: error: redefinition of typedef 'Py_intptr_t'
/sw/include/python2.4/pyport.h:73: error: previous declaration of 'Py_intptr_t' was here
error: command 'gcc' failed with exit status 1
I am trying to follow these instructions and all seem to go well until I try to mount the gmailfs volume. This is what I get:
imac:~/gmailfs-0.7.2 hanpu$ export FUSE_PYTHON_COMPAT=0.1
imac:~/gmailfs-0.7.2 hanpu$ mount -ovolname=bla -t gmailfs /usr/local/bin/gmailfs.py ~/gmailfs
Traceback (most recent call last):
File "/sbin/mount_gmailfs", line 164, in ?
main(mountpoint, namedOptions, useEncfs)
File "/sbin/mount_gmailfs", line 90, in main
gmailfs.main(mountpoint, namedOptions)
File "/usr/local/bin/gmailfs.py", line 1130, in main
server = Gmailfs(mountpoint, **namedOptions)
File "/usr/local/bin/gmailfs.py", line 602, in __init__
self.ga.login()
File "/sw/lib/python2.4/site-packages/libgmail.py", line 304, in login
pageData = self._retrievePage(req)
File "/sw/lib/python2.4/site-packages/libgmail.py", line 333, in _retrievePage
resp = urllib2.urlopen(req)
File "/sw/lib/python2.4/urllib2.py", line 130, in urlopen
return _opener.open(url, data)
File "/sw/lib/python2.4/urllib2.py", line 358, in open
response = self._open(req, data)
File "/sw/lib/python2.4/urllib2.py", line 381, in _open
'unknown_open', req)
File "/sw/lib/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/sw/lib/python2.4/urllib2.py", line 1053, in unknown_open
raise URLError('unknown url type: %s' % type)
urllib2.URLError: <urlopen error unknown url type: https>
Any idea what this is about?
@Jean-Matthieu:
First, let me say thank you for the excellent step-by-step guide.
I foudn a minor error in your description which you might want to correct:
In "Phase 2" at line 38:
You instructed to copy fuse.pc to "/usr/local/lib/pkg-config/", however this needs to be "/usr/local/lib/pkgconfig/" without the dash.
Also, if one has already installed fink, I found that pkg-config is already installed by fink, however in the "/sw/"-tree. The appropriate directory for fuse.pc in this case would be "/sw/lib/pkgconfig/". Also I found that if pkg-config has already been installed by fink and one attempts to install it again manually (as you instructed) fuse.pc in "/usr/local/lib/pkgconfig/" will not be found and this wil generate the error jeremy described in his first comment
("pkg-config could not find fuse:
you might need to adjust PKG_CONFIG_PATH or your
FUSE installation is very old (older than 2.1-pre1")
For me, copying fuse.pc to "/sw/lib/pkgconfig/" removed this error and the bindings compiled flawlessly (Ok, I had the "osreldate.h"-error, too, but commenting out the include made it work just fine, like you said).
@jeremy:
Do you have fink installed on your system?
If so, leave setup.py like it was (insert all includes you removed) and try copying fuse.pc to "/sw/lib/pkgconfig/". This solved the error for me. The way you did it some of the flags might have been set wrong which might have triggered the subsequent errors. I don't know for sure, but I guess it's worth a shot.
@Hans-Göran:
Had this error too. :) It means you've got a pyhon without ssl support. fink again? If fink, do: "fink install python24-socket-ssl " to solve.
(Solution found at: http://www.simonb.com/index.php/sim... -tnx-)
If not fink: google for how to add ssl support to your python.
I needed to change:
Libs: -L${libdir} -lfuse -pthread
To:
Libs: -L${libdir} -lfuse -lpthread
Otherwise gcc complains with this message:
powerpc-apple-darwin8-gcc-4.0.0: unrecognized option '-pthread
Hi Jean-Matthieu,
sorry if I ask something stupid... but do I have to enable cvs somehow? In the terminal window I get only cvs-diff-branch, cvs-merge-branch, cvs-view-diffs, cvs-make-branch, cvs-revert but no "plain" cvs.
Maybe somebody can give me a hint?
Thanks,
Thomas
Jeremy - I was experiencing the same error message as your first comment, and it looks like fuse.pc was the culprit. I copied the text from the post into textedit, but when I looked at it in vim, there was some weird encoding issue. Make sure that looks okay and you should be all set.
@Jean-Matthieu: Thanks for this great guide.
Does anyone know a solution for this problem:
mount -ovolname=bla -t gmailfs /usr/local/bin/gmailfs.py ~/gmailfs
Traceback (most recent call last):
File "/sbin/mount_gmailfs", line 159, in ?
import gmailfs
File "/usr/local/bin/gmailfs.py", line 20, in ?
from fuse import Fuse
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/fuse.py", line 26, in ?
from fuseparts._fuse import main, FuseGetContext, FuseInvalidate
ImportError: dlopen(/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/fuseparts/_fuse.so, 2): Symbol not found: _fuse_invalidate
Referenced from: /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/fuseparts/_fuse.so
Expected in: dynamic lookup
It seems as the FUSE-Python-Bindings are not loaded properly, but i don't find an solution. I tried installing an new python version and compiling an older FUSE-Bindings version, but it didn't help. Thanks!
If you want the gmail volume to show up in Finder you need to add "ping_diskarb" to the mount options. So, the final command should be:
mount -ovolname=gmail,ping_diskarb -t gmailfs /usr/local/bin/gmailfs.py ~/gmailfs
Doesn't work for me... Here's the log. Any ideas?
06/17/07 15:41:23 ERROR OpenSSLProxy is missing. Can't use HTTPS proxy!
06/17/07 15:41:23 INFO Starting gmailfs in child process (PID 534)
06/17/07 15:41:23 INFO Mountpoint: /Users/MeisterK/gmailfs
06/17/07 15:41:23 INFO Unnamed mount options: ('/Users/MeisterK/gmailfs',)
06/17/07 15:41:23 INFO Named mount options: {'password': '********'}
06/17/07 15:41:23 WARNING mount: warning, should mount with username=gmailuser option, using default
06/17/07 15:41:23 WARNING mount: warning, should mount with password=gmailpass option, using default
06/17/07 15:41:23 WARNING mount: warning, should mount with fsname=name option, using default
06/17/07 15:41:23 INFO waiting for /Users/MeisterK/gmailfs to become a mountpoint
06/17/07 15:41:26 INFO Connected to gmail
06/17/07 15:41:29 ERROR gmailfs child died, exiting...
06/17/07 15:41:26 INFO Connected to gmail
06/17/07 15:41:29 ERROR gmailfs child died, exiting...
OK, although this is an interesting article, IF ANYONE DOES NOT WANT TO OR COULD NOT DO THIS (like me) use this http://code.google.com/p/gmailfs-ap... It works just this but does it all for you (it actually is this in a way)
have fun!
Plus, it even has finder integration
Also MAKE SURE TO INSTALL MACFUSE FIRST!!!!!
Thanks for this article. I like MacFuse.
If you want the gmail volume to show up in Finder you need to add "ping_diskarb" to the mount options. So, the final command should be:
If you want the gmail volume to show up in Finder you need to add "ping_diskarb" to the mount options. So, the final command should be:
mount -ovolname=gmail,ping_diskarb -t gmailfs /usr/local/bin/gmailfs.py
Thanks!
I have recieved a little error-message... :
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
77-56-220-227:gmailfs-0.7.2 sebikeller$ The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
What can i do???/Qu'est-ce que je doit faire???
greez bj99
Got this : $ mount -ovolname=gmail -t gmailfs /usr/local/bin/gmailfs.py ~/gmailfs
Traceback (most recent call last):
File "/sbin/mount_gmailfs", line 164, in <module>
main(mountpoint, namedOptions, useEncfs)
File "/sbin/mount_gmailfs", line 90, in main
gmailfs.main(mountpoint, namedOptions)
File "/usr/local/bin/gmailfs.py", line 1130, in main
server = Gmailfs(mountpoint, **namedOptions)
File "/usr/local/bin/gmailfs.py", line 542, in __init__
Fuse.__init__(self, mountpoint, **kw)
File "/Library/Python/2.5/site-packages/fuse.py", line 678, in __init__
"""
RuntimeError: fuse.fuse_python_api not defined.
! Please define fuse.fuse_python_api internally (eg.
!
! (1) fuse.fuse_python_api = (0, 2)
!
! ) or in the enviroment (eg.
!
! (2) FUSE_PYTHON_API=0.1
!
! ).
!
! If you are actually developing a filesystem, probably (1) is the way to go.
! If you are using a filesystem written before 2007 Q2, probably (2) is what
! you want."
I did it, but it doesnt help...
06/17/07 15:41:26 INFO Connected to gmail
06/17/07 15:41:29 ERROR gmailfs child died, exiting...
This looks like a nice detailed walk-through, however I am getting the following error repeatedly(I have done this walk-through multiple times on different boxes, one is an iMac G5, the other a MB Pro Core 2 Duo.) I get the exact same exceptions for both boxes. I built the fuse-python bindings and libgmail fine, Macfuse is installed and I copied the gmail executables to their appropriate locations. but when I try to execute the mount command I get:
usr/local/bin/gmailfs.py ~/gmailfs
Traceback (most recent call last):
File "/sbin/mount_gmailfs", line 164, in ?
main(mountpoint, namedOptions, useEncfs)
File "/sbin/mount_gmailfs", line 90, in main
gmailfs.main(mountpoint, namedOptions)
File "/usr/local/bin/gmailfs.py", line 1172, in main
server = Gmailfs(namedOptions,mountpoint,version="gmailfs 0.8.0",usage='',dash_s_do='setsingle')
File "/usr/local/bin/gmailfs.py", line 607, in __init__
self.ga = libgmail.GmailAccount(username, password)
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/libgmail.py", line 311, in __init__
self.opener = urllib2.build_opener(
TypeError: this constructor takes no arguments
i get the same error as #25 (TypeError: this constructor takes no arguments)
and i am on a g3 ibook. i am trying to use the current versions though.
mount -t gmailfs /usr/local/bin/gmailfs.py /tmp/stuff
Ignored option :rw
Traceback (most recent call last):
File "/sbin/mount.gmailfs", line 164, in ?
main(mountpoint, namedOptions, useEncfs)
File "/sbin/mount.gmailfs", line 90, in main
gmailfs.main(mountpoint, namedOptions)
File "/usr/local/bin/gmailfs.py", line 1172, in main
server = Gmailfs(namedOptions,mountpoint,version="gmailfs 0.8.0",usage='',dash_s_do='setsingle')
File "/usr/local/bin/gmailfs.py", line 607, in __init__
self.ga = libgmail.GmailAccount(username, password)
File "/usr/lib/python2.3/site-packages/libgmail.py", line 309, in __init__
self.opener = urllib2.build_opener(
TypeError: this constructor takes no arguments
I am having the same problems from linux
cool
Same error as 27... looking at the log it looks like it can't read the passwd and uid from the the gmailfs.conf file.
Thanks for this article. I like MacFuse.
I had the same error described in #27; I could solve it modifying line 309 (and few subsequent lines) of libgmail.py removing debuglevel=0 from constructors. However I had to use gmailfs-0.8.0 to make it work with my mac. Followed the instructions at http://richard.jones.name/google-ha... (Note: in instruction it says, at the very end: "Copy mount.gmailfs to the /sbin directory" the file name in /sbin directory has to be mount_gmailfs and not mount.gmailfs
I had fixed what #31 says and now I get this problem
Traceback (most recent call last):
File "/sbin/mount_gmailfs", line 164, in ?
main(mountpoint, namedOptions, useEncfs)
File "/sbin/mount_gmailfs", line 90, in main
gmailfs.main(mountpoint, namedOptions)
File "/usr/local/bin/gmailfs.py", line 1172, in main
server = Gmailfs(namedOptions,mountpoint,version="gmailfs 0.8.0",usage='',dash_s_do='setsingle')
File "/usr/local/bin/gmailfs.py", line 608, in __init__
self.ga.login()
File "/usr/lib/python2.3/site-packages/libgmail.py", line 361, in login
raise GmailLoginFailure("Login failed. (Wrong username/password?)")
libgmail.GmailLoginFailure: 'Login failed. (Wrong username/password?)'
I think that the problem is that the page it is trying to access now requires a captcha. So,... what do to next?
I've install the python bindings but can't get them to work.
Can anyone help?
Black:example David$ python
Python 2.5.1 (r251:54863, Oct 5 2007, 21:08:09)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fuse
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.5/site-packages/fuse.py", line 26, in <module>
from fuseparts._fuse import main, FuseGetContext, FuseInvalidate
ImportError: dlopen(/Library/Python/2.5/site-packages/fuseparts/_fusemodule.so, 2): Symbol not found: _iconv
Referenced from: /usr/local/lib/libfuse.0.dylib
Expected in: flat namespace
I'm having precisely the same problem, Stuck. No workaround yet. Anybody?
Okay, I solved the "Symbol not found: _iconv" problem. I downloaded a fresh (2.0) Python FUSE bindings and added a line to setup.py as follows:
libsonly.append("pthread") # <-- existing line
libsonly.append("iconv") # <-- new line
However, now when I run gmailfs I'm getting numerous lines of the form
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
ala beatjunky99 above.
The filesystem seems to mount, though.
Ok folks.... If you are getting the following error:
File "/usr/lib/python2.3/site-packages/libgmail.py", line 309, in __init__
self.opener = urllib2.build_opener(
TypeError: this constructor takes no arguments
Here is the fix:
Before:
sudo python setup.py install
Make the following changes:
On lines 309 and 310 of libgmail.py :
urllib2.HTTPHandler(debuglevel=0),
urllib2.HTTPSHandler(debuglevel=0),
Should read:
urllib2.HTTPHandler(),
urllib2.HTTPSHandler(),
Then continue as described above and everything should work fine. Can someone let Richard Jones know? I don't know him. Also, please make sure you are using the latest versions of everything.
pkg-config-0.23
fuse-python-0.2
pyOpenSSL-0.6-Mac OS X 10.4.10 build
gmailfs-0.8.0 pyOpenSSLProxy-0.1
libgmail-0.1.8
I'm getting this when I run the mount command:
Traceback (most recent call last):
File "/sbin/mount_gmailfs", line 159, in <module>
import gmailfs
File "/usr/local/bin/gmailfs.py", line 20, in <module>
import fuse
File "/Library/Python/2.5/site-packages/fuse.py", line 26, in <module>
from fuseparts._fuse import main, FuseGetContext, FuseInvalidate
ImportError: dlopen(/Library/Python/2.5/site-packages/fuseparts/_fusemodule.so, 2): Symbol not found: _iconv
Referenced from: /usr/local/lib/libfuse.0.dylib
Expected in: flat namespace
thank you Dotti. i has remove debuglevel=0 from string #309 urllib2.build_opener(urllib2.HTTPHandler(debuglevel=0), urllib2.HTTPSHandler(debuglevel=0), SmartRedirectHandler(self._cookieJar)) and it works! Good job and good post!
Hello,
The login and 'the process has forked' mistake come from this line in the python file :
GmailConfig(['/etc/gmailfs.conf',os.path.expanduser('~/.gmailfs')])
So you shold put your conf file in one of those 2 places, preferably your user directory.
You might want to protect this file from reading since it has your pwd in it!
sudo chown root conffile
chmod go-rwx conffile
I completely agree with all that here is told
"So you can find the information on it on my search resource
http://fileshunt.com"
Godd site w234hy8 lo
#22 & #35 (the process has forked) is explained here:
http://developer.apple.com/releasen...
There's a bit of explanation here:
http://en.wikipedia.org/wiki/Fork-e...
In a nutshell, MacOS 10.5 breaks gmailfs, and we eagerly anticipate a fix.
Any updates on this? I got as far as #35, even able to mount the drive. But there sure are a lot of errors and the drive does not appear to work (neither reading currently available files or copying over new ones).
Actually, this works:
http://bloggen.itavisen.no/index.ph...
You told "Should this fail or complain about something called osreldate.h, just go to the header that includes osreldate.h
and comment out the inclusion for now.". But what's I need to comment, what's the file?
http://sharesdigger.com is a classical example of social site that really helps in taking useful things in World Web. It helped me much, so I suggest it to everyone.
Very useful files search engine. http://myrapida.com is a search engine designed to search files in various file sharing and uploading sites.
For applications downloading use:
the first source for rapidshare download http://rapid4me.com
and the second torrent source with the help of http://file.sh you may download files too
Personally I do not think they are that bad. Find the files you are looking for at http://indexoffiles.com/?q=windows+... the most comprehensive source for free-to-try files downloads on the Web
I think, I've seen quitу similar post on another resource.
http://healthnova.org
very useful, even long time just for the knowledge
There are many software that you can come!
http://pcgone.com
Thank you for your help in installing Python with MacFUSE - is the real thing. But I'm in the beginning could not establish, so I sought help on the website and found http://www.queentorrent.com/.
i get the same error as #25 (TypeError: this constructor takes no arguments)
and i am on a g3 ibook. i am trying to use the current versions though. http://filepasswords.com
I'm not wasting time to read the post! Thank you, it was very interesting!