Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdn.rawgit.com: "Use a specific tag or commit hash in the URL (not a branch)" #1

Open
HyperHCl opened this issue May 30, 2016 · 9 comments

Comments

@HyperHCl
Copy link

HyperHCl commented May 30, 2016

Quote from https://rawgit.com/:

  • Use a specific tag or commit hash in the URL (not a branch). Files are cached permanently based on the URL. Query strings are ignored.

You may want to change the URL given in your readme.

@cqcn1991
Copy link
Owner

@HyperHCl
What do you mean specifically?
啥意思...没太看懂

@luokang1990
Copy link

AttributeError Traceback (most recent call last)
in ()
2 get_ipython().magic('load_ext autoreload')
3 get_ipython().magic('autoreload 2')
----> 4 get_ipython().magic('load_ext rpy2.ipython')
5 get_ipython().magic('R require(movMF)')
6

D:\program\Anaconda2\envs\python34\lib\site-packages\IPython\core\interactiveshell.py in magic(self, arg_s)
2156 magic_name, _, magic_arg_s = arg_s.partition(' ')
2157 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2158 return self.run_line_magic(magic_name, magic_arg_s)
2159
2160 #-------------------------------------------------------------------------

D:\program\Anaconda2\envs\python34\lib\site-packages\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line)
2077 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2078 with self.builtin_trap:
-> 2079 result = fn(*args,**kwargs)
2080 return result
2081

in load_ext(self, module_str)

D:\program\Anaconda2\envs\python34\lib\site-packages\IPython\core\magic.py in (f, *a, **k)
186 # but it's overkill for just that one bit of state.
187 def magic_deco(arg):
--> 188 call = lambda f, *a, **k: f(*a, **k)
189
190 if callable(arg):

D:\program\Anaconda2\envs\python34\lib\site-packages\IPython\core\magics\extension.py in load_ext(self, module_str)
35 if not module_str:
36 raise UsageError('Missing module name.')
---> 37 res = self.shell.extension_manager.load_extension(module_str)
38
39 if res == 'already loaded':

D:\program\Anaconda2\envs\python34\lib\site-packages\IPython\core\extensions.py in load_extension(self, module_str)
83 import(module_str)
84 mod = sys.modules[module_str]
---> 85 if self._call_load_ipython_extension(mod):
86 self.loaded.add(module_str)
87 else:

D:\program\Anaconda2\envs\python34\lib\site-packages\IPython\core\extensions.py in _call_load_ipython_extension(self, mod)
130 def _call_load_ipython_extension(self, mod):
131 if hasattr(mod, 'load_ipython_extension'):
--> 132 mod.load_ipython_extension(self.shell)
133 return True
134

D:\program\Anaconda2\envs\python34\lib\site-packages\rpy2\ipython\rmagic.py in load_ipython_extension(ip)
786 # Initialising rpy2 interferes with readline. Since, at this point, we've
787 # probably just loaded rpy2, we reset the delimiters. See issue gh-2759.
--> 788 if ip.has_readline:
789 ip.readline.set_completer_delims(ip.readline_delims)

AttributeError: 'ZMQInteractiveShell' object has no attribute 'has_readline'

这是怎么回事呢?谢谢

@luokang1990
Copy link

GMM.ipynb 运行这个%load_ext rpy2.ipython 报错

AttributeError: 'ZMQInteractiveShell' object has no attribute 'has_readline'

@cqcn1991
Copy link
Owner

cqcn1991 commented Jan 3, 2018

@luokang1990 要装RPY2才能全跑,不然你就把相关代码注释掉好了
default

你可以先跑barebone_fitter.ipynb, 看能不能出结果

@luokang1990
Copy link

你说的这些包我已经装好了,执行这句 import rpy2.robjects as robjects不会报错,说明rpy2已经装好了, 不知道为什么报错!

@luokang1990
Copy link

跑barebone_fitter.ipynb, 可以出结果

@cqcn1991
Copy link
Owner

cqcn1991 commented Jan 4, 2018

@luokang1990 你先把%load_ext rpy2.ipython注释掉, 直接跑,看看能跑到哪里。我估计应该前面没用到R的部分应该是可以跑的,看看有没有别的问题

@Artoria2e5
Copy link

@cpcn1991 用 rawgit 的话不要用 branch 名称,要用 commit 的 sha1,不然可能因为缓存不跟着更新。

@cqcn1991
Copy link
Owner

@Artoria2e5 对的...我只是懒得改了就挂这了...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants