使用sudo gem install cocoapods安装cocoapods后,尝试运行"pod setup"会返回此错误:
Could not find 'cocoapods' (>= 0) among 22 total gem(s) (Gem::LoadError)
Run Code Online (Sandbox Code Playgroud)
"pod setup"的输出:
/Users/Kevin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:313:in `to_specs': Could not find 'cocoapods' (>= 0) among 22 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/Kevin/.rvm/gems/ruby-1.9.3-p194:/Users/Kevin/.rvm/gems/ruby-1.9.3-p194@global', execute `gem env` for more information
from /Users/Kevin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:322:in `to_spec'
from /Users/Kevin/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem'
from /Users/Kevin/.rvm/rubies/ruby-1.9.3-p194/bin/pod:22:in `<main>'
Run Code Online (Sandbox Code Playgroud)
当我检查GEM_PATH中列出的目录时,它包括:
...
drwxr-xr-x 5 root staff 170B Jun 16 23:35 cocoapods-core-0.33.1/
drwxr-xr-x 5 Kevin staff 170B Jun 16 23:41 cocoapods-downloader-0.6.1/
drwxr-xr-x 15 Kevin staff 510B Jun 16 23:41 cocoapods-plugins-0.2.0/
drwxr-xr-x 11 …Run Code Online (Sandbox Code Playgroud) 我写了一个脚本来向Google Maps的API发送地址并收回Lat和Lng.但是,我收到的错误消息是,我在20次左右的查询后超出了Google的速率限制.有什么我不考虑的吗?
我很感激任何帮助.我非常擅长使用API,所以更好地理解为什么我达到速率限制会非常有帮助.
从名为Location的csv文件中读取地址后,下面是我的相关代码.
for row in locations:
address = 'XXX, New Haven, CT'
first = re.search('^(.*),',row[0])
address = re.sub('XXX',first.group(), address)
lat, lng = gmaps.address_to_latlng(address)
Run Code Online (Sandbox Code Playgroud)
我的错误信息如下.
Traceback (most recent call last):
File "<input>", line 5, in <module>
File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/googlemaps-1.
0.2-py2.7.egg/googlemaps.py", line 310, in address_to_latlng
return tuple(self.geocode(address)['Placemark'][0]['Point']['coordinates'][1
::-1])
File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/googlemaps-1.
0.2-py2.7.egg/googlemaps.py", line 262, in geocode
raise GoogleMapsError(status_code, url, response)
GoogleMapsError: Error 620: G_GEO_TOO_MANY_QUERIES
Run Code Online (Sandbox Code Playgroud)