ELM 0.18中的图形包发生了什么变化?

时间:2016-12-31 12:38:02

标签: elm

我从Github下载了this项目,并尝试使用elm版本0.18运行它。

该项目最初是用prev elm版本编写的,所以我试着让它在我的版本上运行。

编译器说Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE. Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE. Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE. Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE. Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE. Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE. Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE. Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE. Traceback (most recent call last): File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/handlers.py", line 63, in __call__ return self.application(environ, start_response) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 170, in __call__ response = self.get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 124, in get_response response = self._middleware_chain(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner response = response_for_exception(request, exc) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 76, in response_for_exception response = debug.technical_500_response(request, *sys.exc_info(), status_code=400) File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line 84, in technical_500_response html = reporter.get_traceback_html() File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line 316, in get_traceback_html c = Context(self.get_traceback_data(), use_l10n=False) File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line 293, in get_traceback_data 'filtered_POST': self.filter.get_post_parameters(self.request), File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line 167, in get_post_parameters return request.POST File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 128, in _get_post self._load_post_and_files() File "/usr/local/lib/python2.7/dist-packages/django/http/request.py", line 310, in _load_post_and_files self._post, self._files = QueryDict(self.body, encoding=self._encoding), MultiValueDict() File "/usr/local/lib/python2.7/dist-packages/django/http/request.py", line 268, in body raise RequestDataTooBig('Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE.') RequestDataTooBig: Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE. [31/Dec/2016 12:33:50] "POST /chat_photo/ HTTP/1.1" 500 59

所以我进入了包page并看到它是核心软件包的一部分,但当我点击链接转到最新版本时,我得到a page where I could no longer understand what is going on.。 写的地方:

I cannot find module 'Graphics.Collage'.
  1. 有人可以理解这个吗?
  2. 如何在elm 0.18中导入图形包?
  3. 如何在其页面中找到显示相同错误的其他包的解决方案?

2 个答案:

答案 0 :(得分:9)

Elm确实遇到了将软件包移出核心的问题。请尝试安装evancz/elm-graphics

另外问题3:我通常会转到http://package.elm-lang.org/并从那里搜索包名。

答案 1 :(得分:2)

根据代码历史记录,您尝试构建成功的项目的最后一次是在2014年12月(2016年有一个更近期的提交评论"开始升级到elm 0.17&#34 ;但看起来不完整)。 2014年12月,Elm的最新版本为0.14。

现在最新版的Elm是0.18。沿途的每个版本(0.15,0.16,0.17,0.18)都引入了变化。其中大部分都记录在发行说明中:http://elm-lang.org/blog(向下滚过"文章"在该页面上)。

Elm 0.17中引入的更改带有升级计划:https://github.com/elm-lang/elm-platform/blob/master/upgrade-docs/0.17.md。这个升级计划提到了" Graphics。*的功能现在存在于evancz / elm-graphics" (正如Andreas Hultgren已经指出的那样)。另一个有用的文档是:http://faq.elm-community.org/17.html,其中包含有关Graphics.Collage的更多详细信息。

Graphics.Collage的变化只是从Elm 0.14到Elm 0.18的各种变化之一。您正在使用的项目的修改后的克隆:https://github.com/dc25/elm-pong应该在Elm 0.18下编译并运行。

相关问题