text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<p dir="auto">When a field is not analyzed on index time, it is not possible to specify a search_analyzer.<br> I get a "analyzer on field [xxx] must be set when search_analyzer is set" exception.</p> <p dir="auto">To me this does not make sense. I can set a keyword analyzer on the field to circumvent this exception, which does exactly the same thing. However, while doing that, I cannot enable doc_values.</p> <p dir="auto">I find myself duplicating fields many times because of this limitations.<br> Those limitations are:</p> <ul dir="auto"> <li>docvalues don't work on analyzed fields</li> <li>search_analyzer cannot be specified on non-analyzed fields.</li> </ul> <p dir="auto">I presume ES is trying to protect me, but I <em>know</em> what I'm doing.<br> Is it possible to make this behavior more lenient?</p>
<p dir="auto">When I try to run gradle integration tests to test a plugin by unpacking the zip, the jar hell detection is unable to recognize the same jar on the class path at two (or more) different locations.</p> <p dir="auto">I assume this is not intended. It would make gradle classpath setups (maybe other build tools too) to compile and test ES plugins "in-place" very difficult to specify.</p> <p dir="auto">My suggestion is to skip jar URLs that point to a jar with a checksum of a jar that has been already checked.</p> <p dir="auto">Example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Caused by: java.lang.IllegalStateException: jar hell! class: org.xbib.elasticsearch.http.HttpModule$_configure_closure1 jar1: /Users/joerg/.gradle/caches/modules-2/files-2.1/org.xbib.elasticsearch.plugin/elasticsearch-webapp/2.0.0-beta1.0/c735bc9b3e05b37a2d553ddda7d76fefc5e817e5/elasticsearch-webapp-2.0.0-beta1.0.jar jar2: /Users/joerg/Projects/github/jprante/elasticsearch-webapp-example/plugins/webapp/elasticsearch-webapp-2.0.0-beta1.0.jar at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:210) at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:128) at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:346) ... 52 more"><pre class="notranslate"><code class="notranslate">Caused by: java.lang.IllegalStateException: jar hell! class: org.xbib.elasticsearch.http.HttpModule$_configure_closure1 jar1: /Users/joerg/.gradle/caches/modules-2/files-2.1/org.xbib.elasticsearch.plugin/elasticsearch-webapp/2.0.0-beta1.0/c735bc9b3e05b37a2d553ddda7d76fefc5e817e5/elasticsearch-webapp-2.0.0-beta1.0.jar jar2: /Users/joerg/Projects/github/jprante/elasticsearch-webapp-example/plugins/webapp/elasticsearch-webapp-2.0.0-beta1.0.jar at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:210) at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:128) at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:346) ... 52 more </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="shasum /Users/joerg/.gradle/caches/modules-2/files-2.1/org.xbib.elasticsearch.plugin/elasticsearch-webapp/2.0.0-beta1.0/c735bc9b3e05b37a2d553ddda7d76fefc5e817e5/elasticsearch-webapp-2.0.0-beta1.0.jar c735bc9b3e05b37a2d553ddda7d76fefc5e817e5 /Users/joerg/.gradle/caches/modules-2/files-2.1/org.xbib.elasticsearch.plugin/elasticsearch-webapp/2.0.0-beta1.0/c735bc9b3e05b37a2d553ddda7d76fefc5e817e5/elasticsearch-webapp-2.0.0-beta1.0.jar"><pre class="notranslate"><code class="notranslate">shasum /Users/joerg/.gradle/caches/modules-2/files-2.1/org.xbib.elasticsearch.plugin/elasticsearch-webapp/2.0.0-beta1.0/c735bc9b3e05b37a2d553ddda7d76fefc5e817e5/elasticsearch-webapp-2.0.0-beta1.0.jar c735bc9b3e05b37a2d553ddda7d76fefc5e817e5 /Users/joerg/.gradle/caches/modules-2/files-2.1/org.xbib.elasticsearch.plugin/elasticsearch-webapp/2.0.0-beta1.0/c735bc9b3e05b37a2d553ddda7d76fefc5e817e5/elasticsearch-webapp-2.0.0-beta1.0.jar </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="shasum /Users/joerg/Projects/github/jprante/elasticsearch-webapp-example/plugins/webapp/elasticsearch-webapp-2.0.0-beta1.0.jar c735bc9b3e05b37a2d553ddda7d76fefc5e817e5 /Users/joerg/Projects/github/jprante/elasticsearch-webapp-example/plugins/webapp/elasticsearch-webapp-2.0.0-beta1.0.jar"><pre class="notranslate"><code class="notranslate">shasum /Users/joerg/Projects/github/jprante/elasticsearch-webapp-example/plugins/webapp/elasticsearch-webapp-2.0.0-beta1.0.jar c735bc9b3e05b37a2d553ddda7d76fefc5e817e5 /Users/joerg/Projects/github/jprante/elasticsearch-webapp-example/plugins/webapp/elasticsearch-webapp-2.0.0-beta1.0.jar </code></pre></div>
0
<p dir="auto">I reported this bug on the 3.x series and it was never addressed.</p> <p dir="auto">The community had a workaround by calling the callback via setTimeout.</p> <p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="337223491" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/13519" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/13519/hovercard" href="https://github.com/electron/electron/issues/13519">#13519</a></p> <p dir="auto">... but now the workaround is dead in the 4.x.x series.</p> <p dir="auto">The devs NEED to take this seriously. This just killed my app and if it's not fixed I might as well shut down the entire project.</p> <p dir="auto">I tried to refactor my code to call the callback without setTimeout and that doesn't fix the problem.</p> <p dir="auto">Can someone from the Electron team prioritize this or let me know of a way to prioritize this. This is <strong>critical</strong> for may app...</p>
<ul dir="auto"> <li> <p dir="auto">2.0.2 and 2.0.3:</p> </li> <li> <p dir="auto">Operating System (Platform and Version):</p> </li> </ul> <p dir="auto">Ubuntu 18.04 and MacOS (latest)</p> <ul dir="auto"> <li>Last known working Electron version:</li> </ul> <p dir="auto">None</p> <p dir="auto"><strong>Expected Behavior</strong></p> <p dir="auto">Registering or intercepting a stream protocol should work and the browser should show the proper content.</p> <p dir="auto"><strong>Actual behavior</strong></p> <p dir="auto">The browser actually shows an empty document with no content. No errors present.</p> <p dir="auto">I've verified that the same code works fine with 'string' protocols. Just not 'stream' protocols.</p> <p dir="auto">I created a repository here:</p> <p dir="auto"><a href="https://github.com/burtonator/electron-protocol-examples">https://github.com/burtonator/electron-protocol-examples</a></p> <p dir="auto">With all my examples.</p> <p dir="auto">The key ones are:</p> <p dir="auto">intercept-stream-protocol-http.js : FAILS<br> intercept-string-protocol-http.js: WORKS</p> <p dir="auto">I simplified the code greatly and I use the examples in the documentation. I've read the protocol documentation 2-3x to see if I was missing something. Does't seem to be the case.</p> <p dir="auto">Additionally there is this case:</p> <p dir="auto">intercept-stream-protocol-with-default-protocol.js</p> <p dir="auto">... I'd like to have a way to revert to the default protocol handler if possible. A comment on my previous issue stated that this was possible but it still doesn't appear to work. Doesn't work with string protocols either.</p> <p dir="auto"><strong>To Reproduce</strong></p> <p dir="auto">Just clone my repository and run the examples.</p> <p dir="auto"><a href="https://github.com/burtonator/electron-protocol-examples">https://github.com/burtonator/electron-protocol-examples</a></p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="git clone https://github.com/burtonator/electron-protocol-examples.git cd electron-protocol-examples npm install ## this will work and the content will be shown in the browser. ./node_modules/.bin/electron intercept-string-protocol-http.js ## this will NOT work and no content will be shown to the browser ./node_modules/.bin/electron intercept-stream-protocol-http.js "><pre class="notranslate">git clone https://github.com/burtonator/electron-protocol-examples.git <span class="pl-c1">cd</span> electron-protocol-examples npm install <span class="pl-c"><span class="pl-c">#</span># this will work and the content will be shown in the browser.</span> ./node_modules/.bin/electron intercept-string-protocol-http.js <span class="pl-c"><span class="pl-c">#</span># this will NOT work and no content will be shown to the browser</span> ./node_modules/.bin/electron intercept-stream-protocol-http.js </pre></div> <p dir="auto"><strong>Screenshots</strong></p> <h2 dir="auto">with sting protocol (working)</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45447/42126763-b0cb095a-7c41-11e8-973b-7c38b0ddf387.png"><img src="https://user-images.githubusercontent.com/45447/42126763-b0cb095a-7c41-11e8-973b-7c38b0ddf387.png" alt="image" style="max-width: 100%;"></a></p> <h2 dir="auto">with stream protocol (not working)</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45447/42126756-a19d4290-7c41-11e8-973c-388b1ca27028.png"><img src="https://user-images.githubusercontent.com/45447/42126756-a19d4290-7c41-11e8-973c-388b1ca27028.png" alt="image" style="max-width: 100%;"></a></p>
1
<p dir="auto">The option <code class="notranslate">static_folder</code> for blueprints only works correctly when the blueprint has been registered with a <code class="notranslate">url_prefix</code>, otherwise the application's default static URL takes precedence.</p> <p dir="auto">There is nothing wrong in that behavior, but it is not documented. It would be nice to have that fact mentioned at <a href="http://flask.pocoo.org/docs/blueprints/#static-files" rel="nofollow">http://flask.pocoo.org/docs/blueprints/#static-files</a> and/or <a href="http://flask.pocoo.org/docs/api/#blueprint-objects" rel="nofollow">http://flask.pocoo.org/docs/api/#blueprint-objects</a></p>
<p dir="auto">Hi,<br> I've encountered a strange bug while working with Flask. When I have two modules (say 'frontend' and 'admin') static files aren't found in frontend module. Admin module is url_prefixed with '/admin' and everything is fine with it.</p> <p dir="auto">The only workaround I found was to add a /static route in frontend module and serve files manually.</p> <p dir="auto">I've created a simple demo app to show the bug. It's available here: <a href="https://github.com/tomekwojcik/Flask-Module-Static-Files">https://github.com/tomekwojcik/Flask-Module-Static-Files</a></p> <p dir="auto">Best ragards.</p>
1
<p dir="auto">This is a tracking issue for the deprecated <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars" rel="nofollow"><code class="notranslate">std::io::Read::chars</code></a> API.</p>
<p dir="auto">Hey there</p> <p dir="auto">Reading the parsing code to try to fix <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="19995424" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/9468" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/9468/hovercard" href="https://github.com/rust-lang/rust/issues/9468">#9468</a>, I noticed there was some redundancies in the code.</p> <p dir="auto">The logic for parsing comments is fully implemented in <code class="notranslate">libsyntax/parse/comments.rs</code>, but doesn't seem to be used out of the pretty printer (<a href="https://github.com/mozilla/rust/blob/master/src/libsyntax/parse/comments.rs#L344">https://github.com/mozilla/rust/blob/master/src/libsyntax/parse/comments.rs#L344</a>).</p> <p dir="auto">The same logic is also implemented in <code class="notranslate">libsyntax/parse/lexer.rs</code>. The implementations don't seem to share code, and have some different features (comments.rs supports nested block comments while lexer.rs does not).</p> <p dir="auto">They probably should be merged.</p> <p dir="auto">I'm new to rust, and I'm a little afraid to touch this problem. The two implementations looks like they have different goals, and I fear I might not have the kind of insight required to that kind of refactoring.</p>
0
<p dir="auto">Please:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check for duplicate issues.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:</li> </ul> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax.numpy as jnp from jax.flatten_util import ravel_pytree x = jnp.arange(10, dtype=jnp.float32) x_flat, unravel = ravel_pytree(x) y = x_flat &lt; 5.3 print(y.dtype) # =&gt; &lt;dtype: 'bool'&gt; print(unravel(y).dtype) # =&gt; &lt;dtype: 'float32'&gt;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">jnp</span> <span class="pl-k">from</span> <span class="pl-s1">jax</span>.<span class="pl-s1">flatten_util</span> <span class="pl-k">import</span> <span class="pl-s1">ravel_pytree</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">jnp</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">jnp</span>.<span class="pl-s1">float32</span>) <span class="pl-s1">x_flat</span>, <span class="pl-s1">unravel</span> <span class="pl-c1">=</span> <span class="pl-en">ravel_pytree</span>(<span class="pl-s1">x</span>) <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">x_flat</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">5.3</span> <span class="pl-en">print</span>(<span class="pl-s1">y</span>.<span class="pl-s1">dtype</span>) <span class="pl-c"># =&gt; &lt;dtype: 'bool'&gt;</span> <span class="pl-en">print</span>(<span class="pl-en">unravel</span>(<span class="pl-s1">y</span>).<span class="pl-s1">dtype</span>) <span class="pl-c"># =&gt; &lt;dtype: 'float32'&gt;</span></pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> If applicable, include full error messages/tracebacks.<br> n/a</li> </ul> <p dir="auto">I'm running Python 3.9 with jax 0.2.19 and jaxlib 0.1.70.</p>
<p dir="auto">Please:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check for duplicate issues.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:</li> </ul> <p dir="auto">Steps to reproduce:</p> <ul dir="auto"> <li>Clone <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/NixOS/nixpkgs/commit/19c42cefd72befdbeab5b98c5534626d5905a8ce/hovercard" href="https://github.com/NixOS/nixpkgs/commit/19c42cefd72befdbeab5b98c5534626d5905a8ce">NixOS/nixpkgs@<tt>19c42ce</tt></a></li> <li>Update <code class="notranslate">pkgs/development/python-modules/jaxlib/default.nix</code> with these contents <a href="https://gist.github.com/samuela/931d7e29dd5e83ec5bf73de3bbc5b084">https://gist.github.com/samuela/931d7e29dd5e83ec5bf73de3bbc5b084</a>.</li> <li>Run <code class="notranslate">NIX_PATH=.. nix-build -E "with import &lt;nixpkgs&gt; {}; python3Packages.jaxlib.override { cudaSupport = true; }"</code> inside your <code class="notranslate">nixpkgs</code> checkout.</li> </ul> <p dir="auto">Observe the failure:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: /build/output/external/org_tensorflow/tensorflow/compiler/xla/python/BUILD:206:11: Compiling tensorflow/compiler/xla/python/pprof_profile_builder.cc failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -MD -MF ... (remaining 184 arguments skipped) In file included from external/com_google_absl/absl/strings/str_format.h:76, from external/org_tensorflow/tensorflow/compiler/xla/util.h:35, from external/org_tensorflow/tensorflow/compiler/xla/python/pprof_profile_builder.cc:21: external/com_google_absl/absl/strings/internal/str_format/arg.h: In instantiation of ‘constexpr absl::lts_20211102::FormatConversionCharSet absl::lts_20211102::str_format_internal::ArgumentToConv() [with Arg = google::protobuf::stringpiece_internal::StringPiece]’: external/com_google_absl/absl/strings/str_format.h:257:46: required by substitution of ‘template&lt;class ... Args&gt; using FormatSpec = absl::lts_20211102::str_format_internal::FormatSpecTemplate&lt;(ArgumentToConv&lt;Args&gt;)()...&gt; [with Args = {google::protobuf::stringpiece_internal::StringPiece}]’ external/org_tensorflow/tensorflow/compiler/xla/util.h:214:8: required by substitution of ‘template&lt;class ... Args&gt; tensorflow::Status xla::InvalidArgument(absl::lts_20211102::FormatSpec&lt;Args ...&gt;&amp;, const Args&amp; ...) [with Args = {google::protobuf::stringpiece_internal::StringPiece}]’ external/org_tensorflow/tensorflow/compiler/xla/python/pprof_profile_builder.cc:71:71: required from here external/com_google_absl/absl/strings/internal/str_format/arg.h:305:54: error: no matching function for call to ‘FormatConvertImpl(const google::protobuf::stringpiece_internal::StringPiece&amp;, const absl::lts_20211102::str_format_internal::FormatConversionSpecImpl&amp;, absl::lts_20211102::str_format_internal::FormatSinkImpl*)’ 305 | decltype(str_format_internal::FormatConvertImpl( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 306 | std::declval&lt;const Arg&amp;&gt;(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 307 | std::declval&lt;const FormatConversionSpecImpl&amp;&gt;(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 308 | std::declval&lt;FormatSinkImpl*&gt;())){}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:60:6: note: candidate: ‘template&lt;class T&gt; decltype (absl::lts_20211102::str_format_internal::AbslFormatConvert(v, declval&lt;const absl::lts_20211102::FormatConversionSpec&amp;&gt;(), declval&lt;absl::lts_20211102::FormatSink*&gt;())) absl::lts_20211102::str_format_internal::FormatConvertImpl(const T&amp;, absl::lts_20211102::str_format_internal::FormatConversionSpecImpl, absl::lts_20211102::str_format_internal::FormatSinkImpl*)’ 60 | auto FormatConvertImpl(const T&amp; v, FormatConversionSpecImpl conv, | ^~~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">ERROR: /build/output/external/org_tensorflow/tensorflow/compiler/xla/python/BUILD:206:11: Compiling tensorflow/compiler/xla/python/pprof_profile_builder.cc failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -MD -MF ... (remaining 184 arguments skipped) In file included from external/com_google_absl/absl/strings/str_format.h:76, from external/org_tensorflow/tensorflow/compiler/xla/util.h:35, from external/org_tensorflow/tensorflow/compiler/xla/python/pprof_profile_builder.cc:21: external/com_google_absl/absl/strings/internal/str_format/arg.h: In instantiation of ‘constexpr absl::lts_20211102::FormatConversionCharSet absl::lts_20211102::str_format_internal::ArgumentToConv() [with Arg = google::protobuf::stringpiece_internal::StringPiece]’: external/com_google_absl/absl/strings/str_format.h:257:46: required by substitution of ‘template&lt;class ... Args&gt; using FormatSpec = absl::lts_20211102::str_format_internal::FormatSpecTemplate&lt;(ArgumentToConv&lt;Args&gt;)()...&gt; [with Args = {google::protobuf::stringpiece_internal::StringPiece}]’ external/org_tensorflow/tensorflow/compiler/xla/util.h:214:8: required by substitution of ‘template&lt;class ... Args&gt; tensorflow::Status xla::InvalidArgument(absl::lts_20211102::FormatSpec&lt;Args ...&gt;&amp;, const Args&amp; ...) [with Args = {google::protobuf::stringpiece_internal::StringPiece}]’ external/org_tensorflow/tensorflow/compiler/xla/python/pprof_profile_builder.cc:71:71: required from here external/com_google_absl/absl/strings/internal/str_format/arg.h:305:54: error: no matching function for call to ‘FormatConvertImpl(const google::protobuf::stringpiece_internal::StringPiece&amp;, const absl::lts_20211102::str_format_internal::FormatConversionSpecImpl&amp;, absl::lts_20211102::str_format_internal::FormatSinkImpl*)’ 305 | decltype(str_format_internal::FormatConvertImpl( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 306 | std::declval&lt;const Arg&amp;&gt;(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 307 | std::declval&lt;const FormatConversionSpecImpl&amp;&gt;(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 308 | std::declval&lt;FormatSinkImpl*&gt;())){}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ external/com_google_absl/absl/strings/internal/str_format/arg.h:60:6: note: candidate: ‘template&lt;class T&gt; decltype (absl::lts_20211102::str_format_internal::AbslFormatConvert(v, declval&lt;const absl::lts_20211102::FormatConversionSpec&amp;&gt;(), declval&lt;absl::lts_20211102::FormatSink*&gt;())) absl::lts_20211102::str_format_internal::FormatConvertImpl(const T&amp;, absl::lts_20211102::str_format_internal::FormatConversionSpecImpl, absl::lts_20211102::str_format_internal::FormatSinkImpl*)’ 60 | auto FormatConvertImpl(const T&amp; v, FormatConversionSpecImpl conv, | ^~~~~~~~~~~~~~~~~ </code></pre></div> <p dir="auto">I can confirm that this build "script" works on 0.1.75 and a number versions before that. Oddly enough the CPU-only build (run <code class="notranslate">nix-build -A python3Packages.jaxlib</code>) runs just fine.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> If applicable, include full error messages/tracebacks.</li> </ul> <p dir="auto">You can check out the unabridged build log here: <a href="https://gist.github.com/samuela/fca69ea5ad0eb20d77b8be060446db21">https://gist.github.com/samuela/fca69ea5ad0eb20d77b8be060446db21</a>.</p>
0
<p dir="auto">A very nice addition to TypeScript's type system would be sum types in the spirit of ML-like languages. This is one of basic and simple programming constructs from functional programming which you really miss once you get used to it, but which seem to have a hard time being included in new modern languages (contrary to other features from functional programming such as first-class functions, structural types, generics).</p> <p dir="auto">I guess the most natural way to integrate sum types in the current language syntax would be to extend enum variants with extra parameters (similarly to what Rust does: <a href="http://doc.rust-lang.org/tutorial.html#enums" rel="nofollow">http://doc.rust-lang.org/tutorial.html#enums</a> ) and upgrade the switch statement to a more powerful structural pattern matching (although in a first step, simply discriminating on the toplevel variant and capturing its parameters would be already quite good).</p> <p dir="auto">This is quite different from other the proposal about "union types" (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="37905058" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/14" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/14/hovercard" href="https://github.com/microsoft/TypeScript/issues/14">#14</a>), which would mostly be useful to capture types in existing Javascript APIs. Sum types are rather used to describe algebraic data structures. They would be particularly useful for any kind of symbolic processing (including for implementing the TypeScript compiler).</p>
<p dir="auto">Many values or parameters in JavaScript can be of more than one type. For example, a function might take an object where one of the properties can be either a string or a number, but not a function.</p> <p dir="auto">Comments from Ron Buckton in <a href="https://typescript.codeplex.com/workitem/1364" rel="nofollow">https://typescript.codeplex.com/workitem/1364</a><br> I'd like to see type annotations provide some support for a type union. For example:</p> <h3 dir="auto">ES6 Promise</h3> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Promise&lt;T&gt; { // ... static any&lt;TResult&gt;(...values: union { Promise&lt;T&gt;; T; }[]): Promise&lt;T&gt;; static every&lt;TResult&gt;(...values: union { Promise&lt;T&gt;; T; }[]): Promise&lt;T[]&gt;; static some&lt;TResult&gt;(...values: union { Promise&lt;T&gt;; T; }[]): Promise&lt;T&gt;; then(resolve?: (value: T) =&gt; union { Promise&lt;T&gt;; T; }, reject?: (value: any) =&gt; union { Promise&lt;T&gt;; T; }): Promise&lt;T&gt;; // ... }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// ...</span> <span class="pl-k">static</span> <span class="pl-en">any</span><span class="pl-c1">&lt;</span><span class="pl-smi">TResult</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span>...<span class="pl-s1">values</span>: <span class="pl-smi">union</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">static</span> <span class="pl-s1">every</span><span class="pl-c1">&lt;</span><span class="pl-smi">TResult</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span>...<span class="pl-s1">values</span>: <span class="pl-smi">union</span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">static</span> <span class="pl-s1">some</span><span class="pl-c1">&lt;</span><span class="pl-smi">TResult</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span>...<span class="pl-s1">values</span>: <span class="pl-smi">union</span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-s1">then</span><span class="pl-kos">(</span><span class="pl-s1">resolve</span>?: <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">union</span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-c1">T</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">reject</span>?: <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">union</span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-c1">T</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-c">// ...</span> <span class="pl-kos">}</span></pre></div> <h3 dir="auto">ES6 Loader</h3> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Loader&lt;T&gt; { // ... normalize(name: string, referer?: Referer): union { string; { normalized: string; metadata?: any }; }; resolve(normalized: string, options?: { referer: Referer; metadata: any; }): union { string; { address: string; extra?: string[]; }; }; // ... }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Loader</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// ...</span> <span class="pl-en">normalize</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">referer</span>?: <span class="pl-smi">Referer</span><span class="pl-kos">)</span>: <span class="pl-smi">union</span> <span class="pl-kos">{</span> <span class="pl-s1">string</span><span class="pl-kos">;</span> <span class="pl-kos">{</span> normalized: <span class="pl-s1">string</span><span class="pl-kos">;</span> metadata?: <span class="pl-s1">any</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s1">normalized</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">options</span>?: <span class="pl-kos">{</span> <span class="pl-c1">referer</span>: <span class="pl-smi">Referer</span><span class="pl-kos">;</span> <span class="pl-c1">metadata</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>: <span class="pl-smi">union</span> <span class="pl-kos">{</span> <span class="pl-s1">string</span><span class="pl-kos">;</span> <span class="pl-kos">{</span> address: <span class="pl-s1">string</span><span class="pl-kos">;</span> extra?: <span class="pl-s1">string</span><span class="pl-kos">[</span><span class="pl-s1"></span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">// ...</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">When static type checking is performed, it is possible to have some type issues when explicitly providing generic type arguments and having the wrong type chosen, but this exists today without supporting type unions.</p> <p dir="auto">The other open issue is what to do with a local that is a type union: should it act as an <code class="notranslate">any</code>, a type that contains all of the members of both (or all) types in the union, or a type that only contains the members that are the same in both (or all) types in the union.</p> <p dir="auto">An implicit or explicit type cast from a type union to one of the union types would pass without the need to perform an intermediate cast to , and an explicit type cast to a more specific type for any of the union types would likewise succeed without an intermediate cast.</p> <p dir="auto">Assignment to a local or field that is a type union would succeed as if it were either of the types (e.g. implicit or explicit type cast from a more specific type to a less specific type specified in the type union).</p> <p dir="auto">There is also a question on how to properly handle the intellisense for a symbol that uses a type union. It could either be represented as a number of overloads (similar to what would have to be typed today), or preserve the type union definition.</p> <h2 dir="auto">Union Declaration</h2> <p dir="auto">Providing a typedef-like syntax for unions would also be useful to define a reusable definition:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="union Ref&lt;T&gt; { Promise&lt;T&gt;; T; }"><pre class="notranslate"><span class="pl-s1">union</span> <span class="pl-smi">Ref</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">This is roughly analogous to an interface that defines multiple call signatures:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// as an interface with call signatures... interface ResolveCallback&lt;T&gt; { (value: Promise&lt;T&gt;): void; (value: T): void; (): void; } // ...and as a union with function types union ResolveCallback&lt;T&gt; { (value: Promise&lt;T&gt;) =&gt; void; (value: T) =&gt; void; () =&gt; void; }"><pre class="notranslate"><span class="pl-c">// as an interface with call signatures...</span> <span class="pl-k">interface</span> <span class="pl-smi">ResolveCallback</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">T</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c">// ...and as a union with function types</span> <span class="pl-s1">union</span><span class="pl-kos"></span> <span class="pl-smi">ResolveCallback</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">void</span><span class="pl-kos">;</span> <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">void</span><span class="pl-kos">;</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">void</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <h2 dir="auto">Static Analysis</h2> <p dir="auto">Adding type unions would require changes to the static type information to be supported. The primary goal of adding type unions is to help the compiler determine the best matching type for a call expression or return type expression. The following sections discuss various ways of handling static analysis of type unions.</p> <h3 dir="auto">Assigning to a Type Union</h3> <p dir="auto">When assigning to an identifier that is annotated with a type union, passing a value as an argument to a function for a parameter that is a type union, returning a value from a function with a type union in its return type annotation, or type-casting a value to a type union, the type of the value being assigned or returned must be compatible (as either an exact match or a superset of type information) with one of the types defined in the type union.</p> <p dir="auto">For example:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// assign to variable var value: union { Promise&lt;number&gt;; number; }; value = 1; // legal value = Promise.resolve&lt;number&gt;(1); // legal value = new Date(); // static error // type-cast to union declare var n: number; declare var p: Promise&lt;number&gt;; declare var a: any; declare var d: Date; &lt;union { Promise&lt;number&gt;; number; }&gt;n; // legal &lt;union { Promise&lt;number&gt;; number; }&gt;p; // legal &lt;union { Promise&lt;number&gt;; number; }&gt;a; // legal &lt;union { Promise&lt;number&gt;; number; }&gt;d; // legal // union in return value function func(type: string): union { Promise&lt;number&gt;; number; } { switch (type) { case &quot;number&quot;: return 1; // legal case &quot;promise&quot;: return Promise.resolve&lt;number&gt;(1); // legal case &quot;date&quot;: return new Date(); // static error } } // union in invocation expression declare function func(promiseOrValue: union { Promise&lt;number&gt;; number; }): void; declare var n: number; declare var p: Promise&lt;number&gt;; declare var a: any; declare var d: Date; func(n); // legal func(p); // legal func(a); // legal func(d); // static error"><pre class="notranslate"><span class="pl-c">// assign to variable</span> <span class="pl-k">var</span> <span class="pl-s1">value</span>: <span class="pl-smi">union</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">number</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-s1">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-en">resolve</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Date</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// static error</span> <span class="pl-c">// type-cast to union</span> <span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">n</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">p</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">a</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">d</span>: <span class="pl-smi">Date</span><span class="pl-kos">;</span> <span class="pl-kos">&lt;</span><span class="pl-s1">union</span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">number</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-c1">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">&gt;</span><span class="pl-s1">n</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-kos">&lt;</span><span class="pl-s1">union</span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">number</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-c1">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">&gt;</span><span class="pl-s1">p</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-kos">&lt;</span><span class="pl-s1">union</span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">number</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-c1">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">&gt;</span><span class="pl-s1">a</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-kos">&lt;</span><span class="pl-s1">union</span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">number</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-c1">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">&gt;</span><span class="pl-s1">d</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-c">// union in return value</span> <span class="pl-k">function</span> <span class="pl-en">func</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">union</span> <span class="pl-kos">{</span> <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-s1">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">{</span> <span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-s1">type</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">case</span> <span class="pl-s">"number"</span>: <span class="pl-k">return</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-k">case</span> <span class="pl-s">"promise"</span>: <span class="pl-k">return</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-en">resolve</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-k">case</span> <span class="pl-s">"date"</span>: <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">Date</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// static error </span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-c">// union in invocation expression</span> <span class="pl-k">declare</span> <span class="pl-k">function</span> <span class="pl-en">func</span><span class="pl-kos">(</span><span class="pl-s1">promiseOrValue</span>: <span class="pl-smi">union</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-s1">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>: <span class="pl-k">void</span><span class="pl-kos">;</span> <span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">n</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">p</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">a</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">d</span>: <span class="pl-smi">Date</span><span class="pl-kos">;</span> <span class="pl-en">func</span><span class="pl-kos">(</span><span class="pl-s1">n</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-en">func</span><span class="pl-kos">(</span><span class="pl-s1">p</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-en">func</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-en">func</span><span class="pl-kos">(</span><span class="pl-s1">d</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// static error</span></pre></div> <h3 dir="auto">Assigning from a Type Union</h3> <p dir="auto">When assigning to another value from a type union or type-casting from a type union, the type of the value must be compatible (as either an exact match or a subset of type information) with one of the types in the union.</p> <p dir="auto">For example:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// assignment declare var value: union { Promise&lt;number&gt;; number; }; var n: number; var p: Promise&lt;number&gt;; var a: any; var d: Date; n = value; // legal p = value; // legal a = value; // legal d = value; // static error // type-cast &lt;Promise&lt;number&gt;&gt;value; // legal &lt;number&gt;value; // legal &lt;any&gt;value; // legal &lt;Date&gt;value; // static error"><pre class="notranslate"><span class="pl-c">// assignment</span> <span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">value</span>: <span class="pl-smi">union</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-c1">Promise</span><span class="pl-c1">&lt;</span><span class="pl-smi">number</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-s1">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">n</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">p</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">a</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">d</span>: <span class="pl-smi">Date</span><span class="pl-kos">;</span> <span class="pl-s1">n</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-s1">p</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-c">// static error</span> <span class="pl-c">// type-cast</span> <span class="pl-kos">&lt;</span><span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">&gt;</span><span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-kos">&lt;</span><span class="pl-smi">any</span><span class="pl-kos">&gt;</span><span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-c">// legal</span> <span class="pl-kos">&lt;</span><span class="pl-smi">Date</span><span class="pl-kos">&gt;</span><span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-c">// static error</span></pre></div>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: /home/wavy/Ten/tensorflow/tensorflow/contrib/factorization/BUILD:116:1: Linking of rule '//tensorflow/contrib/factorization:gen_gen_factorization_ops_py_wrappers_cc' failed (Exit 1)"><pre class="notranslate"><code class="notranslate">ERROR: /home/wavy/Ten/tensorflow/tensorflow/contrib/factorization/BUILD:116:1: Linking of rule '//tensorflow/contrib/factorization:gen_gen_factorization_ops_py_wrappers_cc' failed (Exit 1) </code></pre></div> <p dir="auto">This is the error output.</p> <p dir="auto">Thanks!</p>
<p dir="auto">I upgraded to tensorflow 1.4. I found that this version can not load "cudart64_90.dll" when i import tensorflow in python.</p> <p dir="auto">It can work when i use tensorflow 1.4 rc-0. But now it goes error: Could not find 'cudart64_80.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 8.0 from this URL: <a href="https://developer.nvidia.com/cuda-toolkit" rel="nofollow">https://developer.nvidia.com/cuda-toolkit</a>.</p>
1
<h3 dir="auto">Reproducing code example:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt;"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt; </code></pre></div> <p dir="auto">Before this happened I was running a different python script, which used 89 processes. Unfortunately I cannot share that script publicly. Since then numpy crashes after import immediately.</p> <h3 dir="auto">Error message:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="OpenBLAS blas_thread_init: pthread_create failed for thread 52 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 53 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 54 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 55 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 56 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 57 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 58 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 59 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 60 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 61 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 62 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 63 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max Traceback (most recent call last): File &quot;/usr/local/lib64/python3.6/site-packages/numpy/core/__init__.py&quot;, line 17, in &lt;module&gt; from . import multiarray File &quot;/usr/local/lib64/python3.6/site-packages/numpy/core/multiarray.py&quot;, line 14, in &lt;module&gt; from . import overrides File &quot;/usr/local/lib64/python3.6/site-packages/numpy/core/overrides.py&quot;, line 7, in &lt;module&gt; from numpy.core._multiarray_umath import ( ImportError: PyCapsule_Import could not import module &quot;datetime&quot; During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;temp.py&quot;, line 1, in &lt;module&gt; import matplotlib.pyplot as plt; File &quot;/usr/local/lib64/python3.6/site-packages/matplotlib/__init__.py&quot;, line 138, in &lt;module&gt; from . import cbook, rcsetup File &quot;/usr/local/lib64/python3.6/site-packages/matplotlib/cbook/__init__.py&quot;, line 31, in &lt;module&gt; import numpy as np File &quot;/usr/local/lib64/python3.6/site-packages/numpy/__init__.py&quot;, line 142, in &lt;module&gt; from . import core File &quot;/usr/local/lib64/python3.6/site-packages/numpy/core/__init__.py&quot;, line 47, in &lt;module&gt; raise ImportError(msg) ImportError: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy c-extensions failed. - Try uninstalling and reinstalling numpy. - If you have already done that, then: 1. Check that you expected to use Python3.6 from &quot;/usr/bin/python3&quot;, and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy version &quot;1.17.2&quot; you're trying to use. 2. If (1) looks fine, you can open a new issue at https://github.com/numpy/numpy/issues. Please include details on: - how you installed Python - how you installed numpy - your operating system - whether or not you have multiple versions of Python installed - if you built from source, your compiler versions and ideally a build log - If you're working with a numpy git repository, try `git clean -xdf` (removes all files not under version control) and rebuild numpy. Note: this error has many possible causes, so please don't comment on an existing issue about this - open a new one instead. Original error was: PyCapsule_Import could not import module &quot;datetime&quot; zsh: segmentation fault python3 temp.py"><pre class="notranslate"><code class="notranslate">OpenBLAS blas_thread_init: pthread_create failed for thread 52 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 53 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 54 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 55 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 56 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 57 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 58 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 59 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 60 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 61 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 62 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max OpenBLAS blas_thread_init: pthread_create failed for thread 63 of 64: Resource temporarily unavailable OpenBLAS blas_thread_init: RLIMIT_NPROC 4096 current, 1028736 max Traceback (most recent call last): File "/usr/local/lib64/python3.6/site-packages/numpy/core/__init__.py", line 17, in &lt;module&gt; from . import multiarray File "/usr/local/lib64/python3.6/site-packages/numpy/core/multiarray.py", line 14, in &lt;module&gt; from . import overrides File "/usr/local/lib64/python3.6/site-packages/numpy/core/overrides.py", line 7, in &lt;module&gt; from numpy.core._multiarray_umath import ( ImportError: PyCapsule_Import could not import module "datetime" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "temp.py", line 1, in &lt;module&gt; import matplotlib.pyplot as plt; File "/usr/local/lib64/python3.6/site-packages/matplotlib/__init__.py", line 138, in &lt;module&gt; from . import cbook, rcsetup File "/usr/local/lib64/python3.6/site-packages/matplotlib/cbook/__init__.py", line 31, in &lt;module&gt; import numpy as np File "/usr/local/lib64/python3.6/site-packages/numpy/__init__.py", line 142, in &lt;module&gt; from . import core File "/usr/local/lib64/python3.6/site-packages/numpy/core/__init__.py", line 47, in &lt;module&gt; raise ImportError(msg) ImportError: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy c-extensions failed. - Try uninstalling and reinstalling numpy. - If you have already done that, then: 1. Check that you expected to use Python3.6 from "/usr/bin/python3", and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy version "1.17.2" you're trying to use. 2. If (1) looks fine, you can open a new issue at https://github.com/numpy/numpy/issues. Please include details on: - how you installed Python - how you installed numpy - your operating system - whether or not you have multiple versions of Python installed - if you built from source, your compiler versions and ideally a build log - If you're working with a numpy git repository, try `git clean -xdf` (removes all files not under version control) and rebuild numpy. Note: this error has many possible causes, so please don't comment on an existing issue about this - open a new one instead. Original error was: PyCapsule_Import could not import module "datetime" zsh: segmentation fault python3 temp.py </code></pre></div> <h3 dir="auto">Numpy/Python version information:</h3> <p dir="auto">numpy-1.7.1-13.el7.x86_64</p>
<p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="907717829" data-permission-text="Title is private" data-url="https://github.com/vscode-restructuredtext/snooty-parser/issues/24" data-hovercard-type="issue" data-hovercard-url="/vscode-restructuredtext/snooty-parser/issues/24/hovercard" href="https://github.com/vscode-restructuredtext/snooty-parser/issues/24">vscode-restructuredtext/snooty-parser#24</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="907722755" data-permission-text="Title is private" data-url="https://github.com/networkx/networkx/issues/4857" data-hovercard-type="issue" data-hovercard-url="/networkx/networkx/issues/4857/hovercard" href="https://github.com/networkx/networkx/issues/4857">networkx/networkx#4857</a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1829149/120243452-77d12480-c21c-11eb-82ab-a8d7f160e4b9.png"><img src="https://user-images.githubusercontent.com/1829149/120243452-77d12480-c21c-11eb-82ab-a8d7f160e4b9.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">I expect <code class="notranslate">import numpy</code> to commit close to 0 memory.</p> <h3 dir="auto">Reproducing code example:</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span></pre></div> <h3 dir="auto">Error message:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File &quot;C:\Users\Ark\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\__init__.py&quot;, line 153, in &lt;module&gt; from . import ma File &quot;C:\Users\Ark\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\ma\__init__.py&quot;, line 42, in &lt;module&gt; from . import core File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 967, in _find_and_load_unlocked File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 724, in exec_module File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 818, in get_code File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 917, in get_data MemoryError"><pre class="notranslate"><code class="notranslate"> File "C:\Users\Ark\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\__init__.py", line 153, in &lt;module&gt; from . import ma File "C:\Users\Ark\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\ma\__init__.py", line 42, in &lt;module&gt; from . import core File "&lt;frozen importlib._bootstrap&gt;", line 983, in _find_and_load File "&lt;frozen importlib._bootstrap&gt;", line 967, in _find_and_load_unlocked File "&lt;frozen importlib._bootstrap&gt;", line 677, in _load_unlocked File "&lt;frozen importlib._bootstrap_external&gt;", line 724, in exec_module File "&lt;frozen importlib._bootstrap_external&gt;", line 818, in get_code File "&lt;frozen importlib._bootstrap_external&gt;", line 917, in get_data MemoryError </code></pre></div> <h3 dir="auto">NumPy/Python version information:</h3> <p dir="auto">1.19.5 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]</p>
1
<p dir="auto">I want to create all HTTP methods requests and fetch the response data with Playwright. Is there any way by which we can achieve this with Playwright or do we need to go for other API libraries for making API request?</p>
<p dir="auto">I currently use Cypress for my automation testing framework, however I am toying with the idea of moving over to Playwright. One feature of cypress that really shines in the ability to make HttpRequests using the <a href="https://docs.cypress.io/api/commands/request" rel="nofollow">cy.request()</a> function, I use this many times throughout the current system however the most important request is used to setup my randomly generated user application state before I even visit the web-app itself (it makes the request to our webServer which responds with data that is then used for the user-specific localStorage items), this allows me to skip the login screen of my application entirely, saving a lot of time for each test.</p> <p dir="auto">I have read the docs about how Playwright can re-use application state but this is not really a viable solution for me because after each test I specifically use new application state.</p> <p dir="auto">TLDR: Is it possible to make an HttpRequest through Playwright and get its response?</p>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.4</li> <li>Operating System version: Mac</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>import the source code of dubbo.</li> <li>at root of the dubbo, execute mvn install</li> <li>run zookeeper at localhost:2181</li> <li>cd to dubbo-demo/dubbo-demo-api/dubbo-demo-api-provide/src/...... run main()</li> <li>has error No such extension org.apache.dubbo.configcenter.DynamicConfigurationFactory by name zookeeper</li> </ol> <p dir="auto">i want to run this demo at local.</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.5.4</li> <li>Operating System version: linux</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>many request once time</li> </ol> <p dir="auto">6000, group=smart}]], channel: /172.16.31.191:44814 -&gt; /172.16.21.41:20835<br> at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:101)<br> at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:227)<br> at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72)<br> at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)<br> at com.alibaba.dubbo.common.bytecode.proxy1.getUserBySession(proxy1.java)<br> at<br> Caused by: com.alibaba.dubbo.remoting.TimeoutException: Sending request timeout in client-side by scan timer. start time: 2019-01-26 00:02:04.295, end time: 2019-01-26 00:02:10.301, elapsed: 6006 ms, timeout: 6000 ms, request: Request [id=258487922, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation<br> at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.returnFromResponse(DefaultFuture.java:188)<br> at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:110)<br> at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:84)<br> at com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:96)<br> at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:144)<br> at com.tuya.basic.dubbo.ext.filter.ServiceDegradationFilter.invoke(ServiceDegradationFilter.java:44)<br> at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)<br> at com.alibaba.csp.sentinel.adapter.dubbo.DubboAppContextFilter.invoke(DubboAppContextFilter.java:41)<br> at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)<br> at com.alibaba.csp.sentinel.adapter.dubbo.SentinelDubboConsumerFilter.invoke(SentinelDubboConsumerFilter.java:60)<br> at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)<br> at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)<br> at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)<br> at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:53)<br> at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)<br> at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48)<br> at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)<br> at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:74)<br> at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:53)<br> at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:77)<br> ... 39 common frames omitted</p> <p dir="auto">什么原因会导致TimeoutException: Sending request timeout in client-side by scan timer异常</p>
0
<p dir="auto">So my box in uni got upgraded and now I have this test failure:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="====================================================================== FAIL: sklearn.manifold.tests.test_locally_linear.test_lle_simple_grid ---------------------------------------------------------------------- Traceback (most recent call last): File &quot;/usr/lib/python2.7/dist-packages/nose/case.py&quot;, line 197, in runTest self.test(*self.arg) File &quot;/home/local/lamueller/checkout/scikit-learn/sklearn/manifold/tests/test_locally_linear.py&quot;, line 68, in test_lle_simple_grid assert_less(np.linalg.norm(X_reembedded - clf.embedding_), tol) AssertionError: 0.12820616722921346 not less than 0.1 &quot;&quot;&quot;Fail immediately, with the given message.&quot;&quot;&quot; &gt;&gt; raise self.failureException('0.12820616722921346 not less than 0.1')"><pre class="notranslate"><code class="notranslate">====================================================================== FAIL: sklearn.manifold.tests.test_locally_linear.test_lle_simple_grid ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/home/local/lamueller/checkout/scikit-learn/sklearn/manifold/tests/test_locally_linear.py", line 68, in test_lle_simple_grid assert_less(np.linalg.norm(X_reembedded - clf.embedding_), tol) AssertionError: 0.12820616722921346 not less than 0.1 """Fail immediately, with the given message.""" &gt;&gt; raise self.failureException('0.12820616722921346 not less than 0.1') </code></pre></div> <p dir="auto">scipy 0.10.1, 32bit.</p>
<h4 dir="auto">Describe the issue linked to the documentation</h4> <p dir="auto">when I look at the example given <a href="https://scikit-learn.org/stable/auto_examples/release_highlights/plot_release_highlights_0_22_0.html#permutation-based-feature-importance" rel="nofollow">here</a>, I got confused why the feature names are not sorted with respect to importance.</p> <h4 dir="auto">Suggest a potential alternative/fix</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="X, y = make_classification(random_state=0, n_features=5, n_informative=3) rf = RandomForestClassifier(random_state=0).fit(X, y) result = permutation_importance(rf, X, y, n_repeats=10, random_state=0, n_jobs=-1) feature_names = np.array([f'x_{i}' for i in range(X.shape[1])]) fig, ax = plt.subplots() sorted_idx = result.importances_mean.argsort() ax.boxplot(result.importances[sorted_idx].T, vert=False, labels=feature_names[sorted_idx]) ax.set_title(&quot;Permutation Importance of each feature&quot;) ax.set_ylabel(&quot;Features&quot;) fig.tight_layout() plt.show()"><pre class="notranslate"><code class="notranslate">X, y = make_classification(random_state=0, n_features=5, n_informative=3) rf = RandomForestClassifier(random_state=0).fit(X, y) result = permutation_importance(rf, X, y, n_repeats=10, random_state=0, n_jobs=-1) feature_names = np.array([f'x_{i}' for i in range(X.shape[1])]) fig, ax = plt.subplots() sorted_idx = result.importances_mean.argsort() ax.boxplot(result.importances[sorted_idx].T, vert=False, labels=feature_names[sorted_idx]) ax.set_title("Permutation Importance of each feature") ax.set_ylabel("Features") fig.tight_layout() plt.show() </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/20812407/82727658-85022c00-9d09-11ea-82be-2b864c5c6735.png"><img width="492" alt="image" src="https://user-images.githubusercontent.com/20812407/82727658-85022c00-9d09-11ea-82be-2b864c5c6735.png" style="max-width: 100%;"></a></p> <p dir="auto">Also, for clarity may be we can set <code class="notranslate">n_redundant=0</code>, hence emphasising that <code class="notranslate">permutation_importance</code> identifies the 3 informative features precisely.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="X, y = make_classification(random_state=0, n_features=5, n_informative=3, n_redundant=0) rf = RandomForestClassifier(random_state=0).fit(X, y) result = permutation_importance(rf, X, y, n_repeats=10, random_state=0, n_jobs=-1) feature_names = np.array([f'x_{i}' for i in range(X.shape[1])]) fig, ax = plt.subplots() sorted_idx = result.importances_mean.argsort() ax.boxplot(result.importances[sorted_idx].T, vert=False, labels=feature_names[sorted_idx]) ax.set_title(&quot;Permutation Importance of each feature&quot;) ax.set_ylabel(&quot;Features&quot;) fig.tight_layout() plt.show()"><pre class="notranslate"><code class="notranslate">X, y = make_classification(random_state=0, n_features=5, n_informative=3, n_redundant=0) rf = RandomForestClassifier(random_state=0).fit(X, y) result = permutation_importance(rf, X, y, n_repeats=10, random_state=0, n_jobs=-1) feature_names = np.array([f'x_{i}' for i in range(X.shape[1])]) fig, ax = plt.subplots() sorted_idx = result.importances_mean.argsort() ax.boxplot(result.importances[sorted_idx].T, vert=False, labels=feature_names[sorted_idx]) ax.set_title("Permutation Importance of each feature") ax.set_ylabel("Features") fig.tight_layout() plt.show() </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/20812407/82727670-951a0b80-9d09-11ea-9c25-ea9eaeb94347.png"><img width="492" alt="image" src="https://user-images.githubusercontent.com/20812407/82727670-951a0b80-9d09-11ea-9c25-ea9eaeb94347.png" style="max-width: 100%;"></a></p>
0
<p dir="auto">I have a host with a local-only (everything on the same host) Celery setup for some continuous data processing. Recently the load got much higher, all the CPU cores often are under 100% load and I've started to get <code class="notranslate">WorkerLostError: Worker exited prematurely: exitcode 155</code> out of the blue multiple times per day. A worker works and then suddenly</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR/MainProcess] Task some_task[some_id] raised unexpected: WorkerLostError('Worker exited prematurely: exitcode 155.',) Traceback (most recent call last): File &quot;...venv/local/lib/python2.7/site-packages/billiard/pool.py&quot;, line 1175, in mark_as_worker_lost human_status(exitcode)), WorkerLostError: Worker exited prematurely: exitcode 155."><pre class="notranslate"><code class="notranslate">ERROR/MainProcess] Task some_task[some_id] raised unexpected: WorkerLostError('Worker exited prematurely: exitcode 155.',) Traceback (most recent call last): File "...venv/local/lib/python2.7/site-packages/billiard/pool.py", line 1175, in mark_as_worker_lost human_status(exitcode)), WorkerLostError: Worker exited prematurely: exitcode 155. </code></pre></div> <p dir="auto">I had Celery 3.1.19 but upgrading to the latest version changed nothing. Right now the versions are:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery==3.1.20 amqp==1.4.9 billiard==3.3.0.22 kombu==3.0.33"><pre class="notranslate"><code class="notranslate">celery==3.1.20 amqp==1.4.9 billiard==3.3.0.22 kombu==3.0.33 </code></pre></div> <p dir="auto">I use Redis as the broker (tuned to save each message on the disk), and maybe these Celery settings will tell you something:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CELERY_ACKS_LATE = True CELERYD_MAX_TASKS_PER_CHILD = 1 CELERYD_PREFETCH_MULTIPLIER = 1 #-Ofair #CELERYD_CONCURRENCY is &gt; 1 BROKER_CONNECTION_TIMEOUT = 4 BROKER_CONNECTION_MAX_RETRIES = 3 BROKER_TRANSPORT_OPTIONS = { 'fanout_prefix': True, 'fanout_patterns': True, 'visibility_timeout': CELERYD_TASK_TIME_LIMIT, }"><pre class="notranslate"><code class="notranslate">CELERY_ACKS_LATE = True CELERYD_MAX_TASKS_PER_CHILD = 1 CELERYD_PREFETCH_MULTIPLIER = 1 #-Ofair #CELERYD_CONCURRENCY is &gt; 1 BROKER_CONNECTION_TIMEOUT = 4 BROKER_CONNECTION_MAX_RETRIES = 3 BROKER_TRANSPORT_OPTIONS = { 'fanout_prefix': True, 'fanout_patterns': True, 'visibility_timeout': CELERYD_TASK_TIME_LIMIT, } </code></pre></div>
<p dir="auto">Under high load we encountered duplicate job execution, as well as <code class="notranslate">WorkerLostError: Worker exited prematurely: exitcode 155</code> exceptions.</p> <p dir="auto">We use <code class="notranslate">--max-memory-per-child</code> which leads to workers recycling (exit code 155) between jobs, and sometime the last job seems to be re-executed, as if the MainProcess didn't get the job result from the WorkerProcess.</p> <h2 dir="auto">Checklist</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@fe29479f29e2:/app# celery -A tasks report software -&gt; celery:4.2.0 (windowlicker) kombu:4.2.1 py:3.6.6 billiard:3.5.0.4 py-amqp:2.3.2 platform -&gt; system:Linux arch:64bit imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:amqp results:db+postgres://postgres:**@db:5432/postgres"><pre class="notranslate"><code class="notranslate">root@fe29479f29e2:/app# celery -A tasks report software -&gt; celery:4.2.0 (windowlicker) kombu:4.2.1 py:3.6.6 billiard:3.5.0.4 py-amqp:2.3.2 platform -&gt; system:Linux arch:64bit imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:amqp results:db+postgres://postgres:**@db:5432/postgres </code></pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.<br> Using current master HEAD <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/21baef53c39bc1909fd6eee9a2a20e6ce851e88c/hovercard" href="https://github.com/celery/celery/commit/21baef53c39bc1909fd6eee9a2a20e6ce851e88c"><tt>21baef5</tt></a>:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip install 'git+https://github.com/celery/celery.git@21baef5#egg=celery [sqlalchemy]'"><pre class="notranslate"><code class="notranslate">pip install 'git+https://github.com/celery/celery.git@21baef5#egg=celery [sqlalchemy]' </code></pre></div> <h2 dir="auto">Steps to reproduce</h2> <h3 dir="auto">Global scenario</h3> <ul dir="auto"> <li>with <code class="notranslate">rabbitmq</code> as broker, <code class="notranslate">postgresql</code> as backend using <code class="notranslate">sqlalchemy</code></li> <li>start <code class="notranslate">celery</code> with: <ul dir="auto"> <li>lot's of children worker processes to simulate high load: e.g. 64 workers</li> <li><code class="notranslate">--max-tasks-per-child=1</code> to simulate workers process high churn</li> </ul> </li> <li>send lots of tasks</li> <li>watch <code class="notranslate">celery</code> output for duplicate job execution: <ul dir="auto"> <li><code class="notranslate">[2018-10-17 09:46:15,694: INFO/MainProcess] Received task: work[fc23b1f5-a363-4c22-a1e3-28052811c237] </code></li> <li><code class="notranslate">[2018-10-17 09:46:15,695: WARNING/ForkPoolWorker-5526] do_work:5570</code></li> <li> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2018-10-17 09:46:12,491: ERROR/MainProcess] Task handler raised error: WorkerLostError('Worker exited prematurely: exitcode 155.',) Traceback (most recent call last): File &quot;/usr/local/lib/python3.6/dist-packages/billiard/pool.py&quot;, line 1223, in mark_as_worker_lost human_status(exitcode)), billiard.exceptions.WorkerLostError: Worker exited prematurely: exitcode 155."><pre class="notranslate"><code class="notranslate">[2018-10-17 09:46:12,491: ERROR/MainProcess] Task handler raised error: WorkerLostError('Worker exited prematurely: exitcode 155.',) Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/billiard/pool.py", line 1223, in mark_as_worker_lost human_status(exitcode)), billiard.exceptions.WorkerLostError: Worker exited prematurely: exitcode 155. </code></pre></div> </li> </ul> </li> </ul> <h3 dir="auto">Scripted scenario</h3> <p dir="auto">I made a reproducible scenario using docker and docker-compose:<br> <a href="https://gist.github.com/thomas-riccardi/6295ca2b39e16619141d349e7b189d75">https://gist.github.com/thomas-riccardi/6295ca2b39e16619141d349e7b189d75</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# get scenario git clone https://gist.github.com/6295ca2b39e16619141d349e7b189d75.git celery-duplicate-jobs cd celery-duplicate-jobs # start everything docker-compose up --build; docker-compose down # in a second terminal, in same directory: watch `celery` output while sleep 1; do echo &quot;&quot; log=$(docker-compose logs worker) echo &quot;MainProcess receved task count uniqueness:&quot; echo &quot;${log}&quot; | grep &quot;Received task:&quot; | awk '{print $8}' | sort | uniq -c | sort -g | awk '{print $1}' | uniq -c echo -n &quot;WorkerLostError: &quot; echo &quot;${log}&quot; | grep &quot;raised error: WorkerLostError&quot; | wc -l echo &quot;Job execution uniqueness (job count per job execution count):&quot; echo &quot;${log}&quot; | grep do_work: | awk '{print $6}' | sort | uniq -c | sort -g | awk '{print $1}' | uniq -c done # to stop everything: just Ctrl-C on `docker-compose` and the bash script"><pre class="notranslate"><code class="notranslate"># get scenario git clone https://gist.github.com/6295ca2b39e16619141d349e7b189d75.git celery-duplicate-jobs cd celery-duplicate-jobs # start everything docker-compose up --build; docker-compose down # in a second terminal, in same directory: watch `celery` output while sleep 1; do echo "" log=$(docker-compose logs worker) echo "MainProcess receved task count uniqueness:" echo "${log}" | grep "Received task:" | awk '{print $8}' | sort | uniq -c | sort -g | awk '{print $1}' | uniq -c echo -n "WorkerLostError: " echo "${log}" | grep "raised error: WorkerLostError" | wc -l echo "Job execution uniqueness (job count per job execution count):" echo "${log}" | grep do_work: | awk '{print $6}' | sort | uniq -c | sort -g | awk '{print $1}' | uniq -c done # to stop everything: just Ctrl-C on `docker-compose` and the bash script </code></pre></div> <h2 dir="auto">Expected behavior</h2> <ul dir="auto"> <li>No (<code class="notranslate">WorkerLostError</code>) error logger.</li> <li>Jobs are executed exactly once.</li> </ul> <h3 dir="auto">Scripted scenario</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MainProcess received task count uniqueness: 1649 1 WorkerLostError: 0 Job execution uniqueness (job count per job execution count): 1534 1"><pre class="notranslate"><code class="notranslate">MainProcess received task count uniqueness: 1649 1 WorkerLostError: 0 Job execution uniqueness (job count per job execution count): 1534 1 </code></pre></div> <ul dir="auto"> <li>The MainProcess received 1649 tasks, all unique.</li> <li>The <code class="notranslate">WorkerLostError</code> exception is never logged.</li> <li>There is no job that was executed multiple times.</li> </ul> <h2 dir="auto">Actual behavior</h2> <ul dir="auto"> <li>Many <code class="notranslate">WorkerLostError</code> exceptions are logged as error.</li> <li>Some jobs are executed multiple times.</li> </ul> <h3 dir="auto">Scripted scenario</h3> <p dir="auto">After some time (~1min on my machine) we start to get <code class="notranslate">WorkerLostError</code> exceptions and jobs executed multiple times:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MainProcess received task count uniqueness: 1649 1 WorkerLostError: 125 Job execution uniqueness (job count per job execution count): 1523 1 11 2"><pre class="notranslate"><code class="notranslate">MainProcess received task count uniqueness: 1649 1 WorkerLostError: 125 Job execution uniqueness (job count per job execution count): 1523 1 11 2 </code></pre></div> <ul dir="auto"> <li>The MainProcess received 1649 tasks, all unique (so it's not a broker-level issue).</li> <li>The WorkerLostError exception is logged 125 times.</li> <li>There are 11 jobs that were executed 2 times.</li> </ul> <h2 dir="auto">More tests</h2> <h3 dir="auto">No backend</h3> <p dir="auto">When disabling the celery backend I could not reproduce the issues:</p> <ul dir="auto"> <li>no <code class="notranslate">WorkerLostError</code> exception</li> <li>no duplicated job execution</li> </ul> <h3 dir="auto">Redis backend</h3> <p dir="auto">With <code class="notranslate">redis</code> as backend instead of <code class="notranslate">postgresql</code>, I quickly have a burst of <code class="notranslate">WorkerLostError</code> but it never increases afterward, and no duplicate job execution:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MainProcess receved task count uniqueness: 223 1 WorkerLostError: 0 Job execution uniqueness (job count per job execution count): 64 1 MainProcess receved task count uniqueness: 278 1 WorkerLostError: 10 Job execution uniqueness (job count per job execution count): 128 1 ... MainProcess receved task count uniqueness: 10000 1 WorkerLostError: 10 Job execution uniqueness (job count per job execution count): 10000 1"><pre class="notranslate"><code class="notranslate">MainProcess receved task count uniqueness: 223 1 WorkerLostError: 0 Job execution uniqueness (job count per job execution count): 64 1 MainProcess receved task count uniqueness: 278 1 WorkerLostError: 10 Job execution uniqueness (job count per job execution count): 128 1 ... MainProcess receved task count uniqueness: 10000 1 WorkerLostError: 10 Job execution uniqueness (job count per job execution count): 10000 1 </code></pre></div> <p dir="auto">I believe the issue is also there, but the race condition isn't triggered somehow (is redis too fast?).</p> <h3 dir="auto">PostgreSQL backend, Redis broker</h3> <p dir="auto">With <code class="notranslate">redis</code> as broker instead of <code class="notranslate">rabbitmq</code> (and still <code class="notranslate">postgresql</code> as backend) I could not reproduce the issues either:</p> <ul dir="auto"> <li>no <code class="notranslate">WorkerLostError</code> exception</li> <li>no duplicated job execution</li> </ul> <p dir="auto">Same conclusion as before.</p> <h2 dir="auto">More analysis</h2> <p dir="auto">I tried to analyze the issue by adding lots of <code class="notranslate">debug</code> log in <code class="notranslate">billiard/pool.py</code> and <code class="notranslate">celery/concurrency/asynpool.py</code>.<br> What I understood happens:<br> ...</p> <ol dir="auto"> <li><code class="notranslate">MainProcess</code> receives a job from the broker</li> <li><code class="notranslate">MainProcess</code> sends the job to one of its <code class="notranslate">Worker</code></li> <li><code class="notranslate">Worker</code> receives the job</li> <li><code class="notranslate">Worker</code> <code class="notranslate">put</code>s <code class="notranslate">ACK</code> for the job in its out queue</li> <li><code class="notranslate">Worker</code> executes the job and finishes it</li> <li><code class="notranslate">Worker</code> <code class="notranslate">put</code>s the job result it in its out queue</li> <li><code class="notranslate">Worker</code> finds it must stop: (max memory, max task..): it exits with code 155</li> <li><code class="notranslate">MainProcess</code> sees its child <code class="notranslate">Worker</code> process die with code 155</li> <li><code class="notranslate">MainProcess</code> checks pending job passed to this <code class="notranslate">Worker</code>: seems to re-queue them on another <code class="notranslate">Worker</code> =&gt; duplicate job execution</li> <li><code class="notranslate">MainProcess</code> logs exception: <code class="notranslate">2018-10-12 14:08:35,781 celery.worker.request ERROR Task handler raised error: WorkerLostError('Worker exited prematurely: exitcode 155.',)</code></li> <li>another <code class="notranslate">Worker</code> gets the job</li> </ol> <p dir="auto">...</p> <p dir="auto">What I understand should happen:<br> Different behavior starting at step <code class="notranslate">9.</code>:<br> 9. <code class="notranslate">MainProcess</code> should handle all remaining messages in <code class="notranslate">Worker</code> out queue: mark job as finished<br> 10. <code class="notranslate">MainProcess</code> doesn't logs exception as there should be no job currently handled by the <code class="notranslate">Worker</code><br> 11. <code class="notranslate">MainProcess</code> acknowledges the job to the broker/backend</p> <h3 dir="auto">Debug logs</h3> <h4 dir="auto"><code class="notranslate">billiard.ResultHandler on_state_change</code></h4> <p dir="auto"><a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L812-L814">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L812-L814</a><br> Logging here reveals that the <code class="notranslate">MainProcess</code> never processes the job response (state <code class="notranslate">READY = 1</code>), and most of the time not even the <code class="notranslate">ACK</code> (state <code class="notranslate">ACK = 0</code>). This explains why the job is re-executed by another worker.<br> (During my tests I saw the <code class="notranslate">ACK</code> always processed, but it was with a modified celery/billiard, see later hacks.)</p> <h3 dir="auto">Strange things in celery/billiard code/tried some fix/hacks</h3> <h4 dir="auto"><code class="notranslate">billiard.Pool._join_exited_workers</code>, <code class="notranslate">LOST_WORKER_TIMEOUT</code></h4> <p dir="auto">In billiard there seems to be a feature to wait some time after the <code class="notranslate">MainProcess</code> sees a child Worker process die, to have some time to process the remaining messages from it.<br> It's controlled by <code class="notranslate">LOST_WORKER_TIMEOUT</code>.</p> <p dir="auto"><code class="notranslate">billiard.Pool</code>:</p> <ul dir="auto"> <li>when a worker dies, we tag each of its jobs with current timestamp with <code class="notranslate">on_job_process_lost</code> <ul dir="auto"> <li><a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1185-L1187">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1185-L1187</a></li> <li><a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1216-L1217">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1216-L1217</a></li> </ul> </li> <li>then later we check for such tagged jobs if timeout was reached, in which case we really fail these jobs (with <code class="notranslate">mark_as_worker_lost</code>)<br> <a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1131-L1140">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1131-L1140</a></li> </ul> <p dir="auto">Celery <code class="notranslate">AsynPool</code> child class:</p> <ul dir="auto"> <li>it overrides <code class="notranslate">on_job_process_lost</code> to directly call <code class="notranslate">mark_as_worker_lost</code>:<br> <a href="https://github.com/celery/celery/blame/v4.2.1/celery/concurrency/asynpool.py#L1085-L1092">https://github.com/celery/celery/blame/v4.2.1/celery/concurrency/asynpool.py#L1085-L1092</a></li> </ul> <p dir="auto">=&gt; Celery <code class="notranslate">AsynPool</code> child class bypasses the whole <code class="notranslate">LOST_WORKER_TIMEOUT</code> timeout.</p> <h5 dir="auto">Code timeline</h5> <ul dir="auto"> <li> <p dir="auto">2013-05-01 billiard: code refactoring: notably adds <code class="notranslate">on_job_worker_lost</code> hook and <code class="notranslate">mark_as_worker_lost</code>: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/billiard/commit/06bc65e0696acc433c68ff2bb5a64445b17a4c70/hovercard" href="https://github.com/celery/billiard/commit/06bc65e0696acc433c68ff2bb5a64445b17a4c70">celery/billiard@<tt>06bc65e</tt></a></p> </li> <li> <p dir="auto">2013-05-01 celery: adapt code for child class AsynPool: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/43fda6fa13b466eb377704424f2ed1426c7b75a6/hovercard" href="https://github.com/celery/celery/commit/43fda6fa13b466eb377704424f2ed1426c7b75a6"><tt>43fda6f</tt></a></p> <ul dir="auto"> <li>by implementing the new <code class="notranslate">on_job_worker_lost</code> hook by directly calling <code class="notranslate">mark_as_worker_lost</code>, it bypasses the whole mechanism</li> </ul> </li> <li> <p dir="auto">2013-07-26 first <code class="notranslate">WorkerLostError 155</code> bug report: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17275382" data-permission-text="Title is private" data-url="https://github.com/celery/billiard/issues/67" data-hovercard-type="issue" data-hovercard-url="/celery/billiard/issues/67/hovercard" href="https://github.com/celery/billiard/issues/67">celery/billiard#67</a></p> </li> <li> <p dir="auto">2013-11-28 second bug report: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="23424810" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/1703" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/1703/hovercard" href="https://github.com/celery/celery/issues/1703">#1703</a></p> </li> <li> <p dir="auto">2013-11-28 wrong? fix: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="23464467" data-permission-text="Title is private" data-url="https://github.com/celery/billiard/issues/87" data-hovercard-type="pull_request" data-hovercard-url="/celery/billiard/pull/87/hovercard" href="https://github.com/celery/billiard/pull/87">celery/billiard#87</a></p> </li> </ul> <h5 dir="auto">Questions</h5> <ul dir="auto"> <li>Is it an issue that this feature was bypassed ?</li> </ul> <h5 dir="auto">Hack/Fix</h5> <h6 dir="auto">Hack 1</h6> <p dir="auto">I tried to restore the feature by removing the Celery <code class="notranslate">AsynPool</code> <code class="notranslate">on_job_process_lost</code> override: it doesn't fix the issue.</p> <h6 dir="auto">Hack 2</h6> <p dir="auto">In fact there seem to be more breakage of this feature:</p> <ul dir="auto"> <li>the timeout stored in <code class="notranslate">job._lost_worker</code> is reset each time <code class="notranslate">_join_exited_workers</code> is called, instead of being set only the first time we check this job when its worker is dead.</li> <li>we also lose the <code class="notranslate">exitcode</code> when checking again a job</li> </ul> <p dir="auto"><code class="notranslate">on_job_process_lost</code> is called here: <a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1180-L1187">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1180-L1187</a></p> <p dir="auto">I'm not sure how to fix this, either call only once, or make <code class="notranslate">on_job_process_lost</code> idempotent?</p> <p dir="auto">Result: it did not fix the issue either... We just wait for 10 seconds now before calling <code class="notranslate">mark_as_worker_lost</code>: last out queue messages are still not processed.</p> <h4 dir="auto"><code class="notranslate">billiard.Worker.__call__</code>, <code class="notranslate">_do_exit</code></h4> <p dir="auto">Following the previous analysis, I checked the Worker exit code:<br> <a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L274-L310">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L274-L310</a></p> <h5 dir="auto">Questions</h5> <ul dir="auto"> <li>Why do we override <code class="notranslate">sys.exit</code> ?</li> <li>How come we still end up in <code class="notranslate">_do_exit</code> since we seem to call <code class="notranslate">sys.exit</code> when <code class="notranslate">workloop</code> returns with <code class="notranslate">EX_RECYCLE</code> (the infamous <code class="notranslate">155</code>).</li> <li>Why do we do extra work for non win32 platform? <ul dir="auto"> <li>Why <code class="notranslate">put</code> <code class="notranslate">DEATH</code> (<code class="notranslate">4</code>) then <code class="notranslate">sleep 1</code>? <ul dir="auto"> <li>This comes from <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/billiard/commit/896fc0d344bb18249a472153484a26328b6ebbe6/hovercard" href="https://github.com/celery/billiard/commit/896fc0d344bb18249a472153484a26328b6ebbe6">celery/billiard@<tt>896fc0d</tt></a> with no related issue <ul dir="auto"> <li>The <code class="notranslate">MainProcess</code> <code class="notranslate">on_death</code> then kills the worker with <code class="notranslate">SIGTERM</code>, this may risk breaking the explicit <code class="notranslate">155</code> recycle exit code mechanism...</li> </ul> </li> <li>This reveals there is clearly a race condition in the system, sleeping won't help</li> </ul> </li> </ul> </li> <li>Why <code class="notranslate">os._exit</code> instead of <code class="notranslate">sys.exit</code> ? <ul dir="auto"> <li><code class="notranslate">os._exit</code> doesn't seem to close/flush the fd/socket/Pipe, it may explain why the <code class="notranslate">MainProcess</code> misses messages.</li> <li><code class="notranslate">sys.exit</code> may risk closing resources still used by the <code class="notranslate">MainProcess</code>...</li> </ul> </li> </ul> <h5 dir="auto">Hack/Fix</h5> <h6 dir="auto">Hack 3</h6> <p dir="auto">(Cumulative with hack 1 and 2)</p> <ul dir="auto"> <li>Stopped to override <code class="notranslate">sys.exit</code></li> <li>Directly called <code class="notranslate">exit</code></li> <li>In <code class="notranslate">_do_exit</code> called <code class="notranslate">sys.exit</code> <ul dir="auto"> <li>Even tried explicit flush: <code class="notranslate">self.outq._writer.close()</code></li> </ul> </li> </ul> <p dir="auto">Result: still some <code class="notranslate">WorkerLostError</code>.</p> <p dir="auto">I also tried cumulatively to increase the <code class="notranslate">sleep</code>: with <code class="notranslate">sleep(10)</code> it seems to stop reproducing the issues, but it's still an ugly workaround...</p> <h3 dir="auto">Remaining questions</h3> <p dir="auto">I don't have much more time to invest in this without help.</p> <ul dir="auto"> <li>I did not dig into the whole "receiving and handling messages from workers" and how it interacts with the "worker is dead" management code.</li> <li>Maybe we should try to guarantee working on the last messages from a worker when it dies, instead of just waiting 10s (that was even disabled/broken in 2013)</li> <li>And/or maybe we should use a proper shutdown sequence, with a <code class="notranslate">DEATH_ACK</code> ? Something like: <ul dir="auto"> <li><code class="notranslate">Worker</code>: send <code class="notranslate">DEATH</code> at exit, after having sent everything else. Wait for DEATH_ACK</li> <li><code class="notranslate">MainProcess</code>: receive <code class="notranslate">DEATH</code>, read order is guaranteed sequential (is it?): we are sure we already handled all application messages. Send <code class="notranslate">DEATH_ACK</code></li> <li><code class="notranslate">Worker</code>: receive <code class="notranslate">DEATH_ACK</code>: <code class="notranslate">sys.exit(exit_code)</code></li> <li><code class="notranslate">MainProcess</code>: wait for worker process death</li> <li>maybe some retry? maybe some later force-kill?</li> </ul> </li> </ul> <h2 dir="auto">Related issues</h2> <ul dir="auto"> <li>2013-07-26 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17275382" data-permission-text="Title is private" data-url="https://github.com/celery/billiard/issues/67" data-hovercard-type="issue" data-hovercard-url="/celery/billiard/issues/67/hovercard" href="https://github.com/celery/billiard/issues/67">celery/billiard#67</a></li> <li>2013-11-28 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="23424810" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/1703" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/1703/hovercard" href="https://github.com/celery/celery/issues/1703">#1703</a></li> <li>2016-03-02 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="137939038" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/3085" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/3085/hovercard" href="https://github.com/celery/celery/issues/3085">#3085</a></li> </ul>
1
<p dir="auto">What steps will reproduce the problem?</p> <ol dir="auto"> <li>Use custom typescript 1.5 beta compiler.</li> <li>Type a code snippet: let a: typeof DataView.</li> <li>Get an error: Error:(1, 15) TS2304: Cannot find name 'DataView'.</li> </ol> <p dir="auto">What is the expected result?<br> It should be right.</p> <p dir="auto">What happens instead?<br> Get an error.</p> <p dir="auto">Please provide any additional information below.<br> When I use bounded typescript 1.4 compiler and the new typescript 1.5 alpha compiler, everything is OK. I don't know where I should put this issue, so I put it both in webstorm and typescript issue track platform. Please check and tell me what should I do.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3363650/7439704/b84f4406-f0b8-11e4-9860-53822efd817e.png"><img src="https://cloud.githubusercontent.com/assets/3363650/7439704/b84f4406-f0b8-11e4-9860-53822efd817e.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Looking at history : <a href="https://github.com/Microsoft/TypeScript/commits/master/bin/lib.d.ts">https://github.com/Microsoft/TypeScript/commits/master/bin/lib.d.ts</a></p> <p dir="auto">Was there on April 11 : <a href="https://github.com/Microsoft/TypeScript/blob/6f1feffe6710a3201fb46a0b01e16051bfc18a29/bin/lib.d.ts#L1689">https://github.com/Microsoft/TypeScript/blob/6f1feffe6710a3201fb46a0b01e16051bfc18a29/bin/lib.d.ts#L1689</a></p> <p dir="auto">Isn't there on April 18: <a href="https://github.com/Microsoft/TypeScript/blob/b8ebf561f94ea27ecfc6af3c2b20661e6fcd79ed/bin/lib.d.ts">https://github.com/Microsoft/TypeScript/blob/b8ebf561f94ea27ecfc6af3c2b20661e6fcd79ed/bin/lib.d.ts</a></p> <p dir="auto">Report by Atom-TypeScript user <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vaughnroyko/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vaughnroyko">@vaughnroyko</a></p> <p dir="auto">The following code now fails (source from : <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView</a>):</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var littleEndian = (function() { var buffer = new ArrayBuffer(2); new DataView(buffer).setInt16(0, 256, true); return new Int16Array(buffer)[0] === 256; })(); console.log(littleEndian); // true or false"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">littleEndian</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">buffer</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">ArrayBuffer</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">new</span> <span class="pl-smi">DataView</span><span class="pl-kos">(</span><span class="pl-s1">buffer</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">setInt16</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">256</span><span class="pl-kos">,</span> <span class="pl-c1">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">Int16Array</span><span class="pl-kos">(</span><span class="pl-s1">buffer</span><span class="pl-kos">)</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-c1">256</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">littleEndian</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// true or false</span></pre></div>
1
<p dir="auto">Hello Typescript!</p> <p dir="auto">In our typescript file, we have the following function implementation:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="protected foo&lt;A,B&gt;(): {a: A; b: B;}[] { return null; }"><pre class="notranslate"><span class="pl-s1">protected</span> <span class="pl-s1">foo</span><span class="pl-c1">&lt;</span><span class="pl-smi">A</span><span class="pl-kos">,</span><span class="pl-smi">B</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-kos">{</span><span class="pl-c1">a</span>: <span class="pl-smi">A</span><span class="pl-kos">;</span> <span class="pl-c1">b</span>: <span class="pl-smi">B</span><span class="pl-kos">;</span><span class="pl-kos">}</span><span class="pl-kos">[</span><span class="pl-kos">]</span> <span class="pl-kos">{</span> return <span class="pl-s1">null</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">When the compiler runs, it throws the following errors<br> Return type of public method from exported class has or is using private name 'A'.<br> Return type of public method from exported class has or is using private name 'B'.</p> <p dir="auto">Is this expected or is this a bug? My first instinct is that A/B are not private and thus should not have this error be thrown.</p> <p dir="auto">Note that if protected is changed to public, the error doesn't appear.</p>
<p dir="auto">The following code fails in TypeScript 1.4 with the below errors:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export class MyClass { protected myMethod&lt;T&gt;(val: T): T { return val; } }"><pre class="notranslate"><code class="notranslate">export class MyClass { protected myMethod&lt;T&gt;(val: T): T { return val; } } </code></pre></div> <p dir="auto">Parameter 'val' of public method from exported class has or is using private name 'T'.<br> Return type of public method from exported class has or is using private name 'T'.</p>
1
<pre class="notranslate">What steps will reproduce the problem? <a href="http://play.golang.org/p/bopaXuF1NJ" rel="nofollow">http://play.golang.org/p/bopaXuF1NJ</a> What is the expected output? value value in this case, 's' always represent the out scope variable, or key in this case, 's' always represent the inner scope variable What do you see instead? value key this means, in statement 's, ok := m[s]', 's' represent the inner scope variable sometimes and represent the outer scope variable at other times Which compiler are you using (5g, 6g, 8g, gccgo)? 8g Which operating system are you using? windows 7 Which version are you using? (run 'go version') go version go1.1.1 windows/386 Please provide any additional information below.</pre>
<pre class="notranslate">On Win7/amd64: cd %GOPATH%\src\code.google.com\p\go.talks\2013 present visit <a href="http://127.0.0.1:3999/advconc" rel="nofollow">http://127.0.0.1:3999/advconc</a>, click `pingpong1.go` link: 404 page not found pingpong1.go file url: <a href="http://127.0.0.1:3999/advconc%5cpingpong1.go" rel="nofollow">http://127.0.0.1:3999/advconc%5cpingpong1.go</a> we should use `/` instead of `%5c` on Windows(`%5c` is `\`).</pre>
0
<h4 dir="auto">Description</h4> <p dir="auto">The first and second image of <a href="http://scikit-learn.org/dev/modules/mixture.html#estimation-algorithm-variational-inference" rel="nofollow">the doc of Variable Bayesian Gaussian Mixture</a> are the same. This is due to a simple typo in the file name.</p> <p dir="auto">While fixing this, as per <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tguillemot/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tguillemot">@tguillemot</a> 's advice, it might be beneficial to modify <a href="https://github.com/scikit-learn/scikit-learn/blob/master/examples/mixture/plot_concentration_prior.py#L74">plot_concentration_prior.py</a> too, since the default value of the <code class="notranslate">align</code> parameter of <code class="notranslate">ax.bar()</code> has changed from <code class="notranslate">edge</code> to <code class="notranslate">center</code> in matplotlib 2.0 (<a href="http://matplotlib.org/users/dflt_style_changes.html#bar-and-barh" rel="nofollow">changelog</a>), so the bar charts are off when the script is run with matplotlib 2.</p> <p dir="auto">I am sending a PR.</p>
<h4 dir="auto">Describe the issue linked to the documentation</h4> <p dir="auto">Some models have many parameters.<br> Some of those parameters are very important, some others much less so.<br> While sklearn provides sound defaults usually, it would be nice<br> if a potential user sees right away which parameters <em>must</em><br> be optimized in order to get a significantly better model.</p> <h4 dir="auto">Suggest a potential alternative/fix</h4> <p dir="auto">For example, in RandomForestsRegressor (and Classifier), n_trees<br> is a critical parameter (while I have no idea for the other ones, honestly).</p> <p dir="auto">In linearSVR, C is a critical parameter (epsilon is not, in my experience).</p> <p dir="auto">Let's define a way to tag such parameters in the documentation, and let expert users<br> tag the critical parameters for models they have experience working with.</p>
0
<h3 dir="auto">Bug summary</h3> <p dir="auto">For development purposes, I forked and cloned Matploltlib from this Github repository and tried to install using pip in the development mode (<code class="notranslate">-e</code>), but I got the following error.</p> <ul dir="auto"> <li>I use MacOS Ventura (Darwin 22.2.0) with Apple-Silicon (M1)</li> <li>The error occurred at the installation of Matplotlib-owned freetype</li> <li>I could install Matplotlib using system-installed freetype using setup.cfg below, so likely the issue is related to Matplotlib-owned freetype.</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[libs] system_freetype = true"><pre class="notranslate"><code class="notranslate">[libs] system_freetype = true </code></pre></div> <ul dir="auto"> <li>The key of the error seems to be the following part:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" cd builds/unix; \ ./configure '--with-zlib=no' '--with-bzip2=no' '--with-png=no' '--with-harfbuzz=no' '--enable-static' '--disable-shared' '--host=arm64-apple-darwin20.0.0' checking build system type... arm-apple-darwin22.2.0 checking host system type... Invalid configuration `arm64-apple-darwin20.0.0': machine `arm64-apple' not recognized configure: error: /bin/sh ./config.sub arm64-apple-darwin20.0.0 failed"><pre class="notranslate"><code class="notranslate"> cd builds/unix; \ ./configure '--with-zlib=no' '--with-bzip2=no' '--with-png=no' '--with-harfbuzz=no' '--enable-static' '--disable-shared' '--host=arm64-apple-darwin20.0.0' checking build system type... arm-apple-darwin22.2.0 checking host system type... Invalid configuration `arm64-apple-darwin20.0.0': machine `arm64-apple' not recognized configure: error: /bin/sh ./config.sub arm64-apple-darwin20.0.0 failed </code></pre></div> <p dir="auto">A possible reason may be either</p> <ul dir="auto"> <li>Matplotlib-owned freetype (2.6.1) does not support Apple-Silicon MacOS (True?), or</li> <li>It does support non-latest Apple-Silicon MacOS, but not yet the latest Ventura?</li> </ul> <p dir="auto">One thing I am wondering is why <code class="notranslate">'--host=arm64-apple-darwin20.0.0'</code> is given in <code class="notranslate">./configure</code> although my Darwin is <code class="notranslate">22.2.0</code>.</p> <p dir="auto">Thank you very much developers for your help in advance.</p> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pip install -e ."><pre class="notranslate"><span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-c1">-</span><span class="pl-s1">e</span> .</pre></div> <h3 dir="auto">Actual outcome</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Obtaining file:///Users/ikeda/codes/matplotlib Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Requirement already satisfied: setuptools-scm&gt;=7 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (7.1.0) Requirement already satisfied: kiwisolver&gt;=1.0.1 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (1.4.4) Requirement already satisfied: packaging&gt;=20.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (23.0) Requirement already satisfied: pyparsing&gt;=2.3.1 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (3.0.9) Requirement already satisfied: importlib-resources&gt;=3.2.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (5.10.2) Requirement already satisfied: python-dateutil&gt;=2.7 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (2.8.2) Requirement already satisfied: pillow&gt;=6.2.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (9.4.0) Requirement already satisfied: contourpy&gt;=1.0.1 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (1.0.7) Requirement already satisfied: numpy&gt;=1.21 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (1.24.1) Requirement already satisfied: fonttools&gt;=4.22.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (4.38.0) Requirement already satisfied: cycler&gt;=0.10 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (0.11.0) Requirement already satisfied: zipp&gt;=3.1.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from importlib-resources&gt;=3.2.0-&gt;matplotlib==0.1.0.dev45646+gcb06554) (3.11.0) Requirement already satisfied: six&gt;=1.5 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from python-dateutil&gt;=2.7-&gt;matplotlib==0.1.0.dev45646+gcb06554) (1.16.0) Requirement already satisfied: setuptools in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev45646+gcb06554) (61.2.0) Requirement already satisfied: typing-extensions in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev45646+gcb06554) (4.4.0) Requirement already satisfied: tomli&gt;=1.0.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev45646+gcb06554) (2.0.1) Installing collected packages: matplotlib Running setup.py develop for matplotlib ERROR: Command errored out with exit status 1: command: /Users/ikeda/miniconda3/envs/matplotlib-dev/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/Users/ikeda/codes/matplotlib/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/Users/ikeda/codes/matplotlib/setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' develop --no-deps cwd: /Users/ikeda/codes/matplotlib/ Complete output (99 lines): /private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/dist.py:285: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420). warnings.warn(msg, SetuptoolsDeprecationWarning) Edit mplsetup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB python: yes [3.9.12 (main, Apr 5 2022, 01:52:34) [Clang 12.0.0 ]] platform: yes [darwin] tests: no [skipping due to configuration] macosx: yes [installing] running develop /private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( /private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running egg_info writing lib/matplotlib.egg-info/PKG-INFO writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt writing requirements to lib/matplotlib.egg-info/requires.txt writing top-level names to lib/matplotlib.egg-info/top_level.txt adding license file 'LICENSE/LICENSE' adding license file 'LICENSE/LICENSE_AMSFONTS' adding license file 'LICENSE/LICENSE_BAKOMA' adding license file 'LICENSE/LICENSE_CARLOGO' adding license file 'LICENSE/LICENSE_COLORBREWER' adding license file 'LICENSE/LICENSE_COURIERTEN' adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER' adding license file 'LICENSE/LICENSE_QHULL' adding license file 'LICENSE/LICENSE_QT4_EDITOR' adding license file 'LICENSE/LICENSE_SOLARIZED' adding license file 'LICENSE/LICENSE_STIX' adding license file 'LICENSE/LICENSE_YORICK' writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt' running build_ext clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include/python3.9 -c /var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpguoklkpy.cpp -o var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpguoklkpy.o -fvisibility=hidden clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include/python3.9 -c /var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpr8z1i6kz.cpp -o var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpr8z1i6kz.o -fvisibility-inlines-hidden clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include/python3.9 -c /var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpi980u469.cpp -o var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpi980u469.o -flto FreeType build system -- automatic system detection The following settings are used: platform unix compiler clang configuration directory ./builds/unix configuration rules ./builds/unix/unix.mk If this does not correspond to your system or settings please remove the file `config.mk' from this directory then read the INSTALL file for help. Otherwise, simply type `/Applications/Xcode.app/Contents/Developer/usr/bin/make' again to build the library, or `/Applications/Xcode.app/Contents/Developer/usr/bin/make refdoc' to build the API reference (this needs python &gt;= 2.6). cd builds/unix; \ ./configure '--with-zlib=no' '--with-bzip2=no' '--with-png=no' '--with-harfbuzz=no' '--enable-static' '--disable-shared' '--host=arm64-apple-darwin20.0.0' checking build system type... arm-apple-darwin22.2.0 checking host system type... Invalid configuration `arm64-apple-darwin20.0.0': machine `arm64-apple' not recognized configure: error: /bin/sh ./config.sub arm64-apple-darwin20.0.0 failed make: *** [setup] Error 1 Traceback (most recent call last): File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt; File &quot;/Users/ikeda/codes/matplotlib/setup.py&quot;, line 270, in &lt;module&gt; setup( # Finally, pass this all along to setuptools to do the heavy lifting. File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/__init__.py&quot;, line 108, in setup return distutils.core.setup(**attrs) File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py&quot;, line 185, in setup return run_commands(dist) File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py&quot;, line 201, in run_commands dist.run_commands() File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py&quot;, line 969, in run_commands self.run_command(cmd) File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/dist.py&quot;, line 1213, in run_command super().run_command(command) File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py&quot;, line 988, in run_command cmd_obj.run() File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/command/develop.py&quot;, line 34, in run self.install_for_development() File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/command/develop.py&quot;, line 114, in install_for_development self.run_command('build_ext') File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py&quot;, line 318, in run_command self.distribution.run_command(command) File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/dist.py&quot;, line 1213, in run_command super().run_command(command) File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py&quot;, line 988, in run_command cmd_obj.run() File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py&quot;, line 84, in run _build_ext.run(self) File &quot;/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py&quot;, line 346, in run self.build_extensions() File &quot;/Users/ikeda/codes/matplotlib/setup.py&quot;, line 183, in build_extensions package.do_custom_build(env) File &quot;/Users/ikeda/codes/matplotlib/setupext.py&quot;, line 654, in do_custom_build subprocess.check_call(configure, env=env, cwd=src_path) File &quot;/Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/subprocess.py&quot;, line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['./configure', '--with-zlib=no', '--with-bzip2=no', '--with-png=no', '--with-harfbuzz=no', '--enable-static', '--disable-shared', '--host=arm64-apple-darwin20.0.0']' returned non-zero exit status 2. Building freetype in build/freetype-2.6.1 ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/ikeda/miniconda3/envs/matplotlib-dev/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/Users/ikeda/codes/matplotlib/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/Users/ikeda/codes/matplotlib/setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' develop --no-deps Check the logs for full command output."><pre class="notranslate"><code class="notranslate">Obtaining file:///Users/ikeda/codes/matplotlib Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Requirement already satisfied: setuptools-scm&gt;=7 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (7.1.0) Requirement already satisfied: kiwisolver&gt;=1.0.1 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (1.4.4) Requirement already satisfied: packaging&gt;=20.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (23.0) Requirement already satisfied: pyparsing&gt;=2.3.1 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (3.0.9) Requirement already satisfied: importlib-resources&gt;=3.2.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (5.10.2) Requirement already satisfied: python-dateutil&gt;=2.7 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (2.8.2) Requirement already satisfied: pillow&gt;=6.2.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (9.4.0) Requirement already satisfied: contourpy&gt;=1.0.1 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (1.0.7) Requirement already satisfied: numpy&gt;=1.21 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (1.24.1) Requirement already satisfied: fonttools&gt;=4.22.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (4.38.0) Requirement already satisfied: cycler&gt;=0.10 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from matplotlib==0.1.0.dev45646+gcb06554) (0.11.0) Requirement already satisfied: zipp&gt;=3.1.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from importlib-resources&gt;=3.2.0-&gt;matplotlib==0.1.0.dev45646+gcb06554) (3.11.0) Requirement already satisfied: six&gt;=1.5 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from python-dateutil&gt;=2.7-&gt;matplotlib==0.1.0.dev45646+gcb06554) (1.16.0) Requirement already satisfied: setuptools in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev45646+gcb06554) (61.2.0) Requirement already satisfied: typing-extensions in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev45646+gcb06554) (4.4.0) Requirement already satisfied: tomli&gt;=1.0.0 in /Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev45646+gcb06554) (2.0.1) Installing collected packages: matplotlib Running setup.py develop for matplotlib ERROR: Command errored out with exit status 1: command: /Users/ikeda/miniconda3/envs/matplotlib-dev/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/ikeda/codes/matplotlib/setup.py'"'"'; __file__='"'"'/Users/ikeda/codes/matplotlib/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps cwd: /Users/ikeda/codes/matplotlib/ Complete output (99 lines): /private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/dist.py:285: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420). warnings.warn(msg, SetuptoolsDeprecationWarning) Edit mplsetup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB python: yes [3.9.12 (main, Apr 5 2022, 01:52:34) [Clang 12.0.0 ]] platform: yes [darwin] tests: no [skipping due to configuration] macosx: yes [installing] running develop /private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( /private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running egg_info writing lib/matplotlib.egg-info/PKG-INFO writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt writing requirements to lib/matplotlib.egg-info/requires.txt writing top-level names to lib/matplotlib.egg-info/top_level.txt adding license file 'LICENSE/LICENSE' adding license file 'LICENSE/LICENSE_AMSFONTS' adding license file 'LICENSE/LICENSE_BAKOMA' adding license file 'LICENSE/LICENSE_CARLOGO' adding license file 'LICENSE/LICENSE_COLORBREWER' adding license file 'LICENSE/LICENSE_COURIERTEN' adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER' adding license file 'LICENSE/LICENSE_QHULL' adding license file 'LICENSE/LICENSE_QT4_EDITOR' adding license file 'LICENSE/LICENSE_SOLARIZED' adding license file 'LICENSE/LICENSE_STIX' adding license file 'LICENSE/LICENSE_YORICK' writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt' running build_ext clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include/python3.9 -c /var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpguoklkpy.cpp -o var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpguoklkpy.o -fvisibility=hidden clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include/python3.9 -c /var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpr8z1i6kz.cpp -o var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpr8z1i6kz.o -fvisibility-inlines-hidden clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include -fPIC -O2 -isystem /Users/ikeda/miniconda3/envs/matplotlib-dev/include -arch arm64 -I/Users/ikeda/miniconda3/envs/matplotlib-dev/include/python3.9 -c /var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpi980u469.cpp -o var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/tmpi980u469.o -flto FreeType build system -- automatic system detection The following settings are used: platform unix compiler clang configuration directory ./builds/unix configuration rules ./builds/unix/unix.mk If this does not correspond to your system or settings please remove the file `config.mk' from this directory then read the INSTALL file for help. Otherwise, simply type `/Applications/Xcode.app/Contents/Developer/usr/bin/make' again to build the library, or `/Applications/Xcode.app/Contents/Developer/usr/bin/make refdoc' to build the API reference (this needs python &gt;= 2.6). cd builds/unix; \ ./configure '--with-zlib=no' '--with-bzip2=no' '--with-png=no' '--with-harfbuzz=no' '--enable-static' '--disable-shared' '--host=arm64-apple-darwin20.0.0' checking build system type... arm-apple-darwin22.2.0 checking host system type... Invalid configuration `arm64-apple-darwin20.0.0': machine `arm64-apple' not recognized configure: error: /bin/sh ./config.sub arm64-apple-darwin20.0.0 failed make: *** [setup] Error 1 Traceback (most recent call last): File "&lt;string&gt;", line 1, in &lt;module&gt; File "/Users/ikeda/codes/matplotlib/setup.py", line 270, in &lt;module&gt; setup( # Finally, pass this all along to setuptools to do the heavy lifting. File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 108, in setup return distutils.core.setup(**attrs) File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1213, in run_command super().run_command(command) File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/command/develop.py", line 34, in run self.install_for_development() File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/command/develop.py", line 114, in install_for_development self.run_command('build_ext') File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1213, in run_command super().run_command(command) File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/private/var/folders/t5/tgnxd1t14qzcl85h5c9w8v2r0000gn/T/pip-build-env-1ros0004/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run self.build_extensions() File "/Users/ikeda/codes/matplotlib/setup.py", line 183, in build_extensions package.do_custom_build(env) File "/Users/ikeda/codes/matplotlib/setupext.py", line 654, in do_custom_build subprocess.check_call(configure, env=env, cwd=src_path) File "/Users/ikeda/miniconda3/envs/matplotlib-dev/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['./configure', '--with-zlib=no', '--with-bzip2=no', '--with-png=no', '--with-harfbuzz=no', '--enable-static', '--disable-shared', '--host=arm64-apple-darwin20.0.0']' returned non-zero exit status 2. Building freetype in build/freetype-2.6.1 ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/ikeda/miniconda3/envs/matplotlib-dev/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/ikeda/codes/matplotlib/setup.py'"'"'; __file__='"'"'/Users/ikeda/codes/matplotlib/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output. </code></pre></div> <h3 dir="auto">Expected outcome</h3> <p dir="auto">Hopefully, Matplotlib should be able to be installed also in the lastest MacOS Ventura.</p> <h3 dir="auto">Additional information</h3> <p dir="auto">macOS Ventura 13.1 Apple M1 Pro Darwin 22.2.0 arm</p> <h3 dir="auto">Operating system</h3> <p dir="auto">OS/X</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/matplotlib/matplotlib/commit/2403d747aab07b8dd2b328850262a2a16fabab9f/hovercard" href="https://github.com/matplotlib/matplotlib/commit/2403d747aab07b8dd2b328850262a2a16fabab9f"><tt>2403d74</tt></a></p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Python version</h3> <p dir="auto">Python 3.9.12</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">git checkout</p>
<h3 dir="auto">Bug summary</h3> <p dir="auto">Following the <a href="https://matplotlib.org/devdocs/devel/development_setup.html#install-matplotlib-in-editable-mode" rel="nofollow">setup guide</a>, I cloned the repo, created a conda environment, and when I try to run <code class="notranslate">python -m pip install -ve . </code>, it throws a <code class="notranslate">subprocess-exited-with-error</code> exception.</p> <p dir="auto">I have all the <a href="https://matplotlib.org/devdocs/devel/dependencies.html#development-dependencies" rel="nofollow">development dependencies</a> installed, so I'm not sure what could be going wrong.</p> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="python -m pip install -ve ."><pre class="notranslate"><span class="pl-s1">python</span> <span class="pl-c1">-</span><span class="pl-s1">m</span> <span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-c1">-</span><span class="pl-s1">ve</span> .</pre></div> <h3 dir="auto">Actual outcome</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(mpl-dev) ~/code/py/matplotlib (main ✗) SETUPTOOLS_ENABLE_FEATURES=&quot;legacy-editable&quot; python -m pip install -ve . Using pip 22.2.2 from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/pip (python 3.10) Obtaining file:///Users/tnie/code/py/matplotlib Running command pip subprocess to install build dependencies Collecting certifi&gt;=2020.06.20 Using cached certifi-2022.9.24-py3-none-any.whl (161 kB) Collecting numpy&gt;=1.19 Using cached numpy-1.23.4-cp310-cp310-macosx_11_0_arm64.whl (13.3 MB) Collecting setuptools_scm&gt;=7 Using cached setuptools_scm-7.0.5-py3-none-any.whl (42 kB) Collecting tomli&gt;=1.0.0 Using cached tomli-2.0.1-py3-none-any.whl (12 kB) Collecting packaging&gt;=20.0 Using cached packaging-21.3-py3-none-any.whl (40 kB) Collecting setuptools Using cached setuptools-65.5.0-py3-none-any.whl (1.2 MB) Collecting typing-extensions Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB) Collecting pyparsing!=3.0.5,&gt;=2.0.2 Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB) Installing collected packages: typing-extensions, tomli, setuptools, pyparsing, numpy, certifi, packaging, setuptools_scm Successfully installed certifi-2022.9.24 numpy-1.23.4 packaging-21.3 pyparsing-3.0.9 setuptools-65.5.0 setuptools_scm-7.0.5 tomli-2.0.1 typing-extensions-4.4.0 Installing build dependencies ... done Running command Checking if build backend supports build_editable Checking if build backend supports build_editable ... done Running command Getting requirements to build wheel /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420). warnings.warn(msg, SetuptoolsDeprecationWarning) Edit mplsetup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB python: yes [3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:41:22) [Clang 13.0.1 ]] platform: yes [darwin] tests: no [skipping due to configuration] macosx: yes [installing] running egg_info writing lib/matplotlib.egg-info/PKG-INFO writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt writing requirements to lib/matplotlib.egg-info/requires.txt writing top-level names to lib/matplotlib.egg-info/top_level.txt adding license file 'LICENSE/LICENSE' adding license file 'LICENSE/LICENSE_AMSFONTS' adding license file 'LICENSE/LICENSE_BAKOMA' adding license file 'LICENSE/LICENSE_CARLOGO' adding license file 'LICENSE/LICENSE_COLORBREWER' adding license file 'LICENSE/LICENSE_COURIERTEN' adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER' adding license file 'LICENSE/LICENSE_QT4_EDITOR' adding license file 'LICENSE/LICENSE_SOLARIZED' adding license file 'LICENSE/LICENSE_STIX' adding license file 'LICENSE/LICENSE_YORICK' writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt' Getting requirements to build wheel ... done Running command pip subprocess to install backend dependencies Collecting wheel Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB) Installing collected packages: wheel Successfully installed wheel-0.37.1 Installing backend dependencies ... done Running command Preparing metadata (pyproject.toml) /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420). warnings.warn(msg, SetuptoolsDeprecationWarning) Edit mplsetup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB python: yes [3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:41:22) [Clang 13.0.1 ]] platform: yes [darwin] tests: no [skipping due to configuration] macosx: yes [installing] running dist_info creating /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info writing /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/PKG-INFO writing dependency_links to /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/dependency_links.txt writing namespace_packages to /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/namespace_packages.txt writing requirements to /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/requires.txt writing top-level names to /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/top_level.txt writing manifest file '/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/SOURCES.txt' adding license file 'LICENSE/LICENSE' adding license file 'LICENSE/LICENSE_AMSFONTS' adding license file 'LICENSE/LICENSE_BAKOMA' adding license file 'LICENSE/LICENSE_CARLOGO' adding license file 'LICENSE/LICENSE_COLORBREWER' adding license file 'LICENSE/LICENSE_COURIERTEN' adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER' adding license file 'LICENSE/LICENSE_QT4_EDITOR' adding license file 'LICENSE/LICENSE_SOLARIZED' adding license file 'LICENSE/LICENSE_STIX' adding license file 'LICENSE/LICENSE_YORICK' writing manifest file '/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/SOURCES.txt' creating '/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib-0.1.0.dev44573+g1f9dc78.d20221014.dist-info' adding license file &quot;LICENSE/LICENSE_CARLOGO&quot; (matched pattern &quot;LICENSE/*&quot;) adding license file &quot;LICENSE/LICENSE&quot; (matched pattern &quot;LICENSE/*&quot;) adding license file &quot;LICENSE/LICENSE_SOLARIZED&quot; (matched pattern &quot;LICENSE/*&quot;) adding license file &quot;LICENSE/LICENSE_AMSFONTS&quot; (matched pattern &quot;LICENSE/*&quot;) adding license file &quot;LICENSE/LICENSE_BAKOMA&quot; (matched pattern &quot;LICENSE/*&quot;) adding license file &quot;LICENSE/LICENSE_QT4_EDITOR&quot; (matched pattern &quot;LICENSE/*&quot;) adding license file &quot;LICENSE/LICENSE_STIX&quot; (matched pattern &quot;LICENSE/*&quot;) adding license file &quot;LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER&quot; (matched pattern &quot;LICENSE/*&quot;) adding license file &quot;LICENSE/LICENSE_YORICK&quot; (matched pattern &quot;LICENSE/*&quot;) adding license file &quot;LICENSE/LICENSE_COLORBREWER&quot; (matched pattern &quot;LICENSE/*&quot;) adding license file &quot;LICENSE/LICENSE_COURIERTEN&quot; (matched pattern &quot;LICENSE/*&quot;) Preparing metadata (pyproject.toml) ... done Requirement already satisfied: pillow&gt;=6.2.0 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (9.2.0) Requirement already satisfied: fonttools&gt;=4.22.0 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (4.37.4) Requirement already satisfied: setuptools-scm&gt;=7 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (7.0.5) Requirement already satisfied: cycler&gt;=0.10 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (0.11.0) Requirement already satisfied: python-dateutil&gt;=2.7 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (2.8.2) Requirement already satisfied: kiwisolver&gt;=1.0.1 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (1.4.4) Requirement already satisfied: contourpy&gt;=1.0.1 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (1.0.5) Requirement already satisfied: pyparsing&gt;=2.2.1 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (3.0.9) Requirement already satisfied: numpy&gt;=1.19 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (1.23.3) Requirement already satisfied: packaging&gt;=20.0 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (21.3) Requirement already satisfied: six&gt;=1.5 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from python-dateutil&gt;=2.7-&gt;matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (1.16.0) Requirement already satisfied: setuptools in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (65.5.0) Requirement already satisfied: tomli&gt;=1.0.0 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (2.0.1) Requirement already satisfied: typing-extensions in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (4.4.0) Installing collected packages: matplotlib Attempting uninstall: matplotlib Found existing installation: matplotlib 3.6.1 Uninstalling matplotlib-3.6.1: Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/__pycache__/pylab.cpython-310.pyc Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib-3.6.1-py3.10-nspkg.pth Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib-3.6.1.dist-info/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/axes_grid1/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/axisartist/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/mplot3d/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/tests/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/pylab.py Successfully uninstalled matplotlib-3.6.1 Running setup.py develop for matplotlib Running command python setup.py develop /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420). warnings.warn(msg, SetuptoolsDeprecationWarning) Edit mplsetup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB python: yes [3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:41:22) [Clang 13.0.1 ]] platform: yes [darwin] tests: no [skipping due to configuration] macosx: yes [installing] running develop /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running egg_info writing lib/matplotlib.egg-info/PKG-INFO writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt writing requirements to lib/matplotlib.egg-info/requires.txt writing top-level names to lib/matplotlib.egg-info/top_level.txt adding license file 'LICENSE/LICENSE' adding license file 'LICENSE/LICENSE_AMSFONTS' adding license file 'LICENSE/LICENSE_BAKOMA' adding license file 'LICENSE/LICENSE_CARLOGO' adding license file 'LICENSE/LICENSE_COLORBREWER' adding license file 'LICENSE/LICENSE_COURIERTEN' adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER' adding license file 'LICENSE/LICENSE_QT4_EDITOR' adding license file 'LICENSE/LICENSE_SOLARIZED' adding license file 'LICENSE/LICENSE_STIX' adding license file 'LICENSE/LICENSE_YORICK' writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt' running build_ext clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -I/opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include/python3.10 -c /var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmpw_eu7bd5.cpp -o var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmpw_eu7bd5.o -fvisibility=hidden clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -I/opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include/python3.10 -c /var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmpkkqo0md2.cpp -o var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmpkkqo0md2.o -fvisibility-inlines-hidden clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -I/opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include/python3.10 -c /var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmp2rkel642.cpp -o var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmp2rkel642.o -flto FreeType build system -- automatic system detection The following settings are used: platform unix compiler clang configuration directory ./builds/unix configuration rules ./builds/unix/unix.mk If this does not correspond to your system or settings please remove the file `config.mk' from this directory then read the INSTALL file for help. Otherwise, simply type `/Library/Developer/CommandLineTools/usr/bin/make' again to build the library, or `/Library/Developer/CommandLineTools/usr/bin/make refdoc' to build the API reference (this needs python &gt;= 2.6). cd builds/unix; \ ./configure '--with-zlib=no' '--with-bzip2=no' '--with-png=no' '--with-harfbuzz=no' '--enable-static' '--disable-shared' '--host=arm64-apple-darwin20.0.0' checking build system type... arm-apple-darwin21.5.0 checking host system type... Invalid configuration `arm64-apple-darwin20.0.0': machine `arm64-apple' not recognized configure: error: /bin/sh ./config.sub arm64-apple-darwin20.0.0 failed make: *** [setup] Error 1 Traceback (most recent call last): File &quot;&lt;string&gt;&quot;, line 2, in &lt;module&gt; File &quot;&lt;pip-setuptools-caller&gt;&quot;, line 34, in &lt;module&gt; File &quot;/Users/tnie/code/py/matplotlib/setup.py&quot;, line 270, in &lt;module&gt; setup( # Finally, pass this all along to setuptools to do the heavy lifting. File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/__init__.py&quot;, line 87, in setup return distutils.core.setup(**attrs) File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py&quot;, line 185, in setup return run_commands(dist) File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py&quot;, line 201, in run_commands dist.run_commands() File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py&quot;, line 968, in run_commands self.run_command(cmd) File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/dist.py&quot;, line 1217, in run_command super().run_command(command) File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py&quot;, line 987, in run_command cmd_obj.run() File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/command/develop.py&quot;, line 34, in run self.install_for_development() File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/command/develop.py&quot;, line 114, in install_for_development self.run_command('build_ext') File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py&quot;, line 319, in run_command self.distribution.run_command(command) File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/dist.py&quot;, line 1217, in run_command super().run_command(command) File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py&quot;, line 987, in run_command cmd_obj.run() File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py&quot;, line 84, in run _build_ext.run(self) File &quot;/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py&quot;, line 346, in run self.build_extensions() File &quot;/Users/tnie/code/py/matplotlib/setup.py&quot;, line 183, in build_extensions package.do_custom_build(env) File &quot;/Users/tnie/code/py/matplotlib/setupext.py&quot;, line 641, in do_custom_build subprocess.check_call(configure, env=env, cwd=src_path) File &quot;/opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/subprocess.py&quot;, line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['./configure', '--with-zlib=no', '--with-bzip2=no', '--with-png=no', '--with-harfbuzz=no', '--enable-static', '--disable-shared', '--host=arm64-apple-darwin20.0.0']' returned non-zero exit status 2. Building freetype in build/freetype-2.6.1 error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─&gt; See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/bin/python -c ' exec(compile('&quot;'&quot;''&quot;'&quot;''&quot;'&quot;' # This is &lt;pip-setuptools-caller&gt; -- a caller that pip uses to run setup.py # # - It imports setuptools before invoking setup.py, to enable projects that directly # import from `distutils.core` to work with newer packaging standards. # - It provides a clear error message when setuptools is not installed. # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so # setuptools doesn'&quot;'&quot;'t think the script is `-c`. This avoids the following warning: # manifest_maker: standard file '&quot;'&quot;'-c'&quot;'&quot;' not found&quot;. # - It generates a shim setup.py, for handling setup.cfg-only projects. import os, sys, tokenize try: import setuptools except ImportError as error: print( &quot;ERROR: Can not execute `setup.py` since setuptools is not available in &quot; &quot;the build environment.&quot;, file=sys.stderr, ) sys.exit(1) __file__ = %r sys.argv[0] = __file__ if os.path.exists(__file__): filename = __file__ with tokenize.open(__file__) as f: setup_py_code = f.read() else: filename = &quot;&lt;auto-generated setuptools caller&gt;&quot; setup_py_code = &quot;from setuptools import setup; setup()&quot; exec(compile(setup_py_code, filename, &quot;exec&quot;)) '&quot;'&quot;''&quot;'&quot;''&quot;'&quot;' % ('&quot;'&quot;'/Users/tnie/code/py/matplotlib/setup.py'&quot;'&quot;',), &quot;&lt;pip-setuptools-caller&gt;&quot;, &quot;exec&quot;))' develop --no-deps cwd: /Users/tnie/code/py/matplotlib/ Rolling back uninstall of matplotlib Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/__pycache__/pylab.cpython-310.pyc from /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-uninstall-4nkxktri/pylab.cpython-310.pyc Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib-3.6.1-py3.10-nspkg.pth from /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-uninstall-wsgach0q/matplotlib-3.6.1-py3.10-nspkg.pth Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib-3.6.1.dist-info/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/~atplotlib-3.6.1.dist-info Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/~atplotlib Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/axes_grid1/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/~xes_grid1 Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/axisartist/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/~xisartist Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/mplot3d/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/~plot3d Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/tests/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/~ests Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/pylab.py from /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-uninstall-wsgach0q/pylab.py error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─&gt; See above for output. note: This error originates from a subprocess, and is likely not a problem with pip."><pre class="notranslate"><code class="notranslate">(mpl-dev) ~/code/py/matplotlib (main ✗) SETUPTOOLS_ENABLE_FEATURES="legacy-editable" python -m pip install -ve . Using pip 22.2.2 from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/pip (python 3.10) Obtaining file:///Users/tnie/code/py/matplotlib Running command pip subprocess to install build dependencies Collecting certifi&gt;=2020.06.20 Using cached certifi-2022.9.24-py3-none-any.whl (161 kB) Collecting numpy&gt;=1.19 Using cached numpy-1.23.4-cp310-cp310-macosx_11_0_arm64.whl (13.3 MB) Collecting setuptools_scm&gt;=7 Using cached setuptools_scm-7.0.5-py3-none-any.whl (42 kB) Collecting tomli&gt;=1.0.0 Using cached tomli-2.0.1-py3-none-any.whl (12 kB) Collecting packaging&gt;=20.0 Using cached packaging-21.3-py3-none-any.whl (40 kB) Collecting setuptools Using cached setuptools-65.5.0-py3-none-any.whl (1.2 MB) Collecting typing-extensions Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB) Collecting pyparsing!=3.0.5,&gt;=2.0.2 Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB) Installing collected packages: typing-extensions, tomli, setuptools, pyparsing, numpy, certifi, packaging, setuptools_scm Successfully installed certifi-2022.9.24 numpy-1.23.4 packaging-21.3 pyparsing-3.0.9 setuptools-65.5.0 setuptools_scm-7.0.5 tomli-2.0.1 typing-extensions-4.4.0 Installing build dependencies ... done Running command Checking if build backend supports build_editable Checking if build backend supports build_editable ... done Running command Getting requirements to build wheel /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420). warnings.warn(msg, SetuptoolsDeprecationWarning) Edit mplsetup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB python: yes [3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:41:22) [Clang 13.0.1 ]] platform: yes [darwin] tests: no [skipping due to configuration] macosx: yes [installing] running egg_info writing lib/matplotlib.egg-info/PKG-INFO writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt writing requirements to lib/matplotlib.egg-info/requires.txt writing top-level names to lib/matplotlib.egg-info/top_level.txt adding license file 'LICENSE/LICENSE' adding license file 'LICENSE/LICENSE_AMSFONTS' adding license file 'LICENSE/LICENSE_BAKOMA' adding license file 'LICENSE/LICENSE_CARLOGO' adding license file 'LICENSE/LICENSE_COLORBREWER' adding license file 'LICENSE/LICENSE_COURIERTEN' adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER' adding license file 'LICENSE/LICENSE_QT4_EDITOR' adding license file 'LICENSE/LICENSE_SOLARIZED' adding license file 'LICENSE/LICENSE_STIX' adding license file 'LICENSE/LICENSE_YORICK' writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt' Getting requirements to build wheel ... done Running command pip subprocess to install backend dependencies Collecting wheel Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB) Installing collected packages: wheel Successfully installed wheel-0.37.1 Installing backend dependencies ... done Running command Preparing metadata (pyproject.toml) /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420). warnings.warn(msg, SetuptoolsDeprecationWarning) Edit mplsetup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB python: yes [3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:41:22) [Clang 13.0.1 ]] platform: yes [darwin] tests: no [skipping due to configuration] macosx: yes [installing] running dist_info creating /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info writing /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/PKG-INFO writing dependency_links to /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/dependency_links.txt writing namespace_packages to /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/namespace_packages.txt writing requirements to /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/requires.txt writing top-level names to /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/top_level.txt writing manifest file '/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/SOURCES.txt' adding license file 'LICENSE/LICENSE' adding license file 'LICENSE/LICENSE_AMSFONTS' adding license file 'LICENSE/LICENSE_BAKOMA' adding license file 'LICENSE/LICENSE_CARLOGO' adding license file 'LICENSE/LICENSE_COLORBREWER' adding license file 'LICENSE/LICENSE_COURIERTEN' adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER' adding license file 'LICENSE/LICENSE_QT4_EDITOR' adding license file 'LICENSE/LICENSE_SOLARIZED' adding license file 'LICENSE/LICENSE_STIX' adding license file 'LICENSE/LICENSE_YORICK' writing manifest file '/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib.egg-info/SOURCES.txt' creating '/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-modern-metadata-fj_hu2nd/matplotlib-0.1.0.dev44573+g1f9dc78.d20221014.dist-info' adding license file "LICENSE/LICENSE_CARLOGO" (matched pattern "LICENSE/*") adding license file "LICENSE/LICENSE" (matched pattern "LICENSE/*") adding license file "LICENSE/LICENSE_SOLARIZED" (matched pattern "LICENSE/*") adding license file "LICENSE/LICENSE_AMSFONTS" (matched pattern "LICENSE/*") adding license file "LICENSE/LICENSE_BAKOMA" (matched pattern "LICENSE/*") adding license file "LICENSE/LICENSE_QT4_EDITOR" (matched pattern "LICENSE/*") adding license file "LICENSE/LICENSE_STIX" (matched pattern "LICENSE/*") adding license file "LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER" (matched pattern "LICENSE/*") adding license file "LICENSE/LICENSE_YORICK" (matched pattern "LICENSE/*") adding license file "LICENSE/LICENSE_COLORBREWER" (matched pattern "LICENSE/*") adding license file "LICENSE/LICENSE_COURIERTEN" (matched pattern "LICENSE/*") Preparing metadata (pyproject.toml) ... done Requirement already satisfied: pillow&gt;=6.2.0 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (9.2.0) Requirement already satisfied: fonttools&gt;=4.22.0 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (4.37.4) Requirement already satisfied: setuptools-scm&gt;=7 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (7.0.5) Requirement already satisfied: cycler&gt;=0.10 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (0.11.0) Requirement already satisfied: python-dateutil&gt;=2.7 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (2.8.2) Requirement already satisfied: kiwisolver&gt;=1.0.1 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (1.4.4) Requirement already satisfied: contourpy&gt;=1.0.1 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (1.0.5) Requirement already satisfied: pyparsing&gt;=2.2.1 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (3.0.9) Requirement already satisfied: numpy&gt;=1.19 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (1.23.3) Requirement already satisfied: packaging&gt;=20.0 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (21.3) Requirement already satisfied: six&gt;=1.5 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from python-dateutil&gt;=2.7-&gt;matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (1.16.0) Requirement already satisfied: setuptools in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (65.5.0) Requirement already satisfied: tomli&gt;=1.0.0 in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (2.0.1) Requirement already satisfied: typing-extensions in /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages (from setuptools-scm&gt;=7-&gt;matplotlib==0.1.0.dev44573+g1f9dc78.d20221014) (4.4.0) Installing collected packages: matplotlib Attempting uninstall: matplotlib Found existing installation: matplotlib 3.6.1 Uninstalling matplotlib-3.6.1: Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/__pycache__/pylab.cpython-310.pyc Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib-3.6.1-py3.10-nspkg.pth Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib-3.6.1.dist-info/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/axes_grid1/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/axisartist/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/mplot3d/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/tests/ Removing file or directory /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/pylab.py Successfully uninstalled matplotlib-3.6.1 Running setup.py develop for matplotlib Running command python setup.py develop /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420). warnings.warn(msg, SetuptoolsDeprecationWarning) Edit mplsetup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB python: yes [3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:41:22) [Clang 13.0.1 ]] platform: yes [darwin] tests: no [skipping due to configuration] macosx: yes [installing] running develop /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running egg_info writing lib/matplotlib.egg-info/PKG-INFO writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt writing requirements to lib/matplotlib.egg-info/requires.txt writing top-level names to lib/matplotlib.egg-info/top_level.txt adding license file 'LICENSE/LICENSE' adding license file 'LICENSE/LICENSE_AMSFONTS' adding license file 'LICENSE/LICENSE_BAKOMA' adding license file 'LICENSE/LICENSE_CARLOGO' adding license file 'LICENSE/LICENSE_COLORBREWER' adding license file 'LICENSE/LICENSE_COURIERTEN' adding license file 'LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER' adding license file 'LICENSE/LICENSE_QT4_EDITOR' adding license file 'LICENSE/LICENSE_SOLARIZED' adding license file 'LICENSE/LICENSE_STIX' adding license file 'LICENSE/LICENSE_YORICK' writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt' running build_ext clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -I/opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include/python3.10 -c /var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmpw_eu7bd5.cpp -o var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmpw_eu7bd5.o -fvisibility=hidden clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -I/opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include/python3.10 -c /var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmpkkqo0md2.cpp -o var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmpkkqo0md2.o -fvisibility-inlines-hidden clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include -arch arm64 -I/opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/include/python3.10 -c /var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmp2rkel642.cpp -o var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/tmp2rkel642.o -flto FreeType build system -- automatic system detection The following settings are used: platform unix compiler clang configuration directory ./builds/unix configuration rules ./builds/unix/unix.mk If this does not correspond to your system or settings please remove the file `config.mk' from this directory then read the INSTALL file for help. Otherwise, simply type `/Library/Developer/CommandLineTools/usr/bin/make' again to build the library, or `/Library/Developer/CommandLineTools/usr/bin/make refdoc' to build the API reference (this needs python &gt;= 2.6). cd builds/unix; \ ./configure '--with-zlib=no' '--with-bzip2=no' '--with-png=no' '--with-harfbuzz=no' '--enable-static' '--disable-shared' '--host=arm64-apple-darwin20.0.0' checking build system type... arm-apple-darwin21.5.0 checking host system type... Invalid configuration `arm64-apple-darwin20.0.0': machine `arm64-apple' not recognized configure: error: /bin/sh ./config.sub arm64-apple-darwin20.0.0 failed make: *** [setup] Error 1 Traceback (most recent call last): File "&lt;string&gt;", line 2, in &lt;module&gt; File "&lt;pip-setuptools-caller&gt;", line 34, in &lt;module&gt; File "/Users/tnie/code/py/matplotlib/setup.py", line 270, in &lt;module&gt; setup( # Finally, pass this all along to setuptools to do the heavy lifting. File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup return distutils.core.setup(**attrs) File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands self.run_command(cmd) File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/command/develop.py", line 34, in run self.install_for_development() File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/command/develop.py", line 114, in install_for_development self.run_command('build_ext') File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command self.distribution.run_command(command) File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-build-env-yure_ojr/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run self.build_extensions() File "/Users/tnie/code/py/matplotlib/setup.py", line 183, in build_extensions package.do_custom_build(env) File "/Users/tnie/code/py/matplotlib/setupext.py", line 641, in do_custom_build subprocess.check_call(configure, env=env, cwd=src_path) File "/opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['./configure', '--with-zlib=no', '--with-bzip2=no', '--with-png=no', '--with-harfbuzz=no', '--enable-static', '--disable-shared', '--host=arm64-apple-darwin20.0.0']' returned non-zero exit status 2. Building freetype in build/freetype-2.6.1 error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─&gt; See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/bin/python -c ' exec(compile('"'"''"'"''"'"' # This is &lt;pip-setuptools-caller&gt; -- a caller that pip uses to run setup.py # # - It imports setuptools before invoking setup.py, to enable projects that directly # import from `distutils.core` to work with newer packaging standards. # - It provides a clear error message when setuptools is not installed. # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so # setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning: # manifest_maker: standard file '"'"'-c'"'"' not found". # - It generates a shim setup.py, for handling setup.cfg-only projects. import os, sys, tokenize try: import setuptools except ImportError as error: print( "ERROR: Can not execute `setup.py` since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1) __file__ = %r sys.argv[0] = __file__ if os.path.exists(__file__): filename = __file__ with tokenize.open(__file__) as f: setup_py_code = f.read() else: filename = "&lt;auto-generated setuptools caller&gt;" setup_py_code = "from setuptools import setup; setup()" exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'/Users/tnie/code/py/matplotlib/setup.py'"'"',), "&lt;pip-setuptools-caller&gt;", "exec"))' develop --no-deps cwd: /Users/tnie/code/py/matplotlib/ Rolling back uninstall of matplotlib Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/__pycache__/pylab.cpython-310.pyc from /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-uninstall-4nkxktri/pylab.cpython-310.pyc Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib-3.6.1-py3.10-nspkg.pth from /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-uninstall-wsgach0q/matplotlib-3.6.1-py3.10-nspkg.pth Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib-3.6.1.dist-info/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/~atplotlib-3.6.1.dist-info Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/matplotlib/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/~atplotlib Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/axes_grid1/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/~xes_grid1 Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/axisartist/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/~xisartist Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/mplot3d/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/~plot3d Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/tests/ from /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/mpl_toolkits/~ests Moving to /opt/homebrew/Caskroom/miniforge/base/envs/mpl-dev/lib/python3.10/site-packages/pylab.py from /private/var/folders/xy/7rx63bwx6c9_0n5d50q5j5xh0000gn/T/pip-uninstall-wsgach0q/pylab.py error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─&gt; See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. </code></pre></div> <h3 dir="auto">Expected outcome</h3> <p dir="auto">Matplotlib should build successfully.</p> <h3 dir="auto">Additional information</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Operating system</h3> <p dir="auto">macOS 12.4</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">trunk</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Python version</h3> <p dir="auto">Python 3.10.6</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto"><em>No response</em></p>
1
<p dir="auto">The common testing framework still needs some work that I think is quite important to ensure consistency and stability.<br> This issue is my wishlist, if any one wants to give it a shot (and so that I don't forget).</p> <ul dir="auto"> <li>test how classifiers handle only one class being present</li> <li>check clustering and transformer objects</li> <li>check how non-numeric-contiguous labels are handled in classifiers</li> <li>test for consistent output shapes in regressors / classifiers / transformers</li> <li>test how methods handle non-float input (does uint8 give overflow errors?)</li> </ul>
<p dir="auto"><strong>Easy:</strong></p> <ul dir="auto"> <li>in test_common, check that the ValueError raise has a useful error message. (see sparse test for an example)</li> <li>put as many of the "specific" tests in test_clustering, test_transformers, ... into test_non_meta_estimators.</li> </ul> <p dir="auto"><strong>Not so easy:</strong></p> <ul dir="auto"> <li>calling <code class="notranslate">fit</code> forgets the previous model if any</li> <li><del>check how classifiers handle only one class being present</del></li> <li><del>test how models handle non-float input (does uint8 cause overflows?)</del></li> </ul> <p dir="auto"><strong>Things done</strong></p> <p dir="auto">We should factorize common tests in a new file <code class="notranslate">test_common.py</code> (or maybe <code class="notranslate">test_input.py</code>?). Things to check:</p> <ul dir="auto"> <li><del>can pickle the object</del></li> <li><del>raise an exception when data contains nans</del></li> <li><del>raise an exception for invalid input (e.g., <code class="notranslate">np.matrix</code> or <code class="notranslate">sp.csr_matrix</code> if dense only implementation)</del></li> <li><del>raise an exception if <code class="notranslate">n_features</code> is not the same in <code class="notranslate">fit</code> and <code class="notranslate">predict</code> or <code class="notranslate">transform</code></del></li> <li><del><code class="notranslate">__repr__</code> and <code class="notranslate">clone</code> work</del></li> <li><del>check that we can pickle and unpickle estimators.</del></li> <li><del>check that all classifiers have a <code class="notranslate">classes_</code> attribute (needs some fixes)</del></li> </ul> <hr> <p dir="auto">Edit by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/amueller/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/amueller">@amueller</a>!</p> <p dir="auto">Edit by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/GaelVaroquaux/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/GaelVaroquaux">@GaelVaroquaux</a> on Aug 13th 2014 to reflect progress in the codebase.</p>
1
<p dir="auto">The form validators are nicely integrated with the translator. The only thing you have to do is set your language and the messages are automatically translated.</p> <p dir="auto">With the authentication system, this is not the case. A possible, simple, solution would be to add authMsg.xx.xliff files to Symfony/Bundle/FrameworkBundle/Resources/translations/ that contain translations for AuthenticationExceptions. Then you could translate the error like this:<br> <code class="notranslate"><br> {% if error %}<br> </code></p><div dir="auto"><code class="notranslate">{{ error.message|trans({}, 'authMsg') }}</code></div><code class="notranslate"><br> {% endif %}<br> </code><p dir="auto"></p> <p dir="auto">This is how you should display the error according to the handbook <a href="http://symfony.com/doc/current/book/security.html" rel="nofollow">http://symfony.com/doc/current/book/security.html</a></p> <p dir="auto">Here is an example authMsg.nl.xliff http://.../authMsg.nl.xliff</p>
<p dir="auto">There are two enhancements which could be made to the <code class="notranslate">AuthenticationException</code>:</p> <ol dir="auto"> <li>add a getMessageKey(), getMessageData() which could be used by the translation component as the exception message itself cannot be safely displayed to the user</li> <li>change the signature of the constructor to match that of \Exception and pass $extraInformation via a setter</li> </ol> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lsmith77/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lsmith77">@lsmith77</a>, do you still plan to work on this?</p>
1
<p dir="auto">[Enter steps to reproduce below:]</p> <ol dir="auto"> <li>Changed to a different branch in git repo</li> </ol> <p dir="auto"><strong>Atom Version</strong>: 0.165.0<br> <strong>System</strong>: Mac OS X 10.10.1<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught Error: ENOENT, open '/Users/jocampbell/Documents/github/sre_dev/repos/snapshotter/spec/lib/hip_chat_helper_spec.rb'</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At /Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/node_modules/q/q.js:126 Error: ENOENT, open '/Users/jocampbell/Documents/github/sre_dev/repos/snapshotter/spec/lib/hip_chat_helper_spec.rb' at Error (native) "><pre class="notranslate"><code class="notranslate">At /Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/node_modules/q/q.js:126 Error: ENOENT, open '/Users/jocampbell/Documents/github/sre_dev/repos/snapshotter/spec/lib/hip_chat_helper_spec.rb' at Error (native) </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <h3 dir="auto">Config</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: { &quot;themes&quot;: [ &quot;atom-light-ui&quot;, &quot;solarized-light-syntax&quot; ], &quot;audioBeep&quot;: false }, &quot;editor&quot;: { &quot;showIndentGuide&quot;: true, &quot;fontSize&quot;: 18 } }"><pre class="notranslate"><code class="notranslate">{ "core": { "themes": [ "atom-light-ui", "solarized-light-syntax" ], "audioBeep": false }, "editor": { "showIndentGuide": true, "fontSize": 18 } } </code></pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User atom-lint, v0.20.0 autocomplete-plus, v0.21.0 preview-tabs, v0.1.6 # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> atom<span class="pl-k">-</span>lint, v0.<span class="pl-ii">20</span>.<span class="pl-ii">0</span> autocomplete<span class="pl-k">-</span>plus, v0.<span class="pl-ii">21</span>.<span class="pl-ii">0</span> preview<span class="pl-k">-</span>tabs, v0.<span class="pl-ii">1</span>.<span class="pl-ii">6</span> <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
<ol dir="auto"> <li>switch the node_modules package from a version to a git repository</li> <li>npm install</li> </ol> <p dir="auto"><strong>Atom Version</strong>: 0.165.0<br> <strong>System</strong>: Mac OS X 10.10.1<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught Error: ENOENT, open '/Users/joscha/Development/mailbutler/node_modules/grunt-crx/tasks/crx.js'</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At /Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/node_modules/q/q.js:126 Error: ENOENT, open '/Users/joscha/Development/mailbutler/node_modules/grunt-crx/tasks/crx.js' at Error (native) "><pre class="notranslate"><code class="notranslate">At /Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/node_modules/q/q.js:126 Error: ENOENT, open '/Users/joscha/Development/mailbutler/node_modules/grunt-crx/tasks/crx.js' at Error (native) </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -0:28.1 find-and-replace:show (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel) -0:26.0 core:confirm (input.hidden-input) 7x -0:19.3 core:move-left (input.hidden-input) -0:14.9 core:backspace (input.hidden-input) -0:14.2 core:move-left (input.hidden-input) 2x -0:13.7 core:move-right (input.hidden-input) -0:13.1 core:move-left (input.hidden-input) -0:12.8 core:backspace (input.hidden-input) 7x -0:12.5 core:move-right (input.hidden-input) -0:11.3 core:backspace (input.hidden-input) 2x -0:10.9 core:move-right (input.hidden-input) -0:09.7 core:backspace (input.hidden-input) 5x -0:09.3 core:move-left (input.hidden-input) -0:02.6 core:copy (input.hidden-input) -0:00.7 core:paste (input.hidden-input) -0:00.0 core:save (input.hidden-input)"><pre class="notranslate"><code class="notranslate"> -0:28.1 find-and-replace:show (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel) -0:26.0 core:confirm (input.hidden-input) 7x -0:19.3 core:move-left (input.hidden-input) -0:14.9 core:backspace (input.hidden-input) -0:14.2 core:move-left (input.hidden-input) 2x -0:13.7 core:move-right (input.hidden-input) -0:13.1 core:move-left (input.hidden-input) -0:12.8 core:backspace (input.hidden-input) 7x -0:12.5 core:move-right (input.hidden-input) -0:11.3 core:backspace (input.hidden-input) 2x -0:10.9 core:move-right (input.hidden-input) -0:09.7 core:backspace (input.hidden-input) 5x -0:09.3 core:move-left (input.hidden-input) -0:02.6 core:copy (input.hidden-input) -0:00.7 core:paste (input.hidden-input) -0:00.0 core:save (input.hidden-input) </code></pre></div> <h3 dir="auto">Config</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: { &quot;ignoredNames&quot;: [ &quot;.git&quot;, &quot;.svn&quot;, &quot;.DS_Store&quot; ] }, &quot;editor&quot;: { &quot;showInvisibles&quot;: true, &quot;autoIndentOnPaste&quot;: false } }"><pre class="notranslate"><code class="notranslate">{ "core": { "ignoredNames": [ ".git", ".svn", ".DS_Store" ] }, "editor": { "showInvisibles": true, "autoIndentOnPaste": false } } </code></pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User atom-jasmine, v0.4.0 editorconfig, v0.2.2 jsformat, v0.7.18 language-scala, v1.1.0 linter, v0.9.0 linter-coffeelint, v0.1.7 linter-jshint, v0.1.0 linter-php, v0.0.11 travis-ci-status, v0.11.1 visual-bell, v0.9.0 # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> atom<span class="pl-k">-</span>jasmine, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span> editorconfig, v0.<span class="pl-ii">2</span>.<span class="pl-ii">2</span> jsformat, v0.<span class="pl-ii">7</span>.<span class="pl-ii">18</span> language<span class="pl-k">-</span>scala, v1.<span class="pl-ii">1</span>.<span class="pl-ii">0</span> linter, v0.<span class="pl-ii">9</span>.<span class="pl-ii">0</span> linter<span class="pl-k">-</span>coffeelint, v0.<span class="pl-ii">1</span>.<span class="pl-ii">7</span> linter<span class="pl-k">-</span>jshint, v0.<span class="pl-ii">1</span>.<span class="pl-ii">0</span> linter<span class="pl-k">-</span>php, v0.<span class="pl-ii">0</span>.<span class="pl-ii">11</span> travis<span class="pl-k">-</span>ci<span class="pl-k">-</span>status, v0.<span class="pl-ii">11</span>.<span class="pl-ii">1</span> visual<span class="pl-k">-</span>bell, v0.<span class="pl-ii">9</span>.<span class="pl-ii">0</span> <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
1
<p dir="auto">If the templates are authored in <code class="notranslate">en</code> then you will no translate the app for the <code class="notranslate">en</code> locale.</p> <p dir="auto">However when the app is not translated, the i18n specific markup (<code class="notranslate">i18n</code> attributes, ... ) is not removed.</p> <p dir="auto">The markup should always be removed even when the application is not translated.</p>
<p dir="auto"><strong>I'm submitting a feature request</strong></p> <p dir="auto">Currently when I build an Angular application with internationalization, I add <code class="notranslate">i18n</code> attributes to many of my tags. After compilation, it would be nice for these tags to be removed and not included in the rendered site.</p>
1
<p dir="auto">Trying to compile the following code results in rustc stack overflowing</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#[no_std]; #[lang=&quot;start&quot;] fn main() {}"><pre class="notranslate"><span class="pl-c1">#<span class="pl-kos">[</span>no_std<span class="pl-kos">]</span></span><span class="pl-kos">;</span> <span class="pl-c1">#<span class="pl-kos">[</span>lang=<span class="pl-s">"start"</span><span class="pl-kos">]</span></span> <span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <p dir="auto">Tested using Rust 0.9. Other people on IRC reported they receive the same issue with master.</p>
<p dir="auto">These aren't currently well-defined by the language. If you define anything with a somewhat matching LLVM signature, it will compile. Not only does it not care about the type signatures matching what it expects, there is no handling for these being defined on the wrong types of AST nodes.</p>
1
<h4 dir="auto">Challenge Name</h4> <p dir="auto"><a href="http://beta.freecodecamp.com/en/challenges/basic-css/change-the-color-of-text" rel="nofollow">http://beta.freecodecamp.com/en/challenges/basic-css/change-the-color-of-text</a></p> <h4 dir="auto">Issue Description</h4> <p dir="auto">When using inline style to change the h2 element to the color red, my output says "try again" and that I need to change the h2 color to red. I have tried both inline style and using style tags.</p> <p dir="auto">UPDATE: this also occurred a few challenges later, when directed to change h2 elements to 'blue' using CSS. Could possibly be an issue with the rest of the 'Basic CSS' section.</p> <h4 dir="auto">Browser Information</h4> <ul dir="auto"> <li>Browser Name, Version: Firefox version 51.0</li> <li>Operating System: Windows 10</li> <li>Mobile, Desktop, or Tablet: Desktop</li> </ul> <h4 dir="auto">Your Code</h4> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;style&gt; h2 { color: red; } &lt;/style&gt; &lt;h2&gt;CatPhotoApp&lt;/h2&gt; &lt;main&gt; &lt;p&gt;Click here to view more &lt;a href=&quot;#&quot;&gt;cat photos&lt;/a&gt;.&lt;/p&gt; &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;https://bit.ly/fcc-relaxing-cat&quot; alt=&quot;A cute orange cat lying on its back.&quot;&gt;&lt;/a&gt; &lt;div&gt; &lt;p&gt;Things cats love:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;cat nip&lt;/li&gt; &lt;li&gt;laser pointers&lt;/li&gt; &lt;li&gt;lasagna&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Top 3 things cats hate:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;flea treatment&lt;/li&gt; &lt;li&gt;thunder&lt;/li&gt; &lt;li&gt;other cats&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;form action=&quot;/submit-cat-photo&quot;&gt; &lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;indoor-outdoor&quot; checked&gt; Indoor&lt;/label&gt; &lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;indoor-outdoor&quot;&gt; Outdoor&lt;/label&gt;&lt;br&gt; &lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;personality&quot; checked&gt; Loving&lt;/label&gt; &lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;personality&quot;&gt; Lazy&lt;/label&gt; &lt;label&gt;&lt;input type=&quot;checkbox&quot; name=&quot;personality&quot;&gt; Energetic&lt;/label&gt;&lt;br&gt; &lt;input type=&quot;text&quot; placeholder=&quot;cat photo URL&quot; required&gt; &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt; &lt;/form&gt; &lt;/main&gt; "><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span> <span class="pl-ent">h2</span> { <span class="pl-c1">color</span><span class="pl-kos">:</span> red; } <span class="pl-kos">&lt;/</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h2</span><span class="pl-kos">&gt;</span>CatPhotoApp<span class="pl-kos">&lt;/</span><span class="pl-ent">h2</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">main</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span>Click here to view more <span class="pl-kos">&lt;</span><span class="pl-ent">a</span> <span class="pl-c1">href</span>="<span class="pl-s">#</span>"<span class="pl-kos">&gt;</span>cat photos<span class="pl-kos">&lt;/</span><span class="pl-ent">a</span><span class="pl-kos">&gt;</span>.<span class="pl-kos">&lt;/</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">a</span> <span class="pl-c1">href</span>="<span class="pl-s">#</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">img</span> <span class="pl-c1">src</span>="<span class="pl-s">https://bit.ly/fcc-relaxing-cat</span>" <span class="pl-c1">alt</span>="<span class="pl-s">A cute orange cat lying on its back.</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">a</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span>Things cats love:<span class="pl-kos">&lt;/</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">ul</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>cat nip<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>laser pointers<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>lasagna<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">ul</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span>Top 3 things cats hate:<span class="pl-kos">&lt;/</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">ol</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>flea treatment<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>thunder<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>other cats<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">ol</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">form</span> <span class="pl-c1">action</span>="<span class="pl-s">/submit-cat-photo</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">radio</span>" <span class="pl-c1">name</span>="<span class="pl-s">indoor-outdoor</span>" <span class="pl-c1">checked</span><span class="pl-kos">&gt;</span> Indoor<span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">radio</span>" <span class="pl-c1">name</span>="<span class="pl-s">indoor-outdoor</span>"<span class="pl-kos">&gt;</span> Outdoor<span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">br</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">checkbox</span>" <span class="pl-c1">name</span>="<span class="pl-s">personality</span>" <span class="pl-c1">checked</span><span class="pl-kos">&gt;</span> Loving<span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">checkbox</span>" <span class="pl-c1">name</span>="<span class="pl-s">personality</span>"<span class="pl-kos">&gt;</span> Lazy<span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">checkbox</span>" <span class="pl-c1">name</span>="<span class="pl-s">personality</span>"<span class="pl-kos">&gt;</span> Energetic<span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-ent">br</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">text</span>" <span class="pl-c1">placeholder</span>="<span class="pl-s">cat photo URL</span>" <span class="pl-c1">required</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">type</span>="<span class="pl-s">submit</span>"<span class="pl-kos">&gt;</span>Submit<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">form</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">main</span><span class="pl-kos">&gt;</span> </pre></div> <h4 dir="auto">Screenshot</h4> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/25524493/22936167/aabd6c94-f2a2-11e6-914f-7df9d4f03a5a.png"><img src="https://cloud.githubusercontent.com/assets/25524493/22936167/aabd6c94-f2a2-11e6-914f-7df9d4f03a5a.png" alt="screenshot 30" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/25524493/22936183/b2ba2450-f2a2-11e6-9a5b-5d60214ffe23.png"><img src="https://cloud.githubusercontent.com/assets/25524493/22936183/b2ba2450-f2a2-11e6-9a5b-5d60214ffe23.png" alt="screenshot 31" style="max-width: 100%;"></a></p>
<h4 dir="auto">Issue Description</h4> <p dir="auto">This is for the feature/curriculum-expansion branch only when run locally, and NOT the staging branch.</p> <p dir="auto">For several challenges (challengeType: 0, using the code editor with the mobile-phone output layout), the jQuery method .css() doesn't seem to be accessing the styles applied in a <code class="notranslate">style</code> tag in the given code. This is affecting any assert tests that use a pattern of <code class="notranslate">assert($('selector').css('propertyToCheck') == 'valueToCompare', 'message: ...');</code>.Here's an example:</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;style&gt; h2 { position: relative; top: 15px; } &lt;/style&gt; &lt;body&gt; &lt;h1&gt;On Being Well-Positioned&lt;/h1&gt; &lt;h2 class=&quot;testCode&quot;&gt;Move me!&lt;/h2&gt; &lt;p&gt;I still think the h2 is where it normally sits.&lt;/p&gt; &lt;/body&gt; &lt;script&gt; console.log($('h2').attr('class')); // Works great, returns testCode console.log($('h2').css('position')); // returns undefined console.log($('h2').css('top')); // returns undefined &lt;/script&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span> <span class="pl-ent">h2</span> { <span class="pl-c1">position</span><span class="pl-kos">:</span> relative; <span class="pl-c1">top</span><span class="pl-kos">:</span> <span class="pl-c1">15<span class="pl-smi">px</span></span>; } <span class="pl-kos">&lt;/</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h1</span><span class="pl-kos">&gt;</span>On Being Well-Positioned<span class="pl-kos">&lt;/</span><span class="pl-ent">h1</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h2</span> <span class="pl-c1">class</span>="<span class="pl-s">testCode</span>"<span class="pl-kos">&gt;</span>Move me!<span class="pl-kos">&lt;/</span><span class="pl-ent">h2</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span>I still think the h2 is where it normally sits.<span class="pl-kos">&lt;/</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">'h2'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">attr</span><span class="pl-kos">(</span><span class="pl-s">'class'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Works great, returns testCode</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">'h2'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">'position'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// returns undefined</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">'h2'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">'top'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// returns undefined</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span></pre></div> <p dir="auto">Related assert tests that aren't passing:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="assert($('h2').css('position') == 'relative', 'message: Add a CSS rule to specify that the &lt;code&gt;h2&lt;/code&gt; has a &lt;code&gt;position&lt;/code&gt; set to &lt;code&gt;relative&lt;/code&gt;.'); assert($('h2').css('top') == '15px', 'message: Use a CSS offset to relatively position the &lt;code&gt;h2&lt;/code&gt; 15px away from the &lt;code&gt;top&lt;/code&gt; of where it normally sits.');"><pre class="notranslate"><span class="pl-en">assert</span><span class="pl-kos">(</span><span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">'h2'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">'position'</span><span class="pl-kos">)</span> <span class="pl-c1">==</span> <span class="pl-s">'relative'</span><span class="pl-kos">,</span> <span class="pl-s">'message: Add a CSS rule to specify that the &lt;code&gt;h2&lt;/code&gt; has a &lt;code&gt;position&lt;/code&gt; set to &lt;code&gt;relative&lt;/code&gt;.'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">assert</span><span class="pl-kos">(</span><span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">'h2'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">'top'</span><span class="pl-kos">)</span> <span class="pl-c1">==</span> <span class="pl-s">'15px'</span><span class="pl-kos">,</span> <span class="pl-s">'message: Use a CSS offset to relatively position the &lt;code&gt;h2&lt;/code&gt; 15px away from the &lt;code&gt;top&lt;/code&gt; of where it normally sits.'</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <h4 dir="auto">Browser Information</h4> <ul dir="auto"> <li>Browser Name, Version: Firefox 48.0.1</li> <li>Operating System: Mac OS X, El Capitan v10.11.3</li> <li>Mobile, Desktop, or Tablet:</li> </ul>
1
<p dir="auto">it could be so cool to open a folder on a network by providing an address like <code class="notranslate">user@ip:address</code></p> <p dir="auto">is there such functionality already or are ou planning to add ?</p>
<p dir="auto">It could be great to put background color on each extension card to be consistent with the gallery banner.</p> <p dir="auto">You can have an example here (<a href="https://marketplace.visualstudio.com/vscode/Other" rel="nofollow">https://marketplace.visualstudio.com/vscode/Other</a>) where my extension <code class="notranslate">pomodoro-code</code> does not look as expected (white image on white background).</p>
0
<p dir="auto">I might have found an issue with the junit reporting that especially appears when the report gets imported to xray.<br> I actually create a screenshot manually with a filename and type and also via the automatic mode for the after hook.</p> <p dir="auto">the result ist that actually one file gets imported as screenshots.png(the manual one) that can be opened within jira since at treats as an png file.</p> <p dir="auto">The screenshots that get created automaticly via the pw config just gets imported as screenshot without the file ending and can not be opened then. Also if I download them and set the file type i can not open them.</p> <h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v1.32.2]</li> <li>Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]</li> <li>Browser: [All, Chromium, Firefox, WebKit]</li> <li>Other info:</li> </ul> <h3 dir="auto">Source code</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I provided exact source code that allows reproducing the issue locally.</li> </ul> <p dir="auto"><strong>Config file</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts // JUnit reporter config for Xray const xrayOptions = { // Whether to add &lt;properties&gt; with all annotations; default is false embedAnnotationsAsProperties: true, // By default, annotation is reported as &lt;property name='' value=''&gt;. // These annotations are reported as &lt;property name=''&gt;value&lt;/property&gt;. textContentAnnotations: ['test_description'], // This will create a &quot;testrun_evidence&quot; property that contains all attachments. Each attachment is added as an inner &lt;item&gt; element. // Disables [[ATTACHMENT|path]] in the &lt;system-out&gt;. embedAttachmentsAsProperty: 'testrun_evidence', // Where to put the report. outputFile: './xray-report.xml', }; use: { screenshot: {mode: 'only-on-failure', fullPage: true}, }"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span> <span class="pl-c">// JUnit reporter config for Xray</span> <span class="pl-k">const</span> <span class="pl-s1">xrayOptions</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c">// Whether to add &lt;properties&gt; with all annotations; default is false</span> <span class="pl-c1">embedAnnotationsAsProperties</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c">// By default, annotation is reported as &lt;property name='' value=''&gt;.</span> <span class="pl-c">// These annotations are reported as &lt;property name=''&gt;value&lt;/property&gt;.</span> <span class="pl-c1">textContentAnnotations</span>: <span class="pl-kos">[</span><span class="pl-s">'test_description'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c">// This will create a "testrun_evidence" property that contains all attachments. Each attachment is added as an inner &lt;item&gt; element.</span> <span class="pl-c">// Disables [[ATTACHMENT|path]] in the &lt;system-out&gt;.</span> <span class="pl-c1">embedAttachmentsAsProperty</span>: <span class="pl-s">'testrun_evidence'</span><span class="pl-kos">,</span> <span class="pl-c">// Where to put the report.</span> <span class="pl-c1">outputFile</span>: <span class="pl-s">'./xray-report.xml'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> use: <span class="pl-kos">{</span> <span class="pl-c1">screenshot</span>: <span class="pl-kos">{</span><span class="pl-c1">mode</span>: <span class="pl-s">'only-on-failure'</span><span class="pl-kos">,</span> <span class="pl-c1">fullPage</span>: <span class="pl-c1">true</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><strong>Test file (self-contained)</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="it('do stuff', async ({ page }) =&gt; { await overviewPage.goto(); const path = testInfo.outputPath('tmp_screenshot.png'); await page.screenshot({path}); testInfo.attachments.push({name: 'screenshot.png', path, contentType: 'image/png'}); await overviewPage.selectSomething.click(); });"><pre class="notranslate"><span class="pl-en">it</span><span class="pl-kos">(</span><span class="pl-s">'do stuff'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">await</span> <span class="pl-s1">overviewPage</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">path</span> <span class="pl-c1">=</span> <span class="pl-s1">testInfo</span><span class="pl-kos">.</span><span class="pl-en">outputPath</span><span class="pl-kos">(</span><span class="pl-s">'tmp_screenshot.png'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">screenshot</span><span class="pl-kos">(</span><span class="pl-kos">{</span>path<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">testInfo</span><span class="pl-kos">.</span><span class="pl-c1">attachments</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">name</span>: <span class="pl-s">'screenshot.png'</span><span class="pl-kos">,</span> path<span class="pl-kos">,</span> <span class="pl-c1">contentType</span>: <span class="pl-s">'image/png'</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">overviewPage</span><span class="pl-kos">.</span><span class="pl-c1">selectSomething</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Steps</strong></p> <ul dir="auto"> <li>[Run the test]</li> <li>[...]</li> </ul> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">screenshots should be saved as "screenshot.png" since this is the default filetype for screenshots</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">Only screenshots that are saved with the correct file ending will be converted as an png by xray<br> automatic screenshots get saved as "screenshot" and then can not be opened (broken file)<br> (see attached screenshot)<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8173194/234615615-582ff70d-0ce6-41fb-91ec-ccc8a7d5ba95.png"><img src="https://user-images.githubusercontent.com/8173194/234615615-582ff70d-0ce6-41fb-91ec-ccc8a7d5ba95.png" alt="Bildschirm­foto 2023-04-26 um 16 53 08" style="max-width: 100%;"></a></p>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: v1.31.2</li> <li>Operating System: Windows 10</li> </ul> <p dir="auto">I configured my test system as described here; <a href="https://docs.getxray.app/display/XRAYCLOUD/Testing+web+applications+using+Playwright" rel="nofollow">https://docs.getxray.app/display/XRAYCLOUD/Testing+web+applications+using+Playwright</a></p> <p dir="auto">I noticed that in the xray xml-report the data types are not provided (e.g. ".png", ".webm"). So I have to edit the xml content beforehand to be able to open the evidence in the browser.<br> In the default junit reports on the other hand the data types are apparently provided.</p>
1
<p dir="auto">Not a major issue, but the animation gets shown twice on all of the iPhones I've tested on.</p> <p dir="auto">iPhone 5, 5s and 6, all running iOS8</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">I think there should be only 1 MuiTextarea element</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">There are 2 MuiTextarea elements</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Add TextField to your application</li> <li>View the rendered TextField in the DevTools</li> </ol> <p dir="auto"><a href="https://codesandbox.io/s/lxl8145nl7" rel="nofollow">https://codesandbox.io/s/lxl8145nl7</a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/fcedf01f3ad583a3e6d6d7099b341c108fb7d943e2bd5a631605468b528e6b75/68747470733a2f2f692e696d6775722e636f6d2f7a366e6a5736632e706e67"><img src="https://camo.githubusercontent.com/fcedf01f3ad583a3e6d6d7099b341c108fb7d943e2bd5a631605468b528e6b75/68747470733a2f2f692e696d6775722e636f6d2f7a366e6a5736632e706e67" alt="" data-canonical-src="https://i.imgur.com/z6njW6c.png" style="max-width: 100%;"></a></p> <h2 dir="auto">Context</h2> <p dir="auto">It doesn't affect me at all - but I just wanted to show you this because it doesn't look like it's intended and I don't have time right now to dig into Material-UI for pull request</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0.0-beta.13</td> </tr> <tr> <td>React</td> <td>15.6.1 &amp; 16.0.0</td> </tr> <tr> <td>browser</td> <td>Version 61.0.3163.100 (Official Build) (64-bit)</td> </tr> <tr> <td>etc</td> <td>Windows 10</td> </tr> </tbody> </table>
0
<p dir="auto">Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on <a href="http://stackoverflow.com/questions/tagged/keras" rel="nofollow">StackOverflow</a> or <a href="https://keras-slack-autojoin.herokuapp.com/" rel="nofollow">join the Keras Slack channel</a> and ask there instead of filing a GitHub issue.</p> <p dir="auto">Thank you!</p> <ul class="contains-task-list"> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check that you are up-to-date with the master branch of Keras. You can update with:<br> pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps</p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found <a href="https://www.tensorflow.org/get_started/os_setup" rel="nofollow">here</a>.</p> </li> </ul> <p dir="auto">I'm training a model on p2.8xlarge, my base model looks like this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/10580847/36854173-ef76faa8-1d35-11e8-8399-08c35ff8e2b4.png"><img src="https://user-images.githubusercontent.com/10580847/36854173-ef76faa8-1d35-11e8-8399-08c35ff8e2b4.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">And <code class="notranslate">parallel_model = multi_gpu_model(model, gpus=TOTAL_GPU)</code> looks like this,<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/10580847/36854093-c1c6fbb2-1d35-11e8-8194-af5cfd4642b8.png"><img src="https://user-images.githubusercontent.com/10580847/36854093-c1c6fbb2-1d35-11e8-8194-af5cfd4642b8.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Warnings when initiating base model on CPU:</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="WARNING:tensorflow:From /root/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version. Instructions for updating: Use the retry module or similar alternatives. /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() . . . if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) INFO:root:Model Instantiate on CPU"><pre class="notranslate"><code class="notranslate">WARNING:tensorflow:From /root/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version. Instructions for updating: Use the retry module or similar alternatives. /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() . . . if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) INFO:root:Model Instantiate on CPU </code></pre></div> <p dir="auto"><strong>Warnings when initiating parallel_model on GPU:</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() . . . if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target))"><pre class="notranslate"><code class="notranslate">/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() . . . if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) </code></pre></div> <p dir="auto"><strong>Model training:</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TOTAL_GPU = 8 BATCH_SIZE = 512 * TOTAL_GPU train_gen = generate_arrays_from_file(TRAIN_FEATURES, TRAIN_LABELS, BATCH_SIZE) valid_gen = generate_arrays_from_file(VALID_FEATURES, VALID_LABELS, BATCH_SIZE) train_data_count = 268200000 valid_data_count = 29800000 ST_PR_EP_TR = int(train_data_count // BATCH_SIZE) ST_PR_EP_VA = int(valid_data_count // BATCH_SIZE) history = parallel_model.fit_generator( train_gen, steps_per_epoch=ST_PR_EP_TR, epochs=100, verbose=0, validation_data=valid_gen, validation_steps=ST_PR_EP_VA, callbacks=callback_list, max_queue_size=80, use_multiprocessing=True, workers=8, shuffle=True, initial_epoch=0)"><pre class="notranslate"><code class="notranslate">TOTAL_GPU = 8 BATCH_SIZE = 512 * TOTAL_GPU train_gen = generate_arrays_from_file(TRAIN_FEATURES, TRAIN_LABELS, BATCH_SIZE) valid_gen = generate_arrays_from_file(VALID_FEATURES, VALID_LABELS, BATCH_SIZE) train_data_count = 268200000 valid_data_count = 29800000 ST_PR_EP_TR = int(train_data_count // BATCH_SIZE) ST_PR_EP_VA = int(valid_data_count // BATCH_SIZE) history = parallel_model.fit_generator( train_gen, steps_per_epoch=ST_PR_EP_TR, epochs=100, verbose=0, validation_data=valid_gen, validation_steps=ST_PR_EP_VA, callbacks=callback_list, max_queue_size=80, use_multiprocessing=True, workers=8, shuffle=True, initial_epoch=0) </code></pre></div> <p dir="auto"><strong>Warnings when training model with fit_generator with batches:</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_0/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:0 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_0/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:0 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_0/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:0 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_0/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:0 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_1/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:1 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_1/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:1 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_1/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:1 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_1/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:1 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_2/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:2 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_2/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:2 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_2/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:2 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_2/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:2 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_3/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:3 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_3/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:3 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_3/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:3 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_3/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:3 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_4/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:4 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_4/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:4 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_4/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:4 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_4/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:4 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_5/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:5 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_5/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:5 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_5/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:5 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_5/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:5 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_6/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:6 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_6/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:6 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_6/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:6 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_6/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:6 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_7/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:7 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_7/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:7 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_7/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:7 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_7/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:7 vs /device:CPU:0. Postponing error-checking until all devices are assigned. /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/keras/engine/training.py:2088: UserWarning: Using a generator with `use_multiprocessing=True` and multiple workers may duplicate your data. Please consider using the`keras.utils.Sequence class. UserWarning('Using a generator with `use_multiprocessing=True`'"><pre class="notranslate"><code class="notranslate">WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_0/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:0 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_0/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:0 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_0/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:0 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_0/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:0 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_1/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:1 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_1/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:1 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_1/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:1 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_1/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:1 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_2/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:2 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_2/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:2 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_2/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:2 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_2/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:2 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_3/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:3 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_3/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:3 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_3/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:3 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_3/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:3 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_4/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:4 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_4/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:4 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_4/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:4 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_4/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:4 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_5/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:5 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_5/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:5 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_5/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:5 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_5/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:5 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_6/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:6 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_6/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:6 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_6/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:6 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_6/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:6 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_7/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:7 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_7/sequential_1/embedding_1/Gather_grad/Shape with an op embedding_1/embeddings/read that had a different device: /device:GPU:7 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_7/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:7 vs /device:CPU:0. Postponing error-checking until all devices are assigned. WARNING:tensorflow:Tried to colocate training/Adam/gradients/replica_7/sequential_1/embedding_1/Gather_grad/ToInt32 with an op embedding_1/embeddings/read that had a different device: /device:GPU:7 vs /device:CPU:0. Postponing error-checking until all devices are assigned. /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() if d.decorator_argspec is not None), _inspect.getargspec(target)) /root/anaconda3/lib/python3.6/site-packages/keras/engine/training.py:2088: UserWarning: Using a generator with `use_multiprocessing=True` and multiple workers may duplicate your data. Please consider using the`keras.utils.Sequence class. UserWarning('Using a generator with `use_multiprocessing=True`' </code></pre></div> <p dir="auto">Does <code class="notranslate">Postponing error-checking until all devices are assigned.</code> is somehow affecting model training ? or I can ignore this? I'm running Keras 2.1.4 and TensorFlow 1.6.0rc1 with Cuda compilation tools, release 9.0, V9.0.176</p> <p dir="auto">Thanks!</p>
<p dir="auto">We should consider moving the modules <code class="notranslate">preprocessing</code> and <code class="notranslate">applications</code> to separate repositories under <code class="notranslate">keras-team</code>: <code class="notranslate">keras-team/preprocessing</code> and <code class="notranslate">keras-team/applications</code>.</p> <p dir="auto">They would be listed as a dependency of <code class="notranslate">keras</code>, and would still be importable from e.g. <code class="notranslate">keras.preprocessing</code>.</p> <p dir="auto">Why?</p> <ul dir="auto"> <li>They're not part of "the core Keras API" (which is about model building and training)</li> <li>They're not really coupled to the rest of the codebase, so unbundling is safe</li> <li>Faster CI runs, better test coverage</li> <li>Unbundling makes it easier to develop in an open-source setting</li> <li>Easier to sync across <code class="notranslate">keras-team/keras</code> and <code class="notranslate">tf.keras</code> (shared dependencies instead of code duplication)</li> <li>Other projects might have need of Numpy preprocessing utilities</li> </ul> <p dir="auto">Any comments or concerns? Who would be interested in taking greater ownership of these repos, should they materialize?</p>
0
<blockquote> <p dir="auto">Issue originally made by Арсен С (NuArsen)</p> </blockquote> <h3 dir="auto">Bug information</h3> <ul dir="auto"> <li><strong>Babel version:</strong> Babel 6.9.1 (<a href="https://babeljs.io/repl/" rel="nofollow">https://babeljs.io/repl/</a>)</li> <li><strong>Node version:</strong> <a href="https://babeljs.io/repl/" rel="nofollow">https://babeljs.io/repl/</a></li> <li><strong>npm version:</strong> <a href="https://babeljs.io/repl/" rel="nofollow">https://babeljs.io/repl/</a></li> </ul> <h3 dir="auto">Input code</h3> <p dir="auto">Not working:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default ({ onClick }) =&gt; { return &lt;div onClick={() =&gt; onClick()}&gt;&lt;/div&gt;; }"><pre class="notranslate"><code class="notranslate">export default ({ onClick }) =&gt; { return &lt;div onClick={() =&gt; onClick()}&gt;&lt;/div&gt;; } </code></pre></div> <p dir="auto">Working:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default ({ onClick }) =&gt; { return &lt;div onClick={onClick}&gt;&lt;/div&gt;; }"><pre class="notranslate"><code class="notranslate">export default ({ onClick }) =&gt; { return &lt;div onClick={onClick}&gt;&lt;/div&gt;; } </code></pre></div> <h3 dir="auto">Description</h3> <p dir="auto">Code with arrow function inside react component attribute not exporting component. Issue repeats in <a href="https://babeljs.io/repl/" rel="nofollow">https://babeljs.io/repl/</a></p>
<blockquote> <p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jprichardson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jprichardson">@jprichardson</a></p> </blockquote> <h3 dir="auto">Bug information</h3> <ul dir="auto"> <li><strong>Babel version:</strong> 6.x</li> <li><strong>Node version:</strong> 5.3.0</li> <li><strong>npm version:</strong> 3.7.1</li> </ul> <h3 dir="auto">Input code</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default (onClick) =&gt; (&lt;div onClick={ () =&gt; onClick(text) } &gt;&lt;/div&gt;);"><pre class="notranslate"><code class="notranslate">export default (onClick) =&gt; (&lt;div onClick={ () =&gt; onClick(text) } &gt;&lt;/div&gt;); </code></pre></div> <h3 dir="auto">Description</h3> <p dir="auto">You'll notice an <code class="notranslate">export</code> at the bottom that didn't get transpiled.</p> <p dir="auto">Sorry, regarding Babel "version", wasn't sure which version to put since there are so many libraries. I'm using [email protected].</p>
1
<p dir="auto">See a jsFiddle example here: <a href="http://jsfiddle.net/h8XWv/" rel="nofollow">http://jsfiddle.net/h8XWv/</a></p> <p dir="auto">I'd assume that changing the ordering would fix this but as this change appears to have been made after RC1, it could well break something else.</p> <p dir="auto">EDIT: It seems to behave the same on navbar-default and navbar-inverse so perhaps it was when the styling was extracted from navbar that this change occured.</p>
<p dir="auto">the problem happens on mobile, tablet in ios everything is working, but using firefox on a tablet with android by clicking the submenu instead of open it all closes, the bug was partly solved in version 2.3.1 before or since in ios worked, now working in firefox was missing and perhaps other browser used in tablets.</p>
0
<h3 dir="auto">System information</h3> <ul dir="auto"> <li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: yes</li> <li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: debian 9 (stretch)</li> <li><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>: n/a</li> <li><strong>TensorFlow installed from (source or binary)</strong>: binary</li> <li><strong>TensorFlow version (use command below)</strong>: 1.9.0</li> <li><strong>Python version</strong>: 3.6</li> <li><strong>Bazel version (if compiling from source)</strong>: n/a</li> <li><strong>GCC/Compiler version (if compiling from source)</strong>: n/a</li> <li><strong>CUDA/cuDNN version</strong>: n/a</li> <li><strong>GPU model and memory</strong>: n/a</li> <li><strong>Exact command to reproduce</strong>: see below (short version: <code class="notranslate">N=int(1e4); assert len(tf.unique(tf.distributions.Uniform().sample(N)).y.eval()) == N</code>)</li> </ul> <h3 dir="auto">Describe the problem</h3> <p dir="auto">Traced subtle bug in my code back to the fact that the TF Uniform distribution (maybe others?) does not produce unique samples.. This is bad.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="N = int(1e4) len(np.unique(np.random.rand(N))) # 10000 tf.InteractiveSession() len(tf.unique(tf.distributions.Uniform().sample(N)).y.eval()) # 9993"><pre class="notranslate"><code class="notranslate">N = int(1e4) len(np.unique(np.random.rand(N))) # 10000 tf.InteractiveSession() len(tf.unique(tf.distributions.Uniform().sample(N)).y.eval()) # 9993 </code></pre></div>
<p dir="auto">bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package</p> <p dir="auto">Warning: ignoring LD_PRELOAD in environment.<br> ERROR: /home/wenjian/pkgs/tensorflow/tensorflow/core/distributed_runtime/rpc/BUILD:87:1: no such package '@grpc//': Error cloning repository: <a href="https://boringssl.googlesource.com/boringssl" rel="nofollow">https://boringssl.googlesource.com/boringssl</a>: cannot open git-upload-pack caused by <a href="https://boringssl.googlesource.com/boringssl" rel="nofollow">https://boringssl.googlesource.com/boringssl</a>: cannot open git-upload-pack caused by <a href="https://boringssl.googlesource.com/boringssl" rel="nofollow">https://boringssl.googlesource.com/boringssl</a>: cannot open git-upload-pack and referenced by '//tensorflow/core/distributed_runtime/rpc:grpc_channel'.<br> ERROR: Loading failed; build aborted.<br> INFO: Elapsed time: 342.460s</p>
0
<ul dir="auto"> <li>Electron version: 1.4.4</li> <li>Operating system: elementary OS Loki (basically Ubuntu 16.04)</li> </ul> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="app.on('ready', () =&gt; { const powerMonitor = require('electron').powerMonitor; powerMonitor.on('suspend', () =&gt; { console.log('SUSPEND'); }); });"><pre class="notranslate"><span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'ready'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">powerMonitor</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">powerMonitor</span><span class="pl-kos">;</span> <span class="pl-s1">powerMonitor</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'suspend'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'SUSPEND'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">does not output anything. Works fine on Windows.</p>
<p dir="auto">So I have a very simple code on a working app, but in no way does the event ever get trigged.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="app.on('ready', function() { require('power-monitor').on('on-battery', function () { console.log('battery time'); }); });"><pre class="notranslate"><code class="notranslate">app.on('ready', function() { require('power-monitor').on('on-battery', function () { console.log('battery time'); }); }); </code></pre></div> <p dir="auto">(The app itself is larger than that, ofc, I just cropped he useful part.</p>
1
<p dir="auto">Here is the message that i get when i try to execute deno :</p> <p dir="auto"><a href="https://gateway.ipfs.io/ipfs/QmWs8zeuka9ZRfdDpbZLo7Smi2wKYPi95ruVyuCN52eBaR/deno.png" rel="nofollow">https://gateway.ipfs.io/ipfs/QmWs8zeuka9ZRfdDpbZLo7Smi2wKYPi95ruVyuCN52eBaR/deno.png</a></p> <p dir="auto">translation <g-emoji class="g-emoji" alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png">👍</g-emoji><br> "The version of this file is incompatible with the version of windows you're using. Consult the system information of the computer to know if you need an x86(32 bits) or x64 (64bits) then contact the software editor."</p> <p dir="auto">I've installed it with powershell and i've tried also by downloading it.</p> <p dir="auto">I have the same message.</p> <p dir="auto">I'am on windows seven 32 bit.</p> <p dir="auto">regards and thanks</p>
<h1 dir="auto">Could you please support windows 32 bit machines for the build.</h1> <p dir="auto">I'm using Windows NT 10 15063</p> <p dir="auto">Building the app is quite a sassle for me (as win32 users) because:</p> <ul dir="auto"> <li>My windows version does <strong>not</strong> support symlinks even though I enabled developer options.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/37999241/70102942-5a7cc380-1642-11ea-8348-e32e15620b26.png"><img src="https://user-images.githubusercontent.com/37999241/70102942-5a7cc380-1642-11ea-8348-e32e15620b26.png" alt="Image attached" style="max-width: 100%;"></a></li> <li>Installing MSVC is quite a sassle (I tried 5 times; the download can't finish)</li> </ul> <p dir="auto">By the way, I have very limited resources; RAM, CPU even Storage<br> Needed requirements</p> <ul dir="auto"> <li><a href="https://support.microsoft.com/en-us/help/4027667/windows-10-update" rel="nofollow">Updated Windows version</a> with Dev Options enabled (.symlinks not working for me)</li> <li><a href="https://crates.io" rel="nofollow">Cargo</a> or <a href="https://www.rust-lang.org/" rel="nofollow">Rust</a> in general (not installable for me since it needs MSVC)</li> <li><a href="https://visualstudio.microsoft.com/vs/community/" rel="nofollow">MSVC</a> (not installable for me)</li> <li><a href="https://www.python.org/download/releases/2.7/" rel="nofollow">Python version 2</a>, not 3 (working for me)</li> </ul> <p dir="auto">I think anyone with the listed above resources .<br> can build it <em><strong>NOW</strong></em> and send it because I think it is not a difficult task and<br> I'm not even trying to go into node and I <em><strong>NEED</strong></em> it desperately. <strong>PLEASE HELP</strong>.</p>
1
<p dir="auto">Based on <a href="https://stackoverflow.com/a/25775030/5078258" rel="nofollow">https://stackoverflow.com/a/25775030/5078258</a></p> <h3 dir="auto">Reproducing code example:</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# call this file random.py import numpy as np print(1000)"><pre class="notranslate"><span class="pl-c"># call this file random.py</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-en">print</span>(<span class="pl-c1">1000</span>)</pre></div> <h3 dir="auto">Error message:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python scripts/random.py 1000 Traceback (most recent call last): File &quot;scripts/random.py&quot;, line 1, in &lt;module&gt; import numpy as np File &quot;/Users/ilanolkies/.pyenv/versions/3.6.5/lib/python3.6/site-packages/numpy/__init__.py&quot;, line 187, in &lt;module&gt; from .testing import Tester File &quot;/Users/ilanolkies/.pyenv/versions/3.6.5/lib/python3.6/site-packages/numpy/testing/__init__.py&quot;, line 12, in &lt;module&gt; from ._private.utils import * File &quot;/Users/ilanolkies/.pyenv/versions/3.6.5/lib/python3.6/site-packages/numpy/testing/_private/utils.py&quot;, line 16, in &lt;module&gt; from tempfile import mkdtemp, mkstemp File &quot;/Users/ilanolkies/.pyenv/versions/3.6.5/lib/python3.6/tempfile.py&quot;, line 45, in &lt;module&gt; from random import Random as _Random ImportError: cannot import name 'Random'"><pre class="notranslate"><code class="notranslate">$ python scripts/random.py 1000 Traceback (most recent call last): File "scripts/random.py", line 1, in &lt;module&gt; import numpy as np File "/Users/ilanolkies/.pyenv/versions/3.6.5/lib/python3.6/site-packages/numpy/__init__.py", line 187, in &lt;module&gt; from .testing import Tester File "/Users/ilanolkies/.pyenv/versions/3.6.5/lib/python3.6/site-packages/numpy/testing/__init__.py", line 12, in &lt;module&gt; from ._private.utils import * File "/Users/ilanolkies/.pyenv/versions/3.6.5/lib/python3.6/site-packages/numpy/testing/_private/utils.py", line 16, in &lt;module&gt; from tempfile import mkdtemp, mkstemp File "/Users/ilanolkies/.pyenv/versions/3.6.5/lib/python3.6/tempfile.py", line 45, in &lt;module&gt; from random import Random as _Random ImportError: cannot import name 'Random' </code></pre></div> <h3 dir="auto">Numpy/Python version information:</h3> <ul dir="auto"> <li>Python 3.6.5</li> <li><code class="notranslate">numpy</code> 1.16.3</li> </ul>
<p dir="auto">I recently upgraded to Big Sur 11.1, and I have tried to install numpy through the use of these two ways:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip3 install numpy"><pre class="notranslate"><code class="notranslate">pip3 install numpy </code></pre></div> <p dir="auto">and</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python3 -m pip install numpy --no-cache-dir"><pre class="notranslate"><code class="notranslate">python3 -m pip install numpy --no-cache-dir </code></pre></div> <p dir="auto">I used this as an <a href="https://github.com/luxonis/depthai/issues/298" data-hovercard-type="issue" data-hovercard-url="/luxonis/depthai/issues/298/hovercard">earlier reference</a> to no avail.</p> <h3 dir="auto">Error message:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Preparing wheel metadata ... error ERROR: Command errored out with exit status 1: command: /Users/xxxxx/.venv/bin/python3 /Users/xxxx/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmpbicurjfs cwd: /private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy Complete output (161 lines): Running from numpy source directory. setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates run_build = parse_setuppy_commands() Processing numpy/random/_bounded_integers.pxd.in Processing numpy/random/_philox.pyx Processing numpy/random/_bounded_integers.pyx.in Processing numpy/random/_sfc64.pyx Processing numpy/random/_mt19937.pyx Processing numpy/random/bit_generator.pyx Processing numpy/random/mtrand.pyx Processing numpy/random/_generator.pyx Processing numpy/random/_pcg64.pyx Processing numpy/random/_common.pyx Cythonizing sources blas_opt_info: blas_mkl_info: customize UnixCCompiler libraries mkl_rt not found in ['/Users/kennyfrc/Documents/code/fastchess/.venv/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib'] NOT AVAILABLE blis_info: libraries blis not found in ['/Users/xxx/.venv/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib'] NOT AVAILABLE openblas_info: C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders/qt creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds compile options: '-c' clang: /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/source.c clang /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/source.o -L/opt/local/lib -lopenblas -o /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/a.out FOUND: libraries = ['openblas', 'openblas'] library_dirs = ['/opt/local/lib'] language = c define_macros = [('HAVE_CBLAS', None)] FOUND: libraries = ['openblas', 'openblas'] library_dirs = ['/opt/local/lib'] language = c define_macros = [('HAVE_CBLAS', None)] non-existing path in 'numpy/distutils': 'site.cfg' lapack_opt_info: lapack_mkl_info: libraries mkl_rt not found in ['/Users/xxxx/.venv/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib'] NOT AVAILABLE openblas_lapack_info: C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders/qt creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a compile options: '-c' clang: /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/source.c clang /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/source.o -L/opt/local/lib -lopenblas -o /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/a.out FOUND: libraries = ['openblas', 'openblas'] library_dirs = ['/opt/local/lib'] language = c define_macros = [('HAVE_CBLAS', None)] FOUND: libraries = ['openblas', 'openblas'] library_dirs = ['/opt/local/lib'] language = c define_macros = [('HAVE_CBLAS', None)] /usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros' warnings.warn(msg) running dist_info running build_src build_src building py_modules sources creating build creating build/src.macosx-11-x86_64-3.9 creating build/src.macosx-11-x86_64-3.9/numpy creating build/src.macosx-11-x86_64-3.9/numpy/distutils building library &quot;npymath&quot; sources Traceback (most recent call last): File &quot;/Users/xxxx/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py&quot;, line 280, in &lt;module&gt; main() File &quot;/Users/x/.venv/lib/python3.9/site-packages/xxxpip/_vendor/pep517/_in_process.py&quot;, line 263, in main json_out['return_val'] = hook(**hook_input['kwargs']) File &quot;/Users/xxxxx/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py&quot;, line 133, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-build-env-k8l5syxk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 157, in prepare_metadata_for_build_wheel self.run_setup() File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-build-env-k8l5syxk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 248, in run_setup super(_BuildMetaLegacyBackend, File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-build-env-k8l5syxk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 142, in run_setup exec(compile(code, __file__, 'exec'), locals()) File &quot;setup.py&quot;, line 508, in &lt;module&gt; setup_package() File &quot;setup.py&quot;, line 500, in setup_package setup(**metadata) File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/core.py&quot;, line 169, in setup return old_setup(**new_attr) File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-build-env-k8l5syxk/overlay/lib/python3.9/site-packages/setuptools/__init__.py&quot;, line 165, in setup return distutils.core.setup(**attrs) File &quot;/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py&quot;, line 148, in setup dist.run_commands() File &quot;/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 966, in run_commands self.run_command(cmd) File &quot;/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 985, in run_command cmd_obj.run() File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-build-env-k8l5syxk/overlay/lib/python3.9/site-packages/setuptools/command/dist_info.py&quot;, line 31, in run egg_info.run() File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/egg_info.py&quot;, line 24, in run self.run_command(&quot;build_src&quot;) File &quot;/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py&quot;, line 313, in run_command self.distribution.run_command(command) File &quot;/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 985, in run_command cmd_obj.run() File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/build_src.py&quot;, line 144, in run self.build_sources() File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/build_src.py&quot;, line 155, in build_sources self.build_library_sources(*libname_info) File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/build_src.py&quot;, line 288, in build_library_sources sources = self.generate_sources(sources, (lib_name, build_info)) File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/build_src.py&quot;, line 378, in generate_sources source = func(extension, build_dir) File &quot;numpy/core/setup.py&quot;, line 658, in get_mathlib_info st = config_cmd.try_link('int main(void) { return 0;}') File &quot;/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/config.py&quot;, line 241, in try_link self._check_compiler() File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/config.py&quot;, line 80, in _check_compiler self.fcompiler = new_fcompiler(compiler=self.fcompiler, File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/__init__.py&quot;, line 880, in new_fcompiler compiler = get_default_fcompiler(plat, requiref90=requiref90, File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/__init__.py&quot;, line 851, in get_default_fcompiler compiler_type = _find_existing_fcompiler(matching_compiler_types, File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/__init__.py&quot;, line 802, in _find_existing_fcompiler c.customize(dist) File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/__init__.py&quot;, line 526, in customize linker_so_flags = self.flag_vars.linker_so File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/environment.py&quot;, line 37, in __getattr__ return self._get_var(name, conf_desc) File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/environment.py&quot;, line 53, in _get_var var = self._hook_handler(name, hook) File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/__init__.py&quot;, line 705, in _environment_hook return hook() File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/gnu.py&quot;, line 346, in get_flags_linker_so flags = GnuFCompiler.get_flags_linker_so(self) File &quot;/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/gnu.py&quot;, line 136, in get_flags_linker_so os.environ['MACOSX_DEPLOYMENT_TARGET'] = target File &quot;/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py&quot;, line 684, in __setitem__ value = self.encodevalue(value) File &quot;/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py&quot;, line 756, in encode raise TypeError(&quot;str expected, not %s&quot; % type(value).__name__) TypeError: str expected, not int ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/xxxxxx/.venv/bin/python3 /Users/xxxx/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmpbicurjfs Check the logs for full command output."><pre class="notranslate"><code class="notranslate"> Preparing wheel metadata ... error ERROR: Command errored out with exit status 1: command: /Users/xxxxx/.venv/bin/python3 /Users/xxxx/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmpbicurjfs cwd: /private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy Complete output (161 lines): Running from numpy source directory. setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates run_build = parse_setuppy_commands() Processing numpy/random/_bounded_integers.pxd.in Processing numpy/random/_philox.pyx Processing numpy/random/_bounded_integers.pyx.in Processing numpy/random/_sfc64.pyx Processing numpy/random/_mt19937.pyx Processing numpy/random/bit_generator.pyx Processing numpy/random/mtrand.pyx Processing numpy/random/_generator.pyx Processing numpy/random/_pcg64.pyx Processing numpy/random/_common.pyx Cythonizing sources blas_opt_info: blas_mkl_info: customize UnixCCompiler libraries mkl_rt not found in ['/Users/kennyfrc/Documents/code/fastchess/.venv/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib'] NOT AVAILABLE blis_info: libraries blis not found in ['/Users/xxx/.venv/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib'] NOT AVAILABLE openblas_info: C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders/qt creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds compile options: '-c' clang: /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/source.c clang /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/source.o -L/opt/local/lib -lopenblas -o /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmp70pspcds/a.out FOUND: libraries = ['openblas', 'openblas'] library_dirs = ['/opt/local/lib'] language = c define_macros = [('HAVE_CBLAS', None)] FOUND: libraries = ['openblas', 'openblas'] library_dirs = ['/opt/local/lib'] language = c define_macros = [('HAVE_CBLAS', None)] non-existing path in 'numpy/distutils': 'site.cfg' lapack_opt_info: lapack_mkl_info: libraries mkl_rt not found in ['/Users/xxxx/.venv/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib'] NOT AVAILABLE openblas_lapack_info: C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders/qt creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T creating /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a compile options: '-c' clang: /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/source.c clang /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/source.o -L/opt/local/lib -lopenblas -o /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmphsq28m1a/a.out FOUND: libraries = ['openblas', 'openblas'] library_dirs = ['/opt/local/lib'] language = c define_macros = [('HAVE_CBLAS', None)] FOUND: libraries = ['openblas', 'openblas'] library_dirs = ['/opt/local/lib'] language = c define_macros = [('HAVE_CBLAS', None)] /usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros' warnings.warn(msg) running dist_info running build_src build_src building py_modules sources creating build creating build/src.macosx-11-x86_64-3.9 creating build/src.macosx-11-x86_64-3.9/numpy creating build/src.macosx-11-x86_64-3.9/numpy/distutils building library "npymath" sources Traceback (most recent call last): File "/Users/xxxx/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in &lt;module&gt; main() File "/Users/x/.venv/lib/python3.9/site-packages/xxxpip/_vendor/pep517/_in_process.py", line 263, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/Users/xxxxx/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-build-env-k8l5syxk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel self.run_setup() File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-build-env-k8l5syxk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup super(_BuildMetaLegacyBackend, File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-build-env-k8l5syxk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 508, in &lt;module&gt; setup_package() File "setup.py", line 500, in setup_package setup(**metadata) File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/core.py", line 169, in setup return old_setup(**new_attr) File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-build-env-k8l5syxk/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 165, in setup return distutils.core.setup(**attrs) File "/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-build-env-k8l5syxk/overlay/lib/python3.9/site-packages/setuptools/command/dist_info.py", line 31, in run egg_info.run() File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/egg_info.py", line 24, in run self.run_command("build_src") File "/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/build_src.py", line 144, in run self.build_sources() File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/build_src.py", line 155, in build_sources self.build_library_sources(*libname_info) File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/build_src.py", line 288, in build_library_sources sources = self.generate_sources(sources, (lib_name, build_info)) File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/build_src.py", line 378, in generate_sources source = func(extension, build_dir) File "numpy/core/setup.py", line 658, in get_mathlib_info st = config_cmd.try_link('int main(void) { return 0;}') File "/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/config.py", line 241, in try_link self._check_compiler() File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/command/config.py", line 80, in _check_compiler self.fcompiler = new_fcompiler(compiler=self.fcompiler, File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/__init__.py", line 880, in new_fcompiler compiler = get_default_fcompiler(plat, requiref90=requiref90, File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/__init__.py", line 851, in get_default_fcompiler compiler_type = _find_existing_fcompiler(matching_compiler_types, File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/__init__.py", line 802, in _find_existing_fcompiler c.customize(dist) File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/__init__.py", line 526, in customize linker_so_flags = self.flag_vars.linker_so File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/environment.py", line 37, in __getattr__ return self._get_var(name, conf_desc) File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/environment.py", line 53, in _get_var var = self._hook_handler(name, hook) File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/__init__.py", line 705, in _environment_hook return hook() File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/gnu.py", line 346, in get_flags_linker_so flags = GnuFCompiler.get_flags_linker_so(self) File "/private/var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/pip-install-aldosbmk/numpy/numpy/distutils/fcompiler/gnu.py", line 136, in get_flags_linker_so os.environ['MACOSX_DEPLOYMENT_TARGET'] = target File "/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 684, in __setitem__ value = self.encodevalue(value) File "/usr/local/Cellar/[email protected]/3.9.0_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 756, in encode raise TypeError("str expected, not %s" % type(value).__name__) TypeError: str expected, not int ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/xxxxxx/.venv/bin/python3 /Users/xxxx/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/qt/42nnsb353yz2l81tcbj8xsvc0000gn/T/tmpbicurjfs Check the logs for full command output. </code></pre></div> <h3 dir="auto">NumPy/Python version information:</h3> <p dir="auto">I tried to install numpy-1.19.5.</p> <p dir="auto">My python version is Python 3.9.0</p>
0
<p dir="auto">It would be great if there was a way to relax the current constraint of requiring get/set accessors to have the same type. this would be helpful in a situation like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class MyClass { private _myDate: moment.Moment; get myDate(): moment.Moment { return this._myDate; } set myDate(value: Date | moment.Moment) { this._myDate = moment(value); } }"><pre class="notranslate"><code class="notranslate">class MyClass { private _myDate: moment.Moment; get myDate(): moment.Moment { return this._myDate; } set myDate(value: Date | moment.Moment) { this._myDate = moment(value); } } </code></pre></div> <p dir="auto">Currently, this does not seems to be possible, and I have to resort to something like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class MyClass { private _myDate: moment.Moment; get myDate(): moment.Moment { return this._myDate; } set myDate(value: moment.Moment) { assert.fail('Setter for myDate is not available. Please use: setMyDate() instead'); } setMyDate(value: Date | moment.Moment) { this._myDate = moment(value); } }"><pre class="notranslate"><code class="notranslate">class MyClass { private _myDate: moment.Moment; get myDate(): moment.Moment { return this._myDate; } set myDate(value: moment.Moment) { assert.fail('Setter for myDate is not available. Please use: setMyDate() instead'); } setMyDate(value: Date | moment.Moment) { this._myDate = moment(value); } } </code></pre></div> <p dir="auto">This is far from ideal, and the code would be much cleaner if different types would be allowed.</p> <p dir="auto">Thanks!</p>
<p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">This function should compile succesfully</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function testFunction(a: string | Object) { if (typeof a === &quot;string&quot;) { if (a.indexOf(&quot;.&quot;) &gt;= 0) a = a.substr(a.indexOf(&quot;.&quot;) + 1); ... } }"><pre class="notranslate"><code class="notranslate">function testFunction(a: string | Object) { if (typeof a === "string") { if (a.indexOf(".") &gt;= 0) a = a.substr(a.indexOf(".") + 1); ... } } </code></pre></div> <p dir="auto"><strong>Actual behavior</strong></p> <p dir="auto">The function gives error about <code class="notranslate">indexOf</code> does not exist on type <code class="notranslate">string | Object</code>. If I omit the assignment to <code class="notranslate">a</code> then it works fine. I think the compiler should notice that I'm safely assigning another <code class="notranslate">string</code> to the <code class="notranslate">string</code> type-guarded variable. However, I understand that this behavior would be expected if I assigned a value which is not guaranteed to be a <code class="notranslate">string</code>.</p> <p dir="auto"><strong>TypeScript environment</strong></p> <p dir="auto">Visual Studio 2015<br> TypeScript 1.8.4</p>
0
<p dir="auto">Hi,</p> <p dir="auto">I think that interp1d should be more verbose when extrapolating out of bounds, for example using warnings. The code itself poses the question, and answers "matlab does not".</p> <p dir="auto">I vote yes :)</p> <p dir="auto">Seriously, Extrapolating can be fine, I do that a lot in order to avoid crashes when one/two points are out of the allowed interpolation, but I would love to be warned if data are being extrapolated.</p>
<p dir="auto">That new beta version of Cython was released yesterday (Feb. 25th) on PyPI, and is causing a build failure on the pre-release Azure job in recent PRs. I don't know if a subset of the issues should simply be reported upstream, but this is quite easy to reproduce locally with cython <code class="notranslate">3.0.0b1</code> installed from PyPI of course.</p> <p dir="auto">Sample errors from local build:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Meson build setup OK 💻 ninja -C /home/tyler/github_projects/scipy/build ninja: Entering directory `/home/tyler/github_projects/scipy/build' [153/1622] Generating 'scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c'. FAILED: scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c /home/tyler/python_310_scipy_dev_work/bin/cython -3 --fast-fail --output-file scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c --include-dir . ../scipy/_lib/_ccallback_c.pyx warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pxd:5:83: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pxd:6:94: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pxd:7:105: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pxd:9:58: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:109:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:135:87: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:184:83: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:198:94: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:201:105: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:204:58: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. Error compiling Cython file: ------------------------------------------------------------ ... if name == NULL: name_copy = name else: name_copy = strdup(name) capsule = PyCapsule_New(func, name_copy, &amp;raw_capsule_destructor) ^ ------------------------------------------------------------ /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:80:45: Cannot assign type 'void (*)(object) except *' to 'PyCapsule_Destructor' [171/1622] Generating 'scipy/sparse/csgraph/_min_spanning_tree.cpython-310-x86_64-linux-gnu.so.p/_min_spanning_tree.c'. warning: /home/tyler/github_projects/scipy/scipy/sparse/csgraph/parameters.pxi:14:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: /home/tyler/github_projects/scipy/scipy/sparse/csgraph/parameters.pxi:17:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 [173/1622] Generating 'scipy/special/_ufuncs.cpython-310-x86_64-linux-gnu.so.p/_ufuncs.c'. FAILED: scipy/special/_ufuncs.cpython-310-x86_64-linux-gnu.so.p/_ufuncs.c /home/tyler/python_310_scipy_dev_work/bin/cython -3 --fast-fail --output-file scipy/special/_ufuncs.cpython-310-x86_64-linux-gnu.so.p/_ufuncs.c --include-dir . scipy/special/_ufuncs.pyx Error compiling Cython file: ------------------------------------------------------------ ... from .special cimport cython_special ^ ------------------------------------------------------------ scipy/special.pxd:1:0: 'scipy/special/special.pxd' not found [174/1622] Compiling C++ object scipy/special/_ufuncs_cxx.cpython-310-x86_64-linux-gnu.so.p/ellint_carlson_wrap.cxx.o ninja: build stopped: subcommand failed. Build failed! "><pre class="notranslate"><code class="notranslate">Meson build setup OK 💻 ninja -C /home/tyler/github_projects/scipy/build ninja: Entering directory `/home/tyler/github_projects/scipy/build' [153/1622] Generating 'scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c'. FAILED: scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c /home/tyler/python_310_scipy_dev_work/bin/cython -3 --fast-fail --output-file scipy/_lib/_ccallback_c.cpython-310-x86_64-linux-gnu.so.p/_ccallback_c.c --include-dir . ../scipy/_lib/_ccallback_c.pyx warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pxd:5:83: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pxd:6:94: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pxd:7:105: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pxd:9:58: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:109:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:135:87: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:184:83: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:198:94: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:201:105: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:204:58: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. Error compiling Cython file: ------------------------------------------------------------ ... if name == NULL: name_copy = name else: name_copy = strdup(name) capsule = PyCapsule_New(func, name_copy, &amp;raw_capsule_destructor) ^ ------------------------------------------------------------ /home/tyler/github_projects/scipy/scipy/_lib/_ccallback_c.pyx:80:45: Cannot assign type 'void (*)(object) except *' to 'PyCapsule_Destructor' [171/1622] Generating 'scipy/sparse/csgraph/_min_spanning_tree.cpython-310-x86_64-linux-gnu.so.p/_min_spanning_tree.c'. warning: /home/tyler/github_projects/scipy/scipy/sparse/csgraph/parameters.pxi:14:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 warning: /home/tyler/github_projects/scipy/scipy/sparse/csgraph/parameters.pxi:17:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310 [173/1622] Generating 'scipy/special/_ufuncs.cpython-310-x86_64-linux-gnu.so.p/_ufuncs.c'. FAILED: scipy/special/_ufuncs.cpython-310-x86_64-linux-gnu.so.p/_ufuncs.c /home/tyler/python_310_scipy_dev_work/bin/cython -3 --fast-fail --output-file scipy/special/_ufuncs.cpython-310-x86_64-linux-gnu.so.p/_ufuncs.c --include-dir . scipy/special/_ufuncs.pyx Error compiling Cython file: ------------------------------------------------------------ ... from .special cimport cython_special ^ ------------------------------------------------------------ scipy/special.pxd:1:0: 'scipy/special/special.pxd' not found [174/1622] Compiling C++ object scipy/special/_ufuncs_cxx.cpython-310-x86_64-linux-gnu.so.p/ellint_carlson_wrap.cxx.o ninja: build stopped: subcommand failed. Build failed! </code></pre></div>
0
<h1 dir="auto">Feature request</h1> <p dir="auto">Request to add the documentation on how to add routes dynamically in Router array in server.js or any other appropriate place when an API call can be made.<br> I would like to avoid custom server and stay with Next.js defaults.</p> <h2 dir="auto">Is your feature request related to a problem? Please describe.</h2> <p dir="auto">I have some urls like following.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="http://ww.example.com/something/ -&gt; somePage.js http://ww.example.com/something/hello/hi -&gt; somePage.js http://ww.example.com/xyz/hello/hi -&gt; somePage.js http://ww.example.com/abc/hello/hi -&gt; otherPage.js http://ww.example.com/abc/dfg -&gt; otherPage.js http://ww.example.com/water -&gt; otherPage.js http://ww.example.com/toys -&gt; anyPage.js"><pre class="notranslate"><code class="notranslate">http://ww.example.com/something/ -&gt; somePage.js http://ww.example.com/something/hello/hi -&gt; somePage.js http://ww.example.com/xyz/hello/hi -&gt; somePage.js http://ww.example.com/abc/hello/hi -&gt; otherPage.js http://ww.example.com/abc/dfg -&gt; otherPage.js http://ww.example.com/water -&gt; otherPage.js http://ww.example.com/toys -&gt; anyPage.js </code></pre></div> <p dir="auto">The issue is that none of the URLs have any info about the Page that they need to map to. Also they don't follow any pattern.</p> <p dir="auto">All the example I found have page info in the url like this <code class="notranslate">/post/[id]</code> or <code class="notranslate">/post/postName</code>, so it becomes easier to identify the page the url map to but in my case page info or any other hint is not there.</p> <h2 dir="auto">Describe the solution you'd like</h2> <p dir="auto">I want to add the above url mappings that can go to any number in future but at present I have something like 300 urls.</p> <p dir="auto">I would like to add all urls as routes to page mappings in routes array, as shown in pic.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/42976790/63362549-032b3f80-c340-11e9-8739-2dfb8e8c57f3.png"><img width="913" alt="Screen Shot 2019-08-20 at 10 44 03 AM" src="https://user-images.githubusercontent.com/42976790/63362549-032b3f80-c340-11e9-8739-2dfb8e8c57f3.png" style="max-width: 100%;"></a><br> I found the following code in Next.js source code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// &lt;reference types=&quot;node&quot; /&gt; import { IncomingMessage, ServerResponse } from 'http'; import { UrlWithParsedQuery } from 'url'; export declare const route: (path: string) =&gt; (pathname: string | undefined, params?: any) =&gt; any; export declare type Params = { [param: string]: any; }; export declare type RouteMatch = (pathname: string | undefined) =&gt; false | Params; export declare type Route = { match: RouteMatch; fn: (req: IncomingMessage, res: ServerResponse, params: Params, parsedUrl: UrlWithParsedQuery) =&gt; void; }; export default class Router { routes: Route[]; constructor(routes?: Route[]); add(route: Route): void; match(req: IncomingMessage, res: ServerResponse, parsedUrl: UrlWithParsedQuery): (() =&gt; void) | undefined; }"><pre class="notranslate"><code class="notranslate">/// &lt;reference types="node" /&gt; import { IncomingMessage, ServerResponse } from 'http'; import { UrlWithParsedQuery } from 'url'; export declare const route: (path: string) =&gt; (pathname: string | undefined, params?: any) =&gt; any; export declare type Params = { [param: string]: any; }; export declare type RouteMatch = (pathname: string | undefined) =&gt; false | Params; export declare type Route = { match: RouteMatch; fn: (req: IncomingMessage, res: ServerResponse, params: Params, parsedUrl: UrlWithParsedQuery) =&gt; void; }; export default class Router { routes: Route[]; constructor(routes?: Route[]); add(route: Route): void; match(req: IncomingMessage, res: ServerResponse, parsedUrl: UrlWithParsedQuery): (() =&gt; void) | undefined; } </code></pre></div> <p dir="auto"><em>This code declares Route but I am not sure how do I create a new Route and add it to routes array so routing happens automatically.</em><br> <em>I would like to add all the routes to routes array at the server start-up and update them after a set interval.</em></p> <h2 dir="auto">Describe alternatives you've considered</h2> <p dir="auto">At present I have something like following working, on server side:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="app.prepare().then(() =&gt; { createServer((req, res) =&gt; { // Be sure to pass `true` as the second argument to `url.parse`. // This tells it to parse the query portion of the URL. const parsedUrl = parse(req.url, true); const { pathname, query } = parsedUrl; if (urlMappings.includes(pathname)) { // the path value should be externalized later. // So mappings can changed without redeploying the app. //Current pathname passed as query param to mypage. app.render(req, res, '/mypage', { ...query, newQueryParam: pathname }); } else { handle(req, res, parsedUrl); } }).listen(port, err =&gt; { if (err) throw err; console.log(`&gt; Ready on http://localhost:${port}`); }); });"><pre class="notranslate"><code class="notranslate">app.prepare().then(() =&gt; { createServer((req, res) =&gt; { // Be sure to pass `true` as the second argument to `url.parse`. // This tells it to parse the query portion of the URL. const parsedUrl = parse(req.url, true); const { pathname, query } = parsedUrl; if (urlMappings.includes(pathname)) { // the path value should be externalized later. // So mappings can changed without redeploying the app. //Current pathname passed as query param to mypage. app.render(req, res, '/mypage', { ...query, newQueryParam: pathname }); } else { handle(req, res, parsedUrl); } }).listen(port, err =&gt; { if (err) throw err; console.log(`&gt; Ready on http://localhost:${port}`); }); }); </code></pre></div> <ul dir="auto"> <li>The problem with this approach is that I have to maintain large array and do if-else in server.js.</li> <li>Also the routes can not be updated if new pages are added to URL array.</li> <li><code class="notranslate">if (urlMappings.includes(pathname)) {</code></li> </ul> <p dir="auto">On Client Side I am able to utilize <code class="notranslate">Link</code> component <code class="notranslate">as</code> feature to change the displayed link in browser.</p> <p dir="auto">Other approach I am thinking of is to make an api call in server.js to get url to page mapping but thats expensive as it added some time to each request.</p> <h2 dir="auto">Additional context</h2> <p dir="auto">Is there any way to ask Next.js that if this url maps to any of its page, if it maps I will let Next.js handle the request, else I can check in url array and do custom mappings to page, so I dont check url array for all valid requests that map to pages directly ?</p> <p dir="auto">I asked similar question on stackoverflow and Spectrum but have not received any response. So this is my last place to ask for help. I am new to JS or TS, still building the understanding on how they work. Thanks in advance.</p>
<h1 dir="auto">Feature request</h1> <h2 dir="auto">Is your feature request related to a problem? Please describe.</h2> <p dir="auto">url structures are still visible on devices, so its a UI-element and often is bound to editorial decisions, yet in nextjs, url routes always reflect the filesystem of the project</p> <p dir="auto">Having the filename of a page be the route path segment might be ok, if you develop for an english target group, but leads to problems in other markets. E.g. in switzerland we often need to have an app in multiple languages and customers often wish that the url paths are also translated.</p> <p dir="auto">Also, there is a common practice, that source code is always in english. So this leads to the problem, that when you decide to have e.g. german url paths, you need to have german-named files in your app, which just feels wrong.</p> <p dir="auto">Nextjs should therefore provide a firstclass support to translate url path segments.</p> <h2 dir="auto">Describe the solution you'd like</h2> <p dir="auto">There should be a way to provide aliases to pages in code. So a page would be delivered on all available aliases. It should be possible to use translation services to provide these aliases. They should work both on server and on client.</p> <p dir="auto">If you use a <code class="notranslate">&lt;Link /&gt;</code>� to a page, you can provide some context, so that nextjs would use the right alias to make the route. E.g. you could provide the locale.</p> <p dir="auto">I don't know nextjs good enough to suggest an api for it yet, but suggestions are very welcome!</p> <h2 dir="auto">Describe alternatives you've considered</h2> <p dir="auto">Doing it with dynamic routes (next 9 feature), is nearly impossible, because every page and folder would basically look like <code class="notranslate">[slug].js</code>, so you would need to deliver the right page yourself, defeating the purpose of the whole file-system-routing.</p> <p dir="auto">It's only possible with a custom server and some boilerplate, so that your <code class="notranslate">&lt;Link /&gt;</code> behave correctly. But this is needs careful setup, so that you don't have duplicated route declarations and it is therefore error-prone.</p>
1
<p dir="auto">These might be symptomatic of having two implementations, where the one that is actually used is determined by the import order (not good).</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import collections &gt;&gt;&gt; {k: v for k, v in collections.Counter(np.__all__).items() if v &gt; 1} {'alen': 2, 'all': 2, 'alltrue': 2, 'amax': 2, 'amin': 2, 'any': 2, 'argmax': 2, 'argmin': 2, 'argpartition': 2, 'argsort': 2, 'around': 2, 'choose': 2, 'clip': 2, 'compress': 2, 'cumprod': 2, 'cumproduct': 2, 'cumsum': 2, 'diagonal': 2, 'mean': 2, 'ndim': 2, 'nonzero': 2, 'partition': 2, 'prod': 2, 'product': 2, 'ptp': 2, 'put': 2, 'ravel': 2, 'repeat': 2, 'reshape': 2, 'resize': 2, 'round_': 2, 'searchsorted': 2, 'shape': 2, 'size': 2, 'sometrue': 2, 'sort': 2, 'squeeze': 2, 'std': 2, 'sum': 2, 'swapaxes': 2, 'take': 2, 'trace': 2, 'transpose': 2, 'var': 2, 'issubdtype': 2}"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">collections</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> {<span class="pl-s1">k</span>: <span class="pl-s1">v</span> <span class="pl-k">for</span> <span class="pl-s1">k</span>, <span class="pl-s1">v</span> <span class="pl-c1">in</span> <span class="pl-s1">collections</span>.<span class="pl-v">Counter</span>(<span class="pl-s1">np</span>.<span class="pl-s1">__all__</span>).<span class="pl-en">items</span>() <span class="pl-k">if</span> <span class="pl-s1">v</span> <span class="pl-c1">&gt;</span> <span class="pl-c1">1</span>} {<span class="pl-s">'alen'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'all'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'alltrue'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'amax'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'amin'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'any'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'argmax'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'argmin'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'argpartition'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'argsort'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'around'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'choose'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'clip'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'compress'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'cumprod'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'cumproduct'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'cumsum'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'diagonal'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'mean'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'ndim'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'nonzero'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'partition'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'prod'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'product'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'ptp'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'put'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'ravel'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'repeat'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'reshape'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'resize'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'round_'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'searchsorted'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'shape'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'size'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'sometrue'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'sort'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'squeeze'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'std'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'sum'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'swapaxes'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'take'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'trace'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'transpose'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'var'</span>: <span class="pl-c1">2</span>, <span class="pl-s">'issubdtype'</span>: <span class="pl-c1">2</span>}</pre></div>
<p dir="auto">Error popped up while trying to import numpy on Jupyter notebooks</p> <h3 dir="auto">Reproducing code example:</h3> <p dir="auto">Upgraded to Mac OX 10.15, and everything was fine for a while, and pandas_profiling disappeared, so I reinstalled it. Then it said NumPy had duplicates so I uninstalled NumPy (via Conda) until Conda could not detect any NumPy package. And then I encountered this error.</p> <p dir="auto">Here are my current paths:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="which -a python /usr/bin/python jupyter kernelspec list Available kernels: ir /Users/choikwunyu/Library/Jupyter/kernels/ir python3 /Users/choikwunyu/anaconda3/share/jupyter/kernels/python3 echo $PATH /anaconda3/bin:~/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/Library/TeX/texbin"><pre class="notranslate"><code class="notranslate">which -a python /usr/bin/python jupyter kernelspec list Available kernels: ir /Users/choikwunyu/Library/Jupyter/kernels/ir python3 /Users/choikwunyu/anaconda3/share/jupyter/kernels/python3 echo $PATH /anaconda3/bin:~/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/Library/TeX/texbin </code></pre></div> <h3 dir="auto">Error message:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy c-extensions failed. - Try uninstalling and reinstalling numpy. - If you have already done that, then: 1. Check that you expected to use Python3.6 from &quot;/Users/choikwunyu/anaconda3/bin/python&quot;, and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy version &quot;1.17.2&quot; you're trying to use. 2. If (1) looks fine, you can open a new issue at https://github.com/numpy/numpy/issues. Please include details on: - how you installed Python - how you installed numpy - your operating system - whether or not you have multiple versions of Python installed - if you built from source, your compiler versions and ideally a build log - If you're working with a numpy git repository, try `git clean -xdf` (removes all files not under version control) and rebuild numpy. Note: this error has many possible causes, so please don't comment on an existing issue about this - open a new one instead. Original error was: dlopen(/Users/choikwunyu/anaconda3/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libopenblas.dylib Referenced from: /Users/choikwunyu/anaconda3/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-darwin.so Reason: image not found "><pre lang="ImportError:" class="notranslate"><code class="notranslate"> IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy c-extensions failed. - Try uninstalling and reinstalling numpy. - If you have already done that, then: 1. Check that you expected to use Python3.6 from "/Users/choikwunyu/anaconda3/bin/python", and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy version "1.17.2" you're trying to use. 2. If (1) looks fine, you can open a new issue at https://github.com/numpy/numpy/issues. Please include details on: - how you installed Python - how you installed numpy - your operating system - whether or not you have multiple versions of Python installed - if you built from source, your compiler versions and ideally a build log - If you're working with a numpy git repository, try `git clean -xdf` (removes all files not under version control) and rebuild numpy. Note: this error has many possible causes, so please don't comment on an existing issue about this - open a new one instead. Original error was: dlopen(/Users/choikwunyu/anaconda3/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libopenblas.dylib Referenced from: /Users/choikwunyu/anaconda3/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-darwin.so Reason: image not found </code></pre></div> <h3 dir="auto">Numpy/Python version information:</h3> <p dir="auto"><code class="notranslate">-bash: syntax error near unexpected token `numpy.__version__,'-</code></p>
0
<p dir="auto">After updating the version, I found that the previous <code class="notranslate">highlighting render</code> function had disappeared! Is there an alternative function? And how to use it!</p>
<p dir="auto">using react PropTypes is awesome, and can help catching errors at the early stage,<br> but sometimes, when the application is pretty large, there is always a flow of data<br> structures of a big size. Like in the web email client application, there can be a <code class="notranslate">Message</code><br> type that is passed all over the place, and multiple components can accept it in props.</p> <p dir="auto">so the solution to that is usually creating a type file. e.g.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// types/message.js import React from 'react'; export default React.PropTypes.shape({ id: React.PropTypes.string.isRequired, subject: React.PropTypes.string }).isRequired; "><pre class="notranslate"><span class="pl-c">// types/message.js</span> <span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">PropTypes</span><span class="pl-kos">.</span><span class="pl-en">shape</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">id</span>: <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">PropTypes</span><span class="pl-kos">.</span><span class="pl-c1">string</span><span class="pl-kos">.</span><span class="pl-c1">isRequired</span><span class="pl-kos">,</span> <span class="pl-c1">subject</span>: <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">PropTypes</span><span class="pl-kos">.</span><span class="pl-c1">string</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">isRequired</span><span class="pl-kos">;</span></pre></div> <p dir="auto">and then reusing this type in components that get messages in props</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" import messageType from './types/message'; MessagePreview.PropTypes = { message: messageType }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">messageType</span> <span class="pl-k">from</span> <span class="pl-s">'./types/message'</span><span class="pl-kos">;</span> <span class="pl-v">MessagePreview</span><span class="pl-kos">.</span><span class="pl-c1">PropTypes</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">message</span>: <span class="pl-s1">messageType</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">but sometimes this data flows in some other than components elements. for example flux stores, or action creators. And that usually requires duplication of types (using immutable.js records or similar)</p> <p dir="auto">That would we really nice if we could use this type checks in other parts of the application.</p> <p dir="auto">for example</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// stores/message.js import messageType from './types/message'; import checkTypes from 'react/check-types'; /** * @param {Array&lt;Object&gt;} payload.messages the array of message objects received from the API */ onDataReceived = (payload) =&gt; { payload.messages.forEach((message) =&gt; { checkTypes(message, messageType); addToStore(message); }); }"><pre class="notranslate"><span class="pl-c">// stores/message.js</span> <span class="pl-k">import</span> <span class="pl-s1">messageType</span> <span class="pl-k">from</span> <span class="pl-s">'./types/message'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-s1">checkTypes</span> <span class="pl-k">from</span> <span class="pl-s">'react/check-types'</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">Array&lt;Object&gt;</span>} payload.messages the array of message objects received from the API</span> <span class="pl-c"> */</span> <span class="pl-en">onDataReceived</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">payload</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">payload</span><span class="pl-kos">.</span><span class="pl-c1">messages</span><span class="pl-kos">.</span><span class="pl-en">forEach</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">message</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">checkTypes</span><span class="pl-kos">(</span><span class="pl-s1">message</span><span class="pl-kos">,</span> <span class="pl-s1">messageType</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">addToStore</span><span class="pl-kos">(</span><span class="pl-s1">message</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">will this be any good? I guess architectually it means making propTypes.js more independent, and creating an adapter for prop/context validating</p>
0
<h4 dir="auto">Data Visualization with D3: Work with Data in D3</h4> <p dir="auto"><a href="http://beta.freecodecamp.com/en/challenges/data-visualization-with-d3/work-with-data-in-d3" rel="nofollow">http://beta.freecodecamp.com/en/challenges/data-visualization-with-d3/work-with-data-in-d3</a></p> <h4 dir="auto">Issue Description</h4> <p dir="auto">Complete a previous challenge, go to the next challenge in the flow. You'll see the previous output of the challenge you completed before.</p> <h4 dir="auto">Browser Information</h4> <ul dir="auto"> <li>Browser Name, Version: Chrome</li> <li>Operating System: Mac</li> <li>Mobile, Desktop, or Tablet: Desktop</li> </ul>
<p dir="auto">Challenge <a href="http://beta.freecodecamp.com/en/challenges/applied-visual-design/use-the-css-transform-scale-property-to-change-the-size-of-an-element" rel="nofollow">use-the-css-transform-scale-property-to-change-the-size-of-an-element</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.</p> <p dir="auto">No image in the phone view upon initial load when not following the map linearly. (I selected a lesson based on what I could use a refresher on. I know the surrounding material.)</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" &lt;style&gt; .ball { width: 40px; height: 40px; margin: 50 auto; position: fixed; background: linear-gradient( 35deg, #ccffff, #ffcccc ); border-radius: 50%; } #ball1 { left:20%; } #ball2 { left:65%; } &lt;/style&gt; &lt;div class=&quot;ball&quot; id= &quot;ball1&quot;&gt;&lt;/div&gt; &lt;div class=&quot;ball&quot; id= &quot;ball2&quot;&gt;&lt;/div&gt; ``` "><pre class="notranslate"> <span class="pl-kos">&lt;</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span> .<span class="pl-c1">ball</span> { <span class="pl-c1">width</span><span class="pl-kos">:</span> <span class="pl-c1">40<span class="pl-smi">px</span></span>; <span class="pl-c1">height</span><span class="pl-kos">:</span> <span class="pl-c1">40<span class="pl-smi">px</span></span>; <span class="pl-c1">margin</span><span class="pl-kos">:</span> <span class="pl-c1">50</span> auto; <span class="pl-c1">position</span><span class="pl-kos">:</span> fixed; <span class="pl-c1">background</span><span class="pl-kos">:</span> <span class="pl-en">linear-gradient</span>( <span class="pl-c1">35<span class="pl-smi">deg</span></span><span class="pl-kos">,</span> <span class="pl-pds"><span class="pl-kos">#</span>ccffff</span><span class="pl-kos">,</span> <span class="pl-pds"><span class="pl-kos">#</span>ffcccc</span> ); <span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">50<span class="pl-smi">%</span></span>; } <span class="pl-kos">#</span><span class="pl-c1">ball1</span> { <span class="pl-c1">left</span><span class="pl-kos">:</span><span class="pl-c1">20<span class="pl-smi">%</span></span>; } <span class="pl-kos">#</span><span class="pl-c1">ball2</span> { <span class="pl-c1">left</span><span class="pl-kos">:</span><span class="pl-c1">65<span class="pl-smi">%</span></span>; } <span class="pl-kos">&lt;/</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">ball</span>" <span class="pl-c1">id</span>= "<span class="pl-s">ball1</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">ball</span>" <span class="pl-c1">id</span>= "<span class="pl-s">ball2</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> ``` </pre></div>
1
<p dir="auto">If a navbar dropdown is left open during collapsed (mobile) mode, then resized to horizontal (desktop) mode, it wont work straight.</p> <p dir="auto"><a href="http://getbootstrap.com/examples/navbar/" rel="nofollow">http://getbootstrap.com/examples/navbar/</a></p> <p dir="auto">Maybe the navbar should auto-close all dropdowns on collapsed mode to horizontal mode switch.</p>
<p dir="auto">Steps to reproduce:<br> Open, for example, bootstrap-3.0.2\examples\theme\index.html.</p> <ol dir="auto"> <li>Make screen smaller to get collapsed nav bar</li> <li>Click on one of menu for drop-down list in nav bar</li> <li>Maximize screen again</li> <li>Go to Drop-down - drop-down and click again - list will be in scroll area.</li> </ol> <p dir="auto">Did the same on tablet Nexus - 7'' : Landscape and Portrait, the same effect. After refresh everything is fine again.</p>
1
<p dir="auto">Hello! See example</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type lang = &quot;en&quot; | &quot;ru&quot;; function getDict(lng: lang): any { switch (lng) { case 'ru': return ru; case 'stringNotInLangType': return en; } }"><pre class="notranslate"><span class="pl-s1">type</span> <span class="pl-s1">lang</span> <span class="pl-c1">=</span> <span class="pl-s">"en"</span> <span class="pl-c1">|</span> <span class="pl-s">"ru"</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-en">getDict</span><span class="pl-kos">(</span><span class="pl-s1">lng</span>: <span class="pl-s1">lang</span><span class="pl-kos">)</span>: <span class="pl-s1">any</span> <span class="pl-kos">{</span> <span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-s1">lng</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">case</span> <span class="pl-s">'ru'</span>: <span class="pl-k">return</span> <span class="pl-s1">ru</span><span class="pl-kos">;</span> <span class="pl-k">case</span> <span class="pl-s">'stringNotInLangType'</span>: <span class="pl-k">return</span> <span class="pl-s1">en</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">compiler should throw error, cause</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" case 'stringNotInLangType': return en;"><pre class="notranslate"> <span class="pl-s1">case</span> <span class="pl-s">'stringNotInLangType'</span>: <span class="pl-k">return</span> <span class="pl-s1">en</span><span class="pl-kos">;</span></pre></div> <p dir="auto">is unreachable</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type foo = 'hey' | 'nay'; switch (&lt;foo&gt;undefined) { case 'boom': console.log('never the case'); break; // expected unreachable code, actual no problem }"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">foo</span> <span class="pl-c1">=</span> <span class="pl-s">'hey'</span> <span class="pl-c1">|</span> <span class="pl-s">'nay'</span><span class="pl-kos">;</span> <span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-kos">&lt;</span><span class="pl-smi">foo</span><span class="pl-kos">&gt;</span><span class="pl-c1">undefined</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">case</span> <span class="pl-s">'boom'</span>: <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'never the case'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">break</span><span class="pl-kos">;</span> <span class="pl-c">// expected unreachable code, actual no problem</span> <span class="pl-kos">}</span></pre></div>
1
<p dir="auto">I'm using Firefox ESR 45.1.1 on GNU / Linux Debian 64-bit, testing.</p> <p dir="auto">I cannot place my cursor wherever I want to and not only that; if I press "Enter" key, instead of taking me on the next line, it skips 1 extra line.</p> <p dir="auto">Also, when this issue happens, the tab key stops working properly; it moves only at a single tab click and nothing more.</p> <p dir="auto">UPDATE: I have also noticed that Ctrl - arrow-left or arrow-right does not nagivate beyond two or three columns before it jumps to the immediate next line.</p> <p dir="auto">Is it something that has to do with code-completion mechanism?<br> END_OF_UPDATE</p> <p dir="auto">It happens on each test and at first I thought it was my idea.</p> <p dir="auto">Any suggestions?</p> <p dir="auto">Cheers.</p>
<p dir="auto">In all the exercises, we the users are forced to press the enter key before writing any code.</p> <hr> <h4 dir="auto">Update:</h4> <p dir="auto">We have locked the conversation temporarily on this thread to collaborators only, this has been resolved in staging, and will be live soon.</p> <p dir="auto">The fix can be confirmed on the beta website.</p> <p dir="auto">The workaround currently on production website is:<br> Press the <kbd>Enter</kbd> key on the challenge editor and then proceed with the challenge.</p> <p dir="auto">Apologies for the inconvenience meanwhile.</p> <p dir="auto">Reach us in the chat room if you need any assistance.</p>
1
<p dir="auto">Here's a <a href="https://github.com/thomasleveil/fastapi/tree/file_and_form_together">branch</a> with my use case:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from starlette.testclient import TestClient from fastapi import FastAPI, File, Form app = FastAPI() @app.post(&quot;/file_before_form&quot;) def file_before_form( file: bytes = File(...), city: str = Form(...), ): return {&quot;file_content&quot;: file, &quot;city&quot;: city} @app.post(&quot;/file_after_form&quot;) def file_after_form( city: str = Form(...), file: bytes = File(...), ): return {&quot;file_content&quot;: file, &quot;city&quot;: city} client = TestClient(app) def test_file_before_form(): response = client.post( &quot;/file_before_form&quot;, data={&quot;city&quot;: &quot;Thimphou&quot;}, files={&quot;file&quot;: &quot;&lt;file content&gt;&quot;} ) assert response.status_code == 200, response.text assert response.json() == {&quot;file_content&quot;: &quot;&lt;file content&gt;&quot;, &quot;city&quot;: &quot;Thimphou&quot;} def test_file_after_form(): response = client.post( &quot;/file_after_form&quot;, data={&quot;city&quot;: &quot;Thimphou&quot;}, files={&quot;file&quot;: &quot;&lt;file content&gt;&quot;} ) assert response.status_code == 200, response.text # &lt;-------------- this fails since ab2b86f assert response.json() == {&quot;file_content&quot;: &quot;&lt;file content&gt;&quot;, &quot;city&quot;: &quot;Thimphou&quot;} "><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">starlette</span>.<span class="pl-s1">testclient</span> <span class="pl-k">import</span> <span class="pl-v">TestClient</span> <span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">FastAPI</span>, <span class="pl-v">File</span>, <span class="pl-v">Form</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>() <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">post</span>(<span class="pl-s">"/file_before_form"</span>)</span> <span class="pl-k">def</span> <span class="pl-en">file_before_form</span>( <span class="pl-s1">file</span>: <span class="pl-s1">bytes</span> <span class="pl-c1">=</span> <span class="pl-v">File</span>(...), <span class="pl-s1">city</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-v">Form</span>(...), ): <span class="pl-k">return</span> {<span class="pl-s">"file_content"</span>: <span class="pl-s1">file</span>, <span class="pl-s">"city"</span>: <span class="pl-s1">city</span>} <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">post</span>(<span class="pl-s">"/file_after_form"</span>)</span> <span class="pl-k">def</span> <span class="pl-en">file_after_form</span>( <span class="pl-s1">city</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-v">Form</span>(...), <span class="pl-s1">file</span>: <span class="pl-s1">bytes</span> <span class="pl-c1">=</span> <span class="pl-v">File</span>(...), ): <span class="pl-k">return</span> {<span class="pl-s">"file_content"</span>: <span class="pl-s1">file</span>, <span class="pl-s">"city"</span>: <span class="pl-s1">city</span>} <span class="pl-s1">client</span> <span class="pl-c1">=</span> <span class="pl-v">TestClient</span>(<span class="pl-s1">app</span>) <span class="pl-k">def</span> <span class="pl-en">test_file_before_form</span>(): <span class="pl-s1">response</span> <span class="pl-c1">=</span> <span class="pl-s1">client</span>.<span class="pl-en">post</span>( <span class="pl-s">"/file_before_form"</span>, <span class="pl-s1">data</span><span class="pl-c1">=</span>{<span class="pl-s">"city"</span>: <span class="pl-s">"Thimphou"</span>}, <span class="pl-s1">files</span><span class="pl-c1">=</span>{<span class="pl-s">"file"</span>: <span class="pl-s">"&lt;file content&gt;"</span>} ) <span class="pl-k">assert</span> <span class="pl-s1">response</span>.<span class="pl-s1">status_code</span> <span class="pl-c1">==</span> <span class="pl-c1">200</span>, <span class="pl-s1">response</span>.<span class="pl-s1">text</span> <span class="pl-k">assert</span> <span class="pl-s1">response</span>.<span class="pl-en">json</span>() <span class="pl-c1">==</span> {<span class="pl-s">"file_content"</span>: <span class="pl-s">"&lt;file content&gt;"</span>, <span class="pl-s">"city"</span>: <span class="pl-s">"Thimphou"</span>} <span class="pl-k">def</span> <span class="pl-en">test_file_after_form</span>(): <span class="pl-s1">response</span> <span class="pl-c1">=</span> <span class="pl-s1">client</span>.<span class="pl-en">post</span>( <span class="pl-s">"/file_after_form"</span>, <span class="pl-s1">data</span><span class="pl-c1">=</span>{<span class="pl-s">"city"</span>: <span class="pl-s">"Thimphou"</span>}, <span class="pl-s1">files</span><span class="pl-c1">=</span>{<span class="pl-s">"file"</span>: <span class="pl-s">"&lt;file content&gt;"</span>} ) <span class="pl-k">assert</span> <span class="pl-s1">response</span>.<span class="pl-s1">status_code</span> <span class="pl-c1">==</span> <span class="pl-c1">200</span>, <span class="pl-s1">response</span>.<span class="pl-s1">text</span> <span class="pl-c"># &lt;-------------- this fails since ab2b86f</span> <span class="pl-k">assert</span> <span class="pl-s1">response</span>.<span class="pl-en">json</span>() <span class="pl-c1">==</span> {<span class="pl-s">"file_content"</span>: <span class="pl-s">"&lt;file content&gt;"</span>, <span class="pl-s">"city"</span>: <span class="pl-s">"Thimphou"</span>}</pre></div> <h3 dir="auto">Description</h3> <p dir="auto">Upgrading FastApi from 0.42.0 to 0.61.0 on one of my project, I stumbled upon a regression in which FastApi will respond with HTTP Error 422 when ever posting a form-data request to an endpoint where a <code class="notranslate">File</code> is declared <strong>after</strong> a <code class="notranslate">Form</code>.</p> <p dir="auto">Searching the Internet, I found another user suffering from this issue : <a href="https://stackoverflow.com/questions/61376754/fastapi-files-must-be-loaded-before-form-in-function-parameters" rel="nofollow">https://stackoverflow.com/questions/61376754/fastapi-files-must-be-loaded-before-form-in-function-parameters</a></p> <p dir="auto">I've created a branch with tests to showcase the issue : <a href="https://github.com/thomasleveil/fastapi/tree/file_and_form_together">https://github.com/thomasleveil/fastapi/tree/file_and_form_together</a></p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>OS: Linux</li> <li>FastAPI Version 0.44.1 and later</li> <li>Python version: 3.8.5</li> </ul> <h3 dir="auto">Additional context</h3> <p dir="auto">I've bisected the repo and figured out the regression was introduced in commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tiangolo/fastapi/commit/ab2b86fe2ce8fe15e91aaec179438e24ff7b7ed0/hovercard" href="https://github.com/tiangolo/fastapi/commit/ab2b86fe2ce8fe15e91aaec179438e24ff7b7ed0"><tt>ab2b86f</tt></a></p>
<h3 dir="auto">First check</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I added a very descriptive title to this issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already read and followed all the tutorial in the docs and didn't find an answer.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/samuelcolvin/pydantic">Pydantic</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/swagger-api/swagger-ui">Swagger UI</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/Redocly/redoc">ReDoc</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> After submitting this, I commit to one of: <ul dir="auto"> <li>Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.</li> <li>I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.</li> <li>Implement a Pull Request for a confirmed bug.</li> </ul> </li> </ul> <h3 dir="auto">Description + Example</h3> <p dir="auto">I have an endpoint that returns an instance of this <code class="notranslate">Container</code> class, which has a list as one of its attributes, called <code class="notranslate">items</code>.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import logging from pydantic import BaseModel, Field from typing import List class Container(BaseModel): items: List[int] = Field(default_factory=list) def __init__(self, **data): logging.debug(f'Init-ing Container with {data}') super().__init__(**data) # At runtime, compute some value and add to the list self.items.append(99)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">logging</span> <span class="pl-k">from</span> <span class="pl-s1">pydantic</span> <span class="pl-k">import</span> <span class="pl-v">BaseModel</span>, <span class="pl-v">Field</span> <span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">List</span> <span class="pl-k">class</span> <span class="pl-v">Container</span>(<span class="pl-v">BaseModel</span>): <span class="pl-s1">items</span>: <span class="pl-v">List</span>[<span class="pl-s1">int</span>] <span class="pl-c1">=</span> <span class="pl-v">Field</span>(<span class="pl-s1">default_factory</span><span class="pl-c1">=</span><span class="pl-s1">list</span>) <span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-c1">**</span><span class="pl-s1">data</span>): <span class="pl-s1">logging</span>.<span class="pl-en">debug</span>(<span class="pl-s">f'Init-ing Container with <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">data</span><span class="pl-kos">}</span></span>'</span>) <span class="pl-en">super</span>().<span class="pl-en">__init__</span>(<span class="pl-c1">**</span><span class="pl-s1">data</span>) <span class="pl-c"># At runtime, compute some value and add to the list</span> <span class="pl-s1">self</span>.<span class="pl-s1">items</span>.<span class="pl-en">append</span>(<span class="pl-c1">99</span>)</pre></div> <p dir="auto">As shown, I overrode the <code class="notranslate">__init__</code> because I have to "internally" modify the list after instantiation (same as in the <a href="https://pydantic-docs.helpmanual.io/usage/models/#private-model-attributes" rel="nofollow">Private Model Attributes</a> section of the Pydantic docs). I'm also using the <a href="https://pydantic-docs.helpmanual.io/usage/models/#field-with-dynamic-default-value" rel="nofollow"><code class="notranslate">Field(default_factory=list)</code></a> to make sure each instance creates its own list.</p> <p dir="auto">Testing the class on its own works as expected:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="container_1 = Container(items=[1, 2, 3]) logging.debug(container_1.items) container_2 = Container(items=[4, 5, 6]) logging.debug(container_2.items) logging.debug(f'{id(container_1.items)}, {id(container_2.items)}') assert id(container_1.items) != id(container_2.items)"><pre class="notranslate"><span class="pl-s1">container_1</span> <span class="pl-c1">=</span> <span class="pl-v">Container</span>(<span class="pl-s1">items</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>]) <span class="pl-s1">logging</span>.<span class="pl-en">debug</span>(<span class="pl-s1">container_1</span>.<span class="pl-s1">items</span>) <span class="pl-s1">container_2</span> <span class="pl-c1">=</span> <span class="pl-v">Container</span>(<span class="pl-s1">items</span><span class="pl-c1">=</span>[<span class="pl-c1">4</span>, <span class="pl-c1">5</span>, <span class="pl-c1">6</span>]) <span class="pl-s1">logging</span>.<span class="pl-en">debug</span>(<span class="pl-s1">container_2</span>.<span class="pl-s1">items</span>) <span class="pl-s1">logging</span>.<span class="pl-en">debug</span>(<span class="pl-s">f'<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-en">id</span>(<span class="pl-s1">container_1</span>.<span class="pl-s1">items</span>)<span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-en">id</span>(<span class="pl-s1">container_2</span>.<span class="pl-s1">items</span>)<span class="pl-kos">}</span></span>'</span>) <span class="pl-k">assert</span> <span class="pl-en">id</span>(<span class="pl-s1">container_1</span>.<span class="pl-s1">items</span>) <span class="pl-c1">!=</span> <span class="pl-en">id</span>(<span class="pl-s1">container_2</span>.<span class="pl-s1">items</span>)</pre></div> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[2020-11-17 08:58:24.713] root:DEBUG Init-ing Container with {'items': [1, 2, 3]} [2020-11-17 08:58:24.713] root:DEBUG [1, 2, 3, 99] [2020-11-17 08:58:24.713] root:DEBUG Init-ing Container with {'items': [4, 5, 6]} [2020-11-17 08:58:24.713] root:DEBUG [4, 5, 6, 99] [2020-11-17 09:43:22.566] root:DEBUG 4481341504, 4481418560"><pre class="notranslate">[2020-11-17 08:58:24.713] root:DEBUG Init-ing Container with {<span class="pl-s"><span class="pl-pds">'</span>items<span class="pl-pds">'</span></span>: [1, 2, 3]} [2020-11-17 08:58:24.713] root:DEBUG [1, 2, 3, 99] [2020-11-17 08:58:24.713] root:DEBUG Init-ing Container with {<span class="pl-s"><span class="pl-pds">'</span>items<span class="pl-pds">'</span></span>: [4, 5, 6]} [2020-11-17 08:58:24.713] root:DEBUG [4, 5, 6, 99] [2020-11-17 09:43:22.566] root:DEBUG 4481341504, 4481418560</pre></div> <p dir="auto">Now, I set it as a <a href="https://fastapi.tiangolo.com/tutorial/response-model/" rel="nofollow">response_model</a> to one of my endpoints:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@api.get('/things', response_model=Container) def get_things(): return Container(items=[1, 2, 3])"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">api</span>.<span class="pl-en">get</span>(<span class="pl-s">'/things'</span>, <span class="pl-s1">response_model</span><span class="pl-c1">=</span><span class="pl-v">Container</span>)</span> <span class="pl-k">def</span> <span class="pl-en">get_things</span>(): <span class="pl-k">return</span> <span class="pl-v">Container</span>(<span class="pl-s1">items</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>])</pre></div> <p dir="auto">The response I get however has a duplicate <code class="notranslate">99</code> value:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6091865/99323517-c2f59c80-28b5-11eb-80fe-bbfb2291a732.png"><img src="https://user-images.githubusercontent.com/6091865/99323517-c2f59c80-28b5-11eb-80fe-bbfb2291a732.png" alt="Screen Shot 2020-11-17 at 9 17 23" style="max-width: 100%;"></a></p> <p dir="auto">This seems to indicate that the <code class="notranslate">__init__</code> was called <strong>twice</strong> on the same object? It's somehow related to the <a href="https://stackoverflow.com/q/1132941/2745495" rel="nofollow">Mutable Default Argument</a> problem. Hitting the endpoint multiple times does not keep adding <code class="notranslate">99</code>, so it seems it is still partially correct that it instantiates a new object, but seems to call <code class="notranslate">__init__</code> twice.</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[2020-11-17 09:23:08.501] root:DEBUG Init-ing Container with {'items': [1, 2, 3]} [2020-11-17 09:23:08.502] root:DEBUG Init-ing Container with {'items': [1, 2, 3, 99]}"><pre class="notranslate">[2020-11-17 09:23:08.501] root:DEBUG Init-ing Container with {<span class="pl-s"><span class="pl-pds">'</span>items<span class="pl-pds">'</span></span>: [1, 2, 3]} [2020-11-17 09:23:08.502] root:DEBUG Init-ing Container with {<span class="pl-s"><span class="pl-pds">'</span>items<span class="pl-pds">'</span></span>: [1, 2, 3, 99]}</pre></div> <p dir="auto">But testing the class on its own does not have this issue, and my endpoint is instantiating the class only once here. So, what am I doing wrong here?</p> <p dir="auto">Now, if I use instead the <a href="https://fastapi.tiangolo.com/advanced/additional-responses/" rel="nofollow">responses</a> parameter:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@api.get('/things', responses={200: {'model': Container}}) def get_things(): return Container(items=[1, 2, 3])"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">api</span>.<span class="pl-en">get</span>(<span class="pl-s">'/things'</span>, <span class="pl-s1">responses</span><span class="pl-c1">=</span>{<span class="pl-c1">200</span>: {<span class="pl-s">'model'</span>: <span class="pl-v">Container</span>}})</span> <span class="pl-k">def</span> <span class="pl-en">get_things</span>(): <span class="pl-k">return</span> <span class="pl-v">Container</span>(<span class="pl-s1">items</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>])</pre></div> <p dir="auto">I get the correct response:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6091865/99324030-b9b8ff80-28b6-11eb-8258-92921c28ba5b.png"><img src="https://user-images.githubusercontent.com/6091865/99324030-b9b8ff80-28b6-11eb-8258-92921c28ba5b.png" alt="Screen Shot 2020-11-17 at 9 24 10" style="max-width: 100%;"></a></p> <p dir="auto">And the logs correctly show only one instantiation:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2020-11-17 09:23:59.786] root:DEBUG Init-ing Container with {'items': [1, 2, 3]}"><pre class="notranslate"><code class="notranslate">[2020-11-17 09:23:59.786] root:DEBUG Init-ing Container with {'items': [1, 2, 3]} </code></pre></div> <p dir="auto">So, what is wrong with my usage of the <code class="notranslate">response_model</code> parameter?</p> <p dir="auto">As for the Swagger/OpenAPI schema, using either <code class="notranslate">response_model</code> or <code class="notranslate">responses</code> show the current schema in the docs, so no problem/difference there. Also, I'm actually not sure if this is a Pydantic or FastAPI issue, but using just the class <em>outside of an endpoint</em> that does not show this problem. So I figure, it's related to being used as a <code class="notranslate">response_model</code>.</p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>OS: <strong>macOS 10.15.7</strong></li> <li>FastAPI Version: <strong>0.61.2</strong></li> <li>Pydantic Version: <strong>1.7.2</strong></li> <li>Python Version: <strong>3.8.6</strong></li> </ul>
0
<p dir="auto">I ran into this error while playing with Rust, it told me to make a bug report:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="src/dynamics/simple_dynamics.rs:52:17: 52:25 error: internal compiler error: debuginfo::create_local_var_metadata() - Referenced variable location is not an alloca! src/dynamics/simple_dynamics.rs:52 let body_mut = rc::get_mut(body).unwrap(); ^~~~~~~~ note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:123 stack backtrace: 1: 0x108c99220 - sys::backtrace::write::hc95aae63c60abfc60Jt 2: 0x108cb98e7 - failure::on_fail::hc127add6dd357cc5e0z 3: 0x108c29fda - rt::unwind::begin_unwind_inner::hdbf43425f18437c6FHz 4: 0x106b34307 - rt::unwind::begin_unwind::h3355969672767655914 5: 0x106b34294 - diagnostic::SpanHandler::span_bug::hea7ee9aa261e288cr2F 6: 0x105fbacad - session::Session::span_bug::hdfbd47445f72bab9eVn 7: 0x10575b51e - middle::pat_util::pat_bindings::closure.49320 8: 0x106afeb61 - ast_util::walk_pat::h7d3cad2bd4c87dbfTBC 9: 0x10564a2d0 - trans::controlflow::trans_block::h5d0744ec09805d679Zd 10: 0x105691c3f - trans::expr::trans_rvalue_stmt_unadjusted::h59279501085e6932y4i 11: 0x105649b24 - trans::expr::trans_into::h44e9352c5eb030daFGh 12: 0x10564a4c6 - trans::controlflow::trans_block::h5d0744ec09805d679Zd 13: 0x105707697 - trans::base::trans_closure::h83ded929acc2e866deu 14: 0x10563e976 - trans::base::trans_fn::h91abc7c09fbef750upu 15: 0x10563abac - trans::base::trans_item::h23d355b70575f043AKu 16: 0x105708dd9 - trans::base::trans_mod::h21384f26cbb919756Pu 17: 0x10563ad6e - trans::base::trans_item::h23d355b70575f043AKu 18: 0x105708dd9 - trans::base::trans_mod::h21384f26cbb919756Pu 19: 0x10563ad6e - trans::base::trans_item::h23d355b70575f043AKu 20: 0x10570e178 - trans::base::trans_crate::h73c2bbef83961cfeRGv 21: 0x10540d3bf - driver::phase_4_translate_to_llvm::h50f0f13e625a634f2Ca 22: 0x1053e5463 - driver::compile_input::h258f407dd8455477wba 23: 0x105583e5d - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h8883338591471054833 24: 0x105580770 - rt::unwind::try::try_fn::h8230218938911070377 25: 0x108d21229 - rust_try_inner 26: 0x108d21216 - rust_try 27: 0x105580e6b - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h14505686894590603956 28: 0x108ca8dc4 - sys::thread::thread_start::h2cb22211a4c7d938vFw 29: 0x7fff8fb792fc - _pthread_body 30: 0x7fff8fb79279 - _pthread_body"><pre class="notranslate"><code class="notranslate">src/dynamics/simple_dynamics.rs:52:17: 52:25 error: internal compiler error: debuginfo::create_local_var_metadata() - Referenced variable location is not an alloca! src/dynamics/simple_dynamics.rs:52 let body_mut = rc::get_mut(body).unwrap(); ^~~~~~~~ note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:123 stack backtrace: 1: 0x108c99220 - sys::backtrace::write::hc95aae63c60abfc60Jt 2: 0x108cb98e7 - failure::on_fail::hc127add6dd357cc5e0z 3: 0x108c29fda - rt::unwind::begin_unwind_inner::hdbf43425f18437c6FHz 4: 0x106b34307 - rt::unwind::begin_unwind::h3355969672767655914 5: 0x106b34294 - diagnostic::SpanHandler::span_bug::hea7ee9aa261e288cr2F 6: 0x105fbacad - session::Session::span_bug::hdfbd47445f72bab9eVn 7: 0x10575b51e - middle::pat_util::pat_bindings::closure.49320 8: 0x106afeb61 - ast_util::walk_pat::h7d3cad2bd4c87dbfTBC 9: 0x10564a2d0 - trans::controlflow::trans_block::h5d0744ec09805d679Zd 10: 0x105691c3f - trans::expr::trans_rvalue_stmt_unadjusted::h59279501085e6932y4i 11: 0x105649b24 - trans::expr::trans_into::h44e9352c5eb030daFGh 12: 0x10564a4c6 - trans::controlflow::trans_block::h5d0744ec09805d679Zd 13: 0x105707697 - trans::base::trans_closure::h83ded929acc2e866deu 14: 0x10563e976 - trans::base::trans_fn::h91abc7c09fbef750upu 15: 0x10563abac - trans::base::trans_item::h23d355b70575f043AKu 16: 0x105708dd9 - trans::base::trans_mod::h21384f26cbb919756Pu 17: 0x10563ad6e - trans::base::trans_item::h23d355b70575f043AKu 18: 0x105708dd9 - trans::base::trans_mod::h21384f26cbb919756Pu 19: 0x10563ad6e - trans::base::trans_item::h23d355b70575f043AKu 20: 0x10570e178 - trans::base::trans_crate::h73c2bbef83961cfeRGv 21: 0x10540d3bf - driver::phase_4_translate_to_llvm::h50f0f13e625a634f2Ca 22: 0x1053e5463 - driver::compile_input::h258f407dd8455477wba 23: 0x105583e5d - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h8883338591471054833 24: 0x105580770 - rt::unwind::try::try_fn::h8230218938911070377 25: 0x108d21229 - rust_try_inner 26: 0x108d21216 - rust_try 27: 0x105580e6b - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h14505686894590603956 28: 0x108ca8dc4 - sys::thread::thread_start::h2cb22211a4c7d938vFw 29: 0x7fff8fb792fc - _pthread_body 30: 0x7fff8fb79279 - _pthread_body </code></pre></div> <p dir="auto">This only happened when I added this line to help me debug:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="panic!(&quot;STRONG REF COUNT: {}&quot;, rc::strong_count(body)); // &lt;- Causes the compiler error let body_mut = rc::get_mut(body).unwrap();"><pre class="notranslate"><code class="notranslate">panic!("STRONG REF COUNT: {}", rc::strong_count(body)); // &lt;- Causes the compiler error let body_mut = rc::get_mut(body).unwrap(); </code></pre></div> <p dir="auto">This is the output from <code class="notranslate">rustc --version --verbose</code>, I am currently on Mac OS X Yosemite:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 0.13.0-nightly (5ba610265 2014-12-25 18:01:36 +0000) binary: rustc commit-hash: 5ba6102657a892457063d2d6a7cbb9632ce282c6 commit-date: 2014-12-25 18:01:36 +0000 host: x86_64-apple-darwin release: 0.13.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 0.13.0-nightly (5ba610265 2014-12-25 18:01:36 +0000) binary: rustc commit-hash: 5ba6102657a892457063d2d6a7cbb9632ce282c6 commit-date: 2014-12-25 18:01:36 +0000 host: x86_64-apple-darwin release: 0.13.0-nightly </code></pre></div>
<p dir="auto">This little program causes a compiler panic:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() { return; let a = &quot;&quot;; }"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span><span class="pl-kos">;</span> <span class="pl-k">let</span> a = <span class="pl-s">""</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">The error message is the following:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: debuginfo::create_local_var_metadata() - Referenced variable location is not an alloca! thread 'rustc' panicked at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:123 stack backtrace: 1: 0x1110d3460 - sys::backtrace::write::hd64c72d07de40cf8tbt 2: 0x1110f3817 - failure::on_fail::h646e1201dbb0ef3bNhz 3: 0x11106570a - rt::unwind::begin_unwind_inner::hec294e47b94ba78aiZy 4: 0x10ef6fc57 - rt::unwind::begin_unwind::h558350071601703502 5: 0x10ef6fbe4 - diagnostic::SpanHandler::span_bug::he3912bc404042fc4LQF 6: 0x10e40930d - session::Session::span_bug::h5801ed3acd26a48eY4l 7: 0x10dbbfa8e - middle::pat_util::pat_bindings::closure.48598 8: 0x10ef3a3f1 - ast_util::walk_pat::hbe1ce29526693031GsC 9: 0x10daafca0 - trans::controlflow::trans_block::h956d3c669c21aa441Vd 10: 0x10db6c487 - trans::base::trans_closure::h98002b90cdeb7941jSt 11: 0x10daa4326 - trans::base::trans_fn::h68450a8b056829a432t 12: 0x10da9faec - trans::base::trans_item::h8a58a6cf2c6184c8Vnu 13: 0x10db72f18 - trans::base::trans_crate::h35254e15f256e4f14iv 14: 0x10d870560 - driver::phase_4_translate_to_llvm::h2943144b3698b013mDa 15: 0x10d8478b3 - driver::compile_input::hd01e9035001db87cwba 16: 0x10d9e5d54 - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h356901253070274503 17: 0x10d9e2670 - rt::unwind::try::try_fn::h13338831715023405046 18: 0x11115b029 - rust_try_inner 19: 0x11115b016 - rust_try 20: 0x10d9e2d6b - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h15972762549593096795 21: 0x1110e2de4 - sys::thread::thread_start::h719786e0e5fa53d4b1v 22: 0x7fff8e9742fc - _pthread_body 23: 0x7fff8e974279 - _pthread_body"><pre class="notranslate"><code class="notranslate">error: internal compiler error: debuginfo::create_local_var_metadata() - Referenced variable location is not an alloca! thread 'rustc' panicked at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:123 stack backtrace: 1: 0x1110d3460 - sys::backtrace::write::hd64c72d07de40cf8tbt 2: 0x1110f3817 - failure::on_fail::h646e1201dbb0ef3bNhz 3: 0x11106570a - rt::unwind::begin_unwind_inner::hec294e47b94ba78aiZy 4: 0x10ef6fc57 - rt::unwind::begin_unwind::h558350071601703502 5: 0x10ef6fbe4 - diagnostic::SpanHandler::span_bug::he3912bc404042fc4LQF 6: 0x10e40930d - session::Session::span_bug::h5801ed3acd26a48eY4l 7: 0x10dbbfa8e - middle::pat_util::pat_bindings::closure.48598 8: 0x10ef3a3f1 - ast_util::walk_pat::hbe1ce29526693031GsC 9: 0x10daafca0 - trans::controlflow::trans_block::h956d3c669c21aa441Vd 10: 0x10db6c487 - trans::base::trans_closure::h98002b90cdeb7941jSt 11: 0x10daa4326 - trans::base::trans_fn::h68450a8b056829a432t 12: 0x10da9faec - trans::base::trans_item::h8a58a6cf2c6184c8Vnu 13: 0x10db72f18 - trans::base::trans_crate::h35254e15f256e4f14iv 14: 0x10d870560 - driver::phase_4_translate_to_llvm::h2943144b3698b013mDa 15: 0x10d8478b3 - driver::compile_input::hd01e9035001db87cwba 16: 0x10d9e5d54 - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h356901253070274503 17: 0x10d9e2670 - rt::unwind::try::try_fn::h13338831715023405046 18: 0x11115b029 - rust_try_inner 19: 0x11115b016 - rust_try 20: 0x10d9e2d6b - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h15972762549593096795 21: 0x1110e2de4 - sys::thread::thread_start::h719786e0e5fa53d4b1v 22: 0x7fff8e9742fc - _pthread_body 23: 0x7fff8e974279 - _pthread_body </code></pre></div>
1
<p dir="auto">No known steps to reproduce and unclear whether this actually affects users (since the Flutter app seems to be dead already).</p> <p dir="auto">The crash collector reported the following stack trace in logcat:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.AssertionError at io.flutter.view.FlutterView.assertAttached(FlutterView.java:537) at io.flutter.view.FlutterView$3.reply(FlutterView.java:679) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:194) at io.flutter.plugins.googlesignin.GoogleSignInPlugin$Delegate$3.run(GoogleSignInPlugin.java:264)"><pre class="notranslate"><code class="notranslate">java.lang.AssertionError at io.flutter.view.FlutterView.assertAttached(FlutterView.java:537) at io.flutter.view.FlutterView$3.reply(FlutterView.java:679) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:194) at io.flutter.plugins.googlesignin.GoogleSignInPlugin$Delegate$3.run(GoogleSignInPlugin.java:264) </code></pre></div>
<p dir="auto"><a href="https://github.com/flutter/engine/blob/51f12604f7aec7e425be41f56ce8637a948dfa3d/shell/common/engine.cc#L517">https://github.com/flutter/engine/blob/51f12604f7aec7e425be41f56ce8637a948dfa3d/shell/common/engine.cc#L517</a><br> -&gt; <a href="https://github.com/flutter/engine/blob/51f12604f7aec7e425be41f56ce8637a948dfa3d/shell/platform/android/platform_view_android.cc#L358">https://github.com/flutter/engine/blob/51f12604f7aec7e425be41f56ce8637a948dfa3d/shell/platform/android/platform_view_android.cc#L358</a><br> -&gt; <a href="https://github.com/flutter/engine/blob/51f12604f7aec7e425be41f56ce8637a948dfa3d/shell/platform/android/io/flutter/view/FlutterView.java#L683">https://github.com/flutter/engine/blob/51f12604f7aec7e425be41f56ce8637a948dfa3d/shell/platform/android/io/flutter/view/FlutterView.java#L683</a></p> <p dir="auto">That code path can trigger when the flutter view has been detached, which in turn implies that the flutter view has been destroyed by Android. This was observed in the GoogleSignIn plugin, where the plugin triggers an OEM-widget-based sign-in flow. The Android OS reserves the right to destroy your view whenever it needs to to free up resources (and will re-create it as necessary), so it's valid for a full-screen sign-in flow to trigger the disposal of your FlutterView (followed by a re-creation when the sign-in completes).</p>
1
<p dir="auto">Looks like boot path is using unix specific platform functions to implement the UID 0 check, and not checking to see if it's actually running on unix first:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): + CategoryInfo : NotSpecified: (Traceback (most recent call last)::String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError + PSComputerName : localhost File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\Scripts\celery-script.py&quot;, line 9, in &lt;module&gt; load_entry_point('celery==3.1.5', 'console_scripts', 'celery')() File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\__main__.py&quot;, line 29, in main main() File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\celery.py&quot;, line 80, in main cmd.execute_from_commandline(argv) File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\celery.py&quot;, line 725, in execute_from_commandline super(CeleryCommand, self).execute_from_commandline(argv))) File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\base.py&quot;, line 300, in execute_from_commandline return self.handle_argv(self.prog_name, argv[1:]) File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\celery.py&quot;, line 717, in handle_argv return self.execute(command, argv) File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\celery.py&quot;, line 671, in execute ).run_from_argv(self.prog_name, argv[1:], command=argv[0]) File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\worker.py&quot;, line 174, in run_from_argv return self(*args, **options) File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\base.py&quot;, line 263, in __call__ ret = self.run(*args, **kwargs) File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\worker.py&quot;, line 185, in run maybe_drop_privileges(uid=uid, gid=gid) File &quot;C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\platforms.py&quot;, line 496, in maybe_drop_privileges if os.geteuid(): AttributeError: 'module' object has no attribute 'geteuid'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): + CategoryInfo : NotSpecified: (Traceback (most recent call last)::String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError + PSComputerName : localhost File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\Scripts\celery-script.py", line 9, in &lt;module&gt; load_entry_point('celery==3.1.5', 'console_scripts', 'celery')() File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\__main__.py", line 29, in main main() File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\celery.py", line 80, in main cmd.execute_from_commandline(argv) File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\celery.py", line 725, in execute_from_commandline super(CeleryCommand, self).execute_from_commandline(argv))) File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\base.py", line 300, in execute_from_commandline return self.handle_argv(self.prog_name, argv[1:]) File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\celery.py", line 717, in handle_argv return self.execute(command, argv) File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\celery.py", line 671, in execute ).run_from_argv(self.prog_name, argv[1:], command=argv[0]) File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\worker.py", line 174, in run_from_argv return self(*args, **options) File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\base.py", line 263, in __call__ ret = self.run(*args, **kwargs) File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\bin\worker.py", line 185, in run maybe_drop_privileges(uid=uid, gid=gid) File "C:\Users\John Krukoff\Documents\Pearson\nibiru\api\virtualenv\lib\site-packages\celery\platforms.py", line 496, in maybe_drop_privileges if os.geteuid(): AttributeError: 'module' object has no attribute 'geteuid' </code></pre></div> <p dir="auto">When running:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery worker -A nibiru.tasks -b amqp://celery:celery@localhost:5672/nibiru --loglevel=Debug -c 2"><pre class="notranslate"><code class="notranslate">celery worker -A nibiru.tasks -b amqp://celery:celery@localhost:5672/nibiru --loglevel=Debug -c 2 </code></pre></div> <p dir="auto">With python 2.7.5 on Windows 8.1.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;C:\Python27\Scripts\celery-script.py&quot;, line 9, in &lt;module&gt; load_entry_point('celery==3.1.5', 'console_scripts', 'celery')() File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\__main__.py&quot;, line 29, in main main() File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py&quot;, line 80, in main cmd.execute_from_commandline(argv) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py&quot;, line 725, in execute_from_commandline super(CeleryCommand, self).execute_from_commandline(argv))) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\base.py&quot;, line 300, in execute_from_commandline return self.handle_argv(self.prog_name, argv[1:]) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py&quot;, line 717, in handle_argv return self.execute(command, argv) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py&quot;, line 671, in execute ).run_from_argv(self.prog_name, argv[1:], command=argv[0]) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\worker.py&quot;, line 174, in run_from_argv return self(*args, **options) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\base.py&quot;, line 263, in __call__ ret = self.run(*args, **kwargs) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\worker.py&quot;, line 185, in run maybe_drop_privileges(uid=uid, gid=gid) File &quot;C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\platforms.py&quot;, line 496, in maybe_drop_privileges if os.geteuid(): AttributeError: 'module' object has no attribute 'geteuid'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "C:\Python27\Scripts\celery-script.py", line 9, in &lt;module&gt; load_entry_point('celery==3.1.5', 'console_scripts', 'celery')() File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\__main__.py", line 29, in main main() File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py", line 80, in main cmd.execute_from_commandline(argv) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py", line 725, in execute_from_commandline super(CeleryCommand, self).execute_from_commandline(argv))) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\base.py", line 300, in execute_from_commandline return self.handle_argv(self.prog_name, argv[1:]) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py", line 717, in handle_argv return self.execute(command, argv) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\celery.py", line 671, in execute ).run_from_argv(self.prog_name, argv[1:], command=argv[0]) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\worker.py", line 174, in run_from_argv return self(*args, **options) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\base.py", line 263, in __call__ ret = self.run(*args, **kwargs) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\bin\worker.py", line 185, in run maybe_drop_privileges(uid=uid, gid=gid) File "C:\Python27\lib\site-packages\celery-3.1.5-py2.7.egg\celery\platforms.py", line 496, in maybe_drop_privileges if os.geteuid(): AttributeError: 'module' object has no attribute 'geteuid' </code></pre></div>
1
<p dir="auto">It seems the <code class="notranslate">debug!</code> code isn't properly pushing a span onto the macro expansion span stack. This code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn main() { let a = ~&quot;&quot;; debug!(&quot;foo: %s %s&quot;, a); }"><pre class="notranslate"><code class="notranslate">fn main() { let a = ~""; debug!("foo: %s %s", a); } </code></pre></div> <p dir="auto">Only reports the error inside the macro, but not where that macro is getting used:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;core-macros&gt;:33:24: 33:42 error: not enough arguments to fmt! for the given format string &lt;core-macros&gt;:33 __log(4u32, fmt!( $($arg),+ )) ^~~~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">&lt;core-macros&gt;:33:24: 33:42 error: not enough arguments to fmt! for the given format string &lt;core-macros&gt;:33 __log(4u32, fmt!( $($arg),+ )) ^~~~~~~~~~~~~~~~~~ </code></pre></div>
<p dir="auto">If you pass an immutable reference through two structs, one of which is a trait, you can take an immutable reference to a variable that will be mutated later, and the compiler will compile. For a proof of concept, see <a href="https://github.com/GBGamer/rust-test-obfuscating">here</a>, and if you want to see it in an actual use case, see <a href="https://github.com/GBGamer/roguelike-rs/tree/5766312abf1c4eb63281d2aa431349a1eedeb2a6/src">here</a> (look in the main file).</p> <p dir="auto">I don't know if this is an issue or not, it didn't cause any safety issues when I used it. Is there a rust-ier way of doing the type of thing I did in the second example (allow an immutable reference to a value that will be mutated, in order to see the new value).</p>
0
<p dir="auto">My issue is about <strong>test_constant_cost_matrix</strong> located in <strong>scipy/optimize/tests/test_linear_assignment.py</strong></p> <h4 dir="auto">Reproducing code example:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python3 runtests.py -v"><pre class="notranslate"><code class="notranslate">python3 runtests.py -v </code></pre></div> <h4 dir="auto">Error message:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="scipy/optimize/tests/test_linear_assignment.py:102: in test_constant_cost_matrix assert_array_equal(col_ind, np.arange(n)) E AssertionError: E Arrays are not equal E E Mismatched elements: 8 / 8 (100%) E Max absolute difference: 7 E Max relative difference: 5. E x: array([7, 6, 5, 4, 3, 2, 1, 0]) E y: array([0, 1, 2, 3, 4, 5, 6, 7]) "><pre class="notranslate"><code class="notranslate">scipy/optimize/tests/test_linear_assignment.py:102: in test_constant_cost_matrix assert_array_equal(col_ind, np.arange(n)) E AssertionError: E Arrays are not equal E E Mismatched elements: 8 / 8 (100%) E Max absolute difference: 7 E Max relative difference: 5. E x: array([7, 6, 5, 4, 3, 2, 1, 0]) E y: array([0, 1, 2, 3, 4, 5, 6, 7]) </code></pre></div> <h4 dir="auto">Scipy/Numpy/Python version information:</h4> <p dir="auto">python version: 3.8.1<br> numpy version: 1.18.1<br> scipy version: 1.5.0.dev0+2774bec</p>
<p dir="auto">Since many people are working on different parts of this I think we better take out the actual work out of the discussions scattered around.</p> <p dir="auto">Currently Travis matrix is as follows</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ARM - Test Group 1</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ARM - Test Group 2</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Pre-release Dependencies, Source Dist (<strong>-&gt; In Azure now</strong>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Coverage, Full test suite (<strong>--&gt; In Azure now</strong>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Python 3.7 Debug (<strong>--&gt; In GitHub Actions</strong> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="751003324" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/13136" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/13136/hovercard" href="https://github.com/scipy/scipy/pull/13136">#13136</a> )</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Python 3.7 PowerPc</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Pre-release Deps, 64-bit BLAS (<strong>--&gt; In Azure now</strong>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Refguide-check, Latest NumPy (<strong>--&gt; In Azure now</strong>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Source Distribution (<strong>--&gt; In Azure now</strong>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Wheel, Optimised, GCC 4.8 (<strong>--&gt; In Azure now</strong>)</li> </ul> <p dir="auto">Could you please edit, cross and put where the new location is so we don't get conflicts?</p> <p dir="auto">Pinging <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tylerjereddy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tylerjereddy">@tylerjereddy</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mattip/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mattip">@mattip</a> for heads up</p>
0
<h1 dir="auto">Bug report</h1> <p dir="auto">I find a bug about browser back didn't work, and when i import the css ,it work.<br> I provided a <a href="https://github.com/poyiding/next-js-bug-rep">demo</a> to reproduce the problem。</p> <h2 dir="auto">Describe the bug</h2> <ol dir="auto"> <li>click "link about" link to /about/123 page</li> <li>refresh the page, then click browser back, you will find it stop in current page.</li> <li>if you import '../styles/global.css ' in about page and reload page, browser back it work ok.</li> </ol>
<p dir="auto">This is bug report</p> <p dir="auto">Link does not work with css-module imported. That happens when page with Link has no css, and linked page has. No errors in console, so im not sure about reasons, but there is minimal repo to reproduce:<br> <a href="https://github.com/standy/next-css-error">https://github.com/standy/next-css-error</a></p> <p dir="auto">Bug appears in <code class="notranslate">[email protected]</code> + <code class="notranslate">[email protected]</code>,<br> Older <code class="notranslate">[email protected]</code> + <code class="notranslate">[email protected]</code> works fine</p>
1
<p dir="auto">See this example (derived from simple form example):<br> <a href="http://plnkr.co/edit/TyLCDmO5LNYOkflxu2eY?p=preview" rel="nofollow">http://plnkr.co/edit/TyLCDmO5LNYOkflxu2eY?p=preview</a></p> <p dir="auto">It works until you change a line in index.html<br> <code class="notranslate">&lt;script src="https://code.angularjs.org/2.0.0-beta.6/angular2-all.umd.js"&gt;&lt;/script&gt;</code><br> to<br> <code class="notranslate">&lt;script src="https://code.angularjs.org/2.0.0-beta.6/angular2-all.umd.min.js"&gt;&lt;/script&gt;</code></p> <p dir="auto">When changed, the form is not working anymore. Exception is thrown:</p> <blockquote> <p dir="auto">TypeError: Cannot read property 'subscribe' of undefined</p> </blockquote>
<p dir="auto">When using minified bundles with SystemJS, and a simple snippet like this</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &lt;template ngFor #item [ngForOf]=&quot;items&quot; #i=&quot;index&quot;&gt; &lt;li&gt;{{i}}&lt;/li&gt; &lt;li *ngIf=&quot;i % 2 == 0&quot;&gt;number is even&lt;/li&gt; &lt;/template&gt;"><pre class="notranslate"><code class="notranslate"> &lt;template ngFor #item [ngForOf]="items" #i="index"&gt; &lt;li&gt;{{i}}&lt;/li&gt; &lt;li *ngIf="i % 2 == 0"&gt;number is even&lt;/li&gt; &lt;/template&gt; </code></pre></div> <p dir="auto">Will throw</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: this.directive_0_0.ngDoCheck is not a function"><pre class="notranslate"><code class="notranslate">TypeError: this.directive_0_0.ngDoCheck is not a function </code></pre></div> <p dir="auto">This is only reproducible with minified bundles, non-minified work correctly.</p> <p dir="auto">As an example check this <a href="http://plnkr.co/edit/ZWiQqw3nR8xS1MRrpTry?p=preview" rel="nofollow">plnkr</a> (took it from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="125250401" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/6304" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/6304/hovercard?comment_id=170200989&amp;comment_type=issue_comment" href="https://github.com/angular/angular/issues/6304#issuecomment-170200989">#6304 (comment)</a>). To reproduce switch between minified and unminified bundles.</p> <p dir="auto">This is also reproducible with Webpack using this line in the config</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" plugins : [ new webpack.optimize.UglifyJsPlugin() ],"><pre class="notranslate"><code class="notranslate"> plugins : [ new webpack.optimize.UglifyJsPlugin() ], </code></pre></div> <p dir="auto">Am I missing something?</p>
1
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-learn-how-script-tags-and-document-ready-work" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-learn-how-script-tags-and-document-ready-work</a><br> At first, the text in the third instruction is right. But after add the '$(document).ready(function() {', it lost a right bracket after document. In addition, i can't get the last instrcution of 'close' right, this may be my personal fault.</p>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/confirm-the-ending#?solution=function%20end%28str%2C%20target%29%20%7B%0A%20%20return%20str.endsWith%28target%29%3B%0A%7D%0A%0Aend%28%22Bastian%22%2C%20%22n%22%29%3B%0A" rel="nofollow">Confirm the Ending</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.</p> <p dir="auto">My code:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function end(str, target) { return str.endsWith(target); } end(&quot;Bastian&quot;, &quot;n&quot;); "><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">end</span><span class="pl-kos">(</span><span class="pl-s1">str</span><span class="pl-kos">,</span> <span class="pl-s1">target</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">str</span><span class="pl-kos">.</span><span class="pl-en">endsWith</span><span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">end</span><span class="pl-kos">(</span><span class="pl-s">"Bastian"</span><span class="pl-kos">,</span> <span class="pl-s">"n"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">It's not a bug, but I didn't want to post what might be considered a way to cheat. Is using my ridiculously simple solution cheating, or missing the point of the challenge?</p>
0
<h3 dir="auto">Bug report</h3> <p dir="auto">Plotting with string categorical data fails, if the second call to <code class="notranslate">plt.scatter</code> contains categories not present in the first call to <code class="notranslate">plt.scatter</code><br> <strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt plt.scatter([&quot;a&quot;, &quot;b&quot;], [0,2]) plt.scatter([&quot;a&quot;,&quot;c&quot;], [1,4])"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">plt</span>.<span class="pl-en">scatter</span>([<span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>], [<span class="pl-c1">0</span>,<span class="pl-c1">2</span>]) <span class="pl-s1">plt</span>.<span class="pl-en">scatter</span>([<span class="pl-s">"a"</span>,<span class="pl-s">"c"</span>], [<span class="pl-c1">1</span>,<span class="pl-c1">4</span>])</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;xxx/python3.6/site-packages/matplotlib/pyplot.py&quot;, line 3357, in scatter edgecolors=edgecolors, data=data, **kwargs) File &quot;xxx/python3.6/site-packages/matplotlib/__init__.py&quot;, line 1710, in inner return func(ax, *args, **kwargs) File &quot;xxx/python3.6/site-packages/matplotlib/axes/_axes.py&quot;, line 4010, in scatter x = self.convert_xunits(x) File &quot;xxx/python3.6/site-packages/matplotlib/artist.py&quot;, line 191, in convert_xunits return ax.xaxis.convert_units(x) File &quot;xxx/python3.6/site-packages/matplotlib/axis.py&quot;, line 1491, in convert_units ret = self.converter.convert(x, self.units, self) File &quot;xxx/python3.6/site-packages/matplotlib/category.py&quot;, line 53, in convert return vals.astype('float') ValueError: could not convert string to float: 'c'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; File "xxx/python3.6/site-packages/matplotlib/pyplot.py", line 3357, in scatter edgecolors=edgecolors, data=data, **kwargs) File "xxx/python3.6/site-packages/matplotlib/__init__.py", line 1710, in inner return func(ax, *args, **kwargs) File "xxx/python3.6/site-packages/matplotlib/axes/_axes.py", line 4010, in scatter x = self.convert_xunits(x) File "xxx/python3.6/site-packages/matplotlib/artist.py", line 191, in convert_xunits return ax.xaxis.convert_units(x) File "xxx/python3.6/site-packages/matplotlib/axis.py", line 1491, in convert_units ret = self.converter.convert(x, self.units, self) File "xxx/python3.6/site-packages/matplotlib/category.py", line 53, in convert return vals.astype('float') ValueError: could not convert string to float: 'c' </code></pre></div> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/662579/32447797-5d2f9ad8-c30d-11e7-8a67-c5c7ff3c903b.png"><img src="https://user-images.githubusercontent.com/662579/32447797-5d2f9ad8-c30d-11e7-8a67-c5c7ff3c903b.png" alt="figure_1" style="max-width: 100%;"></a></p> <p dir="auto">Figure generated using</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="plt.plot([&quot;a&quot;, &quot;b&quot;], [0,2], &quot;o&quot;) plt.plot([&quot;a&quot;, &quot;c&quot;], [1,4], &quot;o&quot;)"><pre class="notranslate"><span class="pl-s1">plt</span>.<span class="pl-en">plot</span>([<span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>], [<span class="pl-c1">0</span>,<span class="pl-c1">2</span>], <span class="pl-s">"o"</span>) <span class="pl-s1">plt</span>.<span class="pl-en">plot</span>([<span class="pl-s">"a"</span>, <span class="pl-s">"c"</span>], [<span class="pl-c1">1</span>,<span class="pl-c1">4</span>], <span class="pl-s">"o"</span>)</pre></div> <p dir="auto">Using different categories for subsequent calls to <code class="notranslate">plt.plot</code> works as expected.</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: Fedora</li> <li>Matplotlib version: 2.1.0 (installed the manylinux binary wheel via pip)</li> <li>Matplotlib backend: TkAgg</li> <li>Python version: 3.6.2</li> </ul>
<p dir="auto">Alerted to by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/anntzer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/anntzer">@anntzer</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="264362884" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/9350" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/9350/hovercard" href="https://github.com/matplotlib/matplotlib/issues/9350">#9350</a>, the fill_between with all categorical doesn't do an update on the y2 and so the following code:</p> <p dir="auto"><code class="notranslate">plt.fill_between(['a', 'b', 'c'], ['e', 'f', 'g'],['h','i','j'])</code></p> <p dir="auto">Crashes on the lookup:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/projects/matplotlib/lib/matplotlib/artist.py in convert_yunits(self, y) 198 if ax is None or ax.yaxis is None: 199 return y --&gt; 200 return ax.yaxis.convert_units(y) 201 202 @property ~/projects/matplotlib/lib/matplotlib/axis.py in convert_units(self, x) 1489 return x 1490 -&gt; 1491 ret = self.converter.convert(x, self.units, self) 1492 return ret 1493 "><pre class="notranslate"><code class="notranslate">/projects/matplotlib/lib/matplotlib/artist.py in convert_yunits(self, y) 198 if ax is None or ax.yaxis is None: 199 return y --&gt; 200 return ax.yaxis.convert_units(y) 201 202 @property ~/projects/matplotlib/lib/matplotlib/axis.py in convert_units(self, x) 1489 return x 1490 -&gt; 1491 ret = self.converter.convert(x, self.units, self) 1492 return ret 1493 </code></pre></div> <p dir="auto">This seems to be limited to categoricals because dates work as expected:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np import pandas as pd dates = pd.date_range('1990-10-10', '2004-10-10', freq='M') x = np.arange(84) y1 = dates[:84] y2 = dates[84:] plt.fill_between(x, y2, y1)"><pre class="notranslate"><code class="notranslate">import numpy as np import pandas as pd dates = pd.date_range('1990-10-10', '2004-10-10', freq='M') x = np.arange(84) y1 = dates[:84] y2 = dates[84:] plt.fill_between(x, y2, y1) </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1300499/31840038-97bef180-b5b1-11e7-8964-b5da1c009242.png"><img src="https://user-images.githubusercontent.com/1300499/31840038-97bef180-b5b1-11e7-8964-b5da1c009242.png" alt="index" style="max-width: 100%;"></a></p> <p dir="auto">And as <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/anntzer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/anntzer">@anntzer</a> suggested, the axis behavior should be modified such that once units are set on that axis, the axis should error out if new input isn't in the same units. As expected, the following errors out: <code class="notranslate">plt.fill_between(x, x, y1)</code></p>
1
<ul dir="auto"> <li>Output of <code class="notranslate">node_modules/.bin/electron --version</code>: v4.0.1</li> <li>Operating System (Platform and Version): OSX Mojave</li> <li>Output of <code class="notranslate">node_modules/.bin/electron --version</code> on last known working Electron version (if applicable): N/A</li> </ul> <p dir="auto"><strong>Expected Behavior</strong><br> A clear and concise description of what you expected to happen.</p> <p dir="auto">I'd expect that hash algorithms available to Electron would mirror those available to Node v10.11.0. So, something like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; c.getHashes(); [ 'RSA-MD4', 'RSA-MD5', 'RSA-MDC2', 'RSA-RIPEMD160', 'RSA-SHA1', 'RSA-SHA1-2', 'RSA-SHA224', 'RSA-SHA256', 'RSA-SHA384', 'RSA-SHA512', 'blake2b512', 'blake2s256', 'md4', 'md4WithRSAEncryption', 'md5', 'md5-sha1', 'md5WithRSAEncryption', 'mdc2', 'mdc2WithRSA', 'ripemd', 'ripemd160', 'ripemd160WithRSA', 'rmd160', 'sha1', 'sha1WithRSAEncryption', 'sha224', 'sha224WithRSAEncryption', 'sha256', 'sha256WithRSAEncryption', 'sha384', 'sha384WithRSAEncryption', 'sha512', 'sha512WithRSAEncryption', 'ssl3-md5', 'ssl3-sha1', 'whirlpool' ]"><pre class="notranslate"><code class="notranslate">&gt; c.getHashes(); [ 'RSA-MD4', 'RSA-MD5', 'RSA-MDC2', 'RSA-RIPEMD160', 'RSA-SHA1', 'RSA-SHA1-2', 'RSA-SHA224', 'RSA-SHA256', 'RSA-SHA384', 'RSA-SHA512', 'blake2b512', 'blake2s256', 'md4', 'md4WithRSAEncryption', 'md5', 'md5-sha1', 'md5WithRSAEncryption', 'mdc2', 'mdc2WithRSA', 'ripemd', 'ripemd160', 'ripemd160WithRSA', 'rmd160', 'sha1', 'sha1WithRSAEncryption', 'sha224', 'sha224WithRSAEncryption', 'sha256', 'sha256WithRSAEncryption', 'sha384', 'sha384WithRSAEncryption', 'sha512', 'sha512WithRSAEncryption', 'ssl3-md5', 'ssl3-sha1', 'whirlpool' ] </code></pre></div> <p dir="auto"><strong>Actual behavior</strong></p> <p dir="auto">Instead, the list of hashes is really small:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/67953/51369662-44592980-1aa9-11e9-972d-e3650066213f.png"><img width="566" alt="screen shot 2019-01-17 at 10 42 58 pm" src="https://user-images.githubusercontent.com/67953/51369662-44592980-1aa9-11e9-972d-e3650066213f.png" style="max-width: 100%;"></a></p> <p dir="auto"><strong>To Reproduce</strong></p> <p dir="auto">Run <code class="notranslate">require('crypto').getHashes()</code> anywhere in your Electron app - you'll see that the available hashes is really small.</p> <p dir="auto"><strong>Screenshots</strong><br> See the one above.</p> <p dir="auto"><strong>Additional Information</strong><br> <code class="notranslate">ripemd160</code> specifically is very important to any cryptocurrency-related application, since RMD160 is used by Bitcoin-like chains to hash transaction data.</p>
<h3 dir="auto">Preflight Checklist</h3> <p dir="auto">I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.<br> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.<br> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</p> <h3 dir="auto">Electron Version</h3> <p dir="auto">11.3.0</p> <h3 dir="auto">What operating system are you using?</h3> <p dir="auto">macOS</p> <h3 dir="auto">Operating System Version</h3> <p dir="auto">macOS Catalina 10.15.7 and window 10 v2004</p> <h3 dir="auto">What arch are you using?</h3> <p dir="auto">x64</p> <h3 dir="auto">Last Known Working Electron version</h3> <p dir="auto">11.3.0</p> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">Trigger print pdf by user button, round that the pdf (file has been downloaded locally) cannot be printed normally。Window and mac have the same problem, code show as below:</p> <p dir="auto">export function printPage2(strUrl, isLocal = false, callback) {<br> const printWindow = new BrowserWindow({<br> title: 'Printer',<br> show: true,<br> width: 1024,<br> height: 768,<br> parent: tmpMinWindow,<br> plugins: true,<br> webPreferences: {<br> devTools: false,<br> nodeIntegration: true, //开启渲染进程中调用模块 即require<br> enableRemoteModule: true,<br> contextIsolation: false<br> }<br> })<br> console.log('printPage2=' + strUrl)</p> <p dir="auto">printWindow.loadFile(strUrl)</p> <p dir="auto">// did-finish-load<br> printWindow.webContents.on('did-finish-load', () =&gt; {<br> console.log('did-finish-load')<br> printWindow.webContents.print(<br> { silent: false, printBackground: false },<br> (success, failureReason) =&gt; {<br> console.log('success=' + success + ' failureReason =' + failureReason)<br> if (callback) {<br> callback(success ? null : failureReason)<br> }<br> }<br> )<br> })</p> <p dir="auto">let sList = printWindow.webContents.getPrinters()<br> console.log('sList = ' + JSON.stringify(sList))</p> <p dir="auto">printWindow.webContents.on('did-fail-load', (event, errorCode, errorDes, validateURL) =&gt; {<br> console.log('did-fail-load =' + errorCode)<br> if (callback) {<br> callback(errorDes)<br> }<br> })<br> }</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">BrowserWindow.webContents.print Unable to respond normally, no results are returned, one of the local printer jobs shows that the print job is being received, and there is no response on the printing side</p> <h3 dir="auto">Testcase Gist URL</h3> <p dir="auto"><em>No response</em></p> <p dir="auto">Using pdf internal pdf printing can print normally, but it cannot work normally through BrowserWindow.webContents.print</p>
0
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 4.1 master</li> <li>Operating System / Platform =&gt; Windows 10 64 Bit</li> <li>Compiler =&gt; Visual Studio 2019</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">I'm try master branch with .NET assembly and testing with xunit.</p> <p dir="auto">But most of time it crashed at end of xunit running.</p> <p dir="auto">Detail windbg trace attached:</p> <p dir="auto"><a href="https://github.com/opencv/opencv/files/3914096/20191203_crash.txt">20191203_crash.txt</a></p>
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 4.0.1</li> <li>Operating System / Platform =&gt; Windows 10 64 Bit</li> <li>Compiler =&gt; Visual Studio 2017</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">The tf_text_graph_faster_rcnn.py stops with error when trying to generate pbtxt file for faster_rcnn_nas model from TF object detection model zoo [1-2] following this guide [3].</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Traceback (most recent call last): File &quot;tf_text_graph_faster_rcnn.py&quot;, line 241, in &lt;module&gt; createFasterRCNNGraph(args.input, args.config, args.output) File &quot;tf_text_graph_faster_rcnn.py&quot;, line 34, in createFasterRCNNGraph features_stride = float(config['feature_extractor'][0]['first_stage_features_stride'][0]) KeyError: 'first_stage_features_stride'"><pre class="notranslate"><code class="notranslate"> Traceback (most recent call last): File "tf_text_graph_faster_rcnn.py", line 241, in &lt;module&gt; createFasterRCNNGraph(args.input, args.config, args.output) File "tf_text_graph_faster_rcnn.py", line 34, in createFasterRCNNGraph features_stride = float(config['feature_extractor'][0]['first_stage_features_stride'][0]) KeyError: 'first_stage_features_stride' </code></pre></div> <p dir="auto">Would appreciate any tips and ideas on how to fix this bug.</p> <p dir="auto">References.</p> <p dir="auto">[1] <a href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md">https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md</a></p> <p dir="auto">[2] <a href="https://github.com/tensorflow/models/blob/master/research/object_detection/samples/configs/faster_rcnn_nas_coco.config">https://github.com/tensorflow/models/blob/master/research/object_detection/samples/configs/faster_rcnn_nas_coco.config</a></p> <p dir="auto">[3] <a href="https://github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API">https://github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API</a></p>
0
<h3 dir="auto">Preflight Checklist</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li> </ul> <h3 dir="auto">Issue Details</h3> <ul dir="auto"> <li><strong>Electron Version:</strong> <ul dir="auto"> <li>7.0.0</li> </ul> </li> <li><strong>Operating System:</strong> <ul dir="auto"> <li>Raspbian GNU/Linux 9.4</li> </ul> </li> <li><strong>Last Known Working Electron version:</strong> <ul dir="auto"> <li>N/A</li> </ul> </li> </ul> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">Electron Package should be installed</p> <h3 dir="auto">Actual Behavior</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@pi:/home/pi/MagicMirror# npm i electron@latest &gt; [email protected] postinstall /home/pi/MagicMirror/node_modules/electron &gt; node install.js (node:1928) UnhandledPromiseRejectionWarning: HTTPError: Response code 404 (Not Found) at EventEmitter.emitter.on.response (/home/pi/MagicMirror/node_modules/got/source/as-stream.js:35:24) at EventEmitter.emit (events.js:180:13) at module.exports (/home/pi/MagicMirror/node_modules/got/source/get-response.js:22:10) at ClientRequest.handleResponse (/home/pi/MagicMirror/node_modules/got/source/request-as-event-emitter.js:155:5) at Object.onceWrapper (events.js:272:13) at ClientRequest.emit (events.js:185:15) at ClientRequest.origin.emit.args [as emit] (/home/pi/MagicMirror/node_modules/@szmarczak/http-timer/source/index.js:37:11) at HTTPParser.parserOnIncomingClient (_http_client.js:540:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:117:17) at TLSSocket.socketOnData (_http_client.js:445:20) (node:1928) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:1928) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. + [email protected] added 2 packages in 40.967s"><pre class="notranslate"><code class="notranslate">root@pi:/home/pi/MagicMirror# npm i electron@latest &gt; [email protected] postinstall /home/pi/MagicMirror/node_modules/electron &gt; node install.js (node:1928) UnhandledPromiseRejectionWarning: HTTPError: Response code 404 (Not Found) at EventEmitter.emitter.on.response (/home/pi/MagicMirror/node_modules/got/source/as-stream.js:35:24) at EventEmitter.emit (events.js:180:13) at module.exports (/home/pi/MagicMirror/node_modules/got/source/get-response.js:22:10) at ClientRequest.handleResponse (/home/pi/MagicMirror/node_modules/got/source/request-as-event-emitter.js:155:5) at Object.onceWrapper (events.js:272:13) at ClientRequest.emit (events.js:185:15) at ClientRequest.origin.emit.args [as emit] (/home/pi/MagicMirror/node_modules/@szmarczak/http-timer/source/index.js:37:11) at HTTPParser.parserOnIncomingClient (_http_client.js:540:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:117:17) at TLSSocket.socketOnData (_http_client.js:445:20) (node:1928) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:1928) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. + [email protected] added 2 packages in 40.967s </code></pre></div> <p dir="auto">Then When I run the Project,</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" /home/pi/MagicMirror/node_modules/electron/index.js:14 throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again') ^ Error: Electron failed to install correctly, please delete node_modules/electron and try installing again at getElectronPath (/home/pi/MagicMirror/node_modules/electron/index.js:14:11) at Object.&lt;anonymous&gt; (/home/pi/MagicMirror/node_modules/electron/index.js:18:18) at Module._compile (internal/modules/cjs/loader.js:654:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10) at Module.load (internal/modules/cjs/loader.js:566:32) at tryModuleLoad (internal/modules/cjs/loader.js:506:12) at Function.Module._load (internal/modules/cjs/loader.js:498:3) at Module.require (internal/modules/cjs/loader.js:598:17) at require (internal/modules/cjs/helpers.js:11:18) at Object.&lt;anonymous&gt; (/home/pi/MagicMirror/node_modules/electron/cli.js:3:16) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: `sh run-start.sh` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-10-27T00_35_37_411Z-debug.log"><pre class="notranslate"><code class="notranslate"> /home/pi/MagicMirror/node_modules/electron/index.js:14 throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again') ^ Error: Electron failed to install correctly, please delete node_modules/electron and try installing again at getElectronPath (/home/pi/MagicMirror/node_modules/electron/index.js:14:11) at Object.&lt;anonymous&gt; (/home/pi/MagicMirror/node_modules/electron/index.js:18:18) at Module._compile (internal/modules/cjs/loader.js:654:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10) at Module.load (internal/modules/cjs/loader.js:566:32) at tryModuleLoad (internal/modules/cjs/loader.js:506:12) at Function.Module._load (internal/modules/cjs/loader.js:498:3) at Module.require (internal/modules/cjs/loader.js:598:17) at require (internal/modules/cjs/helpers.js:11:18) at Object.&lt;anonymous&gt; (/home/pi/MagicMirror/node_modules/electron/cli.js:3:16) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: `sh run-start.sh` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-10-27T00_35_37_411Z-debug.log </code></pre></div> <p dir="auto">Also, when I reinstall, it has same issue.</p> <h3 dir="auto">To Reproduce</h3> <p dir="auto">Just do <code class="notranslate">npm i electron@latest</code></p>
<h3 dir="auto">Update 2</h3> <p dir="auto">@xiaoshan5733 has found a solution for the time being (located below in the comments). For visibility, I'll post it here:</p> <blockquote> <p dir="auto">I solved the problem, you should config like this in your ~/.npmrc file:</p> </blockquote> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="arch=armv7l"><pre class="notranslate"><code class="notranslate">arch=armv7l </code></pre></div> <blockquote> <p dir="auto">You can get arch from <code class="notranslate">uname -m</code></p> </blockquote> <p dir="auto">I've tested this and can confirm that I'm able to proceed past the error and run the quick start application. However, I'm keeping this issue open until a developer responds to indicate whether this issue is still relevant to development and if it's intended behavior.</p> <h3 dir="auto">Update</h3> <p dir="auto">Just tested on a fresh SD-card install of the latest Raspbian. Made sure to run <code class="notranslate">sudo apt update &amp;&amp; sudo apt full-upgrade</code>, downloaded the latest version of node (<code class="notranslate">v13.0.1</code>) and then tried installing via <code class="notranslate">npm install --save-dev electron</code>. Still have the same problem. Raspberry Pi 4, 16 GB MicroSD, fresh install</p> <h3 dir="auto">Preflight Checklist</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li> </ul> <h3 dir="auto">Issue Details</h3> <ul dir="auto"> <li><strong>Electron Version:</strong><br> Cannot install</li> <li><strong>Operating System:</strong><br> Raspbian, latest sept. build</li> <li><strong>Last Known Working Electron version:</strong><br> None</li> </ul> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">I expect to be able to install electron.</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">I receive a HTTPError -- Response code 404 (Not Found).</p> <h3 dir="auto">To Reproduce</h3> <ol dir="auto"> <li>Run <code class="notranslate">git clone https://github.com/electron/electron-quick-start</code></li> <li>CD into the directory: <code class="notranslate">cd electron-quick-start</code></li> <li>Run npm install: <code class="notranslate">npm install</code></li> </ol> <h3 dir="auto">Screenshots</h3> <p dir="auto"><a href="https://gyazo.com/cb7b3905b3ce24eddf0dc2626cbfdd13" rel="nofollow">Screenshot of output</a></p> <h3 dir="auto">Additional Information</h3> <ul dir="auto"> <li><code class="notranslate">node -v</code>: <code class="notranslate">v10.17.0</code></li> <li><code class="notranslate">npm -v</code>: <code class="notranslate">6.11.3</code></li> <li>I've tried deleting <code class="notranslate">node_modules/</code> and rerunning <code class="notranslate">npm install</code>.</li> <li>Install seems to go through while using <code class="notranslate">yarn</code> but when starting the program it spits out: <code class="notranslate">Your install of electron is incorrect. Please delete 'node_modules/electron' and run 'npm install' again.</code> (or something of that nature).</li> <li>I've run <code class="notranslate">sudo apt update &amp;&amp; sudo apt upgrade -y</code>, didn't help</li> <li>I'm on a hardwire connection which is working fine. The internet works fine on my Pi (I can go into chromium and browse as well as <code class="notranslate">ping</code> sites)</li> </ul>
1
<p dir="auto">There one features that lacks most of 3rd party virtual desktop is to have independent virtual desktop that can be freeze any time.</p> <p dir="auto">For example, I will have a few virtual desktop with everything set (app already opened and placed where I want to) for :</p> <ul dir="auto"> <li>my work 1 (for example : dev in HTML4)</li> <li>my work 2 (for example: dev in python)</li> <li>my home (everything related to games &amp; leisure)</li> <li>my personal dev (my own website and its tools)<br> etc...</li> </ul> <p dir="auto">Whenever I need to switch to another desktop, I won't loose all opened windows etc.</p> <p dir="auto">PS: I don't even know if something like is possible through powertoys. Perhaps, it's OS dependant...</p>
<p dir="auto">every morning since I upgraded to v0.16.0 and even on v0.16.1, when I unlock my PC and then go to move any window that is not where it was when I locked my PC the fancyzone grid shows then freezes the screen with gris overlay on top of everything for about 60 seconds or more and I can't do any thing</p>
0
<p dir="auto">After upgrading to 4.1.0 from 4.0.2, I got this warning in my browser's console. It didn't occur on 4.0.2.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <ul dir="auto"> <li>No warning message.</li> </ul> <h2 dir="auto">Current Behavior</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="React Hot Loader: this component is not accepted by Hot Loader. Please check is it extracted as a top-level class, a function or a variable. Click below to reveal the source location: ƒ (props, context, updater) { // This constructor gets overridden by mocks. The argument is used // by mocks to assert on what gets mounted. if (true) { warning( th…"><pre class="notranslate"><code class="notranslate">React Hot Loader: this component is not accepted by Hot Loader. Please check is it extracted as a top-level class, a function or a variable. Click below to reveal the source location: ƒ (props, context, updater) { // This constructor gets overridden by mocks. The argument is used // by mocks to assert on what gets mounted. if (true) { warning( th… </code></pre></div> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Install Next 4.1.0</li> <li>Run dev server.</li> <li>Warning messages in the browser's console.</li> </ol> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td>4.1.0</td> </tr> <tr> <td>node</td> <td>8.6.0</td> </tr> <tr> <td>OS</td> <td>Ubuntu</td> </tr> <tr> <td>browser</td> <td>Chrome 60</td> </tr> </tbody> </table>
<h1 dir="auto">Bug report</h1> <h2 dir="auto">Describe the bug</h2> <p dir="auto">The <a href="https://github.com/zeit/next.js/tree/canary/examples/with-typings-for-css-modules"><code class="notranslate">with-typings-for-css-modules</code></a> example works only because <code class="notranslate">style.css</code> is in the root folder. If you move it into <code class="notranslate">pages</code>, the build fails:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ./node_modules/.bin/next build Creating an optimized production build Failed to compile. ./pages/style.css.d.ts 1:20 Module parse failed: Unexpected token (1:20) File was processed with these loaders: * ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js You may need an additional loader to handle the result of these loaders. &gt; export const example; | export const example__description; | export const exampleDescription; &gt; Build error occurred Error: &gt; Build failed because of webpack errors at build (/Users/alex/Code/next.js/examples/with-typings-for-css-modules/node_modules/next/dist/build/index.js:7:847)"><pre class="notranslate"><code class="notranslate">$ ./node_modules/.bin/next build Creating an optimized production build Failed to compile. ./pages/style.css.d.ts 1:20 Module parse failed: Unexpected token (1:20) File was processed with these loaders: * ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js You may need an additional loader to handle the result of these loaders. &gt; export const example; | export const example__description; | export const exampleDescription; &gt; Build error occurred Error: &gt; Build failed because of webpack errors at build (/Users/alex/Code/next.js/examples/with-typings-for-css-modules/node_modules/next/dist/build/index.js:7:847) </code></pre></div> <p dir="auto">Testing this, it appears to <em>only</em> affect pages. If a page embeds a component in a subfolder that imports styles from its own folder, it works fine.</p> <p dir="auto">The issue is mentioned in <a href="https://spectrum.chat/next-js/general/9-0-typescript-loader-error~50d76a53-3039-40b1-be42-8ee06da7dad0" rel="nofollow">this Spectrum discussion</a>.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">I have <a href="https://github.com/atombender/next.js-issue-with-typings-for-css-modules">cloned the example to this repo</a>.</p> <ol dir="auto"> <li><code class="notranslate">git clone https://github.com/atombender/next.js-issue-with-typings-for-css-modules</code></li> <li><code class="notranslate">cd next.js-issue-with-typings-for-css-modules</code></li> <li><code class="notranslate">yarn run build</code></li> </ol> <h2 dir="auto">Expected behavior</h2> <p dir="auto">It should be possible to import styles with TypeScript from a page.</p>
0
<p dir="auto">Hi, I'm facing a problem that <strong>window.opener</strong> is null when there is a access to window.opener in a page within webview tag.<br> I listen the <strong>new-window</strong> event of the webview tag,and then add a new tab.Yes, it's similar to click a a tag with <em>_blank</em> .<br> The original behavior is that opening a new window in Chrome of <em>window.opener</em>.But now,I changed it to act as clicking a tag with <em>_blank</em> .<br> I found a doc in <a href="url">https://github.com/electron/electron/blob/master/docs/api/window-open.md</a>.<br> The sample code is strange,when I opened an url directly,I couldn't access window.opener in new page.<br> like this:<br> main.js</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const {app, BrowserWindow, m} = require('electron'); let basicWindowParams = { show: true }; console.log(process.pid) app.on('ready', () =&gt; { const mainWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: { nativeWindowOpen: true } }) mainWindow.webContents.on('new-window', (event, url, frameName, disposition, options, additionalFeatures) =&gt; { if (frameName === 'reddit') { event.preventDefault() Object.assign(options, { modal: true, parent: mainWindow }) let newWin = new BrowserWindow(options); event.newGuest = newWin; newWin.webContents.openDevTools(); } }); mainWindow.loadURL(`file://${__dirname}/index.html`) });"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span>app<span class="pl-kos">,</span> BrowserWindow<span class="pl-kos">,</span> m<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">let</span> <span class="pl-s1">basicWindowParams</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">show</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">pid</span><span class="pl-kos">)</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'ready'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">width</span>: <span class="pl-c1">800</span><span class="pl-kos">,</span> <span class="pl-c1">height</span>: <span class="pl-c1">600</span><span class="pl-kos">,</span> <span class="pl-c1">webPreferences</span>: <span class="pl-kos">{</span> <span class="pl-c1">nativeWindowOpen</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'new-window'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">,</span> <span class="pl-s1">url</span><span class="pl-kos">,</span> <span class="pl-s1">frameName</span><span class="pl-kos">,</span> <span class="pl-s1">disposition</span><span class="pl-kos">,</span> <span class="pl-s1">options</span><span class="pl-kos">,</span> <span class="pl-s1">additionalFeatures</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">frameName</span> <span class="pl-c1">===</span> <span class="pl-s">'reddit'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">event</span><span class="pl-kos">.</span><span class="pl-en">preventDefault</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">assign</span><span class="pl-kos">(</span><span class="pl-s1">options</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">modal</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">parent</span>: <span class="pl-s1">mainWindow</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-k">let</span> <span class="pl-s1">newWin</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-s1">options</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">event</span><span class="pl-kos">.</span><span class="pl-c1">newGuest</span> <span class="pl-c1">=</span> <span class="pl-s1">newWin</span><span class="pl-kos">;</span> <span class="pl-s1">newWin</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">openDevTools</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s">`file://<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">__dirname</span><span class="pl-kos">}</span></span>/index.html`</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">index.html</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;html&gt; &lt;body&gt; &lt;script&gt; let url = 'https://reddit.com'; let modal = window.open(url, 'reddit') // modal.location.href = url; &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-k">let</span> <span class="pl-s1">url</span> <span class="pl-c1">=</span> <span class="pl-s">'https://reddit.com'</span><span class="pl-kos">;</span> <span class="pl-k">let</span> <span class="pl-s1">modal</span> <span class="pl-c1">=</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-en">open</span><span class="pl-kos">(</span><span class="pl-s1">url</span><span class="pl-kos">,</span> <span class="pl-s">'reddit'</span><span class="pl-kos">)</span> <span class="pl-c">// modal.location.href = url;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span></pre></div> <p dir="auto">OS: Windows 7 SP1<br> Electron: 1.7.8</p>
<ul dir="auto"> <li>Electron version: 1.7.6</li> </ul> <h3 dir="auto">Actual behavior</h3> <p dir="auto">When calling <code class="notranslate">window.open</code> from an iframe no popup is open whereas the <code class="notranslate">new-window</code> events is fired on the webContents.</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">Would expect <code class="notranslate">window.open</code> to open a popup even in iframe.</p> <p dir="auto">Note that when using with <code class="notranslate">nativeWindowOpen</code> it works fine.</p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">Use this PR: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="254053808" data-permission-text="Title is private" data-url="https://github.com/alexstrat/electron-quick-start/issues/1" data-hovercard-type="pull_request" data-hovercard-url="/alexstrat/electron-quick-start/pull/1/hovercard" href="https://github.com/alexstrat/electron-quick-start/pull/1">alexstrat/electron-quick-start#1</a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/687961/29882655-0045595a-8dae-11e7-97e1-609cb26a24cc.png"><img src="https://user-images.githubusercontent.com/687961/29882655-0045595a-8dae-11e7-97e1-609cb26a24cc.png" alt="screenshot 2017-08-30 18 06 40" style="max-width: 100%;"></a></p>
1
<p dir="auto">If form is sent with an invalid CSRF token, this error message will be displayed: <code class="notranslate">The CSRF token is invalid. Please try to resubmit the form.</code></p> <p dir="auto">This message is in fact instruction on how to bypass CSRF protection. This wording makes protection to be more like an attacker collaborator ;-)</p> <p dir="auto">Please change message to something like <code class="notranslate">Your session has expired. Please return to the home page and try again.</code>.</p>
<p dir="auto">I don't think the current behavior for specifying a null errorPath option for the UniqueEntity validator makes sense.</p> <p dir="auto">When passing null to this option, the error should appear on the object itself, not on the first field provided to the fields option. Perhaps if the errorPath option is not set, then it could appear on the first field provided.</p> <p dir="auto">My use case is as follows. Say I have an object called PriceRule. This object contains several relations to other objects, and is used to calculate a price when a Company is posting a job. The object as a whole should be unique so duplicate rules aren't created. It looks like this:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;?php /** * @UniqueEntity(fields={&quot;company&quot;, &quot;occupation&quot;, &quot;specialty&quot;}, ignoreNull=false}) */ class PriceRule { public $company; public $occupation; public $specialty; public $price; }"><pre class="notranslate"><span class="pl-ent">&lt;?php</span> <span class="pl-c">/**</span> <span class="pl-c"> * @UniqueEntity(fields={"company", "occupation", "specialty"}, ignoreNull=false})</span> <span class="pl-c"> */</span> <span class="pl-k">class</span> <span class="pl-v">PriceRule</span> { <span class="pl-k">public</span> <span class="pl-c1"><span class="pl-c1">$</span>company</span>; <span class="pl-k">public</span> <span class="pl-c1"><span class="pl-c1">$</span>occupation</span>; <span class="pl-k">public</span> <span class="pl-c1"><span class="pl-c1">$</span>specialty</span>; <span class="pl-k">public</span> <span class="pl-c1"><span class="pl-c1">$</span>price</span>; }</pre></div> <p dir="auto">If you create a PriceRule object with a duplicate company, occupation and specialty data, it makes no sense for the error to appear on any of these individual fields. The error should appear on the root of the object, but with the current UniqueEntity validator this does not seem to be possible.</p> <p dir="auto">In short, I think that specifying a errorPath=null explicity should result in the <code class="notranslate">addViolation</code> method being called on the context, and if the errorPath is left out, it should result in a violation being added at the first field, which is the current behavior.</p> <p dir="auto">Thoughts?</p>
0
<p dir="auto">I came across this failure while trying to implement double dispatch. Here's the reduced code to reproduce it:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pub trait MatBase { // Base method for double dispatch. // Performs: MatBase * f32 fn mul_scalar(&amp;self, scalar: &amp;f32) -&gt; Mat { Mat::new() } // Base method for double dispatch. // Performs: MatBase * MatBase fn mul_mat&lt;T:MatBase&gt;(&amp;self, rhs: &amp;T) -&gt; Mat { Mat::new() } } pub struct Mat { pub r: uint, } impl Mat { pub fn new() -&gt; Mat { Mat {r: 0} } } impl MatBase for Mat { } impl&lt;T:MatBase, U: LMulMatBase&gt; Mul&lt;U, Mat&gt; for T { fn mul(&amp;self, rhs: &amp;U) -&gt; Mat { rhs.lmul_matbase(self) } } // Trait for double dispatch. Called for `MatBase * X` trait LMulMatBase { fn lmul_matbase&lt;T:MatBase&gt;(&amp;self, &amp;T) -&gt; Mat; } impl LMulMatBase for f32 { fn lmul_matbase&lt;T:MatBase&gt;(&amp;self, rhs: &amp;T) -&gt; Mat { rhs.mul_scalar(self) } } impl&lt;U:MatBase&gt; LMulMatBase for U { fn lmul_matbase&lt;T:MatBase&gt;(&amp;self, rhs: &amp;T) -&gt; Mat { rhs.mul_mat(self) } } pub fn generate_ice() { let v = Mat::new(); // ICE let foo = v * 2.0; let bar = v * 2; } fn main() { }"><pre class="notranslate"><code class="notranslate">pub trait MatBase { // Base method for double dispatch. // Performs: MatBase * f32 fn mul_scalar(&amp;self, scalar: &amp;f32) -&gt; Mat { Mat::new() } // Base method for double dispatch. // Performs: MatBase * MatBase fn mul_mat&lt;T:MatBase&gt;(&amp;self, rhs: &amp;T) -&gt; Mat { Mat::new() } } pub struct Mat { pub r: uint, } impl Mat { pub fn new() -&gt; Mat { Mat {r: 0} } } impl MatBase for Mat { } impl&lt;T:MatBase, U: LMulMatBase&gt; Mul&lt;U, Mat&gt; for T { fn mul(&amp;self, rhs: &amp;U) -&gt; Mat { rhs.lmul_matbase(self) } } // Trait for double dispatch. Called for `MatBase * X` trait LMulMatBase { fn lmul_matbase&lt;T:MatBase&gt;(&amp;self, &amp;T) -&gt; Mat; } impl LMulMatBase for f32 { fn lmul_matbase&lt;T:MatBase&gt;(&amp;self, rhs: &amp;T) -&gt; Mat { rhs.mul_scalar(self) } } impl&lt;U:MatBase&gt; LMulMatBase for U { fn lmul_matbase&lt;T:MatBase&gt;(&amp;self, rhs: &amp;T) -&gt; Mat { rhs.mul_mat(self) } } pub fn generate_ice() { let v = Mat::new(); // ICE let foo = v * 2.0; let bar = v * 2; } fn main() { } </code></pre></div> <p dir="auto">Produces...</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ice.rs:31:5: 33:6 error: method `mul` has an incompatible type for trait: expected type parameter, found &amp;-ptr [E0053] ice.rs:31 fn mul(&amp;self, rhs: &amp;U) -&gt; Mat { ice.rs:32 rhs.lmul_matbase(self) ice.rs:33 } error: internal compiler error: Impl DefId { krate: 0, node: 104 }:f32.LMulMatBase was matchable against Obligation(trait_ref=&lt;_ : LMulMatBase&gt;,depth=1) but now is not note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace task 'rustc' panicked at 'Box&lt;Any&gt;', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/diagnostic.rs:188 stack backtrace: 1: 0x7f7baf436c60 - rt::backtrace::imp::write::hb0dcc4a5fc17fd0bFUx 2: 0x7f7baf43a030 - failure::on_fail::hcd3ce97bacbef1b03ly 3: 0x7f7baf07a790 - unwind::begin_unwind_inner::h670ccdf2c60477f7aNc 4: 0x7f7bac76e010 - unwind::begin_unwind::h18115787115103468845 5: 0x7f7bac76e8c0 - diagnostic::Handler::bug::h266854e4787d0d95KHF 6: 0x7f7bad6be650 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::rematch_impl::h85fa8dd1c7168e08QsZ 7: 0x7f7bad6b22b0 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::confirm_candidate::h73c92f23e4b19127mZY 8: 0x7f7bad6ac800 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::select::h1f6b87c67ed6992dTyX 9: 0x7f7bad6a6360 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select::h1c32dca2315fb0adjYW 10: 0x7f7bad5261b0 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select_all_or_error::hfb69502c35931f954UW 11: 0x7f7bae5eec70 - check::vtable::select_all_fcx_obligations_or_error::ha9d04af899db1229Ceb 12: 0x7f7bae6c6430 - check::check_bare_fn::h3e6a0e77e248363agck 13: 0x7f7bae6bdfc0 - check::check_item::h2b10ccbb63916a23Gvk 14: 0x7f7bae915d50 - check_crate::unboxed_closure.42746 15: 0x7f7bae910a60 - check_crate::h0d4db076e0bb3313fZy 16: 0x7f7baf88a8b0 - driver::phase_3_run_analysis_passes::h86f5117df0f02e2eEta 17: 0x7f7baf86dc50 - driver::compile_input::h024b52963d907b7crba 18: 0x7f7bafa21c90 - run_compiler::h028a909c6b8b5e8fAYb 19: 0x7f7bafa188d0 - thunk::F.Invoke&lt;A, R&gt;::invoke::h18183104788496625744 20: 0x7f7baf40f010 - thunk::F.Invoke&lt;A, R&gt;::invoke::h2541757334713289964 21: 0x7f7baf078f00 - task::Task::spawn_thunk::closure.5783 22: 0x7f7baf0d7a70 - rust_try_inner 23: 0x7f7baf0d7a60 - rust_try 24: 0x7f7baf079010 - unwind::try::h558067038ea79d14rCc 25: 0x7f7baf078da0 - task::Task::run::h0a756e41b4d98f97sNb 26: 0x7f7baf078510 - thunk::F.Invoke&lt;A, R&gt;::invoke::h14009063998732615525 27: 0x7f7baf079e60 - thread::thread_start::h3654652a3d324e1eM4b 28: 0x7f7ba9bd30c0 - start_thread 29: 0x7f7baed3dec9 - __clone 30: 0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">ice.rs:31:5: 33:6 error: method `mul` has an incompatible type for trait: expected type parameter, found &amp;-ptr [E0053] ice.rs:31 fn mul(&amp;self, rhs: &amp;U) -&gt; Mat { ice.rs:32 rhs.lmul_matbase(self) ice.rs:33 } error: internal compiler error: Impl DefId { krate: 0, node: 104 }:f32.LMulMatBase was matchable against Obligation(trait_ref=&lt;_ : LMulMatBase&gt;,depth=1) but now is not note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace task 'rustc' panicked at 'Box&lt;Any&gt;', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/diagnostic.rs:188 stack backtrace: 1: 0x7f7baf436c60 - rt::backtrace::imp::write::hb0dcc4a5fc17fd0bFUx 2: 0x7f7baf43a030 - failure::on_fail::hcd3ce97bacbef1b03ly 3: 0x7f7baf07a790 - unwind::begin_unwind_inner::h670ccdf2c60477f7aNc 4: 0x7f7bac76e010 - unwind::begin_unwind::h18115787115103468845 5: 0x7f7bac76e8c0 - diagnostic::Handler::bug::h266854e4787d0d95KHF 6: 0x7f7bad6be650 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::rematch_impl::h85fa8dd1c7168e08QsZ 7: 0x7f7bad6b22b0 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::confirm_candidate::h73c92f23e4b19127mZY 8: 0x7f7bad6ac800 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::select::h1f6b87c67ed6992dTyX 9: 0x7f7bad6a6360 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select::h1c32dca2315fb0adjYW 10: 0x7f7bad5261b0 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select_all_or_error::hfb69502c35931f954UW 11: 0x7f7bae5eec70 - check::vtable::select_all_fcx_obligations_or_error::ha9d04af899db1229Ceb 12: 0x7f7bae6c6430 - check::check_bare_fn::h3e6a0e77e248363agck 13: 0x7f7bae6bdfc0 - check::check_item::h2b10ccbb63916a23Gvk 14: 0x7f7bae915d50 - check_crate::unboxed_closure.42746 15: 0x7f7bae910a60 - check_crate::h0d4db076e0bb3313fZy 16: 0x7f7baf88a8b0 - driver::phase_3_run_analysis_passes::h86f5117df0f02e2eEta 17: 0x7f7baf86dc50 - driver::compile_input::h024b52963d907b7crba 18: 0x7f7bafa21c90 - run_compiler::h028a909c6b8b5e8fAYb 19: 0x7f7bafa188d0 - thunk::F.Invoke&lt;A, R&gt;::invoke::h18183104788496625744 20: 0x7f7baf40f010 - thunk::F.Invoke&lt;A, R&gt;::invoke::h2541757334713289964 21: 0x7f7baf078f00 - task::Task::spawn_thunk::closure.5783 22: 0x7f7baf0d7a70 - rust_try_inner 23: 0x7f7baf0d7a60 - rust_try 24: 0x7f7baf079010 - unwind::try::h558067038ea79d14rCc 25: 0x7f7baf078da0 - task::Task::run::h0a756e41b4d98f97sNb 26: 0x7f7baf078510 - thunk::F.Invoke&lt;A, R&gt;::invoke::h14009063998732615525 27: 0x7f7baf079e60 - thread::thread_start::h3654652a3d324e1eM4b 28: 0x7f7ba9bd30c0 - start_thread 29: 0x7f7baed3dec9 - __clone 30: 0x0 - &lt;unknown&gt; </code></pre></div> <p dir="auto">With rust version:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 0.13.0-nightly (42deaa5e4 2014-12-16 17:51:23 +0000) binary: rustc commit-hash: 42deaa5e42c0b8a9e305aa5de5d6953b24b77aca commit-date: 2014-12-16 17:51:23 +0000 host: x86_64-unknown-linux-gnu release: 0.13.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 0.13.0-nightly (42deaa5e4 2014-12-16 17:51:23 +0000) binary: rustc commit-hash: 42deaa5e42c0b8a9e305aa5de5d6953b24b77aca commit-date: 2014-12-16 17:51:23 +0000 host: x86_64-unknown-linux-gnu release: 0.13.0-nightly </code></pre></div> <p dir="auto">This might be a duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="47750336" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/18623" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/18623/hovercard" href="https://github.com/rust-lang/rust/issues/18623">#18623</a> , but I'm not positive.</p>
<p dir="auto">The simplified code below results in an ICE using the following rust version</p> <p dir="auto">rustc 1.0.0-beta (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/9854143cba679834bc4ef932858cd5303f015a0e/hovercard" href="https://github.com/rust-lang/rust/commit/9854143cba679834bc4ef932858cd5303f015a0e"><tt>9854143</tt></a> 2015-04-02) (built 2015-04-02)<br> binary: rustc<br> commit-hash: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/9854143cba679834bc4ef932858cd5303f015a0e/hovercard" href="https://github.com/rust-lang/rust/commit/9854143cba679834bc4ef932858cd5303f015a0e"><tt>9854143</tt></a><br> commit-date: 2015-04-02<br> build-date: 2015-04-02<br> host: x86_64-apple-darwin<br> release: 1.0.0-beta</p> <p dir="auto">---- CODE resulting in ICE -------</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="use std::f64; use std::fs::File; use std::io::{BufRead, BufReader}; #[derive(Default)] struct Output { count: i64, min: f64, max: f64, var: f64, qk: f64, // helper variables for mk: f64, // variance calculation } fn main() { let file = File::open(&quot;data_random_small.txt&quot;); let buf = BufReader::new(file.unwrap()); let out = compute_statistics(buf); } // compute_statistics computes basic statistics for the content of the // provided BufReader fn compute_statistics(buf: BufReader&lt;File&gt;) -&gt; Output { let mut out = Output { count: 0, min: f64::MAX, max: -f64::MAX, var: 0.0, qk: 0.0, mk: 0.0}; for line_r in buf.lines() { let line = line_r.unwrap(); let n_r = line.to_string().parse::&lt;f64&gt;(); let n = n_r.unwrap(); // update variance let k: f64 = out.count as f64; out.qk += (k - 1.0) * (n - out.mk) * (n - out.mk) / k; out.mk += (n - out.mk) / k; out.count += 1; } let k: f64 = out.count as f64; out.var = out.qk / (k-1); out }"><pre class="notranslate"><code class="notranslate">use std::f64; use std::fs::File; use std::io::{BufRead, BufReader}; #[derive(Default)] struct Output { count: i64, min: f64, max: f64, var: f64, qk: f64, // helper variables for mk: f64, // variance calculation } fn main() { let file = File::open("data_random_small.txt"); let buf = BufReader::new(file.unwrap()); let out = compute_statistics(buf); } // compute_statistics computes basic statistics for the content of the // provided BufReader fn compute_statistics(buf: BufReader&lt;File&gt;) -&gt; Output { let mut out = Output { count: 0, min: f64::MAX, max: -f64::MAX, var: 0.0, qk: 0.0, mk: 0.0}; for line_r in buf.lines() { let line = line_r.unwrap(); let n_r = line.to_string().parse::&lt;f64&gt;(); let n = n_r.unwrap(); // update variance let k: f64 = out.count as f64; out.qk += (k - 1.0) * (n - out.mk) * (n - out.mk) / k; out.mk += (n - out.mk) / k; out.count += 1; } let k: f64 = out.count as f64; out.var = out.qk / (k-1); out } </code></pre></div> <hr> <p dir="auto">The issue appears to be the second to last line. The compiler should reject (k-1). Changing this to</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="out.var = out.qk / (k-1.0);"><pre class="notranslate"><code class="notranslate">out.var = out.qk / (k-1.0); </code></pre></div> <p dir="auto">results in proper compilation. Also, removing the previous scope of the for loop works and the compiler then properly complains about the (k-1) bit. Below is the backtrace:</p> <p dir="auto">----- BACKTRACE ----</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: Impl DefId { krate: 2, node: 39365 } was matchable against Obligation(predicate=Binder(TraitPredicate(core::ops::Sub&lt;_&gt;)),depth=1) but now is not note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:190 stack backtrace: 1: 0x107943f77 - sys::backtrace::write::h799ab135045ca9ca1LC 2: 0x107971e4d - panicking::on_panic::h9502e488a92fc8bcHAI 3: 0x1078962de - rt::unwind::begin_unwind_inner::hf0537788ee16eadbiiI 4: 0x1070755ae - rt::unwind::begin_unwind::h447731439410619827 5: 0x107075df9 - diagnostic::Handler::bug::hb6bac6e14e70580aZsB 6: 0x104b9c3be - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::rematch_impl::h00902254f92fe252QxT 7: 0x104b9bd08 - middle::infer::InferCtxt&lt;'a, 'tcx&gt;::commit_if_ok::h14474907185931287891 8: 0x104b7ce94 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::confirm_candidate::h3f1d070f70ab815cMPS 9: 0x104b509c6 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::select::hc528f249f6251cb8OQQ 10: 0x104b6098a - middle::traits::project::project_type::h7ca468ea33bc79f1AwP 11: 0x104b5e367 - middle::traits::project::opt_normalize_projection_type::h766518f8b1310230cpP 12: 0x104b57d86 - middle::traits::project::poly_project_and_unify_type::closure.83535 13: 0x104b55bc0 - middle::traits::project::poly_project_and_unify_type::h44012951a95c13e5l5O 14: 0x104b4d206 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select::h7d8cf023413c2180uHO 15: 0x104b4c848 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select_where_possible::h0397a49aa695a23cIGO 16: 0x103efa433 - check::vtable::select_fcx_obligations_where_possible::h99330aa4e9f6a658d4b 17: 0x103f3448d - check::FnCtxt&lt;'a, 'tcx&gt;::resolve_type_vars_if_possible::h7c8e59ec20a8f3b2qYo 18: 0x103fb0a3e - check::op::check_binop::h7e7f29a781258fb2u5m 19: 0x10400878d - check::check_expr_with_unifier::h13696137427352880546 20: 0x103ff552c - check::check_expr_with_unifier::h7970691808293538245 21: 0x103fb0a33 - check::op::check_binop::h7e7f29a781258fb2u5m 22: 0x103ff43c3 - check::check_expr_with_unifier::h7970691808293538245 23: 0x10400fab9 - check::check_expr_with_unifier::h6698900367440735538 24: 0x103fbe705 - check::check_block_with_expected::h60bff5b1f9d55793fps 25: 0x103f9ae05 - check::check_fn::h410d0ffafb47f675l1n 26: 0x103fb932e - check::check_bare_fn::h05c77be534ada2cfUQn 27: 0x103fb2ee2 - check::check_item::h9d89bedf29e4fe82F9n 28: 0x10408f676 - check_crate::closure.36302 29: 0x104089ae7 - check_crate::h09aa7856a322fd44bwC 30: 0x103da9355 - driver::phase_3_run_analysis_passes::h1af60e7c926ca39dgGa 31: 0x103d8da85 - driver::compile_input::h27cf4320fd56e5cbQba 32: 0x103e4ba15 - run_compiler::h93c68a2a3c26052bV4b 33: 0x103e491e2 - boxed::F.FnBox&lt;A&gt;::call_box::h4498816167135712709 34: 0x103e486d7 - rt::unwind::try::try_fn::h2387014819904265058 35: 0x1079fbea8 - rust_try_inner 36: 0x1079fbe95 - rust_try 37: 0x103e489ca - boxed::F.FnBox&lt;A&gt;::call_box::h4850138824497903476 38: 0x10795b37d - sys::thread::create::thread_start::h42d6d904fce5365aihH 39: 0x7fff82bc6267 - _pthread_body 40: 0x7fff82bc61e4 - _pthread_start"><pre class="notranslate"><code class="notranslate">error: internal compiler error: Impl DefId { krate: 2, node: 39365 } was matchable against Obligation(predicate=Binder(TraitPredicate(core::ops::Sub&lt;_&gt;)),depth=1) but now is not note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:190 stack backtrace: 1: 0x107943f77 - sys::backtrace::write::h799ab135045ca9ca1LC 2: 0x107971e4d - panicking::on_panic::h9502e488a92fc8bcHAI 3: 0x1078962de - rt::unwind::begin_unwind_inner::hf0537788ee16eadbiiI 4: 0x1070755ae - rt::unwind::begin_unwind::h447731439410619827 5: 0x107075df9 - diagnostic::Handler::bug::hb6bac6e14e70580aZsB 6: 0x104b9c3be - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::rematch_impl::h00902254f92fe252QxT 7: 0x104b9bd08 - middle::infer::InferCtxt&lt;'a, 'tcx&gt;::commit_if_ok::h14474907185931287891 8: 0x104b7ce94 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::confirm_candidate::h3f1d070f70ab815cMPS 9: 0x104b509c6 - middle::traits::select::SelectionContext&lt;'cx, 'tcx&gt;::select::hc528f249f6251cb8OQQ 10: 0x104b6098a - middle::traits::project::project_type::h7ca468ea33bc79f1AwP 11: 0x104b5e367 - middle::traits::project::opt_normalize_projection_type::h766518f8b1310230cpP 12: 0x104b57d86 - middle::traits::project::poly_project_and_unify_type::closure.83535 13: 0x104b55bc0 - middle::traits::project::poly_project_and_unify_type::h44012951a95c13e5l5O 14: 0x104b4d206 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select::h7d8cf023413c2180uHO 15: 0x104b4c848 - middle::traits::fulfill::FulfillmentContext&lt;'tcx&gt;::select_where_possible::h0397a49aa695a23cIGO 16: 0x103efa433 - check::vtable::select_fcx_obligations_where_possible::h99330aa4e9f6a658d4b 17: 0x103f3448d - check::FnCtxt&lt;'a, 'tcx&gt;::resolve_type_vars_if_possible::h7c8e59ec20a8f3b2qYo 18: 0x103fb0a3e - check::op::check_binop::h7e7f29a781258fb2u5m 19: 0x10400878d - check::check_expr_with_unifier::h13696137427352880546 20: 0x103ff552c - check::check_expr_with_unifier::h7970691808293538245 21: 0x103fb0a33 - check::op::check_binop::h7e7f29a781258fb2u5m 22: 0x103ff43c3 - check::check_expr_with_unifier::h7970691808293538245 23: 0x10400fab9 - check::check_expr_with_unifier::h6698900367440735538 24: 0x103fbe705 - check::check_block_with_expected::h60bff5b1f9d55793fps 25: 0x103f9ae05 - check::check_fn::h410d0ffafb47f675l1n 26: 0x103fb932e - check::check_bare_fn::h05c77be534ada2cfUQn 27: 0x103fb2ee2 - check::check_item::h9d89bedf29e4fe82F9n 28: 0x10408f676 - check_crate::closure.36302 29: 0x104089ae7 - check_crate::h09aa7856a322fd44bwC 30: 0x103da9355 - driver::phase_3_run_analysis_passes::h1af60e7c926ca39dgGa 31: 0x103d8da85 - driver::compile_input::h27cf4320fd56e5cbQba 32: 0x103e4ba15 - run_compiler::h93c68a2a3c26052bV4b 33: 0x103e491e2 - boxed::F.FnBox&lt;A&gt;::call_box::h4498816167135712709 34: 0x103e486d7 - rt::unwind::try::try_fn::h2387014819904265058 35: 0x1079fbea8 - rust_try_inner 36: 0x1079fbe95 - rust_try 37: 0x103e489ca - boxed::F.FnBox&lt;A&gt;::call_box::h4850138824497903476 38: 0x10795b37d - sys::thread::create::thread_start::h42d6d904fce5365aihH 39: 0x7fff82bc6267 - _pthread_body 40: 0x7fff82bc61e4 - _pthread_start </code></pre></div>
1
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; foo = pd.DataFrame({&quot;A&quot;:[&quot;One&quot;,&quot;Three&quot;,&quot;Four&quot;], &quot;B&quot;: range(3)}) &gt;&gt;&gt; print(foo.to_string()) A B 0 One 0 1 Three 1 2 Four 2 &gt;&gt;&gt; print(foo.to_string(index=False)) A B One 0 Three 1 Four 2"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">"A"</span>:[<span class="pl-s">"One"</span>,<span class="pl-s">"Three"</span>,<span class="pl-s">"Four"</span>], <span class="pl-s">"B"</span>: <span class="pl-en">range</span>(<span class="pl-c1">3</span>)}) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">print</span>(<span class="pl-s1">foo</span>.<span class="pl-en">to_string</span>()) <span class="pl-v">A</span> <span class="pl-v">B</span> <span class="pl-c1">0</span> <span class="pl-v">One</span> <span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-v">Three</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-v">Four</span> <span class="pl-c1">2</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">print</span>(<span class="pl-s1">foo</span>.<span class="pl-en">to_string</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)) <span class="pl-v">A</span> <span class="pl-v">B</span> <span class="pl-v">One</span> <span class="pl-c1">0</span> <span class="pl-v">Three</span> <span class="pl-c1">1</span> <span class="pl-v">Four</span> <span class="pl-c1">2</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">Columns headers lose alignment when <code class="notranslate">to_string</code> is passed <code class="notranslate">index=False</code>.</p> <h4 dir="auto">Expected Output</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; print(foo.to_string()) A B One 0 Three 1 Four 2"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">print</span>(<span class="pl-s1">foo</span>.<span class="pl-en">to_string</span>()) <span class="pl-v">A</span> <span class="pl-v">B</span> <span class="pl-v">One</span> <span class="pl-c1">0</span> <span class="pl-v">Three</span> <span class="pl-c1">1</span> <span class="pl-v">Four</span> <span class="pl-c1">2</span></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.5.2.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.4.0-43-Microsoft<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: C.UTF-8<br> LANG: C.UTF-8<br> LOCALE: en_US.UTF-8</p> <p dir="auto">pandas: 0.22.0<br> pytest: None<br> pip: 10.0.1<br> setuptools: 39.1.0<br> Cython: None<br> numpy: 1.14.3<br> scipy: 1.1.0<br> pyarrow: None<br> xarray: None<br> IPython: 6.4.0<br> sphinx: None<br> patsy: None<br> dateutil: 2.7.3<br> pytz: 2018.4<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> feather: None<br> matplotlib: None<br> openpyxl: None<br> xlrd: 1.1.0<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: 1.0.1<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: 2.7.4 (dt dec pq3 ext lo64)<br> jinja2: 2.10<br> s3fs: None<br> fastparquet: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[...] reading sources... [ 75%] io Exception occurred while building, starting debugger: Traceback (most recent call last): File &quot;c:\portabel\python27\lib\site-packages\sphinx\cmdline.py&quot;, line 246, in main app.build(force_all, filenames) File &quot;c:\portabel\python27\lib\site-packages\sphinx\application.py&quot;, line 212, in build self.builder.build_update() File &quot;c:\portabel\python27\lib\site-packages\sphinx\builders\__init__.py&quot;, lin e 214, in build_update 'out of date' % len(to_build)) File &quot;c:\portabel\python27\lib\site-packages\sphinx\builders\__init__.py&quot;, lin e 234, in build purple, length): File &quot;c:\portabel\python27\lib\site-packages\sphinx\builders\__init__.py&quot;, lin e 134, in status_iterator for item in iterable: File &quot;c:\portabel\python27\lib\site-packages\sphinx\environment.py&quot;, line 470, in update_generator self.read_doc(docname, app=app) File &quot;c:\portabel\python27\lib\site-packages\sphinx\environment.py&quot;, line 621, in read_doc raise SphinxError(str(err)) SphinxError: 'utf8' codec can't decode byte 0x84 in position 25: invalid start b yte"><pre class="notranslate"><code class="notranslate">[...] reading sources... [ 75%] io Exception occurred while building, starting debugger: Traceback (most recent call last): File "c:\portabel\python27\lib\site-packages\sphinx\cmdline.py", line 246, in main app.build(force_all, filenames) File "c:\portabel\python27\lib\site-packages\sphinx\application.py", line 212, in build self.builder.build_update() File "c:\portabel\python27\lib\site-packages\sphinx\builders\__init__.py", lin e 214, in build_update 'out of date' % len(to_build)) File "c:\portabel\python27\lib\site-packages\sphinx\builders\__init__.py", lin e 234, in build purple, length): File "c:\portabel\python27\lib\site-packages\sphinx\builders\__init__.py", lin e 134, in status_iterator for item in iterable: File "c:\portabel\python27\lib\site-packages\sphinx\environment.py", line 470, in update_generator self.read_doc(docname, app=app) File "c:\portabel\python27\lib\site-packages\sphinx\environment.py", line 621, in read_doc raise SphinxError(str(err)) SphinxError: 'utf8' codec can't decode byte 0x84 in position 25: invalid start b yte </code></pre></div> <p dir="auto">The problem is the following line in io.rst:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" data = 'word,length\nTr\xe4umen,7\nGr\xfc\xdfe,5'"><pre class="notranslate"><code class="notranslate"> data = 'word,length\nTr\xe4umen,7\nGr\xfc\xdfe,5' </code></pre></div>
0
<p dir="auto">I'm experiencing some type promotion errors after upgrading to <code class="notranslate">numpy==1.23.0</code>. I'm guessing it's probably not fully supported yet---my current JAX version is <code class="notranslate">0.3.13</code>.</p> <p dir="auto">The following is a basic repro to trigger the error:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax import jax.numpy as jnp jax.grad(lambda x: jnp.sum(jax.nn.softplus(x)))(jnp.array([1.0, 2.0, 3.0]))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span> <span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">jnp</span> <span class="pl-s1">jax</span>.<span class="pl-en">grad</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-s1">jnp</span>.<span class="pl-en">sum</span>(<span class="pl-s1">jax</span>.<span class="pl-s1">nn</span>.<span class="pl-en">softplus</span>(<span class="pl-s1">x</span>)))(<span class="pl-s1">jnp</span>.<span class="pl-en">array</span>([<span class="pl-c1">1.0</span>, <span class="pl-c1">2.0</span>, <span class="pl-c1">3.0</span>]))</pre></div> <p dir="auto">Filtered stack trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="The above exception was the direct cause of the following exception: Traceback (most recent call last): File &quot;jax_bug.py&quot;, line 4, in &lt;module&gt; jax.grad(lambda x: jnp.sum(jax.nn.softplus(x)))(jnp.array([1.0, 2.0, 3.0])) File &quot;jax_bug.py&quot;, line 4, in &lt;lambda&gt; jax.grad(lambda x: jnp.sum(jax.nn.softplus(x)))(jnp.array([1.0, 2.0, 3.0])) File &quot;/home/sean/.local/lib/python3.8/site-packages/jax/_src/nn/functions.py&quot;, line 66, in softplus return jnp.logaddexp(x, 0) File &quot;/home/sean/.local/lib/python3.8/site-packages/jax/_src/numpy/ufuncs.py&quot;, line 361, in _logaddexp_jvp x1, x2, t1, t2 = _promote_args_inexact(&quot;logaddexp_jvp&quot;, x1, x2, t1, t2) File &quot;/home/sean/.local/lib/python3.8/site-packages/jax/_src/numpy/util.py&quot;, line 327, in _promote_args_inexact return _promote_shapes(fun_name, *_promote_dtypes_inexact(*args)) File &quot;/home/sean/.local/lib/python3.8/site-packages/jax/_src/numpy/util.py&quot;, line 262, in _promote_dtypes_inexact to_dtype, weak_type = dtypes._lattice_result_type(*args) KeyError: dtype([('float0', 'V')])"><pre class="notranslate"><code class="notranslate">The above exception was the direct cause of the following exception: Traceback (most recent call last): File "jax_bug.py", line 4, in &lt;module&gt; jax.grad(lambda x: jnp.sum(jax.nn.softplus(x)))(jnp.array([1.0, 2.0, 3.0])) File "jax_bug.py", line 4, in &lt;lambda&gt; jax.grad(lambda x: jnp.sum(jax.nn.softplus(x)))(jnp.array([1.0, 2.0, 3.0])) File "/home/sean/.local/lib/python3.8/site-packages/jax/_src/nn/functions.py", line 66, in softplus return jnp.logaddexp(x, 0) File "/home/sean/.local/lib/python3.8/site-packages/jax/_src/numpy/ufuncs.py", line 361, in _logaddexp_jvp x1, x2, t1, t2 = _promote_args_inexact("logaddexp_jvp", x1, x2, t1, t2) File "/home/sean/.local/lib/python3.8/site-packages/jax/_src/numpy/util.py", line 327, in _promote_args_inexact return _promote_shapes(fun_name, *_promote_dtypes_inexact(*args)) File "/home/sean/.local/lib/python3.8/site-packages/jax/_src/numpy/util.py", line 262, in _promote_dtypes_inexact to_dtype, weak_type = dtypes._lattice_result_type(*args) KeyError: dtype([('float0', 'V')]) </code></pre></div> <p dir="auto">Note from the stacktrace I thought the culprit would be from <code class="notranslate">logaddexp</code>, so I tried:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax import jax.numpy as jnp jax.grad(lambda x: jnp.sum(jnp.logaddexp(x, 0)))(jnp.array([1.0, 2.0, 3.0]))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span> <span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">jnp</span> <span class="pl-s1">jax</span>.<span class="pl-en">grad</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-s1">jnp</span>.<span class="pl-en">sum</span>(<span class="pl-s1">jnp</span>.<span class="pl-en">logaddexp</span>(<span class="pl-s1">x</span>, <span class="pl-c1">0</span>)))(<span class="pl-s1">jnp</span>.<span class="pl-en">array</span>([<span class="pl-c1">1.0</span>, <span class="pl-c1">2.0</span>, <span class="pl-c1">3.0</span>]))</pre></div> <p dir="auto">which is the exact implementation of <code class="notranslate">jax.nn.softplus</code> and it runs without issue</p> <p dir="auto">Also note that downgrading to <code class="notranslate">numpy==1.22.3</code> gets rid of the error completely</p>
<p dir="auto">Something in the numpy 1.23 release broke autodiff; in particular, float0 arrays are being converted to bool:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax import numpy print(numpy.__version__) print(jax.grad(lambda x: x+0., allow_int=True)(1).dtype)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-en">print</span>(<span class="pl-s1">numpy</span>.<span class="pl-s1">__version__</span>) <span class="pl-en">print</span>(<span class="pl-s1">jax</span>.<span class="pl-en">grad</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-s1">x</span><span class="pl-c1">+</span><span class="pl-c1">0.</span>, <span class="pl-s1">allow_int</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)(<span class="pl-c1">1</span>).<span class="pl-s1">dtype</span>)</pre></div> <p dir="auto">Newest numpy:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.23.0 bool"><pre class="notranslate"><code class="notranslate">1.23.0 bool </code></pre></div> <p dir="auto">previous version:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.22.4 [('float0', 'V')]"><pre class="notranslate"><code class="notranslate">1.22.4 [('float0', 'V')] </code></pre></div>
1
<p dir="auto">I'm trying to build the atom-editor from source om my ubuntu 14.04 armhf machine.<br> but I get stuck when the build script is trying to download pre-builts for arm (which don't yet exist)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Node: v0.10.32 npm: v1.4.28 Installing build modules... Installing apm... Installing modules ✓ Deduping modules ✓ Running &quot;download-atom-shell&quot; task &gt;&gt; Cannot find atom-shell-v0.17.1-linux-arm.zip in atom-shell v0.17.1 release Aborted due to warnings."><pre class="notranslate"><code class="notranslate">Node: v0.10.32 npm: v1.4.28 Installing build modules... Installing apm... Installing modules ✓ Deduping modules ✓ Running "download-atom-shell" task &gt;&gt; Cannot find atom-shell-v0.17.1-linux-arm.zip in atom-shell v0.17.1 release Aborted due to warnings. </code></pre></div> <p dir="auto">Then I tried building atom-script by myself, but I got stuck at the<br> <code class="notranslate">git update --init --recursive</code><br> command in <code class="notranslate">vendor/node</code><br> when running <code class="notranslate">script/bootstrap.py</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: reference is not a tree: a80a10c6a1f2c668d90eda4e2c9aab38e4dcd4a2 Unable to checkout 'a80a10c6a1f2c668d90eda4e2c9aab38e4dcd4a2' in submodule path 'vendor/node' Traceback (most recent call last): File &quot;script/bootstrap.py&quot;, line 119, in &lt;module&gt; sys.exit(main()) File &quot;script/bootstrap.py&quot;, line 23, in main update_submodules() File &quot;script/bootstrap.py&quot;, line 53, in update_submodules execute(['git', 'submodule', 'update', '--init', '--recursive']) File &quot;/root/git/atom3/atom-shell/script/lib/util.py&quot;, line 142, in execute raise e subprocess.CalledProcessError: Command '['git', 'submodule', 'update', '--init', '--recursive']' returned non-zero exit status 1"><pre class="notranslate"><code class="notranslate">fatal: reference is not a tree: a80a10c6a1f2c668d90eda4e2c9aab38e4dcd4a2 Unable to checkout 'a80a10c6a1f2c668d90eda4e2c9aab38e4dcd4a2' in submodule path 'vendor/node' Traceback (most recent call last): File "script/bootstrap.py", line 119, in &lt;module&gt; sys.exit(main()) File "script/bootstrap.py", line 23, in main update_submodules() File "script/bootstrap.py", line 53, in update_submodules execute(['git', 'submodule', 'update', '--init', '--recursive']) File "/root/git/atom3/atom-shell/script/lib/util.py", line 142, in execute raise e subprocess.CalledProcessError: Command '['git', 'submodule', 'update', '--init', '--recursive']' returned non-zero exit status 1 </code></pre></div> <p dir="auto">Can anyone help me with this?</p>
<p dir="auto">Is there a way to cross/compile atom-shell for ARM based computers?</p>
1
<p dir="auto">It seems a bit out of date.</p>
<h4 dir="auto">Steps/Code to Reproduce</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np from sklearn.neighbors import LocalOutlierFactor c=np.array([[0,0],[0,1],[1,1],[3,0]]) k=2 #numNeighbours clf = LocalOutlierFactor(n_neighbors=k, n_jobs=-1,algorithm='brute',metric='manhattan').fit(c) Z = clf._decision_function(c) print(-Z) [ 0.875 0.875 0.875 1.5 ]"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">neighbors</span> <span class="pl-k">import</span> <span class="pl-v">LocalOutlierFactor</span> <span class="pl-s1">c</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-en">array</span>([[<span class="pl-c1">0</span>,<span class="pl-c1">0</span>],[<span class="pl-c1">0</span>,<span class="pl-c1">1</span>],[<span class="pl-c1">1</span>,<span class="pl-c1">1</span>],[<span class="pl-c1">3</span>,<span class="pl-c1">0</span>]]) <span class="pl-s1">k</span><span class="pl-c1">=</span><span class="pl-c1">2</span> <span class="pl-c">#numNeighbours</span> <span class="pl-s1">clf</span> <span class="pl-c1">=</span> <span class="pl-v">LocalOutlierFactor</span>(<span class="pl-s1">n_neighbors</span><span class="pl-c1">=</span><span class="pl-s1">k</span>, <span class="pl-s1">n_jobs</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>,<span class="pl-s1">algorithm</span><span class="pl-c1">=</span><span class="pl-s">'brute'</span>,<span class="pl-s1">metric</span><span class="pl-c1">=</span><span class="pl-s">'manhattan'</span>).<span class="pl-en">fit</span>(<span class="pl-s1">c</span>) <span class="pl-v">Z</span> <span class="pl-c1">=</span> <span class="pl-s1">clf</span>.<span class="pl-en">_decision_function</span>(<span class="pl-s1">c</span>) <span class="pl-en">print</span>(<span class="pl-c1">-</span><span class="pl-v">Z</span>) [ <span class="pl-c1">0.875</span> <span class="pl-c1">0.875</span> <span class="pl-c1">0.875</span> <span class="pl-c1">1.5</span> ]</pre></div> <p dir="auto">However, the result should be: [ 0.875 1.333 0.875 2. ] if you work it out by hand (assuming a sample can't be the 1st nearest neighbour to itself). So, I think there is something wrong with the LOF implementation. Could somebody confirm either way?</p>
0
<p dir="auto">Per <a href="https://discord.com/channels/684898665143206084/684898665151594506/963157330764107776" rel="nofollow">this convo</a>.</p> <p dir="auto">When I perform the following (on <code class="notranslate">macos x86_64 v1.20.4</code>),</p> <ol dir="auto"> <li>run <code class="notranslate">RUST_BACKTRACE=1 deno</code> to open a REPL, then</li> <li>enter <code class="notranslate">console.log(String.fromCharCode(55296))</code> and press enter</li> </ol> <p dir="auto">deno panics and outputs the following backtrace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error(&quot;unexpected end of hex escape&quot;, line: 1, column: 101)', /private/tmp/deno-20220406-92106-p4p5kp/deno/core/inspector.rs:724:66 stack backtrace: 0: _rust_begin_unwind 1: core::panicking::panic_fmt 2: core::result::unwrap_failed 3: core::result::Result&lt;T,E&gt;::unwrap 4: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 5: &lt;futures_util::future::select::Select&lt;A,B&gt; as core::future::future::Future&gt;::poll 6: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 7: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 8: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 9: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 10: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 11: deno::tools::repl::run::{{closure}} 12: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 13: deno::main::{{closure}} 14: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 15: deno_runtime::tokio_util::run_basic 16: deno::main note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace."><pre class="notranslate"><code class="notranslate">thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unexpected end of hex escape", line: 1, column: 101)', /private/tmp/deno-20220406-92106-p4p5kp/deno/core/inspector.rs:724:66 stack backtrace: 0: _rust_begin_unwind 1: core::panicking::panic_fmt 2: core::result::unwrap_failed 3: core::result::Result&lt;T,E&gt;::unwrap 4: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 5: &lt;futures_util::future::select::Select&lt;A,B&gt; as core::future::future::Future&gt;::poll 6: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 7: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 8: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 9: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 10: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 11: deno::tools::repl::run::{{closure}} 12: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 13: deno::main::{{closure}} 14: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 15: deno_runtime::tokio_util::run_basic 16: deno::main note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. </code></pre></div> <p dir="auto">According to other folks on Discord, the same behavior happens for other architectures.</p>
<p dir="auto">Logging a string with an unpaired surrogate unit (<code class="notranslate">console.log("\uDE00")</code>) causes Deno to crash. Similarly, when an object contains such a string, logging it also causes a crash (<code class="notranslate">console.log({x:"\uDE00"})</code>)</p> <p dir="auto">Note that <code class="notranslate">alert</code> and <code class="notranslate">Deno.core.print</code> do not crash in this situation</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RUST_BACKTRACE=1 deno Deno 1.14.1 exit using ctrl+d or close() &gt; console.log(&quot;\uDE00&quot;) � thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error(&quot;lone leading surrogate in hex escape&quot;, line: 1, column: 100)', /Users/ry/src/deno/core/inspector.rs:718:52 stack backtrace: 0: _rust_begin_unwind 1: core::panicking::panic_fmt 2: core::result::unwrap_failed 3: core::result::Result&lt;T,E&gt;::unwrap 4: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 5: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 6: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 7: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 8: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 9: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 10: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 11: deno::tools::repl::run::{{closure}} 12: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 13: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 14: deno::main note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace."><pre class="notranslate"><code class="notranslate">RUST_BACKTRACE=1 deno Deno 1.14.1 exit using ctrl+d or close() &gt; console.log("\uDE00") � thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("lone leading surrogate in hex escape", line: 1, column: 100)', /Users/ry/src/deno/core/inspector.rs:718:52 stack backtrace: 0: _rust_begin_unwind 1: core::panicking::panic_fmt 2: core::result::unwrap_failed 3: core::result::Result&lt;T,E&gt;::unwrap 4: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 5: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 6: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 7: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 8: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 9: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 10: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 11: deno::tools::repl::run::{{closure}} 12: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 13: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 14: deno::main note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. </code></pre></div>
1
<p dir="auto">Plot function in matplotlib 3.1.3 generate following strips.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ones = np.ones((200,100)) cumsum = np.cumsum(ones, axis=1) plt.plot(cumsum, linestyle='', marker='o', markersize=0.6, color=&quot;k&quot;);"><pre class="notranslate"><code class="notranslate">ones = np.ones((200,100)) cumsum = np.cumsum(ones, axis=1) plt.plot(cumsum, linestyle='', marker='o', markersize=0.6, color="k"); </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/38831582/76927446-4d01f580-6922-11ea-9619-077d7ad6a97e.jpg"><img src="https://user-images.githubusercontent.com/38831582/76927446-4d01f580-6922-11ea-9619-077d7ad6a97e.jpg" alt="200" style="max-width: 100%;"></a></p>
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">When I try to plot a scatterplot where all points are positioned in a regular 2D-grid layout, plotted points are not evenly spaced. Spacings differ systematically which leads to strange regular vertical patterns. With a 100x100 grid, this is the case for (9, 9) or smaller figures. Patterns get less visible with larger figures and disappear around (12, 12)</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import matplotlib.pyplot as plt x = np.tile(np.arange(100), 100) y = np.repeat(np.arange(100), 100) f, ax = plt.subplots(figsize=(7, 7)) ax.scatter(x, y, s=1, c='k')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">tile</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">100</span>), <span class="pl-c1">100</span>) <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">repeat</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">100</span>), <span class="pl-c1">100</span>) <span class="pl-s1">f</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">7</span>, <span class="pl-c1">7</span>)) <span class="pl-s1">ax</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>, <span class="pl-s1">s</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">c</span><span class="pl-c1">=</span><span class="pl-s">'k'</span>)</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1140359/50409159-5ef7f580-07be-11e9-9083-5ce18d34311a.png"><img src="https://user-images.githubusercontent.com/1140359/50409159-5ef7f580-07be-11e9-9083-5ce18d34311a.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">Here is a figure of size (12, 12):</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1140359/50409217-fa896600-07be-11e9-8ce9-24a8294472cd.png"><img src="https://user-images.githubusercontent.com/1140359/50409217-fa896600-07be-11e9-8ce9-24a8294472cd.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Here is a figure from R for comparison:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1140359/50409242-3de3d480-07bf-11e9-99f1-35cc481e0edf.png"><img src="https://user-images.githubusercontent.com/1140359/50409242-3de3d480-07bf-11e9-99f1-35cc481e0edf.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: osx 10.14</li> <li>Matplotlib version: 3.0.2</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://ipykernel.pylab.backend_inline</li> <li>Python version: 3.6.6</li> <li>Jupyter version (if applicable): 4.4.0</li> </ul>
1
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide a description of the new feature</h2> <p dir="auto">Think about origin Win10's zones:</p> <ul dir="auto"> <li>We count pin a window to right half of screen by Win+→</li> <li>Then pin to bottom-right but Win+↓</li> <li>At last, restore it to right zone by Win+↑</li> </ul> <p dir="auto">I mean, when moving window across zones, could we change the step from single shortcut to double shortcuts?<br> Just like grid layout, with a window in bottom-right zone:</p> <ul dir="auto"> <li>When pressed Win+↑, it spans across 2 zones to the left side of screen instead of moving to top-right</li> <li>Then press Win+↑ again, it shirnks to top-right</li> </ul> <h2 dir="auto">Why do we need this?</h2> <p dir="auto">I'm using grid layout to arrange 4 docs/browsers for browsing infomations, placing music player, etc.</p> <p dir="auto">Then when I came up to work with something, I need a workspace <strong>large enough</strong>. That is, an interactive window(mso word, or IDE) spans across 2 zones, and leave 2 zones remain for retrieving infomations.</p> <p dir="auto">But I couldn't use Win+↑ or Win+← to span my window ascross zones. I can only drag my window's boarder to resize it.</p> <p dir="auto">It is not elegant.</p> <p dir="auto">We need cross-zone-spanning.</p> <hr> <p dir="auto">If you'd like to see this feature implemented, add a <g-emoji class="g-emoji" alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png">👍</g-emoji> reaction to this post.</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">using a hotkey + arrow combination for the direction, it should be possible to make a window grow or shrink</p> <p dir="auto">When you want to grow a window that you have snapped to a smaller zone, and you want to make it temporarily larger, you have to manually make it longer or wider. It would be easier if you could use a key+arrow combo to grow the window with the zone the arrow points to.</p> <p dir="auto">Of course, this should be restricted to zones that combine to rectangles.</p> <p dir="auto">I don't know if this matches your vision of the product, but this is what I miss in the current version. Or maybe this functionality already exists and I have missed it.</p>
1
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: v1909 PowerToys version: v0.15.2 PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: v1909 PowerToys version: v0.15.2 PowerToy module for which you are reporting the bug (if applicable): FancyZones </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Setup zones and assign several applications to several zones</li> <li>Plugin in multiple monitors</li> <li>Put machine to sleep</li> <li>Wake machine</li> </ol> <h1 dir="auto">Expected behavior</h1> <ol dir="auto"> <li>Both monitors appear to wake from sleep immediately</li> <li>All application windows stay put</li> </ol> <h1 dir="auto">Actual behavior</h1> <ol dir="auto"> <li>Both monitors appear to wake from sleep immediately</li> <li>All application windows move from secondary display to primary display</li> </ol> <p dir="auto">I can record a video if that isn't clear.</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">As a developer with 5 monitors, whenever I have to go to a meeting which requires my laptop, I usually have to spend a couple minutes minimizing windows once un-docked, then 3-5 minutes re-positioning/resizing a bazillion windows back onto my multiple monitors.</p> <p dir="auto">It would be awesome to have a PowerToy that at least attempted to keep my layout between dock cycles, maybe integrated into the virtual desktops feature in Windows 10</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1> <p dir="auto">Whenever a graphics/monitor hardware event occurs, and before Windows re-positions all windows, take a snapshot of the monitor layout, all main window handles and their current positions.</p> <p dir="auto">Then, check if the new layout/monitor configuration matches to any previous snapshots, and align the windows accordingly.</p> <p dir="auto">The initial version could just go off window handles, but maybe future versions could allow users to specify regular expressions for window titles/tab names (in the event windows are closed then re-opened.)</p>
1
<p dir="auto">Task:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: install authorized keys action: authorized_key user={{item}} key=&quot;{{ lookup('file', 'authorized_keys') }}&quot; with_items: ssh_key_users"><pre class="notranslate"><code class="notranslate">- name: install authorized keys action: authorized_key user={{item}} key="{{ lookup('file', 'authorized_keys') }}" with_items: ssh_key_users </code></pre></div> <p dir="auto">This worked under ansible 1.3.3. With devel branch I get:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [ssh_key | install authorized keys] ************************************* fatal: [ubutest] =&gt; One or more undefined variables: 'lookup' is undefined FATAL: all hosts have already failed -- aborting"><pre class="notranslate"><code class="notranslate">TASK: [ssh_key | install authorized keys] ************************************* fatal: [ubutest] =&gt; One or more undefined variables: 'lookup' is undefined FATAL: all hosts have already failed -- aborting </code></pre></div>
<p dir="auto">The following documented use of the lookup plugin</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" --- - hosts: all tasks: - debug: msg=&quot;{{ lookup('env','HOME') }} is an environment variable&quot;"><pre class="notranslate"><code class="notranslate"> --- - hosts: all tasks: - debug: msg="{{ lookup('env','HOME') }} is an environment variable" </code></pre></div> <p dir="auto">now generates the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [debug msg=&quot;{{lookup('env','HOME')}} is an environment variable&quot;] ******* fatal: [localhost] =&gt; One or more undefined variables: 'lookup' is undefined"><pre class="notranslate"><code class="notranslate">TASK: [debug msg="{{lookup('env','HOME')}} is an environment variable"] ******* fatal: [localhost] =&gt; One or more undefined variables: 'lookup' is undefined </code></pre></div> <p dir="auto">I've traced this back to commit 5031104.</p>
1
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: v1.33.0</li> <li>Operating System: macOS 13.2,</li> <li>Browser: All</li> <li>Other info:</li> </ul> <p dir="auto">An issue with custom Errors that have a getter for the message property.</p> <p dir="auto">For some reason, Playwright is trying to set the message property of the error object, which is not allowed in some Error classes.<br> So, this causes a TypeError to be thrown</p> <h3 dir="auto">Source code</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided the exact source code that allows reproducing the issue locally.</li> </ul> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test } from &quot;@playwright/test&quot;; import { z } from &quot;zod&quot;; class MyError extends Error { #issues: string[] = []; constructor(message: string) { super(); this.name = &quot;MyError&quot;; this.#issues.push(message); } get message() { return this.#issues.join(&quot;\n&quot;); } } test(&quot;Error&quot;, async () =&gt; { // Error: Error message throw new Error(&quot;Error message&quot;); // TypeError: Cannot set property message of Error which has only a getter throw new MyError(&quot;Error message&quot;); z.object({ name: z.string(), }) // TypeError: Cannot set property message of [object Object] which has only a getter .parse({ // throws ZodError with only message getter name: undefined, }); }); "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"@playwright/test"</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">z</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"zod"</span><span class="pl-kos">;</span> <span class="pl-k">class</span> <span class="pl-smi">MyError</span> <span class="pl-k">extends</span> <span class="pl-smi">Error</span> <span class="pl-kos">{</span> #issues: <span class="pl-smi">string</span><span class="pl-kos">[</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">message</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">name</span> <span class="pl-c1">=</span> <span class="pl-s">"MyError"</span><span class="pl-kos">;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span>#issues<span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">message</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">get</span> <span class="pl-en">message</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span>#issues<span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s">"\n"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"Error"</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// Error: Error message</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">Error</span><span class="pl-kos">(</span><span class="pl-s">"Error message"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// TypeError: Cannot set property message of Error which has only a getter</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">MyError</span><span class="pl-kos">(</span><span class="pl-s">"Error message"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">z</span><span class="pl-kos">.</span><span class="pl-en">object</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s1">z</span><span class="pl-kos">.</span><span class="pl-en">string</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c">// TypeError: Cannot set property message of [object Object] which has only a getter</span> <span class="pl-kos">.</span><span class="pl-en">parse</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c">// throws ZodError with only message getter</span> <span class="pl-c1">name</span>: <span class="pl-c1">undefined</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p> <p dir="auto"><a href="https://github.com/doichev-kostia/playwright-typeerror">repo with an example</a></p> <p dir="auto"><strong>Config file</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts export default defineConfig({ testDir: &quot;./tests&quot;, fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 1 : undefined, reporter: &quot;html&quot;, use: { trace: &quot;on-first-retry&quot;, }, projects: [ { name: &quot;chromium&quot;, use: { ...devices[&quot;Desktop Chrome&quot;] }, }, { name: &quot;firefox&quot;, use: { ...devices[&quot;Desktop Firefox&quot;] }, }, { name: &quot;webkit&quot;, use: { ...devices[&quot;Desktop Safari&quot;] }, }, ], }); "><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">testDir</span>: <span class="pl-s">"./tests"</span><span class="pl-kos">,</span> <span class="pl-c1">fullyParallel</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">forbidOnly</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span><span class="pl-kos">,</span> <span class="pl-c1">retries</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">2</span> : <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">workers</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">1</span> : <span class="pl-c1">undefined</span><span class="pl-kos">,</span> <span class="pl-c1">reporter</span>: <span class="pl-s">"html"</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> <span class="pl-c1">trace</span>: <span class="pl-s">"on-first-retry"</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">projects</span>: <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"chromium"</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">"Desktop Chrome"</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"firefox"</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">"Desktop Firefox"</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"webkit"</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">"Desktop Safari"</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Steps</strong></p> <ul dir="auto"> <li>[Run the test]</li> <li>[Get an error]</li> </ul> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">The playwright should not modify the original error message as some custom Errors do not provide a setter</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto"><code class="notranslate">TypeError: Cannot set property message of [object Object] which has only a getter</code><br> <code class="notranslate">TypeError: Cannot set property message of Error which has only a getter</code></p>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v1.28.1]</li> <li>Operating System: [Android]</li> <li>Browser: [Chromium]</li> <li>Other info: Using realMobile on BrowserStack</li> </ul> <h3 dir="auto">Source code</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li> </ul> <p dir="auto"><strong>Config file</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts import { defineConfig, devices } from '@playwright/test'; export type BrowserStackTestOptions = { os: string; browser: string; browserName: string; browserVersion: string; osVersion: string; realMobile: boolean; deviceName: string; }; export default defineConfig&lt;BrowserStackTestOptions&gt;({ projects: [ { name: 'browserstack.android-chrome-latest', use: { osVersion: '12.0', deviceName: 'Samsung Galaxy S22 Ultra', realMobile: true, browserName: 'chromium', }, }, });"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-s1">type</span> <span class="pl-v">BrowserStackTestOptions</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">os</span>: <span class="pl-s1">string</span><span class="pl-kos"></span><span class="pl-kos">;</span> browser: <span class="pl-s1">string</span><span class="pl-kos">;</span> browserName: <span class="pl-s1">string</span><span class="pl-kos">;</span> browserVersion: <span class="pl-s1">string</span><span class="pl-kos">;</span> osVersion: <span class="pl-s1">string</span><span class="pl-kos">;</span> realMobile: <span class="pl-s1">boolean</span><span class="pl-kos">;</span> deviceName: <span class="pl-s1">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">defineConfig</span><span class="pl-c1">&lt;</span><span class="pl-v">BrowserStackTestOptions</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">projects</span>: <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'browserstack.android-chrome-latest'</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> <span class="pl-c1">osVersion</span>: <span class="pl-s">'12.0'</span><span class="pl-kos">,</span> <span class="pl-c1">deviceName</span>: <span class="pl-s">'Samsung Galaxy S22 Ultra'</span><span class="pl-kos">,</span> <span class="pl-c1">realMobile</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">browserName</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span><span class="pl-kos"></span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Test file (self-contained)</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const patchedCaps = { /* construct browserstack capabilites from BrowserStackTestOptions in the config.project */ }; it('should verify navigation url', async ({ }) =&gt; { const browser = await _android.connect( `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify(patchedCaps))}` ); const context = await browser.launchBrowser(); const page = await context.newPage(); await page.route('https://x-cancel.examplethatdoesntexisthere.com/', async route =&gt; { route .fulfill({ status: 200, body: '&lt;html&gt;&lt;/html&gt;', }) .catch(() =&gt; {}); }); await page.goto('https://testurl.com/with-link'); await page.getByRole('button', { name: 'navigate to x-cancel url' }).click(); await page.waitForURL('https://x-cancel.examplethatdoesntexisthere.com'); expect(await page.url()).toBe('https://x-cancel.examplethatdoesntexisthere.com'); });"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">patchedCaps</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c">/* construct browserstack capabilites from BrowserStackTestOptions in the config.project */</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-en">it</span><span class="pl-kos">(</span><span class="pl-s">'should verify navigation url'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">browser</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">_android</span><span class="pl-kos">.</span><span class="pl-en">connect</span><span class="pl-kos">(</span> <span class="pl-s">`wss://cdp.browserstack.com/playwright?caps=<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-en">encodeURIComponent</span><span class="pl-kos">(</span><span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">patchedCaps</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">}</span></span>`</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">context</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">launchBrowser</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">route</span><span class="pl-kos">(</span><span class="pl-s">'https://x-cancel.examplethatdoesntexisthere.com/'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-s1">route</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">route</span> <span class="pl-kos">.</span><span class="pl-en">fulfill</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">status</span>: <span class="pl-c1">200</span><span class="pl-kos">,</span> <span class="pl-c1">body</span>: <span class="pl-s">'&lt;html&gt;&lt;/html&gt;'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">.</span><span class="pl-en">catch</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">'https://testurl.com/with-link'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByRole</span><span class="pl-kos">(</span><span class="pl-s">'button'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'navigate to x-cancel url'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">waitForURL</span><span class="pl-kos">(</span><span class="pl-s">'https://x-cancel.examplethatdoesntexisthere.com'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">url</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBe</span><span class="pl-kos">(</span><span class="pl-s">'https://x-cancel.examplethatdoesntexisthere.com'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Steps</strong></p> <ul dir="auto"> <li>[Run the test]</li> <li>[Test will fail]</li> </ul> <p dir="auto"><strong>Expected</strong><br> Should pass on Android Chrome the same way it does as on the desktop browsers.</p> <p dir="auto"><strong>Actual</strong><br> Test will fail with the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="page.route: Unknown scheme for Params: Page.setNetworkInterceptionPatterns"><pre class="notranslate"><code class="notranslate">page.route: Unknown scheme for Params: Page.setNetworkInterceptionPatterns </code></pre></div> <p dir="auto">I'm guessing it would fail on local Android device as well, but I don't have device setup locally to test. I also was unable to test with the latest version of Playwright, because Browserstack currently only has version up to 1.28.1 on Android.</p>
0
<p dir="auto"><strong>Describe the bug</strong></p> <p dir="auto">hi<br> my gltf contains a texture transformation for the normals chanel.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;materials&quot;: [ { &quot;name&quot;: &quot;Material_0&quot;, &quot;normalTexture&quot;: { &quot;extensions&quot;: { &quot;KHR_texture_transform&quot;: { &quot;scale&quot;: [ 0.1, 0.1 ] } }, &quot;index&quot;: 1 },"><pre class="notranslate"><code class="notranslate"> "materials": [ { "name": "Material_0", "normalTexture": { "extensions": { "KHR_texture_transform": { "scale": [ 0.1, 0.1 ] } }, "index": 1 }, </code></pre></div> <p dir="auto">the transformation is ignored by Three.js editor<br> my normals map contains a white polygon.<br> see snapshots from from Three.js (wrong) and khronos viewer (correct)<br> normals polygon is marked with red<br> after snapshot, I attached the gltf inside a zip file.<br> please advise<br> <strong>To Reproduce</strong></p> <p dir="auto">Steps to reproduce the behavior:</p> <ol dir="auto"> <li>open <a href="https://threejs.org/editor/" rel="nofollow">https://threejs.org/editor/</a></li> <li>import attached rectangle.gltf (extracted from rectangle.zip)</li> <li>in the scene dialog, double click rectangle.gltf</li> <li>in the Environment, select MODELVIEWER</li> <li>ERROR - The normal image should be much larger becase the KHR_texture_transform scale is 0.1</li> </ol> <p dir="auto"><em><strong>Code</strong></em></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// code goes here"><pre class="notranslate"><span class="pl-c">// code goes here</span></pre></div> <p dir="auto"><em><strong>Live example</strong></em></p> <ul dir="auto"> <li><a href="https://jsfiddle.net/hyok6tvj/" rel="nofollow">jsfiddle-latest-release</a></li> <li><a href="https://jsfiddle.net/c5m1kazu/" rel="nofollow">jsfiddle-dev</a></li> </ul> <p dir="auto"><strong>Expected behavior</strong><br> Since i was using scale transformation for the normal chanel in the material, i was expecting the normal texture to be much bigger, as viewd in khronos viewer.<br> ד</p> <p dir="auto"><strong>Screenshots</strong><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7829843/159364156-20ede746-7445-4e76-ae75-fb1a1a1a3e35.jpg"><img src="https://user-images.githubusercontent.com/7829843/159364156-20ede746-7445-4e76-ae75-fb1a1a1a3e35.jpg" alt="1" style="max-width: 100%;"></a></p> <p dir="auto"><a href="https://github.com/mrdoob/three.js/files/8319203/Rectangle.zip">Rectangle.zip</a></p> <p dir="auto"><strong>Platform:</strong></p> <ul dir="auto"> <li>Device: [Desktop]</li> <li>OS: [Windows]</li> <li>Browser: [Chrome]</li> <li>Three.js version: [dev, r138]</li> </ul>
<p dir="auto"><a href="https://plnkr.co/edit/UT9rs0Q6TO0gBxwdxLVK?p=preview" rel="nofollow">plunker</a></p> <p dir="auto">When setting the <code class="notranslate">map</code> to repeat the <code class="notranslate">alphaMap</code> is also affected.</p> <p dir="auto">I'm expecting each face of the cube to have a giant whole in the middle with the edges of the taco time texture showing near the edges of the cube in a 3x4 pattern.</p> <p dir="auto">I'm getting the 3x4 pattern of the taco time texture but the <code class="notranslate">alphaMap</code>, although it does not repeat it does scale down to the size of the other map. It also produces some nasty streaks.</p> <p dir="auto">If you comment out line 35 <code class="notranslate">material.map.repeat.set(3,4);</code> you can see what I'm expecting from the <code class="notranslate">alphaMap</code>.</p> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r79</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> ...</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> IOS</li> </ul> <h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>
1
<h5 dir="auto">Description of the problem</h5> <p dir="auto">GLTF2 models that are clones do not displayed correctly. This is for a number of reasons</p> <ul dir="auto"> <li>the onBeforeRender callback is not copied</li> <li>GLTFShader is not cloned across</li> <li>SkinnedModel skeleton is reinitialised to 0 bones and the source skinnedmodel skeleton is not cloned</li> </ul> <p dir="auto"><a href="http://jsfiddle.net/mn768h35/" rel="nofollow">http://jsfiddle.net/mn768h35/</a></p> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li>[X ] Dev</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r85</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li> </ul> <h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>
<h5 dir="auto">Description of the problem</h5> <p dir="auto">The current glTF loader works in a slightly unexpected manner: shaders and animations point to a specific instance of a loaded glTF hierarchy, so .clone() or .copy() operations on that hierarchy will drop the links, resulting in the copy not rendering nor animating.</p> <p dir="auto">I am intending to patch this in vizor.io initially by providing a deepCopyglTF() function which also goes off and clones the animations and shaders and rebinds them to the new copy.</p> <p dir="auto">However as a long-term-solution for three.js it would be preferable to be able to copy and clone these things via the standard three.js way - i.e. calling .copy() or .clone(). This would require the glTF loader to be refactored so that the loaded mesh hierarchy is entirely self contained with no extra external resources pointing to it (this would also remove the need to update glTFAnimator and glTFShaders explicitly). I'm unlikely to get to that anytime soon but would be interested in hearing if anyone else has given thought to this or is working on a similar issue?</p> <p dir="auto">ping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tparisi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tparisi">@tparisi</a></p>
1
<p dir="auto">My "current streak" seems to be broken and gives me a value of 0 when it should be 21</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/11958359/12084538/edffef20-b308-11e5-8d5a-f7a695e7b8fd.png"><img src="https://cloud.githubusercontent.com/assets/11958359/12084538/edffef20-b308-11e5-8d5a-f7a695e7b8fd.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/a0677a8013824a71474a3baa747fe644413c4c8a4fbf7bc7df68202e63cc3fa6/68747470733a2f2f7777772e657665726e6f74652e636f6d2f6c2f41715166736f482d334e704c6162786b5047335943564e484e4f73777a426746557067422f696d6167652e706e67"><img src="https://camo.githubusercontent.com/a0677a8013824a71474a3baa747fe644413c4c8a4fbf7bc7df68202e63cc3fa6/68747470733a2f2f7777772e657665726e6f74652e636f6d2f6c2f41715166736f482d334e704c6162786b5047335943564e484e4f73777a426746557067422f696d6167652e706e67" alt="" data-canonical-src="https://www.evernote.com/l/AqQfsoH-3NpLabxkPG3YCVNHNOswzBgFUpgB/image.png" style="max-width: 100%;"></a></p>
1
<p dir="auto">It would be great to have the option to disable some remaps.</p> <p dir="auto"><strong>Scenario:</strong></p> <ul dir="auto"> <li>4 remapped keys</li> <li>Laptop with external usb keyboard which is used occasionally.</li> <li>When using external keyboard 2 of the remaps are not needed.</li> <li>I have the option to disable the whole functionality but for this scenario it would be really useful to be able to disable just the remaps that I don't want.</li> </ul> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5497332/89097525-f7654b80-d3df-11ea-9512-eeebdb5e25a5.png"><img src="https://user-images.githubusercontent.com/5497332/89097525-f7654b80-d3df-11ea-9512-eeebdb5e25a5.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Thank you for this amazing toolset !</p>
<p dir="auto">Have both predefined profiles (e.g. mac/linux/etc) available to user, and also allow the user to create custom profiles.<br> Provide a quick way to switch between profiles.</p>
1
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: from pandas import Series, DataFrame In [2]: class SubclassedSeries(Series): ...: ...: @property ...: def _constructor(self): ...: return SubclassedSeries ...: ...: @property ...: def _constructor_expanddim(self): ...: return SubclassedDataFrame ...: ...: class SubclassedDataFrame(DataFrame): ...: ...: @property ...: def _constructor(self): ...: return SubclassedDataFrame ...: ...: @property ...: def _constructor_sliced(self): ...: return SubclassedSeries ...: In [3]: sdf = SubclassedDataFrame({&quot;A&quot;: [0, 1, 2], &quot;B&quot;: [0, 1, 2]}) In [4]: sdf.stack() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) &lt;ipython-input-4-987edeff1e47&gt; in &lt;module&gt;() ----&gt; 1 sdf.stack() ~/Software/miniconda3/envs/pandas_stack/lib/python3.6/site-packages/pandas/core/frame.py in stack(self, level, dropna) 4506 return stack_multiple(self, level, dropna=dropna) 4507 else: -&gt; 4508 return stack(self, level, dropna=dropna) 4509 4510 def unstack(self, level=-1, fill_value=None): ~/Software/miniconda3/envs/pandas_stack/lib/python3.6/site-packages/pandas/core/reshape/reshape.py in stack(frame, level, dropna) 545 546 klass = type(frame)._constructor_sliced --&gt; 547 return klass(new_values, index=new_index) 548 549 TypeError: 'property' object is not callable "><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">from</span> <span class="pl-s1">pandas</span> <span class="pl-k">import</span> <span class="pl-v">Series</span>, <span class="pl-v">DataFrame</span> <span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">class</span> <span class="pl-v">SubclassedSeries</span>(<span class="pl-v">Series</span>): ...: ...: @<span class="pl-s1">property</span> ...: <span class="pl-k">def</span> <span class="pl-en">_constructor</span>(<span class="pl-s1">self</span>): ...: <span class="pl-k">return</span> <span class="pl-v">SubclassedSeries</span> ...: ...: @<span class="pl-s1">property</span> ...: <span class="pl-k">def</span> <span class="pl-en">_constructor_expanddim</span>(<span class="pl-s1">self</span>): ...: <span class="pl-k">return</span> <span class="pl-v">SubclassedDataFrame</span> ...: ...: <span class="pl-k">class</span> <span class="pl-v">SubclassedDataFrame</span>(<span class="pl-v">DataFrame</span>): ...: ...: @<span class="pl-s1">property</span> ...: <span class="pl-k">def</span> <span class="pl-en">_constructor</span>(<span class="pl-s1">self</span>): ...: <span class="pl-k">return</span> <span class="pl-v">SubclassedDataFrame</span> ...: ...: @<span class="pl-s1">property</span> ...: <span class="pl-k">def</span> <span class="pl-en">_constructor_sliced</span>(<span class="pl-s1">self</span>): ...: <span class="pl-k">return</span> <span class="pl-v">SubclassedSeries</span> ...: <span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">sdf</span> <span class="pl-c1">=</span> <span class="pl-v">SubclassedDataFrame</span>({<span class="pl-s">"A"</span>: [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>], <span class="pl-s">"B"</span>: [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]}) <span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">sdf</span>.<span class="pl-en">stack</span>() <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">TypeError</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>) <span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">4</span><span class="pl-c1">-</span><span class="pl-c1">987</span><span class="pl-s1">edeff1e47</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>() <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1</span> <span class="pl-s1">sdf</span>.<span class="pl-en">stack</span>() <span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-v">Software</span><span class="pl-c1">/</span><span class="pl-s1">miniconda3</span><span class="pl-c1">/</span><span class="pl-s1">envs</span><span class="pl-c1">/</span><span class="pl-s1">pandas_stack</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">6</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">frame</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">stack</span>(<span class="pl-s1">self</span>, <span class="pl-s1">level</span>, <span class="pl-s1">dropna</span>) <span class="pl-c1">4506</span> <span class="pl-k">return</span> <span class="pl-en">stack_multiple</span>(<span class="pl-s1">self</span>, <span class="pl-s1">level</span>, <span class="pl-s1">dropna</span><span class="pl-c1">=</span><span class="pl-s1">dropna</span>) <span class="pl-c1">4507</span> <span class="pl-s1">else</span>: <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">4508</span> <span class="pl-s1">return</span> <span class="pl-en">stack</span>(<span class="pl-s1">self</span>, <span class="pl-s1">level</span>, <span class="pl-s1">dropna</span><span class="pl-c1">=</span><span class="pl-s1">dropna</span>) <span class="pl-c1">4509</span> <span class="pl-c1">4510</span> <span class="pl-k">def</span> <span class="pl-en">unstack</span>(<span class="pl-s1">self</span>, <span class="pl-s1">level</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>, <span class="pl-s1">fill_value</span><span class="pl-c1">=</span><span class="pl-c1">None</span>): <span class="pl-c1">~</span><span class="pl-c1">/</span><span class="pl-v">Software</span><span class="pl-c1">/</span><span class="pl-s1">miniconda3</span><span class="pl-c1">/</span><span class="pl-s1">envs</span><span class="pl-c1">/</span><span class="pl-s1">pandas_stack</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">6</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">reshape</span><span class="pl-c1">/</span><span class="pl-s1">reshape</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">stack</span>(<span class="pl-s1">frame</span>, <span class="pl-s1">level</span>, <span class="pl-s1">dropna</span>) <span class="pl-c1">545</span> <span class="pl-c1">546</span> <span class="pl-s1">klass</span> <span class="pl-c1">=</span> <span class="pl-en">type</span>(<span class="pl-s1">frame</span>).<span class="pl-s1">_constructor_sliced</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">547</span> <span class="pl-s1">return</span> <span class="pl-en">klass</span>(<span class="pl-s1">new_values</span>, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">new_index</span>) <span class="pl-c1">548</span> <span class="pl-c1">549</span> <span class="pl-v">TypeError</span>: <span class="pl-s">'property'</span> <span class="pl-s1">object</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-s1">callable</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">When using <code class="notranslate">stack()</code> on a DataFrame into a Series, the code incorrectly references the class rather than the instance. This works for DataFrame as <code class="notranslate">_constructor_sliced</code> is on the class, but using the paradigm defined <a href="https://pandas.pydata.org/pandas-docs/stable/internals.html" rel="nofollow">here</a> it does not work. Should be as simple as changing 546 to <code class="notranslate">klass = frame._constructor_sliced</code>. Seems like this was worked on in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="213556507" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/15655" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/15655/hovercard" href="https://github.com/pandas-dev/pandas/pull/15655">#15655</a> and reported in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="211842337" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/15563" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/15563/hovercard" href="https://github.com/pandas-dev/pandas/issues/15563">#15563</a> but I don't see an associated commit. What's the status <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/delgadom/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/delgadom">@delgadom</a>?</p> <h4 dir="auto">Expected Output</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [5]: sdf = SubclassedDataFrame({&quot;A&quot;: [0, 1, 2], &quot;B&quot;: [0, 1, 2]}) In [6]: sdf.stack() Out[6]: 0 A 0 B 0 1 A 1 B 1 2 A 2 B 2 dtype: int64"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">sdf</span> <span class="pl-c1">=</span> <span class="pl-v">SubclassedDataFrame</span>({<span class="pl-s">"A"</span>: [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>], <span class="pl-s">"B"</span>: [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]}) <span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">sdf</span>.<span class="pl-en">stack</span>() <span class="pl-v">Out</span>[<span class="pl-c1">6</span>]: <span class="pl-c1">0</span> <span class="pl-v">A</span> <span class="pl-c1">0</span> <span class="pl-v">B</span> <span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-v">A</span> <span class="pl-c1">1</span> <span class="pl-v">B</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-v">A</span> <span class="pl-c1">2</span> <span class="pl-v">B</span> <span class="pl-c1">2</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">int64</span></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]<br> INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.6.2.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 3.16.0-38-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8<br> LOCALE: en_US.UTF-8</p> <p dir="auto">pandas: 0.21.1<br> pytest: None<br> pip: 9.0.1<br> setuptools: 36.4.0<br> Cython: None<br> numpy: 1.13.1<br> scipy: None<br> pyarrow: None<br> xarray: None<br> IPython: 6.1.0<br> sphinx: None<br> patsy: None<br> dateutil: 2.6.1<br> pytz: 2017.2<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> feather: None<br> matplotlib: None<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: None<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: None<br> s3fs: None<br> fastparquet: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
<p dir="auto">Subclassed Series and DataFrames with custom <code class="notranslate">_constructor</code>, <code class="notranslate">_constructor_sliced</code>, and <code class="notranslate">_constructor_expanddim</code> methods return pandas Series and DataFrame objects on reshape operations:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import numpy as np, pandas as pd &gt;&gt;&gt; import pandas.util.testing as tm &gt;&gt;&gt; df = tm.SubclassedDataFrame(np.random.random((4,5))) &gt;&gt;&gt; df 0 1 2 3 4 0 0.151944 0.948561 0.639122 0.718071 0.296193 1 0.004606 0.978378 0.827614 0.479320 0.495945 2 0.158874 0.535476 0.173194 0.065292 0.365851 3 0.772392 0.105038 0.671064 0.164165 0.795803 &gt;&gt;&gt; type(df) &lt;class 'pandas.util.testing.SubclassedDataFrame'&gt;"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>, <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">util</span>.<span class="pl-s1">testing</span> <span class="pl-k">as</span> <span class="pl-s1">tm</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">tm</span>.<span class="pl-v">SubclassedDataFrame</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>((<span class="pl-c1">4</span>,<span class="pl-c1">5</span>))) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span> <span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">3</span> <span class="pl-c1">4</span> <span class="pl-c1">0</span> <span class="pl-c1">0.151944</span> <span class="pl-c1">0.948561</span> <span class="pl-c1">0.639122</span> <span class="pl-c1">0.718071</span> <span class="pl-c1">0.296193</span> <span class="pl-c1">1</span> <span class="pl-c1">0.004606</span> <span class="pl-c1">0.978378</span> <span class="pl-c1">0.827614</span> <span class="pl-c1">0.479320</span> <span class="pl-c1">0.495945</span> <span class="pl-c1">2</span> <span class="pl-c1">0.158874</span> <span class="pl-c1">0.535476</span> <span class="pl-c1">0.173194</span> <span class="pl-c1">0.065292</span> <span class="pl-c1">0.365851</span> <span class="pl-c1">3</span> <span class="pl-c1">0.772392</span> <span class="pl-c1">0.105038</span> <span class="pl-c1">0.671064</span> <span class="pl-c1">0.164165</span> <span class="pl-c1">0.795803</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">type</span>(<span class="pl-s1">df</span>) <span class="pl-c1">&lt;</span><span class="pl-k">class</span> <span class="pl-s">'pandas.util.testing.SubclassedDataFrame'</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">Slicing operations use <code class="notranslate">_constructor_sliced</code>:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; type(df[0]) &lt;class 'pandas.util.testing.SubclassedSeries'&gt;"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">type</span>(<span class="pl-s1">df</span>[<span class="pl-c1">0</span>]) <span class="pl-c1">&lt;</span><span class="pl-k">class</span> <span class="pl-s">'pandas.util.testing.SubclassedSeries'</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">Reshape operations return regular pandas objects:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; type(df.stack()) &lt;class 'pandas.core.series.Series'&gt;"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">type</span>(<span class="pl-s1">df</span>.<span class="pl-en">stack</span>()) <span class="pl-c1">&lt;</span><span class="pl-k">class</span> <span class="pl-s">'pandas.core.series.Series'</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">It would be great if this returned a <code class="notranslate">SublcassedSeries</code>. Same goes for unstack and pivot.</p>
1
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10388011/11303489/10dcb1e8-8fde-11e5-8367-7dcddc3f49f6.png"><img src="https://cloud.githubusercontent.com/assets/10388011/11303489/10dcb1e8-8fde-11e5-8367-7dcddc3f49f6.png" alt="screen shot 2015-11-20 at 23 25 11" style="max-width: 100%;"></a><br> When you input text using Chinese IME, the first char cause a reposition of the input bar shows on windows. This create a very bad experience when input text other then English.</p>
0
<p dir="auto">I've modified the DatePicker component to meet a need for a project and wanted to contribute the changes back to the core project (:</p> <p dir="auto">The modification - an additional prop viewYearFirst={true} which opens the datepicker directly to the year display.</p> <p dir="auto">I just wanted to check in to see if the prop name was appropriate and whether or not any core developers could spot any gotchas before I roll this up into a PR.</p> <p dir="auto">Thanks!</p>
<p dir="auto">When building apps that use the date picker for choosing an old date like "birthday", I often hear complaints about it taking forever to go so far back in time. These people obviously don't realize they can select the year by clicking on the year in the title area. An option for just <strong>starting on the year picker</strong> though would make this component much more useful for such historic dates, especially for the less tech-savvy.</p> <p dir="auto">If not that, then perhaps it can be made a little more obvious that clicking on the year takes you to the year picker? An edit icon or something?</p> <p dir="auto">I'd be happy to make a pull request if others agree this would be a useful addition. Thanks!</p>
1
<p dir="auto">This code:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() { let vec = vec![1,4,35,13,42,1]; for x in vec[3..] { print!(&quot;{} &quot;, x); } }"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> vec = <span class="pl-en">vec</span><span class="pl-en">!</span><span class="pl-kos">[</span><span class="pl-c1">1</span>,<span class="pl-c1">4</span>,<span class="pl-c1">35</span>,<span class="pl-c1">13</span>,<span class="pl-c1">42</span>,<span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">for</span> x <span class="pl-k">in</span> vec<span class="pl-kos">[</span><span class="pl-c1">3</span>..<span class="pl-kos">]</span> <span class="pl-kos">{</span> <span class="pl-en">print</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{} "</span>, x<span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">produces the following errors</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="main.rs:3:5: 5:6 error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` does not have a constant size known at compile-time main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 error: the trait `core::iter::Iterator` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` is not an iterator; maybe try calling `.iter()` or a similar method main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` does not have a constant size known at compile-time main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` does not have a constant size known at compile-time main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 error: the trait `core::iter::Iterator` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` is not an iterator; maybe try calling `.iter()` or a similar method main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 error: the trait `core::iter::Iterator` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` is not an iterator; maybe try calling `.iter()` or a similar method main.rs:3 for x in vec[3..] { main.rs:4 print!(&quot;{} &quot;, x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site error: aborting due to 6 previous errors"><pre class="notranslate"><code class="notranslate">main.rs:3:5: 5:6 error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` does not have a constant size known at compile-time main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 error: the trait `core::iter::Iterator` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` is not an iterator; maybe try calling `.iter()` or a similar method main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` does not have a constant size known at compile-time main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` does not have a constant size known at compile-time main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 error: the trait `core::iter::Iterator` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` is not an iterator; maybe try calling `.iter()` or a similar method main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 error: the trait `core::iter::Iterator` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site main.rs:3:5: 5:6 note: `[_]` is not an iterator; maybe try calling `.iter()` or a similar method main.rs:3 for x in vec[3..] { main.rs:4 print!("{} ", x); main.rs:5 } note: in expansion of for loop expansion main.rs:3:5: 5:6 note: expansion site error: aborting due to 6 previous errors </code></pre></div> <p dir="auto">Both the Sized and Iterator errors repeat multiple times, and I suspect they would repeat indefinitely if rustc didn't have an error threshold.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn main() { let buf: &amp;[u8] = &amp;[12, 13, 14, 15, 16]; let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); for i in indices { // ... } }"><pre class="notranslate"><code class="notranslate">fn main() { let buf: &amp;[u8] = &amp;[12, 13, 14, 15, 16]; let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); for i in indices { // ... } } </code></pre></div> <p dir="auto">Building the above produces 48 errors. Removing the map at the end results in <em>only</em> 20 error messages and adding another gives me 112!</p> <p dir="auto">Playpen: <a href="http://is.gd/zEJAf8" rel="nofollow">http://is.gd/zEJAf8</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;anon&gt;:3:85: 3:87 error: the type of this value must be known in this context &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~ note: in expansion of closure expansion &lt;anon&gt;:3:73: 3:111 note: expansion site &lt;anon&gt;:3:100: 3:102 error: the type of this value must be known in this context &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~ note: in expansion of closure expansion &lt;anon&gt;:3:73: 3:111 note: expansion site &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:66: 3:112 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:66: 3:112 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::Iterator::next` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::Iterator::next` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::Iterator::next` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::Iterator::next` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site error: aborting due to 48 previous errors playpen: application terminated with error code 101"><pre class="notranslate"><code class="notranslate">&lt;anon&gt;:3:85: 3:87 error: the type of this value must be known in this context &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~ note: in expansion of closure expansion &lt;anon&gt;:3:73: 3:111 note: expansion site &lt;anon&gt;:3:100: 3:102 error: the type of this value must be known in this context &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~ note: in expansion of closure expansion &lt;anon&gt;:3:73: 3:111 note: expansion site &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:113: 3:133 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:66: 3:112 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:3:66: 3:112 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:3 let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' &amp;&amp; *b == b'\n').map(|(i, (_, _))| i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::IntoIterator::into_iter` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::Iterator::next` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::Iterator::next` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnMut&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::Iterator::next` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 note: required by `core::iter::Iterator::next` &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site &lt;anon&gt;:5:5: 7:6 error: type mismatch: the type `[closure &lt;anon&gt;:3:73: 3:111]` implements the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)), ([type error], [type error]))&gt;`, but the trait `for&lt;'r&gt; core::ops::FnOnce&lt;(&amp;'r (usize, (&amp;u8, &amp;u8)),)&gt;` is required (expected a tuple with 1 elements, found one with 2 elements) [E0281] &lt;anon&gt;:5 for i in indices { &lt;anon&gt;:6 // ... &lt;anon&gt;:7 } note: in expansion of for loop expansion &lt;anon&gt;:5:5: 7:6 note: expansion site error: aborting due to 48 previous errors playpen: application terminated with error code 101 </code></pre></div>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.5</li> <li>Zookeeper version: 3.4.14</li> <li>Operating System version: macos</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>按官方文档搭建provider,两种方式:annotation/xml</li> <li>分别配置</li> </ol> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" &lt;dubbo:metadata-report address=&quot;zookeeper://127.0.0.1:2181&quot;/&gt;"><pre class="notranslate"> &lt;<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">metadata-report</span> <span class="pl-e">address</span>=<span class="pl-s"><span class="pl-pds">"</span>zookeeper://127.0.0.1:2181<span class="pl-pds">"</span></span>/&gt;</pre></div> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" @Bean public MetadataReportConfig metadataReportConfig() { MetadataReportConfig metadataReportConfig = new MetadataReportConfig(); metadataReportConfig.setAddress(&quot;zookeeper://127.0.0.1:2181&quot;); return metadataReportConfig; }"><pre class="notranslate"> <span class="pl-c1">@</span><span class="pl-c1">Bean</span> <span class="pl-k">public</span> <span class="pl-smi">MetadataReportConfig</span> <span class="pl-s1">metadataReportConfig</span>() { <span class="pl-smi">MetadataReportConfig</span> <span class="pl-s1">metadataReportConfig</span> = <span class="pl-k">new</span> <span class="pl-smi">MetadataReportConfig</span>(); <span class="pl-s1">metadataReportConfig</span>.<span class="pl-en">setAddress</span>(<span class="pl-s">"zookeeper://127.0.0.1:2181"</span>); <span class="pl-k">return</span> <span class="pl-s1">metadataReportConfig</span>; }</pre></div> <ol start="3" dir="auto"> <li>应用正常启动</li> <li>Consumer端正常调用</li> <li>观察Zookeeper节点数据,元数据节点/dubbo/metadata 未创建</li> </ol> <h3 dir="auto">Expected Result</h3> <p dir="auto">元数据正常上报</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">元数据节点在Zookeeper上未创建,元数据未上报</p> <blockquote> <p dir="auto">将dubbo版本号更改为2.7.4.1、2.7.3,代码或配置未改动,元数据正常上报</p> </blockquote>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.6.2</li> <li>Operating System version: Mac 10.14</li> <li>Java version: 1.8.0_172</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <p dir="auto">run my project and let's spring.profiles.active=prod. I find the address of zooKeeper is default value(zookeeper://127.0.0.1:2181) in application.yml. but I expected result is zookeeper://127.0.0.1:2182. about detail configuration. please see provider/src/main/resources/application.yml</p> <p dir="auto">github address: <a href="https://github.com/smallAttr/zk-dubbo-demo/tree/multi_profile">https://github.com/smallAttr/zk-dubbo-demo/tree/multi_profile</a></p> <p dir="auto">and printf load dubbo configuration as same as expected result:<br> dubbo configuration:CoreConfiguration(address=zookeeper://127.0.0.1:2182, client=zkclient)</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17873796/50206590-d4bb2600-03a6-11e9-91df-977690f3f8fc.png"><img src="https://user-images.githubusercontent.com/17873796/50206590-d4bb2600-03a6-11e9-91df-977690f3f8fc.png" alt="image" style="max-width: 100%;"></a></p>
0
<p dir="auto">I have an error with validation unique entity on date time fields<br> Here is a sample code :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="namespace xxx\yyyBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; use Symfony\Bridge\Doctrine\Validator\Constraints as DoctrineAssert; /** * xxx\yyyBundle\Entity\Planning * * @ORM\Entity(repositoryClass=&quot;xxx\yyyBundle\Repository\PlanningRepository&quot;) * @DoctrineAssert\UniqueEntity(fields={&quot;day&quot;}) */ class Planning { /** * @var integer $id * * @ORM\Id * @ORM\Column(name=&quot;id&quot;, type=&quot;smallint&quot;) * @ORM\GeneratedValue(strategy=&quot;AUTO&quot;) */ private $id; /** * @var datetime $day * * @ORM\Column(name=&quot;day&quot;, type=&quot;date&quot;, unique=true, nullable=false) * @Assert\NotNull() * @Assert\Date() */ private $day;"><pre class="notranslate"><code class="notranslate">namespace xxx\yyyBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; use Symfony\Bridge\Doctrine\Validator\Constraints as DoctrineAssert; /** * xxx\yyyBundle\Entity\Planning * * @ORM\Entity(repositoryClass="xxx\yyyBundle\Repository\PlanningRepository") * @DoctrineAssert\UniqueEntity(fields={"day"}) */ class Planning { /** * @var integer $id * * @ORM\Id * @ORM\Column(name="id", type="smallint") * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var datetime $day * * @ORM\Column(name="day", type="date", unique=true, nullable=false) * @Assert\NotNull() * @Assert\Date() */ private $day; </code></pre></div> <p dir="auto">When i submit a form i have the following message :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Catchable Fatal Error: Object of class DateTime could not be converted to string in /Users/jf/Documents/aojf-workspace/lesroyaumes/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php line 1074 "><pre class="notranslate"><code class="notranslate">Catchable Fatal Error: Object of class DateTime could not be converted to string in /Users/jf/Documents/aojf-workspace/lesroyaumes/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php line 1074 </code></pre></div> <p dir="auto">So i add the following lines in the UniqueEntityValidator.php file</p> <p dir="auto">just after</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if ($criteria[$fieldName] === null) { return true; }"><pre class="notranslate"><code class="notranslate">if ($criteria[$fieldName] === null) { return true; } </code></pre></div> <p dir="auto">this</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$fieldType = $class-&gt;getTypeOfField($fieldName); if ($fieldType == Type::DATE) { $criteria[$fieldName] = date_format($criteria[$fieldName], 'Y-m-d'); }"><pre class="notranslate"><code class="notranslate">$fieldType = $class-&gt;getTypeOfField($fieldName); if ($fieldType == Type::DATE) { $criteria[$fieldName] = date_format($criteria[$fieldName], 'Y-m-d'); } </code></pre></div> <p dir="auto">It works with Mysql database. But i can not test with others.<br> Moreover, i do not know if 'Y-m-d' is generic and how i can do it generic for date and datetime.</p>
<p dir="auto">Running Symfony 2.4.3, I believe it's an issue in 2.4.4 as well</p> <p dir="auto">If the Client is insulated, it tries to serialize() the data to pass to the Process. serialize() fails on UploadedFile.</p> <p dir="auto"><a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Client.php#L145">https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Client.php#L145</a></p> <p dir="auto">That line serializes the request, but if request contains UploadedFile it fails.</p> <p dir="auto">Demonstration code:</p> <p dir="auto">Have a form with a file upload field named "file" and submit button named "submit"</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$client = static::createClient($options, $server); $client-&gt;insulate(true); $crawler = $client-&gt;request(&quot;GET&quot;, $url); $form = $crawler-&gt;selectButton(&quot;form[submit]&quot;)-&gt;form(); $form['form[file]']-&gt;upload(&quot;path/to/some/file&quot;); $client-&gt;submit($form); // FAILS WITH BELOW TRACE"><pre class="notranslate"><code class="notranslate">$client = static::createClient($options, $server); $client-&gt;insulate(true); $crawler = $client-&gt;request("GET", $url); $form = $crawler-&gt;selectButton("form[submit]")-&gt;form(); $form['form[file]']-&gt;upload("path/to/some/file"); $client-&gt;submit($form); // FAILS WITH BELOW TRACE </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="There was 1 error: 1) ...Test::test... Exception: Serialization of 'Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed /.../vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php:145 /.../vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php:368 /.../vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php:123 /.../vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php:332 /.../...Test.php:74"><pre class="notranslate"><code class="notranslate">There was 1 error: 1) ...Test::test... Exception: Serialization of 'Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed /.../vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php:145 /.../vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php:368 /.../vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php:123 /.../vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Client.php:332 /.../...Test.php:74 </code></pre></div>
0
<p dir="auto"><a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html" rel="nofollow">http://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html</a></p> <p dir="auto">The first couple of paragraphs say that <code class="notranslate">y</code> must be a condensed distance matrix, but the <code class="notranslate">Parameters</code> section says that <code class="notranslate">y</code> is optionally a data array. In practice the function does different things depending on the shape of <code class="notranslate">y</code>: if it appears 1d then it is treated as a condensed distance matrix, otherwise if it is 2d then it is treated as a data matrix (not as a compressed or uncompressed distance matrix). If it is not 1d or 2d then it falls off the if/elif and tries to return something that doesn't exist.</p> <p dir="auto">Here's the MATLAB function that <code class="notranslate">hierarchy.linkage</code> appears to try to clone:<br> <a href="http://www.mathworks.com/help/stats/linkage.html" rel="nofollow">http://www.mathworks.com/help/stats/linkage.html</a></p>
<p dir="auto">This submodule has broken my trust.</p> <p dir="auto">I am genuinely in awe of how it was included in scipy 1.0. I am tagging two heavy hitters to attempt to bring discussion to this issue since, in general, scipy.optimize issues seem to go without discussion or fixes. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pv">@pv</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/teoliphant/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/teoliphant">@teoliphant</a></p> <p dir="auto">As I understand, an effort was made in the last few version of scipy leading up to and including 1.0 to unify the interface of the different optimization routines and eventually deprecate fmin_xxxx.</p> <p dir="auto">A fairly large issue with this is that many of the inputs and outputs in the scipy documentation for these functions are simply wrong.</p> <p dir="auto">Take, for example the <a href="https://docs.scipy.org/doc/scipy/reference/optimize.minimize-bfgs.html#optimize-minimize-bfgs" rel="nofollow">BFGS method</a>.</p> <p dir="auto">the documentation for disp is incorrect; convergence messages are not printed, only a blurb at the end. return_all appears in the call signature at the top and is undocumented. I looked to <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_bfgs.html" rel="nofollow">fmin_bfgs</a> hoping its more specific documentation would be superior. The documentation for that is even more misleading. I hoped that the specified type for the constituents of allvecs being OptimizationResult would mean they hold cost function values and input vector values. They are simply input vector values. The documentation here is also misleading.</p> <p dir="auto">I also understand that many of the algorithms are wrapped code in another language, e.g. L-BFGS-B is written in FORTRAN77, and this may make their modification difficult. Earlier today I opened an issue that L-BFGS-B does not respect the maxiter input, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294949152" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/8372" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/8372/hovercard" href="https://github.com/scipy/scipy/issues/8372">#8372</a>. There are other issues, e.g. lack of respect for user's input dtype because of hard coded doubles in the fortran code, for example.</p> <p dir="auto">However, the docs being misleading is a great travesty for the users of this module, which I believe is among the more important/widely used of scipy. I would work to improve them myself, but I do not feel that my knowledge of the inner workings of the module is great enough to do so without myself making mistakes.</p> <p dir="auto">Returning to L-BFGS-B, the wrapped fortran code appears to contain a variety of errors or behaviors that have a varied level of harmfulness. For example, this is an example output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RUNNING THE L-BFGS-B CODE * * * Machine precision = 2.220D-16 N = 4 M = 10 At X0 0 variables are exactly at the bounds At iterate 0 f= 2.75370D+01 |proj g|= 1.06893D+02 At iterate 1 f= 2.27149D+01 |proj g|= 1.76623D+02 At iterate 2 f= 1.20196D+01 |proj g|= 1.20733D+02 At iterate 3 f= 8.05081D+00 |proj g|= 8.74848D+01 At iterate 4 f= 5.00344D+00 |proj g|= 8.42253D+01 At iterate 5 f= 3.70940D+00 |proj g|= 1.01991D+02 At iterate 6 f= 1.57818D+00 |proj g|= 7.10948D+01 At iterate 7 f= 4.81956D-01 |proj g|= 3.76945D+01 At iterate 8 f= 6.81301D-02 |proj g|= 2.20645D+01 At iterate 9 f= 1.34639D-02 |proj g|= 8.79078D+00 * * * Tit = total number of iterations Tnf = total number of function evaluations Tnint = total number of segments explored during Cauchy searches Skip = number of BFGS updates skipped Nact = number of active bounds at final generalized Cauchy point Projg = norm of the final projected gradient F = final function value * * * N Tit Tnf Tnint Skip Nact Projg F 4 9 12 1 0 0 8.791D+00 1.346D-02 F = 1.346394518877836E-002 CONVERGENCE: REL_REDUCTION_OF_F_&lt;=_FACTR*EPSMCH Cauchy time 0.000E+00 seconds. Subspace minimization time 0.000E+00 seconds. Line search time 0.000E+00 seconds. Total User time 0.000E+00 seconds."><pre class="notranslate"><code class="notranslate">RUNNING THE L-BFGS-B CODE * * * Machine precision = 2.220D-16 N = 4 M = 10 At X0 0 variables are exactly at the bounds At iterate 0 f= 2.75370D+01 |proj g|= 1.06893D+02 At iterate 1 f= 2.27149D+01 |proj g|= 1.76623D+02 At iterate 2 f= 1.20196D+01 |proj g|= 1.20733D+02 At iterate 3 f= 8.05081D+00 |proj g|= 8.74848D+01 At iterate 4 f= 5.00344D+00 |proj g|= 8.42253D+01 At iterate 5 f= 3.70940D+00 |proj g|= 1.01991D+02 At iterate 6 f= 1.57818D+00 |proj g|= 7.10948D+01 At iterate 7 f= 4.81956D-01 |proj g|= 3.76945D+01 At iterate 8 f= 6.81301D-02 |proj g|= 2.20645D+01 At iterate 9 f= 1.34639D-02 |proj g|= 8.79078D+00 * * * Tit = total number of iterations Tnf = total number of function evaluations Tnint = total number of segments explored during Cauchy searches Skip = number of BFGS updates skipped Nact = number of active bounds at final generalized Cauchy point Projg = norm of the final projected gradient F = final function value * * * N Tit Tnf Tnint Skip Nact Projg F 4 9 12 1 0 0 8.791D+00 1.346D-02 F = 1.346394518877836E-002 CONVERGENCE: REL_REDUCTION_OF_F_&lt;=_FACTR*EPSMCH Cauchy time 0.000E+00 seconds. Subspace minimization time 0.000E+00 seconds. Line search time 0.000E+00 seconds. Total User time 0.000E+00 seconds. </code></pre></div> <p dir="auto">the code writes "iterate" instead of "iteration" (a typo). This is an annoyance as it is not very professional, but it does not break anything. The separate timings for Cauchy, subspace minimization, and line search are also always zero. Same for user time. It would be nice for these to not be a filler values since this is misleading, but same thing - this is creature comfort problem, not an accuracy problem.</p> <p dir="auto">My application is in a topic known as wavefront sensing, or <a href="https://en.wikipedia.org/wiki/Phase_retrieval" rel="nofollow">phase retrieval</a>. We put in some number of parameters, and the landscape of the cost function is highly evolutionary as the optimizer traverses the space. As a result, when designing a cost function or debugging code it is desirable to know the state of the optimizer, even without knowing its internal mechanisms, as it walks the space. To do this I do the following:</p> <ol dir="auto"> <li>Save this output text from L-BFGS-B, and scrape the f= values from it.</li> <li>Use a callback that stores parameter vectors.</li> </ol> <p dir="auto">I expect these two things to have the same length always, and depend on cost[n] being associated with all_x[n] without registration errors between these two blocks of data.</p> <p dir="auto">In my particular application (I can share code on request, but 1000-2000 lines are called to implement my routine split across a few modules; there is no easy "def foo()" analog that I have found to reproduce this) I am having trouble understanding why my cost function appears to not be correlated, based on the output of l-bfgs-b, to the closeness of the current iteration input to truth:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/149093f6be4d2d09eabc19b2e17e6109d7418425e30d386f4389394e66bfe4bf/68747470733a2f2f692e696d6775722e636f6d2f4272394f4843672e6a7067"><img src="https://camo.githubusercontent.com/149093f6be4d2d09eabc19b2e17e6109d7418425e30d386f4389394e66bfe4bf/68747470733a2f2f692e696d6775722e636f6d2f4272394f4843672e6a7067" alt="cost function is not correlated with true error metric" data-canonical-src="https://i.imgur.com/Br9OHCg.jpg" style="max-width: 100%;"></a></p> <p dir="auto">This has cost me dozens of hours of debugging time, only to learn that <strong>something is wrong with L-BFGS-B that causes the output of options={'disp': True} to not be the the cost function at a given parameter vector.</strong></p> <p dir="auto">Because I capture stdout, I am not able to use print. I have embedded a line in my cost function that appends the current parameter vector and cost to a .txt file and resorted to matching values in that to L-BFGS-B print output to see what is wrong. The text from that is below, with numbered lines</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="00. params = [ 0. 0. 0. 0.] f(x) = 27.5369873872 01. params = [ 1.00000000e-08 0.00000000e+00 0.00000000e+00 0.00000000e+00] f(x) = 27.5369884562 02. params = [ 0.00000000e+00 1.00000000e-08 0.00000000e+00 0.00000000e+00] f(x) = 27.5369867324 03. params = [ 0.00000000e+00 0.00000000e+00 1.00000000e-08 0.00000000e+00] f(x) = 27.5369870096 04. params = [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e-08] f(x) = 27.5369875808 05. params = [-0.80769268 0.49476373 0.28537275 -0.14630029] f(x) = 86.4418490547 06. params = [-0.80769267 0.49476373 0.28537275 -0.14630029] f(x) = 86.4418490135 07. params = [-0.80769268 0.49476374 0.28537275 -0.14630029] f(x) = 86.441849366 08. params = [-0.80769268 0.49476373 0.28537276 -0.14630029] f(x) = 86.4418499781 09. params = [-0.80769268 0.49476373 0.28537275 -0.14630028] f(x) = 86.4418482602 10. params = [-0.16406864 0.1005026 0.05796848 -0.02971834] f(x) = 22.714940612 11. params = [-0.16406863 0.1005026 0.05796848 -0.02971834] f(x) = 22.7149388457 12. params = [-0.16406864 0.10050261 0.05796848 -0.02971834] f(x) = 22.7149405671 13. params = [-0.16406864 0.1005026 0.05796849 -0.02971834] f(x) = 22.7149404753 14. params = [-0.16406864 0.1005026 0.05796848 -0.02971833] f(x) = 22.7149421094 15. params = [-0.10087717 0.09158391 0.05575493 -0.06632038] f(x) = 12.0195875306 16. params = [-0.10087716 0.09158391 0.05575493 -0.06632038] f(x) = 12.0195863232 17. params = [-0.10087717 0.09158392 0.05575493 -0.06632038] f(x) = 12.0195878653 18. params = [-0.10087717 0.09158391 0.05575494 -0.06632038] f(x) = 12.0195883001 19. params = [-0.10087717 0.09158391 0.05575493 -0.06632037] f(x) = 12.0195867159 20. params = [ 0.15842029 -0.01548538 -0.01632799 -0.07159999] f(x) = 48.7174210299 21. params = [ 0.1584203 -0.01548538 -0.01632799 -0.07159999] f(x) = 48.7174233933 22. params = [ 0.15842029 -0.01548537 -0.01632799 -0.07159999] f(x) = 48.717421743 23. params = [ 0.15842029 -0.01548538 -0.01632798 -0.07159999] f(x) = 48.7174193993 24. params = [ 0.15842029 -0.01548538 -0.01632799 -0.07159998] f(x) = 48.7174245544 25. params = [-0.05512618 0.07269238 0.04303647 -0.06725192] f(x) = 8.05081234605 26. params = [-0.05512617 0.07269238 0.04303647 -0.06725192] f(x) = 8.05081192026 27. params = [-0.05512618 0.07269239 0.04303647 -0.06725192] f(x) = 8.0508114712 28. params = [-0.05512618 0.07269238 0.04303648 -0.06725192] f(x) = 8.05081281076 29. params = [-0.05512618 0.07269238 0.04303647 -0.06725191] f(x) = 8.05081206742 30. params = [-0.02149653 0.09172596 0.0267816 -0.06652566] f(x) = 5.0034401551 31. params = [-0.02149652 0.09172596 0.0267816 -0.06652566] f(x) = 5.00344002938 32. params = [-0.02149653 0.09172597 0.0267816 -0.06652566] f(x) = 5.00343999403 33. params = [-0.02149653 0.09172596 0.02678161 -0.06652566] f(x) = 5.00344079846 34. params = [-0.02149653 0.09172596 0.0267816 -0.06652565] f(x) = 5.00343931285 35. params = [ 0.03012534 0.12108955 -0.01347029 -0.04719621] f(x) = 3.70939759272 36. params = [ 0.03012535 0.12108955 -0.01347029 -0.04719621] f(x) = 3.70939819132 37. params = [ 0.03012534 0.12108956 -0.01347029 -0.04719621] f(x) = 3.70939842652 38. params = [ 0.03012534 0.12108955 -0.01347028 -0.04719621] f(x) = 3.70939740919 39. params = [ 0.03012534 0.12108955 -0.01347029 -0.0471962 ] f(x) = 3.70939657281 40. params = [ 0.00300894 0.11308784 0.00337076 -0.03858502] f(x) = 1.57818376805 41. params = [ 0.00300895 0.11308784 0.00337076 -0.03858502] f(x) = 1.578184007 42. params = [ 0.00300894 0.11308785 0.00337076 -0.03858502] f(x) = 1.57818379941 43. params = [ 0.00300894 0.11308784 0.00337077 -0.03858502] f(x) = 1.57818414645 44. params = [ 0.00300894 0.11308784 0.00337076 -0.03858501] f(x) = 1.5781830571 45. params = [-0.01561316 0.12143126 0.00100096 -0.01330919] f(x) = 0.481955650202 46. params = [-0.01561315 0.12143126 0.00100096 -0.01330919] f(x) = 0.481955273258 47. params = [-0.01561316 0.12143127 0.00100096 -0.01330919] f(x) = 0.481955840221 48. params = [-0.01561316 0.12143126 0.00100097 -0.01330919] f(x) = 0.481955839908 49. params = [-0.01561316 0.12143126 0.00100096 -0.01330918] f(x) = 0.481955373719 50. params = [-0.00041042 0.12401147 -0.00485423 0.00207093] f(x) = 0.0681301442419 51. params = [-0.00041041 0.12401147 -0.00485423 0.00207093] f(x) = 0.0681301690496 52. params = [-0.00041042 0.12401148 -0.00485423 0.00207093] f(x) = 0.0681301089522 53. params = [-0.00041042 0.12401147 -0.00485422 0.00207093] f(x) = 0.0681299235971 54. params = [-0.00041042 0.12401147 -0.00485423 0.00207094] f(x) = 0.0681302701249 55. params = [-0.00144057 0.12278377 -0.00124594 -0.00264166] f(x) = 0.0134639451888 56. params = [-0.00144056 0.12278377 -0.00124594 -0.00264166] f(x) = 0.0134639411113 57. params = [-0.00144057 0.12278378 -0.00124594 -0.00264166] f(x) = 0.0134638572809 58. params = [-0.00144057 0.12278377 -0.00124593 -0.00264166] f(x) = 0.0134639506651 59. params = [-0.00144057 0.12278377 -0.00124594 -0.00264165] f(x) = 0.0134639172132"><pre class="notranslate"><code class="notranslate">00. params = [ 0. 0. 0. 0.] f(x) = 27.5369873872 01. params = [ 1.00000000e-08 0.00000000e+00 0.00000000e+00 0.00000000e+00] f(x) = 27.5369884562 02. params = [ 0.00000000e+00 1.00000000e-08 0.00000000e+00 0.00000000e+00] f(x) = 27.5369867324 03. params = [ 0.00000000e+00 0.00000000e+00 1.00000000e-08 0.00000000e+00] f(x) = 27.5369870096 04. params = [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e-08] f(x) = 27.5369875808 05. params = [-0.80769268 0.49476373 0.28537275 -0.14630029] f(x) = 86.4418490547 06. params = [-0.80769267 0.49476373 0.28537275 -0.14630029] f(x) = 86.4418490135 07. params = [-0.80769268 0.49476374 0.28537275 -0.14630029] f(x) = 86.441849366 08. params = [-0.80769268 0.49476373 0.28537276 -0.14630029] f(x) = 86.4418499781 09. params = [-0.80769268 0.49476373 0.28537275 -0.14630028] f(x) = 86.4418482602 10. params = [-0.16406864 0.1005026 0.05796848 -0.02971834] f(x) = 22.714940612 11. params = [-0.16406863 0.1005026 0.05796848 -0.02971834] f(x) = 22.7149388457 12. params = [-0.16406864 0.10050261 0.05796848 -0.02971834] f(x) = 22.7149405671 13. params = [-0.16406864 0.1005026 0.05796849 -0.02971834] f(x) = 22.7149404753 14. params = [-0.16406864 0.1005026 0.05796848 -0.02971833] f(x) = 22.7149421094 15. params = [-0.10087717 0.09158391 0.05575493 -0.06632038] f(x) = 12.0195875306 16. params = [-0.10087716 0.09158391 0.05575493 -0.06632038] f(x) = 12.0195863232 17. params = [-0.10087717 0.09158392 0.05575493 -0.06632038] f(x) = 12.0195878653 18. params = [-0.10087717 0.09158391 0.05575494 -0.06632038] f(x) = 12.0195883001 19. params = [-0.10087717 0.09158391 0.05575493 -0.06632037] f(x) = 12.0195867159 20. params = [ 0.15842029 -0.01548538 -0.01632799 -0.07159999] f(x) = 48.7174210299 21. params = [ 0.1584203 -0.01548538 -0.01632799 -0.07159999] f(x) = 48.7174233933 22. params = [ 0.15842029 -0.01548537 -0.01632799 -0.07159999] f(x) = 48.717421743 23. params = [ 0.15842029 -0.01548538 -0.01632798 -0.07159999] f(x) = 48.7174193993 24. params = [ 0.15842029 -0.01548538 -0.01632799 -0.07159998] f(x) = 48.7174245544 25. params = [-0.05512618 0.07269238 0.04303647 -0.06725192] f(x) = 8.05081234605 26. params = [-0.05512617 0.07269238 0.04303647 -0.06725192] f(x) = 8.05081192026 27. params = [-0.05512618 0.07269239 0.04303647 -0.06725192] f(x) = 8.0508114712 28. params = [-0.05512618 0.07269238 0.04303648 -0.06725192] f(x) = 8.05081281076 29. params = [-0.05512618 0.07269238 0.04303647 -0.06725191] f(x) = 8.05081206742 30. params = [-0.02149653 0.09172596 0.0267816 -0.06652566] f(x) = 5.0034401551 31. params = [-0.02149652 0.09172596 0.0267816 -0.06652566] f(x) = 5.00344002938 32. params = [-0.02149653 0.09172597 0.0267816 -0.06652566] f(x) = 5.00343999403 33. params = [-0.02149653 0.09172596 0.02678161 -0.06652566] f(x) = 5.00344079846 34. params = [-0.02149653 0.09172596 0.0267816 -0.06652565] f(x) = 5.00343931285 35. params = [ 0.03012534 0.12108955 -0.01347029 -0.04719621] f(x) = 3.70939759272 36. params = [ 0.03012535 0.12108955 -0.01347029 -0.04719621] f(x) = 3.70939819132 37. params = [ 0.03012534 0.12108956 -0.01347029 -0.04719621] f(x) = 3.70939842652 38. params = [ 0.03012534 0.12108955 -0.01347028 -0.04719621] f(x) = 3.70939740919 39. params = [ 0.03012534 0.12108955 -0.01347029 -0.0471962 ] f(x) = 3.70939657281 40. params = [ 0.00300894 0.11308784 0.00337076 -0.03858502] f(x) = 1.57818376805 41. params = [ 0.00300895 0.11308784 0.00337076 -0.03858502] f(x) = 1.578184007 42. params = [ 0.00300894 0.11308785 0.00337076 -0.03858502] f(x) = 1.57818379941 43. params = [ 0.00300894 0.11308784 0.00337077 -0.03858502] f(x) = 1.57818414645 44. params = [ 0.00300894 0.11308784 0.00337076 -0.03858501] f(x) = 1.5781830571 45. params = [-0.01561316 0.12143126 0.00100096 -0.01330919] f(x) = 0.481955650202 46. params = [-0.01561315 0.12143126 0.00100096 -0.01330919] f(x) = 0.481955273258 47. params = [-0.01561316 0.12143127 0.00100096 -0.01330919] f(x) = 0.481955840221 48. params = [-0.01561316 0.12143126 0.00100097 -0.01330919] f(x) = 0.481955839908 49. params = [-0.01561316 0.12143126 0.00100096 -0.01330918] f(x) = 0.481955373719 50. params = [-0.00041042 0.12401147 -0.00485423 0.00207093] f(x) = 0.0681301442419 51. params = [-0.00041041 0.12401147 -0.00485423 0.00207093] f(x) = 0.0681301690496 52. params = [-0.00041042 0.12401148 -0.00485423 0.00207093] f(x) = 0.0681301089522 53. params = [-0.00041042 0.12401147 -0.00485422 0.00207093] f(x) = 0.0681299235971 54. params = [-0.00041042 0.12401147 -0.00485423 0.00207094] f(x) = 0.0681302701249 55. params = [-0.00144057 0.12278377 -0.00124594 -0.00264166] f(x) = 0.0134639451888 56. params = [-0.00144056 0.12278377 -0.00124594 -0.00264166] f(x) = 0.0134639411113 57. params = [-0.00144057 0.12278378 -0.00124594 -0.00264166] f(x) = 0.0134638572809 58. params = [-0.00144057 0.12278377 -0.00124593 -0.00264166] f(x) = 0.0134639506651 59. params = [-0.00144057 0.12278377 -0.00124594 -0.00264165] f(x) = 0.0134639172132 </code></pre></div> <p dir="auto">The callback creates the following list:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[array([ 0., 0., 0., 0.]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166])]"><pre class="notranslate"><code class="notranslate">[array([ 0., 0., 0., 0.]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166]), array([-0.00144057, 0.12278377, -0.00124594, -0.00264166])] </code></pre></div> <p dir="auto">I have reproduced this for completeness, but the important lines are 00, the initial guess, which matches iterate 0 in the output text from the optimizer. Iteration 1 matches any of line 12-14. The parameter vectors are similar to:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[-0.16406864 0.10050261 0.05796848 -0.02971834]"><pre class="notranslate"><code class="notranslate">[-0.16406864 0.10050261 0.05796848 -0.02971834] </code></pre></div> <p dir="auto">The callback contains this input array at that iteration:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[-0.00144057, 0.12278377, -0.00124594, -0.00264166]"><pre class="notranslate"><code class="notranslate">[-0.00144057, 0.12278377, -0.00124594, -0.00264166] </code></pre></div> <p dir="auto">Which would be associated with a cost function 0.013, not 22 and change. As a result, I am unable to trust the tools I have to diagnose a problem with them. The output of the L-BFGS-B print simply is not the value of the cost function for the parameter vector at that iteration. I believe the problem is something like as follows:</p> <ol dir="auto"> <li>The callback is called at the end of a line search before beginning a new gradient hunt</li> <li>The f= is written at the start of a line search</li> </ol> <p dir="auto">But I cannot trust the documentation of scipy to be correct that the callback is called at the end of an iteration (~= end of line search in BFGS), and I cannot trust lbfgsb.f to be error free in this way.</p> <p dir="auto">Are there plans to improve the optimization module in a "months not years" timespan? Is anyone willing to rewrite lbfgsb.f or even port it to C/C++ or pure python to solve these problems? In commercialized applications, it is often desirable for a user to keep their finger on the pulse by monitoring convergence and potentially stopping optimization, hand tuning the inputs, and then continuing the work. The architecture of optimize.minimize is prohibitive to this. It would be nice to see a context manager based implementation that allows interruption of the optimizer without losing the current state, as this sort of behavior is only possible at the moment through use of a complicated callback function.</p>
0
<p dir="auto">Some contour/contourf keyword arguments (hatches, linewidths, linestyles) also work with tricontour/tricontourf but they are not documented and there are no examples of their use.</p>
<p dir="auto">Dragged legend moves upon resizing figure window from matplotlib version 2.1.0.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt X = range(100) Y = [value ** 2 for value in X] plt.plot(X, Y,label='Y') leg=plt.legend() leg.draggable(True) plt.grid(True) plt.show()"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt X = range(100) Y = [value ** 2 for value in X] plt.plot(X, Y,label='Y') leg=plt.legend() leg.draggable(True) plt.grid(True) plt.show() </code></pre></div> <p dir="auto"><strong>Matplotlib 2.1.1/2.1.0 output</strong></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6796654/34217804-7c5bba3a-e5d2-11e7-91d2-6dcbd8addb25.jpg"><img src="https://user-images.githubusercontent.com/6796654/34217804-7c5bba3a-e5d2-11e7-91d2-6dcbd8addb25.jpg" alt="2 1 0" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Matplotlib 2.0.2 output</strong></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6796654/34217841-972f7da6-e5d2-11e7-8c13-753657f445f5.jpg"><img src="https://user-images.githubusercontent.com/6796654/34217841-972f7da6-e5d2-11e7-8c13-753657f445f5.jpg" alt="2 0 2" style="max-width: 100%;"></a></p> <p dir="auto">In 2.1.0 legend tries to retain it's location with respect to monitor (if we resize in one axis).<br> Is this expected? How do I bring back the old behavior?</p> <ul dir="auto"> <li>Operating system: Windows 10 64 bit</li> <li>Matplotlib version: 2.1.0/2.0.2</li> <li>Matplotlib backend: NA</li> <li>Python version: 2.7.10</li> <li>Jupyter version (if applicable): NA</li> <li>Other libraries: NA</li> <li>Installed using whl files</li> </ul>
0
<h5 dir="auto">Description of the problem</h5> <p dir="auto">MeshStandardMaterial &amp; MeshPhysicalMaterial Lighting problem on Adreno GPU.</p> <p dir="auto">Not Adreno GPU<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/15254228/48467216-38d85080-e823-11e8-920e-b9a037189e00.png"><img src="https://user-images.githubusercontent.com/15254228/48467216-38d85080-e823-11e8-920e-b9a037189e00.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Adreno GPU<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/15254228/48467178-1f370900-e823-11e8-931c-29bd91b28a09.png"><img src="https://user-images.githubusercontent.com/15254228/48467178-1f370900-e823-11e8-931c-29bd91b28a09.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">live example:</p> <ul dir="auto"> <li><a href="https://codepen.io/magiclm/pen/WYpGyg?editors=1111" rel="nofollow">codepen</a></li> </ul> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r98</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Android</li> </ul> <h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Adreno GPU</li> </ul>
<p dir="auto">I have a particle system and I want distant particles to appear more diminished than they'd actually be based on the space (darker, less opaque, etc.) Fog is an obvious way to do this, but I have a background plate behind the system that I don't want to be dimmed.</p> <p dir="auto">What's the easiest way to handle this?</p> <p dir="auto">Is there a way to do fog on only this particle system and not the whole scene? Should I look into reworking the particle shader to diminish opacity based on distance in z? Am I missing something obvious?</p>
0
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">I'm looking for resetting the zoom and pan history of interactve browsing. Using <code class="notranslate">toolbar.update()</code> breaks the interactive history, it's not possible to go back to the previous axis state.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <p dir="auto">Run this code in python a console:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from matplotlib import pyplot as plt f = plt.figure() plt.plot([1, 2, 5]) plt.show(block=False) f.canvas.toolbar._views._elements # One element f.canvas.toolbar._positions._elements # One element f.canvas.toolbar.update() f.canvas.toolbar._views._elements # Empty ! f.canvas.toolbar._positions._elements # Empty ! # Zoom once # Try to go back using the home button or back arrow"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">f</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>() <span class="pl-s1">plt</span>.<span class="pl-en">plot</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">5</span>]) <span class="pl-s1">plt</span>.<span class="pl-en">show</span>(<span class="pl-s1">block</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-s1">f</span>.<span class="pl-s1">canvas</span>.<span class="pl-s1">toolbar</span>.<span class="pl-s1">_views</span>.<span class="pl-s1">_elements</span> <span class="pl-c"># One element</span> <span class="pl-s1">f</span>.<span class="pl-s1">canvas</span>.<span class="pl-s1">toolbar</span>.<span class="pl-s1">_positions</span>.<span class="pl-s1">_elements</span> <span class="pl-c"># One element</span> <span class="pl-s1">f</span>.<span class="pl-s1">canvas</span>.<span class="pl-s1">toolbar</span>.<span class="pl-en">update</span>() <span class="pl-s1">f</span>.<span class="pl-s1">canvas</span>.<span class="pl-s1">toolbar</span>.<span class="pl-s1">_views</span>.<span class="pl-s1">_elements</span> <span class="pl-c"># Empty !</span> <span class="pl-s1">f</span>.<span class="pl-s1">canvas</span>.<span class="pl-s1">toolbar</span>.<span class="pl-s1">_positions</span>.<span class="pl-s1">_elements</span> <span class="pl-c"># Empty !</span> <span class="pl-c"># Zoom once</span> <span class="pl-c"># Try to go back using the home button or back arrow</span></pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <p dir="auto">The view doesn't change when pressing home button or back arrow</p> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">I expect to be able to got back to the state the plot was in when <code class="notranslate">f.canvas.toolbar.update()</code> was called, but since the history is completely empty, there is no state to go back to. I think the current state should be added right after clearing the history. Is it possible to do it manually in the meantime ?</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: Arch Linux</li> <li>Matplotlib version: 2.1.0-1</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): Qt5Agg</li> <li>Python version: 3.6.3</li> <li>Jupyter version (if applicable):</li> <li>Other libraries:</li> </ul>
<p dir="auto">There are two entries in <a href="http://matplotlib.org/devdocs/gallery.html#lines_bars_and_markers" rel="nofollow">http://matplotlib.org/devdocs/gallery.html#lines_bars_and_markers</a> for marker_reference.py that point to the same page -- likely because that example generates <em>two</em> plots.</p> <p dir="auto">A few possibilities:</p> <ul dir="auto"> <li>generate a single plot (probably the simplest and good enough).</li> <li>split the example into two files.</li> <li>somehow have the second link point to an HTML anchor corresponding to the second plot.</li> </ul>
0
<p dir="auto">Hello,</p> <p dir="auto">I was investigating strange error which we have for one of our tasks. We received regular errors about billard losing workers:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Task (...)[5832c7bd-fe9d-45cd-865e-b6beb4c09e47] raised unexpected: WorkerLostError('Worker exited prematurely: signal 15 (SIGTERM).',)"><pre class="notranslate"><code class="notranslate">Task (...)[5832c7bd-fe9d-45cd-865e-b6beb4c09e47] raised unexpected: WorkerLostError('Worker exited prematurely: signal 15 (SIGTERM).',) </code></pre></div> <p dir="auto">I was searching for some other processes which could killed our workers but system logs was empty and when I was going to give up we turned off autoscale due to some other issues and these errors dissapered completely.</p> <p dir="auto">Celery 3.1.18<br> Django 1.7.8<br> librabbitmq 1.6.1</p>
<p dir="auto">I get the following traceback from my worker and then the worker stops consuming tasks. I have confirmed that there are several thousand messages in the RabbitMQ celery queue, the worker is not consuming them.</p> <p dir="auto">I started my worker with the following command:</p> <p dir="auto"><code class="notranslate">celery worker -A project -l info -n worker1.%h -Ofair --autoscale=50,1 --maxtasksperchild=100 --beat</code></p> <p dir="auto">I am using the <code class="notranslate">-Ofair</code> flag because I was also experiencing another breaking bug (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="26829016" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/1845" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/1845/hovercard" href="https://github.com/celery/celery/issues/1845">#1845</a>) and found <code class="notranslate">-Ofair</code> to be a workaround.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2015-02-02 23:08:08,442 - ERROR - 15875:MainProcess - Unrecoverable error: AssertionError() Traceback (most recent call last): File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/worker/__init__.py&quot;, line 206, in start self.blueprint.start(self) File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/bootsteps.py&quot;, line 123, in start step.start(parent) File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/bootsteps.py&quot;, line 374, in start return self.obj.start() File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/worker/consumer.py&quot;, line 278, in start blueprint.start(self) File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/bootsteps.py&quot;, line 123, in start step.start(parent) File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/worker/consumer.py&quot;, line 821, in start c.loop(*c.loop_args()) File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/worker/loops.py&quot;, line 70, in asynloop next(loop) File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/kombu/async/hub.py&quot;, line 274, in create_loop poll_timeout = fire_timers(propagate=propagate) if scheduled else 1 File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/kombu/async/hub.py&quot;, line 136, in fire_timers entry() File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/kombu/async/timer.py&quot;, line 64, in __call__ return self.fun(*self.args, **self.kwargs) File &quot;/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/concurrency/asynpool.py&quot;, line 521, in verify_process_alive assert proc.outqR_fd in hub.readers AssertionError"><pre class="notranslate"><code class="notranslate">2015-02-02 23:08:08,442 - ERROR - 15875:MainProcess - Unrecoverable error: AssertionError() Traceback (most recent call last): File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/worker/__init__.py", line 206, in start self.blueprint.start(self) File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/bootsteps.py", line 123, in start step.start(parent) File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/bootsteps.py", line 374, in start return self.obj.start() File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 278, in start blueprint.start(self) File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/bootsteps.py", line 123, in start step.start(parent) File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 821, in start c.loop(*c.loop_args()) File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/worker/loops.py", line 70, in asynloop next(loop) File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/kombu/async/hub.py", line 274, in create_loop poll_timeout = fire_timers(propagate=propagate) if scheduled else 1 File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/kombu/async/hub.py", line 136, in fire_timers entry() File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/kombu/async/timer.py", line 64, in __call__ return self.fun(*self.args, **self.kwargs) File "/home/djacobs/.virtualenvs/workflow/local/lib/python2.7/site-packages/celery/concurrency/asynpool.py", line 521, in verify_process_alive assert proc.outqR_fd in hub.readers AssertionError </code></pre></div>
1
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2> <p dir="auto">Multiplication of sparse with dense tensor on GPU breaks</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">I have the following implementation of page rank on pytorch using sparse tensors:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="i = torch.LongTensor(idx) values = torch.FloatTensor([1] * len(idx)) M = torch.sparse.FloatTensor(i.t(), values, torch.Size([4847571, 4847571])) N = M.shape[1] v = torch.rand(N, 1).float() values = torch.FloatTensor([(1 - d)/N] * len(indices)) temp = torch.sparse.FloatTensor(i.t(), values, torch.Size([4847571, 4847571])) if torch.cuda.is_available(): v = v.cuda() M = M.cuda() temp = temp.cuda() v = v / torch.norm(v, 1) M_hat = self.d * M + temp for i in range(num_iter): v = torch.mm(M_hat, v)"><pre class="notranslate"><code class="notranslate">i = torch.LongTensor(idx) values = torch.FloatTensor([1] * len(idx)) M = torch.sparse.FloatTensor(i.t(), values, torch.Size([4847571, 4847571])) N = M.shape[1] v = torch.rand(N, 1).float() values = torch.FloatTensor([(1 - d)/N] * len(indices)) temp = torch.sparse.FloatTensor(i.t(), values, torch.Size([4847571, 4847571])) if torch.cuda.is_available(): v = v.cuda() M = M.cuda() temp = temp.cuda() v = v / torch.norm(v, 1) M_hat = self.d * M + temp for i in range(num_iter): v = torch.mm(M_hat, v) </code></pre></div> <p dir="auto">The indices are gained by parsing <a href="https://snap.stanford.edu/data/soc-LiveJournal1.html" rel="nofollow">this</a> graph.</p> <p dir="auto">On CPU everything runs fine. On GPU however I am receiving the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" v = torch.mm(M_hat, v) RuntimeError: sub_iter.strides(0)[0] == 0 INTERNAL ASSERT FAILED at /pytorch/aten/src/ATen/native/cuda/Reduce.cuh:706, please report a bug to PyTorch."><pre class="notranslate"><code class="notranslate"> v = torch.mm(M_hat, v) RuntimeError: sub_iter.strides(0)[0] == 0 INTERNAL ASSERT FAILED at /pytorch/aten/src/ATen/native/cuda/Reduce.cuh:706, please report a bug to PyTorch. </code></pre></div> <h2 dir="auto">Environment</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Collecting environment information... PyTorch version: 1.5.0 Is debug build: No CUDA used to build PyTorch: 10.2 OS: Ubuntu 18.04.4 LTS GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 CMake version: version 3.10.2 Python version: 3.6 Is CUDA available: Yes CUDA runtime version: Could not collect GPU models and configuration: GPU 0: Tesla P100-PCIE-16GB Nvidia driver version: 440.82 cuDNN version: Could not collect Versions of relevant libraries: [pip3] numpy==1.18.3 [pip3] torch==1.5.0"><pre class="notranslate"><code class="notranslate">Collecting environment information... PyTorch version: 1.5.0 Is debug build: No CUDA used to build PyTorch: 10.2 OS: Ubuntu 18.04.4 LTS GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 CMake version: version 3.10.2 Python version: 3.6 Is CUDA available: Yes CUDA runtime version: Could not collect GPU models and configuration: GPU 0: Tesla P100-PCIE-16GB Nvidia driver version: 440.82 cuDNN version: Could not collect Versions of relevant libraries: [pip3] numpy==1.18.3 [pip3] torch==1.5.0 </code></pre></div> <p dir="auto">If it helps more my machine is the first one from <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/ncv2-series" rel="nofollow">here</a>.</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2> <p dir="auto">Calling <code class="notranslate">.sum()</code> on large cuda tensors throws the error.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import torch t = torch.zeros(5, 14400, 14400).cuda() !nvidia-smi t.sum(dim=0)"><pre class="notranslate"><code class="notranslate">import torch t = torch.zeros(5, 14400, 14400).cuda() !nvidia-smi t.sum(dim=0) </code></pre></div> <p dir="auto">shows the following nvidia info</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="+-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.64.00 Driver Version: 418.67 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Tesla P100-PCIE... Off | 00000000:00:04.0 Off | 0 | | N/A 40C P0 32W / 250W | 4663MiB / 16280MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| +-----------------------------------------------------------------------------+"><pre class="notranslate"><code class="notranslate">+-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.64.00 Driver Version: 418.67 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Tesla P100-PCIE... Off | 00000000:00:04.0 Off | 0 | | N/A 40C P0 32W / 250W | 4663MiB / 16280MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| +-----------------------------------------------------------------------------+ </code></pre></div> <p dir="auto">and the traceback is</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RuntimeError Traceback (most recent call last) &lt;ipython-input-1-bbe24183337c&gt; in &lt;module&gt;() 2 t = torch.zeros(5, 14400, 14400).cuda() 3 get_ipython().system('nvidia-smi') ----&gt; 4 t.sum(dim=0) RuntimeError: sub_iter.strides(0)[0] == 0 INTERNAL ASSERT FAILED at /pytorch/aten/src/ATen/native/cuda/Reduce.cuh:706, please report a bug to PyTorch. "><pre class="notranslate"><code class="notranslate">RuntimeError Traceback (most recent call last) &lt;ipython-input-1-bbe24183337c&gt; in &lt;module&gt;() 2 t = torch.zeros(5, 14400, 14400).cuda() 3 get_ipython().system('nvidia-smi') ----&gt; 4 t.sum(dim=0) RuntimeError: sub_iter.strides(0)[0] == 0 INTERNAL ASSERT FAILED at /pytorch/aten/src/ATen/native/cuda/Reduce.cuh:706, please report a bug to PyTorch. </code></pre></div> <p dir="auto">This behavior is reproduced with any <code class="notranslate">(n, 14400, 14400)</code> tensor for <code class="notranslate">n&gt;=5</code>.</p> <p dir="auto"><strong>Note</strong>. I can easily create a (6, 14400, 14400) tensor - memory usage, in this case, is <code class="notranslate">5455MiB / 16280MiB</code>.</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Returns a (14400, 14400) tensor</p> <h2 dir="auto">Environment</h2> <p dir="auto">PyTorch version: 1.5.0+cu101<br> Is debug build: No<br> CUDA used to build PyTorch: 10.1</p> <p dir="auto">OS: Ubuntu 18.04.3 LTS<br> GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0<br> CMake version: version 3.12.0</p> <p dir="auto">Python version: 3.6<br> Is CUDA available: Yes<br> CUDA runtime version: 10.1.243<br> GPU models and configuration: GPU 0: Tesla P100-PCIE-16GB<br> Nvidia driver version: 418.67<br> cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5</p> <p dir="auto">Versions of relevant libraries:<br> [pip3] numpy==1.18.3<br> [pip3] pytorch-mighty==0.1.0<br> [pip3] torch==1.5.0+cu101<br> [pip3] torchfile==0.1.0<br> [pip3] torchsummary==1.5.1<br> [pip3] torchtext==0.3.1<br> [pip3] torchvision==0.6.0+cu101<br> [conda] Could not collect</p> <h2 dir="auto">Additional context</h2> <p dir="auto">Google colab, GPU instance.</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">@zou3519</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bdhirsh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bdhirsh">@bdhirsh</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jbschlosser/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jbschlosser">@jbschlosser</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/anjali411/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/anjali411">@anjali411</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ngimel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ngimel">@ngimel</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/heitorschueroff/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/heitorschueroff">@heitorschueroff</a></p>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: type_of with ty_projection note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:190 stack backtrace: 1: 0x7fab454c2034 - sys::backtrace::write::he62bcb548164e961YyC 2: 0x7fab454e7df8 - panicking::on_panic::h3cb4936e695d67bdOGI 3: 0x7fab4541efaa - rt::unwind::begin_unwind_inner::hfe13dbe91daef70cmnI 4: 0x7fab428bd41d - rt::unwind::begin_unwind::h10911018176195016387 5: 0x7fab428bdc65 - diagnostic::Handler::bug::h3c5d38abd490322elgB 6: 0x7fab432d507b - session::Session::bug::h23eaba6d447e27ca3yn 7: 0x7fab44b5f17f - trans::type_of::in_memory_type_of::hd518d125e463ffd5lEo 8: 0x7fab44b5ef41 - trans::type_of::in_memory_type_of::hd518d125e463ffd5lEo 9: 0x7fab44c61137 - trans::foreign::foreign_signature::h4618e8fc5486898feOB 10: 0x7fab44c60603 - trans::foreign::foreign_types_for_fn_ty::hbb4f8804cec19fffKPB 11: 0x7fab44c15e2f - trans::foreign::register_rust_fn_with_foreign_abi::hff88e81da38aeb0f6gB 12: 0x7fab44b1e905 - trans::base::get_item_val::hfbaf01eba019b69eVnu 13: 0x7fab44b1bb50 - trans::base::trans_item::h1506a2e4228c48caCSt 14: 0x7fab44c1859c - trans::base::trans_crate::h6ca4511310a24dc9fPu 15: 0x7fab45af55c3 - driver::phase_4_translate_to_llvm::h44ad816874743241kOa 16: 0x7fab45ad11b3 - driver::compile_input::h3bad48bfc23f6006Rba 17: 0x7fab45b88b02 - run_compiler::haa99afb1c99d7db1x2b 18: 0x7fab45b8694c - thunk::F.Invoke&lt;A, R&gt;::invoke::h10898031602178947258 19: 0x7fab45b859d0 - rt::unwind::try::try_fn::h4687345873392121579 20: 0x7fab45558fc8 - rust_try_inner 21: 0x7fab45558fb5 - rust_try 22: 0x7fab45b85e76 - thunk::F.Invoke&lt;A, R&gt;::invoke::h18058446263424162958 23: 0x7fab454d69f5 - sys::thread::thread_start::h8ed6b7636995fe24B1G 24: 0x7fab3f39e373 - start_thread 25: 0x7fab450a027c - __clone 26: 0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">error: internal compiler error: type_of with ty_projection note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:190 stack backtrace: 1: 0x7fab454c2034 - sys::backtrace::write::he62bcb548164e961YyC 2: 0x7fab454e7df8 - panicking::on_panic::h3cb4936e695d67bdOGI 3: 0x7fab4541efaa - rt::unwind::begin_unwind_inner::hfe13dbe91daef70cmnI 4: 0x7fab428bd41d - rt::unwind::begin_unwind::h10911018176195016387 5: 0x7fab428bdc65 - diagnostic::Handler::bug::h3c5d38abd490322elgB 6: 0x7fab432d507b - session::Session::bug::h23eaba6d447e27ca3yn 7: 0x7fab44b5f17f - trans::type_of::in_memory_type_of::hd518d125e463ffd5lEo 8: 0x7fab44b5ef41 - trans::type_of::in_memory_type_of::hd518d125e463ffd5lEo 9: 0x7fab44c61137 - trans::foreign::foreign_signature::h4618e8fc5486898feOB 10: 0x7fab44c60603 - trans::foreign::foreign_types_for_fn_ty::hbb4f8804cec19fffKPB 11: 0x7fab44c15e2f - trans::foreign::register_rust_fn_with_foreign_abi::hff88e81da38aeb0f6gB 12: 0x7fab44b1e905 - trans::base::get_item_val::hfbaf01eba019b69eVnu 13: 0x7fab44b1bb50 - trans::base::trans_item::h1506a2e4228c48caCSt 14: 0x7fab44c1859c - trans::base::trans_crate::h6ca4511310a24dc9fPu 15: 0x7fab45af55c3 - driver::phase_4_translate_to_llvm::h44ad816874743241kOa 16: 0x7fab45ad11b3 - driver::compile_input::h3bad48bfc23f6006Rba 17: 0x7fab45b88b02 - run_compiler::haa99afb1c99d7db1x2b 18: 0x7fab45b8694c - thunk::F.Invoke&lt;A, R&gt;::invoke::h10898031602178947258 19: 0x7fab45b859d0 - rt::unwind::try::try_fn::h4687345873392121579 20: 0x7fab45558fc8 - rust_try_inner 21: 0x7fab45558fb5 - rust_try 22: 0x7fab45b85e76 - thunk::F.Invoke&lt;A, R&gt;::invoke::h18058446263424162958 23: 0x7fab454d69f5 - sys::thread::thread_start::h8ed6b7636995fe24B1G 24: 0x7fab3f39e373 - start_thread 25: 0x7fab450a027c - __clone 26: 0x0 - &lt;unknown&gt; </code></pre></div>
<p dir="auto">I get an ICE with similar code to this testcase : (<code class="notranslate">rustc 1.3.0 (9a92aaf19 2015-09-15)</code>)</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait Test { type T; } impl Test for u32 { type T = i32; } pub type I = &lt;u32 as Test&gt;::T; pub extern &quot;C&quot; fn test(t : I) {}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">Test</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">impl</span> <span class="pl-smi">Test</span> <span class="pl-k">for</span> <span class="pl-smi">u32</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">T</span> = <span class="pl-smi">i32</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">pub</span> <span class="pl-k">type</span> <span class="pl-smi">I</span> = &lt;<span class="pl-smi">u32</span> <span class="pl-k">as</span> <span class="pl-smi">Test</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-k">pub</span> <span class="pl-k">extern</span> <span class="pl-s">"C"</span> <span class="pl-k">fn</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">t</span> <span class="pl-kos">:</span> <span class="pl-smi">I</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <p dir="auto">trace :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'rustc' panicked at 'Box&lt;Any&gt;', ../src/libsyntax/diagnostic.rs:253 stack backtrace: 1: 0x7f32612f68ee - sys::backtrace::write::haf6e4e635ac76143Ivs 2: 0x7f32612fefd5 - panicking::on_panic::ha085a58a08f78856lzx 3: 0x7f32612bfbce - rt::unwind::begin_unwind_inner::hc90ee27246f12475C0w 4: 0x7f325e6dc76c - rt::unwind::begin_unwind::h11988818671084554314 5: 0x7f325e6de0eb - diagnostic::Handler::bug::h57b1fbd717704399sdB 6: 0x7f325f2c95a8 - session::Session::bug::h42a2bcf9b9358d7aFRt 7: 0x7f32600d2073 - trans::type_of::in_memory_type_of::h0b2beb6279eadc99CmN 8: 0x7f32600d1abc - trans::type_of::in_memory_type_of::h0b2beb6279eadc99CmN 9: 0x7f32600d4191 - trans::type_of::type_of::hc9e8f77b11cdf8c20lN 10: 0x7f32601b5473 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h8884525770310809719 11: 0x7f32601b4eb0 - trans::foreign::foreign_signature::h983512416c3490efwOF 12: 0x7f32601b4ac9 - trans::foreign::foreign_types_for_fn_ty::hacded173730270321PF 13: 0x7f3260105a5c - trans::foreign::register_rust_fn_with_foreign_abi::hfd00bac55a193331xgF 14: 0x7f32600ffa12 - trans::base::get_item_val::hd0ae7a460f0d2610BBj 15: 0x7f32600fba29 - trans::base::trans_item::hae00c0ff97548410Pdj 16: 0x7f326010856c - trans::base::trans_crate::h001f92a4a2fe58ffi0j 17: 0x7f32618705d4 - driver::phase_4_translate_to_llvm::h2c6a45f20e7923ee5Oa 18: 0x7f326186ab65 - driver::phase_3_run_analysis_passes::closure.16545 19: 0x7f3261864d91 - middle::ty::ctxt&lt;'tcx&gt;::create_and_enter::h17619121053301903364 20: 0x7f326185fc71 - driver::phase_3_run_analysis_passes::h12169435128770927116 21: 0x7f3261843d70 - driver::compile_input::h50576600c327a48aTba 22: 0x7f326192a083 - run_compiler::h08c4308e3023ae95A7b 23: 0x7f3261927afe - boxed::F.FnBox&lt;A&gt;::call_box::h5719507417069443679 24: 0x7f3261927429 - rt::unwind::try::try_fn::h17024725433081724618 25: 0x7f32612feacd - __rust_try 26: 0x7f32612e9b77 - rt::unwind::try::inner_try::h59523aa853a0e10avWw 27: 0x7f3261927648 - boxed::F.FnBox&lt;A&gt;::call_box::h16487981074879516847 28: 0x7f32612fdc11 - sys::thread::Thread::new::thread_start::h890d1188505773c835v 29: 0x7f325b9650a3 - start_thread 30: 0x7f3260f5404c - clone 31: 0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">thread 'rustc' panicked at 'Box&lt;Any&gt;', ../src/libsyntax/diagnostic.rs:253 stack backtrace: 1: 0x7f32612f68ee - sys::backtrace::write::haf6e4e635ac76143Ivs 2: 0x7f32612fefd5 - panicking::on_panic::ha085a58a08f78856lzx 3: 0x7f32612bfbce - rt::unwind::begin_unwind_inner::hc90ee27246f12475C0w 4: 0x7f325e6dc76c - rt::unwind::begin_unwind::h11988818671084554314 5: 0x7f325e6de0eb - diagnostic::Handler::bug::h57b1fbd717704399sdB 6: 0x7f325f2c95a8 - session::Session::bug::h42a2bcf9b9358d7aFRt 7: 0x7f32600d2073 - trans::type_of::in_memory_type_of::h0b2beb6279eadc99CmN 8: 0x7f32600d1abc - trans::type_of::in_memory_type_of::h0b2beb6279eadc99CmN 9: 0x7f32600d4191 - trans::type_of::type_of::hc9e8f77b11cdf8c20lN 10: 0x7f32601b5473 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h8884525770310809719 11: 0x7f32601b4eb0 - trans::foreign::foreign_signature::h983512416c3490efwOF 12: 0x7f32601b4ac9 - trans::foreign::foreign_types_for_fn_ty::hacded173730270321PF 13: 0x7f3260105a5c - trans::foreign::register_rust_fn_with_foreign_abi::hfd00bac55a193331xgF 14: 0x7f32600ffa12 - trans::base::get_item_val::hd0ae7a460f0d2610BBj 15: 0x7f32600fba29 - trans::base::trans_item::hae00c0ff97548410Pdj 16: 0x7f326010856c - trans::base::trans_crate::h001f92a4a2fe58ffi0j 17: 0x7f32618705d4 - driver::phase_4_translate_to_llvm::h2c6a45f20e7923ee5Oa 18: 0x7f326186ab65 - driver::phase_3_run_analysis_passes::closure.16545 19: 0x7f3261864d91 - middle::ty::ctxt&lt;'tcx&gt;::create_and_enter::h17619121053301903364 20: 0x7f326185fc71 - driver::phase_3_run_analysis_passes::h12169435128770927116 21: 0x7f3261843d70 - driver::compile_input::h50576600c327a48aTba 22: 0x7f326192a083 - run_compiler::h08c4308e3023ae95A7b 23: 0x7f3261927afe - boxed::F.FnBox&lt;A&gt;::call_box::h5719507417069443679 24: 0x7f3261927429 - rt::unwind::try::try_fn::h17024725433081724618 25: 0x7f32612feacd - __rust_try 26: 0x7f32612e9b77 - rt::unwind::try::inner_try::h59523aa853a0e10avWw 27: 0x7f3261927648 - boxed::F.FnBox&lt;A&gt;::call_box::h16487981074879516847 28: 0x7f32612fdc11 - sys::thread::Thread::new::thread_start::h890d1188505773c835v 29: 0x7f325b9650a3 - start_thread 30: 0x7f3260f5404c - clone 31: 0x0 - &lt;unknown&gt; </code></pre></div>
1
<p dir="auto">I am using twitter bootstrap in my application but every time I try to upload image I get the following error</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6980311/4112100/a4e7b166-321b-11e4-8ff0-dba89b49c075.png"><img src="https://cloud.githubusercontent.com/assets/6980311/4112100/a4e7b166-321b-11e4-8ff0-dba89b49c075.png" alt="screen shot 2014-09-01 at 11 00 15 pm" style="max-width: 100%;"></a></p> <p dir="auto">I have just the following code snippet to register bootstrap<br> $baseUrl = Yii::app()-&gt;theme-&gt;baseUrl;<br> $cs = Yii::app()-&gt;getClientScript();<br> Yii::app()-&gt;clientScript-&gt;registerCoreScript('jquery');<br> $cs-&gt;registerScriptFile($baseUrl.'/js/bootstrap.js');</p> <p dir="auto">Also my popups don't work!</p>
<p dir="auto">I am Using Firefox 22.</p> <p dir="auto">Reproduce:</p> <ul dir="auto"> <li>Open <a href="http://getbootstrap.com/components/" rel="nofollow">http://getbootstrap.com/components/</a></li> <li>The error is visible in the console when clicking anywhere in the page but a dropdown menu.</li> </ul> <p dir="auto">I could track down the error to the <code class="notranslate">clearMenus</code> call, which in turn calls <code class="notranslate">getParents</code> where the error finally happens.</p> <p dir="auto">In <code class="notranslate">getParents</code> the <code class="notranslate">selector</code> variable is set to <code class="notranslate">'#'</code>. This character is stripped away inside jQuery.</p>
1
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto"><code class="notranslate">ngc</code> command fails when "noUnusedParameters" is set in tsconfig.json with <code class="notranslate">'$event' is declared but never used</code> even if <code class="notranslate">$event</code> is not declared anywhere.</p> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto"><code class="notranslate">ngc</code> should not fail when "noUnusedParameters" is set in tsconfig.json.</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p> <p dir="auto"><a href="https://github.com/n9niwas/ngissue">Repository with reproduction</a>. Run <code class="notranslate">yarn start</code> (<code class="notranslate">npm start</code>).</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto">Support of "noUnusedParameters" TypeScript setting.</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <p dir="auto">Operating system: Windows 10.</p> <ul dir="auto"> <li><strong>Angular version:</strong> 4.0.0</li> </ul> <ul dir="auto"> <li> <p dir="auto"><strong>Language:</strong> [TypeScript 2.2]</p> </li> <li> <p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> = v7.7.2</p> </li> </ul>
<p dir="auto">If I have a set of directives that collaborate to get stuff done (e.g <code class="notranslate">DefaultValueAccessor</code> and <code class="notranslate">NgModel</code>) and I include just one of them, I might get very poor error messages about stuff being null.</p> <p dir="auto">Example with declaring view dependency on NgModel rather than on FORM_DIRECTIVES results in this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="EXCEPTION: No value accessor for '' in [null] angular2.min.js:16 EXCEPTION: No value accessor for '' in [null]t.logError @ angular2.min.js:16t.logGroup @ angular2.min.js:16e.call @ angular2.min.js:3(anonymous function) @ angular2.min.js:16e._onError @ angular2.min.js:9t.onError @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1O @ angular2.min.js:1A @ angular2.min.js:1I @ angular2.min.js:1(anonymous function) @ angular2.min.js:1r @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1h @ angular2.min.js:1 angular2.min.js:16 ORIGINAL EXCEPTION: No value accessor for ''t.logError @ angular2.min.js:16e.call @ angular2.min.js:3(anonymous function) @ angular2.min.js:16e._onError @ angular2.min.js:9t.onError @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1O @ angular2.min.js:1A @ angular2.min.js:1I @ angular2.min.js:1(anonymous function) @ angular2.min.js:1r @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1h @ angular2.min.js:1 angular2.min.js:16 ORIGINAL STACKTRACE:t.logError @ angular2.min.js:16e.call @ angular2.min.js:3(anonymous function) @ angular2.min.js:16e._onError @ angular2.min.js:9t.onError @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1O @ angular2.min.js:1A @ angular2.min.js:1I @ angular2.min.js:1(anonymous function) @ angular2.min.js:1r @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1h @ angular2.min.js:1 angular2.min.js:16 Error: No value accessor for '' at new t (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:12:23656) at o (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:21:17177) at Object.i [as setUpControl] (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:21:16718) at t.onChanges (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:10:3971) at e.ChangeDetector_App_0.detectChangesInRecordsInternal (eval at &lt;anonymous&gt; (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:11265), &lt;anonymous&gt;:41:57) at e.detectChangesInRecords (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:4786) at e.runDetectChanges (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:4363) at e._detectChangesInShadowDomChildren (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:6205) at e.runDetectChanges (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:4476) at e.detectChanges (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:4094)"><pre class="notranslate"><code class="notranslate">EXCEPTION: No value accessor for '' in [null] angular2.min.js:16 EXCEPTION: No value accessor for '' in [null]t.logError @ angular2.min.js:16t.logGroup @ angular2.min.js:16e.call @ angular2.min.js:3(anonymous function) @ angular2.min.js:16e._onError @ angular2.min.js:9t.onError @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1O @ angular2.min.js:1A @ angular2.min.js:1I @ angular2.min.js:1(anonymous function) @ angular2.min.js:1r @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1h @ angular2.min.js:1 angular2.min.js:16 ORIGINAL EXCEPTION: No value accessor for ''t.logError @ angular2.min.js:16e.call @ angular2.min.js:3(anonymous function) @ angular2.min.js:16e._onError @ angular2.min.js:9t.onError @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1O @ angular2.min.js:1A @ angular2.min.js:1I @ angular2.min.js:1(anonymous function) @ angular2.min.js:1r @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1h @ angular2.min.js:1 angular2.min.js:16 ORIGINAL STACKTRACE:t.logError @ angular2.min.js:16e.call @ angular2.min.js:3(anonymous function) @ angular2.min.js:16e._onError @ angular2.min.js:9t.onError @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1O @ angular2.min.js:1A @ angular2.min.js:1I @ angular2.min.js:1(anonymous function) @ angular2.min.js:1r @ angular2.min.js:9n.run @ angular2.min.js:1(anonymous function) @ angular2.min.js:9(anonymous function) @ angular2.min.js:1h @ angular2.min.js:1 angular2.min.js:16 Error: No value accessor for '' at new t (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:12:23656) at o (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:21:17177) at Object.i [as setUpControl] (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:21:16718) at t.onChanges (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:10:3971) at e.ChangeDetector_App_0.detectChangesInRecordsInternal (eval at &lt;anonymous&gt; (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:11265), &lt;anonymous&gt;:41:57) at e.detectChangesInRecords (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:4786) at e.runDetectChanges (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:4363) at e._detectChangesInShadowDomChildren (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:6205) at e.runDetectChanges (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:4476) at e.detectChanges (https://code.angularjs.org/2.0.0-alpha.39/angular2.min.js:17:4094) </code></pre></div> <p dir="auto">It would be great if we either warned about the missing dependency or included it by default (too much magic?). Maybe just throwing an error saying please import "FORM_DIRECTIVES" would be the best.</p>
0
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">include_role</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible --version ansible 2.2.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o override"><pre class="notranslate"><code class="notranslate">$ ansible --version ansible 2.2.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o override </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults] inventory = /etc/ansible/hosts private_key_file = /home/insecure_private_key transport = ssh host_key_checking = False jinja2_extensions = jinja2.ext.do gathering = smart gather_subset = network roles_path = /usr/share/ansible/roles"><pre class="notranslate"><code class="notranslate">[defaults] inventory = /etc/ansible/hosts private_key_file = /home/insecure_private_key transport = ssh host_key_checking = False jinja2_extensions = jinja2.ext.do gathering = smart gather_subset = network roles_path = /usr/share/ansible/roles </code></pre></div> <p dir="auto">/etc/ansible/hosts</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[cluster] thisNode ansible_host=localhost ansible_connection=local dww"><pre class="notranslate"><code class="notranslate">[cluster] thisNode ansible_host=localhost ansible_connection=local dww </code></pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Ubuntu 14.04</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Using include_role in a loop seems to be executed twice: once with hosts, and another with the specified items.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto"><code class="notranslate">ansible-playbook testPlaybook.yml</code></p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--- - hosts: cluster tasks: - name: Execute test role include_role: name: testrole allow_duplicates: False with_items: - 'one' ..."><pre class="notranslate">--- - <span class="pl-ent">hosts</span>: <span class="pl-s">cluster</span> <span class="pl-ent">tasks</span>: - <span class="pl-ent">name</span>: <span class="pl-s">Execute test role</span> <span class="pl-ent">include_role</span>: <span class="pl-ent">name</span>: <span class="pl-s">testrole</span> <span class="pl-ent">allow_duplicates</span>: <span class="pl-c1">False</span> <span class="pl-ent">with_items</span>: - <span class="pl-s"><span class="pl-pds">'</span>one<span class="pl-pds">'</span></span> ...</pre></div> <p dir="auto">/usr/share/ansible/roles/testrole/tasks/main.yml</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--- - name: Just debugging debug: ..."><pre class="notranslate">--- - <span class="pl-ent">name</span>: <span class="pl-s">Just debugging</span> <span class="pl-ent">debug</span>: ...</pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">I expected to see testrole executed once, since I am only passing a single item to it</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [cluster] ***************************************************************** TASK [setup] ******************************************************************* ok: [thisNode] ok: [dww] TASK [Execute test role] ******************************************************* TASK [testrole : Just debugging] *********************************************** ok: [dww] =&gt; { &quot;msg&quot;: &quot;Hello world!&quot; } ok: [thisNode] =&gt; { &quot;msg&quot;: &quot;Hello world!&quot; }"><pre class="notranslate"><code class="notranslate">PLAY [cluster] ***************************************************************** TASK [setup] ******************************************************************* ok: [thisNode] ok: [dww] TASK [Execute test role] ******************************************************* TASK [testrole : Just debugging] *********************************************** ok: [dww] =&gt; { "msg": "Hello world!" } ok: [thisNode] =&gt; { "msg": "Hello world!" } </code></pre></div> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">I see testrole executed twice</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [cluster] ***************************************************************** TASK [setup] ******************************************************************* ok: [thisNode] ok: [dww] TASK [Execute test role] ******************************************************* TASK [testrole : Just debugging] *********************************************** ok: [dww] =&gt; { &quot;msg&quot;: &quot;Hello world!&quot; } ok: [thisNode] =&gt; { &quot;msg&quot;: &quot;Hello world!&quot; } TASK [testrole : Just debugging] *********************************************** ok: [thisNode] =&gt; { &quot;msg&quot;: &quot;Hello world!&quot; } ok: [dww] =&gt; { &quot;msg&quot;: &quot;Hello world!&quot; } PLAY RECAP ********************************************************************* dww : ok=3 changed=0 unreachable=0 failed=0 thisNode : ok=3 changed=0 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">PLAY [cluster] ***************************************************************** TASK [setup] ******************************************************************* ok: [thisNode] ok: [dww] TASK [Execute test role] ******************************************************* TASK [testrole : Just debugging] *********************************************** ok: [dww] =&gt; { "msg": "Hello world!" } ok: [thisNode] =&gt; { "msg": "Hello world!" } TASK [testrole : Just debugging] *********************************************** ok: [thisNode] =&gt; { "msg": "Hello world!" } ok: [dww] =&gt; { "msg": "Hello world!" } PLAY RECAP ********************************************************************* dww : ok=3 changed=0 unreachable=0 failed=0 thisNode : ok=3 changed=0 unreachable=0 failed=0 </code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">core</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="devel"><pre class="notranslate"><code class="notranslate">devel </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">N/A</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">N/A</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">include_role+with_items executes once per item per host <strong>on each host</strong>.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">x.yml::</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- - hosts: all gather_facts: no tasks: - include_role: name=p with_items: [1,2]"><pre class="notranslate"><code class="notranslate">--- - hosts: all gather_facts: no tasks: - include_role: name=p with_items: [1,2] </code></pre></div> <p dir="auto">roles/p/tasks/main.yml::</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- command: cat /proc/uptime"><pre class="notranslate"><code class="notranslate">- command: cat /proc/uptime </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">I expected <code class="notranslate">cat /proc/uptime</code> to be executed twice on a and twice on b.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">It actually executes <code class="notranslate">cat /proc/uptime</code> <strong>four times</strong> on both hosts.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002532&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.080587&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.078055&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.64 3614256.86&quot;, &quot;stdout_lines&quot;: [&quot;987830.64 3614256.86&quot;], &quot;warnings&quot;: []} changed: [a] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002532&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.080587&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.078055&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.64 3614256.86&quot;, &quot;stdout_lines&quot;: [&quot;987830.64 3614256.86&quot;], &quot;warnings&quot;: []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002069&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.214287&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.212218&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.77 3614257.08&quot;, &quot;stdout_lines&quot;: [&quot;987830.77 3614257.08&quot;], &quot;warnings&quot;: []} changed: [a] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002710&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.214238&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.211528&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.77 3614257.08&quot;, &quot;stdout_lines&quot;: [&quot;987830.77 3614257.08&quot;], &quot;warnings&quot;: []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [a] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002648&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.340613&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.337965&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.90 3614257.30&quot;, &quot;stdout_lines&quot;: [&quot;987830.90 3614257.30&quot;], &quot;warnings&quot;: []} changed: [b] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002124&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.345231&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.343107&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.91 3614257.30&quot;, &quot;stdout_lines&quot;: [&quot;987830.91 3614257.30&quot;], &quot;warnings&quot;: []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002734&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.475102&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.472368&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987831.04 3614257.51&quot;, &quot;stdout_lines&quot;: [&quot;987831.04 3614257.51&quot;], &quot;warnings&quot;: []} changed: [a] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002468&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.478968&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.476500&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987831.04 3614257.52&quot;, &quot;stdout_lines&quot;: [&quot;987831.04 3614257.52&quot;], &quot;warnings&quot;: []} PLAY RECAP ************************************************************************************************************************************************************************************ a : ok=4 changed=4 unreachable=0 failed=0 b : ok=4 changed=4 unreachable=0 failed=0 "><pre class="notranslate"><code class="notranslate">TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002532", "end": "2016-12-05 20:00:08.080587", "rc": 0, "start": "2016-12-05 20:00:08.078055", "stderr": "", "stdout": "987830.64 3614256.86", "stdout_lines": ["987830.64 3614256.86"], "warnings": []} changed: [a] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002532", "end": "2016-12-05 20:00:08.080587", "rc": 0, "start": "2016-12-05 20:00:08.078055", "stderr": "", "stdout": "987830.64 3614256.86", "stdout_lines": ["987830.64 3614256.86"], "warnings": []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002069", "end": "2016-12-05 20:00:08.214287", "rc": 0, "start": "2016-12-05 20:00:08.212218", "stderr": "", "stdout": "987830.77 3614257.08", "stdout_lines": ["987830.77 3614257.08"], "warnings": []} changed: [a] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002710", "end": "2016-12-05 20:00:08.214238", "rc": 0, "start": "2016-12-05 20:00:08.211528", "stderr": "", "stdout": "987830.77 3614257.08", "stdout_lines": ["987830.77 3614257.08"], "warnings": []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [a] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002648", "end": "2016-12-05 20:00:08.340613", "rc": 0, "start": "2016-12-05 20:00:08.337965", "stderr": "", "stdout": "987830.90 3614257.30", "stdout_lines": ["987830.90 3614257.30"], "warnings": []} changed: [b] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002124", "end": "2016-12-05 20:00:08.345231", "rc": 0, "start": "2016-12-05 20:00:08.343107", "stderr": "", "stdout": "987830.91 3614257.30", "stdout_lines": ["987830.91 3614257.30"], "warnings": []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002734", "end": "2016-12-05 20:00:08.475102", "rc": 0, "start": "2016-12-05 20:00:08.472368", "stderr": "", "stdout": "987831.04 3614257.51", "stdout_lines": ["987831.04 3614257.51"], "warnings": []} changed: [a] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002468", "end": "2016-12-05 20:00:08.478968", "rc": 0, "start": "2016-12-05 20:00:08.476500", "stderr": "", "stdout": "987831.04 3614257.52", "stdout_lines": ["987831.04 3614257.52"], "warnings": []} PLAY RECAP ************************************************************************************************************************************************************************************ a : ok=4 changed=4 unreachable=0 failed=0 b : ok=4 changed=4 unreachable=0 failed=0 </code></pre></div>
1
<p dir="auto">Apologies if this is mentioned elsewhere, but I couldn't find an issue/PR that mentions it.</p> <p dir="auto">The <a href="https://developer.mozilla.org/en/docs/Web/API/Fetch_API" rel="nofollow">Fetch API</a> is still experimental, but I assume its definitions will make their way into TypeScript core at some point?</p>
<p dir="auto">for exemple :</p> <p dir="auto">module mymodule {</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export class myclass extends anotherclass {"><pre class="notranslate"><code class="notranslate">export class myclass extends anotherclass { </code></pre></div> <p dir="auto">should throw a warning because another class is not referenced as this in the header :</p> <p dir="auto"><code class="notranslate">/// &lt;reference path="./anotherclass.ts" /&gt;</code></p> <p dir="auto">this cause in error in code, because extends class is not includes in base class at runtime :</p> <p dir="auto"><code class="notranslate">Uncaught TypeError: Cannot read property 'prototype' of undefined</code></p>
0
<p dir="auto">We have some mapping options that sound interesting but are actually almost useless or dangerous. I propose to remove them:</p> <h3 dir="auto"><code class="notranslate">_type: { index: no }</code></h3> <p dir="auto">Not indexing the <code class="notranslate">_type</code> sounds appealing since documentation mentions everything will keep on working, so that should just save space. Except that elasticsearch will internally run a prefix query on the <code class="notranslate">_uid</code> field instead, which is going to be super slow. I think we should remove this option.</p> <h3 dir="auto"><code class="notranslate">_type: { store: yes }</code> and <code class="notranslate">_id: { store: yes }</code></h3> <p dir="auto">Storing the type and _id is useless since we already enforce the _uid to be stored, and the _uid contains these informations.</p> <h3 dir="auto"><code class="notranslate">_id: { index: not_analyzed }</code></h3> <p dir="auto">The <code class="notranslate">_id</code> field is the same for all documents so we should not need to index, store or doc-value it. (Can be done now thanks to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="32978899" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/6073" data-hovercard-type="pull_request" data-hovercard-url="/elastic/elasticsearch/pull/6073/hovercard" href="https://github.com/elastic/elasticsearch/pull/6073">#6073</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="44713017" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/7965" data-hovercard-type="pull_request" data-hovercard-url="/elastic/elasticsearch/pull/7965/hovercard" href="https://github.com/elastic/elasticsearch/pull/7965">#7965</a>)</p> <p dir="auto">In general I'm wondering if we shouldn't go further and completely lock down how data is indexed/stored/docvalued for meta fields. There would just remain high-level configuration options such as <code class="notranslate">enabled</code> on the <code class="notranslate">_timestamp</code> mapper or <code class="notranslate">type</code> on <code class="notranslate">_parent</code>.</p> <p dir="auto">Relates to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="51553271" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/8870" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/8870/hovercard" href="https://github.com/elastic/elasticsearch/issues/8870">#8870</a></p>
<p dir="auto">With <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="152001521" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/18075" data-hovercard-type="pull_request" data-hovercard-url="/elastic/elasticsearch/pull/18075/hovercard" href="https://github.com/elastic/elasticsearch/pull/18075">#18075</a> merged we now have the option to execute our doc snippets through the REST test infrastructure.</p> <p dir="auto">Many of the small parts of original REST tests I've read look like great stories around how to use our REST API. I have no idea how much overlap there is between our docs and the REST test-suite, however I would imagine that one could convert several REST tests into nice pieces of documentation showing the complete story from indexing data to using the API under test.</p> <p dir="auto">I'm wondering if it would make sense to consolidate what we are now (or in the hopefully near future) testing from within our docs and what is covered in the REST tests. (Intentionally not adding any version label to this issue - currently this is really just a vague question instead of a hard and fast proposal to move any specific way.)</p>
0
<p dir="auto">The expression 1.+2 produces 3::Int64 since the expression is parsed as (1) .+ (2) instead of (1.)+(2). It is very surprising (at least to me) that in the .+ operator has higher precedence than the floating literal in the lexer. It also means that 1.+2 gives a different value than 2+1., which is surprising to me.</p> <p dir="auto">I am learning Julia, so please disregard if this is an intentional or well-documented decision.</p>
<p dir="auto">For an array a, I'm using 1.*a to ensure that it is a Float64 or Complex{Float64}. This doesn't work with</p> <p dir="auto">a=[0]</p> <p dir="auto">I'm assuming this is a bug? Or is 1.*a bad form for converting?</p>
1
<p dir="auto">I first brought this up in the julia users group <a href="https://groups.google.com/forum/#!topic/julia-users/9XENk9Wd1YA" rel="nofollow">here</a>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; list = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;] for i in enumerate(list) println(i) end (1,&quot;a&quot;) (2,&quot;b&quot;) (3,&quot;c&quot;)"><pre class="notranslate"><code class="notranslate">julia&gt; list = ["a", "b", "c"] for i in enumerate(list) println(i) end (1,"a") (2,"b") (3,"c") </code></pre></div> <p dir="auto">But:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; addprocs(2) @parallel for i in enumerate(list) println(i) end ERROR: `getindex` has no method matching getindex(::Enumerate{Array{ASCIIString,1}}, ::UnitRange{Int64})"><pre class="notranslate"><code class="notranslate">julia&gt; addprocs(2) @parallel for i in enumerate(list) println(i) end ERROR: `getindex` has no method matching getindex(::Enumerate{Array{ASCIIString,1}}, ::UnitRange{Int64}) </code></pre></div> <p dir="auto">As <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Ismael-VC/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Ismael-VC">@Ismael-VC</a> pointed out in the user group, it works in parallel with</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; @parallel for i in collect(enumerate(list)) println(i) end"><pre class="notranslate"><code class="notranslate">julia&gt; @parallel for i in collect(enumerate(list)) println(i) end </code></pre></div> <p dir="auto">But it seems a bit confusing to me that the behaviour of <code class="notranslate">enumerate()</code> changes depending on whether the loop is run in parallel or not.</p>
<p dir="auto">Consider this code:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="A = eye(3) B = {A,A,A} for (a1,a2) in zip(B,B) a1+a2 end"><pre class="notranslate">A <span class="pl-k">=</span> <span class="pl-c1">eye</span>(<span class="pl-c1">3</span>) B <span class="pl-k">=</span> {A,A,A} <span class="pl-k">for</span> (a1,a2) <span class="pl-k">in</span> <span class="pl-c1">zip</span>(B,B) a1<span class="pl-k">+</span>a2 <span class="pl-k">end</span></pre></div> <p dir="auto">It works fine. If I add <code class="notranslate">@parallel (+)</code> it fails with:</p> <blockquote> <p dir="auto">exception on 1: ERROR: MethodError: <code class="notranslate">getindex</code> has no method matching getindex(::Base.Zip2{Array{Any,1},Array{Any,1}}, ::Int64)<br> in anonymous at no file:1471<br> in anonymous at multi.jl:1320<br> in run_work_thunk at multi.jl:617<br> in run_work_thunk at multi.jl:626<br> in anonymous at task.jl:6</p> </blockquote>
1
<p dir="auto">When <code class="notranslate">np.array()</code> or <code class="notranslate">.asarray()</code> is used to go from a list of integers, without specifying a dtype explicitly, it can pick default dtypes including int64 &amp; uint64. But there's a strange corner case where it defaults to float64 and loses precision, even though all the values could be uint64. Specfically, this occurs when some but not all values can be int64:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [11]: max_int64 = np.iinfo(np.int64).max In [12]: np.array([max_int64]).dtype Out[12]: dtype('int64') In [13]: np.array([max_int64 + 1]).dtype Out[13]: dtype('uint64') In [14]: np.array([max_int64 + 1, max_int64]).dtype Out[14]: dtype('float64')"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">11</span>]: <span class="pl-s1">max_int64</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">iinfo</span>(<span class="pl-s1">np</span>.<span class="pl-s1">int64</span>).<span class="pl-s1">max</span> <span class="pl-v">In</span> [<span class="pl-c1">12</span>]: <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-s1">max_int64</span>]).<span class="pl-s1">dtype</span> <span class="pl-v">Out</span>[<span class="pl-c1">12</span>]: <span class="pl-en">dtype</span>(<span class="pl-s">'int64'</span>) <span class="pl-v">In</span> [<span class="pl-c1">13</span>]: <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-s1">max_int64</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span>]).<span class="pl-s1">dtype</span> <span class="pl-v">Out</span>[<span class="pl-c1">13</span>]: <span class="pl-en">dtype</span>(<span class="pl-s">'uint64'</span>) <span class="pl-v">In</span> [<span class="pl-c1">14</span>]: <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-s1">max_int64</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span>, <span class="pl-s1">max_int64</span>]).<span class="pl-s1">dtype</span> <span class="pl-v">Out</span>[<span class="pl-c1">14</span>]: <span class="pl-en">dtype</span>(<span class="pl-s">'float64'</span>)</pre></div> <p dir="auto">It doesn't depend on the order they're in, and it's not a general consequence of having two values rather than one - two values above this threshold get <code class="notranslate">uint64</code> as I'd expect.</p> <p dir="auto">Tested on Numpy 1.18.4, Python 3.8.2.</p> <p dir="auto">Sorry if this has already been discussed; it's a tricky thing to search for. This relates to an issue reported on h5py: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="619100596" data-permission-text="Title is private" data-url="https://github.com/h5py/h5py/issues/1547" data-hovercard-type="issue" data-hovercard-url="/h5py/h5py/issues/1547/hovercard" href="https://github.com/h5py/h5py/issues/1547">h5py/h5py#1547</a> .</p>
<p dir="auto">The error message produced by setting value of mismatching shape to array is incorrect.</p> <p dir="auto">Here is an example.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; a = numpy.zeros((4, 4, 4)) &gt;&gt;&gt; ind = numpy.array([[1,0], [2, 3]]) &gt;&gt;&gt; v_shape = (2,2,4,4) &gt;&gt;&gt; v = numpy.arange(np.prod(v_shape)).reshape(v_shape) &gt;&gt;&gt; a[:, ind, :] = v ValueError: shape mismatch: value array of shape (2,2,4,4) could not be broadcast to indexing result of shape (2,2,4,4)"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">zeros</span>((<span class="pl-c1">4</span>, <span class="pl-c1">4</span>, <span class="pl-c1">4</span>)) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">ind</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">array</span>([[<span class="pl-c1">1</span>,<span class="pl-c1">0</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">3</span>]]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">v_shape</span> <span class="pl-c1">=</span> (<span class="pl-c1">2</span>,<span class="pl-c1">2</span>,<span class="pl-c1">4</span>,<span class="pl-c1">4</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">v</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-en">arange</span>(<span class="pl-s1">np</span>.<span class="pl-en">prod</span>(<span class="pl-s1">v_shape</span>)).<span class="pl-en">reshape</span>(<span class="pl-s1">v_shape</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a</span>[:, <span class="pl-s1">ind</span>, :] <span class="pl-c1">=</span> <span class="pl-s1">v</span> <span class="pl-v">ValueError</span>: <span class="pl-s1">shape</span> <span class="pl-s1">mismatch</span>: <span class="pl-s1">value</span> <span class="pl-s1">array</span> <span class="pl-s1">of</span> <span class="pl-en">shape</span> (<span class="pl-c1">2</span>,<span class="pl-c1">2</span>,<span class="pl-c1">4</span>,<span class="pl-c1">4</span>) <span class="pl-s1">could</span> <span class="pl-c1">not</span> <span class="pl-s1">be</span> <span class="pl-s1">broadcast</span> <span class="pl-s1">to</span> <span class="pl-s1">indexing</span> <span class="pl-s1">result</span> <span class="pl-s1">of</span> <span class="pl-en">shape</span> (<span class="pl-c1">2</span>,<span class="pl-c1">2</span>,<span class="pl-c1">4</span>,<span class="pl-c1">4</span>)</pre></div> <p dir="auto">The shape that is requested by this example is <code class="notranslate">(4, 2, 2, 4)</code>. Therefore, error message should say</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ValueError: shape mismatch: value array of shape (2,2,4,4) could not be broadcast to indexing result of shape (4,2,2,4)"><pre class="notranslate"><span class="pl-v">ValueError</span>: <span class="pl-s1">shape</span> <span class="pl-s1">mismatch</span>: <span class="pl-s1">value</span> <span class="pl-s1">array</span> <span class="pl-s1">of</span> <span class="pl-en">shape</span> (<span class="pl-c1">2</span>,<span class="pl-c1">2</span>,<span class="pl-c1">4</span>,<span class="pl-c1">4</span>) <span class="pl-s1">could</span> <span class="pl-c1">not</span> <span class="pl-s1">be</span> <span class="pl-s1">broadcast</span> <span class="pl-s1">to</span> <span class="pl-s1">indexing</span> <span class="pl-s1">result</span> <span class="pl-s1">of</span> <span class="pl-en">shape</span> (<span class="pl-c1">4</span>,<span class="pl-c1">2</span>,<span class="pl-c1">2</span>,<span class="pl-c1">4</span>)</pre></div>
0
<p dir="auto">Tested both with 0.11.1 and recent dev version:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt import seaborn as sns def show_counts(color, data): ax = plt.gca() ax.text(0.5, 0.95, f'Count: {len(data)}', ha='center', color=color, transform=ax.transAxes) penguins = sns.load_dataset(&quot;penguins&quot;) g = sns.displot(data=penguins, x=&quot;flipper_length_mm&quot;, y=&quot;bill_length_mm&quot;, col=&quot;species&quot;, height=3) g.map_dataframe(show_counts) plt.tight_layout()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">import</span> <span class="pl-s1">seaborn</span> <span class="pl-k">as</span> <span class="pl-s1">sns</span> <span class="pl-k">def</span> <span class="pl-en">show_counts</span>(<span class="pl-s1">color</span>, <span class="pl-s1">data</span>): <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">gca</span>() <span class="pl-s1">ax</span>.<span class="pl-en">text</span>(<span class="pl-c1">0.5</span>, <span class="pl-c1">0.95</span>, <span class="pl-s">f'Count: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-en">len</span>(<span class="pl-s1">data</span>)<span class="pl-kos">}</span></span>'</span>, <span class="pl-s1">ha</span><span class="pl-c1">=</span><span class="pl-s">'center'</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s1">color</span>, <span class="pl-s1">transform</span><span class="pl-c1">=</span><span class="pl-s1">ax</span>.<span class="pl-s1">transAxes</span>) <span class="pl-s1">penguins</span> <span class="pl-c1">=</span> <span class="pl-s1">sns</span>.<span class="pl-en">load_dataset</span>(<span class="pl-s">"penguins"</span>) <span class="pl-s1">g</span> <span class="pl-c1">=</span> <span class="pl-s1">sns</span>.<span class="pl-en">displot</span>(<span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">penguins</span>, <span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s">"flipper_length_mm"</span>, <span class="pl-s1">y</span><span class="pl-c1">=</span><span class="pl-s">"bill_length_mm"</span>, <span class="pl-s1">col</span><span class="pl-c1">=</span><span class="pl-s">"species"</span>, <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">3</span>) <span class="pl-s1">g</span>.<span class="pl-en">map_dataframe</span>(<span class="pl-s1">show_counts</span>) <span class="pl-s1">plt</span>.<span class="pl-en">tight_layout</span>()</pre></div> <p dir="auto">Without calling <code class="notranslate">map_dataframe</code> the outer x and y labels are set to the x and y column names used in <code class="notranslate">displot</code>. After calling <code class="notranslate">map_dataframe</code> the labels are empty.</p> <p dir="auto">(Apart from that, the function <code class="notranslate">g.set_axis_labels()</code> doesn't seem to be documented, although it appears in the <code class="notranslate">displot</code> and <code class="notranslate">FacetGrid</code> examples.)</p>
<p dir="auto">Calling <code class="notranslate">map_dataframe</code> on a facetgrid removes the axis labels. Reproducible example:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/24327668/106336944-435e5380-6290-11eb-9cd6-f3c9e453e5f0.png"><img width="561" alt="Screen Shot 2021-01-30 at 00 13 07" src="https://user-images.githubusercontent.com/24327668/106336944-435e5380-6290-11eb-9cd6-f3c9e453e5f0.png" style="max-width: 100%;"></a></p> <p dir="auto">what I assume would happen:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/24327668/106336929-3b9eaf00-6290-11eb-8451-6e76e2eefe3c.png"><img width="558" alt="Screen Shot 2021-01-30 at 00 13 02" src="https://user-images.githubusercontent.com/24327668/106336929-3b9eaf00-6290-11eb-8451-6e76e2eefe3c.png" style="max-width: 100%;"></a></p> <p dir="auto">Code:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import seaborn as sns tips = sns.load_dataset(&quot;tips&quot;) g = sns.relplot(data=tips, x=&quot;total_bill&quot;, y=&quot;tip&quot;, hue=&quot;day&quot;) g.map_dataframe(lambda *args, **kwargs: 1)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">seaborn</span> <span class="pl-k">as</span> <span class="pl-s1">sns</span> <span class="pl-s1">tips</span> <span class="pl-c1">=</span> <span class="pl-s1">sns</span>.<span class="pl-en">load_dataset</span>(<span class="pl-s">"tips"</span>) <span class="pl-s1">g</span> <span class="pl-c1">=</span> <span class="pl-s1">sns</span>.<span class="pl-en">relplot</span>(<span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">tips</span>, <span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s">"total_bill"</span>, <span class="pl-s1">y</span><span class="pl-c1">=</span><span class="pl-s">"tip"</span>, <span class="pl-s1">hue</span><span class="pl-c1">=</span><span class="pl-s">"day"</span>) <span class="pl-s1">g</span>.<span class="pl-en">map_dataframe</span>(<span class="pl-k">lambda</span> <span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>: <span class="pl-c1">1</span>)</pre></div> <p dir="auto">Version: 0.11.1</p>
1
<p dir="auto">I think, that the Framework should offer a nice and easy way to offload expensive tasks to some kind of background thread/isolate (maybe something like AsyncTask in Android).</p> <p dir="auto">I built something for myself since I needed image compression and did not find something easy.<br> Here is what it looks like using it:</p> <div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// getting the 'site' which is the main interface for // offloading expensive tasks. It's named after a &quot;construction site&quot; which has // multiple workers. // it will return a future object which is very convenient to handle // but it will never ever block the main UI thread with the expensive // task below image = await lime.site.commission( /// The very, very expensive function which compresses /// images using a dart library ImageUtil.compressImage, /// you can specify the positional arguments here positionalArgs: [_file] );"><pre class="notranslate"><span class="pl-c">// getting the 'site' which is the main interface for </span> <span class="pl-c">// offloading expensive tasks. It's named after a "construction site" which has </span> <span class="pl-c">// multiple workers.</span> <span class="pl-c">// it will return a future object which is very convenient to handle</span> <span class="pl-c">// but it will never ever block the main UI thread with the expensive </span> <span class="pl-c">// task below</span> image <span class="pl-k">=</span> <span class="pl-k">await</span> lime.site.<span class="pl-en">commission</span>( <span class="pl-c">/// The very, very expensive function which compresses</span> <span class="pl-c"> /// images using a dart library</span> <span class="pl-c"></span> <span class="pl-c1">ImageUtil</span>.compressImage, <span class="pl-c">/// you can specify the positional arguments here</span> <span class="pl-c"></span> positionalArgs<span class="pl-k">:</span> [_file] );</pre></div> <p dir="auto">Here is the implementation of Site as an example:</p> <div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'dart:async'; import 'dart:collection'; import 'dart:isolate'; /// Easy and convenient to use, thread-pool-like implementation for delegating /// expensive tasks to a pool of isolates /// /// Just pass the function and the desired params to [commission] and let /// the site handle everything for you by returning a really parallel computed [Future] object. /// If the [Site] currently holds a reference to an idle Isolate, then the requested computation /// wil be delegated to it immediately. Otherwise a new [Isolate] is spawned, if it would /// not exceed [SiteSetting.workersMax]. If this limit is exceeded has the task to wait /// until any [Isolate] finishes its work on any other task. /// /// Idle [Isolates] will die after [SiteSetting.workerTimeout]. class Site { /// Controls the whole behaviour of this Site and all its Isolates /// /// The site will not spawn more Isolates than defined by [SiteSetting.workersMax] /// and an idling [Isolate] will die after [SiteSetting.workerTimeout] final SiteSetting settings; /// Holds a reference to all workers currently alive final List&lt;_Worker&gt; _workers = []; /// Holds a reference to all jobs waiting for delegation to any /// [Isolate] final Queue&lt;_Job&gt; _jobs = new Queue(); /// This controller is used to notify when a [_Job] was finished /// ignore: close_sinks StreamController streamController = new StreamController.broadcast(); Site(this.settings); /// This will execute the [function] inside another Isolate and conveniently /// return a easy to handle [Future] /// /// Be careful: Isolates are not sharing any memory with each other, /// therefore try to pass immutable objects as arguments, because any /// transformation by [function] won't be reflected in the calling isolate. /// /// Spawns a new Isolate if all current Isolates are busy and /// [SiteSetting.workersMax] is not yet exceeded. /// /// Will wait for current working Isolates if [SiteSettings.workersMax] is indeed /// exceeded and all other Isolates are busy. Future&lt;dynamic&gt; commission(Function function, {List positionalArgs: const [], Map namedArgs: const{}}) async { BackgroundFunction backgroundFunction = new BackgroundFunction(function, positionalArguments: positionalArgs, namedArguments: namedArgs); _Job job = new _Job(this, backgroundFunction); _jobs.add(job); patrol(); await for (dynamic finished in streamController.stream) { if (finished == job) { return job.result; } } } /// Encourages idle [Isolate]s to take a [_Job] from /// the Queue and will spawn new a new [Isolate] if necessary /// /// This method is automatically called. /// I cannot easily image a reason why this should /// be called manually! patrol() { _workers.forEach((worker) =&gt; worker.incite()); if (_jobs.isNotEmpty) { if (_workers.length &lt; settings.workersMax) { this._workers.add( new _Worker(this) ..start() ..incite()); print(&quot;Site: Spawning worker. Total ${_workers.length}&quot;); } } } void _reportDeathOf(_Worker worker) { this._workers.remove(worker); print(&quot;Site: Worker $worker died. Left: ${_workers.length}&quot;); } /// Will shut down this [Site] and kill all /// open resources/[Isolate]s /// /// You should not use this Site ever again after /// calling this method. /// /// Also make sure to call this method after /// the [Site] is not needed anymore. void close() { this.streamController?.close(); this.streamController = null; this._workers.forEach((worker) =&gt; worker.close()); this._workers.clear(); } finalize() { this.close(); } } /// All preferences for a [Site] class SiteSetting { /// How many worker [Isolates] can be spawned at max? final int workersMax; /// How long is an [Isolate] allowed to idle, before it is killed? final Duration workerTimeout; /// Will allow a maximum of 2 background [Isolate]s while /// killing idle [Isolate]s after 30 seconds static const SiteSetting STANDARD = const SiteSetting(2, const Duration(seconds: 30)); /// Will allow a maximum of 16 background [Isolate]s while /// killing idle [Isolate]s after 5 minutes. /// /// This is only for heavy multitasking applications. /// Not quite sure if Dart is the right language here! static const SiteSetting HEAVY = const SiteSetting(16, const Duration(minutes: 5)); /// Will allow a maximum of 2 background [Isolate] while /// killing idle [Isolate]s after 1 second. static const SiteSetting LIGHT = const SiteSetting(2, const Duration(seconds: 1)); const SiteSetting(this.workersMax, this.workerTimeout); } /// Manages the connection to a dedicated [Isolate]. /// /// Manages its own [Isolate] and is able /// to work on [_Job] objects. class _Worker { /// The site this worker belongs to Site site; /// The workers own [Isolate] Isolate _isolate; /// Will be used for receiving messages /// from [_isolate] ReceivePort _receivePort; /// Will be used to send messages to /// [_isolate] /// /// This should be null-checked, since /// the port is received from the [_isolate] /// once it is running SendPort _sendPort; /// The current job, this Worker is working on, /// or null if the Worker is idle. _Job _currentJob; _Worker(this.site); /// Tells whether an [Isolate] is currently attached. /// Does NOT tell whether its IDLE or not! bool get running { return _isolate != null; } /// Will make this Worker start working on an available job /// if it is currently idle! void incite() { if (_currentJob == null &amp;&amp; site._jobs.isNotEmpty) { _currentJob = site._jobs.removeFirst(); print(&quot;Worker: start workiing on $_currentJob&quot;); _startWorking(); } } /// Send the [_Job] object [_currentJob] to the Isolate, /// which will start working on it. void _startWorking() { assert(_currentJob != null); if(_sendPort!=null){ print(&quot;Worker: delegating to isolate&quot;); _sendPort.send(_currentJob.function); print(&quot;Worker: waiting for isolate to finish&quot;); } } /// receives the result for the computation associated with /// [_currentJob] and will &quot;finish&quot; the associated future /// by assigning the result [x] to it. void _receive(dynamic x) { assert (_currentJob != null); _currentJob.result = x; _currentJob = null; incite(); } /// Starting the Worker will /// spawn the [_isolate] and retrieve the [_sendPort]. /// /// This will also lead in a call to [_startWorking] if /// a job is currently assigned. Future start() async { ReceivePort exitReceiver = new ReceivePort(); exitReceiver.first.then((x) { this.close(); site._reportDeathOf(this); }); _receivePort = new ReceivePort(); _WorkDay _workDay = new _WorkDay(site.settings, _receivePort.sendPort); _isolate = await Isolate.spawn(_entryPoint, _workDay, onExit: exitReceiver.sendPort); int counter = 0; _receivePort.listen((x) { if(counter == 0){ _sendPort = x; if(_currentJob!=null) _startWorking(); } else _receive(x); counter ++; }); } /// Will kill the [Isolate] and this Worker should /// never be used again! void close() { _isolate?.kill(); _isolate = null; _receivePort?.close(); _receivePort = null; _sendPort = null; _currentJob = null; } /// The entry point of [_isolate]. static void _entryPoint(_WorkDay workDay) { ReceivePort receivePort = new ReceivePort(); Stream receiveStream = receivePort.timeout(workDay.settings.workerTimeout, onTimeout: (EventSink sink) { print(&quot;Worker: timed out...&quot;); receivePort.close(); }); receiveStream.listen((BackgroundFunction backgroundFunction) { print(&quot;Worker: working&quot;); var result = backgroundFunction(); workDay.sendPort.send(result); print(&quot;Worker: idle&quot;); }); workDay.sendPort.send(receivePort.sendPort); } } /// The initial object sent to a [Isolate] by a [_Worker] class _WorkDay { final SiteSetting settings; final SendPort sendPort; _WorkDay(this.settings, this.sendPort); } class _Job { final Site _site; final BackgroundFunction function; bool finished = false; dynamic _result; set result(dynamic result) { this._result = result; this.finished = true; this._site.streamController.add(this); } dynamic get result { return _result; } _Job(this._site, this.function); } class BackgroundFunction { final Function function; final List positionalArguments; final Map namedArguments; BackgroundFunction(this.function, {this.positionalArguments: const[], this.namedArguments: const{}}); dynamic call() { return Function.apply(function, positionalArguments, namedArguments); } }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'dart:async'</span>; <span class="pl-k">import</span> <span class="pl-s">'dart:collection'</span>; <span class="pl-k">import</span> <span class="pl-s">'dart:isolate'</span>; <span class="pl-c">/// Easy and convenient to use, thread-pool-like implementation for delegating</span> <span class="pl-c">/// expensive tasks to a pool of isolates</span> <span class="pl-c">///</span> <span class="pl-c">/// Just pass the function and the desired params to <span class="pl-v">[commission]</span> and let</span> <span class="pl-c">/// the site handle everything for you by returning a really parallel computed <span class="pl-v">[Future]</span> object.</span> <span class="pl-c">/// If the <span class="pl-v">[Site]</span> currently holds a reference to an idle Isolate, then the requested computation</span> <span class="pl-c">/// wil be delegated to it immediately. Otherwise a new <span class="pl-v">[Isolate]</span> is spawned, if it would</span> <span class="pl-c">/// not exceed <span class="pl-v">[SiteSetting.workersMax]</span>. If this limit is exceeded has the task to wait</span> <span class="pl-c">/// until any <span class="pl-v">[Isolate]</span> finishes its work on any other task.</span> <span class="pl-c">///</span> <span class="pl-c">/// Idle <span class="pl-v">[Isolates]</span> will die after <span class="pl-v">[SiteSetting.workerTimeout]</span>.</span> <span class="pl-c"></span><span class="pl-k">class</span> <span class="pl-c1">Site</span> { <span class="pl-c">/// Controls the whole behaviour of this Site and all its Isolates</span> <span class="pl-c"> ///</span> <span class="pl-c"> /// The site will not spawn more Isolates than defined by <span class="pl-v">[SiteSetting.workersMax]</span></span> <span class="pl-c"> /// and an idling <span class="pl-v">[Isolate]</span> will die after <span class="pl-v">[SiteSetting.workerTimeout]</span></span> <span class="pl-c"></span> <span class="pl-k">final</span> <span class="pl-c1">SiteSetting</span> settings; <span class="pl-c">/// Holds a reference to all workers currently alive</span> <span class="pl-c"></span> <span class="pl-k">final</span> <span class="pl-c1">List</span>&lt;<span class="pl-c1">_Worker</span>&gt; _workers <span class="pl-k">=</span> []; <span class="pl-c">/// Holds a reference to all jobs waiting for delegation to any</span> <span class="pl-c"> /// <span class="pl-v">[Isolate]</span></span> <span class="pl-c"></span> <span class="pl-k">final</span> <span class="pl-c1">Queue</span>&lt;<span class="pl-c1">_Job</span>&gt; _jobs <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">Queue</span>(); <span class="pl-c">/// This controller is used to notify when a <span class="pl-v">[_Job]</span> was finished</span> <span class="pl-c"> /// ignore: close_sinks</span> <span class="pl-c"></span> <span class="pl-c1">StreamController</span> streamController <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">StreamController</span>.<span class="pl-en">broadcast</span>(); <span class="pl-c1">Site</span>(<span class="pl-c1">this</span>.settings); <span class="pl-c">/// This will execute the <span class="pl-v">[function]</span> inside another Isolate and conveniently</span> <span class="pl-c"> /// return a easy to handle <span class="pl-v">[Future]</span></span> <span class="pl-c"> ///</span> <span class="pl-c"> /// Be careful: Isolates are not sharing any memory with each other,</span> <span class="pl-c"> /// therefore try to pass immutable objects as arguments, because any</span> <span class="pl-c"> /// transformation by <span class="pl-v">[function]</span> won't be reflected in the calling isolate.</span> <span class="pl-c"> ///</span> <span class="pl-c"> /// Spawns a new Isolate if all current Isolates are busy and</span> <span class="pl-c"> /// <span class="pl-v">[SiteSetting.workersMax]</span> is not yet exceeded.</span> <span class="pl-c"> ///</span> <span class="pl-c"> /// Will wait for current working Isolates if <span class="pl-v">[SiteSettings.workersMax]</span> is indeed</span> <span class="pl-c"> /// exceeded and all other Isolates are busy.</span> <span class="pl-c"></span> <span class="pl-c1">Future</span>&lt;<span class="pl-c1">dynamic</span>&gt; <span class="pl-en">commission</span>(<span class="pl-c1">Function</span> function, {<span class="pl-c1">List</span> positionalArgs<span class="pl-k">:</span> <span class="pl-k">const</span> [], <span class="pl-c1">Map</span> namedArgs<span class="pl-k">:</span> <span class="pl-k">const</span>{}}) <span class="pl-k">async</span> { <span class="pl-c1">BackgroundFunction</span> backgroundFunction <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">BackgroundFunction</span>(function, positionalArguments<span class="pl-k">:</span> positionalArgs, namedArguments<span class="pl-k">:</span> namedArgs); <span class="pl-c1">_Job</span> job <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">_Job</span>(<span class="pl-c1">this</span>, backgroundFunction); _jobs.<span class="pl-en">add</span>(job); <span class="pl-en">patrol</span>(); <span class="pl-k">await</span> <span class="pl-k">for</span> (<span class="pl-c1">dynamic</span> finished <span class="pl-k">in</span> streamController.stream) { <span class="pl-k">if</span> (finished <span class="pl-k">==</span> job) { <span class="pl-k">return</span> job.result; } } } <span class="pl-c">/// Encourages idle <span class="pl-v">[Isolate]</span>s to take a <span class="pl-v">[_Job]</span> from</span> <span class="pl-c"> /// the Queue and will spawn new a new <span class="pl-v">[Isolate]</span> if necessary</span> <span class="pl-c"> ///</span> <span class="pl-c"> /// This method is automatically called.</span> <span class="pl-c"> /// I cannot easily image a reason why this should</span> <span class="pl-c"> /// be called manually!</span> <span class="pl-c"></span> <span class="pl-en">patrol</span>() { _workers.<span class="pl-en">forEach</span>((worker) <span class="pl-k">=&gt;</span> worker.<span class="pl-en">incite</span>()); <span class="pl-k">if</span> (_jobs.isNotEmpty) { <span class="pl-k">if</span> (_workers.length <span class="pl-k">&lt;</span> settings.workersMax) { <span class="pl-c1">this</span>._workers.<span class="pl-en">add</span>( <span class="pl-k">new</span> <span class="pl-c1">_Worker</span>(<span class="pl-c1">this</span>) ..<span class="pl-en">start</span>() ..<span class="pl-en">incite</span>()); <span class="pl-en">print</span>(<span class="pl-s">"Site: Spawning worker. Total <span class="pl-s">${<span class="pl-v">_workers</span>.<span class="pl-v">length</span>}</span>"</span>); } } } <span class="pl-k">void</span> <span class="pl-en">_reportDeathOf</span>(<span class="pl-c1">_Worker</span> worker) { <span class="pl-c1">this</span>._workers.<span class="pl-en">remove</span>(worker); <span class="pl-en">print</span>(<span class="pl-s">"Site: Worker $<span class="pl-v">worker</span> died. Left: <span class="pl-s">${<span class="pl-v">_workers</span>.<span class="pl-v">length</span>}</span>"</span>); } <span class="pl-c">/// Will shut down this <span class="pl-v">[Site]</span> and kill all</span> <span class="pl-c"> /// open resources/<span class="pl-v">[Isolate]</span>s</span> <span class="pl-c"> ///</span> <span class="pl-c"> /// You should not use this Site ever again after</span> <span class="pl-c"> /// calling this method.</span> <span class="pl-c"> ///</span> <span class="pl-c"> /// Also make sure to call this method after</span> <span class="pl-c"> /// the <span class="pl-v">[Site]</span> is not needed anymore.</span> <span class="pl-c"></span> <span class="pl-k">void</span> <span class="pl-en">close</span>() { <span class="pl-c1">this</span>.streamController<span class="pl-k">?</span>.<span class="pl-en">close</span>(); <span class="pl-c1">this</span>.streamController <span class="pl-k">=</span> <span class="pl-c1">null</span>; <span class="pl-c1">this</span>._workers.<span class="pl-en">forEach</span>((worker) <span class="pl-k">=&gt;</span> worker.<span class="pl-en">close</span>()); <span class="pl-c1">this</span>._workers.<span class="pl-en">clear</span>(); } <span class="pl-en">finalize</span>() { <span class="pl-c1">this</span>.<span class="pl-en">close</span>(); } } <span class="pl-c">/// All preferences for a <span class="pl-v">[Site]</span></span> <span class="pl-c"></span><span class="pl-k">class</span> <span class="pl-c1">SiteSetting</span> { <span class="pl-c">/// How many worker <span class="pl-v">[Isolates]</span> can be spawned at max?</span> <span class="pl-c"></span> <span class="pl-k">final</span> <span class="pl-c1">int</span> workersMax; <span class="pl-c">/// How long is an <span class="pl-v">[Isolate]</span> allowed to idle, before it is killed?</span> <span class="pl-c"></span> <span class="pl-k">final</span> <span class="pl-c1">Duration</span> workerTimeout; <span class="pl-c">/// Will allow a maximum of 2 background <span class="pl-v">[Isolate]</span>s while</span> <span class="pl-c"> /// killing idle <span class="pl-v">[Isolate]</span>s after 30 seconds</span> <span class="pl-c"></span> <span class="pl-k">static</span> <span class="pl-k">const</span> <span class="pl-c1">SiteSetting</span> <span class="pl-c1">STANDARD</span> <span class="pl-k">=</span> <span class="pl-k">const</span> <span class="pl-c1">SiteSetting</span>(<span class="pl-c1">2</span>, <span class="pl-k">const</span> <span class="pl-c1">Duration</span>(seconds<span class="pl-k">:</span> <span class="pl-c1">30</span>)); <span class="pl-c">/// Will allow a maximum of 16 background <span class="pl-v">[Isolate]</span>s while</span> <span class="pl-c"> /// killing idle <span class="pl-v">[Isolate]</span>s after 5 minutes.</span> <span class="pl-c"> ///</span> <span class="pl-c"> /// This is only for heavy multitasking applications.</span> <span class="pl-c"> /// Not quite sure if Dart is the right language here!</span> <span class="pl-c"></span> <span class="pl-k">static</span> <span class="pl-k">const</span> <span class="pl-c1">SiteSetting</span> <span class="pl-c1">HEAVY</span> <span class="pl-k">=</span> <span class="pl-k">const</span> <span class="pl-c1">SiteSetting</span>(<span class="pl-c1">16</span>, <span class="pl-k">const</span> <span class="pl-c1">Duration</span>(minutes<span class="pl-k">:</span> <span class="pl-c1">5</span>)); <span class="pl-c">/// Will allow a maximum of 2 background <span class="pl-v">[Isolate]</span> while</span> <span class="pl-c"> /// killing idle <span class="pl-v">[Isolate]</span>s after 1 second.</span> <span class="pl-c"></span> <span class="pl-k">static</span> <span class="pl-k">const</span> <span class="pl-c1">SiteSetting</span> <span class="pl-c1">LIGHT</span> <span class="pl-k">=</span> <span class="pl-k">const</span> <span class="pl-c1">SiteSetting</span>(<span class="pl-c1">2</span>, <span class="pl-k">const</span> <span class="pl-c1">Duration</span>(seconds<span class="pl-k">:</span> <span class="pl-c1">1</span>)); <span class="pl-k">const</span> <span class="pl-c1">SiteSetting</span>(<span class="pl-c1">this</span>.workersMax, <span class="pl-c1">this</span>.workerTimeout); } <span class="pl-c">/// Manages the connection to a dedicated <span class="pl-v">[Isolate]</span>.</span> <span class="pl-c">///</span> <span class="pl-c">/// Manages its own <span class="pl-v">[Isolate]</span> and is able</span> <span class="pl-c">/// to work on <span class="pl-v">[_Job]</span> objects.</span> <span class="pl-c"></span><span class="pl-k">class</span> <span class="pl-c1">_Worker</span> { <span class="pl-c">/// The site this worker belongs to</span> <span class="pl-c"></span> <span class="pl-c1">Site</span> site; <span class="pl-c">/// The workers own <span class="pl-v">[Isolate]</span></span> <span class="pl-c"></span> <span class="pl-c1">Isolate</span> _isolate; <span class="pl-c">/// Will be used for receiving messages</span> <span class="pl-c"> /// from <span class="pl-v">[_isolate]</span></span> <span class="pl-c"></span> <span class="pl-c1">ReceivePort</span> _receivePort; <span class="pl-c">/// Will be used to send messages to</span> <span class="pl-c"> /// <span class="pl-v">[_isolate]</span></span> <span class="pl-c"> ///</span> <span class="pl-c"> /// This should be null-checked, since</span> <span class="pl-c"> /// the port is received from the <span class="pl-v">[_isolate]</span></span> <span class="pl-c"> /// once it is running</span> <span class="pl-c"></span> <span class="pl-c1">SendPort</span> _sendPort; <span class="pl-c">/// The current job, this Worker is working on,</span> <span class="pl-c"> /// or null if the Worker is idle.</span> <span class="pl-c"></span> <span class="pl-c1">_Job</span> _currentJob; <span class="pl-c1">_Worker</span>(<span class="pl-c1">this</span>.site); <span class="pl-c">/// Tells whether an <span class="pl-v">[Isolate]</span> is currently attached.</span> <span class="pl-c"> /// Does NOT tell whether its IDLE or not!</span> <span class="pl-c"></span> <span class="pl-c1">bool</span> <span class="pl-k">get</span> running { <span class="pl-k">return</span> _isolate <span class="pl-k">!=</span> <span class="pl-c1">null</span>; } <span class="pl-c">/// Will make this Worker start working on an available job</span> <span class="pl-c"> /// if it is currently idle!</span> <span class="pl-c"></span> <span class="pl-k">void</span> <span class="pl-en">incite</span>() { <span class="pl-k">if</span> (_currentJob <span class="pl-k">==</span> <span class="pl-c1">null</span> <span class="pl-k">&amp;&amp;</span> site._jobs.isNotEmpty) { _currentJob <span class="pl-k">=</span> site._jobs.<span class="pl-en">removeFirst</span>(); <span class="pl-en">print</span>(<span class="pl-s">"Worker: start workiing on $<span class="pl-v">_currentJob</span>"</span>); <span class="pl-en">_startWorking</span>(); } } <span class="pl-c">/// Send the <span class="pl-v">[_Job]</span> object <span class="pl-v">[_currentJob]</span> to the Isolate,</span> <span class="pl-c"> /// which will start working on it.</span> <span class="pl-c"></span> <span class="pl-k">void</span> <span class="pl-en">_startWorking</span>() { <span class="pl-k">assert</span>(_currentJob <span class="pl-k">!=</span> <span class="pl-c1">null</span>); <span class="pl-k">if</span>(_sendPort<span class="pl-k">!=</span><span class="pl-c1">null</span>){ <span class="pl-en">print</span>(<span class="pl-s">"Worker: delegating to isolate"</span>); _sendPort.<span class="pl-en">send</span>(_currentJob.function); <span class="pl-en">print</span>(<span class="pl-s">"Worker: waiting for isolate to finish"</span>); } } <span class="pl-c">/// receives the result for the computation associated with</span> <span class="pl-c"> /// <span class="pl-v">[_currentJob]</span> and will "finish" the associated future</span> <span class="pl-c"> /// by assigning the result <span class="pl-v">[x]</span> to it.</span> <span class="pl-c"></span> <span class="pl-k">void</span> <span class="pl-en">_receive</span>(<span class="pl-c1">dynamic</span> x) { <span class="pl-k">assert</span> (_currentJob <span class="pl-k">!=</span> <span class="pl-c1">null</span>); _currentJob.result <span class="pl-k">=</span> x; _currentJob <span class="pl-k">=</span> <span class="pl-c1">null</span>; <span class="pl-en">incite</span>(); } <span class="pl-c">/// Starting the Worker will</span> <span class="pl-c"> /// spawn the <span class="pl-v">[_isolate]</span> and retrieve the <span class="pl-v">[_sendPort]</span>.</span> <span class="pl-c"> ///</span> <span class="pl-c"> /// This will also lead in a call to <span class="pl-v">[_startWorking]</span> if</span> <span class="pl-c"> /// a job is currently assigned.</span> <span class="pl-c"></span> <span class="pl-c1">Future</span> <span class="pl-en">start</span>() <span class="pl-k">async</span> { <span class="pl-c1">ReceivePort</span> exitReceiver <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">ReceivePort</span>(); exitReceiver.first.<span class="pl-en">then</span>((x) { <span class="pl-c1">this</span>.<span class="pl-en">close</span>(); site.<span class="pl-en">_reportDeathOf</span>(<span class="pl-c1">this</span>); }); _receivePort <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">ReceivePort</span>(); <span class="pl-c1">_WorkDay</span> _workDay <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">_WorkDay</span>(site.settings, _receivePort.sendPort); _isolate <span class="pl-k">=</span> <span class="pl-k">await</span> <span class="pl-c1">Isolate</span>.<span class="pl-en">spawn</span>(_entryPoint, _workDay, onExit<span class="pl-k">:</span> exitReceiver.sendPort); <span class="pl-c1">int</span> counter <span class="pl-k">=</span> <span class="pl-c1">0</span>; _receivePort.<span class="pl-en">listen</span>((x) { <span class="pl-k">if</span>(counter <span class="pl-k">==</span> <span class="pl-c1">0</span>){ _sendPort <span class="pl-k">=</span> x; <span class="pl-k">if</span>(_currentJob<span class="pl-k">!=</span><span class="pl-c1">null</span>) <span class="pl-en">_startWorking</span>(); } <span class="pl-k">else</span> <span class="pl-en">_receive</span>(x); counter <span class="pl-k">++</span>; }); } <span class="pl-c">/// Will kill the <span class="pl-v">[Isolate]</span> and this Worker should</span> <span class="pl-c"> /// never be used again!</span> <span class="pl-c"></span> <span class="pl-k">void</span> <span class="pl-en">close</span>() { _isolate<span class="pl-k">?</span>.<span class="pl-en">kill</span>(); _isolate <span class="pl-k">=</span> <span class="pl-c1">null</span>; _receivePort<span class="pl-k">?</span>.<span class="pl-en">close</span>(); _receivePort <span class="pl-k">=</span> <span class="pl-c1">null</span>; _sendPort <span class="pl-k">=</span> <span class="pl-c1">null</span>; _currentJob <span class="pl-k">=</span> <span class="pl-c1">null</span>; } <span class="pl-c">/// The entry point of <span class="pl-v">[_isolate]</span>.</span> <span class="pl-c"></span> <span class="pl-k">static</span> <span class="pl-k">void</span> <span class="pl-en">_entryPoint</span>(<span class="pl-c1">_WorkDay</span> workDay) { <span class="pl-c1">ReceivePort</span> receivePort <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">ReceivePort</span>(); <span class="pl-c1">Stream</span> receiveStream <span class="pl-k">=</span> receivePort.<span class="pl-en">timeout</span>(workDay.settings.workerTimeout, onTimeout<span class="pl-k">:</span> (<span class="pl-c1">EventSink</span> sink) { <span class="pl-en">print</span>(<span class="pl-s">"Worker: timed out..."</span>); receivePort.<span class="pl-en">close</span>(); }); receiveStream.<span class="pl-en">listen</span>((<span class="pl-c1">BackgroundFunction</span> backgroundFunction) { <span class="pl-en">print</span>(<span class="pl-s">"Worker: working"</span>); <span class="pl-k">var</span> result <span class="pl-k">=</span> <span class="pl-en">backgroundFunction</span>(); workDay.sendPort.<span class="pl-en">send</span>(result); <span class="pl-en">print</span>(<span class="pl-s">"Worker: idle"</span>); }); workDay.sendPort.<span class="pl-en">send</span>(receivePort.sendPort); } } <span class="pl-c">/// The initial object sent to a <span class="pl-v">[Isolate]</span> by a <span class="pl-v">[_Worker]</span></span> <span class="pl-c"></span><span class="pl-k">class</span> <span class="pl-c1">_WorkDay</span> { <span class="pl-k">final</span> <span class="pl-c1">SiteSetting</span> settings; <span class="pl-k">final</span> <span class="pl-c1">SendPort</span> sendPort; <span class="pl-c1">_WorkDay</span>(<span class="pl-c1">this</span>.settings, <span class="pl-c1">this</span>.sendPort); } <span class="pl-k">class</span> <span class="pl-c1">_Job</span> { <span class="pl-k">final</span> <span class="pl-c1">Site</span> _site; <span class="pl-k">final</span> <span class="pl-c1">BackgroundFunction</span> function; <span class="pl-c1">bool</span> finished <span class="pl-k">=</span> <span class="pl-c1">false</span>; <span class="pl-c1">dynamic</span> _result; <span class="pl-k">set</span> <span class="pl-en">result</span>(<span class="pl-c1">dynamic</span> result) { <span class="pl-c1">this</span>._result <span class="pl-k">=</span> result; <span class="pl-c1">this</span>.finished <span class="pl-k">=</span> <span class="pl-c1">true</span>; <span class="pl-c1">this</span>._site.streamController.<span class="pl-en">add</span>(<span class="pl-c1">this</span>); } <span class="pl-c1">dynamic</span> <span class="pl-k">get</span> result { <span class="pl-k">return</span> _result; } <span class="pl-c1">_Job</span>(<span class="pl-c1">this</span>._site, <span class="pl-c1">this</span>.function); } <span class="pl-k">class</span> <span class="pl-c1">BackgroundFunction</span> { <span class="pl-k">final</span> <span class="pl-c1">Function</span> function; <span class="pl-k">final</span> <span class="pl-c1">List</span> positionalArguments; <span class="pl-k">final</span> <span class="pl-c1">Map</span> namedArguments; <span class="pl-c1">BackgroundFunction</span>(<span class="pl-c1">this</span>.function, {<span class="pl-c1">this</span>.positionalArguments<span class="pl-k">:</span> <span class="pl-k">const</span>[], <span class="pl-c1">this</span>.namedArguments<span class="pl-k">:</span> <span class="pl-k">const</span>{}}); <span class="pl-c1">dynamic</span> <span class="pl-en">call</span>() { <span class="pl-k">return</span> <span class="pl-c1">Function</span>.<span class="pl-en">apply</span>(function, positionalArguments, namedArguments); } }</pre></div>
<p dir="auto">Customers would like to execute dart code as background processes on both iOS and Android, for things like syncing down data when wifi is available but the app is not open, etc.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mpcomplete/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mpcomplete">@mpcomplete</a> created a background process on Android to execute Dart code to update flutter. But I'm not aware of a parallel on iOS.</p> <p dir="auto">This issue tracks the development of APIs in plugins or otherwise. Engine support for these abstractions is tracked in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="180798789" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/6192" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/6192/hovercard" href="https://github.com/flutter/flutter/issues/6192">#6192</a>.</p>
1
<p dir="auto">Whenever i run: <code class="notranslate">deno test --fail-fast --coverage=x &amp;&amp; deno coverage x</code><br> then i get almost 100% code coverage.</p> <p dir="auto">the issue is with the last empty trailing line...</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cover file:///path/quality.js ... 98.148% (53/54) 54 | "><pre class="notranslate"><code class="notranslate">cover file:///path/quality.js ... 98.148% (53/54) 54 | </code></pre></div> <p dir="auto">This should be accounted for</p> <p dir="auto">deno 1.15.3 (release, x86_64-apple-darwin)<br> v8 9.5.172.19<br> typescript 4.4.2</p>
<p dir="auto">If I call the <code class="notranslate">WebSocketImpl::send</code> twice, synchronously, four message frames will be delivered:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ws.send(&quot;aaa&quot;); ws.send(&quot;bbb&quot;); // other party will receive aaa, bbb, aaa, bbb"><pre class="notranslate"><span class="pl-s1">ws</span><span class="pl-kos">.</span><span class="pl-en">send</span><span class="pl-kos">(</span><span class="pl-s">"aaa"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">ws</span><span class="pl-kos">.</span><span class="pl-en">send</span><span class="pl-kos">(</span><span class="pl-s">"bbb"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// other party will receive aaa, bbb, aaa, bbb</span></pre></div> <p dir="auto">Is this intentional? I know that <code class="notranslate">send</code> is async, but does this imply I have to await each send operation before sending more?</p>
0
<p dir="auto">Currently, the result of <code class="notranslate">deno lint</code>is output to <em>stderr</em> as follows</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" $ deno lint --unstable 1&gt;/dev/null (no-explicit-any) `any` type is not allowed let a: any = 1; ~~~ at /home/yusuktan/Repos/github.com/magurotuna/deno/tmp.ts:1:7 Found 1 problem"><pre class="notranslate"><code class="notranslate"> $ deno lint --unstable 1&gt;/dev/null (no-explicit-any) `any` type is not allowed let a: any = 1; ~~~ at /home/yusuktan/Repos/github.com/magurotuna/deno/tmp.ts:1:7 Found 1 problem </code></pre></div> <p dir="auto">ESLint, on the other hand, outputs a result to <em>stdout</em>. You can see</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ npx eslint tmp.ts 2&gt;/dev/null /home/yusuktan/Repos/github.com/magurotuna/deno/tmp.ts 1:5 error 'a' is assigned a value but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars 1:5 error 'a' is never reassigned. Use 'const' instead prefer-const 1:8 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any ✖ 3 problems (2 errors, 1 warning) 1 error and 0 warnings potentially fixable with the `--fix` option."><pre class="notranslate"><code class="notranslate">$ npx eslint tmp.ts 2&gt;/dev/null /home/yusuktan/Repos/github.com/magurotuna/deno/tmp.ts 1:5 error 'a' is assigned a value but never used. Allowed unused vars must match /^_/u @typescript-eslint/no-unused-vars 1:5 error 'a' is never reassigned. Use 'const' instead prefer-const 1:8 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any ✖ 3 problems (2 errors, 1 warning) 1 error and 0 warnings potentially fixable with the `--fix` option. </code></pre></div> <p dir="auto">I think ESLint's way is preferable and <code class="notranslate">deno lint</code> also should output its result to stdout.</p> <p dir="auto">Is there any specific reason outputting to stderr, which I haven't noticed?</p>
1
<p dir="auto">From julia-users, ref <a href="https://groups.google.com/d/msg/julia-users/IsRlOLGeEs8/RRwrs3u2AQAJ" rel="nofollow">https://groups.google.com/d/msg/julia-users/IsRlOLGeEs8/RRwrs3u2AQAJ</a></p> <p dir="auto">Shortened version:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; @which pi*pi *(x::Irrational, y::Irrational) at irrationals.jl:88 julia&gt; module Erratic2 typealias DummyUnion Union{Irrational,AbstractFloat} abstract DummyReal &lt;: Real import Base.* *(x::DummyUnion, y::DummyReal) = &quot;wow&quot; end Erratic2 julia&gt; pi*pi ------------------------------------------------------------------------------------------ ErrorException Stacktrace (most recent call last) [#1] — *(::Irrational{:π}, ::Irrational{:π}) ⌙ at promotion.jl:256 * not defined for Irrational{:π} julia&gt; @which pi*pi *{T&lt;:Number}(x::T, y::T) at promotion.jl:256"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">@which</span> <span class="pl-c1">pi</span><span class="pl-k">*</span><span class="pl-c1">pi</span> <span class="pl-k">*</span>(x<span class="pl-k">::</span><span class="pl-c1">Irrational</span>, y<span class="pl-k">::</span><span class="pl-c1">Irrational</span>) at irrationals<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">88</span> julia<span class="pl-k">&gt;</span> <span class="pl-k">module</span> Erratic2 typealias DummyUnion Union{Irrational,AbstractFloat} abstract DummyReal <span class="pl-k">&lt;:</span> <span class="pl-c1">Real</span> <span class="pl-k">import</span> Base<span class="pl-k">.*</span> <span class="pl-k">*</span>(x<span class="pl-k">::</span><span class="pl-c1">DummyUnion</span>, y<span class="pl-k">::</span><span class="pl-c1">DummyReal</span>) <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>wow<span class="pl-pds">"</span></span> <span class="pl-k">end</span> Erratic2 julia<span class="pl-k">&gt;</span> <span class="pl-c1">pi</span><span class="pl-k">*</span><span class="pl-c1">pi</span> <span class="pl-k">------------------------------------------------------------------------------------------</span> ErrorException Stacktrace (most recent call last) [<span class="pl-c"><span class="pl-c">#</span>1] — *(::Irrational{:π}, ::Irrational{:π})</span> ⌙ at promotion<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">256</span> <span class="pl-k">*</span> not defined <span class="pl-k">for</span> Irrational{<span class="pl-c1">:π</span>} julia<span class="pl-k">&gt;</span> <span class="pl-c1">@which</span> <span class="pl-c1">pi</span><span class="pl-k">*</span><span class="pl-c1">pi</span> <span class="pl-k">*</span>{T<span class="pl-k">&lt;:</span><span class="pl-c1">Number</span>}(x<span class="pl-k">::</span><span class="pl-c1">T</span>, y<span class="pl-k">::</span><span class="pl-c1">T</span>) at promotion<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">256</span></pre></div> <p dir="auto">This arises because of the following reordering of "old" methods (highlighting from <code class="notranslate">kdiff3</code>):<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1525481/18381927/426104a6-7644-11e6-902f-2f63e0f95785.png"><img src="https://cloud.githubusercontent.com/assets/1525481/18381927/426104a6-7644-11e6-902f-2f63e0f95785.png" alt="methmul" style="max-width: 100%;"></a></p> <p dir="auto">Note that the method at <code class="notranslate">promotion.jl:256</code> is now above the method at <code class="notranslate">irrationals.jl:88</code>.</p>
<p dir="auto">Hi all,</p> <p dir="auto">The following code seems to allocate a lot of memory:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function test!(arr::Array{(Int, Int)}) for i = 1:10_000_000 arr[1] = arr[2] end end a = [(1, 1), (2, 2)] test!(a)"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">test!</span>(arr<span class="pl-k">::</span><span class="pl-c1">Array{(Int, Int)}</span>) <span class="pl-k">for</span> i <span class="pl-k">=</span> <span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">10_000_000</span> arr[<span class="pl-c1">1</span>] <span class="pl-k">=</span> arr[<span class="pl-c1">2</span>] <span class="pl-k">end</span> <span class="pl-k">end</span> a <span class="pl-k">=</span> [(<span class="pl-c1">1</span>, <span class="pl-c1">1</span>), (<span class="pl-c1">2</span>, <span class="pl-c1">2</span>)] <span class="pl-c1">test!</span>(a)</pre></div> <p dir="auto">Here are the results of <code class="notranslate">@time test!(a)</code> (using HEAD on the master branch, commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/ce29d785098564b61af0c65113595b1af7ba0acb/hovercard" href="https://github.com/JuliaLang/julia/commit/ce29d785098564b61af0c65113595b1af7ba0acb"><tt>ce29d78</tt></a>) :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="elapsed time: 0.439144953 seconds (320013808 bytes allocated, 40.35% gc time)"><pre class="notranslate"><code class="notranslate">elapsed time: 0.439144953 seconds (320013808 bytes allocated, 40.35% gc time) </code></pre></div> <p dir="auto">On the other hand, using a composite type works as expected:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="immutable Pair{T1, T2} a::T1 b::T2 end function test!(arr::Array{Pair{Int, Int}}) for i = 1:10_000_000 arr[1] = arr[2] end end a = [Pair(1, 1), Pair(2, 2)] test!(a)"><pre class="notranslate"><code class="notranslate">immutable Pair{T1, T2} a::T1 b::T2 end function test!(arr::Array{Pair{Int, Int}}) for i = 1:10_000_000 arr[1] = arr[2] end end a = [Pair(1, 1), Pair(2, 2)] test!(a) </code></pre></div> <p dir="auto">Here <code class="notranslate">@time test!(a)</code> yields</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="elapsed time: 0.022649237 seconds (80 bytes allocated)"><pre class="notranslate"><code class="notranslate">elapsed time: 0.022649237 seconds (80 bytes allocated) </code></pre></div> <p dir="auto">Am I missing something obvious? It seems that each assignment triggers an allocation in the case of tuples (adding <code class="notranslate">@time</code> before the assignment suggests a 32 bytes allocation). Why is that? Is this documented somewhere?</p> <p dir="auto">(I ran into this problem when trying to use a heap to extract the top <code class="notranslate">n</code> elements from a list of tuples without sorting it first, as done in Python's <code class="notranslate">heapq.nlargest</code> method)</p>
0