2013-01-12 49 views
0

我試圖從django項目的需求文件中安裝包。「AttributeError:'NoneType'對象在安裝geopy時沒有屬性」split「」

問題是,當安裝geopy時,我得到了錯誤AttributeError:'NoneType'對象沒有屬性'split'。

我在python 2.7.3的virtualenv中運行。

具體的命令是:

sudo pip-python install -r requirements.pip 

從需求文件有問題的行是:

-e svn+http://geopy.googlecode.com/svn/[email protected]#egg=geopy-0.94.1_pre.dev_r144-py2.7-dev_r144 

我的setuptools和分發0.6.34(我beleive即setuptools的只是一個別名分發)。 setuptools_subversion的版本爲3.1

我運行Fedora 17

完整的錯誤如下:

Obtaining geopy from svn+http://geopy.googlecode.com/svn/[email protected]#egg=geopy-0.94.1_pre.dev_r144-py2.7-dev_r144 (from -r requirements.pip (line 50)) 
    Unrecognized .svn/entries format in /home/myself/leona-integration/leona/src/geopy 
Exception: 
Traceback (most recent call last): 
    File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 126, in main 
    self.run(options, args) 
    File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 223, in run 
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) 
    File "/usr/lib/python2.7/site-packages/pip/req.py", line 936, in prepare_files 
    req_to_install.update_editable(not self.is_download) 
    File "/usr/lib/python2.7/site-packages/pip/req.py", line 384, in update_editable 
    vcs_backend.obtain(self.source_dir) 
    File "/usr/lib/python2.7/site-packages/pip/vcs/subversion.py", line 86, in obtain 
    if self.check_destination(dest, url, rev_options, rev_display): 
    File "/usr/lib/python2.7/site-packages/pip/vcs/__init__.py", line 184, in check_destination 
    if self.compare_urls(existing_url, url): 
    File "/usr/lib/python2.7/site-packages/pip/vcs/__init__.py", line 142, in compare_urls 
    return (self.normalize_url(url1) == self.normalize_url(url2)) 
    File "/usr/lib/python2.7/site-packages/pip/vcs/__init__.py", line 136, in normalize_url 
    return urllib.unquote(url).rstrip('/') 
    File "/usr/lib64/python2.7/urllib.py", line 1204, in unquote 
    res = s.split('%') 
AttributeError: 'NoneType' object has no attribute 'split' 

Storing complete log in /root/.pip/pip.log 

它已經指出在評論該行「無法識別的.svn /條目格式...「只是一個警告,而不是例外的原因。

+0

的信息是不是一個錯誤而是一個警告,而不是AttributeError異常的原因。我在['subversion_setuptools' README](http://pypi.python.org/pypi/setuptools_subversion)(我是作者)中記錄了這一點。 :-) –

+0

感謝Martijn,我更新了這篇文章。 – germanjaber

回答

0

我解決它通過註釋的需求文件有問題的線和添加以下行:

geopy==0.94.1 
相關問題