text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<p dir="auto">It would be nice if <code class="notranslate">@CanActivate</code> decorator would resolve some additional bindings if provided. For instance if the check I want to do during this step depends on some service that I've created, then I could do something like:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@CanActivate((myService: MyService) => { /* here I could use `myService` that was injected */ }, {
providers: [
MyService
]
})"><pre class="notranslate">@<span class="pl-v">CanActivate</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">myService</span>: <span class="pl-v">MyService</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> <span class="pl-c">/* here I could use `myService` that was injected */</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">providers</span>: <span class="pl-kos">[</span>
<span class="pl-v">MyService</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">I am aware that there is a <code class="notranslate">ComponentInstruction</code> passed to the function, but that is not of much help if I want to use anything else beyond just that.</p> | <p dir="auto"><strong>I'm submitting a ...</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] feature request"><pre class="notranslate"><code class="notranslate">[x] feature request
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
<em>Main motivation:</em> print multiple object properties by using the async pipe with <strong>1</strong> network request</p>
<p dir="auto">For array observables <code class="notranslate">myObjects$: MyObject[]</code> you can use the async pipe in the following way:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<div *ngFor="let myObject of myObjects$ | async">
<div>{{myObject.property1}}</div>
<div>{{myObject.property2}}</div>
<div>{{myObject.property3}}</div>
</div>"><pre class="notranslate"><code class="notranslate"><div *ngFor="let myObject of myObjects$ | async">
<div>{{myObject.property1}}</div>
<div>{{myObject.property2}}</div>
<div>{{myObject.property3}}</div>
</div>
</code></pre></div>
<p dir="auto">The code above will end in <strong>1</strong> network request.</p>
<p dir="auto">For single object observables <code class="notranslate">myObjects$: MyObject</code> you can use the async pipe in the following way:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<div>
<div>{{(myObjects$ | async)?.property1}}</div>
<div>{{(myObjects$ | async)?.property2}}</div>
<div>{{(myObjects$ | async)?.property3}}</div>
</div>"><pre class="notranslate"><code class="notranslate"><div>
<div>{{(myObjects$ | async)?.property1}}</div>
<div>{{(myObjects$ | async)?.property2}}</div>
<div>{{(myObjects$ | async)?.property3}}</div>
</div>
</code></pre></div>
<p dir="auto">The code above will end in <strong>3</strong> network requests :(</p>
<p dir="auto">For sure you could cache the observable <code class="notranslate">.publishReplay(1).refCount()</code> (only <strong>1</strong> network request) but all together it looks odd.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Add support for a local template variable e.g.:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<div *ngIf="let myObject = myObjects$ | async">
<div>{{myObject.property1}}</div>
<div>{{myObject.property2}}</div>
<div>{{myObject.property3}}</div>
</div>"><pre class="notranslate"><code class="notranslate"><div *ngIf="let myObject = myObjects$ | async">
<div>{{myObject.property1}}</div>
<div>{{myObject.property2}}</div>
<div>{{myObject.property3}}</div>
</div>
</code></pre></div>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Beautiful code for printing multiple object properties by using the async pipe with <strong>1</strong> network request.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
Linux</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.2</li>
<li><strong>Browser:</strong> All</li>
<li><strong>Language:</strong> TypeScript 2.0.3</li>
<li><strong>Node (for AoT issues):</strong> 6.7.0</li>
</ul> | 0 |
<p dir="auto">In a really long line of text, after the 235th character, Ruby language formatting is lost, and shows up as the last mark, such as a closing quote makes the rest of the text appear as green, or grey. This still happen with the text being word-wrapped.</p> | <p dir="auto">I opened a Python file with the following line (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="20976125" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/963" data-hovercard-type="pull_request" data-hovercard-url="/atom/atom/pull/963/hovercard" href="https://github.com/atom/atom/pull/963">#963</a>):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" PrintAndLog(u"SSID: " + RememberedNetwork["SSIDString"].decode("utf-8") + u" - BSSID: " + RememberedNetwork["CachedScanRecord"]["BSSID"] + u" - RSSI: " + str(RememberedNetwork["CachedScanRecord"]["RSSI"]) + u" - Last connected: " + str(RememberedNetwork["LastConnected"]) + u" - Security type: " + RememberedNetwork["SecurityType"] + u" - Geolocation: " + Geolocation, "INFO")"><pre class="notranslate"> <span class="pl-v">PrintAndLog</span>(<span class="pl-s">u"SSID: "</span> <span class="pl-c1">+</span> <span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"SSIDString"</span>].<span class="pl-en">decode</span>(<span class="pl-s">"utf-8"</span>) <span class="pl-c1">+</span> <span class="pl-s">u" - BSSID: "</span> <span class="pl-c1">+</span> <span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"CachedScanRecord"</span>][<span class="pl-s">"BSSID"</span>] <span class="pl-c1">+</span> <span class="pl-s">u" - RSSI: "</span> <span class="pl-c1">+</span> <span class="pl-en">str</span>(<span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"CachedScanRecord"</span>][<span class="pl-s">"RSSI"</span>]) <span class="pl-c1">+</span> <span class="pl-s">u" - Last connected: "</span> <span class="pl-c1">+</span> <span class="pl-en">str</span>(<span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"LastConnected"</span>]) <span class="pl-c1">+</span> <span class="pl-s">u" - Security type: "</span> <span class="pl-c1">+</span> <span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"SecurityType"</span>] <span class="pl-c1">+</span> <span class="pl-s">u" - Geolocation: "</span> <span class="pl-c1">+</span> <span class="pl-v">Geolocation</span>, <span class="pl-s">"INFO"</span>)</pre></div>
<p dir="auto">Which led to the following bug:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/e06069206d526a16adf21e84cd179f1185d3fb5e0f05fea4d4b4a08a978092f4/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f34343737342f323331333737382f37366262346262612d613330642d313165332d396136342d3831663666393163323563342e706e67"><img src="https://camo.githubusercontent.com/e06069206d526a16adf21e84cd179f1185d3fb5e0f05fea4d4b4a08a978092f4/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f34343737342f323331333737382f37366262346262612d613330642d313165332d396136342d3831663666393163323563342e706e67" alt="screen shot 2014-03-03 at 2 52 40 pm" data-canonical-src="https://f.cloud.github.com/assets/44774/2313778/76bb4bba-a30d-11e3-9a64-81f6f91c25c4.png" style="max-width: 100%;"></a></p>
<p dir="auto">You can find this as the main file in <a href="https://github.com/jipegit/OSXAuditor/blob/master/osxauditor.py"><code class="notranslate">osxauditor.py</code></a>.</p> | 1 |
<p dir="auto">When using InstancedMesh for repeating objects and then exporting it through ColladaExporter, only the base mesh appears in exported model, no instances.</p> | <h5 dir="auto">Description of the problem</h5>
<p dir="auto">Since the new animation system I can't make my key animations stop at their last frame. Most of the Three.js examples have animations with a infinite loop and so the bug is not visible. My animations are made to run once, but they get resetted to the first frame after the one loop. Even when I use <em>.time = 1;</em> command, they still reset to the first frame.</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=""> r75</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r74</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r73</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>
</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>
</ul> | 0 |
<p dir="auto">I tried to set up kubernetes locally via Docker according to <a href="http://kubernetes.io/docs/getting-started-guides/docker/" rel="nofollow">http://kubernetes.io/docs/getting-started-guides/docker/</a></p>
<p dir="auto">I ran into the following problems:</p>
<ol dir="auto">
<li>kubedns was not running (only 2 of the three containers in the DNS pod were coming up)</li>
<li>Dashboard was not running</li>
</ol>
<h2 dir="auto">kubedns problem</h2>
<p dir="auto">The kubedns container in the kubedns pod wrote the following logs</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...
I0719 08:24:17.689766 1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:17.690289 1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:18.370902 1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:18.692780 1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:18.693100 1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:19.369996 1 dns.go:439] Received DNS Request:kubernetes.default.svc.cluster.local., exact:false
I0719 08:24:19.370082 1 dns.go:539] records:[], retval:[], path:[local cluster svc default kubernetes]
I0719 08:24:19.370647 1 dns.go:439] Received DNS Request:kubernetes.default.svc.cluster.local., exact:false
I0719 08:24:19.370703 1 dns.go:539] records:[], retval:[], path:[local cluster svc default kubernetes]
E0719 08:24:19.469504 1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:19.876888 1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:19.876947 1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:20.569325 1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:21.170742 1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:21.171316 1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
F0719 08:24:21.473908 1 server.go:127] Received signal: terminated"><pre class="notranslate"><code class="notranslate">...
I0719 08:24:17.689766 1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:17.690289 1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:18.370902 1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:18.692780 1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:18.693100 1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:19.369996 1 dns.go:439] Received DNS Request:kubernetes.default.svc.cluster.local., exact:false
I0719 08:24:19.370082 1 dns.go:539] records:[], retval:[], path:[local cluster svc default kubernetes]
I0719 08:24:19.370647 1 dns.go:439] Received DNS Request:kubernetes.default.svc.cluster.local., exact:false
I0719 08:24:19.370703 1 dns.go:539] records:[], retval:[], path:[local cluster svc default kubernetes]
E0719 08:24:19.469504 1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:19.876888 1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:19.876947 1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:20.569325 1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:21.170742 1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:21.171316 1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
F0719 08:24:21.473908 1 server.go:127] Received signal: terminated
</code></pre></div>
<p dir="auto">and it was repeatedly restarted (health check also did not work!)</p>
<h2 dir="auto">Dashboard problem</h2>
<p dir="auto">The dashboard was restarted over and over again with the following log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Starting HTTP server on port 9090
Creating API server client for http://localhost:8080
Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service accounts configuration) or the --apiserver-host param points to a server that does not exist. Reason: Get http://localhost:8080/version: dial tcp [::1]:8080: getsockopt: connection refused"><pre class="notranslate"><code class="notranslate">Starting HTTP server on port 9090
Creating API server client for http://localhost:8080
Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service accounts configuration) or the --apiserver-host param points to a server that does not exist. Reason: Get http://localhost:8080/version: dial tcp [::1]:8080: getsockopt: connection refused
</code></pre></div>
<h2 dir="auto">Work around</h2>
<p dir="auto">Just drop the two lines</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--cluster-dns=10.0.0.10 \
--cluster-domain=cluster.local \"><pre class="notranslate"><code class="notranslate">--cluster-dns=10.0.0.10 \
--cluster-domain=cluster.local \
</code></pre></div>
<p dir="auto">from the k8s Docker container start. Then everything starts up nicely!</p>
<h2 dir="auto">Working start up script</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#!/bin/bash
set -eu
: ${ARCH:="amd64"}
: ${K8S_VERSION:="v1.3.2"}
exec docker run -d \
--volume=/:/rootfs:ro \
--volume=/sys:/sys:rw \
--volume=/var/lib/docker/:/var/lib/docker:rw \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/var/run:/var/run:rw \
--net=host \
--pid=host \
--privileged \
gcr.io/google_containers/hyperkube-${ARCH}:${K8S_VERSION} \
/hyperkube kubelet \
--containerized \
--hostname-override=127.0.0.1 \
--api-servers=http://localhost:8080 \
--config=/etc/kubernetes/manifests \
--allow-privileged --v=2"><pre class="notranslate"><code class="notranslate">#!/bin/bash
set -eu
: ${ARCH:="amd64"}
: ${K8S_VERSION:="v1.3.2"}
exec docker run -d \
--volume=/:/rootfs:ro \
--volume=/sys:/sys:rw \
--volume=/var/lib/docker/:/var/lib/docker:rw \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/var/run:/var/run:rw \
--net=host \
--pid=host \
--privileged \
gcr.io/google_containers/hyperkube-${ARCH}:${K8S_VERSION} \
/hyperkube kubelet \
--containerized \
--hostname-override=127.0.0.1 \
--api-servers=http://localhost:8080 \
--config=/etc/kubernetes/manifests \
--allow-privileged --v=2
</code></pre></div> | <p dir="auto"><a href="http://kubekins.dls.corp.google.com:8081/job/kubernetes-pull-build-test-e2e-gce/28687/" rel="nofollow">http://kubekins.dls.corp.google.com:8081/job/kubernetes-pull-build-test-e2e-gce/28687/</a></p>
<p dir="auto">In the e2e test, the last three tests failed:</p>
<ul dir="auto">
<li>Kubernetes e2e suite.Downward API volume should update labels on modification [Conformance]</li>
<li>Kubernetes e2e suite.Services should be able to change the type and ports of a service</li>
<li>Kubernetes e2e suite.Networking should provide Internet connection for containers [Conformance]</li>
</ul>
<p dir="auto">All these tests failed because at the end of the e2e test, the node <code class="notranslate">e2e-gce-builder-2-2-minion-fz40</code> became not ready.<br>
From <a href="https://00e9e64bac678b6b851b94ed815af525b4b7dcc3692f0d0478-apidata.googleusercontent.com/download/storage/v1_internal/b/kubernetes-jenkins/o/pr-logs%2Fpull%2F21120%2Fkubernetes-pull-build-test-e2e-gce%2F28687%2Fartifacts%2F146.148.87.92:22-kubelet.log?qk=AD5uMEsyAJ1ZzX_lYtrc_hkS6bQpxh-aM4X3tnQhta23cO-84jM76gPaeKE-vbfXUQYbb9PzX_WchlvCPC_l4_6WZooIlknttyt4_d-ulto9OjTfg9hw3jsMhkSoOsNBs-qQ85bVkH5O9YvXntPiaIVWQxZh8Q-6Hx7uQEMCkVRdZE5XmO35yPXYF52E6o0UgHTejIMCxnDHCoYQ_gr7PDJ7dbuaI6lLIlFvP9vD5Wmofbz34jGXS-W5z6J2DgnewO5zvRxaK4tQb3soiEGrqLlDZazco6ABuXDl4nWxTw2FDv1QxQ4pkYZtS5yGr7QqaC4SC1GgxZj08Aw7F9njT8kDM4FmkXySHlPpsjgkIOL9nfYJ2sn5Bpb_1MuY1IQTYGqrNnhPTi8OUb6mPYVHW6ka2GI5XTku8od9Zj1zi6t_quF1re716CQQ7YQE_dQgS0bYo4qw4cybjoA5qaxU_rR22Oj9aESGaS9Ek2bfMrMnD-CVtMCy02R--2otRmMWKtQbbr9QTuE2EPTwbMjQuRX2zRV1Cgr7fspvBmsfzGtxnuIY54a0JV3y_QJvCIW5wX-wVL_2bpBG1rD26gf4sS4k9jNjg-lVuXu6hAha4xXro9pXKFxFUEm7C-MoUMG7zCTEXsKZIE-qGLhsCaE6EwbcaVoWqQjc-wgJrrloU2Q-mthQ3SsOjxOy5aO-kOeU_2fTcc4JiBCUvaBelmEtATOZmQBncNO6CdbZtyF7zUpZ7Qxsjv6OmHzg7pE4IqMex2UEznzKOiIfMBSmFKpfrGZUqdGfIaSq3qAj9oSg6-CHbpqQ-UPLm2Zy8TnykdHJ14Yf31MqbNTO3RQyE7pFbba7sgDLu7BdsQty5zDUUmSl12Dqx9da2lQ9mrbJ10EVTJlO9t5InvzwtvGHnqOoF_rEBans2TtopZ2MScRzOiaVbEzR8t8XWavEPFYzZt53DJAR7DQVmG8P" rel="nofollow">kubelet.log</a>, we can see that kubelet can't detect docker daemon suddenly:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0216 01:08:25.357402 3938 kubelet.go:2617] Container runtime sanity check failed: docker: failed to get docker version: Get http://unix.sock/version: dial unix /var/run/docker.sock: no such file or directory"><pre class="notranslate"><code class="notranslate">E0216 01:08:25.357402 3938 kubelet.go:2617] Container runtime sanity check failed: docker: failed to get docker version: Get http://unix.sock/version: dial unix /var/run/docker.sock: no such file or directory
</code></pre></div>
<p dir="auto">Here is <a href="https://00e9e64baca938b4a3ca1c6398e73fb4b04c0790cd0ff2b701-apidata.googleusercontent.com/download/storage/v1_internal/b/kubernetes-jenkins/o/pr-logs%2Fpull%2F21120%2Fkubernetes-pull-build-test-e2e-gce%2F28687%2Fartifacts%2F146.148.87.92:22-supervisord.log?qk=AD5uMEumtu2kd2_vY3MJLG212-xF_ztoChgKcBDBY36DBGY_yCh7ezvgfbnkh-CCMqrFE4zb7U6QR7rbjbYkyX2mvFs55Ni_8Yi8KiFFWvQ65VNXRzrun8AmzYsue26E6U-Q62N3BmWFsHYGLeaocgpsTPnldl_VieisK438GCIYtUAb6P9gBfu-3lyLwgiTyBsunnki4xz3c2Culn5XudY7IiizyipvDr_vZxj5IDzXdnK2gRU4oqaaQ3GOUXOWCRhaFfSX1EOyggM5caDKufQtBqKdoc_rz_rBX37c6PQAU9IeTk41p9y72CWYpq-GltRPoqG8xPdRdi1CtRG3J7W22nZkvz4KYPKqzHXV2Dhmch6l-PNt0Kp54sv88I_mkem68T-FoDk7oZknBlQEJfCAwWgvV3IzeX2FDClBtueHrZTnOudLc_GK1XaMcq3tIrQlNTAdTGl8IbGjlVrVMDoA0HRHZANW_oCWtzK-sW3e4tSmoV9qYDK9I4dY6Wr022_qoMd-jBZ6QR7_MY92vtfm1F_83yQB8zRAZR-aIc6Re0DfUQuP0i-FQr0QFEJUg1ipZx8FnxlzVOVeRyP6QKDEWjRd0v4QkrBVZOTX5aQtiBSPy5CG33lhPDpN4uZdvdbjiAkcK2wOcXyziV4iXcqvlHoYHDSjjjBib4Zi1flAYDf7vsYGUQq4raJ1DcefYRq_wHBR5vHHT-pMVne7HT8y9wfrH8phpOqmoDrljcocqWjPI9Hz78CLgPCtnDggllncVgDFXshI-iVmy4h5E6HrBb6hSYnyNVGT3UQ_g-amxn2nHcqlzUQGyvTtwnOLr6GMeNnphzcNvQmKIoUvZhN9K8W3wq-3tGabNLeQmCvXsuqOklkhIB9fgbSdnKAwxmPSfquPX6n6K2K7WR2tjteVS2w1KDA_NFkPBP-W_EwrUBxA5JeGoQy6vvRzKqRmOZ1wcWsGJmOLfFlB_BKh_0PP0qcw3s2Q_Q" rel="nofollow">supervisord log</a>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2016-02-16 01:00:38,864 CRIT Supervisor running as root (no user in config file)
2016-02-16 01:00:38,930 INFO RPC interface 'supervisor' initialized
2016-02-16 01:00:38,931 WARN cElementTree not installed, using slower XML parser for XML-RPC
2016-02-16 01:00:38,931 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-02-16 01:00:38,932 INFO daemonizing the supervisord process
2016-02-16 01:00:38,932 INFO supervisord started with pid 2340
2016-02-16 01:02:16,760 WARN received SIGTERM indicating exit request
2016-02-16 01:02:21,811 CRIT Supervisor running as root (no user in config file)
2016-02-16 01:02:21,811 WARN Included extra file "/etc/supervisor/conf.d/kubelet.conf" during parsing
2016-02-16 01:02:21,811 WARN Included extra file "/etc/supervisor/conf.d/docker.conf" during parsing
2016-02-16 01:02:21,831 INFO RPC interface 'supervisor' initialized
2016-02-16 01:02:21,831 WARN cElementTree not installed, using slower XML parser for XML-RPC
2016-02-16 01:02:21,831 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-02-16 01:02:21,832 INFO daemonizing the supervisord process
2016-02-16 01:02:21,833 INFO supervisord started with pid 3855
2016-02-16 01:02:22,835 INFO spawned: 'kubelet' with pid 3869
2016-02-16 01:02:22,837 INFO spawned: 'docker' with pid 3870
2016-02-16 01:02:23,894 INFO success: kubelet entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:02:23,894 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:08:16,756 INFO exited: docker (exit status 2; expected)
2016-02-16 01:08:17,758 INFO spawned: 'docker' with pid 21508
2016-02-16 01:08:18,783 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:09:17,820 INFO exited: docker (exit status 2; expected)
2016-02-16 01:09:18,822 INFO spawned: 'docker' with pid 21697
2016-02-16 01:09:19,847 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:10:38,852 INFO exited: docker (exit status 2; expected)
2016-02-16 01:10:39,854 INFO spawned: 'docker' with pid 21953
2016-02-16 01:10:40,884 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:11:59,885 INFO exited: docker (exit status 2; expected)
2016-02-16 01:12:00,887 INFO spawned: 'docker' with pid 22152
2016-02-16 01:12:01,916 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:12:54,256 INFO exited: kubelet (exit status 2; expected)
2016-02-16 01:12:55,258 INFO spawned: 'kubelet' with pid 22277
2016-02-16 01:12:56,301 INFO success: kubelet entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:13:20,921 INFO exited: docker (exit status 2; expected)
2016-02-16 01:13:21,923 INFO spawned: 'docker' with pid 22344
2016-02-16 01:13:22,951 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:13:55,308 INFO exited: kubelet (exit status 2; expected)
2016-02-16 01:13:56,310 INFO spawned: 'kubelet' with pid 22399
2016-02-16 01:13:57,355 INFO success: kubelet entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)"><pre class="notranslate"><code class="notranslate">2016-02-16 01:00:38,864 CRIT Supervisor running as root (no user in config file)
2016-02-16 01:00:38,930 INFO RPC interface 'supervisor' initialized
2016-02-16 01:00:38,931 WARN cElementTree not installed, using slower XML parser for XML-RPC
2016-02-16 01:00:38,931 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-02-16 01:00:38,932 INFO daemonizing the supervisord process
2016-02-16 01:00:38,932 INFO supervisord started with pid 2340
2016-02-16 01:02:16,760 WARN received SIGTERM indicating exit request
2016-02-16 01:02:21,811 CRIT Supervisor running as root (no user in config file)
2016-02-16 01:02:21,811 WARN Included extra file "/etc/supervisor/conf.d/kubelet.conf" during parsing
2016-02-16 01:02:21,811 WARN Included extra file "/etc/supervisor/conf.d/docker.conf" during parsing
2016-02-16 01:02:21,831 INFO RPC interface 'supervisor' initialized
2016-02-16 01:02:21,831 WARN cElementTree not installed, using slower XML parser for XML-RPC
2016-02-16 01:02:21,831 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-02-16 01:02:21,832 INFO daemonizing the supervisord process
2016-02-16 01:02:21,833 INFO supervisord started with pid 3855
2016-02-16 01:02:22,835 INFO spawned: 'kubelet' with pid 3869
2016-02-16 01:02:22,837 INFO spawned: 'docker' with pid 3870
2016-02-16 01:02:23,894 INFO success: kubelet entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:02:23,894 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:08:16,756 INFO exited: docker (exit status 2; expected)
2016-02-16 01:08:17,758 INFO spawned: 'docker' with pid 21508
2016-02-16 01:08:18,783 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:09:17,820 INFO exited: docker (exit status 2; expected)
2016-02-16 01:09:18,822 INFO spawned: 'docker' with pid 21697
2016-02-16 01:09:19,847 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:10:38,852 INFO exited: docker (exit status 2; expected)
2016-02-16 01:10:39,854 INFO spawned: 'docker' with pid 21953
2016-02-16 01:10:40,884 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:11:59,885 INFO exited: docker (exit status 2; expected)
2016-02-16 01:12:00,887 INFO spawned: 'docker' with pid 22152
2016-02-16 01:12:01,916 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:12:54,256 INFO exited: kubelet (exit status 2; expected)
2016-02-16 01:12:55,258 INFO spawned: 'kubelet' with pid 22277
2016-02-16 01:12:56,301 INFO success: kubelet entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:13:20,921 INFO exited: docker (exit status 2; expected)
2016-02-16 01:13:21,923 INFO spawned: 'docker' with pid 22344
2016-02-16 01:13:22,951 INFO success: docker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-02-16 01:13:55,308 INFO exited: kubelet (exit status 2; expected)
2016-02-16 01:13:56,310 INFO spawned: 'kubelet' with pid 22399
2016-02-16 01:13:57,355 INFO success: kubelet entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
</code></pre></div>
<p dir="auto">@kubernetes/sig-node</p> | 0 |
<p dir="auto">I'm experiencing this in client website, but i found it also in <a href="http://getbootstrap.com/components/" rel="nofollow">http://getbootstrap.com/components/</a> (see screenshot);<br>
maybe it's necessary to update the font ..</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3374610/3128899/5a46e710-e7db-11e3-8f48-34858c96a7ed.png"><img src="https://cloud.githubusercontent.com/assets/3374610/3128899/5a46e710-e7db-11e3-8f48-34858c96a7ed.png" alt="screen shot 2014-05-30 at 11 18 00" style="max-width: 100%;"></a></p> | <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/19b13eba672111a20f342e50e01824c08f7786cbd72ef49ac397c92bffd540f1/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f35353033372f313031383339362f32306138636136632d306332382d313165332d393139632d3635396565623135636638332e706e67"><img src="https://camo.githubusercontent.com/19b13eba672111a20f342e50e01824c08f7786cbd72ef49ac397c92bffd540f1/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f35353033372f313031383339362f32306138636136632d306332382d313165332d393139632d3635396565623135636638332e706e67" alt="screenshot 2013-08-24 3 09 43" data-canonical-src="https://f.cloud.github.com/assets/55037/1018396/20a8ca6c-0c28-11e3-919c-659eeb15cf83.png" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/2c24f566f4427d3bd92485050b47210e584c68794f6ae3dc40cf7c1db178017d/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f35353033372f313031383339382f32313133653834632d306332382d313165332d393036622d3730313566643235306333652e706e67"><img src="https://camo.githubusercontent.com/2c24f566f4427d3bd92485050b47210e584c68794f6ae3dc40cf7c1db178017d/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f35353033372f313031383339382f32313133653834632d306332382d313165332d393036622d3730313566643235306333652e706e67" alt="screenshot 2013-08-24 3 07 41" data-canonical-src="https://f.cloud.github.com/assets/55037/1018398/2113e84c-0c28-11e3-906b-7015fd250c3e.png" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">by <strong><a href="mailto:[email protected]">[email protected]</a></strong>:</p>
<pre class="notranslate">Exploiting #221 in a different way:
Fresh install of:
Last version of Golang
cb140bac9ab0 release.2009-11-12/release
Tested on Ubuntu 9.04 and Ubuntu 9.10
XXXX@XXXX:~/go_src/src$ uname -a
Linux XXXX 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
i686 GNU/Linux
Attached Valgrind report and GDB report.
Binary: 8a
go_src/src/lib9/main.c
Breakpoint 1, main (argc=0x2, argv=0xbfdd72d4) at
/home/dsdsds/go_src/src/lib9/main.c:35
35 p9main(argc, argv);
gdb> list
30 extern void p9main(int, char**);
31
32 int
33 main(int argc, char **argv)
34 {
35 p9main(argc, argv);
#######################################
HERE
36 exits("main");
37 return 99;
HERE
#######################################
38 }
Run it
r `python -c 'print "\x41"*99 + "\x42"'`
Just.. 99 + 1
Thanks guys!</pre>
<p dir="auto">Attachments:</p>
<ol dir="auto">
<li><a href="https://storage.googleapis.com/go-attachment/392/0/debuginfo1.tar.gz" rel="nofollow">debuginfo1.tar.gz</a> (2029 bytes)</li>
</ol> | <pre class="notranslate">Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull", "hg update default", rebuild, and
retry
what you did to
reproduce the problem. Thanks.
What steps will reproduce the problem?
Attempt to use the http.Client using the default Transport when
hitting a server who's TLS cert hostname does not match the DNS name.
What is the expected output?
The transport will fail with an error.
What do you see instead?
Optionally allow such a connection to succeed.
(disable the check in http/transport.go:365)
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
Linux
Which revision are you using? (hg identify)
99ea0887e633+ tip
Please provide any additional information below.
Suggest adding an field in either http.Transport or tls.Config like DisableHostnameCheck.</pre> | 0 |
<h2 dir="auto">Since I can not re-open other's issue, I am opening this issue to address a potential type check issue that is causing a lot unexpected behavior on other issues.</h2>
<p dir="auto">After viewing the source code and confused by <code class="notranslate">handleStateChange</code> rename to <code class="notranslate">onParentShouldUpdate</code>; <code class="notranslate">onCheck</code> rename to <code class="notranslate">handleCheck</code> then rename to <code class="notranslate">onSwitch</code> and massive unifying code on the EnhancedSwitch,<br>
I think my recent project found the root of this issues. ( I really think the source code need to refactor a bit to read it easier.<br>
<code class="notranslate">//sorry for the complaining but it is really confusing and hard to keep track of the function name</code></p>
<h2 dir="auto">Root of the problem</h2>
<h3 dir="auto">Applying on <code class="notranslate">onCheck()</code> usually cause an <code class="notranslate">setState()</code> on the <code class="notranslate">owner Element</code></h3>
<p dir="auto">This will also trigger a <code class="notranslate">render()</code> lifecycle event on the <code class="notranslate">owner Element</code><br>
In React when Owner <code class="notranslate">render()</code> it triggers the <code class="notranslate">componentWillReceiveProps()</code> on its child, in our case the <code class="notranslate"><Checkbox /></code><br>
In the <code class="notranslate">componentWillReceiveProps</code></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="componentWillReceiveProps(nextProps) {
this.setState({
switched: this.props.checked !== nextProps.checked ?
nextProps.checked :
this.state.switched,
});
}"><pre class="notranslate"><span class="pl-en">componentWillReceiveProps</span><span class="pl-kos">(</span><span class="pl-s1">nextProps</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-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">switched</span>: <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">checked</span> <span class="pl-c1">!==</span> <span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">checked</span> ?
<span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">checked</span> :
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">switched</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>
<h3 dir="auto">Normally if <code class="notranslate">onCheck()</code> and <code class="notranslate">checked</code> are provided the update looks like this</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="input.onChange(event) => EnhancedSwitch.handleChange(event) =>
EnhancedSwitch.onSwitch(event, isInputChecked) === Checkbox.handleCheck(e, v) === Checkbox.onCheck(e, v) =>
Owner.onCheck(v) => Owner.setState() => Owner.render() =>
Checkbox.componentWillReceiveProps() => Checkbox.setState({switched:nextProps.checked}); =>
Checkbox.render() => EnhancedSwitch.componentWillReceiveProps() =>
EnhancedSwitch.setState(switched: nextProps.checked) => input.value = isInputChecked"><pre class="notranslate"><span class="pl-s1">input</span><span class="pl-kos">.</span><span class="pl-en">onChange</span><span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span> <span class="pl-v">EnhancedSwitch</span><span class="pl-kos">.</span><span class="pl-en">handleChange</span><span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span>
<span class="pl-v">EnhancedSwitch</span><span class="pl-kos">.</span><span class="pl-en">onSwitch</span><span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">,</span> <span class="pl-s1">isInputChecked</span><span class="pl-kos">)</span> <span class="pl-c1">===</span> <span class="pl-v">Checkbox</span><span class="pl-kos">.</span><span class="pl-en">handleCheck</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">,</span> <span class="pl-s1">v</span><span class="pl-kos">)</span> <span class="pl-c1">===</span> <span class="pl-v">Checkbox</span><span class="pl-kos">.</span><span class="pl-en">onCheck</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">,</span> <span class="pl-s1">v</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span>
<span class="pl-v">Owner</span><span class="pl-kos">.</span><span class="pl-en">onCheck</span><span class="pl-kos">(</span><span class="pl-s1">v</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span> <span class="pl-v">Owner</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span> <span class="pl-v">Owner</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span>
<span class="pl-v">Checkbox</span><span class="pl-kos">.</span><span class="pl-en">componentWillReceiveProps</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span> <span class="pl-v">Checkbox</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">switched</span>:<span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">checked</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c1">=></span>
<span class="pl-v">Checkbox</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span> <span class="pl-v">EnhancedSwitch</span><span class="pl-kos">.</span><span class="pl-en">componentWillReceiveProps</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span>
<span class="pl-v">EnhancedSwitch</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-s1">switched</span>: <span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">checked</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span> <span class="pl-s1">input</span><span class="pl-kos">.</span><span class="pl-c1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">isInputChecked</span></pre></div>
<h3 dir="auto">But If <code class="notranslate">onCheck()</code> is provided but no <code class="notranslate">check</code> or <code class="notranslate">value</code> provided Checkbox lifecycle event becomes</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="componentWillReceiveProps(nextProps) {
this.setState({
switched: this.props.checked !== nextProps.checked ? // undefined !== undefined => always false
nextProps.checked :
this.state.switched,
});
}
=> this.setState({switched: this.state.switched}); "><pre class="notranslate"><span class="pl-en">componentWillReceiveProps</span><span class="pl-kos">(</span><span class="pl-s1">nextProps</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-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">switched</span>: <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">checked</span> <span class="pl-c1">!==</span> <span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">checked</span> ? <span class="pl-c">// undefined !== undefined => always false</span>
<span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">checked</span> :
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">switched</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">=></span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">switched</span>: <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">switched</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </pre></div>
<p dir="auto">this is a duplicate setState that we did not anticipate. Since we do not provide a <code class="notranslate">check</code> props to the Checkbox, the Checkbox should be the state container for EnhancedSwitch and handle its own state, but <code class="notranslate">Owner.render()</code> is called in the same call stack <code class="notranslate">this.setState()</code> inside <code class="notranslate">Checkbox.handleStateChange</code>.</p>
<blockquote>
<p dir="auto">So the actual render we get is the<br>
<code class="notranslate">this.setState()</code> inside <code class="notranslate">Checkbox.handleStateChange</code><br>
and<br>
<code class="notranslate">this.setState()</code> inside <code class="notranslate">Checkbox.componentWillReceiveProps</code><br>
batched together.</p>
</blockquote>
<p dir="auto">A fix should not be a <code class="notranslate">setTimeout( () => this.setState()</code> on the <code class="notranslate">Owner</code>. <code class="notranslate">Checkbox</code> nor <code class="notranslate">EnhancedSwitch</code></p>
<h3 dir="auto">It should be a simple type check inside the componentWillReceiveProps</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="componentWillReceiveProps(nextProps) {
if(nextProps.checked !== undefined) {
this.setState({
switched: this.props.checked !== nextProps.checked ? nextProps.checked : this.state.switched
});
}"><pre class="notranslate"><span class="pl-en">componentWillReceiveProps</span><span class="pl-kos">(</span><span class="pl-s1">nextProps</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-kos">{</span>
<span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">checked</span> <span class="pl-c1">!==</span> <span class="pl-c1">undefined</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-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">switched</span>: <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">checked</span> <span class="pl-c1">!==</span> <span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">checked</span> ? <span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">checked</span> : <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">switched</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">setTimeout simply change the order of the render and setState;</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Checkbox.handleStateChange(event, true);
//normal setState
Checkbox setState({switch:true}) Finished
Owner setState() Finished
Owner rendering
Checkbox componentWillReceiveProps
Checkbox state: false => Checkbox setState({switch:false});
//React auto batched two setState() then render
Checkbox rendering
EnhancedSwitch rendering
//setTimeout setState
Checkbox setState() Finished
Owner setTimeout setState() Finished //push setState() to event loop out of the current call stack
Checkbox rendering() //on rendering the Checkbox state updated
EnhancedSwitch rendering() //this prioritized Checkbox setState() => render() to run next
Owner rendering() //current stack is empty, next call in event loop is Owner
Checkbox componentWillReceiveProps
Checkbox state: true => Checkbox setState({switch:true});
Checkbox rendering()
EnhancedSwitch render()"><pre class="notranslate"><span class="pl-v">Checkbox</span><span class="pl-kos">.</span><span class="pl-en">handleStateChange</span><span class="pl-kos">(</span><span class="pl-s1">event</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-c">//normal setState</span>
<span class="pl-v">Checkbox</span> <span class="pl-s1">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">switch</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-v">Finished</span>
<span class="pl-v">Owner</span> <span class="pl-s1">setState</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-v">Finished</span>
<span class="pl-v">Owner</span><span class="pl-kos"></span> <span class="pl-s1">rendering</span>
<span class="pl-v">Checkbox</span><span class="pl-kos"></span> <span class="pl-s1">componentWillReceiveProps</span>
<span class="pl-v">Checkbox</span> <span class="pl-s1">state</span>: <span class="pl-c1">false</span> <span class="pl-c1">=></span> <span class="pl-v">Checkbox</span> <span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">switch</span>:<span class="pl-c1">false</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">//React auto batched two setState() then render</span>
<span class="pl-v">Checkbox</span><span class="pl-kos"></span> <span class="pl-s1">rendering</span>
<span class="pl-v">EnhancedSwitch</span><span class="pl-kos"></span> <span class="pl-s1">rendering</span>
<span class="pl-c">//setTimeout setState</span>
<span class="pl-v">Checkbox</span> <span class="pl-s1">setState</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-v">Finished</span>
<span class="pl-v">Owner</span> <span class="pl-s1">setTimeout</span> <span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-v">Finished</span> <span class="pl-c">//push setState() to event loop out of the current call stack </span>
<span class="pl-v">Checkbox</span> <span class="pl-s1">rendering</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c">//on rendering the Checkbox state updated</span>
<span class="pl-v">EnhancedSwitch</span> <span class="pl-s1">rendering</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c">//this prioritized Checkbox setState() => render() to run next</span>
<span class="pl-v">Owner</span> <span class="pl-s1">rendering</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c">//current stack is empty, next call in event loop is Owner</span>
<span class="pl-v">Checkbox</span><span class="pl-kos"></span> <span class="pl-s1">componentWillReceiveProps</span>
<span class="pl-v">Checkbox</span> <span class="pl-s1">state</span>: <span class="pl-c1">true</span> <span class="pl-c1">=></span> <span class="pl-v">Checkbox</span> <span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">switch</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-v">Checkbox</span> <span class="pl-s1">rendering</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-v">EnhancedSwitch</span> <span class="pl-s1">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span></pre></div>
<h4 dir="auto">If you want to learn more about the eventloop and setTimeout hack</h4>
<p dir="auto"><a href="https://www.youtube.com/watch?v=8aGhZQkoFbQ" rel="nofollow">Philip Roberts: What the heck is the event loop anyway? | JSConf EU 2014</a><br>
This is a really good video explaining what is happening.</p>
<h2 dir="auto">one note on controlled component</h2>
<p dir="auto">Only if you set the value of the input, it should be considered as a controlled component. For example, if I ever want to use google analytic to true my input actual usage I should only need to track it with <code class="notranslate">onCheck</code> rather than turn it into a controlled component.</p>
<h3 dir="auto">And allowing <code class="notranslate">onCheck</code> without making it a controlled component makes it skips tons of parent update.</h3>
<p dir="auto">In my case I render 30 check box as a feature list and I don't want my Owner component to render every time a checkbox change but only match the state to the selected. This allows me to skip Array.map many times and I notices this reduce the visual response time at least by 300ms.<br>
This library needs a lot performance and lifecycle hook refactoring. And this should be a good start.</p>
<h2 dir="auto">I am pretty new to how to open a PR or anything, but I will try it when I have time.</h2>
<p dir="auto">If you read this comment and understand the reason I think it should be a bugfix without changing anything else.<br>
Or we could discuss the state of <code class="notranslate">switch</code> and how to remove the <code class="notranslate">setState</code> in <code class="notranslate">WillReceiveProps</code>, this is a typical <a href="https://facebook.github.io/react/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.html" rel="nofollow">A implies B does not imply B implies A</a> design issue.<br>
We should enforce a single source of truth, either as a state at top level component then the child will only use props as the source or as the actual value in the DOM input which need to connect with the correct lifecycle event to map to a state.</p>
<p dir="auto">Related and could correctly closed issue:<br>
<a href="https://github.com/puranjayjain/youtube-dl-gui/issues/24" data-hovercard-type="issue" data-hovercard-url="/puranjayjain/youtube-dl-gui/issues/24/hovercard">Checkboxes and toggles issue</a><br>
<a href="https://github.com/mbrookes/formsy-material-ui/issues/55" data-hovercard-type="issue" data-hovercard-url="/formsy/formsy-material-ui/issues/55/hovercard">Checkbox not updating</a><br>
<a href="https://github.com/callemall/material-ui/issues/2983" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/2983/hovercard">[Checkbox] setting the state in onCheck doesn't display the checked box </a></p>
<p dir="auto">Related PR:<br>
<a href="https://github.com/callemall/material-ui/pull/4443" data-hovercard-type="pull_request" data-hovercard-url="/mui/material-ui/pull/4443/hovercard">[Toggle][Checkbox] setting the state in onCheck doesn't display the checked box</a><br>
<a href="https://github.com/callemall/material-ui/pull/4440" data-hovercard-type="pull_request" data-hovercard-url="/mui/material-ui/pull/4440/hovercard">fix [Toggle][Checkbox] setting the state in onCheck doesn't display the checked box</a></p> | <p dir="auto">Setting the state in the callback of <code class="notranslate">onCheck</code> event cancels the [V] mark on the selected box.<br>
Without setting the state, the checkbox works as expected.</p>
<p dir="auto">Working fine</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<Checkbox
label="price"
onCheck={this._handleCBPrice.bind(this)} />
_handleCBPrice(event, checked){}"><pre class="notranslate"><code class="notranslate"><Checkbox
label="price"
onCheck={this._handleCBPrice.bind(this)} />
_handleCBPrice(event, checked){}
</code></pre></div>
<p dir="auto">Doesn't mark the box with a [V]</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<Checkbox
label="price"
onCheck={this._handleCBPrice.bind(this)} />
_handleCBPrice(event, checked){
this.setState({someKey:someValue})
}"><pre class="notranslate"><code class="notranslate"><Checkbox
label="price"
onCheck={this._handleCBPrice.bind(this)} />
_handleCBPrice(event, checked){
this.setState({someKey:someValue})
}
</code></pre></div> | 1 |
<p dir="auto">This happened after I introduced retry() to one of my tasks.</p>
<p dir="auto">Full trace:</p>
<p dir="auto">[2011-05-03 13:12:04,922: WARNING/MainProcess] File "/srv/geri/repository/geri/manage.py", line 11, in <br>
[2011-05-03 13:12:04,923: WARNING/MainProcess] execute_manager(settings)<br>
[2011-05-03 13:12:04,924: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/django/core/management/<strong>init</strong>.py", line 438, in execute_manager<br>
[2011-05-03 13:12:04,924: WARNING/MainProcess] utility.execute()<br>
[2011-05-03 13:12:04,924: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/django/core/management/<strong>init</strong>.py", line 379, in execute<br>
[2011-05-03 13:12:04,924: WARNING/MainProcess] self.fetch_command(subcommand).run_from_argv(self.argv)<br>
[2011-05-03 13:12:04,924: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv<br>
[2011-05-03 13:12:04,925: WARNING/MainProcess] self.execute(_args, *_options.<strong>dict</strong>)<br>
[2011-05-03 13:12:04,925: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/django/core/management/base.py", line 220, in execute<br>
[2011-05-03 13:12:04,925: WARNING/MainProcess] output = self.handle(_args, *_options)<br>
[2011-05-03 13:12:04,926: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/djcelery/management/commands/celeryd.py", line 21, in handle<br>
[2011-05-03 13:12:04,926: WARNING/MainProcess] worker.run(_args, *_options)<br>
[2011-05-03 13:12:04,926: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/celery/bin/celeryd.py", line 95, in run<br>
[2011-05-03 13:12:04,926: WARNING/MainProcess] return self.app.Worker(**kwargs).run()<br>
[2011-05-03 13:12:04,927: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/celery/apps/worker.py", line 135, in run<br>
[2011-05-03 13:12:04,927: WARNING/MainProcess] self.run_worker()<br>
[2011-05-03 13:12:04,927: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/celery/apps/worker.py", line 235, in run_worker<br>
[2011-05-03 13:12:04,928: WARNING/MainProcess] worker.start()<br>
[2011-05-03 13:12:04,928: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/celery/worker/<strong>init</strong>.py", line 247, in start<br>
[2011-05-03 13:12:04,928: WARNING/MainProcess] blocking(component.start)<br>
[2011-05-03 13:12:04,932: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/kombu/syn.py", line 14, in blocking<br>
[2011-05-03 13:12:04,940: WARNING/MainProcess] return *<em>sync_current(fun, _args, <em>_kwargs)<br>
[2011-05-03 13:12:04,941: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/kombu/syn.py", line 30, in __blocking</em></em><br>
[2011-05-03 13:12:04,941: WARNING/MainProcess] return fun(_args, *_kwargs)<br>
[2011-05-03 13:12:04,941: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/celery/worker/consumer.py", line 264, in start<br>
[2011-05-03 13:12:04,942: WARNING/MainProcess] self.consume_messages()<br>
[2011-05-03 13:12:04,942: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/celery/worker/consumer.py", line 281, in consume_messages<br>
[2011-05-03 13:12:04,942: WARNING/MainProcess] self.connection.drain_events()<br>
[2011-05-03 13:12:04,943: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/kombu/connection.py", line 139, in drain_events<br>
[2011-05-03 13:12:04,943: WARNING/MainProcess] return self.transport.drain_events(self.connection, **kwargs)<br>
[2011-05-03 13:12:04,943: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/kombu/transport/pyamqplib.py", line 223, in drain_events<br>
[2011-05-03 13:12:04,943: WARNING/MainProcess] return connection.drain_events(**kwargs)<br>
[2011-05-03 13:12:04,944: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/kombu/transport/pyamqplib.py", line 56, in drain_events<br>
[2011-05-03 13:12:04,944: WARNING/MainProcess] return self.wait_multi(self.channels.values(), timeout=timeout)<br>
[2011-05-03 13:12:04,944: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/kombu/transport/pyamqplib.py", line 83, in wait_multi<br>
[2011-05-03 13:12:04,945: WARNING/MainProcess] return amqp_method(channel, args, content)<br>
[2011-05-03 13:12:04,945: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/amqplib/client_0_8/channel.py", line 1973, in _basic_deliver<br>
[2011-05-03 13:12:04,946: WARNING/MainProcess] func(msg)<br>
[2011-05-03 13:12:04,946: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/kombu/messaging.py", line 408, in _receive_callback<br>
[2011-05-03 13:12:04,946: WARNING/MainProcess] self.receive(decoded, message)<br>
[2011-05-03 13:12:04,964: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/kombu/messaging.py", line 375, in receive<br>
[2011-05-03 13:12:04,966: WARNING/MainProcess] callback(body, message)<br>
[2011-05-03 13:12:04,966: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/celery/worker/consumer.py", line 353, in receive_message<br>
[2011-05-03 13:12:04,966: WARNING/MainProcess] eventer=self.event_dispatcher)<br>
[2011-05-03 13:12:04,967: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/celery/worker/job.py", line 294, in from_message<br>
[2011-05-03 13:12:04,967: WARNING/MainProcess] eta=maybe_iso8601(body.get("eta")),<br>
[2011-05-03 13:12:04,967: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/celery/utils/timeutils.py", line 133, in maybe_iso8601<br>
[2011-05-03 13:12:04,967: WARNING/MainProcess] return parse_iso8601(dt)<br>
[2011-05-03 13:12:04,968: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/dateutil/parser.py", line 698, in parse<br>
[2011-05-03 13:12:04,968: WARNING/MainProcess] return DEFAULTPARSER.parse(timestr, *_kwargs)<br>
[2011-05-03 13:12:04,969: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/dateutil/parser.py", line 302, in parse<br>
[2011-05-03 13:12:04,969: WARNING/MainProcess] res = self._parse(timestr, *_kwargs)<br>
[2011-05-03 13:12:04,969: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/dateutil/parser.py", line 350, in _parse<br>
[2011-05-03 13:12:04,970: WARNING/MainProcess] l = _timelex.split(timestr)<br>
[2011-05-03 13:12:04,970: WARNING/MainProcess] File "/srv/geri/env/lib/python2.6/site-packages/dateutil/parser.py", line 144, in split<br>
[2011-05-03 13:12:04,971: WARNING/MainProcess] return list(cls(s))<br>
[2011-05-03 13:12:04,971: WARNING/MainProcess] TypeError<br>
[2011-05-03 13:12:04,971: WARNING/MainProcess] :<br>
[2011-05-03 13:12:04,971: WARNING/MainProcess] iter() returned non-iterator of type '_timelex'<br>
[2011-05-03 13:12:04,972: INFO/MainProcess] process shutting down</p> | <p dir="auto">This happens probably because task logger by default is initialized with name 'celery.task.default' and worker logger with name 'celery'. Thus task logger becomes the child of the worker logger.<br>
Python logging system by default propagates messages from child logger to parent.<br>
To change this behavior <code class="notranslate">propagate</code> property of <code class="notranslate">Logger</code> object should be set to <code class="notranslate">False</code> or may be it would be better to attach handler only to the worker's logger.</p> | 0 |
<h3 dir="auto">Version Info</h3>
<p dir="auto">electron: 4.0.0<br>
OS: Windows 10 x64 10.0.17134.472</p>
<h3 dir="auto">Expected Behavior</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require('crypto').createCipheriv('rc4', 'asdasd', null)
require('crypto').createCipheriv('rc4', 'asdasd', '')"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'crypto'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">createCipheriv</span><span class="pl-kos">(</span><span class="pl-s">'rc4'</span><span class="pl-kos">,</span> <span class="pl-s">'asdasd'</span><span class="pl-kos">,</span> <span class="pl-c1">null</span><span class="pl-kos">)</span>
<span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'crypto'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">createCipheriv</span><span class="pl-kos">(</span><span class="pl-s">'rc4'</span><span class="pl-kos">,</span> <span class="pl-s">'asdasd'</span><span class="pl-kos">,</span> <span class="pl-s">''</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">work well as node v10.15.0</p>
<h3 dir="auto">Actual behavior</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require('crypto').createCipheriv('rc4', 'asdasd', null)"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'crypto'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">createCipheriv</span><span class="pl-kos">(</span><span class="pl-s">'rc4'</span><span class="pl-kos">,</span> <span class="pl-s">'asdasd'</span><span class="pl-kos">,</span> <span class="pl-c1">null</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">cause renderer process crash</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require('crypto').createCipheriv('rc4', 'asdasd', '')"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'crypto'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">createCipheriv</span><span class="pl-kos">(</span><span class="pl-s">'rc4'</span><span class="pl-kos">,</span> <span class="pl-s">'asdasd'</span><span class="pl-kos">,</span> <span class="pl-s">''</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">throw</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Invalid IV length
at Cipheriv.createCipherBase (internal/crypto/cipher.js:79)
at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:119)
at new Cipheriv (internal/crypto/cipher.js:225)
at Object.createCipheriv (crypto.js:105)
at <anonymous>:1:19
createCipherBase @ internal/crypto/cipher.js:79
createCipherWithIV @ internal/crypto/cipher.js:119
Cipheriv @ internal/crypto/cipher.js:225
createCipheriv @ crypto.js:105"><pre class="notranslate"><code class="notranslate">Invalid IV length
at Cipheriv.createCipherBase (internal/crypto/cipher.js:79)
at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:119)
at new Cipheriv (internal/crypto/cipher.js:225)
at Object.createCipheriv (crypto.js:105)
at <anonymous>:1:19
createCipherBase @ internal/crypto/cipher.js:79
createCipherWithIV @ internal/crypto/cipher.js:119
Cipheriv @ internal/crypto/cipher.js:225
createCipheriv @ crypto.js:105
</code></pre></div>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">exec code above in devTools</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> 9.0.5</li>
<li><strong>Operating System:</strong> Windows 10</li>
<li><strong>Last Known Working Electron version:</strong> I didn't work with electron for a long time, but last time I played with it the app had similar runtime reloading stuff going on and I don't remember it ever causing issues. That was Electron 1.6.2</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Reloading window with any of (renderer process) <code class="notranslate">location.reload()</code>, or (main process) <code class="notranslate">window.reload()</code>, <code class="notranslate">window.webContents.reload()</code>, <code class="notranslate">window.webContents.reloadIgnoringCache()</code>, should reload the process and work just as initial load of the same file.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Whenever I try reloading window (no matter the method, as described above), my app initialization process hangs as soon as it touches <code class="notranslate">fs.readdir()</code> call, despite it working just fine on initial load. No errors or any indication or clue anywhere as to what might be happening.</p>
<p dir="auto">Here is the snippet from the isolated example below:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const FS = require('fs');
const {promisify} = require('util');
const readdir = promisify(FS.readdir);
async function load() {
console.log('load(): start');
try {
await readdir('.'); // <= it hangs here on reload
document.body.innerHTML = 'success! press F5 to reload';
} catch (error) {
document.body.innerHTML = `<pre>${error.message || error.stack}</pre>`;
}
console.log('load(): end');
}
load().then(console.log, console.error);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-c1">FS</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'fs'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span>promisify<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">'util'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">readdir</span> <span class="pl-c1">=</span> <span class="pl-en">promisify</span><span class="pl-kos">(</span><span class="pl-c1">FS</span><span class="pl-kos">.</span><span class="pl-c1">readdir</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-en">load</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-s">'load(): start'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">readdir</span><span class="pl-kos">(</span><span class="pl-s">'.'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// <= it hangs here on reload</span>
<span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-kos">.</span><span class="pl-c1">innerHTML</span> <span class="pl-c1">=</span> <span class="pl-s">'success! press F5 to reload'</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">catch</span> <span class="pl-kos">(</span><span class="pl-s1">error</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-kos">.</span><span class="pl-c1">innerHTML</span> <span class="pl-c1">=</span> <span class="pl-s">`<pre><span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">error</span><span class="pl-kos">.</span><span class="pl-c1">message</span> <span class="pl-c1">||</span> <span class="pl-s1">error</span><span class="pl-kos">.</span><span class="pl-c1">stack</span><span class="pl-kos">}</span></span></pre>`</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-s">'load(): end'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">load</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-c1">log</span><span class="pl-kos">,</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-c1">error</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">To Reproduce</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="git clone https://gist.github.com/aa794ac2dc3662fee5d800da420a4813.git reloadbug
cd reloadbug
npm install
npm start"><pre class="notranslate">git clone https://gist.github.com/aa794ac2dc3662fee5d800da420a4813.git reloadbug
<span class="pl-c1">cd</span> reloadbug
npm install
npm start</pre></div>
<p dir="auto">Hit F5 until it happens. On my app it happens almost 100% of the time. In the reproduction example around 50% of the time.</p>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/538801/85945881-e6d53780-b940-11ea-83c9-92e81aa80efd.gif"><img src="https://user-images.githubusercontent.com/538801/85945881-e6d53780-b940-11ea-83c9-92e81aa80efd.gif" alt="test" data-animated-image="" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">Developers often use code samples in their module readmes, so it would be really nice to have <code class="notranslate">deno fmt</code> format the code inside markdown code blocks. This would lead to more consistent styles in presentation as well. :)</p> | <p dir="auto">At the moment Deno only formats JS and TS, but dprint can also format markdown including JS and TS code blocks:</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="652540826" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/6682" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/6682/hovercard" href="https://github.com/denoland/deno/pull/6682#issue-445589767">#6682 (comment)</a></p>
<p dir="auto">This would be an awesome feature for documentation, is it possible to enable it? Then we can get rid of Prettier.</p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=wang%20sheng" rel="nofollow">wang sheng</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2854?redirect=false" rel="nofollow">SPR-2854</a></strong> and commented</p>
<p dir="auto">when use HibernateTransactionManager manage hibernate transaction<br>
if begin a transaction fail it would not throw a IllegalStateException</p>
<p dir="auto">org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin failed:<br>
Caused by:<br>
org.hibernate.TransactionException: JDBC begin failed:<br>
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:68)<br>
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1290)<br>
at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:494)<br>
at org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:354)<br>
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:296)<br>
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:257)<br>
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:102)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)<br>
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)<br>
at $Proxy325.synchronizationTsDBPublish(Unknown Source)<br>
at com.gemship.vop.service.impl.VoyagePlanServiceImpl.updateVoyagePlan(VoyagePlanServiceImpl.java:195)<br>
at com.gemship.vop.service.impl.VoyagePlanServiceImpl.saveOrUpdateVoyagePlan(VoyagePlanServiceImpl.java:316)<br>
at com.gemship.vop.service.impl.VoyagePlanServiceImpl.saveOrUpdateVoyagePlans2(VoyagePlanServiceImpl.java:349)<br>
at com.gemship.vop.service.impl.VoyagePlanServiceImpl.doPublish(VoyagePlanServiceImpl.java:911)<br>
at com.gemship.vop.service.impl.VoyagePlanServiceImpl.doPublish(VoyagePlanServiceImpl.java:877)<br>
at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:615)<br>
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:203)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)<br>
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)<br>
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)<br>
at $Proxy329.doPublish(Unknown Source)<br>
at sun.reflect.GeneratedMethodAccessor288.invoke(Unknown Source)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:615)<br>
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:203)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)<br>
at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:70)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)<br>
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)<br>
at $Proxy582.doPublish(Unknown Source)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:615)<br>
at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:181)<br>
at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38)<br>
at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:76)<br>
at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:112)<br>
at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:117)<br>
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:47)<br>
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)<br>
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)<br>
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)<br>
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<br>
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)<br>
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)<br>
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)<br>
at com.gfa4j.web.SessionFilter.doFilter(Unknown Source)<br>
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)<br>
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)<br>
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)<br>
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696)<br>
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641)<br>
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)<br>
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)<br>
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)<br>
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)<br>
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)<br>
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)<br>
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)<br>
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)<br>
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)<br>
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)<br>
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)<br>
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)<br>
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)<br>
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)<br>
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)<br>
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)<br>
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)<br>
Caused by:<br>
java.sql.SQLException: Io exception: There is no process to read data written to a pipe.<br>
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)<br>
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)<br>
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)<br>
at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3678)<br>
at oracle.jdbc.ttc7.TTC7Protocol.setAutoCommit(TTC7Protocol.java:562)<br>
at oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:1288)<br>
at com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:755)<br>
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)<br>
... 76 more<br>
[11/21/06 14:39:15:782 GMT+08:00] 00000038 SystemOut O 14:39:15,769 WARN RemoteInvocationTraceInterceptor:80 - Processing of HttpInvokerServiceExporter remote call resulted in fatal exception: com.gemship.vop.service.VoyagePlanService.doPublish<br>
java.lang.IllegalStateException: Cannot deactivate transaction synchronization - not active<br>
at java.lang.Throwable.<init>(Throwable.java:57)<br>
at java.lang.Throwable.<init>(Throwable.java:68)<br>
at org.springframework.transaction.support.TransactionSynchronizationManager.clearSynchronization(TransactionSynchronizationManager.java:268)<br>
at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:788)<br>
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:663)<br>
at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:608)<br>
at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:328)<br>
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:111)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)<br>
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)<br>
at $Proxy329.doPublish(Unknown Source)<br>
at sun.reflect.GeneratedMethodAccessor288.invoke(Unknown Source)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:615)<br>
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:203)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)<br>
at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:70)<br>
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)<br>
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)<br>
at $Proxy582.doPublish(Unknown Source)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:615)<br>
at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:181)<br>
at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38)<br>
at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:76)<br>
at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:112)<br>
at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:117)<br>
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:47)<br>
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)<br>
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)<br>
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)<br>
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<br>
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)<br>
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)<br>
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)<br>
at com.gfa4j.web.SessionFilter.doFilter(Unknown Source)<br>
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)<br>
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)<br>
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)<br>
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696)<br>
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641)<br>
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)<br>
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)<br>
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)<br>
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)<br>
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)<br>
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)<br>
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)<br>
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)<br>
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)<br>
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)<br>
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)<br>
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)<br>
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)<br>
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)<br>
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)<br>
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)<br>
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0 final</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398068506" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7003" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7003/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7003">#7003</a> Transaction synchronization error with PROPAGATION_REQUIRES_NEW and error obtaining new connection (<em><strong>"duplicates"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=bozho" rel="nofollow">Bozhidar Bozhanov</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9036?redirect=false" rel="nofollow">SPR-9036</a></strong> and commented</p>
<p dir="auto">org.springframework.cache.interceptor.DefaultKeyGenerator is implemented by calculating the hashcode of all arguments. This is problematic in many cases:</p>
<ul dir="auto">
<li>methods with similar signature - foo(int, String), foo(int, List) - if the 2nd argument is null they will get mixed</li>
<li>methods with the same signature in different classes, using the same cache - they will get mixed</li>
<li>is there a collision resolution mechanism? If not, things will randomly fail. Rarely, but they will. Imagine that the arguments of two distinct methods (that use the same cache region) evaluate to the same hashcode (not unlikely) - they will override each other's values, and possibly a ClassCastException will occur on retrieval</li>
</ul>
<p dir="auto">What is in the first place the reason to get the hashcodes? The underlying cache mechanism is a hashtable of some sort, so it will calculate the hash of the key anyway. But it will have a collision-resolution strategy, unlike the KeyGenerator.</p>
<p dir="auto">I suggest:</p>
<ul dir="auto">
<li>concatenating the string representations of primitives, and the hashcode of non-primitives.</li>
<li>adding the class name and method name to the key</li>
<li>optionally, where non-primitive values are used as keys, log a warning - this is usually wrong, as the hashcode will change even though the values inside the object are the same</li>
</ul>
<hr>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/20806/TestDefaultKeyGenerator.java" rel="nofollow">TestDefaultKeyGenerator.java</a> (<em>2.01 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398156862" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14870" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14870/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14870">#14870</a> Cacheable key collision with DefaultKeyGenerator (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398156862" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14870" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14870/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14870">#14870</a> Cacheable key collision with DefaultKeyGenerator</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398118942" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14013" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14013/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14013">#14013</a> org.springframework.cache.interceptor.DefaultKeyGenerator has too weak hashing functionality</li>
</ul>
<p dir="auto">9 votes, 11 watchers</p> | 0 |
<p dir="auto">There are many different implementations of essentially the same module resolution algorithm in our system. They all do the same, but are used in different situations.</p>
<ol dir="auto">
<li>
<p dir="auto"><code class="notranslate">CliModuleLoader::resolve</code> <a href="https://github.com/denoland/deno/blob/923c5432e06aec6ec705304b818bba21c2b497d8/cli/module_loader.rs#L70-L95">link</a><br>
Used with <code class="notranslate">run --no-check</code> and probably also for pure JS.</p>
</li>
<li>
<p dir="auto"><code class="notranslate">deno::tsc::op_resolve</code> <a href="https://github.com/denoland/deno/blob/923c5432e06aec6ec705304b818bba21c2b497d8/cli/tsc.rs#L408-L474">link</a><br>
Used with type checking. Calls <code class="notranslate">deno::graph::Graph::resolve</code></p>
</li>
<li>
<p dir="auto"><code class="notranslate">deno::lsp::tsc::op_resolve</code> <a href="https://github.com/denoland/deno/blob/923c5432e06aec6ec705304b818bba21c2b497d8/cli/lsp/tsc.rs#L2273-L2364">link</a><br>
Special resolver for LSP. Does not call <code class="notranslate">deno::graph::Graph::resolve</code>.</p>
</li>
<li>
<p dir="auto"><code class="notranslate">deno_graph::source::Resolver::resolve</code> <a href="https://github.com/denoland/deno_graph/blob/865f03c8312c470d79059224081a98a7cf37438b/src/source.rs#L83-L93">link</a><br>
Trait for resolving modules, similar to <code class="notranslate">deno_core::ModuleLoader::resolve</code></p>
</li>
<li>
<p dir="auto"><code class="notranslate">eszip::resolve_import::resolve_import</code> <a href="https://github.com/denoland/eszip/blob/a01f0932dadb08fd357594cce0687c279385a101/src/resolve_import.rs#L7-L54">link</a><br>
used just for eszip</p>
</li>
<li>
<p dir="auto"><code class="notranslate">deno_core::ModuleLoader::resolve</code> <a href="https://github.com/denoland/deno/blob/923c5432e06aec6ec705304b818bba21c2b497d8/core/modules.rs#L65-L78">link</a></p>
</li>
</ol>
<p dir="auto">(Feel free to add to this list if you find more)</p> | <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/MarkTiedemann/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/MarkTiedemann">@MarkTiedemann</a> I was wondering if the jsdom port is still happening? I see it was never merged: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="470718682" data-permission-text="Title is private" data-url="https://github.com/denoland/deno_std/issues/542" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno_std/pull/542/hovercard" href="https://github.com/denoland/deno_std/pull/542">denoland/deno_std#542</a></p>
<p dir="auto">It would be amazing to be able to test code for the browser in Deno 1.0. Thanks!</p> | 0 |
<p dir="auto">due to the use of apply_over_axis masked median operations gets incredibly slow when computing them along a small dimension of a large array:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [3]: d = np.random.uniform(size=(200, 200, 50))
In [4]: %timeit np.median(d,axis=2)
10 loops, best of 3: 40.1 ms per loop
In [5]: %timeit np.nanmedian(d,axis=2)
1 loops, best of 3: 1.32 s per loop
In [6]: %timeit np.ma.median(d,axis=2)
1 loops, best of 3: 4.89 s per loop"><pre class="notranslate"><code class="notranslate">In [3]: d = np.random.uniform(size=(200, 200, 50))
In [4]: %timeit np.median(d,axis=2)
10 loops, best of 3: 40.1 ms per loop
In [5]: %timeit np.nanmedian(d,axis=2)
1 loops, best of 3: 1.32 s per loop
In [6]: %timeit np.ma.median(d,axis=2)
1 loops, best of 3: 4.89 s per loop
</code></pre></div>
<p dir="auto">a way out is using bottlenecks nanmedian which is on par with our non-masked performance (and better for the slow axis) but I think we should think of ways to improve this in numpy.</p>
<p dir="auto">I can think of following improvements for median:</p>
<ul dir="auto">
<li>implement apply_over_axis in C, should be relatively easy but will only give us ~50% boost at best. it should still be worthwhile as there are likely more users of that function out there.</li>
<li>extend partition to broadcast the index, then one could compute the right index from the mask and do everything in one partition call. Probably worthwhile but it will make the partition interface more complicated and would probably imply rewritting our pretty ugly sorting code.</li>
<li>probably the simplest would be add a check on the size of the axis and use sort instead of partition as currently done in ma.median but then instead of selecting via apply_along_axis, one selects the elements to average (or not) via fancy indexing (always select the middle two and if the non-masked count is odd duplicate one of the elements so mean() does nothing)</li>
<li>add a MaskedPartition C-Api function</li>
<li>see if we can integrate bottleneck directly somehow</li>
</ul>
<p dir="auto">any more options I'm might be overlooking?</p> | <p dir="auto">We have two pages labeled "diversity statement":</p>
<ul dir="auto">
<li>
<p dir="auto">The new one: <a href="https://numpy.org/diversity_sep2020/" rel="nofollow">NumPy diversity and inclusion statement</a></p>
</li>
<li>
<p dir="auto">The one in the Code of Conduct: <a href="https://numpy.org/devdocs/dev/conduct/code_of_conduct.html#diversity-statement" rel="nofollow">Diversity Statement</a></p>
</li>
</ul>
<p dir="auto">Neither mentions the other.</p>
<ul dir="auto">
<li>Should the new statement have at least a link to the CoC diversity statement?</li>
<li>Should the new statement say "September 2020" in the title to indicate that it's issued at a particular point in time in response to events (unlike the CoC), and will be updated?</li>
</ul>
<blockquote>
<h1 dir="auto">NumPy diversity and inclusion statement: September 2020</h1>
</blockquote> | 0 |
<p dir="auto">Right now there are at least 3 places with duplicates of the .tmbundle: here, <a href="https://github.com/karbarcca/Sublime-Julia">here</a>, and <a href="https://github.com/epitron/Julia-sublime">here</a>.</p>
<p dir="auto">This has worked fine so far, I think people have been good about syncing changes with the main repo and pulling when there are improvements.</p>
<p dir="auto">But eventually I think it will become a pain. Even now it's potentially unclear where you should submit pull requests. So I think it should be pulled out and, where convenient, submoduled back in.</p> | <p dir="auto">I thought this was just an issue in StaticArrays (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="330441344" data-permission-text="Title is private" data-url="https://github.com/JuliaArrays/StaticArrays.jl/issues/428" data-hovercard-type="issue" data-hovercard-url="/JuliaArrays/StaticArrays.jl/issues/428/hovercard" href="https://github.com/JuliaArrays/StaticArrays.jl/issues/428">JuliaArrays/StaticArrays.jl#428</a>), but the same thing is happening in Base.</p>
<p dir="auto">Currently:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> mutable struct MyNumber
val::Float64
end
julia> Base.zero(::Type{MyNumber}) = MyNumber(0.0)
julia> v = zero([MyNumber(1.0), MyNumber(2.0)])
2-element Array{MyNumber,1}:
MyNumber(0.0)
MyNumber(0.0)
julia> v[1].val = 1
1
julia> v
2-element Array{MyNumber,1}:
MyNumber(1.0)
MyNumber(1.0)"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-k">mutable struct</span> MyNumber
val<span class="pl-k">::</span><span class="pl-c1">Float64</span>
<span class="pl-k">end</span>
julia<span class="pl-k">></span> Base<span class="pl-k">.</span><span class="pl-en">zero</span>(<span class="pl-k">::</span><span class="pl-c1">Type{MyNumber}</span>) <span class="pl-k">=</span> <span class="pl-c1">MyNumber</span>(<span class="pl-c1">0.0</span>)
julia<span class="pl-k">></span> v <span class="pl-k">=</span> <span class="pl-c1">zero</span>([<span class="pl-c1">MyNumber</span>(<span class="pl-c1">1.0</span>), <span class="pl-c1">MyNumber</span>(<span class="pl-c1">2.0</span>)])
<span class="pl-c1">2</span><span class="pl-k">-</span>element Array{MyNumber,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
<span class="pl-c1">MyNumber</span>(<span class="pl-c1">0.0</span>)
<span class="pl-c1">MyNumber</span>(<span class="pl-c1">0.0</span>)
julia<span class="pl-k">></span> v[<span class="pl-c1">1</span>]<span class="pl-k">.</span>val <span class="pl-k">=</span> <span class="pl-c1">1</span>
<span class="pl-c1">1</span>
julia<span class="pl-k">></span> v
<span class="pl-c1">2</span><span class="pl-k">-</span>element Array{MyNumber,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
<span class="pl-c1">MyNumber</span>(<span class="pl-c1">1.0</span>)
<span class="pl-c1">MyNumber</span>(<span class="pl-c1">1.0</span>)</pre></div>
<p dir="auto">I think this is not desirable for non-isbits types.</p> | 0 |
<p dir="auto">when running _nodes?plugin=true it would be great to be able to get the version of the installed plugins</p> | <p dir="auto">Relative to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11201343" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/2668" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/2668/hovercard" href="https://github.com/elastic/elasticsearch/issues/2668">#2668</a></p>
<p dir="auto">Plugin developpers can now add a version number to their es-plugin.properties file:</p>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="plugin=org.elasticsearch.test.integration.nodesinfo.TestPlugin
version=0.0.7-SNAPSHOT"><pre class="notranslate"><span class="pl-k">plugin</span>=org.elasticsearch.test.integration.nodesinfo.TestPlugin
<span class="pl-k">version</span>=0.0.7-SNAPSHOT</pre></div>
<p dir="auto">Also, for site plugins, it's recommended to add a <code class="notranslate">es-plugin.properties</code> file in root site directory with <code class="notranslate">description</code> and <code class="notranslate">version</code> properties:</p>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="description=This is a description for a dummy test site plugin.
version=0.0.7-BOND-SITE"><pre class="notranslate"><span class="pl-k">description</span>=This is a description for a dummy test site plugin.
<span class="pl-k">version</span>=0.0.7-BOND-SITE</pre></div>
<p dir="auto">When running Nodes Info API, you will get information on versions:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ curl 'http://localhost:9200/_nodes?plugin=true&pretty'"><pre class="notranslate">$ curl <span class="pl-s"><span class="pl-pds">'</span>http://localhost:9200/_nodes?plugin=true&pretty<span class="pl-pds">'</span></span></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"ok" : true,
"cluster_name" : "test-cluster-MacBook-Air-de-David.local",
"nodes" : {
"RHMsToxiRcCXwHiS6mEaFw" : {
"name" : "node2",
"transport_address" : "inet[/192.168.0.15:9301]",
"hostname" : "MacBook-Air-de-David.local",
"version" : "0.90.0.Beta2-SNAPSHOT",
"http_address" : "inet[/192.168.0.15:9201]",
"plugins" : [ {
"name" : "dummy",
"version" : "0.0.7-BOND-SITE",
"description" : "This is a description for a dummy test site plugin.",
"url" : "/_plugin/dummy/",
"site" : true,
"jvm" : false
} ]
},
"IKiUOo-LSCq1Km1GUhBwPg" : {
"name" : "node3",
"transport_address" : "inet[/192.168.0.15:9302]",
"hostname" : "MacBook-Air-de-David.local",
"version" : "0.90.0.Beta2-SNAPSHOT",
"http_address" : "inet[/192.168.0.15:9202]",
"plugins" : [ {
"name" : "test-plugin",
"version" : "0.0.7-SNAPSHOT",
"description" : "test-plugin description",
"site" : false,
"jvm" : true
} ]
},
"H64dcSF2R_GNWh6XRCYZJA" : {
"name" : "node1",
"transport_address" : "inet[/192.168.0.15:9300]",
"hostname" : "MacBook-Air-de-David.local",
"version" : "0.90.0.Beta2-SNAPSHOT",
"http_address" : "inet[/192.168.0.15:9200]",
"plugins" : [ ]
},
"mGEZcYl8Tye0Rm5AACBhPA" : {
"name" : "node4",
"transport_address" : "inet[/192.168.0.15:9303]",
"hostname" : "MacBook-Air-de-David.local",
"version" : "0.90.0.Beta2-SNAPSHOT",
"http_address" : "inet[/192.168.0.15:9203]",
"plugins" : [ {
"name" : "test-plugin",
"version" : "0.0.7-SNAPSHOT",
"description" : "test-plugin description",
"site" : false,
"jvm" : true
}, {
"name" : "test-no-version-plugin",
"version" : "NA",
"description" : "test-no-version-plugin description",
"site" : false,
"jvm" : true
}, {
"name" : "dummy",
"version" : "NA",
"description" : "No description found for dummy.",
"url" : "/_plugin/dummy/",
"site" : true,
"jvm" : false
} ]
}
}
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"ok"</span> : <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-s">"cluster_name"</span> : <span class="pl-s">"test-cluster-MacBook-Air-de-David.local"</span><span class="pl-kos">,</span>
<span class="pl-s">"nodes"</span> : <span class="pl-kos">{</span>
<span class="pl-s">"RHMsToxiRcCXwHiS6mEaFw"</span> : <span class="pl-kos">{</span>
<span class="pl-s">"name"</span> : <span class="pl-s">"node2"</span><span class="pl-kos">,</span>
<span class="pl-s">"transport_address"</span> : <span class="pl-s">"inet[/192.168.0.15:9301]"</span><span class="pl-kos">,</span>
<span class="pl-s">"hostname"</span> : <span class="pl-s">"MacBook-Air-de-David.local"</span><span class="pl-kos">,</span>
<span class="pl-s">"version"</span> : <span class="pl-s">"0.90.0.Beta2-SNAPSHOT"</span><span class="pl-kos">,</span>
<span class="pl-s">"http_address"</span> : <span class="pl-s">"inet[/192.168.0.15:9201]"</span><span class="pl-kos">,</span>
<span class="pl-s">"plugins"</span> : <span class="pl-kos">[</span> <span class="pl-kos">{</span>
<span class="pl-s">"name"</span> : <span class="pl-s">"dummy"</span><span class="pl-kos">,</span>
<span class="pl-s">"version"</span> : <span class="pl-s">"0.0.7-BOND-SITE"</span><span class="pl-kos">,</span>
<span class="pl-s">"description"</span> : <span class="pl-s">"This is a description for a dummy test site plugin."</span><span class="pl-kos">,</span>
<span class="pl-s">"url"</span> : <span class="pl-s">"/_plugin/dummy/"</span><span class="pl-kos">,</span>
<span class="pl-s">"site"</span> : <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-s">"jvm"</span> : <span class="pl-c1">false</span>
<span class="pl-kos">}</span> <span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-s">"IKiUOo-LSCq1Km1GUhBwPg"</span> : <span class="pl-kos">{</span>
<span class="pl-s">"name"</span> : <span class="pl-s">"node3"</span><span class="pl-kos">,</span>
<span class="pl-s">"transport_address"</span> : <span class="pl-s">"inet[/192.168.0.15:9302]"</span><span class="pl-kos">,</span>
<span class="pl-s">"hostname"</span> : <span class="pl-s">"MacBook-Air-de-David.local"</span><span class="pl-kos">,</span>
<span class="pl-s">"version"</span> : <span class="pl-s">"0.90.0.Beta2-SNAPSHOT"</span><span class="pl-kos">,</span>
<span class="pl-s">"http_address"</span> : <span class="pl-s">"inet[/192.168.0.15:9202]"</span><span class="pl-kos">,</span>
<span class="pl-s">"plugins"</span> : <span class="pl-kos">[</span> <span class="pl-kos">{</span>
<span class="pl-s">"name"</span> : <span class="pl-s">"test-plugin"</span><span class="pl-kos">,</span>
<span class="pl-s">"version"</span> : <span class="pl-s">"0.0.7-SNAPSHOT"</span><span class="pl-kos">,</span>
<span class="pl-s">"description"</span> : <span class="pl-s">"test-plugin description"</span><span class="pl-kos">,</span>
<span class="pl-s">"site"</span> : <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-s">"jvm"</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-kos">,</span>
<span class="pl-s">"H64dcSF2R_GNWh6XRCYZJA"</span> : <span class="pl-kos">{</span>
<span class="pl-s">"name"</span> : <span class="pl-s">"node1"</span><span class="pl-kos">,</span>
<span class="pl-s">"transport_address"</span> : <span class="pl-s">"inet[/192.168.0.15:9300]"</span><span class="pl-kos">,</span>
<span class="pl-s">"hostname"</span> : <span class="pl-s">"MacBook-Air-de-David.local"</span><span class="pl-kos">,</span>
<span class="pl-s">"version"</span> : <span class="pl-s">"0.90.0.Beta2-SNAPSHOT"</span><span class="pl-kos">,</span>
<span class="pl-s">"http_address"</span> : <span class="pl-s">"inet[/192.168.0.15:9200]"</span><span class="pl-kos">,</span>
<span class="pl-s">"plugins"</span> : <span class="pl-kos">[</span> <span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-s">"mGEZcYl8Tye0Rm5AACBhPA"</span> : <span class="pl-kos">{</span>
<span class="pl-s">"name"</span> : <span class="pl-s">"node4"</span><span class="pl-kos">,</span>
<span class="pl-s">"transport_address"</span> : <span class="pl-s">"inet[/192.168.0.15:9303]"</span><span class="pl-kos">,</span>
<span class="pl-s">"hostname"</span> : <span class="pl-s">"MacBook-Air-de-David.local"</span><span class="pl-kos">,</span>
<span class="pl-s">"version"</span> : <span class="pl-s">"0.90.0.Beta2-SNAPSHOT"</span><span class="pl-kos">,</span>
<span class="pl-s">"http_address"</span> : <span class="pl-s">"inet[/192.168.0.15:9203]"</span><span class="pl-kos">,</span>
<span class="pl-s">"plugins"</span> : <span class="pl-kos">[</span> <span class="pl-kos">{</span>
<span class="pl-s">"name"</span> : <span class="pl-s">"test-plugin"</span><span class="pl-kos">,</span>
<span class="pl-s">"version"</span> : <span class="pl-s">"0.0.7-SNAPSHOT"</span><span class="pl-kos">,</span>
<span class="pl-s">"description"</span> : <span class="pl-s">"test-plugin description"</span><span class="pl-kos">,</span>
<span class="pl-s">"site"</span> : <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-s">"jvm"</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-s">"name"</span> : <span class="pl-s">"test-no-version-plugin"</span><span class="pl-kos">,</span>
<span class="pl-s">"version"</span> : <span class="pl-s">"NA"</span><span class="pl-kos">,</span>
<span class="pl-s">"description"</span> : <span class="pl-s">"test-no-version-plugin description"</span><span class="pl-kos">,</span>
<span class="pl-s">"site"</span> : <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-s">"jvm"</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-s">"name"</span> : <span class="pl-s">"dummy"</span><span class="pl-kos">,</span>
<span class="pl-s">"version"</span> : <span class="pl-s">"NA"</span><span class="pl-kos">,</span>
<span class="pl-s">"description"</span> : <span class="pl-s">"No description found for dummy."</span><span class="pl-kos">,</span>
<span class="pl-s">"url"</span> : <span class="pl-s">"/_plugin/dummy/"</span><span class="pl-kos">,</span>
<span class="pl-s">"site"</span> : <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-s">"jvm"</span> : <span class="pl-c1">false</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> | 1 |
<p dir="auto">select * from table;</p>
<p dir="auto">that query (with semicolon) runs fine in SQLLab but after clicking Explore on the results the Chart page gives an error about semicolon not allowed</p> | <p dir="auto">When running the command <code class="notranslate">superset db upgrade</code>, I am receiving the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "/usr/local/bin/superset", line 33, in <module>
sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask_migrate/cli.py", line 134, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File "/usr/local/lib/python3.7/site-packages/flask_migrate/__init__.py", line 96, in wrapped
f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask_migrate/__init__.py", line 271, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/usr/local/lib/python3.7/site-packages/alembic/command.py", line 298, in upgrade
script.run_env()
File "/usr/local/lib/python3.7/site-packages/alembic/script/base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/local/lib/python3.7/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "/usr/local/lib/python3.7/site-packages/alembic/util/compat.py", line 184, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/app/superset/migrations/env.py", line 124, in <module>
run_migrations_online()
File "/app/superset/migrations/env.py", line 116, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/usr/local/lib/python3.7/site-packages/alembic/runtime/environment.py", line 846, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/local/lib/python3.7/site-packages/alembic/runtime/migration.py", line 522, in run_migrations
step.migration_fn(**kw)
File "/app/superset/migrations/versions/b6fa807eac07_make_names_non_nullable.py", line 70, in upgrade
"table_name", existing_type=sa.String(250), nullable=False
File "/usr/local/lib/python3.7/contextlib.py", line 119, in __exit__
next(self.gen)
File "/usr/local/lib/python3.7/site-packages/alembic/operations/base.py", line 353, in batch_alter_table
impl.flush()
File "/usr/local/lib/python3.7/site-packages/alembic/operations/batch.py", line 82, in flush
fn(*arg, **kw)
File "/usr/local/lib/python3.7/site-packages/alembic/ddl/postgresql.py", line 147, in alter_column
**kw
File "/usr/local/lib/python3.7/site-packages/alembic/ddl/impl.py", line 179, in alter_column
existing_comment=existing_comment,
File "/usr/local/lib/python3.7/site-packages/alembic/ddl/impl.py", line 141, in _exec
return conn.execute(construct, *multiparams, **params)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/ddl.py", line 72, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1073, in _execute_ddl
compiled,
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
e, statement, parameters, cursor, context
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1511, in _handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from_=e
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
cursor, statement, parameters, context
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (psycopg2.errors.NotNullViolation) column "table_name" contains null values
[SQL: ALTER TABLE tables ALTER COLUMN table_name SET NOT NULL]
(Background on this error at: http://sqlalche.me/e/13/gkpj)"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "/usr/local/bin/superset", line 33, in <module>
sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask_migrate/cli.py", line 134, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File "/usr/local/lib/python3.7/site-packages/flask_migrate/__init__.py", line 96, in wrapped
f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask_migrate/__init__.py", line 271, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/usr/local/lib/python3.7/site-packages/alembic/command.py", line 298, in upgrade
script.run_env()
File "/usr/local/lib/python3.7/site-packages/alembic/script/base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/local/lib/python3.7/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "/usr/local/lib/python3.7/site-packages/alembic/util/compat.py", line 184, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/app/superset/migrations/env.py", line 124, in <module>
run_migrations_online()
File "/app/superset/migrations/env.py", line 116, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/usr/local/lib/python3.7/site-packages/alembic/runtime/environment.py", line 846, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/local/lib/python3.7/site-packages/alembic/runtime/migration.py", line 522, in run_migrations
step.migration_fn(**kw)
File "/app/superset/migrations/versions/b6fa807eac07_make_names_non_nullable.py", line 70, in upgrade
"table_name", existing_type=sa.String(250), nullable=False
File "/usr/local/lib/python3.7/contextlib.py", line 119, in __exit__
next(self.gen)
File "/usr/local/lib/python3.7/site-packages/alembic/operations/base.py", line 353, in batch_alter_table
impl.flush()
File "/usr/local/lib/python3.7/site-packages/alembic/operations/batch.py", line 82, in flush
fn(*arg, **kw)
File "/usr/local/lib/python3.7/site-packages/alembic/ddl/postgresql.py", line 147, in alter_column
**kw
File "/usr/local/lib/python3.7/site-packages/alembic/ddl/impl.py", line 179, in alter_column
existing_comment=existing_comment,
File "/usr/local/lib/python3.7/site-packages/alembic/ddl/impl.py", line 141, in _exec
return conn.execute(construct, *multiparams, **params)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/ddl.py", line 72, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1073, in _execute_ddl
compiled,
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
e, statement, parameters, cursor, context
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1511, in _handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from_=e
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
cursor, statement, parameters, context
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (psycopg2.errors.NotNullViolation) column "table_name" contains null values
[SQL: ALTER TABLE tables ALTER COLUMN table_name SET NOT NULL]
(Background on this error at: http://sqlalche.me/e/13/gkpj)
</code></pre></div>
<p dir="auto">Which prevents the completion of the database upgrade.</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">DB Upgrade completes.</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">Reference stacktrace above.</p>
<h4 dir="auto">How to reproduce the bug</h4>
<p dir="auto">Run <code class="notranslate">superset db upgrade</code> on older database.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>superset version: v1.1 (upgrading from v0.34.1rc1)</li>
<li>python version: <code class="notranslate">3.8</code></li>
<li>node.js version: <code class="notranslate">v16.1.0</code></li>
<li>any feature flags active: N/A</li>
</ul>
<h3 dir="auto">Checklist</h3>
<p dir="auto">Make sure to follow these steps before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of superset.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li>
</ul>
<p dir="auto">Duplicate Issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="813406216" data-permission-text="Title is private" data-url="https://github.com/apache/superset/issues/13272" data-hovercard-type="issue" data-hovercard-url="/apache/superset/issues/13272/hovercard" href="https://github.com/apache/superset/issues/13272">#13272</a></p>
<p dir="auto">Posting this as issue, as the former has not yet been addressed.</p>
<h3 dir="auto">Additional context</h3>
<p dir="auto">Solution: Access DB that is to be upgraded, navigate to "tables" table, input value for row that contains null-valued column "table_name" so that it is no longer null.</p> | 0 |
<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>
<p dir="auto">I have searched out and get <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="258094754" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/8223" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/8223/hovercard" href="https://github.com/mui/material-ui/issues/8223">#8223</a> but I cant get any solution</p>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">In production build of commonjs classnames should not be duplicated</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">There is several classnames generated with same identifier<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16926049/31852217-aee286da-b67c-11e7-9c2d-a35c68b2df45.png"><img src="https://user-images.githubusercontent.com/16926049/31852217-aee286da-b67c-11e7-9c2d-a35c68b2df45.png" alt="2017-10-21 16 23 06" style="max-width: 100%;"></a></p>
<p dir="auto">My webpack config for the plugin</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = {
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
libraryTarget: 'commonjs2', // common js build
},
plugins: [
new PeerDepsExternalsPlugin(), // will be transform to externals with the list of peer deps(material-ui here as well)
]
}"><pre class="notranslate"><code class="notranslate">module.exports = {
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
libraryTarget: 'commonjs2', // common js build
},
plugins: [
new PeerDepsExternalsPlugin(), // will be transform to externals with the list of peer deps(material-ui here as well)
]
}
</code></pre></div>
<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.17</td>
</tr>
<tr>
<td>React</td>
<td>16.0.0</td>
</tr>
<tr>
<td>browser</td>
<td>any</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <p dir="auto">I use dialog fullScreen. When I click button open full-screen dialog, and no any operation even no click anywhere, then press 'esc' key to escape fullscreen. That button still has focus styles. This is not a issue, I just want to know how can I do remove the styles with no operation.</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/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<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.11</td>
</tr>
<tr>
<td>React</td>
<td>16.0.0</td>
</tr>
<tr>
<td>browser</td>
<td>chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<h1 dir="auto">Use case for loading transient objects</h1>
<ul dir="auto">
<li>Your server framework environment only ever has one session. (For example, TurboGears framework, using ScopedSession.) Or you can readily determine to which session a transient instance would belong.</li>
<li>You build up simple or complex sqlalchemy transient instances with related instances and collections all fleshed out before actually adding the instance (with its relations) to the database.
<ul dir="auto">
<li>In our case, this happens because the objects are being build up client side, in memory, with the desirable side effect that the server side can be stateless. The client keeps a copy of this transient object. While the object and its relationships are being built up (Order with Customer and OrderLines with their Products, etc.) the client often serializes the object (with its relationships) and sends it to the server, who deserializes it, translates it into transient objects that it can work with (applying business logic, loading relationships, etc), and sends those changes back to the client.</li>
<li>Only when the client side user is happy to save the changes does he click "Save" and then, this time after the server has deserialized and reconstructed these transient objects, it actually adds them to the session (merges) and they become pending/persistent objects.</li>
</ul>
</li>
</ul>
<h2 dir="auto">Discussion</h2>
<p dir="auto">It is often the case that a related record exists in the database that would be useful to inspect (without the restriction that it be part of the session yet).</p>
<ul dir="auto">
<li>
<p dir="auto">Examples:</p>
<ul dir="auto">
<li>The ZipCode records with their relationships containing tax information, shipping information, etc. are already in the database. You are building a customer instance where the zipcode foreign key is known.
<ul dir="auto">
<li>My new customer instance would fail if I tried to add it to the database at the moment because I haven't even provided all the required (non nullable) fields. Still, given that I know my session, I should be able to load this transient customer's zipcode related object and all its related collections so I can calculate tax/shipping as soon as I know the zipcode.</li>
</ul>
</li>
<li>An OrderLine already knows the productid, the foreign key to the Product object the server would like to load, which must already exist in the database. From there, we can find prices, related items, substitutions, etc naturally through the transient object's already defined relationships:</li>
</ul>
<p dir="auto">line = OrderLine()<br>
line.productid = u'SKU3433'</p>
<h1 dir="auto">"lazy" load the product from the database for further business logic</h1>
<p dir="auto">line.product</p>
<ul dir="auto">
<li>You are writing an Order that does not yet exist in the database, but you know the store it is being written from. Your server logic needs to reference that Store's instance <code class="notranslate">'order.store'</code> regardless of whether this order is transient and not yet saved or persistent and being modified. Either way, you would like to refer to the related object through the <code class="notranslate">Order</code> mapped relationship <code class="notranslate">'store'</code>.</li>
</ul>
</li>
<li>
<p dir="auto">It is extremely beneficial for the server code to be able to reference relationships and apply business logic, agnostic of whether the instance is currently transient or pending or persistent (or detached for some cases). (The record's ''session status'' rarely affects ''business logic'' needed.)</p>
</li>
<li>
<p dir="auto">This methodology has worked quite well for us for nearly a year of live use.</p>
</li>
</ul>
<h2 dir="auto">Detached instance relationship loading</h2>
<ul dir="auto">
<li>E.g. you still need to calculate changes, run business logic, etc for a record that you are forbidden to change in the database (think archived records which can't change for accounting reasons) so you expunge() it, calculate the deltas you need and record them elsewhere.</li>
</ul>
<h2 dir="auto">See also</h2>
<ul dir="auto">
<li><a href="http://groups.google.com/group/sqlalchemy/browse_thread/thread/6367487e915d653" rel="nofollow">http://groups.google.com/group/sqlalchemy/browse_thread/thread/6367487e915d653</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384621455" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/1910" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/1910/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/1910">#1910</a></li>
<li><a href="http://groups.google.com/group/sqlalchemy/browse_thread/thread/e9b99d7120e63591" rel="nofollow">http://groups.google.com/group/sqlalchemy/browse_thread/thread/e9b99d7120e63591</a></li>
</ul> | <p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">We got weird ("(OperationalError) (1305, 'SAVEPOINT sa_savepoint_1 does not exist') in our prod, and after investigation, this is due to the fact that our mysql server fails a commit (we don't know why), and the handling of that exception in sqlalchemy leads to an automatic rollback to last savepoint. But that auto-rollback fails too (probably because mysql has already automatically rolled back by itself, and so destroyed savepoints), and thus the new exception "SAVEPOINT does not exist" hides the original error that caused all that trouble.</p>
<p dir="auto">Here is the faulting code line, in latest development branch, in sqlalchemy/orm/session.py, line 1930:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" except:
transaction.rollback(_capture_exception=True)
raise"><pre class="notranslate"><code class="notranslate"> except:
transaction.rollback(_capture_exception=True)
raise
</code></pre></div>
<p dir="auto">Since we don't know the actual state of the mysql transaction at that moment, I guess that this automatic rollback should be protected by a try...except, so that if it fails, it's the original error that will be reraised in any case. Or shouldn't it ?</p>
<p dir="auto">Here is the full traceback we got in prod (with sqlalchemy 0.7.3, but the faulty lines are still present in latest sqlalchemy versions):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="File "/home/pimsprod/PIMS/src/pims/processing/processor_abstract.py", line 213, in retrieve_user
session.commit() # COMMIT SAVEPOINT
File "/home/pimsprod/PIMS/src/pims/database_tools.py", line 85, in commit
super(SafeSessionClass, self).commit(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 645, in commit
self.transaction.commit()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 313, in commit
self._prepare_impl()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 297, in _prepare_impl
self.session.flush()
File "/home/pimsprod/PIMS/src/pims/database_tools.py", line 77, in flush
super(SafeSessionClass, self).flush(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1547, in flush
self._flush(objects)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1634, in _flush
transaction.rollback(_capture_exception=True)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 338, in rollback
transaction._rollback_impl()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 356, in _rollback_impl
t[1](1).rollback()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1960, in rollback
self._do_rollback()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2020, in _do_rollback
self._savepoint, self._parent)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1249, in _rollback_to_savepoint_impl
self.engine.dialect.do_rollback_to_savepoint(self, name)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 321, in do_rollback_to_savepoint
connection.execute(expression.RollbackToSavepointClause(name))
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1399, in execute
params)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1532, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1640, in _execute_context
context)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1633, in _execute_context
context)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 330, in do_execute
cursor.execute(statement, parameters)
File "/usr/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (OperationalError) (1305, 'SAVEPOINT sa_savepoint_1 does not exist') 'ROLLBACK TO SAVEPOINT sa_savepoint_1' ()"><pre class="notranslate"><code class="notranslate">File "/home/pimsprod/PIMS/src/pims/processing/processor_abstract.py", line 213, in retrieve_user
session.commit() # COMMIT SAVEPOINT
File "/home/pimsprod/PIMS/src/pims/database_tools.py", line 85, in commit
super(SafeSessionClass, self).commit(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 645, in commit
self.transaction.commit()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 313, in commit
self._prepare_impl()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 297, in _prepare_impl
self.session.flush()
File "/home/pimsprod/PIMS/src/pims/database_tools.py", line 77, in flush
super(SafeSessionClass, self).flush(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1547, in flush
self._flush(objects)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1634, in _flush
transaction.rollback(_capture_exception=True)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 338, in rollback
transaction._rollback_impl()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 356, in _rollback_impl
t[1](1).rollback()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1960, in rollback
self._do_rollback()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2020, in _do_rollback
self._savepoint, self._parent)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1249, in _rollback_to_savepoint_impl
self.engine.dialect.do_rollback_to_savepoint(self, name)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 321, in do_rollback_to_savepoint
connection.execute(expression.RollbackToSavepointClause(name))
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1399, in execute
params)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1532, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1640, in _execute_context
context)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1633, in _execute_context
context)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 330, in do_execute
cursor.execute(statement, parameters)
File "/usr/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (OperationalError) (1305, 'SAVEPOINT sa_savepoint_1 does not exist') 'ROLLBACK TO SAVEPOINT sa_savepoint_1' ()
</code></pre></div> | 0 |
<p dir="auto">Since latest beta, the generated transition property for tabs indicator is <code class="notranslate"> transition: all 300ms cubic-bezier(0.4, false, false.2, false) 0ms</code> which is invalid</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/mui-org/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">The default transitions property should be properly generated.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The default transitions property is wrong.</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>beta 28</td>
</tr>
<tr>
<td>React</td>
<td>16</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 63</td>
</tr>
<tr>
<td>etc</td>
<td>TS 2.6.2</td>
</tr>
</tbody>
</table> | <p dir="auto">After installing the <a href="https://github.com/mui-org/material-ui/tree/v1-beta/examples/create-react-app-with-typescript">typescript/material/react</a> example I saw that the build was failing. Then I found these two issues regarding the build problems I was experiencing: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="288475324" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/9881" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/9881/hovercard" href="https://github.com/mui/material-ui/issues/9881">#9881</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="288429450" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/9873" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/9873/hovercard" href="https://github.com/mui/material-ui/issues/9873">#9873</a></p>
<p dir="auto">I would like to suggest fixing the dependency versions in place. They don't need to be exact of course.</p>
<p dir="auto">With the dependencies declared as <code class="notranslate">latest</code> I don't have a starting point for debugging.</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/mui-org/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">Example build should always be working as it's a starting point for new users.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Build is broken and will be in the future as well.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Clone the example</li>
<li>Try to build</li>
<li>It will fail</li>
</ol>
<h2 dir="auto">Your Environment</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""dependencies": {
"material-ui": "next",
"react": "latest",
"react-dom": "latest",
"react-scripts-ts": "latest"
},
"devDependencies": {
"@types/jest": "latest",
"@types/node": "latest",
"@types/react": "latest",
"@types/react-dom": "latest",
"@types/react-transition-group": "^2.0.6"
}"><pre class="notranslate"><code class="notranslate">"dependencies": {
"material-ui": "next",
"react": "latest",
"react-dom": "latest",
"react-scripts-ts": "latest"
},
"devDependencies": {
"@types/jest": "latest",
"@types/node": "latest",
"@types/react": "latest",
"@types/react-dom": "latest",
"@types/react-transition-group": "^2.0.6"
}
</code></pre></div> | 0 |
<p dir="auto"><code class="notranslate">sharex=False</code> works as expected:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="titanic = sns.load_dataset("titanic")
titanic = titanic.assign(deck=titanic.deck.astype(object)).sort_values("deck")
g = sns.FacetGrid(titanic, col="sex", sharex=False, sharey=False)
g.map(sns.histplot, "age");"><pre class="notranslate"><span class="pl-s1">titanic</span> <span class="pl-c1">=</span> <span class="pl-s1">sns</span>.<span class="pl-en">load_dataset</span>(<span class="pl-s">"titanic"</span>)
<span class="pl-s1">titanic</span> <span class="pl-c1">=</span> <span class="pl-s1">titanic</span>.<span class="pl-en">assign</span>(<span class="pl-s1">deck</span><span class="pl-c1">=</span><span class="pl-s1">titanic</span>.<span class="pl-s1">deck</span>.<span class="pl-en">astype</span>(<span class="pl-s1">object</span>)).<span class="pl-en">sort_values</span>(<span class="pl-s">"deck"</span>)
<span class="pl-s1">g</span> <span class="pl-c1">=</span> <span class="pl-s1">sns</span>.<span class="pl-v">FacetGrid</span>(<span class="pl-s1">titanic</span>, <span class="pl-s1">col</span><span class="pl-c1">=</span><span class="pl-s">"sex"</span>, <span class="pl-s1">sharex</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">sharey</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
<span class="pl-s1">g</span>.<span class="pl-en">map</span>(<span class="pl-s1">sns</span>.<span class="pl-s1">histplot</span>, <span class="pl-s">"age"</span>);</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4952605/114877916-08d07580-9e00-11eb-99b4-c4ecf888443b.png"><img src="https://user-images.githubusercontent.com/4952605/114877916-08d07580-9e00-11eb-99b4-c4ecf888443b.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">but is ignored when using displot:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sns.displot(titanic, x='age', col='sex', facet_kws=dict(sharex=False, sharey=False));"><pre class="notranslate"><span class="pl-s1">sns</span>.<span class="pl-en">displot</span>(<span class="pl-s1">titanic</span>, <span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s">'age'</span>, <span class="pl-s1">col</span><span class="pl-c1">=</span><span class="pl-s">'sex'</span>, <span class="pl-s1">facet_kws</span><span class="pl-c1">=</span><span class="pl-en">dict</span>(<span class="pl-s1">sharex</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">sharey</span><span class="pl-c1">=</span><span class="pl-c1">False</span>));</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4952605/114877934-0bcb6600-9e00-11eb-90c2-c5cc93181fd1.png"><img src="https://user-images.githubusercontent.com/4952605/114877934-0bcb6600-9e00-11eb-90c2-c5cc93181fd1.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Versions:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="matplotlib 3.4.1 pypi_0 pypi
seaborn 0.11.1 pypi_0 pypi"><pre class="notranslate">matplotlib 3.4.1 pypi_0 pypi
seaborn 0.11.1 pypi_0 pypi</pre></div> | <p dir="auto">Trying to create a displot with non-shared axis (both y and x) using the following function call:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import seaborn as sns
_df = sns.load_dataset("tips")
sns.displot(data=_df, x='tip', col='day', hue='smoker', stat="density", element='step', facet_kws={'sharex': False, 'sharey': False})"><pre class="notranslate"><code class="notranslate">import seaborn as sns
_df = sns.load_dataset("tips")
sns.displot(data=_df, x='tip', col='day', hue='smoker', stat="density", element='step', facet_kws={'sharex': False, 'sharey': False})
</code></pre></div>
<p dir="auto">The result is, X axis are still shared<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13455948/107016192-c2540e80-67f1-11eb-8a7d-ef94e56011d9.png"><img src="https://user-images.githubusercontent.com/13455948/107016192-c2540e80-67f1-11eb-8a7d-ef94e56011d9.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I've tried using FacetGrid with histplot, but then I can't get a legend.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="g = sns.FacetGrid(_df, col="day", sharex=False, sharey=False)
g.map_dataframe(sns.histplot, x="tip", stat="density", element="step", hue="smoker").add_legend()"><pre class="notranslate"><code class="notranslate">g = sns.FacetGrid(_df, col="day", sharex=False, sharey=False)
g.map_dataframe(sns.histplot, x="tip", stat="density", element="step", hue="smoker").add_legend()
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13455948/107016629-460dfb00-67f2-11eb-9013-e69d13b2184d.png"><img src="https://user-images.githubusercontent.com/13455948/107016629-460dfb00-67f2-11eb-9013-e69d13b2184d.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">matplotlib 3.2.1<br>
seaborn-0.11.0</p>
<p dir="auto">Also tried upgrading to<br>
seaborn-0.11.1</p>
<p dir="auto">same issues</p> | 1 |
<h3 dir="auto">Version</h3>
<p dir="auto">2.5.13</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codesandbox.io/s/4895o6nm24" rel="nofollow">https://codesandbox.io/s/4895o6nm24</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Using Typescript 2.7.1, importing Vue 2.5.13 results in <code class="notranslate">undefined</code>.</p>
<p dir="auto">To reproduce, create a blank .ts file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Vue from "vue";
console.log(Vue); // <-- will be `undefined` (or `null` in Code Sandbox)"><pre class="notranslate"><code class="notranslate">import Vue from "vue";
console.log(Vue); // <-- will be `undefined` (or `null` in Code Sandbox)
</code></pre></div>
<p dir="auto">This can be fixed by importing like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import * as Vue from "vue";"><pre class="notranslate"><code class="notranslate">import * as Vue from "vue";
</code></pre></div>
<p dir="auto">... but then <code class="notranslate">new Vue()</code> returns the TS error:</p>
<blockquote>
<p dir="auto">test.ts (3,1): Cannot use 'new' with an expression whose type lacks a call or construct signature. (2351)</p>
</blockquote>
<p dir="auto">Changing this to <code class="notranslate">new Vue.default();</code> resolves the TS error, but then results in a Node error:</p>
<blockquote>
<p dir="auto">TypeError: Vue.default is not a constructor</p>
</blockquote>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">No errors</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">See above</p>
<p dir="auto"><strong>Note: I'm not using Webpack in this example.</strong> What I assume is happening (referencing the recommended <code class="notranslate">tsconfig.json</code> config) is that <code class="notranslate">import</code> statements are being as-is by Typescript, for Webpack to pick up and use properly.</p>
<p dir="auto">However, I think that this should be improved to work with Typescript <em>directly</em>, without requiring Webpack to enter the mix. This would benefit server-only environments where code transpilation isn't necessarily required.</p> | <h3 dir="auto">Version</h3>
<p dir="auto">2.5.13</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://github.com/marpstar/vue-typescript-import-problems">https://github.com/marpstar/vue-typescript-import-problems</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Clone this repo
git clone https://github.com/marpstar/vue-typescript-import-problems.git
# Install dependencies
npm install
# Compile TS
tsc
# Launch app. You'll see an error "vue_1.default is not a constructor"
node build/main.js
"><pre class="notranslate"><code class="notranslate"># Clone this repo
git clone https://github.com/marpstar/vue-typescript-import-problems.git
# Install dependencies
npm install
# Compile TS
tsc
# Launch app. You'll see an error "vue_1.default is not a constructor"
node build/main.js
</code></pre></div>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">I can create a new Vue instance using the constructor.</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">I get an error "TypeError: vue_1.default is not a constructor"</p>
<hr>
<p dir="auto">I believe this is related to the issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="285641977" data-permission-text="Title is private" data-url="https://github.com/vuejs/vue/issues/7374" data-hovercard-type="issue" data-hovercard-url="/vuejs/vue/issues/7374/hovercard" href="https://github.com/vuejs/vue/issues/7374">#7374</a>, which I've included my comments below:</p>
<p dir="auto">I'm using <code class="notranslate">commonjs</code> output from TypeScript (no webpack). One similarity between OP and I is that we're both using the TypeScript <code class="notranslate">baseUrl</code> option. Something is definitely wrong with the standard import in TypeScript.</p>
<p dir="auto">I too am using Vue 2.5.13. I'm setting up SSR on Node 8.9.3 and TypeScript 2.6. My <code class="notranslate">tsconfig.json</code> looks like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"outDir": "build",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"rootDir": "./src",
"baseUrl": "./src",
"noUnusedLocals": true
},
"exclude": [
"node_modules",
"typings"
]
}"><pre class="notranslate"><code class="notranslate">{
"compilerOptions": {
"outDir": "build",
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"rootDir": "./src",
"baseUrl": "./src",
"noUnusedLocals": true
},
"exclude": [
"node_modules",
"typings"
]
}
</code></pre></div>
<p dir="auto">I tried a number of other workaround, including trying to load the vue.esm.js file via the <code class="notranslate">compilerOptions.paths</code> property, without success. I was getting the exact same <code class="notranslate">vue_1.default is not a constructor</code> error as OP.</p> | 1 |
<p dir="auto">Hi experts,<br>
I've installed Anaconda 3 64-bit and Python 3.6.7 on my Windows 10 laptop, also I've installed Tensorflow, however when I try to import Tensorflow, it fails, messages are appended below, could you please give my advises and instruction of solving this problem? Thanks.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(tensorflow) C:\Users\user>python
Python 3.6.7 |Anaconda custom (64-bit)| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(__file__)])
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import * # pylint: disable=redefined-builtin
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(__file__)])
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'"><pre class="notranslate"><code class="notranslate">(tensorflow) C:\Users\user>python
Python 3.6.7 |Anaconda custom (64-bit)| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(__file__)])
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import * # pylint: disable=redefined-builtin
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(__file__)])
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
</code></pre></div> | <p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 64bit</li>
<li>TensorFlow installed from (source or binary): pip install tensorflow; pip install --upgrade tensorflow;<br>
pip install --upgrade <a href="https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.11.0-cp36-cp36m-win_amd64.whl" rel="nofollow">https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.11.0-cp36-cp36m-win_amd64.whl</a> etc.)</li>
<li>TensorFlow version: Tried multiple from 1.4.0 - 1.11.0</li>
<li>Python version: Python 3.6</li>
<li>Installed using virtualenv? pip? conda?: Yes to all 3</li>
<li>CUDA/cuDNN version: As far as I know I don't need it for the CPU Version.</li>
<li>GPU model and memory: NA</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong><br>
Can't import Tensorflow, missing DLL:<br>
<code class="notranslate">Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) File "venv\lib\site-packages\tensorflow\__init__.py", line 22, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) File "venv\lib\site-packages\tensorflow\python\__init__.py", line 52, in <module> from tensorflow.core.framework.graph_pb2 import * File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) File "venv\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module> from google.protobuf import descriptor as _descriptor File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) File "venv\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module> from google.protobuf.pyext import _message File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) ImportError: DLL load failed: The specified procedure could not be found.</code></p>
<p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong></p>
<ul dir="auto">
<li>Installed vc_redist64.exe</li>
<li>Open Python<br>
<code class="notranslate">import tensorflow</code></li>
</ul>
<p dir="auto"><strong>Any other info / logs</strong></p>
<ul dir="auto">
<li>I already reinstalled Python completly</li>
<li>reinstalled vc_redist multiple times</li>
<li>and tried everything I found over google. Not sure if I am messing something up.</li>
</ul> | 1 |
<p dir="auto">Running</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="php app/console doctrine:generate:entities MyBundle:MyEntity"><pre class="notranslate"><code class="notranslate">php app/console doctrine:generate:entities MyBundle:MyEntity
</code></pre></div>
<p dir="auto">on v2.5.0 I get</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Deprecated: getEntityNamespace is deprecated since Symfony 2.1. Use
getAliasNamespace instead in .../Doctrine/Bundle/DoctrineBundle/Registry.php
on line 129"><pre class="notranslate"><code class="notranslate">Deprecated: getEntityNamespace is deprecated since Symfony 2.1. Use
getAliasNamespace instead in .../Doctrine/Bundle/DoctrineBundle/Registry.php
on line 129
</code></pre></div> | <p dir="auto">Can I have this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="No more app_dev.php or app.php"><pre class="notranslate"><code class="notranslate">No more app_dev.php or app.php
</code></pre></div>
<p dir="auto">Just</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="index.php"><pre class="notranslate"><code class="notranslate">index.php
</code></pre></div>
<p dir="auto">So what about environments?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="config/app.yml"><pre class="notranslate"><code class="notranslate">config/app.yml
</code></pre></div>
<p dir="auto">What would be in it?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="app
environments: ['local'=>'local.domain', 'dev'=>'dev.mysite']"><pre class="notranslate"><code class="notranslate">app
environments: ['local'=>'local.domain', 'dev'=>'dev.mysite']
</code></pre></div>
<hr>
<p dir="auto">Then I propose an environment detection that loops trough the array in the app config<br>
and loads the right config files, ONLY if they are present. Else they will fall back to default.</p>
<p dir="auto">So.. how would that look like? Folder structure:<br>
The current situation and the default config file for persistence info:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="config/database.yml"><pre class="notranslate"><code class="notranslate">config/database.yml
</code></pre></div>
<p dir="auto">Then if I would like to have a different config for dev:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="config/dev/database.yml"><pre class="notranslate"><code class="notranslate">config/dev/database.yml
</code></pre></div>
<p dir="auto">This will override only the differences. For example.. the password or db user</p>
<p dir="auto">Then if I would like to have a different config for staging:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="config/staging/database.yml"><pre class="notranslate"><code class="notranslate">config/staging/database.yml
</code></pre></div>
<p dir="auto">Great!</p> | 0 |
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Minor ticklabels are missing at positions of major ticks.</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 numpy as np
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
t = np.arange("2018-11-03", "2018-11-06", dtype="datetime64")
x = np.random.rand(len(t))
fig, ax = plt.subplots()
ax.plot(t,x)
ax.xaxis.set_major_locator(mdates.DayLocator())
ax.xaxis.set_major_formatter(mdates.DateFormatter('\n%a'))
ax.xaxis.set_minor_locator(mdates.HourLocator((0,6,12,18)))
ax.xaxis.set_minor_formatter(mdates.DateFormatter('%H:%M'))
plt.show()"><pre class="notranslate"><code class="notranslate">import numpy as np
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
t = np.arange("2018-11-03", "2018-11-06", dtype="datetime64")
x = np.random.rand(len(t))
fig, ax = plt.subplots()
ax.plot(t,x)
ax.xaxis.set_major_locator(mdates.DayLocator())
ax.xaxis.set_major_formatter(mdates.DateFormatter('\n%a'))
ax.xaxis.set_minor_locator(mdates.HourLocator((0,6,12,18)))
ax.xaxis.set_minor_formatter(mdates.DateFormatter('%H:%M'))
plt.show()
</code></pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<p dir="auto">The above code run with current master produces</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/23121882/53986707-332eaf80-411f-11e9-9d0b-4d1df4bae02a.png"><img src="https://user-images.githubusercontent.com/23121882/53986707-332eaf80-411f-11e9-9d0b-4d1df4bae02a.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">The minor ticklabels showing the <code class="notranslate">00:00</code> hours are missing.</p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">The expected outcome would be the same as when running the code with matplotlib 3.0.2 or below:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/23121882/53986815-7b4dd200-411f-11e9-84d2-e820792bf6ce.png"><img src="https://user-images.githubusercontent.com/23121882/53986815-7b4dd200-411f-11e9-84d2-e820792bf6ce.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I would expect to see the hours throughout.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Win8</li>
<li>Matplotlib version: master</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): any</li>
<li>Python version: 3.6</li>
</ul> | <h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Images plotted by plt.imshow are always clipped, reglardless of the clip_on argument.</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
from matplotlib.cbook import get_sample_data
fig = plt.figure(figsize=(10,5))
ax = plt.subplot(111)
plt.subplots_adjust(left=0.25, bottom=0.1, right=0.75, top=0.9, wspace=0, hspace=0)
# plot a line. When clip_on is set to False, the line is extended beyond the axes
ax.plot(np.linspace(0,2),np.sin(np.linspace(0,2)),clip_on=False)
plt.xlim([0,1])
plt.ylim([0,1])
# plot a bitmap. Although clip_on is set to False, it is clipped by the axes
logo = plt.imread(get_sample_data("logo2.png", asfileobj=False))
left,right, bottom, top=0.25,0.25+1.12,0.25,0.25+0.24
ax.imshow(X=logo,extent=(left, right, bottom, top),clip_on=False)"><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-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">cbook</span> <span class="pl-k">import</span> <span class="pl-s1">get_sample_data</span>
<span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">10</span>,<span class="pl-c1">5</span>))
<span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">111</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">subplots_adjust</span>(<span class="pl-s1">left</span><span class="pl-c1">=</span><span class="pl-c1">0.25</span>, <span class="pl-s1">bottom</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>, <span class="pl-s1">right</span><span class="pl-c1">=</span><span class="pl-c1">0.75</span>, <span class="pl-s1">top</span><span class="pl-c1">=</span><span class="pl-c1">0.9</span>, <span class="pl-s1">wspace</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">hspace</span><span class="pl-c1">=</span><span class="pl-c1">0</span>)
<span class="pl-c"># plot a line. When clip_on is set to False, the line is extended beyond the axes</span>
<span class="pl-s1">ax</span>.<span class="pl-en">plot</span>(<span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>,<span class="pl-c1">2</span>),<span class="pl-s1">np</span>.<span class="pl-en">sin</span>(<span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>,<span class="pl-c1">2</span>)),<span class="pl-s1">clip_on</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">xlim</span>([<span class="pl-c1">0</span>,<span class="pl-c1">1</span>])
<span class="pl-s1">plt</span>.<span class="pl-en">ylim</span>([<span class="pl-c1">0</span>,<span class="pl-c1">1</span>])
<span class="pl-c"># plot a bitmap. Although clip_on is set to False, it is clipped by the axes</span>
<span class="pl-s1">logo</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">imread</span>(<span class="pl-en">get_sample_data</span>(<span class="pl-s">"logo2.png"</span>, <span class="pl-s1">asfileobj</span><span class="pl-c1">=</span><span class="pl-c1">False</span>))
<span class="pl-s1">left</span>,<span class="pl-s1">right</span>, <span class="pl-s1">bottom</span>, <span class="pl-s1">top</span><span class="pl-c1">=</span><span class="pl-c1">0.25</span>,<span class="pl-c1">0.25</span><span class="pl-c1">+</span><span class="pl-c1">1.12</span>,<span class="pl-c1">0.25</span>,<span class="pl-c1">0.25</span><span class="pl-c1">+</span><span class="pl-c1">0.24</span>
<span class="pl-s1">ax</span>.<span class="pl-en">imshow</span>(<span class="pl-v">X</span><span class="pl-c1">=</span><span class="pl-s1">logo</span>,<span class="pl-s1">extent</span><span class="pl-c1">=</span>(<span class="pl-s1">left</span>, <span class="pl-s1">right</span>, <span class="pl-s1">bottom</span>, <span class="pl-s1">top</span>),<span class="pl-s1">clip_on</span><span class="pl-c1">=</span><span class="pl-c1">False</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/10431558/67646282-bf3a5500-f903-11e9-8713-1305721de741.png"><img src="https://user-images.githubusercontent.com/10431558/67646282-bf3a5500-f903-11e9-8713-1305721de741.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong><br>
The matplotlib logo shouldn't be clipped by the axes, since clip_on was set to False.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Ubuntu 18.04</li>
<li>Matplotlib version: : 3.1.1 (pip installation)</li>
<li>Matplotlib backend: Qt5Agg</li>
<li>Python version: 3.6</li>
</ul> | 0 |
<p dir="auto">when the batch size is 1024, my model work fine, but when I change it to 1025, it throw error</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="RuntimeError: CUDNN_STATUS_NOT_SUPPORTED"><pre class="notranslate"><span class="pl-v">RuntimeError</span>: <span class="pl-v">CUDNN_STATUS_NOT_SUPPORTED</span></pre></div>
<p dir="auto">this is how I load data:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="val_dataloader=t.utils.data.DataLoader(val_dataset,1025,True,num_workers=8,\
collate_fn=my_collate)"><pre class="notranslate"><span class="pl-s1">val_dataloader</span><span class="pl-c1">=</span><span class="pl-s1">t</span>.<span class="pl-s1">utils</span>.<span class="pl-s1">data</span>.<span class="pl-v">DataLoader</span>(<span class="pl-s1">val_dataset</span>,<span class="pl-c1">1025</span>,<span class="pl-c1">True</span>,<span class="pl-s1">num_workers</span><span class="pl-c1">=</span><span class="pl-c1">8</span>,\
<span class="pl-s1">collate_fn</span><span class="pl-c1">=</span><span class="pl-s1">my_collate</span>)</pre></div>
<p dir="auto">the full trace is here:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<ipython-input-4-91b240474ca9> in forward(self, input)
21 self.model.add_module('conv5',nn.Conv2d(opt.ndf*8,1,4,1,0,bias=False))
22 def forward(self,input):
---> 23 return self.model(input)
24 gpuids=None
25 if self.ngpu:
/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.pyc in __call__(self, *input, **kwargs)
208
209 def __call__(self, *input, **kwargs):
--> 210 result = self.forward(*input, **kwargs)
211 for hook in self._forward_hooks.values():
212 hook_result = hook(self, input, result)
/usr/local/lib/python2.7/dist-packages/torch/nn/modules/container.pyc in forward(self, input)
61 def forward(self, input):
62 for module in self._modules.values():
---> 63 input = module(input)
64 return input
/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.pyc in __call__(self, *input, **kwargs)
208
209 def __call__(self, *input, **kwargs):
--> 210 result = self.forward(*input, **kwargs)
211 for hook in self._forward_hooks.values():
212 hook_result = hook(self, input, result)
/usr/local/lib/python2.7/dist-packages/torch/nn/modules/batchnorm.pyc in forward(self, input)
41 return F.batch_norm(
42 input, self.running_mean, self.running_var, self.weight, self.bias,
---> 43 self.training, self.momentum, self.eps)
44
45 def __repr__(self):
/usr/local/lib/python2.7/dist-packages/torch/nn/functional.pyc in batch_norm(input, running_mean, running_var, weight, bias, training, momentum, eps)
483 state = _functions.batchnorm.BatchNorm(
484 running_mean, running_var, training, momentum, eps)
--> 485 return weight and state(input, weight, bias) or state(input)
486
487
/usr/local/lib/python2.7/dist-packages/torch/nn/_functions/batchnorm.pyc in forward(self, input, weight, bias)
34 input, output, weight, bias,
35 self.running_mean, self.running_var, self._save_mean,
---> 36 self._save_std, self.training, self.momentum, self.eps)
37 else:
38 backend = type2backend[type(input)]
RuntimeError: CUDNN_STATUS_NOT_SUPPORTED
"><pre class="notranslate"><span class="pl-c1"><</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">91</span><span class="pl-s1">b240474ca9</span><span class="pl-c1">></span> <span class="pl-s1">in</span> <span class="pl-en">forward</span>(<span class="pl-s1">self</span>, <span class="pl-s1">input</span>)
<span class="pl-c1">21</span> <span class="pl-s1">self</span>.<span class="pl-s1">model</span>.<span class="pl-en">add_module</span>(<span class="pl-s">'conv5'</span>,<span class="pl-s1">nn</span>.<span class="pl-v">Conv2d</span>(<span class="pl-s1">opt</span>.<span class="pl-s1">ndf</span><span class="pl-c1">*</span><span class="pl-c1">8</span>,<span class="pl-c1">1</span>,<span class="pl-c1">4</span>,<span class="pl-c1">1</span>,<span class="pl-c1">0</span>,<span class="pl-s1">bias</span><span class="pl-c1">=</span><span class="pl-c1">False</span>))
<span class="pl-c1">22</span> <span class="pl-k">def</span> <span class="pl-en">forward</span>(<span class="pl-s1">self</span>,<span class="pl-s1">input</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">23</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">model</span>(<span class="pl-s1">input</span>)
<span class="pl-c1">24</span> <span class="pl-s1">gpuids</span><span class="pl-c1">=</span><span class="pl-c1">None</span>
<span class="pl-c1">25</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">ngpu</span>:
<span class="pl-c1">/</span><span class="pl-s1">usr</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">nn</span><span class="pl-c1">/</span><span class="pl-s1">modules</span><span class="pl-c1">/</span><span class="pl-s1">module</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-c1">*</span><span class="pl-s1">input</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">208</span>
<span class="pl-c1">209</span> <span class="pl-k">def</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-c1">*</span><span class="pl-s1">input</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>):
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">210</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">forward</span>(<span class="pl-c1">*</span><span class="pl-s1">input</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">211</span> <span class="pl-s1">for</span> <span class="pl-s1">hook</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-s1">_forward_hooks</span>.<span class="pl-en">values</span>():
<span class="pl-c1">212</span> <span class="pl-s1">hook_result</span> <span class="pl-c1">=</span> <span class="pl-en">hook</span>(<span class="pl-s1">self</span>, <span class="pl-s1">input</span>, <span class="pl-s1">result</span>)
<span class="pl-c1">/</span><span class="pl-s1">usr</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">nn</span><span class="pl-c1">/</span><span class="pl-s1">modules</span><span class="pl-c1">/</span><span class="pl-s1">container</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">forward</span>(<span class="pl-s1">self</span>, <span class="pl-s1">input</span>)
<span class="pl-c1">61</span> <span class="pl-s1">def</span> <span class="pl-en">forward</span>(<span class="pl-s1">self</span>, <span class="pl-s1">input</span>):
<span class="pl-c1">62</span> <span class="pl-s1">for</span> <span class="pl-s1">module</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-s1">_modules</span>.<span class="pl-en">values</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">63</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-en">module</span>(<span class="pl-s1">input</span>)
<span class="pl-c1">64</span> <span class="pl-s1">return</span> <span class="pl-s1">input</span>
<span class="pl-c1">/</span><span class="pl-s1">usr</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">nn</span><span class="pl-c1">/</span><span class="pl-s1">modules</span><span class="pl-c1">/</span><span class="pl-s1">module</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-c1">*</span><span class="pl-s1">input</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">208</span>
<span class="pl-c1">209</span> <span class="pl-k">def</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-c1">*</span><span class="pl-s1">input</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>):
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">210</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">forward</span>(<span class="pl-c1">*</span><span class="pl-s1">input</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
<span class="pl-c1">211</span> <span class="pl-s1">for</span> <span class="pl-s1">hook</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-s1">_forward_hooks</span>.<span class="pl-en">values</span>():
<span class="pl-c1">212</span> <span class="pl-s1">hook_result</span> <span class="pl-c1">=</span> <span class="pl-en">hook</span>(<span class="pl-s1">self</span>, <span class="pl-s1">input</span>, <span class="pl-s1">result</span>)
<span class="pl-c1">/</span><span class="pl-s1">usr</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">nn</span><span class="pl-c1">/</span><span class="pl-s1">modules</span><span class="pl-c1">/</span><span class="pl-s1">batchnorm</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">forward</span>(<span class="pl-s1">self</span>, <span class="pl-s1">input</span>)
<span class="pl-c1">41</span> <span class="pl-s1">return</span> <span class="pl-v">F</span>.<span class="pl-en">batch_norm</span>(
<span class="pl-c1">42</span> <span class="pl-s1">input</span>, <span class="pl-s1">self</span>.<span class="pl-s1">running_mean</span>, <span class="pl-s1">self</span>.<span class="pl-s1">running_var</span>, <span class="pl-s1">self</span>.<span class="pl-s1">weight</span>, <span class="pl-s1">self</span>.<span class="pl-s1">bias</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">43</span> <span class="pl-s1">self</span>.<span class="pl-s1">training</span>, <span class="pl-s1">self</span>.<span class="pl-s1">momentum</span>, <span class="pl-s1">self</span>.<span class="pl-s1">eps</span>)
<span class="pl-c1">44</span>
<span class="pl-c1">45</span> <span class="pl-s1">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>):
<span class="pl-c1">/</span><span class="pl-s1">usr</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">nn</span><span class="pl-c1">/</span><span class="pl-s1">functional</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">batch_norm</span>(<span class="pl-s1">input</span>, <span class="pl-s1">running_mean</span>, <span class="pl-s1">running_var</span>, <span class="pl-s1">weight</span>, <span class="pl-s1">bias</span>, <span class="pl-s1">training</span>, <span class="pl-s1">momentum</span>, <span class="pl-s1">eps</span>)
<span class="pl-c1">483</span> <span class="pl-s1">state</span> <span class="pl-c1">=</span> <span class="pl-s1">_functions</span>.<span class="pl-s1">batchnorm</span>.<span class="pl-v">BatchNorm</span>(
<span class="pl-c1">484</span> <span class="pl-s1">running_mean</span>, <span class="pl-s1">running_var</span>, <span class="pl-s1">training</span>, <span class="pl-s1">momentum</span>, <span class="pl-s1">eps</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">485</span> <span class="pl-s1">return</span> <span class="pl-s1">weight</span> <span class="pl-c1">and</span> <span class="pl-en">state</span>(<span class="pl-s1">input</span>, <span class="pl-s1">weight</span>, <span class="pl-s1">bias</span>) <span class="pl-c1">or</span> <span class="pl-en">state</span>(<span class="pl-s1">input</span>)
<span class="pl-c1">486</span>
<span class="pl-c1">487</span>
<span class="pl-c1">/</span><span class="pl-s1">usr</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">nn</span><span class="pl-c1">/</span><span class="pl-s1">_functions</span><span class="pl-c1">/</span><span class="pl-s1">batchnorm</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">forward</span>(<span class="pl-s1">self</span>, <span class="pl-s1">input</span>, <span class="pl-s1">weight</span>, <span class="pl-s1">bias</span>)
<span class="pl-c1">34</span> <span class="pl-s1">input</span>, <span class="pl-s1">output</span>, <span class="pl-s1">weight</span>, <span class="pl-s1">bias</span>,
<span class="pl-c1">35</span> <span class="pl-s1">self</span>.<span class="pl-s1">running_mean</span>, <span class="pl-s1">self</span>.<span class="pl-s1">running_var</span>, <span class="pl-s1">self</span>.<span class="pl-s1">_save_mean</span>,
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-></span> <span class="pl-c1">36</span> <span class="pl-s1">self</span>.<span class="pl-s1">_save_std</span>, <span class="pl-s1">self</span>.<span class="pl-s1">training</span>, <span class="pl-s1">self</span>.<span class="pl-s1">momentum</span>, <span class="pl-s1">self</span>.<span class="pl-s1">eps</span>)
<span class="pl-c1">37</span> <span class="pl-k">else</span>:
<span class="pl-c1">38</span> <span class="pl-s1">backend</span> <span class="pl-c1">=</span> <span class="pl-s1">type2backend</span>[<span class="pl-en">type</span>(<span class="pl-s1">input</span>)]
<span class="pl-v">RuntimeError</span>: <span class="pl-v">CUDNN_STATUS_NOT_SUPPORTED</span></pre></div> | <p dir="auto">Fatal CUDNN_NOT_SUPPORTED error. Reported by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/namdar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/namdar">@namdar</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import torch
import torch.nn as nn
from torch.autograd import Variable
class TestModel(nn.Module):
def __init__(self,inp_size):
super(TestModel, self).__init__()
self.encoder = nn.Sequential(
nn.Linear(inp_size, 200),
nn.BatchNorm1d(200),
)
def forward(self, x):
x = self.encoder(x)
return x
batch_size = 10000
inp_size = 1
x = Variable(torch.randn(batch_size,inp_size)).cuda()
m = TestModel(inp_size)
m.cuda()
out = m(x)
print(out.size())
m.eval()
out2 = m(x)"><pre class="notranslate"><code class="notranslate">import torch
import torch.nn as nn
from torch.autograd import Variable
class TestModel(nn.Module):
def __init__(self,inp_size):
super(TestModel, self).__init__()
self.encoder = nn.Sequential(
nn.Linear(inp_size, 200),
nn.BatchNorm1d(200),
)
def forward(self, x):
x = self.encoder(x)
return x
batch_size = 10000
inp_size = 1
x = Variable(torch.randn(batch_size,inp_size)).cuda()
m = TestModel(inp_size)
m.cuda()
out = m(x)
print(out.size())
m.eval()
out2 = m(x)
</code></pre></div> | 1 |
<p dir="auto">Hi all,</p>
<p dir="auto">If there's something that bothers us is to create form to fill out polymorphic objects. Normally, when you have a polymorphic object, you first need to know the type and then build the form. Currently, there is no an elegant way to do this trick. You may create multiple embedded forms, or use two actions and do it in two steps. You also may use events to dinamically "merge" the form, but all events and options of the other form will be lost (for instance, if the CarType is set to cascade validation, and the TruckType is not, how can you solve it using events?), besides others drawbacks. Later, when you want to edit the object, you have another "problem": check the type of object and then instantiate the correct form. Of course, you can create a service, but would be very nice if this job was made by the factory automatically.</p>
<p dir="auto">After a long time thinking about, I think that the following pseudocode may be a good approach:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Vehicle
{
public $model;
}
class Car extends Vehicle {}
class Truck extends Vehicle {}
abstract class VehicleType extends AbstractType {}
class CartType extends VehicleType {}
// 'data_class' => 'Acme\Bundle\VehicleBundle\Entity\Car'
class TruckType extends VehicleType {}
// 'data_class' => 'Acme\Bundle\VehicleBundle\Entity\Truck'
class MotocycleType extends VehicleType {}
// 'data_class' => 'Acme\Bundle\VehicleBundle\Entity\Motocycle'
class VehicleBuilderType extends VehicleType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('type', 'choice', array(
'choices' => $options['inheritance_map'],
));
// The model field ($vehicle->model) will be displayed on the first stage of the form (type selection) and will fill the field of the inherited form on bind
parent::buildForm($builder, $options);
}
public function getDefaultOptions(array $options)
{
return array(
'inheritance' => true,
'inheritance_discriminator' => 'type',
'inheritance_map' => array(
'car' => 'cart_type',
'truck' => 'truck_type',
'motocycle' => 'motocycle_type',
));
}
}
public function actionCreate()
{
$form = $factory->create('vehicle_type');
if ($request->isMethod('POST')) {
$form->bind($request); // array('type' => 'car', 'wheels' => 4);
echo get_class($form->getData()); // prints Acme\Bundle\VehicleBundle\Entity\Car
}
}
public function actionEdit($id)
{
$vehicle = new Car(); // load from database...
$form = $factory->create('vehicle_type', $vehicle);
echo get_class($form); // prints Acme\Bundle\VehicleBundle\Form\CarType
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Vehicle</span>
{
<span class="pl-k">public</span> <span class="pl-c1"><span class="pl-c1">$</span>model</span>;
}
<span class="pl-k">class</span> <span class="pl-v">Car</span> <span class="pl-k">extends</span> <span class="pl-v">Vehicle</span> {}
<span class="pl-k">class</span> <span class="pl-v">Truck</span> <span class="pl-k">extends</span> <span class="pl-v">Vehicle</span> {}
<span class="pl-k">abstract</span> <span class="pl-k">class</span> <span class="pl-v">VehicleType</span> <span class="pl-k">extends</span> <span class="pl-v">AbstractType</span> {}
<span class="pl-k">class</span> <span class="pl-v">CartType</span> <span class="pl-k">extends</span> <span class="pl-v">VehicleType</span> {}
<span class="pl-c">// 'data_class' => 'Acme\Bundle\VehicleBundle\Entity\Car'</span>
<span class="pl-k">class</span> <span class="pl-v">TruckType</span> <span class="pl-k">extends</span> <span class="pl-v">VehicleType</span> {}
<span class="pl-c">// 'data_class' => 'Acme\Bundle\VehicleBundle\Entity\Truck'</span>
<span class="pl-k">class</span> <span class="pl-v">MotocycleType</span> <span class="pl-k">extends</span> <span class="pl-v">VehicleType</span> {}
<span class="pl-c">// 'data_class' => 'Acme\Bundle\VehicleBundle\Entity\Motocycle'</span>
<span class="pl-k">class</span> <span class="pl-v">VehicleBuilderType</span> <span class="pl-k">extends</span> <span class="pl-v">VehicleType</span>
{
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">buildForm</span>(<span class="pl-smi"><span class="pl-smi">FormBuilderInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>builder</span>, <span class="pl-smi">array</span> <span class="pl-s1"><span class="pl-c1">$</span>options</span>)
{
<span class="pl-s1"><span class="pl-c1">$</span>builder</span>-><span class="pl-en">add</span>(<span class="pl-s">'type'</span>, <span class="pl-s">'choice'</span>, <span class="pl-en">array</span>(
<span class="pl-s">'choices'</span> => <span class="pl-s1"><span class="pl-c1">$</span>options</span>[<span class="pl-s">'inheritance_map'</span>],
));
<span class="pl-c">// The model field ($vehicle->model) will be displayed on the first stage of the form (type selection) and will fill the field of the inherited form on bind</span>
<span class="pl-smi">parent</span>::<span class="pl-en">buildForm</span>(<span class="pl-s1"><span class="pl-c1">$</span>builder</span>, <span class="pl-s1"><span class="pl-c1">$</span>options</span>);
}
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">getDefaultOptions</span>(<span class="pl-smi">array</span> <span class="pl-s1"><span class="pl-c1">$</span>options</span>)
{
<span class="pl-k">return</span> <span class="pl-en">array</span>(
<span class="pl-s">'inheritance'</span> => <span class="pl-c1">true</span>,
<span class="pl-s">'inheritance_discriminator'</span> => <span class="pl-s">'type'</span>,
<span class="pl-s">'inheritance_map'</span> => <span class="pl-en">array</span>(
<span class="pl-s">'car'</span> => <span class="pl-s">'cart_type'</span>,
<span class="pl-s">'truck'</span> => <span class="pl-s">'truck_type'</span>,
<span class="pl-s">'motocycle'</span> => <span class="pl-s">'motocycle_type'</span>,
));
}
}
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">actionCreate</span>()
{
<span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">create</span>(<span class="pl-s">'vehicle_type'</span>);
<span class="pl-k">if</span> (<span class="pl-s1"><span class="pl-c1">$</span>request</span>-><span class="pl-en">isMethod</span>(<span class="pl-s">'POST'</span>)) {
<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">bind</span>(<span class="pl-s1"><span class="pl-c1">$</span>request</span>); <span class="pl-c">// array('type' => 'car', 'wheels' => 4);</span>
<span class="pl-k">echo</span> get_class(<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">getData</span>()); <span class="pl-c">// prints Acme\Bundle\VehicleBundle\Entity\Car</span>
}
}
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">actionEdit</span>(<span class="pl-s1"><span class="pl-c1">$</span>id</span>)
{
<span class="pl-s1"><span class="pl-c1">$</span>vehicle</span> = <span class="pl-k">new</span> <span class="pl-v">Car</span>(); <span class="pl-c">// load from database...</span>
<span class="pl-s1"><span class="pl-c1">$</span>form</span> = <span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">create</span>(<span class="pl-s">'vehicle_type'</span>, <span class="pl-s1"><span class="pl-c1">$</span>vehicle</span>);
<span class="pl-k">echo</span> get_class(<span class="pl-s1"><span class="pl-c1">$</span>form</span>); <span class="pl-c">// prints Acme\Bundle\VehicleBundle\Form\CarType</span>
}</pre></div>
<p dir="auto">For now, a quickly solution may be a data_class based class guessing in the FormFactory :</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$factory->createForData(new Car()); // returns a CarType "><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>factory</span>-><span class="pl-en">createForData</span>(<span class="pl-k">new</span> <span class="pl-v">Car</span>()); <span class="pl-c">// returns a CarType </span></pre></div>
<p dir="auto">What you think?</p> | <p dir="auto">We long have the problem of creating fields that depend on the value of other fields now. See also:</p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3948579" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/3767" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/3767/hovercard" href="https://github.com/symfony/symfony/issues/3767">#3767</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3954416" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/3768" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/3768/hovercard" href="https://github.com/symfony/symfony/pull/3768">#3768</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="4993683" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/4548" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/4548/hovercard" href="https://github.com/symfony/symfony/pull/4548">#4548</a></li>
</ul>
<p dir="auto">I want to propose a solution that seems feasible from my current point of view.</p>
<p dir="auto">Currently, I can think of two different APIs:</p>
<h5 dir="auto">API 1</h5>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
$builder->addIf(function (FormInterface $form) {
return $form->get('field1')->getData() >= 1
&& !$form->get('field2')->getData();
}, 'myfield', 'text');
$builder->addUnless(function (FormInterface $form) {
return $form->get('field1')->getData() < 1
|| $form->get('field2')->getData();
}, 'myfield', 'text');"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-s1"><span class="pl-c1">$</span>builder</span>-><span class="pl-en">addIf</span>(<span class="pl-k">function</span> (<span class="pl-smi"><span class="pl-smi">FormInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>) {
<span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field1'</span>)-><span class="pl-en">getData</span>() >= <span class="pl-c1">1</span>
&& !<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field2'</span>)-><span class="pl-en">getData</span>();
}, <span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>);
<span class="pl-s1"><span class="pl-c1">$</span>builder</span>-><span class="pl-en">addUnless</span>(<span class="pl-k">function</span> (<span class="pl-smi"><span class="pl-smi">FormInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>) {
<span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field1'</span>)-><span class="pl-en">getData</span>() < <span class="pl-c1">1</span>
|| <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field2'</span>)-><span class="pl-en">getData</span>();
}, <span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>);</pre></div>
<h5 dir="auto">API 2</h5>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
$builder
->_if(function (FormInterface $form) {
return $form->get('field1')->getData() >= 1
&& !$form->get('field2')->getData();
})
->add('myfield', 'text')
->add('myotherfield', 'text')
->_endif()
;
$builder
->_switch(function (FormInterface $form) {
return $form->get('field1')->getData();
})
->_case('foo')
->_case('bar')
->add('myfield', 'text', array('foo' => 'bar'))
->add('myotherfield', 'text')
->_case('baz')
->add('myfield', 'text', array('foo' => 'baz'))
->_default()
->add('myfield', 'text')
->_endswitch()
;"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-s1"><span class="pl-c1">$</span>builder</span>
-><span class="pl-en">_if</span>(<span class="pl-k">function</span> (<span class="pl-smi"><span class="pl-smi">FormInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>) {
<span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field1'</span>)-><span class="pl-en">getData</span>() >= <span class="pl-c1">1</span>
&& !<span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field2'</span>)-><span class="pl-en">getData</span>();
})
-><span class="pl-en">add</span>(<span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>)
-><span class="pl-en">add</span>(<span class="pl-s">'myotherfield'</span>, <span class="pl-s">'text'</span>)
-><span class="pl-en">_endif</span>()
;
<span class="pl-s1"><span class="pl-c1">$</span>builder</span>
-><span class="pl-en">_switch</span>(<span class="pl-k">function</span> (<span class="pl-smi"><span class="pl-smi">FormInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>) {
<span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>form</span>-><span class="pl-en">get</span>(<span class="pl-s">'field1'</span>)-><span class="pl-en">getData</span>();
})
-><span class="pl-en">_case</span>(<span class="pl-s">'foo'</span>)
-><span class="pl-en">_case</span>(<span class="pl-s">'bar'</span>)
-><span class="pl-en">add</span>(<span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>, <span class="pl-en">array</span>(<span class="pl-s">'foo'</span> => <span class="pl-s">'bar'</span>))
-><span class="pl-en">add</span>(<span class="pl-s">'myotherfield'</span>, <span class="pl-s">'text'</span>)
-><span class="pl-en">_case</span>(<span class="pl-s">'baz'</span>)
-><span class="pl-en">add</span>(<span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>, <span class="pl-en">array</span>(<span class="pl-s">'foo'</span> => <span class="pl-s">'baz'</span>))
-><span class="pl-en">_default</span>()
-><span class="pl-en">add</span>(<span class="pl-s">'myfield'</span>, <span class="pl-s">'text'</span>)
-><span class="pl-en">_endswitch</span>()
;</pre></div>
<p dir="auto">The second API obviously is a lot more expressive, but also a bit more complicated than the first one.</p>
<p dir="auto">Please give me your opinions on what API you prefer or whether you can think of further limitations in these APIs.</p>
<h5 dir="auto">Implementation</h5>
<p dir="auto">The issue of creating dependencies between fields can be solved by a lazy dependency resolution graph like in the OptionsResolver.</p>
<p dir="auto">During form prepopulation, the conditions are invoked with a <code class="notranslate">FormPrepopulator</code> object implementing <code class="notranslate">FormInterface</code>. When <code class="notranslate">FormPrepopulator::get('field')</code> is called, "field" is prepopulated. If "field" is also dependent on some condition, that condition will be evaluated now in order to construct "field". After evaluating the condition, fields are added or removed accordingly.</p>
<p dir="auto">During form binding, the conditions are invoked with a <code class="notranslate">FormBinder</code> object, that also implements <code class="notranslate">FormInterface</code>. This object works like <code class="notranslate">FormPrepopulator</code>, only that it binds the fields instead of filling them with default data.</p>
<p dir="auto">In both cases, circular dependencies can be detected and reported.</p> | 1 |
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong><br>
Prior to Windows 10, it wasn't possible to use more than one piece of software simultaneously connected to a MIDI device, for example a DAW and a MIDI device editor program. Windows 10 has a new MIDI API that developers can use which allows multiple pieces of software to simultaneously connect to a MIDI device, macOS has always allowed this...The only snag in this new Windows API is that all software needs to be using the new API for it to work, so both DAW and Editor need to use it.<br>
This can be enabled in a browser, which supports the Web MIDI API, via chrome:flags</p>
<p dir="auto"><strong>Describe the solution you'd like</strong><br>
Since this has been supported in Chrome for a few years now, it would be great to add support for this flag as well in Electron.</p>
<p dir="auto"><strong>Describe alternatives you've considered</strong><br>
There doesn't appear to be an alternative solution using Electron</p>
<p dir="auto"><strong>Additional context</strong><br>
The flag is: <code class="notranslate">use-winrt-midi-api</code><br>
set to enabled:<br>
<code class="notranslate">app.commandLine.appendSwitch('use-winrt-midi-api', 'enabled')</code></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 <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.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">12.0.6</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">11.2.3</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"><em>No response</em></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">React and Redux Devtools load and are functionally connected to application.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">With <code class="notranslate">app.commandLine.appendSwitch('disable-site-isolation-trials');</code> the application loads and the tabs for React and Redux DevTools appear as expected. However the React Components tab in DevTools is empty and the Redux tab in DevTools says "No store found". Additionally, the error below appears in the console. Removing the disable-site-isolation-trials switch fixes the issue.</p>
<p dir="auto"><code class="notranslate">[12334:0506/163419.330578:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.", source: chrome-extension://omcdjfajiojhldgojnbbiohlcbkcbane/main.html</code></p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">It's possible this is related: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="752153232" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/26714" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/26714/hovercard" href="https://github.com/electron/electron/issues/26714">#26714</a></p> | 0 |
<p dir="auto">I put up a gist at <a href="https://gist.github.com/felipenoris/3dbd7ff6a830be372e45dc337bb204cf">https://gist.github.com/felipenoris/3dbd7ff6a830be372e45dc337bb204cf</a> with the slow code.</p>
<p dir="auto">Once julia reaches line 19:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for usecache in [ false, true ]"><pre class="notranslate"><span class="pl-k">for</span> usecache <span class="pl-k">in</span> [ <span class="pl-c1">false</span>, <span class="pl-c1">true</span> ]</pre></div>
<p dir="auto">it takes a long time to start executing what´s inside the <code class="notranslate">for</code> loop.</p>
<p dir="auto">If I just unroll the loop (see <a href="https://gist.github.com/felipenoris/d9ba8d9ee5b116d259a6de3189418055">https://gist.github.com/felipenoris/d9ba8d9ee5b116d259a6de3189418055</a>), it runs smoothly, just like 0.4 does.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="174884102" data-permission-text="Title is private" data-url="https://github.com/JuliaFinance/BusinessDays.jl/issues/4" data-hovercard-type="issue" data-hovercard-url="/JuliaFinance/BusinessDays.jl/issues/4/hovercard" href="https://github.com/JuliaFinance/BusinessDays.jl/issues/4">JuliaFinance/BusinessDays.jl#4</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="173748119" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/18276" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/18276/hovercard" href="https://github.com/JuliaLang/julia/pull/18276">#18276</a></p> | <p dir="auto">The time to run N tests using <code class="notranslate">FactCheck</code> (which internally uses anonymous functions heavily) grows significantly faster than linear in N, causing long generated test suites to hang.<br>
This apparently is due to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="109391246" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/13412" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/13412/hovercard" href="https://github.com/JuliaLang/julia/pull/13412">#13412</a> (tested with that commit compared to the previous one; thanks to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/andreasnoack/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/andreasnoack">@andreasnoack</a>). It is approximately linear on 0.4.</p>
<p dir="auto">I have written a simple <a href="https://gist.github.com/52b6599f6549c390b0e9">file</a> that generates test suites consisting of N tests of the form <code class="notranslate">@fact i-->i</code>:</p>
<p dir="auto">This gives the following run-times (in seconds!) on 0.5:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/191822/13510074/ee182edc-e15c-11e5-81d1-af1c7096df58.png"><img src="https://cloud.githubusercontent.com/assets/191822/13510074/ee182edc-e15c-11e5-81d1-af1c7096df58.png" alt="0 5_test_times" style="max-width: 100%;"></a></p>
<p dir="auto">[This seems to be faster than power law and slower than exponential growth. Raw data <a href="https://gist.github.com/b26507550931e9a3d1d2">here</a>.]</p> | 1 |
<ul dir="auto">
<li>vscode express smoke test repo</li>
<li>ctrl + shift + B, ctrl + shit + M</li>
<li>click on one of the errors to navigate to</li>
<li>get an error, event though routes/index.js exists</li>
</ul>
<p dir="auto">Though this seems to work in the vscode repo nicely</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1926584/13357243/b0a36c04-dca9-11e5-9e20-26eaf3f36fab.png"><img src="https://cloud.githubusercontent.com/assets/1926584/13357243/b0a36c04-dca9-11e5-9e20-26eaf3f36fab.png" alt="screen shot 2016-02-26 at 16 54 34" style="max-width: 100%;"></a></p> | <p dir="auto">Testing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="132382915" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/2832" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/2832/hovercard" href="https://github.com/microsoft/vscode/issues/2832">#2832</a></p>
<p dir="auto"><code class="notranslate">Reapply all breakpoints</code> -- I haven't seen such an action in other debuggers. IMHO it is the debugger's job to apply my breakpoints, and exposing an action to reapply all breakpoints seems like a workaround for a bug inside the debugger.</p> | 0 |
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'dart:async';
import 'package:flutter/widgets.dart';
final GlobalKey _kKey = new GlobalKey();
Future main() async {
runApp(new Block(
children: new List<Widget>.generate(
3,
(_) => new Padding(
padding: const EdgeInsets.all(8.0),
child: new Container(
key: _kKey,
width: 100.0,
height: 100.0,
decoration: new BoxDecoration(
backgroundColor: new Color(0xFFFFFF00)))))));
}
"><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">'package:flutter/widgets.dart'</span>;
<span class="pl-k">final</span> <span class="pl-c1">GlobalKey</span> _kKey <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">GlobalKey</span>();
<span class="pl-c1">Future</span> <span class="pl-en">main</span>() <span class="pl-k">async</span> {
<span class="pl-en">runApp</span>(<span class="pl-k">new</span> <span class="pl-c1">Block</span>(
children<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">List</span><<span class="pl-c1">Widget</span>>.<span class="pl-en">generate</span>(
<span class="pl-c1">3</span>,
(_) <span class="pl-k">=></span> <span class="pl-k">new</span> <span class="pl-c1">Padding</span>(
padding<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">all</span>(<span class="pl-c1">8.0</span>),
child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Container</span>(
key<span class="pl-k">:</span> _kKey,
width<span class="pl-k">:</span> <span class="pl-c1">100.0</span>,
height<span class="pl-k">:</span> <span class="pl-c1">100.0</span>,
decoration<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">BoxDecoration</span>(
backgroundColor<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Color</span>(<span class="pl-c1">0xFFFFFF00</span>)))))));
}
</pre></div>
<p dir="auto">Assert:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="10:35:01.044: I/flutter : ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
10:35:01.055: I/flutter : The following assertion was thrown building RawGestureDetector([GlobalKey 273613476]; state:
10:35:01.058: I/flutter : RawGestureDetectorState(304216675; gestures: vertical drag; behavior: opaque)):
10:35:01.062: I/flutter : scheduleBuildFor() called for a widget for which a build was already scheduled.
10:35:01.065: I/flutter : The method was called for the following element:
10:35:01.068: I/flutter : DecoratedBox(dirty; renderObject: RenderDecoratedBox NEEDS-LAYOUT DETACHED)
10:35:01.072: I/flutter : The current dirty list consists of:
10:35:01.075: I/flutter : [DecoratedBox(dirty; renderObject: RenderDecoratedBox NEEDS-LAYOUT DETACHED)]
10:35:01.078: I/flutter : This usually indicates that a widget was rebuilt outside the build phase (thus marking the element
10:35:01.082: I/flutter : as clean even though it is still in the dirty list). This should not be possible and is probably
10:35:01.085: I/flutter : caused by a bug in the widgets framework. Please report it:
10:35:01.087: I/flutter : https://github.com/flutter/flutter/issues/new
10:35:01.090: I/flutter : To debug this issue, consider setting the debugPrintScheduleBuildForStacks and
10:35:01.093: I/flutter : debugPrintBuildDirtyElements flags to true and looking for a call to scheduleBuildFor for a widget
10:35:01.096: I/flutter : that is labeled "ALREADY IN LIST".
10:35:01.243: I/flutter :
10:35:01.247: I/flutter : When the exception was thrown, this was the stack:
10:35:01.272: I/flutter : #0 BuildOwner.scheduleBuildFor.<anonymous closure> (package:flutter/src/widgets/framework.dart:1531:9)
10:35:01.275: I/flutter : #2 BuildOwner.scheduleBuildFor (package:flutter/src/widgets/framework.dart:1527:12)
10:35:01.278: I/flutter : #3 BuildableElement.markNeedsBuild (package:flutter/src/widgets/framework.dart:2538:11)
10:35:01.282: I/flutter : #4 BuildableElement.dependenciesChanged (package:flutter/src/widgets/framework.dart:2584:5)
10:35:01.285: I/flutter : #5 BuildableElement.activate (package:flutter/src/widgets/framework.dart:2599:7)
10:35:01.289: I/flutter : #6 Element._activateRecursively (package:flutter/src/widgets/framework.dart:2194:13)
10:35:01.292: I/flutter : #7 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:3424:14)
10:35:01.295: I/flutter : #8 Element._activateRecursively (package:flutter/src/widgets/framework.dart:2196:13)
10:35:01.298: I/flutter : #9 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:2690:14)
10:35:01.301: I/flutter : #10 Element._activateRecursively (package:flutter/src/widgets/framework.dart:2196:13)
10:35:01.305: I/flutter : #11 Element._activateWithParent (package:flutter/src/widgets/framework.dart:2187:5)
10:35:01.307: I/flutter : #12 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2131:18)
10:35:01.310: I/flutter : #13 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.313: I/flutter : #14 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3436:14)
10:35:01.316: I/flutter : #15 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.319: I/flutter : #16 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3532:32)
10:35:01.322: I/flutter : #17 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.325: I/flutter : #18 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.327: I/flutter : #19 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3436:14)
10:35:01.330: I/flutter : #20 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.333: I/flutter : #21 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.336: I/flutter : #22 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3436:14)
10:35:01.339: I/flutter : #23 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.342: I/flutter : #24 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.346: I/flutter : #25 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3436:14)
10:35:01.349: I/flutter : #26 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.352: I/flutter : #27 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.355: I/flutter : #28 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3436:14)
10:35:01.358: I/flutter : #29 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.361: I/flutter : #30 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.364: I/flutter : #31 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:2678:16)
10:35:01.367: I/flutter : #32 BuildableElement.rebuild (package:flutter/src/widgets/framework.dart:2567:5)
10:35:01.370: I/flutter : #33 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:2652:5)
10:35:01.373: I/flutter : #34 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:2768:22)
10:35:01.376: I/flutter : #35 ComponentElement.mount (package:flutter/src/widgets/framework.dart:2647:5)
10:35:01.379: I/flutter : #36 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.383: I/flutter : #37 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.386: I/flutter : #38 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:2678:16)
10:35:01.389: I/flutter : #39 BuildableElement.rebuild (package:flutter/src/widgets/framework.dart:2567:5)
10:35:01.392: I/flutter : #40 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:2652:5)
10:35:01.395: I/flutter : #41 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:2768:22)
10:35:01.399: I/flutter : #42 ComponentElement.mount (package:flutter/src/widgets/framework.dart:2647:5)
10:35:01.402: I/flutter : #43 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.405: I/flutter : #44 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.409: I/flutter : #45 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:2678:16)
10:35:01.412: I/flutter : #46 BuildableElement.rebuild (package:flutter/src/widgets/framework.dart:2567:5)
10:35:01.415: I/flutter : #47 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:2652:5)
10:35:01.418: I/flutter : #48 ComponentElement.mount (package:flutter/src/widgets/framework.dart:2647:5)
10:35:01.421: I/flutter : #49 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.424: I/flutter : #50 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.428: I/flutter : #51 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:2678:16)
10:35:01.431: I/flutter : #52 BuildableElement.rebuild (package:flutter/src/widgets/framework.dart:2567:5)
10:35:01.434: I/flutter : #53 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:2652:5)
10:35:01.437: I/flutter : #54 ComponentElement.mount (package:flutter/src/widgets/framework.dart:2647:5)
10:35:01.440: I/flutter : #55 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.444: I/flutter : #56 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.447: I/flutter : #57 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:518:16)
10:35:01.449: I/flutter : #58 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:489:5)
10:35:01.453: I/flutter : #59 RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:435:17)
10:35:01.456: I/flutter : #60 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:1649:19)
10:35:01.459: I/flutter : #61 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:434:13)
10:35:01.462: I/flutter : #62 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:336:7)
10:35:01.465: I/flutter : #63 runApp (package:flutter/src/widgets/binding.dart:367:7)
10:35:01.468: I/flutter : #64 main.<main_async_body> (/data/user/0/com.google.fuchsia.armadillo/cache/armadillowvraes/lib/main.dart:11:3)
10:35:01.471: I/flutter : (elided 4 frames from class _AssertionError and package dart:async)
10:35:01.475: I/flutter : ════════════════════════════════════════════════════════════════════════════════════════════════════
"><pre class="notranslate"><code class="notranslate">10:35:01.044: I/flutter : ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
10:35:01.055: I/flutter : The following assertion was thrown building RawGestureDetector([GlobalKey 273613476]; state:
10:35:01.058: I/flutter : RawGestureDetectorState(304216675; gestures: vertical drag; behavior: opaque)):
10:35:01.062: I/flutter : scheduleBuildFor() called for a widget for which a build was already scheduled.
10:35:01.065: I/flutter : The method was called for the following element:
10:35:01.068: I/flutter : DecoratedBox(dirty; renderObject: RenderDecoratedBox NEEDS-LAYOUT DETACHED)
10:35:01.072: I/flutter : The current dirty list consists of:
10:35:01.075: I/flutter : [DecoratedBox(dirty; renderObject: RenderDecoratedBox NEEDS-LAYOUT DETACHED)]
10:35:01.078: I/flutter : This usually indicates that a widget was rebuilt outside the build phase (thus marking the element
10:35:01.082: I/flutter : as clean even though it is still in the dirty list). This should not be possible and is probably
10:35:01.085: I/flutter : caused by a bug in the widgets framework. Please report it:
10:35:01.087: I/flutter : https://github.com/flutter/flutter/issues/new
10:35:01.090: I/flutter : To debug this issue, consider setting the debugPrintScheduleBuildForStacks and
10:35:01.093: I/flutter : debugPrintBuildDirtyElements flags to true and looking for a call to scheduleBuildFor for a widget
10:35:01.096: I/flutter : that is labeled "ALREADY IN LIST".
10:35:01.243: I/flutter :
10:35:01.247: I/flutter : When the exception was thrown, this was the stack:
10:35:01.272: I/flutter : #0 BuildOwner.scheduleBuildFor.<anonymous closure> (package:flutter/src/widgets/framework.dart:1531:9)
10:35:01.275: I/flutter : #2 BuildOwner.scheduleBuildFor (package:flutter/src/widgets/framework.dart:1527:12)
10:35:01.278: I/flutter : #3 BuildableElement.markNeedsBuild (package:flutter/src/widgets/framework.dart:2538:11)
10:35:01.282: I/flutter : #4 BuildableElement.dependenciesChanged (package:flutter/src/widgets/framework.dart:2584:5)
10:35:01.285: I/flutter : #5 BuildableElement.activate (package:flutter/src/widgets/framework.dart:2599:7)
10:35:01.289: I/flutter : #6 Element._activateRecursively (package:flutter/src/widgets/framework.dart:2194:13)
10:35:01.292: I/flutter : #7 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:3424:14)
10:35:01.295: I/flutter : #8 Element._activateRecursively (package:flutter/src/widgets/framework.dart:2196:13)
10:35:01.298: I/flutter : #9 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:2690:14)
10:35:01.301: I/flutter : #10 Element._activateRecursively (package:flutter/src/widgets/framework.dart:2196:13)
10:35:01.305: I/flutter : #11 Element._activateWithParent (package:flutter/src/widgets/framework.dart:2187:5)
10:35:01.307: I/flutter : #12 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2131:18)
10:35:01.310: I/flutter : #13 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.313: I/flutter : #14 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3436:14)
10:35:01.316: I/flutter : #15 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.319: I/flutter : #16 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3532:32)
10:35:01.322: I/flutter : #17 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.325: I/flutter : #18 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.327: I/flutter : #19 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3436:14)
10:35:01.330: I/flutter : #20 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.333: I/flutter : #21 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.336: I/flutter : #22 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3436:14)
10:35:01.339: I/flutter : #23 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.342: I/flutter : #24 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.346: I/flutter : #25 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3436:14)
10:35:01.349: I/flutter : #26 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.352: I/flutter : #27 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.355: I/flutter : #28 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:3436:14)
10:35:01.358: I/flutter : #29 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.361: I/flutter : #30 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.364: I/flutter : #31 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:2678:16)
10:35:01.367: I/flutter : #32 BuildableElement.rebuild (package:flutter/src/widgets/framework.dart:2567:5)
10:35:01.370: I/flutter : #33 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:2652:5)
10:35:01.373: I/flutter : #34 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:2768:22)
10:35:01.376: I/flutter : #35 ComponentElement.mount (package:flutter/src/widgets/framework.dart:2647:5)
10:35:01.379: I/flutter : #36 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.383: I/flutter : #37 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.386: I/flutter : #38 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:2678:16)
10:35:01.389: I/flutter : #39 BuildableElement.rebuild (package:flutter/src/widgets/framework.dart:2567:5)
10:35:01.392: I/flutter : #40 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:2652:5)
10:35:01.395: I/flutter : #41 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:2768:22)
10:35:01.399: I/flutter : #42 ComponentElement.mount (package:flutter/src/widgets/framework.dart:2647:5)
10:35:01.402: I/flutter : #43 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.405: I/flutter : #44 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.409: I/flutter : #45 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:2678:16)
10:35:01.412: I/flutter : #46 BuildableElement.rebuild (package:flutter/src/widgets/framework.dart:2567:5)
10:35:01.415: I/flutter : #47 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:2652:5)
10:35:01.418: I/flutter : #48 ComponentElement.mount (package:flutter/src/widgets/framework.dart:2647:5)
10:35:01.421: I/flutter : #49 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.424: I/flutter : #50 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.428: I/flutter : #51 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:2678:16)
10:35:01.431: I/flutter : #52 BuildableElement.rebuild (package:flutter/src/widgets/framework.dart:2567:5)
10:35:01.434: I/flutter : #53 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:2652:5)
10:35:01.437: I/flutter : #54 ComponentElement.mount (package:flutter/src/widgets/framework.dart:2647:5)
10:35:01.440: I/flutter : #55 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2139:14)
10:35:01.444: I/flutter : #56 Element.updateChild (package:flutter/src/widgets/framework.dart:1970:12)
10:35:01.447: I/flutter : #57 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:518:16)
10:35:01.449: I/flutter : #58 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:489:5)
10:35:01.453: I/flutter : #59 RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:435:17)
10:35:01.456: I/flutter : #60 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:1649:19)
10:35:01.459: I/flutter : #61 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:434:13)
10:35:01.462: I/flutter : #62 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:336:7)
10:35:01.465: I/flutter : #63 runApp (package:flutter/src/widgets/binding.dart:367:7)
10:35:01.468: I/flutter : #64 main.<main_async_body> (/data/user/0/com.google.fuchsia.armadillo/cache/armadillowvraes/lib/main.dart:11:3)
10:35:01.471: I/flutter : (elided 4 frames from class _AssertionError and package dart:async)
10:35:01.475: I/flutter : ════════════════════════════════════════════════════════════════════════════════════════════════════
</code></pre></div> | <ul dir="auto">
<li>What went wrong:<br>
Execution failed for task ':app:preDebugBuild'.</li>
</ul>
<blockquote>
<p dir="auto">Android dependency 'com.google.android.gms:play-services-tasks' has different version for the compile (11.8.0) and runtime (15.0.1) classpath. You should manually set the same version via DependencyResolution</p>
</blockquote>
<hr>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Microsoft Windows [Version 10.0.17134.165]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\FlutterProjects\wait_not>flutter doctor -v
[√] Flutter (Channel dev, v0.5.8, on Microsoft Windows [Version 10.0.17134.165], locale en-US)
• Flutter version 0.5.8 at C:\git\flutter
• Framework revision e4b989bf3d (3 days ago), 2018-08-09 09:45:44 -0700
• Engine revision 3777931801
• Dart version 2.0.0-dev.69.5.flutter-eab492385c
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at C:\Users\admin\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio1
• Flutter plugin version 27.1.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] IntelliJ IDEA Community Edition (version 2017.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.5
• Flutter plugin version 19.1
• Dart plugin version 172.4343.25
[√] VS Code, 64-bit edition (version 1.25.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 2.17.1
[√] Connected devices (1 available)
• SCH I959 • 4d004c0e6d66401f • android-arm • Android 5.0.1 (API 21)
• No issues found!"><pre class="notranslate"><code class="notranslate">Microsoft Windows [Version 10.0.17134.165]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\FlutterProjects\wait_not>flutter doctor -v
[√] Flutter (Channel dev, v0.5.8, on Microsoft Windows [Version 10.0.17134.165], locale en-US)
• Flutter version 0.5.8 at C:\git\flutter
• Framework revision e4b989bf3d (3 days ago), 2018-08-09 09:45:44 -0700
• Engine revision 3777931801
• Dart version 2.0.0-dev.69.5.flutter-eab492385c
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at C:\Users\admin\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio1
• Flutter plugin version 27.1.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] IntelliJ IDEA Community Edition (version 2017.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.5
• Flutter plugin version 19.1
• Dart plugin version 172.4343.25
[√] VS Code, 64-bit edition (version 1.25.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 2.17.1
[√] Connected devices (1 available)
• SCH I959 • 4d004c0e6d66401f • android-arm • Android 5.0.1 (API 21)
• No issues found!
</code></pre></div> | 0 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/13680558/9346381/88f747b4-45f2-11e5-9da1-f8e3a0e62a62.png"><img width="257" alt="screen shot 2015-08-18 at 9 44 53 pm" src="https://cloud.githubusercontent.com/assets/13680558/9346381/88f747b4-45f2-11e5-9da1-f8e3a0e62a62.png" style="max-width: 100%;"></a></p>
Challenge http://freecodecamp.com/challenges/waypoint-manipulate-javascript-objects has an issue. Please describe how to reproduce it, and include links to screenshots if possible. | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-manipulate-javascript-objects" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-manipulate-javascript-objects</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">"There are many ways to add and add and remove properties from objects."</p>
<p dir="auto">Should probably read as:</p>
<p dir="auto">"There are many ways to add and remove properties from objects."</p> | 1 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0.0
config file = /home/tessio/ansible/next/ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.1.0.0
config file = /home/tessio/ansible/next/ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">UNZIP VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="caution: both -n and -o specified; ignoring -o
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 5.2.1 20151010 for Unix (Linux ELF).
UnZip special compilation options:
ACORN_FTYPE_NFS
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: UTF-8] (handle UTF-8 paths)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2010)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.11 of 05 Jan 2007]
UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]"><pre class="notranslate"><code class="notranslate">caution: both -n and -o specified; ignoring -o
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 5.2.1 20151010 for Unix (Linux ELF).
UnZip special compilation options:
ACORN_FTYPE_NFS
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: UTF-8] (handle UTF-8 paths)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2010)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.11 of 05 Jan 2007]
UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults]
hostfile = hosts"><pre class="notranslate"><code class="notranslate">[defaults]
hostfile = hosts
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily
Ansible package from Ansibles Inc's PPA."><pre class="notranslate"><code class="notranslate">Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily
Ansible package from Ansibles Inc's PPA.
</code></pre></div>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">unarchive module fails to extract zip files that contain files whose name has spaces in it, like the file named "CPL - cpl1.0.txt".</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Download <a href="https://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA-jdk6.zip/download" rel="nofollow">jboss-5.1.0.GA-jdk6.zip</a>, then try to copy and extract it to another machine using ansible.<br>
This was how I discovered the bug, but I got the same result when I created <em>archive.zip</em> with a file named "bug - bug.txt" and the command "zip archive bug\ -\ bug.txt".</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
- name: install e configure Jboss 5.1
hosts: sig
become: yes
vars:
java_home: /opt/java/jdk1.6.0_45
jboss_home: /opt/jboss/jboss-5.1.0.GA
jboss_package: jboss-5.1.0.GA-jdk6.zip
tasks:
- name: install dependencies
apt: name=unzip state=present update_cache=yes
- name: send archive
copy: src=files/{{ jboss_package }} dest=/tmp mode=0664
register: package
- name: check copy
fail: msg="bad copy"
when: package.checksum != "0906717eec83d57a3fdbdf090555cac036bffc6d"
- name: create dir
file: path=/opt/jboss state=directory mode=0755
- name: extract archive
unarchive: src=/tmp/{{ jboss_package }} dest=/opt/jboss copy=no
"><pre class="notranslate"><code class="notranslate">
---
- name: install e configure Jboss 5.1
hosts: sig
become: yes
vars:
java_home: /opt/java/jdk1.6.0_45
jboss_home: /opt/jboss/jboss-5.1.0.GA
jboss_package: jboss-5.1.0.GA-jdk6.zip
tasks:
- name: install dependencies
apt: name=unzip state=present update_cache=yes
- name: send archive
copy: src=files/{{ jboss_package }} dest=/tmp mode=0664
register: package
- name: check copy
fail: msg="bad copy"
when: package.checksum != "0906717eec83d57a3fdbdf090555cac036bffc6d"
- name: create dir
file: path=/opt/jboss state=directory mode=0755
- name: extract archive
unarchive: src=/tmp/{{ jboss_package }} dest=/opt/jboss copy=no
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Files inside the zip archive to be extracted to the remote host.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">ansible fails while extracting the zip file. It always fail when it's encounters a ziped file whose name has spaces in it.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [pinky]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"backup": null, "content": null, "copy": false, "creates": null, "delimiter": null, "dest": "/opt/jboss", "directory_mode": null, "exclude": [], "extra_opts": [], "follow": false, "force": null, "group": null, "keep_newer": false, "list_files": false, "mode": null, "original_basename": "jboss-5.1.0.GA-jdk6.zip", "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/tmp/jboss-5.1.0.GA-jdk6.zip"}}, "msg": "Unexpected error when accessing exploded file: [Errno 2] No such file or directory: '/opt/jboss/jboss-5.1.0.GA/docs/licenses/CPL - cpl1.0.txt'"}"><pre class="notranslate"><code class="notranslate">fatal: [pinky]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"backup": null, "content": null, "copy": false, "creates": null, "delimiter": null, "dest": "/opt/jboss", "directory_mode": null, "exclude": [], "extra_opts": [], "follow": false, "force": null, "group": null, "keep_newer": false, "list_files": false, "mode": null, "original_basename": "jboss-5.1.0.GA-jdk6.zip", "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/tmp/jboss-5.1.0.GA-jdk6.zip"}}, "msg": "Unexpected error when accessing exploded file: [Errno 2] No such file or directory: '/opt/jboss/jboss-5.1.0.GA/docs/licenses/CPL - cpl1.0.txt'"}
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto"><strong>problematic</strong></p>
<ul dir="auto">
<li><code class="notranslate">ansible 2.1.0.0</code></li>
</ul>
<p dir="auto"><strong>working fine</strong></p>
<ul dir="auto">
<li><code class="notranslate">ansible 2.0.2.0</code></li>
<li><code class="notranslate">ansible 1.9.6</code></li>
</ul>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">default <code class="notranslate">pip install ansible==2.1.0.0</code></p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">controller: fedora 23<br>
host: centos 7 & fedora 23</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">if the archive contains files with spaces, the module fails.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">I made a reproducer.</p>
<ol dir="auto">
<li><code class="notranslate">git clone https://github.com/sherl0cks/test-travis.git</code></li>
<li><code class="notranslate">ansible-playbook tests/unarchive-bug.yml -i tests/inventory</code></li>
</ol>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">unarchive handles all sorts of file name permuations without issue. In this case, <code class="notranslate">tests/files/licenses.zip</code> should archive to a folder with 19 different files in it.</p>
<p dir="auto">FWIW - <code class="notranslate">unzip</code> seems to work just fine on fedora 23 and centos 7 for the same files.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">only 2 files (the ones with no spaces in their names) unarchive, which seems to result in an error.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[sherl0cks@fedora23 test-travis]$ ansible-playbook tests/unarchive-bug.yml -i tests/inventory -vvvv
Using /home/sherl0cks/.ansible.cfg as config file
Loaded callback default of type stdout, v2.0
PLAYBOOK: unarchive-bug.yml ****************************************************
1 plays in tests/unarchive-bug.yml
PLAY [Unarchive fails with files with spaces] **********************************
TASK [setup] *******************************************************************
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: sherl0cks
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.05-143065043354798 `" && echo ansible-tmp-1464668529.05-143065043354798="` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.05-143065043354798 `" ) && sleep 0'
<localhost> PUT /tmp/tmpyrzj2X TO /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.05-143065043354798/setup
<localhost> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.05-143065043354798/setup; rm -rf "/home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.05-143065043354798/" > /dev/null 2>&1 && sleep 0'
ok: [localhost]
TASK [unarchive] ***************************************************************
task path: /home/sherl0cks/Code/ansible/test-travis/tests/unarchive-bug.yml:5
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: sherl0cks
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.51-147273438565075 `" && echo ansible-tmp-1464668529.51-147273438565075="` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.51-147273438565075 `" ) && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.58-72180718843273 `" && echo ansible-tmp-1464668529.58-72180718843273="` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.58-72180718843273 `" ) && sleep 0'
<localhost> PUT /tmp/tmpFEYESf TO /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.58-72180718843273/stat
<localhost> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.58-72180718843273/stat; rm -rf "/home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.58-72180718843273/" > /dev/null 2>&1 && sleep 0'
<localhost> PUT /home/sherl0cks/Code/ansible/test-travis/tests/files/licenses.zip TO /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.51-147273438565075/source
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.77-102978787354324 `" && echo ansible-tmp-1464668529.77-102978787354324="` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.77-102978787354324 `" ) && sleep 0'
<localhost> PUT /tmp/tmpnRb93m TO /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.77-102978787354324/unarchive
<localhost> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.77-102978787354324/unarchive; rm -rf "/home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.77-102978787354324/" > /dev/null 2>&1 && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.51-147273438565075/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"backup": null, "content": null, "copy": true, "creates": null, "delimiter": null, "dest": "/tmp", "directory_mode": null, "exclude": [], "extra_opts": [], "follow": false, "force": null, "group": null, "keep_newer": false, "list_files": false, "mode": null, "original_basename": "licenses.zip", "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.51-147273438565075/source"}}, "msg": "path /tmp/licenses/gnu general public license, version 2 - gpl-2.0.txt does not exist", "path": "/tmp/licenses/gnu general public license, version 2 - gpl-2.0.txt", "state": "absent"}
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @tests/unarchive-bug.retry
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 "><pre class="notranslate"><code class="notranslate">[sherl0cks@fedora23 test-travis]$ ansible-playbook tests/unarchive-bug.yml -i tests/inventory -vvvv
Using /home/sherl0cks/.ansible.cfg as config file
Loaded callback default of type stdout, v2.0
PLAYBOOK: unarchive-bug.yml ****************************************************
1 plays in tests/unarchive-bug.yml
PLAY [Unarchive fails with files with spaces] **********************************
TASK [setup] *******************************************************************
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: sherl0cks
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.05-143065043354798 `" && echo ansible-tmp-1464668529.05-143065043354798="` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.05-143065043354798 `" ) && sleep 0'
<localhost> PUT /tmp/tmpyrzj2X TO /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.05-143065043354798/setup
<localhost> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.05-143065043354798/setup; rm -rf "/home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.05-143065043354798/" > /dev/null 2>&1 && sleep 0'
ok: [localhost]
TASK [unarchive] ***************************************************************
task path: /home/sherl0cks/Code/ansible/test-travis/tests/unarchive-bug.yml:5
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: sherl0cks
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.51-147273438565075 `" && echo ansible-tmp-1464668529.51-147273438565075="` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.51-147273438565075 `" ) && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.58-72180718843273 `" && echo ansible-tmp-1464668529.58-72180718843273="` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.58-72180718843273 `" ) && sleep 0'
<localhost> PUT /tmp/tmpFEYESf TO /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.58-72180718843273/stat
<localhost> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.58-72180718843273/stat; rm -rf "/home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.58-72180718843273/" > /dev/null 2>&1 && sleep 0'
<localhost> PUT /home/sherl0cks/Code/ansible/test-travis/tests/files/licenses.zip TO /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.51-147273438565075/source
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.77-102978787354324 `" && echo ansible-tmp-1464668529.77-102978787354324="` echo $HOME/.ansible/tmp/ansible-tmp-1464668529.77-102978787354324 `" ) && sleep 0'
<localhost> PUT /tmp/tmpnRb93m TO /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.77-102978787354324/unarchive
<localhost> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.77-102978787354324/unarchive; rm -rf "/home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.77-102978787354324/" > /dev/null 2>&1 && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.51-147273438565075/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"backup": null, "content": null, "copy": true, "creates": null, "delimiter": null, "dest": "/tmp", "directory_mode": null, "exclude": [], "extra_opts": [], "follow": false, "force": null, "group": null, "keep_newer": false, "list_files": false, "mode": null, "original_basename": "licenses.zip", "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/home/sherl0cks/.ansible/tmp/ansible-tmp-1464668529.51-147273438565075/source"}}, "msg": "path /tmp/licenses/gnu general public license, version 2 - gpl-2.0.txt does not exist", "path": "/tmp/licenses/gnu general public license, version 2 - gpl-2.0.txt", "state": "absent"}
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @tests/unarchive-bug.retry
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1
</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.8</li>
<li>Operating System version: mac</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">使用Dubbo的多注册中心和Zone 功能,一直在两个注册中心中负载,设置zone 不生效 ,设置 preferred: true 不生效<br>
consumer</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dubbo:
consumer:
check: false
registries:
test:
id: test
protocol: zookeeper
address: zookeeper://localhost:2181?zone=test
use-as-config-center: false
preferred: true
registry.zone: test
dev:
id: dev
protocol: zookeeper
address: dev-zk1.zk.com:2181
use-as-config-center: false
registry.zone: dev
config:
multiple: true
"><pre class="notranslate"><span class="pl-ent">dubbo</span>:
<span class="pl-ent">consumer</span>:
<span class="pl-ent">check</span>: <span class="pl-c1">false</span>
<span class="pl-ent">registries</span>:
<span class="pl-ent">test</span>:
<span class="pl-ent">id</span>: <span class="pl-s">test</span>
<span class="pl-ent">protocol</span>: <span class="pl-s">zookeeper</span>
<span class="pl-ent">address</span>: <span class="pl-s">zookeeper://localhost:2181?zone=test</span>
<span class="pl-ent">use-as-config-center</span>: <span class="pl-c1">false</span>
<span class="pl-ent">preferred</span>: <span class="pl-c1">true</span>
<span class="pl-ent">registry.zone</span>: <span class="pl-s">test</span>
<span class="pl-ent">dev</span>:
<span class="pl-ent">id</span>: <span class="pl-s">dev</span>
<span class="pl-ent">protocol</span>: <span class="pl-s">zookeeper</span>
<span class="pl-ent">address</span>: <span class="pl-s">dev-zk1.zk.com:2181</span>
<span class="pl-ent">use-as-config-center</span>: <span class="pl-c1">false</span>
<span class="pl-ent">registry.zone</span>: <span class="pl-s">dev</span>
<span class="pl-ent">config</span>:
<span class="pl-ent">multiple</span>: <span class="pl-c1">true</span>
</pre></div>
<p dir="auto">provider1</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dubbo:
protocol:
port: 12322
name: dubbo
config:
multiple: true
registry:
id: dev
zone: dev
use-as-config-center: false
address: zookeeper://dev-zk1.zk.com:2181
config-center:
address: zookeeper://dev-zk1.zk.com:2181
metadata-report:
address: zookeeper://dev-zk1.zk.com:2181"><pre class="notranslate"><span class="pl-ent">dubbo</span>:
<span class="pl-ent">protocol</span>:
<span class="pl-ent">port</span>: <span class="pl-c1">12322</span>
<span class="pl-ent">name</span>: <span class="pl-s">dubbo</span>
<span class="pl-ent">config</span>:
<span class="pl-ent">multiple</span>: <span class="pl-c1">true</span>
<span class="pl-ent">registry</span>:
<span class="pl-ent">id</span>: <span class="pl-s">dev</span>
<span class="pl-ent">zone</span>: <span class="pl-s">dev</span>
<span class="pl-ent">use-as-config-center</span>: <span class="pl-c1">false</span>
<span class="pl-ent">address</span>: <span class="pl-s">zookeeper://dev-zk1.zk.com:2181</span>
<span class="pl-ent">config-center</span>:
<span class="pl-ent">address</span>: <span class="pl-s">zookeeper://dev-zk1.zk.com:2181</span>
<span class="pl-ent">metadata-report</span>:
<span class="pl-ent">address</span>: <span class="pl-s">zookeeper://dev-zk1.zk.com:2181</span></pre></div>
<p dir="auto">provider1</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dubbo:
protocol:
port: 12311
name: dubbo
config:
multiple: true
registry:
id: test
zone: test
use-as-config-center: false
address: zookeeper://localhost:2181
config-center:
address: zookeeper://localhost:2181
metadata-report:
address: zookeeper://localhost:2181
"><pre class="notranslate"><span class="pl-ent">dubbo</span>:
<span class="pl-ent">protocol</span>:
<span class="pl-ent">port</span>: <span class="pl-c1">12311</span>
<span class="pl-ent">name</span>: <span class="pl-s">dubbo</span>
<span class="pl-ent">config</span>:
<span class="pl-ent">multiple</span>: <span class="pl-c1">true</span>
<span class="pl-ent">registry</span>:
<span class="pl-ent">id</span>: <span class="pl-s">test</span>
<span class="pl-ent">zone</span>: <span class="pl-s">test</span>
<span class="pl-ent">use-as-config-center</span>: <span class="pl-c1">false</span>
<span class="pl-ent">address</span>: <span class="pl-s">zookeeper://localhost:2181</span>
<span class="pl-ent">config-center</span>:
<span class="pl-ent">address</span>: <span class="pl-s">zookeeper://localhost:2181</span>
<span class="pl-ent">metadata-report</span>:
<span class="pl-ent">address</span>: <span class="pl-s">zookeeper://localhost:2181</span>
</pre></div>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">应该优先调用 preferred: true 的注册中心</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">两个注册中心的服务随机调用</p> | <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">Steps to reproduce this issue</h3>
<p dir="auto"><a href="http://dubbo.apache.org/zh-cn/docs/2.7/user/preface/architecture/" rel="nofollow">http://dubbo.apache.org/zh-cn/docs/2.7/user/preface/architecture/</a></p>
<ol dir="auto">
<li>源码导读章节没了</li>
<li>左侧目录中,2.7 -> 开发手册 下的其他章节均跳转到首页</li>
</ol> | 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"> 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"> 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"> 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>
</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>
</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>
</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<h3 dir="auto">Actual Behavior</h3>
<h3 dir="auto">To Reproduce</h3>
<h3 dir="auto">Screenshots</h3>
<h3 dir="auto">Additional Information</h3> | <p dir="auto">Hey there</p>
<p dir="auto">I have upgraded an app to version 5 as in the list of fixes was the silent printing bug, but the issue is still the same.</p>
<p dir="auto">My code:<br>
<code class="notranslate">printWindow.webContents.print({silent: true});</code></p>
<p dir="auto">Results in nothing happening at all. No errors thrown or anything. Changing it back to false, brings up the window to select the printer and then it prints perfectly fine. It's just the silent mode that doesn't work.</p>
<p dir="auto">I am running this on Windows 10, with Node version 10.15.3. I can not try with a different OS as the printer only has drivers for Windows.</p>
<p dir="auto">Many thanks,<br>
Michael</p> | 1 |
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">ShardingSphere-JDBC 5.1.0 + spring boot 2.3.10</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.1.1</version>
</dependency>"><pre class="notranslate"><code class="notranslate"><dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.1.1</version>
</dependency>
</code></pre></div>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Use a simple example to divide the database</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Route table null does not exist, available actual table: [oms_master_order_0, oms_master_order_1]</p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<p dir="auto">to configure oms_master_order_$->{id % 2}</p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<blockquote>
<p dir="auto">This is my configuration</p>
</blockquote>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="spring.shardingsphere.enabled=true
spring.shardingsphere.datasource.names=oms
spring.shardingsphere.datasource.oms.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.oms.driver-class-name=com.mysql.cj.jdbc.Driver
spring.shardingsphere.datasource.oms.url=jdbc:mysql://192.168.0.128:3306/yidian_oms?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
spring.shardingsphere.datasource.oms.username=root
spring.shardingsphere.datasource.oms.password=root
spring.shardingsphere.rules.sharding.tables.oms_master_order.actual-data-nodes=oms.oms_master_order_$->{0..1}
spring.shardingsphere.rules.sharding.tables.oms_master_order.table-strategy.standard.sharding-column=id
spring.shardingsphere.rules.sharding.tables.oms_master_order.table-strategy.standard.sharding-algorithm-name=master-order-inline
spring.shardingsphere.rules.sharding.sharding-algorithms.master-order-inline.type=INLINE
#spring.shardingsphere.rules.sharding.sharding-algorithms.master-order-inline.props=strategy
#spring.shardingsphere.rules.sharding.sharding-algorithms.master-order-inline.props.algorithmClassName=cn.dian1.oms.core.sharding.TableShardingAlgorithm
spring.shardingsphere.rules.sharding.sharding-algorithms.master-order-inline.props.algorithm-expression=oms_master_order_$->{id % 2}
spring.shardingsphere.props.sql-show=true"><pre class="notranslate"><span class="pl-k">spring.shardingsphere.enabled</span>=true
<span class="pl-k">spring.shardingsphere.datasource.names</span>=oms
<span class="pl-k">spring.shardingsphere.datasource.oms.type</span>=com.alibaba.druid.pool.DruidDataSource
<span class="pl-k">spring.shardingsphere.datasource.oms.driver-class-name</span>=com.mysql.cj.jdbc.Driver
<span class="pl-k">spring.shardingsphere.datasource.oms.url</span>=jdbc:mysql://192.168.0.128:3306/yidian_oms?<span class="pl-k">serverTimezone</span>=UTC&<span class="pl-k">useSSL</span>=false&<span class="pl-k">useUnicode</span>=true&<span class="pl-k">characterEncoding</span>=UTF-8
<span class="pl-k">spring.shardingsphere.datasource.oms.username</span>=root
<span class="pl-k">spring.shardingsphere.datasource.oms.password</span>=root
<span class="pl-k">spring.shardingsphere.rules.sharding.tables.oms_master_order.actual-data-nodes</span>=oms.oms_master_order_$->{0..1}
<span class="pl-k">spring.shardingsphere.rules.sharding.tables.oms_master_order.table-strategy.standard.sharding-column</span>=id
<span class="pl-k">spring.shardingsphere.rules.sharding.tables.oms_master_order.table-strategy.standard.sharding-algorithm-name</span>=master-order-inline
<span class="pl-k">spring.shardingsphere.rules.sharding.sharding-algorithms.master-order-inline.type</span>=INLINE
<span class="pl-c"><span class="pl-c">#</span>spring.shardingsphere.rules.sharding.sharding-algorithms.master-order-inline.props=strategy</span>
<span class="pl-c"><span class="pl-c">#</span>spring.shardingsphere.rules.sharding.sharding-algorithms.master-order-inline.props.algorithmClassName=cn.dian1.oms.core.sharding.TableShardingAlgorithm</span>
<span class="pl-k">spring.shardingsphere.rules.sharding.sharding-algorithms.master-order-inline.props.algorithm-expression</span>=oms_master_order_$->{id % 2}
<span class="pl-k">spring.shardingsphere.props.sql-show</span>=true</pre></div>
<blockquote>
<p dir="auto">This is the statement I execute SQL :</p>
</blockquote>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" @GetMapping(value = "/testSharding")
public String testSharding() {
jdbcTemplate.update("insert into oms_master_order (id, masterOrderNo, containerNumber, create_time) values (?,?,?,?)",
100, "100", "123456", new Date());
// 100, "100", "123456", '2022-06-15 14:24:41');
return "成功了";
}"><pre class="notranslate"> <span class="pl-c1">@</span><span class="pl-c1">GetMapping</span>(<span class="pl-s1">value</span> = <span class="pl-s">"/testSharding"</span>)
<span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-s1">testSharding</span>() {
<span class="pl-s1">jdbcTemplate</span>.<span class="pl-en">update</span>(<span class="pl-s">"insert into oms_master_order (id, masterOrderNo, containerNumber, create_time) values (?,?,?,?)"</span>,
<span class="pl-c1">100</span>, <span class="pl-s">"100"</span>, <span class="pl-s">"123456"</span>, <span class="pl-k">new</span> <span class="pl-smi">Date</span>());
<span class="pl-c">// 100, "100", "123456", '2022-06-15 14:24:41');</span>
<span class="pl-k">return</span> <span class="pl-s">"成功了"</span>;
}</pre></div>
<p dir="auto">This may be the reason for the problem. I don't understand that there will be a parsing failure and a "null" will be returned<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/85894494/177711108-dee5d238-257c-48ef-a7a0-9fe2ea362a1e.png"><img src="https://user-images.githubusercontent.com/85894494/177711108-dee5d238-257c-48ef-a7a0-9fe2ea362a1e.png" alt="177704167-0c050e8e-9526-42bb-9db5-4313a78f4adf" style="max-width: 100%;"></a></p>
<p dir="auto">I found that all implementation classes of standardshardingalgorithm did not execute the init () method.<br>
My environment is in springboot</p>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> | <h2 dir="auto">Feature Request</h2>
<h3 dir="auto">Is your feature request related to a problem?</h3>
<p dir="auto">No</p>
<h3 dir="auto">Describe the feature you would like.</h3>
<p dir="auto">There is a syntax for creating a shadow algorithm separately in Distsql, but cannot use a separately created shadow algorithm to create a shadow rule(I'v already check the Antler file). This makes it moot to create the shadow algorithm alone.<br>
Please complete the syntax of using shadow algorithm to create shadow rule.</p> | 0 |
<ul dir="auto">
<li>Electron version: 1.6.6</li>
<li>Operating system: macOs 10.12.4</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">When opening a BrowserWindow with a parent, modal: false and show: false the window should start hidden.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">The window shows nevertheless</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Create a first (main) window.<br>
Create a second (child) window with:<br>
{<br>
parent: mainWindow,<br>
modal: false,<br>
show: false<br>
}</p> | <ul dir="auto">
<li>Electron version: 1.6.1</li>
<li>Operating system: macOS Sierra</li>
</ul>
<p dir="auto">When you do this from a renderer process:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="new electron.remote.BrowserWindow(
parent: parentBrowserWindow,
show: false,
);"><pre class="notranslate"><code class="notranslate">new electron.remote.BrowserWindow(
parent: parentBrowserWindow,
show: false,
);
</code></pre></div>
<p dir="auto">The browser window always shows even though the <code class="notranslate">show</code> option is <code class="notranslate">false</code>. If you do not provide a parent, the browser window respects the <code class="notranslate">show</code> option.</p> | 1 |
<p dir="auto">I want to use the seaborn violin plot due to the extrapolations of the KDE. However, the violin plot of the <strong>last two</strong> ones are very tiny, I need to zoom in to see the distribution. But this doesn't happen with matplotlib.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import seaborn as sns
a=[[195.0, 245.0, 142.0, 237.0, 153.0, 238.0, 168.0, 145.0, 229.0, 138.0, 176.0, 116.0, 252.0, 148.0, 199.0, 162.0, 134.0, 163.0, 130.0, 339.0, 152.0, 208.0, 152.0, 192.0, 163.0, 249.0, 113.0, 176.0, 123.0, 189.0, 150.0, 207.0, 184.0, 153.0, 228.0, 153.0, 170.0, 118.0, 302.0, 197.0, 211.0, 159.0, 228.0, 147.0, 166.0, 156.0, 167.0, 147.0, 126.0, 155.0, 138.0, 159.0, 139.0, 111.0, 133.0, 134.0, 131.0, 156.0, 240.0, 207.0, 150.0, 207.0, 265.0, 151.0, 173.0, 157.0, 261.0, 186.0, 195.0, 158.0, 272.0, 134.0, 221.0, 131.0, 252.0, 148.0, 178.0, 206.0, 146.0, 217.0, 159.0, 190.0, 156.0, 172.0, 159.0, 141.0, 167.0, 168.0, 218.0, 191.0, 207.0, 164.0], [689.0, 675.0, 648.0, 671.0, 647.0, 688.0, 776.0, 628.0, 680.0, 642.0, 682.0, 738.0, 659.0, 682.0, 616.0, 652.0, 781.0, 626.0, 629.0, 618.0, 628.0, 675.0, 604.0, 637.0, 601.0, 676.0, 682.0, 794.0, 788.0, 731.0, 635.0, 653.0, 641.0, 626.0, 639.0, 608.0, 654.0, 621.0, 783.0, 627.0, 784.0, 666.0, 721.0, 647.0, 644.0, 708.0, 653.0, 667.0, 656.0, 659.0, 626.0, 647.0, 683.0, 657.0, 720.0, 652.0, 624.0, 655.0, 609.0, 616.0, 655.0, 596.0, 619.0, 646.0, 701.0, 649.0, 646.0, 629.0, 640.0, 621.0, 628.0, 665.0, 640.0, 657.0, 628.0, 658.0, 642.0, 752.0, 649.0, 601.0, 800.0, 605.0, 612.0, 692.0, 634.0, 619.0, 620.0, 652.0, 764.0, 663.0, 663.0, 710.0, 562.0, 884.0, 524.0, 533.0, 759.0, 467.0, 554.0, 820.0], [9571.0, 14223.0, 15842.0, 11159.0, 16297.999999999998, 12340.0, 15162.0, 16359.000000000002, 10285.0, 17126.0, 13501.0, 15486.0, 12771.0, 9677.0, 11949.0, 16739.0, 8452.0, 13257.0, 14615.0, 14561.0, 16689.0, 13906.0, 16029.0, 16439.0, 14767.0, 12806.0, 13728.0, 14402.0, 9144.0, 15636.0, 10142.0, 16408.0, 15954.0, 15123.0, 9668.0, 13788.0, 15405.0, 16122.0, 17062.0, 16149.999999999998, 15041.0, 12844.0, 11537.0, 12925.0, 13635.0, 15027.0, 17353.0, 12157.0, 13302.0, 14193.0, 11092.0, 15258.0, 12420.0, 17675.0, 15828.0, 13149.0, 15193.0, 15509.0, 14296.0, 15788.0, 14713.0, 12542.0, 14242.0, 16070.0, 14364.0, 9552.0, 11711.0, 9364.0, 15821.0, 11478.0, 16765.0, 12502.0, 15885.0, 13040.0, 16335.999999999998, 13008.0, 10582.0, 16077.000000000002, 13937.0, 11378.0, 13145.0, 11809.0, 12657.0, 11493.0, 12400.0, 14561.0, 12762.0, 13607.0, 13709.0, 17571.0, 15707.0, 11633.0, 19366.0, 9440.0, 11389.0, 12643.0, 15274.0, 13625.0, 14756.0, 8251.0], [23132.0, 19647.0, 24641.0, 24641.0, 23327.0, 23327.0, 22330.0, 22330.0, 23769.0, 23769.0, 25144.0, 22807.0, 26780.0, 25325.0, 21242.0, 25031.0, 25825.0, 18948.0, 20477.0, 22115.0, 22707.0, 18950.0, 28406.0, 21850.0, 23052.0, 21514.0, 24072.0, 25401.0, 19355.0, 18653.0, 23924.0, 28862.0, 17672.0, 22383.0, 25803.0, 23576.0, 22860.0, 25263.0, 21150.0, 27230.0, 24776.0, 25348.0, 27199.0, 20469.0, 24397.0, 25313.0, 20546.0, 19056.0, 23159.0, 21046.0, 21878.0, 29527.0, 19075.0, 23843.0, 25413.0, 21030.0, 27579.0, 21920.0, 23485.0, 22713.0, 17722.0, 28066.0, 20315.0, 17271.0, 25417.0, 21873.0, 24490.0, 27299.0, 25189.0, 21075.0, 27282.0, 25836.0, 18807.0, 19143.0, 22656.0, 26311.0, 24642.0, 24590.0, 22402.0, 25550.0, 24213.0, 20114.0, 19091.0, 21756.0, 18229.0, 22801.0, 18509.0, 27020.0, 18581.0, 20340.0, 23084.0, 22976.0, 24129.0, 25681.0, 17833.0, 25402.0, 29113.0, 23180.0, 25105.0, 29943.0]]
fig, axes = plt.subplots()
# Seaborn violin plot
sns.violinplot(data=a, width=0.6, color="w" )
# Matplotlib violin plot
# axes.violinplot(a, showmeans=True, showmedians=False, showextrema=False, widths = 0.6)
# axes.set_xticks([y+1 for y in range(2)])
# axes.set_xticks([y+1 for y in range(4)])
# plt.setp(axes, xticks=[y+1 for y in range(4)],
# xticklabels=['0', '1', '2', '3'])
plt.yscale('log' ,basey=10)
plt.show()"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt
import seaborn as sns
a=[[195.0, 245.0, 142.0, 237.0, 153.0, 238.0, 168.0, 145.0, 229.0, 138.0, 176.0, 116.0, 252.0, 148.0, 199.0, 162.0, 134.0, 163.0, 130.0, 339.0, 152.0, 208.0, 152.0, 192.0, 163.0, 249.0, 113.0, 176.0, 123.0, 189.0, 150.0, 207.0, 184.0, 153.0, 228.0, 153.0, 170.0, 118.0, 302.0, 197.0, 211.0, 159.0, 228.0, 147.0, 166.0, 156.0, 167.0, 147.0, 126.0, 155.0, 138.0, 159.0, 139.0, 111.0, 133.0, 134.0, 131.0, 156.0, 240.0, 207.0, 150.0, 207.0, 265.0, 151.0, 173.0, 157.0, 261.0, 186.0, 195.0, 158.0, 272.0, 134.0, 221.0, 131.0, 252.0, 148.0, 178.0, 206.0, 146.0, 217.0, 159.0, 190.0, 156.0, 172.0, 159.0, 141.0, 167.0, 168.0, 218.0, 191.0, 207.0, 164.0], [689.0, 675.0, 648.0, 671.0, 647.0, 688.0, 776.0, 628.0, 680.0, 642.0, 682.0, 738.0, 659.0, 682.0, 616.0, 652.0, 781.0, 626.0, 629.0, 618.0, 628.0, 675.0, 604.0, 637.0, 601.0, 676.0, 682.0, 794.0, 788.0, 731.0, 635.0, 653.0, 641.0, 626.0, 639.0, 608.0, 654.0, 621.0, 783.0, 627.0, 784.0, 666.0, 721.0, 647.0, 644.0, 708.0, 653.0, 667.0, 656.0, 659.0, 626.0, 647.0, 683.0, 657.0, 720.0, 652.0, 624.0, 655.0, 609.0, 616.0, 655.0, 596.0, 619.0, 646.0, 701.0, 649.0, 646.0, 629.0, 640.0, 621.0, 628.0, 665.0, 640.0, 657.0, 628.0, 658.0, 642.0, 752.0, 649.0, 601.0, 800.0, 605.0, 612.0, 692.0, 634.0, 619.0, 620.0, 652.0, 764.0, 663.0, 663.0, 710.0, 562.0, 884.0, 524.0, 533.0, 759.0, 467.0, 554.0, 820.0], [9571.0, 14223.0, 15842.0, 11159.0, 16297.999999999998, 12340.0, 15162.0, 16359.000000000002, 10285.0, 17126.0, 13501.0, 15486.0, 12771.0, 9677.0, 11949.0, 16739.0, 8452.0, 13257.0, 14615.0, 14561.0, 16689.0, 13906.0, 16029.0, 16439.0, 14767.0, 12806.0, 13728.0, 14402.0, 9144.0, 15636.0, 10142.0, 16408.0, 15954.0, 15123.0, 9668.0, 13788.0, 15405.0, 16122.0, 17062.0, 16149.999999999998, 15041.0, 12844.0, 11537.0, 12925.0, 13635.0, 15027.0, 17353.0, 12157.0, 13302.0, 14193.0, 11092.0, 15258.0, 12420.0, 17675.0, 15828.0, 13149.0, 15193.0, 15509.0, 14296.0, 15788.0, 14713.0, 12542.0, 14242.0, 16070.0, 14364.0, 9552.0, 11711.0, 9364.0, 15821.0, 11478.0, 16765.0, 12502.0, 15885.0, 13040.0, 16335.999999999998, 13008.0, 10582.0, 16077.000000000002, 13937.0, 11378.0, 13145.0, 11809.0, 12657.0, 11493.0, 12400.0, 14561.0, 12762.0, 13607.0, 13709.0, 17571.0, 15707.0, 11633.0, 19366.0, 9440.0, 11389.0, 12643.0, 15274.0, 13625.0, 14756.0, 8251.0], [23132.0, 19647.0, 24641.0, 24641.0, 23327.0, 23327.0, 22330.0, 22330.0, 23769.0, 23769.0, 25144.0, 22807.0, 26780.0, 25325.0, 21242.0, 25031.0, 25825.0, 18948.0, 20477.0, 22115.0, 22707.0, 18950.0, 28406.0, 21850.0, 23052.0, 21514.0, 24072.0, 25401.0, 19355.0, 18653.0, 23924.0, 28862.0, 17672.0, 22383.0, 25803.0, 23576.0, 22860.0, 25263.0, 21150.0, 27230.0, 24776.0, 25348.0, 27199.0, 20469.0, 24397.0, 25313.0, 20546.0, 19056.0, 23159.0, 21046.0, 21878.0, 29527.0, 19075.0, 23843.0, 25413.0, 21030.0, 27579.0, 21920.0, 23485.0, 22713.0, 17722.0, 28066.0, 20315.0, 17271.0, 25417.0, 21873.0, 24490.0, 27299.0, 25189.0, 21075.0, 27282.0, 25836.0, 18807.0, 19143.0, 22656.0, 26311.0, 24642.0, 24590.0, 22402.0, 25550.0, 24213.0, 20114.0, 19091.0, 21756.0, 18229.0, 22801.0, 18509.0, 27020.0, 18581.0, 20340.0, 23084.0, 22976.0, 24129.0, 25681.0, 17833.0, 25402.0, 29113.0, 23180.0, 25105.0, 29943.0]]
fig, axes = plt.subplots()
# Seaborn violin plot
sns.violinplot(data=a, width=0.6, color="w" )
# Matplotlib violin plot
# axes.violinplot(a, showmeans=True, showmedians=False, showextrema=False, widths = 0.6)
# axes.set_xticks([y+1 for y in range(2)])
# axes.set_xticks([y+1 for y in range(4)])
# plt.setp(axes, xticks=[y+1 for y in range(4)],
# xticklabels=['0', '1', '2', '3'])
plt.yscale('log' ,basey=10)
plt.show()
</code></pre></div>
<p dir="auto"><strong>Matplotlib</strong><br>
<a href="https://i.stack.imgur.com/pQGFU.png" rel="nofollow"><img src="https://camo.githubusercontent.com/25b8a08b666b46771b5b15f0253c9db298deb47eb37af3eab6e44f5c18e79242/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f70514746552e706e67" alt="matplotlib" data-canonical-src="https://i.stack.imgur.com/pQGFU.png" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Seaborn</strong><br>
<a href="https://i.stack.imgur.com/60yhS.png" rel="nofollow"><img src="https://camo.githubusercontent.com/39e992c45f569129a2c897b393bd2fbca32f6d7ae023853a0cb2a1daa18b6056/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f36307968532e706e67" alt="seaborn" data-canonical-src="https://i.stack.imgur.com/60yhS.png" style="max-width: 100%;"></a></p> | <p dir="auto">The <a href="https://seaborn.pydata.org/generated/seaborn.swarmplot.html#" rel="nofollow">online docs page for swarmplot</a> uses "dodge" in an example of the behaviour of "split".</p>
<p dir="auto">Copied from the doc page:</p>
<blockquote>
<p dir="auto"><strong><em>Split</em></strong> each level of the hue variable along the categorical axis:</p>
<blockquote>
<p dir="auto">ax = sns.swarmplot(x="day", y="total_bill", hue="smoker",<br>
... data=tips, palette="Set2", <strong><em>dodge</em></strong>=True)</p>
</blockquote>
</blockquote> | 0 |
<p dir="auto">Hello,<br>
When I updated atom to version 0.189.0 in my ubuntu desktop. It has problem with thai language.</p>
<p dir="auto">Now i down grade to 0.188.0. It work. Please fix it in next version. atom is good IDE for me.</p>
<p dir="auto">Thank you.</p> | <p dir="auto">Text:</p>
<blockquote>
<p dir="auto">这上面的夜的天空,奇怪而高,我生平没有见过这样奇怪而高的天空。他仿佛要离开人间而去,使人们仰面不再看见。然而现在却非常之蓝,闪闪地睒着几十个星星的眼,冷眼。他的口角上现出微笑,似乎自以为大有深意,而将繁霜洒在我的园里的野花草上。</p>
</blockquote>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/49931/6959354/a30f8266-d94a-11e4-9167-35ea308a5ad2.png"><img src="https://cloud.githubusercontent.com/assets/49931/6959354/a30f8266-d94a-11e4-9167-35ea308a5ad2.png" alt="3" style="max-width: 100%;"></a></p>
<p dir="auto">It happen after update to 0.189.0, and it's normal in 0.188.0 .</p>
<p dir="auto">I try disabled all community packages or star with <code class="notranslate">--safe</code> mode, still happen.</p>
<p dir="auto">Update: Ubuntu 14.04</p> | 1 |
<h1 dir="auto">Environment</h1>
<p dir="auto">Windows build number: 10.0.19023.0<br>
Windows Terminal version: 0.6.2951.0</p>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Download the following simple C# project:<br>
<a href="https://github.com/Treit/TerminalStress/tree/master/src">https://github.com/Treit/TerminalStress/tree/master/src</a></li>
<li>Launch wt.exe (Windows Terminal) and start a Developer Command Prompt for VS2019</li>
<li>Execute 'dotnet run' from the folder to which you downloaded the project in step 1.</li>
<li>While the stress application is running, hold down Ctrl and use the mouse wheel to 'zoom' the text to be larger.</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">No hang.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The terminal freezes and becomes unresponsive.</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):
Microsoft Windows [Version 10.0.18362.418]
Any other software?
WSL (version 1, not tried on WSL2 since not on Insider Program).
Terminal (version: 0.5.2762.0)"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):
Microsoft Windows [Version 10.0.18362.418]
Any other software?
WSL (version 1, not tried on WSL2 since not on Insider Program).
Terminal (version: 0.5.2762.0)
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Set up WSL as the default terminal to be used in the application.<br>
Start up the Terminal, and before the startup is complete (meaning, before the terminal is available to be interacted with), close it down.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Closing the instance of Terminal</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Blue screen on the pc, with a "KMODE EXCEPTION NOT HANDLED".</p>
<p dir="auto">I stand at disposal for whatever data might be needed.</p> | 0 |
<p dir="auto">I tried setting the <code class="notranslate">Authorization</code> header manually to make a request to the Github API, but authentication failed despite the same token working fine when making the request using cURL, <code class="notranslate">urllib.request.Request()</code>, and other methods.</p>
<h2 dir="auto">Expected Result</h2>
<p dir="auto">Successful auth and a <code class="notranslate">200 OK</code> response.</p>
<h2 dir="auto">Actual Result</h2>
<p dir="auto">Authentication fails with a <code class="notranslate">401 Bad Credentials</code> response.</p>
<p dir="auto">Upon inspecting the response's <code class="notranslate">request</code> attribute, I found that the <code class="notranslate">Authorization</code> header had been overwritten (looks like this happens <a href="https://github.com/psf/requests/blob/9cdf294/requests/auth.py#L95-L97">here</a>).</p>
<p dir="auto">I've since worked around this, but in my opinion, one should expect that if they are setting the <code class="notranslate">Authorization</code> header manually (rather than using the <code class="notranslate">auth</code> param), the header should not be overwritten.</p>
<p dir="auto">I can draft a PR to address this if the project maintainers agree to such a change.</p>
<h2 dir="auto">Reproduction Steps</h2>
<p dir="auto">Create an <a href="https://github.com/settings/tokens">access token</a> and then try to auth to the API like so:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="requests.get(
'https://api.github.com/notifications',
headers={'Authorization': 'token MY_TOKEN_HERE'}
)"><pre class="notranslate"><span class="pl-s1">requests</span>.<span class="pl-en">get</span>(
<span class="pl-s">'https://api.github.com/notifications'</span>,
<span class="pl-s1">headers</span><span class="pl-c1">=</span>{<span class="pl-s">'Authorization'</span>: <span class="pl-s">'token MY_TOKEN_HERE'</span>}
)</pre></div>
<h2 dir="auto">System Information</h2>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.9"
},
"implementation": {
"name": "CPython",
"version": "3.8.2"
},
"platform": {
"release": "5.6.3-arch1-1",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.23.0"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.25.8"
},
"using_pyopenssl": false
}"><pre class="notranslate">{
<span class="pl-s">"chardet"</span>: {
<span class="pl-s">"version"</span>: <span class="pl-s">"3.0.4"</span>
},
<span class="pl-s">"cryptography"</span>: {
<span class="pl-s">"version"</span>: <span class="pl-s">""</span>
},
<span class="pl-s">"idna"</span>: {
<span class="pl-s">"version"</span>: <span class="pl-s">"2.9"</span>
},
<span class="pl-s">"implementation"</span>: {
<span class="pl-s">"name"</span>: <span class="pl-s">"CPython"</span>,
<span class="pl-s">"version"</span>: <span class="pl-s">"3.8.2"</span>
},
<span class="pl-s">"platform"</span>: {
<span class="pl-s">"release"</span>: <span class="pl-s">"5.6.3-arch1-1"</span>,
<span class="pl-s">"system"</span>: <span class="pl-s">"Linux"</span>
},
<span class="pl-s">"pyOpenSSL"</span>: {
<span class="pl-s">"openssl_version"</span>: <span class="pl-s">""</span>,
<span class="pl-s">"version"</span>: <span class="pl-s1">null</span>
},
<span class="pl-s">"requests"</span>: {
<span class="pl-s">"version"</span>: <span class="pl-s">"2.23.0"</span>
},
<span class="pl-s">"system_ssl"</span>: {
<span class="pl-s">"version"</span>: <span class="pl-s">"1010106f"</span>
},
<span class="pl-s">"urllib3"</span>: {
<span class="pl-s">"version"</span>: <span class="pl-s">"1.25.8"</span>
},
<span class="pl-s">"using_pyopenssl"</span>: <span class="pl-s1">false</span>
}</pre></div> | <h2 dir="auto">Summary</h2>
<p dir="auto">Explicitly calling out method-level auth parameter that matches associated session-level auth seems to yield functionally different behavior.</p>
<h2 dir="auto">Expected Results</h2>
<p dir="auto">I am parsing a CSV file containing references to local filenames that I am uploading via Requests to a RESTful API I'm helping test. The intended behavior is for the script to upload the files referenced in the CSV after establishing Digest authentication. The server should respond 401, then requests should respond accordingly, followed by a 200 response from the server.</p>
<h2 dir="auto">Actual Results</h2>
<p dir="auto">I recently encountered an error response from the server and found I got a different response simply by updating my python code to use Session() objects. Upon further testing, I have developed two code blocks that appear to be functionally equivalent but receive very different responses from the server. I am having a hard time determining why these two code blocks behave differently.</p>
<p dir="auto">The first code block shown below properly negotiates Digest authentication, receiving a 401 response from the server, sending the second part of the request, then receiving a 200 response.</p>
<p dir="auto">The second code block is as close to the first as I can make it while still reproducing the problem. Notice the code snippet contains a method-level auth argument which is an exact duplicate of the session-level authentication. However, for whatever reason, the API I'm testing responds 502 to this latter code block in response to the initial request, i.e. the point at which I would expect a 401 response. I will address the server-side error, but I'm confused regarding how the two blocks of code are functionally different.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sys, time, requests, csv
from requests.auth import HTTPDigestAuth, HTTPBasicAuth
custom_header = {'X-Requested-Auth': 'Digest'}
host = raw_input("Enter host address, including scheme: ")
user = raw_input("Enter username: ")
password = raw_input("Enter password: ")
#v1 is a string representation of some xml
with open('myFiles.csv', 'rb') as csvfile:
csvin = csv.DictReader(csvfile, delimiter=',', quotechar='"')
with requests.Session() as s:
#Define session-level auth method and custom header
s.auth = HTTPDigestAuth(user, password)
s.headers.update(custom_header)
for row in csvin:
data = {'param1': v1, 'param2': 'some value'}
with open(row['Presentation File'], 'rb') as f:
print "Track found. Uploading..."
r = s.post(host+'/api/uploadTrack', data=data, files={'file': (row['Presentation File'],f)}, verify=False, timeout=(6.05, 70))"><pre class="notranslate"><code class="notranslate">import sys, time, requests, csv
from requests.auth import HTTPDigestAuth, HTTPBasicAuth
custom_header = {'X-Requested-Auth': 'Digest'}
host = raw_input("Enter host address, including scheme: ")
user = raw_input("Enter username: ")
password = raw_input("Enter password: ")
#v1 is a string representation of some xml
with open('myFiles.csv', 'rb') as csvfile:
csvin = csv.DictReader(csvfile, delimiter=',', quotechar='"')
with requests.Session() as s:
#Define session-level auth method and custom header
s.auth = HTTPDigestAuth(user, password)
s.headers.update(custom_header)
for row in csvin:
data = {'param1': v1, 'param2': 'some value'}
with open(row['Presentation File'], 'rb') as f:
print "Track found. Uploading..."
r = s.post(host+'/api/uploadTrack', data=data, files={'file': (row['Presentation File'],f)}, verify=False, timeout=(6.05, 70))
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sys, time, requests, csv
from requests.auth import HTTPDigestAuth, HTTPBasicAuth
custom_header = {'X-Requested-Auth': 'Digest'}
host = raw_input("Enter host address, including scheme: ")
user = raw_input("Enter username: ")
password = raw_input("Enter password: ")
#v1 is a string representation of some xml
with open('myFiles.csv', 'rb') as csvfile:
csvin = csv.DictReader(csvfile, delimiter=',', quotechar='"')
with requests.Session() as s:
#Define session-level auth method and custom header
s.auth = HTTPDigestAuth(user, password)
s.headers.update(custom_header)
for row in csvin:
data = {'param1': v1, 'param2': 'some value'}
with open(row['Presentation File'], 'rb') as f:
print "Track found. Uploading..."
r = s.post(host+'/api/uploadTrack', auth=HTTPDigestAuth(user, password), data=data, files={'file': (row['Presentation File'],f)}, verify=False, timeout=(6.05, 70))"><pre class="notranslate"><code class="notranslate">import sys, time, requests, csv
from requests.auth import HTTPDigestAuth, HTTPBasicAuth
custom_header = {'X-Requested-Auth': 'Digest'}
host = raw_input("Enter host address, including scheme: ")
user = raw_input("Enter username: ")
password = raw_input("Enter password: ")
#v1 is a string representation of some xml
with open('myFiles.csv', 'rb') as csvfile:
csvin = csv.DictReader(csvfile, delimiter=',', quotechar='"')
with requests.Session() as s:
#Define session-level auth method and custom header
s.auth = HTTPDigestAuth(user, password)
s.headers.update(custom_header)
for row in csvin:
data = {'param1': v1, 'param2': 'some value'}
with open(row['Presentation File'], 'rb') as f:
print "Track found. Uploading..."
r = s.post(host+'/api/uploadTrack', auth=HTTPDigestAuth(user, password), data=data, files={'file': (row['Presentation File'],f)}, verify=False, timeout=(6.05, 70))
</code></pre></div>
<h2 dir="auto">System Information</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.5"
},
"platform": {
"release": "3.10.0-693.2.2.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000105f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}"><pre class="notranslate"><code class="notranslate">{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.5"
},
"platform": {
"release": "3.10.0-693.2.2.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000105f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
</code></pre></div>
<p dir="auto">Note that I can reproduce in a Windows environment using request 2.11.1, so this is not a recent regression.</p> | 0 |
<p dir="auto">I need to type both stateless component and classic component in single component property:</p>
<p dir="auto"><strong>TypeScript Version:</strong><br>
1.8.10/1.9.0-dev.20160518-1.0</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// A self-contained demonstration of the problem follows...
// Ideally:
interface ComponentProps {
ButtonComponent: React.StatelessComponent<any> | React.ComponentClass<any>;
...
}
class MyComponent extends React.Component<ComponentProps, {}> {
render() {
const { ButtonComponent } = this.props;
const someProps = {};
const button = <ButtonComponent {...someProps}/>
return (<div>{button}</div>);
}
}
// Ideal usage
<MyComponent ButtonComponent={() => <button>test</button>}/>
class MyButtonComponent extends React.Component<{},{}> {
...
}
<MyComponent ButtonComponent={MyButtonComponent} />"><pre class="notranslate"><span class="pl-c">// A self-contained demonstration of the problem follows...</span>
<span class="pl-c">// Ideally:</span>
<span class="pl-k">interface</span> <span class="pl-smi">ComponentProps</span> <span class="pl-kos">{</span>
<span class="pl-c1">ButtonComponent</span>: <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-smi">StatelessComponent</span><span class="pl-kos"><</span><span class="pl-smi">any</span><span class="pl-kos">></span> <span class="pl-c1">|</span> <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-smi">ComponentClass</span><span class="pl-kos"><</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-k">class</span> <span class="pl-smi">MyComponent</span> <span class="pl-k">extends</span> <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span><span class="pl-kos"><</span><span class="pl-smi">ComponentProps</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">render</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-kos">{</span> ButtonComponent <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">someProps</span> <span class="pl-c1">=</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">button</span> <span class="pl-c1">=</span> <span class="pl-kos"><</span><span class="pl-smi">ButtonComponent</span><span class="pl-kos"></span> <span class="pl-kos">{</span>...<span class="pl-s1">someProps</span><span class="pl-kos">}</span><span class="pl-c1">/</span><span class="pl-s1"></span><span class="pl-c1">></span>
<span class="pl-s1">return</span> <span class="pl-kos">(</span><span class="pl-kos"><</span><span class="pl-smi">div</span><span class="pl-kos">></span><span class="pl-kos">{</span>button<span class="pl-kos">}</span><span class="pl-c1"><</span><span class="pl-c1">/</span>div><span class="pl-kos">)</span>;
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-c">// Ideal usage</span>
<span class="pl-c1"><</span><span class="pl-smi">MyComponent</span> <span class="pl-smi">ButtonComponent</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-c1"><</span><span class="pl-smi">button</span><span class="pl-c1">></span><span class="pl-c1">test</span><span class="pl-c1"><</span><span class="pl-pds"><span class="pl-c1">/</span>button><span class="pl-kos">}</span><span class="pl-c1">/</span></span><span class="pl-c1">></span>
<span class="pl-k">class</span> <span class="pl-smi">MyButtonComponent</span> <span class="pl-k">extends</span> <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span><span class="pl-c1"><</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">></span> <span class="pl-kos">{</span>
...
<span class="pl-kos">}</span>
<span class="pl-kos"><</span><span class="pl-smi">MyComponent</span><span class="pl-kos"></span> <span class="pl-smi">ButtonComponent</span><span class="pl-c1">=</span><span class="pl-kos">{</span>MyButtonComponent<span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">></span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
Compiles successfully</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
Throws error: "JSX Element type ButtonComponent doesn't have any construct or call signatures"<br>
It works If i change definition of ButtonComponent to just solo React.StatelessComponent or<br>
React.ComponentClass</p> | <p dir="auto">It would be nice to not do <code class="notranslate">///<reference path="to/declaration.d.ts"/></code> on source files to be able to compile with dependencies. It becomes problematic when you move files around and you have to go through each file that has those reference paths. I'm suggesting a different way of including reference paths, something like:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="tsc src/somemodule.ts --reference typings/references.d.ts"><pre class="notranslate">tsc src/somemodule.ts --reference typings/references.d.ts</pre></div>
<p dir="auto">Instead of:</p>
<p dir="auto">somemodule.ts</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// <reference path="../typings/references.d.ts"/>
export function HelloWorld(): void {
}"><pre class="notranslate"><code class="notranslate">/// <reference path="../typings/references.d.ts"/>
export function HelloWorld(): void {
}
</code></pre></div>
<p dir="auto">I would only have this:</p>
<p dir="auto">somemodule.ts</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export function HelloWorld(): void {
}"><pre class="notranslate"><code class="notranslate">export function HelloWorld(): void {
}
</code></pre></div> | 0 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[root@master ~]# ansible --version
ansible 2.1.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
"><pre class="notranslate"><code class="notranslate">[root@master ~]# ansible --version
ansible 2.1.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">I just setup 2 boxes with RHEL 6.6 and installed ansible on the master node. I setup passwordless ssh for root user between the 2 nodes and can successfully ssh from A (ansible machine) to B without entering password.</p>
<p dir="auto">Now I am trying to run the command:</p>
<p dir="auto">ansible all -m ping -i /app/ansible/env</p>
<p dir="auto">But am getting the ERROR everytime</p>
<p dir="auto">10.0.0.23 | FAILED! => {<br>
"failed": true,<br>
"msg": "failed to resolve remote temporary directory from ansible-tmp-1468175944.42-138203382041728: <code class="notranslate">( umask 77 && mkdir -p \"</code> echo $HOME/.ansible/tmp/ansible-tmp-1468175944.42-138203382041728 <code class="notranslate">\" && echo ansible-tmp-1468175944.42-138203382041728=\"</code> echo $HOME/.ansible/tmp/ansible-tmp-1468175944.42-138203382041728 <code class="notranslate">\" )</code> returned empty string"<br>
}</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible all -m ping -i /app/ansible/env"><pre class="notranslate"><code class="notranslate">ansible all -m ping -i /app/ansible/env
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Was expecting a successful ping</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="10.0.0.23 | FAILED! => {
"failed": true,
"msg": "failed to resolve remote temporary directory from ansible-tmp-1468175944.42-138203382041728: `( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1468175944.42-138203382041728 `\" && echo ansible-tmp-1468175944.42-138203382041728=\"` echo $HOME/.ansible/tmp/ansible-tmp-1468175944.42-138203382041728 `\" )` returned empty string"
}"><pre class="notranslate"><code class="notranslate">10.0.0.23 | FAILED! => {
"failed": true,
"msg": "failed to resolve remote temporary directory from ansible-tmp-1468175944.42-138203382041728: `( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1468175944.42-138203382041728 `\" && echo ansible-tmp-1468175944.42-138203382041728=\"` echo $HOME/.ansible/tmp/ansible-tmp-1468175944.42-138203382041728 `\" )` returned empty string"
}
</code></pre></div> | <p dir="auto">After I upgrade ansible 2.0.0.1 from 1.9.4, when performing a playlook always encounter intermittent fault "failed to resolve remote temporary directory from".</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook playlooks/playlook-filters.yml
PLAY ***************************************************************************
TASK [command] *****************************************************************
fatal: [YT_8_22]: FAILED! => {"failed": true, "msg": "ERROR! failed to resolve remote temporary directory from ansible-tmp-1452759681.1-95441304852350: `( umask 22 && mkdir -p \"$( echo /tmp/.ansible/tmp/ansible-tmp-1452759681.1-95441304852350 )\" && echo \"$( echo /tmp/.ansible/tmp/ansible-tmp-1452759681.1-95441304852350 )\" )` returned empty string"}
...ignoring
TASK [debug] *******************************************************************
ok: [YT_8_22] => {
"msg": "it failed"
}
PLAY RECAP *********************************************************************
YT_8_22 : ok=2 changed=0 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">$ ansible-playbook playlooks/playlook-filters.yml
PLAY ***************************************************************************
TASK [command] *****************************************************************
fatal: [YT_8_22]: FAILED! => {"failed": true, "msg": "ERROR! failed to resolve remote temporary directory from ansible-tmp-1452759681.1-95441304852350: `( umask 22 && mkdir -p \"$( echo /tmp/.ansible/tmp/ansible-tmp-1452759681.1-95441304852350 )\" && echo \"$( echo /tmp/.ansible/tmp/ansible-tmp-1452759681.1-95441304852350 )\" )` returned empty string"}
...ignoring
TASK [debug] *******************************************************************
ok: [YT_8_22] => {
"msg": "it failed"
}
PLAY RECAP *********************************************************************
YT_8_22 : ok=2 changed=0 unreachable=0 failed=0
</code></pre></div>
<p dir="auto">This is happening for one of the tasks randomly, following are those tasks:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---
- hosts: YT_8_22
tasks:
- shell: /bin/true
register: result
ignore_errors: True
- debug: msg="it failed"
when: result|failed"><pre class="notranslate"><code class="notranslate">
---
- hosts: YT_8_22
tasks:
- shell: /bin/true
register: result
ignore_errors: True
- debug: msg="it failed"
when: result|failed
</code></pre></div>
<p dir="auto">I try on 1.9.4, have not seen the phenomenon. Can anybody tell me how to do that ?</p>
<p dir="auto">I found another links to similar problems: <a href="https://groups.google.com/forum/#!searchin/ansible-project/Intermittent$20error%7Csort:relevance/ansible-project/FyK6au2O9KY/tWuf31P9AQAJ" rel="nofollow">https://groups.google.com/forum/#!searchin/ansible-project/Intermittent$20error%7Csort:relevance/ansible-project/FyK6au2O9KY/tWuf31P9AQAJ</a></p> | 1 |
<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">The <code class="notranslate"><Tooltip></code> popper should abide by the <code class="notranslate">placement</code> prop (default: <code class="notranslate">bottom</code>) when opening from within a cell in a <code class="notranslate"><TableHead></code></p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The <code class="notranslate"><Tooltip></code> popper always appears in the top left corner of the screen when opening from within a cell in a <code class="notranslate"><TableHead></code></p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Create a <code class="notranslate"><Table></code> with any number of rows/columns</li>
<li>Place a <code class="notranslate"><Tooltip></code> inside a cell in the <code class="notranslate"><TableHead></code></li>
<li>Hover over the <code class="notranslate"><Tooltip></code> to open the popper</li>
<li>Notice that the popper is always in the upper left corner of the screen</li>
<li>Notice that any <code class="notranslate"><Tooltip></code> in a cell in the <code class="notranslate"><TableBody></code> seems to work fine</li>
</ol>
<p dir="auto">You can see all of this here: <a href="https://codesandbox.io/s/nkpmr083lm" rel="nofollow">https://codesandbox.io/s/nkpmr083lm</a></p>
<h2 dir="auto">Context</h2>
<p dir="auto">I'm trying to give my users a help icon on certain column values in the table header that they can hover over to see a tooltip describing what it means.</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>v1.0.0-beta.12</td>
</tr>
<tr>
<td>Material-UI Icons</td>
<td>v1.0.0-beta.10</td>
</tr>
<tr>
<td>React</td>
<td>v15.6.2 and v16.0.0 (tried both)</td>
</tr>
<tr>
<td>Browser</td>
<td>Chrome Version 61.0.3163.100 (Official Build) (64-bit)</td>
</tr>
</tbody>
</table> | <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/mui-org/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">Have access to add html attributes to <code class="notranslate"><Button></code> and <code class="notranslate"><ButtonBase>.</code> For example be able to set tabindex to -1 on a button.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Based on the documentation, there does not appear to be access to these attributes.</p>
<p dir="auto">Links: <a href="https://material-ui-next.com/api/button-base/" rel="nofollow">ButtonBase</a> | <a href="https://material-ui-next.com/api/button/" rel="nofollow">Button</a></p>
<h2 dir="auto">Context</h2>
<p dir="auto">I have buttons that are hidden until the user hovers over a section. I don't want them to accidentally tab into them and activate them.</p> | 0 |
<p dir="auto">The standard way of representing an LRU is to have nodes be stored in a hashmap or binary search tree, with lookup-by-key, and in a linked-list which represents recency. This allows O(1) or O(logn) lookup/insert time, and constant time update/eviction with the recency list.</p>
<p dir="auto">The representation is usually something like:</p>
<div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct LRU<K,V> {
struct node<K,V> *tree_root;
struct node<K,V> *recency_head, *recency_tail;
}
struct node<K,V> {
K key;
V value;
struct node<K,V> *tree_parent, *tree_left, *tree_right;
struct node<K,V> *recency_prev, *recency_next;
}"><pre class="notranslate"><span class="pl-k">struct</span> <span class="pl-en">LRU</span><K,V> {
<span class="pl-k">struct</span> <span class="pl-en">node</span><K,V> *tree_root;
<span class="pl-k">struct</span> <span class="pl-en">node</span><K,V> *recency_head, *recency_tail;
}<span class="pl-ii"></span>
<span class="pl-k">struct</span> <span class="pl-en">node</span><K,V> {
K key;
V value;
<span class="pl-k">struct</span> <span class="pl-en">node</span><K,V> *tree_parent, *tree_left, *tree_right;
<span class="pl-k">struct</span> <span class="pl-en">node</span><K,V> *recency_prev, *recency_next;
}<span class="pl-ii"></span></pre></div>
<p dir="auto">This is more difficult to represent in Rust. You could do it with <code class="notranslate">@mut</code> pointers, but we all know what would go wrong there, and also that would prevent you from sharing it between tasks. You could also do it with unsafe pointers. I suggest instead representing it as a vector, and replacing the pointers with indices into the vector.</p> | <p dir="auto">It would be really nice to have a very efficient, reusable implementation of this common pattern. It can be implemented as a hash table with an intrusive doubly linked list threaded through the entries.</p>
<p dir="auto">This is also how Python implements <code class="notranslate">OrderedDict</code> and Java implements <code class="notranslate">LinkedHashMap</code>.</p> | 1 |
<p dir="auto">When running a the test suite we get a number <code class="notranslate">PendingDeprecationWarning</code>,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
return matrix(data, dtype=dtype, copy=False)"><pre class="notranslate"><code class="notranslate">PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
return matrix(data, dtype=dtype, copy=False)
</code></pre></div>
<p dir="auto">See for instance <a href="https://ci.appveyor.com/project/sklearn-ci/scikit-learn/builds/19341228/job/q6rysq7flma8hi6v" rel="nofollow">https://ci.appveyor.com/project/sklearn-ci/scikit-learn/builds/19341228/job/q6rysq7flma8hi6v</a> Warnings seems to be hidden on Travis so we don't see those there.</p>
<p dir="auto">This typically happens when we have a sparse matrix, sum along one axis to get a dense one, than do some mathematical operation with this matrix. It should be explicitly converted to an array first.</p>
<p dir="auto">This has also been reported by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/drorata/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/drorata">@drorata</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="331924701" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/11251" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11251/hovercard?comment_id=427865173&comment_type=issue_comment" href="https://github.com/scikit-learn/scikit-learn/pull/11251#issuecomment-427865173">#11251 (comment)</a>. There was previous discussion about this in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="331924701" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/11251" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11251/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/11251">#11251</a> but it doesn't look like it's fixed. I also saw this recently when running PyPy CI.</p>
<p dir="auto">To investigate where this happen it's sufficient to run pytest tests with <code class="notranslate">-Werror::PendingDeprecationWarning</code> to error on those warnings, as they don't seem to be raised with the right stacklevel (see also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="193111938" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/7963" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/7963/hovercard?comment_id=265420200&comment_type=issue_comment" href="https://github.com/scikit-learn/scikit-learn/issues/7963#issuecomment-265420200">#7963 (comment)</a> for workarounds)</p> | <p dir="auto">For example: <a href="https://travis-ci.org/scikit-learn/scikit-learn/builds/340387057" rel="nofollow">https://travis-ci.org/scikit-learn/scikit-learn/builds/340387057</a>. I can reproduce locally.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="________________________________ test_max_iter _________________________________
@ignore_warnings
def test_max_iter():
# Test that the maximum number of iteration is reached
X, y_bin = iris.data, iris.target.copy()
y_bin[y_bin == 2] = 0
solvers = ['newton-cg', 'liblinear', 'sag', 'saga', 'lbfgs']
for max_iter in range(1, 5):
for solver in solvers:
for multi_class in ['ovr', 'multinomial']:
if solver == 'liblinear' and multi_class == 'multinomial':
continue
lr = LogisticRegression(max_iter=max_iter, tol=1e-15,
multi_class=multi_class,
random_state=0, solver=solver)
lr.fit(X, y_bin)
> assert_equal(lr.n_iter_[0], max_iter)
X = array([[ 5.1, 3.5, 1.4, 0.2],
[ 4.9, 3. , 1.4, 0.2],
[ 4.7, 3.2, 1.3, 0.2],
[ 4.6, 3.1,... 2.5, 5. , 1.9],
[ 6.5, 3. , 5.2, 2. ],
[ 6.2, 3.4, 5.4, 2.3],
[ 5.9, 3. , 5.1, 1.8]])
lr = LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,
intercept_scaling=1, max_iter=1...r', n_jobs=1,
penalty='l2', random_state=0, solver='lbfgs', tol=1e-15,
verbose=0, warm_start=False)
max_iter = 1
multi_class = 'ovr'
solver = 'lbfgs'
solvers = ['newton-cg', 'liblinear', 'sag', 'saga', 'lbfgs']
y_bin = array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
/home/travis/build/scikit-learn/scikit-learn/sklearn/linear_model/tests/test_logistic.py:1053:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/python/3.6.3/lib/python3.6/unittest/case.py:829: in assertEqual
assertion_func(first, second, msg=msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__>
first = 0, second = 1, msg = '0 != 1'
def _baseAssertEqual(self, first, second, msg=None):
"""The default assertEqual implementation, not type specific."""
if not first == second:
standardMsg = '%s != %s' % _common_shorten_repr(first, second)
msg = self._formatMessage(msg, standardMsg)
> raise self.failureException(msg)
E AssertionError: 0 != 1
first = 0
msg = '0 != 1'
second = 1
self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__>
standardMsg = '0 != 1'
/opt/python/3.6.3/lib/python3.6/unittest/case.py:822: AssertionError"><pre class="notranslate"><code class="notranslate">________________________________ test_max_iter _________________________________
@ignore_warnings
def test_max_iter():
# Test that the maximum number of iteration is reached
X, y_bin = iris.data, iris.target.copy()
y_bin[y_bin == 2] = 0
solvers = ['newton-cg', 'liblinear', 'sag', 'saga', 'lbfgs']
for max_iter in range(1, 5):
for solver in solvers:
for multi_class in ['ovr', 'multinomial']:
if solver == 'liblinear' and multi_class == 'multinomial':
continue
lr = LogisticRegression(max_iter=max_iter, tol=1e-15,
multi_class=multi_class,
random_state=0, solver=solver)
lr.fit(X, y_bin)
> assert_equal(lr.n_iter_[0], max_iter)
X = array([[ 5.1, 3.5, 1.4, 0.2],
[ 4.9, 3. , 1.4, 0.2],
[ 4.7, 3.2, 1.3, 0.2],
[ 4.6, 3.1,... 2.5, 5. , 1.9],
[ 6.5, 3. , 5.2, 2. ],
[ 6.2, 3.4, 5.4, 2.3],
[ 5.9, 3. , 5.1, 1.8]])
lr = LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,
intercept_scaling=1, max_iter=1...r', n_jobs=1,
penalty='l2', random_state=0, solver='lbfgs', tol=1e-15,
verbose=0, warm_start=False)
max_iter = 1
multi_class = 'ovr'
solver = 'lbfgs'
solvers = ['newton-cg', 'liblinear', 'sag', 'saga', 'lbfgs']
y_bin = array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
/home/travis/build/scikit-learn/scikit-learn/sklearn/linear_model/tests/test_logistic.py:1053:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/python/3.6.3/lib/python3.6/unittest/case.py:829: in assertEqual
assertion_func(first, second, msg=msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__>
first = 0, second = 1, msg = '0 != 1'
def _baseAssertEqual(self, first, second, msg=None):
"""The default assertEqual implementation, not type specific."""
if not first == second:
standardMsg = '%s != %s' % _common_shorten_repr(first, second)
msg = self._formatMessage(msg, standardMsg)
> raise self.failureException(msg)
E AssertionError: 0 != 1
first = 0
msg = '0 != 1'
second = 1
self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__>
standardMsg = '0 != 1'
/opt/python/3.6.3/lib/python3.6/unittest/case.py:822: AssertionError
</code></pre></div>
<p dir="auto">Very likely due to a scipy lbfgs fix: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="295072337" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/8374" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/8374/hovercard" href="https://github.com/scipy/scipy/pull/8374">scipy/scipy#8374</a>. It looks like we will need to adapt <code class="notranslate">n_iter_</code> depending on the scipy version ...</p> | 0 |
<p dir="auto">when i run imagenet example ; in tensorflow/models/image/imagenet/classify_image.py i add</p>
<ul dir="auto">
<li>w=tf.python.training.summary_io.SummaryWriter( sess.graph_def, FLAGS.model_dir, 'graph.pbtxt')</li>
<li>tf.train.SummaryWriter.flush(w)</li>
<li>tf.train.SummaryWriter.close(w)</li>
</ul>
<p dir="auto">output a file: events.out.tfevents.1452154974.ip-172-30-.-.<br>
when i open tensorboard , in tab graph ,then i check top,tensorboard use cpu 100%; but wait a while ,tensorboard cpu use is down; tensorboard log a http 200:"GET /graph?run=%2Fopt%2Fpractice%2Ftf%2Fimagenet%2Flog%2F HTTP/1.1" 200 ;</p>
<p dir="auto">maybe event file so big cause http timeout??<br>
92M Jan 7 09:01 log/events.out.tfevents.1452154974.ip-172-30</p>
<p dir="auto">any one can help?</p> | <h3 dir="auto">Summary</h3>
<p dir="auto">Attempting to visualize the Inception v3 graph with TensorBoard results in an empty graph (after several minutes of loading).</p>
<p dir="auto"><em>Update: an earlier version of this issue indicated that the progress bar hung forever, but apparently, I just didn't wait long enough.</em></p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System: OS X 10.11.3, Chrome 48.0.2564.116, Anaconda 1.2.2</p>
<p dir="auto">If installed from binary pip package, provide:</p>
<ol dir="auto">
<li>Which pip package you installed: <a href="https://storage.googleapis.com/tensorflow/mac/tensorflow-0.7.1-cp35-none-any.whl" rel="nofollow">https://storage.googleapis.com/tensorflow/mac/tensorflow-0.7.1-cp35-none-any.whl</a></li>
<li>The output from python -c "import tensorflow; print(tensorflow.<strong>version</strong>)".: <code class="notranslate">0.7.1</code></li>
</ol>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>Downloaded and un-tar the <a href="http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz" rel="nofollow">inception v3 model</a>. The graph protobuffer is in <code class="notranslate">/tmp/imagenet/classify_image_graph_def.pb</code>.</li>
<li>Run this code to dump the graph:</li>
</ol>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" import os
import os.path
import tensorflow as tf
from tensorflow.python.platform import gfile
INCEPTION_LOG_DIR = '/tmp/inception_v3_log'
if not os.path.exists(INCEPTION_LOG_DIR):
os.makedirs(INCEPTION_LOG_DIR)
with tf.Session() as sess:
model_filename = '/tmp/imagenet/classify_image_graph_def.pb'
with gfile.FastGFile(model_filename, 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
_ = tf.import_graph_def(graph_def, name='')
writer = tf.train.SummaryWriter(INCEPTION_LOG_DIR, graph_def)
writer.close()"><pre class="notranslate"> <span class="pl-k">import</span> <span class="pl-s1">os</span>
<span class="pl-k">import</span> <span class="pl-s1">os</span>.<span class="pl-s1">path</span>
<span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span>
<span class="pl-k">from</span> <span class="pl-s1">tensorflow</span>.<span class="pl-s1">python</span>.<span class="pl-s1">platform</span> <span class="pl-k">import</span> <span class="pl-s1">gfile</span>
<span class="pl-v">INCEPTION_LOG_DIR</span> <span class="pl-c1">=</span> <span class="pl-s">'/tmp/inception_v3_log'</span>
<span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">os</span>.<span class="pl-s1">path</span>.<span class="pl-en">exists</span>(<span class="pl-v">INCEPTION_LOG_DIR</span>):
<span class="pl-s1">os</span>.<span class="pl-en">makedirs</span>(<span class="pl-v">INCEPTION_LOG_DIR</span>)
<span class="pl-k">with</span> <span class="pl-s1">tf</span>.<span class="pl-v">Session</span>() <span class="pl-k">as</span> <span class="pl-s1">sess</span>:
<span class="pl-s1">model_filename</span> <span class="pl-c1">=</span> <span class="pl-s">'/tmp/imagenet/classify_image_graph_def.pb'</span>
<span class="pl-k">with</span> <span class="pl-s1">gfile</span>.<span class="pl-v">FastGFile</span>(<span class="pl-s1">model_filename</span>, <span class="pl-s">'rb'</span>) <span class="pl-k">as</span> <span class="pl-s1">f</span>:
<span class="pl-s1">graph_def</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-v">GraphDef</span>()
<span class="pl-s1">graph_def</span>.<span class="pl-v">ParseFromString</span>(<span class="pl-s1">f</span>.<span class="pl-en">read</span>())
<span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">import_graph_def</span>(<span class="pl-s1">graph_def</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">''</span>)
<span class="pl-s1">writer</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">train</span>.<span class="pl-v">SummaryWriter</span>(<span class="pl-v">INCEPTION_LOG_DIR</span>, <span class="pl-s1">graph_def</span>)
<span class="pl-s1">writer</span>.<span class="pl-en">close</span>()</pre></div>
<ol dir="auto">
<li>Run tensorboard: <code class="notranslate">tensorboard --logdir /tmp/inception_v3_log</code></li>
<li>Navigate to graphs tab at <a href="http://0.0.0.0:6006/#graphs" rel="nofollow">http://0.0.0.0:6006/#graphs</a></li>
</ol>
<p dir="auto"><strong>Expected result:</strong> the graph<br>
<strong>Actual result:</strong> Empty graph screen (after several minutes of loading with no movement of the progress bar)</p>
<p dir="auto">A 91 MB file (same size as the graph protobuffer) called <code class="notranslate">events.out.tfevents.1456423256.[hostname]</code> is correctly saved to the log directory, so it seems that the graph is in there somewhere.</p>
<h3 dir="auto">What have you tried?</h3>
<ol dir="auto">
<li>Installing Python 2 pip version of TensorFlow 0.7.1 in a separate conda environment; same results.</li>
<li>Running <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/mnist/mnist_with_summaries.py">mnist_summaries_example</a>; graph is shown in TensorBoard properly, so this is a problem with the Inception model</li>
</ol> | 1 |
<p dir="auto">Hi it seems that the chrome dev tools in 0.27.x do not see source maps</p>
<p dir="auto">I am programming with clojurescript and when I use the chrome dev-tools on in 0.26.1 I can see both the <code class="notranslate">.js</code> files and the <code class="notranslate">.cljs</code> files.</p>
<p dir="auto">In 0.27.0 and 0.27.2 I only can see the <code class="notranslate">.js</code> files</p> | <p dir="auto">Running a file through browserify using <a href="https://github.com/maxogden/wzrd/">wzrd</a> to serve the content on <code class="notranslate">localhost:9966</code>.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="wzrd index.js -- -d"><pre class="notranslate">wzrd index.js -- -d</pre></div>
<p dir="auto">This works fine in regular Chrome DevTools. However, opening <code class="notranslate">http://localhost:9966/</code> in Electron and viewing its DevTools is not working with source maps. (They are enabled in the DevTools options).</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1383811/7922933/8f434a26-087d-11e5-9460-67eadadf8165.png"><img src="https://cloud.githubusercontent.com/assets/1383811/7922933/8f434a26-087d-11e5-9460-67eadadf8165.png" alt="screen shot 2015-06-01 at 4 44 19 pm" style="max-width: 100%;"></a></p>
<p dir="auto">Is there a particular switch that needs to be set, or is this just not supported in Electron? Or maybe a bug? Couldn't find much after googling and searching through issues.</p>
<p dir="auto">Cheers. <g-emoji class="g-emoji" alias="beer" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f37a.png">🍺</g-emoji></p> | 1 |
<p dir="auto"><del>Good first issue.</del></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="throw new Error("abcd");"><pre class="notranslate"><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">"abcd"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">gives the output</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/29990554/79696348-0d596100-8274-11ea-8afc-1f55ab2fb5e1.png"><img src="https://user-images.githubusercontent.com/29990554/79696348-0d596100-8274-11ea-8afc-1f55ab2fb5e1.png" width="420" style="max-width: 100%;"></a></p>
<p dir="auto">That second line, the "source name" is always the same as the first frame. The line number is written in three places and one of them is invisible here.</p>
<p dir="auto">I'd rather see something like this:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/29990554/79696430-9cff0f80-8274-11ea-92d1-e4acbfe8d9e2.png"><img src="https://user-images.githubusercontent.com/29990554/79696430-9cff0f80-8274-11ea-92d1-e4acbfe8d9e2.png" width="420" style="max-width: 100%;"></a></p> | <h1 dir="auto">Summary</h1>
<p dir="auto">Deno has panicked when run bellow code at interactive mode.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const str = "🌍🤖😸🎉";
console.log(str.slice(0,3));"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-s">"🌍🤖😸🎉"</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">str</span><span class="pl-kos">.</span><span class="pl-en">slice</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Error message</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@523db2214abf:/# RUST_BACKTRACE=1 deno
Deno 1.21.3
exit using ctrl+d or close()
> const str = "🌍🤖😸🎉";
undefined
> console.log(str.slice(0,3));
🌍�
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: linux x86_64
Version: 1.21.3
Args: ["deno"]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unexpected end of hex escape", line: 1, column: 113)', /home/runner/work/deno/deno/core/inspector.rs:724:66
stack backtrace:
0: rust_begin_unwind
at ./rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
1: core::panicking::panic_fmt
at ./rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
2: core::result::unwrap_failed
at ./rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/result.rs:1690:5
3: core::result::Result<T,E>::unwrap
4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
5: <futures_util::future::select::Select<A,B> as core::future::future::Future>::poll
6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
11: deno::tools::repl::run::{{closure}}
12: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
13: deno::main::{{closure}}
14: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::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.
root@523db2214abf:/#"><pre class="notranslate"><code class="notranslate">root@523db2214abf:/# RUST_BACKTRACE=1 deno
Deno 1.21.3
exit using ctrl+d or close()
> const str = "🌍🤖😸🎉";
undefined
> console.log(str.slice(0,3));
🌍�
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: linux x86_64
Version: 1.21.3
Args: ["deno"]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unexpected end of hex escape", line: 1, column: 113)', /home/runner/work/deno/deno/core/inspector.rs:724:66
stack backtrace:
0: rust_begin_unwind
at ./rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
1: core::panicking::panic_fmt
at ./rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
2: core::result::unwrap_failed
at ./rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/result.rs:1690:5
3: core::result::Result<T,E>::unwrap
4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
5: <futures_util::future::select::Select<A,B> as core::future::future::Future>::poll
6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
11: deno::tools::repl::run::{{closure}}
12: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
13: deno::main::{{closure}}
14: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::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.
root@523db2214abf:/#
</code></pre></div>
<p dir="auto">But when I run code from stdin, it looks work fine.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="root@8bf9e7714971:/# deno run - < `tty`
const str = "🌍🤖😸🎉";
console.log(str.slice(0,3));
🌍�
root@8bf9e7714971:/#"><pre class="notranslate">root@8bf9e7714971:/<span class="pl-c"><span class="pl-c">#</span> deno run - < `tty`</span>
const str = <span class="pl-s"><span class="pl-pds">"</span>🌍🤖😸🎉<span class="pl-pds">"</span></span><span class="pl-k">;</span>
console.log(str.slice(0,3))<span class="pl-k">;</span>
🌍�
root@8bf9e7714971:/<span class="pl-c"><span class="pl-c">#</span></span></pre></div>
<h1 dir="auto">Environments</h1>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="root@8bf9e7714971:/# uname -a
Linux 8bf9e7714971 5.10.104-linuxkit #1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022 x86_64 GNU/Linux"><pre class="notranslate">root@8bf9e7714971:/<span class="pl-c"><span class="pl-c">#</span> uname -a</span>
Linux 8bf9e7714971 5.10.104-linuxkit <span class="pl-c"><span class="pl-c">#</span>1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022 x86_64 GNU/Linux</span></pre></div> | 0 |
<p dir="auto">This code:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mod A {
struct X;
mod B {
use A::X;
pub fn foo(_: X) {}
}
}"><pre class="notranslate"><span class="pl-k">mod</span> <span class="pl-v">A</span> <span class="pl-kos">{</span>
<span class="pl-k">struct</span> <span class="pl-smi">X</span><span class="pl-kos">;</span>
<span class="pl-k">mod</span> <span class="pl-v">B</span> <span class="pl-kos">{</span>
<span class="pl-k">use</span> <span class="pl-smi">A</span><span class="pl-kos">::</span><span class="pl-v">X</span><span class="pl-kos">;</span>
<span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span>_<span class="pl-kos">:</span> <span class="pl-smi">X</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">Triggers:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="src\main.rs:6:23: 6:24 error: private type in exported type signature
src\main.rs:6 pub fn foo(_: X) {}"><pre class="notranslate"><code class="notranslate">src\main.rs:6:23: 6:24 error: private type in exported type signature
src\main.rs:6 pub fn foo(_: X) {}
</code></pre></div>
<p dir="auto">The <code class="notranslate">foo</code> function is only visible to <code class="notranslate">A</code> and <code class="notranslate">B</code>, and <code class="notranslate">X</code> is also visible to both <code class="notranslate">A</code> and <code class="notranslate">B</code>, so I don't see why this would be forbidden.</p>
<p dir="auto">This was introduced in the <code class="notranslate">rustc 1.0.0-nightly (f4e0ce66a 2015-03-19) (built 2015-03-20)</code> nightly. With the 2015-03-17, this works.</p> | <p dir="auto">type items don't work with enums.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#[derive(Debug)]
enum Foo {
Bar,
Baz,
}
type Loz = Foo;
fn main() {
let y = Loz::Bar;
println!("{:?}", y);
}"><pre class="notranslate"><span class="pl-c1">#<span class="pl-kos">[</span>derive<span class="pl-kos">(</span><span class="pl-v">Debug</span><span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">enum</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
<span class="pl-v">Bar</span><span class="pl-kos">,</span>
<span class="pl-v">Baz</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span>
<span class="pl-k">type</span> <span class="pl-smi">Loz</span> = <span class="pl-smi">Foo</span><span class="pl-kos">;</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-k">let</span> y = <span class="pl-smi">Loz</span><span class="pl-kos">::</span><span class="pl-v">Bar</span><span class="pl-kos">;</span>
<span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{:?}"</span>, y<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">On the stable channel the following error occurs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<anon>:8:13: 8:21 error: type `Foo` does not implement any method in scope named `Bar`
<anon>:8 let y = Loz::Bar;
^~~~~~~~
error: aborting due to previous error
playpen: application terminated with error code 101```"><pre class="notranslate"><code class="notranslate"><anon>:8:13: 8:21 error: type `Foo` does not implement any method in scope named `Bar`
<anon>:8 let y = Loz::Bar;
^~~~~~~~
error: aborting due to previous error
playpen: application terminated with error code 101```
</code></pre></div> | 0 |
<p dir="auto"><code class="notranslate">OBJLoader2</code> is now around for a while and I think that especially the Parser has reached at least feature parity with the other implementation. It currently has less known bugs and the code is now more accessible to others than it has been in the past (code reviews&verification in R90 and R91).</p>
<p dir="auto"><code class="notranslate">OBJLoader</code> is more widely used and replacing it with <code class="notranslate">OBJLoader2</code> will only be smooth once the following issues and questions are solved and answers are found together with you:</p>
<ul dir="auto">
<li>Any external dependency <code class="notranslate">LoaderSupport</code> needs to be removed. The current <a href="https://github.com/kaisalmen/three.js/tree/OBJLoader2_OBJLoader">dev version</a> of <code class="notranslate">OBJLoader2</code> already solved this.</li>
<li>The dev version sill contains the generic <code class="notranslate">MeshBuilder</code>. It provides among other things a mesh building function which uses data directly or data from web worker (buffers as Transferables). It could stay inside <code class="notranslate">OBJLoader</code>, but logically it should be outside violating the first assumption. I currently don't have a good answer for this problem. One solution is to put <code class="notranslate">MeshBuilder</code> inside `WorkerLoader´ where it is needed, but then it cannot be used here. I don't like having code duplicates. Do you at all see that this is a useful feature for other loader or beyond? What's you opinion?</li>
<li>Reduce LOCs as much as possible. Due to the second point, more overall features (see table below) and MTL utility function (which should be kept as dependency is not enforced) it is currently twice as big as <code class="notranslate">OBJLoader</code></li>
</ul>
<p dir="auto">Async loading/parsing currently available with <code class="notranslate">OBJLoader2</code>/<code class="notranslate">LoaderSupport</code> will be realized by <a href="https://github.com/mrdoob/three.js/issues/13664" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/13664/hovercard">Generic WorkerLoader</a>.</p>
<p dir="auto">The following table outlines the major features of both loaders:</p>
<table role="table">
<thead>
<tr>
<th align="left">Feature</th>
<th>OBJLoader</th>
<th>OBJLoader2</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Handle all face types</td>
<td>[x]</td>
<td>[x]</td>
</tr>
<tr>
<td align="left">Support for points and lines</td>
<td>[x]</td>
<td>[x]</td>
</tr>
<tr>
<td align="left">Negative face indices</td>
<td>[x]</td>
<td>[x]</td>
</tr>
<tr>
<td align="left">Support Ngons</td>
<td>[x]</td>
<td>[x]</td>
</tr>
<tr>
<td align="left">Flat/Smooth Multi-Materials</td>
<td>[ ]</td>
<td>[x]</td>
</tr>
<tr>
<td align="left">Indexed Rendering</td>
<td>[ ]</td>
<td>[x]</td>
</tr>
<tr>
<td align="left">Handle Face-Type change inside group</td>
<td>[x]</td>
<td>[x]</td>
</tr>
<tr>
<td align="left">Deactivate console logging</td>
<td>[ ]</td>
<td>[x]</td>
</tr>
<tr>
<td align="left">Load MTLs via <code class="notranslate">MTLLoader</code> if desired</td>
<td>[ ]</td>
<td>[x]</td>
</tr>
</tbody>
</table>
<p dir="auto">Progress can be tracked in the <a href="https://github.com/kaisalmen/three.js/tree/OBJLoader2_OBJLoader">dev branch mentioned above</a> and in the external <a href="https://github.com/kaisalmen/WWOBJLoader/tree/Issue36/src/loaders">OBJLoader2 repo</a>.</p>
<p dir="auto">I hope you agree that the time has come to replace <code class="notranslate">OBJLoader</code> and we can maintain one implementation in the future.</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=""> r91</li>
</ul> | <p dir="auto">I found some problem on loader .obj</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/3197d36a9c5b1d67113e5e6e1887b007816d81b5e3cad3d56701ae90f726032b/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f343036363136322f3833373335322f38383730396336362d663330342d313165322d396662332d3663626262363165633939392e6a7067"><img src="https://camo.githubusercontent.com/3197d36a9c5b1d67113e5e6e1887b007816d81b5e3cad3d56701ae90f726032b/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f343036363136322f3833373335322f38383730396336362d663330342d313165322d396662332d3663626262363165633939392e6a7067" alt="qthreejs" data-canonical-src="https://f.cloud.github.com/assets/4066162/837352/88709c66-f304-11e2-9fb3-6cbbb61ec999.jpg" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/67c0ccae4405bf9e2e854924b10ffd0e05ae34cf4a0641ca704892f87a77d638/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f343036363136322f3833373337392f30626362323331612d663330352d313165322d383632312d6337363761623138626530392e706e67"><img src="https://camo.githubusercontent.com/67c0ccae4405bf9e2e854924b10ffd0e05ae34cf4a0641ca704892f87a77d638/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f343036363136322f3833373337392f30626362323331612d663330352d313165322d383632312d6337363761623138626530392e706e67" alt="image" data-canonical-src="https://f.cloud.github.com/assets/4066162/837379/0bcb231a-f305-11e2-8621-c767ab18be09.png" style="max-width: 100%;"></a></p>
<p dir="auto">Some face on model missing.<br>
What's the problem?</p> | 0 |
<h3 dir="auto">Choose one: is this a bug report or feature request?</h3>
<p dir="auto">Bug report.</p>
<h3 dir="auto">Summary</h3>
<p dir="auto">When attempting to import and re-export a TypeScript <code class="notranslate">enum</code> with <code class="notranslate">@babel/preset-env</code> in loose mode, Babel generates code with an undefined export that throws a <code class="notranslate">TypeError</code> at runtime. This issue appeared after upgrading <code class="notranslate">@babel/preset-env</code> from <code class="notranslate">v7.0.0-beta.31</code> to <code class="notranslate">v7.0.0-beta.32</code>.</p>
<p dir="auto">Some sample code is below, but see <a href="https://github.com/phyllisstein/babel-env-loose-mwe">https://github.com/phyllisstein/babel-env-loose-mwe</a> for a complete MWE.</p>
<h3 dir="auto">Input Code</h3>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// src/some-enum/index.ts
export enum SomeEnum {
MY_NAME = 'MY_NAME',
YOUR_NAME = 'YOUR_NAME',
}"><pre class="notranslate"><span class="pl-c">// src/some-enum/index.ts</span>
<span class="pl-k">export</span> <span class="pl-k">enum</span> <span class="pl-smi">SomeEnum</span> <span class="pl-kos">{</span>
<span class="pl-c1">MY_NAME</span> <span class="pl-c1">=</span> <span class="pl-s">'MY_NAME'</span><span class="pl-kos">,</span>
<span class="pl-c1">YOUR_NAME</span> <span class="pl-c1">=</span> <span class="pl-s">'YOUR_NAME'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// src/enums.ts
import { SomeEnum } from './some-enum'
export { SomeEnum }"><pre class="notranslate"><span class="pl-c">// src/enums.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">SomeEnum</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./some-enum'</span>
<span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-smi">SomeEnum</span> <span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// src/index.ts
import { SomeEnum } from './enums'
const payload = { name: 'phyllisstein', type: SomeEnum.MY_NAME }
console.log(`You did the thing, ${ payload.name }!`)"><pre class="notranslate"><span class="pl-c">// src/index.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">SomeEnum</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./enums'</span>
<span class="pl-k">const</span> <span class="pl-s1">payload</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'phyllisstein'</span><span class="pl-kos">,</span> <span class="pl-c1">type</span>: <span class="pl-smi">SomeEnum</span><span class="pl-kos">.</span><span class="pl-c1">MY_NAME</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">`You did the thing, <span class="pl-s1"><span class="pl-kos">${</span> <span class="pl-s1">payload</span><span class="pl-kos">.</span><span class="pl-c1">name</span> <span class="pl-kos">}</span></span>!`</span><span class="pl-kos">)</span></pre></div>
<details>
<summary>v7.0.0-beta.31 Emitted JS</summary>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// lib/enums.js
"use strict";
exports.__esModule = true;
Object.defineProperty(exports, "SomeEnum", {
enumerable: true,
get: function () {
return _someEnum.SomeEnum;
}
});
var _someEnum = require("./some-enum");"><pre class="notranslate"><span class="pl-c">// lib/enums.js</span>
<span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">__esModule</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s">"SomeEnum"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">enumerable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-en">get</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">return</span> <span class="pl-s1">_someEnum</span><span class="pl-kos">.</span><span class="pl-c1">SomeEnum</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">var</span> <span class="pl-s1">_someEnum</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"./some-enum"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
</details>
<details>
<summary>v7.0.0-beta.32 Emitted JS</summary>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// lib/enums.js
"use strict";
exports.__esModule = true;
exports.SomeEnum = _someEnum.SomeEnum;
var _someEnum = require("./some-enum");"><pre class="notranslate"><span class="pl-c">// lib/enums.js</span>
<span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">__esModule</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">SomeEnum</span> <span class="pl-c1">=</span> <span class="pl-s1">_someEnum</span><span class="pl-kos">.</span><span class="pl-c1">SomeEnum</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_someEnum</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"./some-enum"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
</details>
<h3 dir="auto">Babel/Babylon Configuration (.babelrc, package.json, cli command)</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets": [
["@babel/env", {
"targets": {
"node": "current"
},
"loose": true
}],
"@babel/typescript"
]
}"><pre class="notranslate">{
<span class="pl-ent">"presets"</span>: [
[<span class="pl-s"><span class="pl-pds">"</span>@babel/env<span class="pl-pds">"</span></span>, {
<span class="pl-ent">"targets"</span>: {
<span class="pl-ent">"node"</span>: <span class="pl-s"><span class="pl-pds">"</span>current<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"loose"</span>: <span class="pl-c1">true</span>
}],
<span class="pl-s"><span class="pl-pds">"</span>@babel/typescript<span class="pl-pds">"</span></span>
]
}</pre></div>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">I should be able to import the enum and run the code transpiled from <code class="notranslate">src/index.ts</code> successfully.</p>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Babel emits code that throws a <code class="notranslate">TypeError</code> at runtime:</p>
<details>
<summary>💥</summary>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Cannot read property 'SomeEnum' of undefined
at Object.<anonymous> (/Users/daniel/Repos/Personal/babel-env-loose-mwe/lib/enums.js:4:30)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/daniel/Repos/Personal/babel-env-loose-mwe/lib/index.js:3:14)
at Module._compile (module.js:635:30)"><pre class="notranslate"><code class="notranslate">TypeError: Cannot read property 'SomeEnum' of undefined
at Object.<anonymous> (/Users/daniel/Repos/Personal/babel-env-loose-mwe/lib/enums.js:4:30)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/daniel/Repos/Personal/babel-env-loose-mwe/lib/index.js:3:14)
at Module._compile (module.js:635:30)
</code></pre></div>
</details>
<h3 dir="auto">Possible Solution</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/222f864ff92847662f7aa5f227735070c333cb4cd676cae03aad3e2280d802ee/687474703a2f2f7068796c2e6c692f64756e6e6f2e676966"><img src="https://camo.githubusercontent.com/222f864ff92847662f7aa5f227735070c333cb4cd676cae03aad3e2280d802ee/687474703a2f2f7068796c2e6c692f64756e6e6f2e676966" alt="" data-animated-image="" data-canonical-src="http://phyl.li/dunno.gif" style="max-width: 100%;"></a></p>
<h3 dir="auto">Context</h3>
<p dir="auto">We use TypeScript's enums as action creator <code class="notranslate">type</code>s in our React/Redux code. I noticed the issue when attempting to import the enum into a test module and make assertions with it.</p>
<h3 dir="auto">Your Environment</h3>
<table role="table">
<thead>
<tr>
<th>software</th>
<th>version(s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babel</td>
<td>v7.0.0-beta.32</td>
</tr>
<tr>
<td>Babylon</td>
<td>N/A</td>
</tr>
<tr>
<td>node</td>
<td>v8.9.1</td>
</tr>
<tr>
<td>npm</td>
<td>v5.5.1</td>
</tr>
<tr>
<td>Operating System</td>
<td>macOS 10.13.2 (17C67b)</td>
</tr>
</tbody>
</table> | <h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
code split fail with preset-env modules:commonjs v7.5.4</p>
<p dir="auto"><strong>Expected behavior/code</strong><br>
when modules: 'common' and plugin @babel/plugin-syntax-dynamic-import''; babel will tranfrom import(...) to require(...), then will cause code split fail</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: 'commonjs'
}
],
'@babel/preset-react'
],
plugins: [
'@babel/plugin-syntax-dynamic-import'
]
};"><pre class="notranslate"><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">presets</span>: <span class="pl-kos">[</span>
<span class="pl-kos">[</span>
<span class="pl-s">'@babel/preset-env'</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-c1">modules</span>: <span class="pl-s">'commonjs'</span>
<span class="pl-kos">}</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">'@babel/preset-react'</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">plugins</span>: <span class="pl-kos">[</span>
<span class="pl-s">'@babel/plugin-syntax-dynamic-import'</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): v7.5.4</li>
<li>Node/npm version: v11.6.0/6.5.0-next.0</li>
<li>OS: [e.g. OSX 10.13.4, Windows 10] OSX</li>
<li>Monorepo: [e.g. yes/no/Lerna]no</li>
<li>How you are using Babel: [e.g. <code class="notranslate">cli</code>, <code class="notranslate">register</code>, <code class="notranslate">loader</code>] cli</li>
</ul> | 0 |
<h1 dir="auto">Checklist</h1>
<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 relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</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/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</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/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</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/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</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>
<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.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None (I've looked, don't see any, probably to odd corner case)</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: celery==4.3.0</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Sorry, I don't have a celery project setup. The error is when using send_task (the worker and the queuer of the tasks doesn't share any code base)"><pre class="notranslate"><code class="notranslate">Sorry, I don't have a celery project setup. The error is when using send_task (the worker and the queuer of the tasks doesn't share any code base)
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: Unknown (I'm on 3.6.3)</li>
<li><strong>Minimal Celery Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="alembic==1.1.0
amqp==2.5.1
billiard==3.6.1.0
blinker==1.4
cachetools==3.1.1
celery==4.3.0
certifi==2019.9.11
chardet==3.0.4
Click==7.0
debtcollector==1.22.0
Flask==1.0.2
Flask-Classful==0.13.1
Flask-JSON==0.3.0
Flask-Migrate==2.0.1
Flask-Script==2.0.6
Flask-SQLAlchemy==2.4.0
gcloud==0.18.3
google-api-core==1.14.2
google-api-python-client==1.7.9
google-auth==1.6.3
google-auth-httplib2==0.0.3
google-cloud-core==1.0.3
google-cloud-datastore==1.8.0
google-cloud-pubsub==1.0.0
google-cloud-storage==1.16.1
google-resumable-media==0.4.0
googleapis-common-protos==1.6.0
grpc-google-iam-v1==0.12.3
grpcio==1.9.1
gunicorn==19.6.0
httplib2==0.13.1
idna==2.8
importlib-metadata==0.22
itsdangerous==1.1.0
Jinja2==2.10.1
kombu==4.6.4
Mako==1.1.0
MarkupSafe==1.1.1
monotonic==1.5
more-itertools==7.2.0
oauth2client==4.0.0
pbr==5.4.3
protobuf==3.6.1
psycopg2==2.7.3.2
psycopg2-binary==2.8.3
pyasn1==0.4.7
pyasn1-modules==0.2.6
python-dateutil==2.8.0
python-editor==1.0.4
pytz==2019.2
PyYAML==3.12
ratelimitingfilter==0.5.dev1
raven==6.10.0
requests==2.22.0
rsa==4.0
six==1.11.0
SQLAlchemy==1.3.8
statsd==3.3.0
tenacity==3.4.0
uritemplate==3.0.0
urllib3==1.25.3
vine==1.3.0
Werkzeug==0.15.6
wrapt==1.11.2
zipp==0.6.0"><pre class="notranslate"><code class="notranslate">alembic==1.1.0
amqp==2.5.1
billiard==3.6.1.0
blinker==1.4
cachetools==3.1.1
celery==4.3.0
certifi==2019.9.11
chardet==3.0.4
Click==7.0
debtcollector==1.22.0
Flask==1.0.2
Flask-Classful==0.13.1
Flask-JSON==0.3.0
Flask-Migrate==2.0.1
Flask-Script==2.0.6
Flask-SQLAlchemy==2.4.0
gcloud==0.18.3
google-api-core==1.14.2
google-api-python-client==1.7.9
google-auth==1.6.3
google-auth-httplib2==0.0.3
google-cloud-core==1.0.3
google-cloud-datastore==1.8.0
google-cloud-pubsub==1.0.0
google-cloud-storage==1.16.1
google-resumable-media==0.4.0
googleapis-common-protos==1.6.0
grpc-google-iam-v1==0.12.3
grpcio==1.9.1
gunicorn==19.6.0
httplib2==0.13.1
idna==2.8
importlib-metadata==0.22
itsdangerous==1.1.0
Jinja2==2.10.1
kombu==4.6.4
Mako==1.1.0
MarkupSafe==1.1.1
monotonic==1.5
more-itertools==7.2.0
oauth2client==4.0.0
pbr==5.4.3
protobuf==3.6.1
psycopg2==2.7.3.2
psycopg2-binary==2.8.3
pyasn1==0.4.7
pyasn1-modules==0.2.6
python-dateutil==2.8.0
python-editor==1.0.4
pytz==2019.2
PyYAML==3.12
ratelimitingfilter==0.5.dev1
raven==6.10.0
requests==2.22.0
rsa==4.0
six==1.11.0
SQLAlchemy==1.3.8
statsd==3.3.0
tenacity==3.4.0
uritemplate==3.0.0
urllib3==1.25.3
vine==1.3.0
Werkzeug==0.15.6
wrapt==1.11.2
zipp==0.6.0
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
1. Setup an exchange with a blank routing key in Rabbitmq
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="celeryapp.send_task("task, ["data"],exchange="your_exchange",routing_key='',connection=conn)"><pre class="notranslate"><span class="pl-s1">celeryapp</span>.<span class="pl-en">send_task</span>(<span class="pl-s">"task, ["</span><span class="pl-s1">data</span><span class="pl-s">"],exchange="</span><span class="pl-s1">your_exchange</span>",<span class="pl-s1">routing_key</span><span class="pl-c1">=</span><span class="pl-s">''</span>,<span class="pl-s1">connection</span><span class="pl-c1">=</span><span class="pl-s1">conn</span>)</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">I would expect a message sent with an exchange and a blank (but not None) routing key to be sent using the exchange and the blank routing key.</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">Background:<br>
Due to legacy reasons I'm not capable of changing the routing structure in RabbitMQ.</p>
<p dir="auto">Using a blank routing key, the message is sent to the default queue. The issue originates from <a href="https://github.com/celery/celery/blob/master/celery/app/amqp.py#L529">amqp.py</a>:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" if (not exchange or not routing_key) and exchange_type == 'direct':
exchange, routing_key = '', qname"><pre class="notranslate"> <span class="pl-k">if</span> (<span class="pl-c1">not</span> <span class="pl-s1">exchange</span> <span class="pl-c1">or</span> <span class="pl-c1">not</span> <span class="pl-s1">routing_key</span>) <span class="pl-c1">and</span> <span class="pl-s1">exchange_type</span> <span class="pl-c1">==</span> <span class="pl-s">'direct'</span>:
<span class="pl-s1">exchange</span>, <span class="pl-s1">routing_key</span> <span class="pl-c1">=</span> <span class="pl-s">''</span>, <span class="pl-s1">qname</span></pre></div>
<p dir="auto">Using not discards the blank routing key.</p>
<p dir="auto">I am not too well versed on advanced routing, but if you want to I can try to create a pull request changing it to:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" if (not exchange or routing_key is None) and exchange_type == 'direct':
exchange, routing_key = '', qname"><pre class="notranslate"> <span class="pl-k">if</span> (<span class="pl-c1">not</span> <span class="pl-s1">exchange</span> <span class="pl-c1">or</span> <span class="pl-s1">routing_key</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>) <span class="pl-c1">and</span> <span class="pl-s1">exchange_type</span> <span class="pl-c1">==</span> <span class="pl-s">'direct'</span>:
<span class="pl-s1">exchange</span>, <span class="pl-s1">routing_key</span> <span class="pl-c1">=</span> <span class="pl-s">''</span>, <span class="pl-s1">qname</span></pre></div>
<p dir="auto">As a quirky short term work around, you can do:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="celeryapp.send_task(
"task",
["data"],
exchange="your_exchange",
routing_key='',
exchange_type='anything_but_direct_here',
connection=conn
)"><pre class="notranslate"><span class="pl-s1">celeryapp</span>.<span class="pl-en">send_task</span>(
<span class="pl-s">"task"</span>,
[<span class="pl-s">"data"</span>],
<span class="pl-s1">exchange</span><span class="pl-c1">=</span><span class="pl-s">"your_exchange"</span>,
<span class="pl-s1">routing_key</span><span class="pl-c1">=</span><span class="pl-s">''</span>,
<span class="pl-s1">exchange_type</span><span class="pl-c1">=</span><span class="pl-s">'anything_but_direct_here'</span>,
<span class="pl-s1">connection</span><span class="pl-c1">=</span><span class="pl-s1">conn</span>
)</pre></div>
<p dir="auto">Which won't trigger the offending if-bransch.</p>
<p dir="auto">I'm mostly creating this ticket so future Googlers can find it if they have the same problem. If you would accept a PR let me know.</p> | <h1 dir="auto">Checklist</h1>
<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.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</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/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</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/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</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/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<p dir="auto">Hey there! I've read all the checkboxes etc. but it's such an obvious bug, that I feel they are not necessary. I hope that this unconformity won't let you just ignore the actual issue:</p>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<p dir="auto">Run celery on Windows, no matter which python.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">It should start</p>
<h3 dir="auto">Actual Behavior</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File ".venv\lib\site-packages\celery\platforms.py", line 9, in <module>
import grp
ModuleNotFoundError: No module named 'grp'"><pre class="notranslate"><code class="notranslate"> File ".venv\lib\site-packages\celery\platforms.py", line 9, in <module>
import grp
ModuleNotFoundError: No module named 'grp'
</code></pre></div>
<p dir="auto">The module <code class="notranslate">grp</code> is only available on linux, thus this does not work on widnwos and also not make sense as a global import. It's also imported below by <code class="notranslate">try_import</code>.</p>
<h3 dir="auto">Possible fix</h3>
<p dir="auto">This line should simply be removed, because below there is a <code class="notranslate">try_import</code> for this as well. Also in the <code class="notranslate">check_privileges</code>, the non-existence of <code class="notranslate">grp</code> should be checked. Unfortunately due to my companies restrictions I cannot submit a MR.</p>
<p dir="auto">Git blame shows <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/namloc2001/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/namloc2001">@namloc2001</a> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thedrow/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thedrow">@thedrow</a> for <a href="https://github.com/celery/celery/blob/ce567e31065e3361493ebb33a23e2f04c07cc371/celery/platforms.py#L9">this line which is still on master</a>.</p>
<p dir="auto">Thanks!</p> | 0 |
<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>
<p dir="auto">I expected process.env.NODE_ENV on the client/browser to correspond to environment variable set when app is run:</p>
<p dir="auto">package.json</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" "scripts": {
"dev": "next",
"staging": "NODE_ENV=staging next",
"build": "next build",
"start": "next start"
}"><pre class="notranslate"> <span class="pl-ent">"scripts"</span>: {
<span class="pl-ent">"dev"</span>: <span class="pl-s"><span class="pl-pds">"</span>next<span class="pl-pds">"</span></span>,
<span class="pl-ent">"staging"</span>: <span class="pl-s"><span class="pl-pds">"</span>NODE_ENV=staging next<span class="pl-pds">"</span></span>,
<span class="pl-ent">"build"</span>: <span class="pl-s"><span class="pl-pds">"</span>next build<span class="pl-pds">"</span></span>,
<span class="pl-ent">"start"</span>: <span class="pl-s"><span class="pl-pds">"</span>next start<span class="pl-pds">"</span></span>
}</pre></div>
<p dir="auto">Expected <code class="notranslate">process.env.NODE_ENV</code> to be <code class="notranslate">'staging'</code> when running <code class="notranslate">npm run staging</code>:</p>
<p dir="auto">components/Page.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Page extends React.Component {
componentDidMount () {
console.log('process.env.NODE_ENV', process.env.NODE_ENV) // expected 'staging' to be printed here when running `npm run staging`
console.log('process.env.BUILD_VERSION', process.env.BUILD_VERSION) // '1.0.0'
}
render () {
...
}
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Page</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span> <span class="pl-kos">{</span>
<span class="pl-en">componentDidMount</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-s">'process.env.NODE_ENV'</span><span class="pl-kos">,</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">NODE_ENV</span><span class="pl-kos">)</span> <span class="pl-c">// expected 'staging' to be printed here when running `npm run staging`</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">'process.env.BUILD_VERSION'</span><span class="pl-kos">,</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">BUILD_VERSION</span><span class="pl-kos">)</span> <span class="pl-c">// '1.0.0'</span>
<span class="pl-kos">}</span>
<span class="pl-en">render</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>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto"><code class="notranslate">console.log(process.env.NODE_ENV)</code> prints <code class="notranslate"> 'development'</code> on the client/browser with <code class="notranslate">npm run staging</code> regardless of the actual NODE_ENV value.</p>
<p dir="auto">I've attempted to override the default <code class="notranslate">DefinePlugin</code> webpack config here to no avail:</p>
<p dir="auto">next.config.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = {
webpack: (config, { dev }) => {
config.plugins.push(
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.BUILD_VERSION': JSON.stringify(pkg.version)
})
)
return config
}
}"><pre class="notranslate"><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-en">webpack</span>: <span class="pl-kos">(</span><span class="pl-s1">config</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> dev <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-s1">config</span><span class="pl-kos">.</span><span class="pl-c1">plugins</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span>
<span class="pl-k">new</span> <span class="pl-s1">webpack</span><span class="pl-kos">.</span><span class="pl-c1">DefinePlugin</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-s">'process.env.NODE_ENV'</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">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">NODE_ENV</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-s">'process.env.BUILD_VERSION'</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">pkg</span><span class="pl-kos">.</span><span class="pl-c1">version</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">return</span> <span class="pl-s1">config</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">It seems that <code class="notranslate">process.env.NODE_ENV</code> is set to <code class="notranslate">'development'</code> or <code class="notranslate">'production'</code> based on<code class="notranslate">dev</code> in the default webpack config.</p>
<p dir="auto"><a href="https://github.com/zeit/next.js/blob/e451218900b16e721db10413734ca7a964c53677/server/build/webpack.js#L102-L106">https://github.com/zeit/next.js/blob/e451218900b16e721db10413734ca7a964c53677/server/build/webpack.js#L102-L106</a></p>
<p dir="auto">How can I override this behaviour and have <code class="notranslate">process.env.NODE_ENV</code> on the client reference the actual <code class="notranslate">NODE_ENV</code> value?</p>
<h2 dir="auto">Context</h2>
<p dir="auto">I would like to set app variables based on NODE_ENV on the client</p>
<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.4.0-canary.3</td>
</tr>
<tr>
<td>node</td>
<td>6.11.5</td>
</tr>
<tr>
<td>OS</td>
<td>macOS siera 10.12.6</td>
</tr>
<tr>
<td>browser</td>
<td>Google Chrome Version 63.0.3239.132</td>
</tr>
</tbody>
</table> | <p dir="auto">Hi, i have a question about minification.<br>
As i have read now in next we use Terser plugin to do it, but it seems that i am missing something because i try to catch errors with bugsnag and i need source map and minified files to upload to bugsnag. So the question is how to create source maps for serverless files? For static components its ok, its creating both of it map.js and min.js and uploads completely fine, but for serverless files i cant do it. The thing is when i used Uglify with Terser my error was coming from the path:</p>
<p dir="auto"><code class="notranslate">/zeit/8fc9cc9/.next/serverless/pages/webpack:/pages/borked.js</code></p>
<p dir="auto">When i stopped using uglifyJS the error was coming from:</p>
<p dir="auto"><code class="notranslate">pages/borked.js</code></p>
<p dir="auto">And the path to get min and map files from next is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="publicPath: isServer ?
".next/serverless/"
: "*/_next/""><pre class="notranslate"><code class="notranslate">publicPath: isServer ?
".next/serverless/"
: "*/_next/"
</code></pre></div>
<p dir="auto">For Terser plugin the code is</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (config.optimization && config.optimization.minimizer) {
for (const plugin of config.optimization.minimizer) {
if (plugin['constructor']['name'] === 'TerserPlugin') {
plugin.options.parallel = true;
plugin.options.sourceMap = true;
break;
}
}
}"><pre class="notranslate"><code class="notranslate">if (config.optimization && config.optimization.minimizer) {
for (const plugin of config.optimization.minimizer) {
if (plugin['constructor']['name'] === 'TerserPlugin') {
plugin.options.parallel = true;
plugin.options.sourceMap = true;
break;
}
}
}
</code></pre></div>
<p dir="auto">Thanks for your help, I appreciate it.</p> | 0 |
<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
[ ] feature request
[ ] support request => 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
[ ] feature request
[ ] support request => 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><br>
The http.delete method doesn't work. It send an OPTIONS method instead DELETE method.</p>
<p dir="auto"><strong>Expected/desired behavior</strong></p>
<p dir="auto"><strong>Reproduction of the problem</strong><br>
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via <a href="https://plnkr.co" rel="nofollow">https://plnkr.co</a> or similar (you can use this template as a starting point: <a href="http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5" rel="nofollow">http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5</a>).</p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.X</li>
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li>
<li><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5 | Dart]</li>
</ul> | <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
[ ] feature request
[ ] support request => 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
[ ] feature request
[ ] support request => 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><br>
Post RC5 upgrade, facing below error -</p>
<blockquote>
<p dir="auto">platform-browser.umd.js:937 EXCEPTION: TypeError: Cannot read property 'toString' of nullBrowserDomAdapter.logError @ platform-browser.umd.js:937BrowserDomAdapter.logGroup @ platform-browser.umd.js:947ExceptionHandler.call @ core.umd.js:4389next @ core.umd.js:9971schedulerFn @ core.umd.js:9168SafeSubscriber.__tryOrUnsub @ Subscriber.ts:240SafeSubscriber.next @ Subscriber.ts:192Subscriber._next @ Subscriber.ts:133Subscriber.next @ Subscriber.ts:93Subject._finalNext @ Subject.ts:154Subject._next @ Subject.ts:144Subject.next @ Subject.ts:90EventEmitter.emit @ core.umd.js:9156onError @ core.umd.js:9394onHandleError @ core.umd.js:9266ZoneDelegate.handleError @ zone.js:327Zone.runTask @ zone.js:259drainMicroTaskQueue @ zone.js:474ZoneTask.invoke @ zone.js:426<br>
platform-browser.umd.js:937 STACKTRACE:BrowserDomAdapter.logError @ platform-browser.umd.js:937ExceptionHandler.call @ core.umd.js:4391next @ core.umd.js:9971schedulerFn @ core.umd.js:9168SafeSubscriber.__tryOrUnsub @ Subscriber.ts:240SafeSubscriber.next @ Subscriber.ts:192Subscriber._next @ Subscriber.ts:133Subscriber.next @ Subscriber.ts:93Subject._finalNext @ Subject.ts:154Subject._next @ Subject.ts:144Subject.next @ Subject.ts:90EventEmitter.emit @ core.umd.js:9156onError @ core.umd.js:9394onHandleError @ core.umd.js:9266ZoneDelegate.handleError @ zone.js:327Zone.runTask @ zone.js:259drainMicroTaskQueue @ zone.js:474ZoneTask.invoke @ zone.js:426<br>
platform-browser.umd.js:937 TypeError: Cannot read property 'toString' of null<br>
at Request.Body.text (http.umd.js:1138)<br>
at Request.getBody (http.umd.js:1720)<br>
at Observable.eval as _subscribe<br>
at Observable.subscribe (Observable.ts:93)<br>
at Observable._subscribe (Observable.ts:152)<br>
at MapOperator.call (map.ts:54)<br>
at Observable.subscribe (Observable.ts:93)<br>
at Observable._subscribe (Observable.ts:152)<br>
at CatchOperator.call (catch.ts:32)<br>
at Observable.subscribe (Observable.ts:93)BrowserDomAdapter.logError @ platform-browser.umd.js:937ExceptionHandler.call @ core.umd.js:4392next @ core.umd.js:9971schedulerFn @ core.umd.js:9168SafeSubscriber.__tryOrUnsub @ Subscriber.ts:240SafeSubscriber.next @ Subscriber.ts:192Subscriber._next @ Subscriber.ts:133Subscriber.next @ Subscriber.ts:93Subject._finalNext @ Subject.ts:154Subject._next @ Subject.ts:144Subject.next @ Subject.ts:90EventEmitter.emit @ core.umd.js:9156onError @ core.umd.js:9394onHandleError @ core.umd.js:9266ZoneDelegate.handleError @ zone.js:327Zone.runTask @ zone.js:259drainMicroTaskQueue @ zone.js:474ZoneTask.invoke @ zone.js:426<br>
zone.js:463 TypeError: Cannot read property 'toString' of null(…)consoleError @ zone.js:463drainMicroTaskQueue @ zone.js:477ZoneTask.invoke @ zone.js:426</p>
</blockquote>
<p dir="auto"><strong>Angular version:</strong> 2.0.0-rc.5</p>
<ul dir="auto">
<li><strong>Browser:</strong> [all]</li>
<li><strong>Language:</strong> [all | TypeScript 1.8.10 | ES5]</li>
</ul> | 1 |
<h4 dir="auto">Challenge Name</h4>
<p dir="auto"><a href="https://www.freecodecamp.com/challenges/create-a-form-element" rel="nofollow">https://www.freecodecamp.com/challenges/create-a-form-element</a><br>
However, this issue has come up on all of my challenges. It didn't happen at first, but then it started happening some challenges ago and persisted, though I'm not sure on which one specifically.</p>
<h4 dir="auto">Issue Description</h4>
<p dir="auto">Whenever I begin the challenge and try to start typing the code, the cursor will not move to the last line of the code. For example, on this challenge the last line of the code is []. When I try to select this element or I try to place my cursor somewhere in the middle of it (say, on the word 'text'), the cursor won't move and I can't select. It only begins working properly when I hit backspace as though to delete the element. That's when the browser suddenly recognizes the element and then I can freely move the cursor. Also, it should be noted that when I do hit backspace on the line before this input element, the browser deletes not something from the previous line but something from the bugged line below.</p>
<h4 dir="auto">Browser Information</h4>
<ul dir="auto">
<li>Browser Name, Version: Chrome, 57.0.2987.110</li>
<li>Operating System: MacOS Sierra, 10.12.4</li>
<li>Mobile, Desktop, or Tablet: Desktop</li>
</ul>
<h4 dir="auto">Your Code</h4>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<form action="/submit-cat-photo">
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, Monospace;
}
p {
font-size: 16px;
font-family: Monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.smaller-image {
width: 100px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p>Click here for <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back. " src="https://bit.ly/fcc-relaxing-cat"></a>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<input type="text" placeholder="cat photo URL">
"><pre class="notranslate"><span class="pl-c1"><</span><span class="pl-ent">form</span> <span class="pl-c1">action</span><span class="pl-c1">=</span><span class="pl-s">"/submit-cat-photo"</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">link</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-s">"https://fonts.googleapis.com/css?family=Lobster"</span> <span class="pl-c1">rel</span><span class="pl-c1">=</span><span class="pl-s">"stylesheet"</span> <span class="pl-c1">type</span><span class="pl-c1">=</span><span class="pl-s">"text/css"</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">style</span><span class="pl-c1">></span>
.red-text <span class="pl-kos">{</span>
<span class="pl-s1">color</span>: <span class="pl-s1">red</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
h2 <span class="pl-kos">{</span>
<span class="pl-s1">font</span><span class="pl-c1">-</span><span class="pl-s1">family</span>: <span class="pl-v">Lobster</span><span class="pl-kos">,</span> <span class="pl-v">Monospace</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
p <span class="pl-kos">{</span>
<span class="pl-s1">font</span><span class="pl-c1">-</span><span class="pl-s1">size</span>: <span class="pl-c1">16</span><span class="pl-s1">px</span><span class="pl-kos">;</span>
<span class="pl-s1">font</span><span class="pl-c1">-</span><span class="pl-s1">family</span>: <span class="pl-v">Monospace</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
.thick-green-border <span class="pl-kos">{</span>
<span class="pl-s1">border</span><span class="pl-c1">-</span><span class="pl-s1">color</span>: <span class="pl-s1">green</span><span class="pl-kos">;</span>
<span class="pl-s1">border</span><span class="pl-c1">-</span><span class="pl-s1">width</span>: <span class="pl-c1">10</span><span class="pl-s1">px</span><span class="pl-kos">;</span>
<span class="pl-s1">border</span><span class="pl-c1">-</span><span class="pl-s1">style</span>: <span class="pl-s1">solid</span><span class="pl-kos">;</span>
<span class="pl-s1">border</span><span class="pl-c1">-</span><span class="pl-s1">radius</span>: <span class="pl-c1">50</span><span class="pl-c1">%</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
.smaller-image <span class="pl-kos">{</span>
<span class="pl-s1">width</span>: <span class="pl-c1">100</span><span class="pl-s1">px</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">style</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">h2</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"red-text"</span><span class="pl-c1">></span>CatPhotoApp<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">h2</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">p</span><span class="pl-c1">></span>Click here for <span class="pl-c1"><</span><span class="pl-ent">a</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-s">"#"</span><span class="pl-c1">></span>cat photos<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">a</span><span class="pl-c1">></span>.<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">a</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-s">"#"</span><span class="pl-c1">></span><span class="pl-c1"><</span><span class="pl-ent">img</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"smaller-image thick-green-border"</span> <span class="pl-c1">alt</span><span class="pl-c1">=</span><span class="pl-s">"A cute orange cat lying on its back. "</span> <span class="pl-c1">src</span><span class="pl-c1">=</span><span class="pl-s">"https://bit.ly/fcc-relaxing-cat"</span><span class="pl-c1">></span><span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">a</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">p</span><span class="pl-c1">></span>Things cats love:<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">ul</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">li</span><span class="pl-c1">></span>cat nip<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">li</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">li</span><span class="pl-c1">></span>laser pointers<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">li</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">li</span><span class="pl-c1">></span>lasagna<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">li</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">ul</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">p</span><span class="pl-c1">></span>Top 3 things cats hate:<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">ol</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">li</span><span class="pl-c1">></span>flea treatment<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">li</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">li</span><span class="pl-c1">></span>thunder<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">li</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">li</span><span class="pl-c1">></span>other cats<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">li</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">ol</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">input</span> <span class="pl-c1">type</span><span class="pl-c1">=</span><span class="pl-s">"text"</span> <span class="pl-c1">placeholder</span><span class="pl-c1">=</span><span class="pl-s">"cat photo URL"</span><span class="pl-c1">></span>
</pre></div> | <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 |
<h1 dir="auto">Send the same command to all the active tabs within windows terminal</h1>
<p dir="auto">I hope windows terminal come with a feature that it can send the same command to all the active tabs.<br>
Let's say we open 4 tabs within terminal,then each tab have a connection to a SSH server. and we want to know the status of the firewall on those server by issue "systemctl status firewalld" . but we want do it in one time. not one by one for each connection in these 4 tabs.</p>
<h1 dir="auto">This feature had been implement in SecureCRT.</h1>
<p dir="auto">Bellow is the steps to send the same command to all active tabs in SecureCRT.</p>
<p dir="auto">This can be done using the 'Chat Window'.</p>
<ol dir="auto">
<li>Select 'Chat Window' from the 'View' menu so that the window will be displayed.</li>
<li>Then just right click inside the 'Chat Window' and select the 'Send Chat to All Tabs' option in the pop-up menu.</li>
<li>Once enabled, any commands entered in the 'Chat Window' will be sent to all tabs when 'Enter' is pressed.</li>
</ol>
<h1 dir="auto">It will be very handy in daily task if it can be like that.</h1> | <h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto">When launching a new tab, if any error occurs during the startup of the tab (e.g. an error from the command being run), Terminal needs to display the error rather than just close the tab.</p>
<p dir="auto">This would help the user to better understand why the tab hasn't successfully opened.</p>
<p dir="auto">An example of where this is useful is SSH terminal connections. The ssh command can fail for a number of reasons, e.g. ssh-agent isn't running, connection to server timed out, etc. At the moment, Terminal just closes the newly opened tab without any explanation.</p> | 0 |
<p dir="auto">[Enter steps to reproduce below:]</p>
<ol dir="auto">
<li>Opened atom from terminal while running fish shell.</li>
<li>Waited... Silent-sync package started its synchronisation.</li>
</ol>
<p dir="auto"><strong>Atom Version</strong>: 0.190.0<br>
<strong>System</strong>: Mac OS X 10.10.3<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: spawn /bin/sh EAGAIN</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At events.js:141
Error: spawn /bin/sh EAGAIN
at exports._errnoException (util.js:734:11)
at Process.ChildProcess._handle.onexit (child_process.js:1035:32)
at child_process.js:1127:20
at process._tickCallback (node.js:357:13)"><pre class="notranslate"><code class="notranslate">At events.js:141
Error: spawn /bin/sh EAGAIN
at exports._errnoException (util.js:734:11)
at Process.ChildProcess._handle.onexit (child_process.js:1035:32)
at child_process.js:1127:20
at process._tickCallback (node.js:357:13)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 6x -7:30.3 core:close (atom-text-editor.editor.is-focused)"><pre class="notranslate"><code class="notranslate"> 6x -7:30.3 core:close (atom-text-editor.editor.is-focused)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"themes": [
"one-dark-ui",
"one-dark-syntax"
]
},
"editor": {
"invisibles": {},
"fontSize": 12
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"themes"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>one-dark-ui<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>one-dark-syntax<span class="pl-pds">"</span></span>
]
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"invisibles"</span>: {},
<span class="pl-ent">"fontSize"</span>: <span class="pl-c1">12</span>
}
}</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
script, v2.18.0
silent-sync, v1.1.5
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
script, v2.<span class="pl-ii">18</span>.<span class="pl-ii">0</span>
silent<span class="pl-k">-</span>sync, v1.<span class="pl-ii">1</span>.<span class="pl-ii">5</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> | <p dir="auto">Uncaught Error: spawn /bin/sh EAGAIN</p>
<p dir="auto"><strong>Atom Version</strong>: 0.161.0<br>
<strong>System</strong>: Mac OS X 10.10.1<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>Install atomatgit plugin</li>
<li>Attempt to launch it via command palette</li>
</ol>
<h3 dir="auto">Stack Trace</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At events.js:85
Error: spawn /bin/sh EAGAIN
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1051:32)
at child_process.js:1142:20
at process._tickCallback (node.js:378:11)
"><pre class="notranslate"><code class="notranslate">At events.js:85
Error: spawn /bin/sh EAGAIN
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1051:32)
at child_process.js:1142:20
at process._tickCallback (node.js:378:11)
</code></pre></div> | 1 |
<p dir="auto">Strict mypy mode gives such errors:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="base/api/users/controllers.py:4: error: Module 'fastapi' has no attribute 'Depends'
base/api/users/controllers.py:4: error: Module 'fastapi' has no attribute 'HTTPException'"><pre class="notranslate"><code class="notranslate">base/api/users/controllers.py:4: error: Module 'fastapi' has no attribute 'Depends'
base/api/users/controllers.py:4: error: Module 'fastapi' has no attribute 'HTTPException'
</code></pre></div>
<p dir="auto">on such import statement:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from fastapi import Depends, HTTPException"><pre class="notranslate"><code class="notranslate">from fastapi import Depends, HTTPException
</code></pre></div>
<p dir="auto">Tried using</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from fastapi import Depends as Depends
from fastapi import HTTPException as HTTPException"><pre class="notranslate"><code class="notranslate">from fastapi import Depends as Depends
from fastapi import HTTPException as HTTPException
</code></pre></div>
<p dir="auto">as per recommendations in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="628610814" data-permission-text="Title is private" data-url="https://github.com/tiangolo/typer/issues/112" data-hovercard-type="issue" data-hovercard-url="/tiangolo/typer/issues/112/hovercard" href="https://github.com/tiangolo/typer/issues/112">tiangolo/typer#112</a> discussion. But the errors remain.</p>
<p dir="auto">It seems that adding <strong>all</strong> to the <strong>init</strong>.py files for the stuff that's reexported is a way to go (as per <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="459406387" data-permission-text="Title is private" data-url="https://github.com/python/mypy/issues/7042" data-hovercard-type="issue" data-hovercard-url="/python/mypy/issues/7042/hovercard" href="https://github.com/python/mypy/issues/7042">python/mypy#7042</a> discussion).</p>
<p dir="auto">Thanks for considering this!</p> | <h3 dir="auto">Description</h3>
<p dir="auto">I want to use the jwt auth, and learn the tutorial about it. There are sth confused me:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@router.post('/token')
async def login(form_data: OAuth2PasswordRequestForm = Depends()):
user = await authenticate_user(form_data.username, form_data.password)
if not user:
raise HTTPException(status_code=400, detail='incorrect username')
access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)
access_token = await create_access_token(data={'sub': user.username}, expires_delta=access_token_expires)
return {'access_token': access_token, 'token_type': 'bearer'}"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">router</span>.<span class="pl-en">post</span>(<span class="pl-s">'/token'</span>)</span>
<span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">login</span>(<span class="pl-s1">form_data</span>: <span class="pl-v">OAuth2PasswordRequestForm</span> <span class="pl-c1">=</span> <span class="pl-v">Depends</span>()):
<span class="pl-s1">user</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">authenticate_user</span>(<span class="pl-s1">form_data</span>.<span class="pl-s1">username</span>, <span class="pl-s1">form_data</span>.<span class="pl-s1">password</span>)
<span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">user</span>:
<span class="pl-k">raise</span> <span class="pl-v">HTTPException</span>(<span class="pl-s1">status_code</span><span class="pl-c1">=</span><span class="pl-c1">400</span>, <span class="pl-s1">detail</span><span class="pl-c1">=</span><span class="pl-s">'incorrect username'</span>)
<span class="pl-s1">access_token_expires</span> <span class="pl-c1">=</span> <span class="pl-en">timedelta</span>(<span class="pl-s1">minutes</span><span class="pl-c1">=</span><span class="pl-v">ACCESS_TOKEN_EXPIRE_MINUTES</span>)
<span class="pl-s1">access_token</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">create_access_token</span>(<span class="pl-s1">data</span><span class="pl-c1">=</span>{<span class="pl-s">'sub'</span>: <span class="pl-s1">user</span>.<span class="pl-s1">username</span>}, <span class="pl-s1">expires_delta</span><span class="pl-c1">=</span><span class="pl-s1">access_token_expires</span>)
<span class="pl-k">return</span> {<span class="pl-s">'access_token'</span>: <span class="pl-s1">access_token</span>, <span class="pl-s">'token_type'</span>: <span class="pl-s">'bearer'</span>}</pre></div>
<p dir="auto">If login success, the token will be returned , and next time you send other request need auth like</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="oauth2_scheme = OAuth2PasswordBearer(tokenUrl='/token')
async def get_current_user(token: str=Depends(oauth2_scheme)):
pass"><pre class="notranslate"><span class="pl-s1">oauth2_scheme</span> <span class="pl-c1">=</span> <span class="pl-v">OAuth2PasswordBearer</span>(<span class="pl-s1">tokenUrl</span><span class="pl-c1">=</span><span class="pl-s">'/token'</span>)
<span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">get_current_user</span>(<span class="pl-s1">token</span>: <span class="pl-s1">str</span><span class="pl-c1">=</span><span class="pl-v">Depends</span>(<span class="pl-s1">oauth2_scheme</span>)):
<span class="pl-k">pass</span></pre></div>
<ul dir="auto">
<li>How does it works the next request was added a header with Authorization: Bear automically? Where does the token returned stored?</li>
<li>When I replace the Form with json, the following requests after login are failing to be with Auth Header</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="async def login(user_data: schemas.UserLogin):
pass"><pre class="notranslate"><span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">login</span>(<span class="pl-s1">user_data</span>: <span class="pl-s1">schemas</span>.<span class="pl-v">UserLogin</span>):
<span class="pl-k">pass</span></pre></div>
<p dir="auto">I am sorry about my English and less experience about auth in Web, wish you could solve my confusion. Thanks in advance.</p> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=ndeloof" rel="nofollow">nicolas de loof</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-1018?redirect=false" rel="nofollow">SPR-1018</a></strong> and commented</p>
<p dir="auto">Some classes don't expose a plublic setter for internal list (as an example, commons-configuration CompositeConfiguration) bue some addXXX(item) method.</p>
<p dir="auto">As suggested in <a href="http://forum.springframework.org/viewtopic.php?t=3617" rel="nofollow">http://forum.springframework.org/viewtopic.php?t=3617</a><br>
a beanPostProcessor can be used to setup a bean from a List using iterative call to the add method.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.2.2</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/10770/patch_spring.txt" rel="nofollow">patch_spring.txt</a> (<em>4.60 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398050219" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/4961" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/4961/hovercard" href="https://github.com/spring-projects/spring-framework/issues/4961">#4961</a> Please improve BeanFactory support for containers & collections (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto">5 votes, 3 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=ben_hutchison" rel="nofollow">Ben Hutchison</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-230?redirect=false" rel="nofollow">SPR-230</a></strong>* and commented</p>
<p dir="auto">Objects that contain other objects (common examples include Swing Containers and the Collections classes) frequently cannot have their initial state specified through setting javabeans properties alone.</p>
<p dir="auto">This is a request for the spring core to include extensions to the syntax of the applicationContext.xml to allow such objects to be setup completely from XML. Some reasonably conveinient syntax is needed that allows methods like "add()" to be invoked on the bean at construction time. Ideally, I think the syntax should allow any arbritrary methods to be called on a bean during preparation.</p>
<p dir="auto">There is a clear precendent to be found in the design of the java.beans.XMLEncoder/Decoder classes, designed to support long term bean perisstence. Consider the extract below generated by XML-serializing a List:</p>
<p dir="auto"><?xml version="1.0" encoding="UTF-8" ?><br>
<java version="1.4.2_03" class="java.beans.XMLDecoder"><br>
<object class="java.util.ArrayList"><br>
<void method="add"><br>
<string>item</string><br>
</void><br>
</object><br>
</java></p>
<p dir="auto">Evidently, it was recognized as an important feature as its present from the first release of the peristence mechanism.</p>
<p dir="auto">Consider what is <strong>not</strong> readily doable from XML without this feature:</p>
<ul dir="auto">
<li>Cannot create any Swing component heirarchies.</li>
<li>Cannot initialize custom collections (ie anything not a vanilla set/map/list impl), unless it provides a copy-constructor.</li>
<li>Cannot init arbritrary state on objects which do not observe the get/setXXX convention (and legacy code is littered with them).</li>
</ul>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.0.2</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/15243/SPR-230.patch" rel="nofollow">SPR-230.patch</a> (<em>137.30 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398070077" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7195" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7195/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7195">#7195</a> Allow setting of properties without a javabean setter (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398070258" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7222" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7222/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7222">#7222</a> Support JavaBean Eventing methods in Spring (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398072522" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7488" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7488/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7488">#7488</a> "adder" injection in addition to "setter" (invoke addXX() instead of setXX()) (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398057408" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/5727" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/5727/hovercard" href="https://github.com/spring-projects/spring-framework/issues/5727">#5727</a> support "add"-style List injection (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">32 votes, 28 watchers</p> | 1 |
<p dir="auto">Please can you add a fancy zone feature and shortcut to enable the user to maximize a window over<br>
multiple displays.</p> | <h1 dir="auto">Support zones which span several monitors</h1>
<p dir="auto">Could you please add the capability to define zones across several monitors? For instance I would like to define one single zone spanning two monitors (this is my current setup with ultramon for instance).<br>
Thanks very much</p> | 1 |
<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">When Dialog closes, Tooltip should not appear again.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Tooltip appears again, need to have a click somewhere to let it disappears.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Wrap a Button that will open a Dialog on click with a Tooltip</li>
<li>Hover on the Button, Tooltip appears</li>
<li>Click on the Button, Tooltip disappears, Dialog opens.</li>
<li>Close Dialog, Tooltip appears again. Need to have another click to let it disappears</li>
<li><a href="https://codesandbox.io/s/7k0xp95o0j" rel="nofollow">https://codesandbox.io/s/7k0xp95o0j</a></li>
</ol>
<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>v1.0.0-beta.21</td>
</tr>
<tr>
<td>React</td>
<td>16.0.0</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome Canary 64.0.3265.0</td>
</tr>
</tbody>
</table> | <p dir="auto">I have a RaisedButton I am trying to label with a KaTeX rendered span. The content of the label is hidden behind the button and the button is clickable far underneath the button.</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">The button should render with the label visible and only be clickable over the actual button.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Here is a screenshot of what I am seeing:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8697597/31289888-7e671358-aa98-11e7-8c52-c38b45eb63dc.png"><img src="https://user-images.githubusercontent.com/8697597/31289888-7e671358-aa98-11e7-8c52-c38b45eb63dc.png" alt="screen shot 2017-10-06 at 1 12 43 pm" style="max-width: 100%;"></a><br>
The label can be seen hiding behind the button. This also occurs on buttons with no overflow, but then it just looks like a blue button...</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Here is a codesandbox.io: <a href="https://codesandbox.io/s/92484n34z4" rel="nofollow">https://codesandbox.io/s/92484n34z4</a></p>
<ol dir="auto">
<li>Create a RaisedButton with some katex in the label</li>
<li>Hover over the space beneath the button and notice that it is clickable</li>
<li>Notice the label is not visible</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">I am trying to render a series of several buttons with possible responses to a math problem prompt.</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>0.19.3</td>
</tr>
<tr>
<td>React</td>
<td>16.0.0</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
<tr>
<td>katex</td>
<td>0.8.3</td>
</tr>
</tbody>
</table> | 0 |
<h1 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature request</h1>
<p dir="auto">Modify BERT models (src/transformers/modeling_bert.py) to conform to TorchScript requirements, so they can be <code class="notranslate">jit.script()</code>-ed, not just <code class="notranslate">jit.trace()</code>-ed (as is <a href="https://huggingface.co/transformers/torchscript.html" rel="nofollow">currently the only supported option</a>)</p>
<p dir="auto"><em>Note:</em> I have a working version implementing this, which I would like to contribute.<br>
See below.</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">A scriptable model would allow for variable-length input, offering big speedup gains and simplification (no need to create different models for different input lengths).</p>
<p dir="auto">In addition, it would avoid other potential pitfalls with tracing (e.g., code paths that are input dependent and not covered by the tracing example input).</p>
<p dir="auto">Related issues:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="545733209" data-permission-text="Title is private" data-url="https://github.com/huggingface/transformers/issues/2417" data-hovercard-type="issue" data-hovercard-url="/huggingface/transformers/issues/2417/hovercard" href="https://github.com/huggingface/transformers/issues/2417">#2417</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="489632828" data-permission-text="Title is private" data-url="https://github.com/huggingface/transformers/issues/1204" data-hovercard-type="issue" data-hovercard-url="/huggingface/transformers/issues/1204/hovercard" href="https://github.com/huggingface/transformers/issues/1204">#1204</a><br>
possibly also<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="505032772" data-permission-text="Title is private" data-url="https://github.com/huggingface/transformers/issues/1477" data-hovercard-type="issue" data-hovercard-url="/huggingface/transformers/issues/1477/hovercard" href="https://github.com/huggingface/transformers/issues/1477">#1477</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="472804028" data-permission-text="Title is private" data-url="https://github.com/huggingface/transformers/issues/902" data-hovercard-type="issue" data-hovercard-url="/huggingface/transformers/issues/902/hovercard" href="https://github.com/huggingface/transformers/issues/902">#902</a></p>
<h2 dir="auto">Your contribution</h2>
<p dir="auto">I have a working PR that modifies all the models in src/transformers/modeling_bert.py and makes them TorchScript-able. I have not tested it on other models that use BERT components (e.g., albert), but it should be possible to expand the capability to those, as well.</p>
<p dir="auto">However, it would require some significant work to make it ready for submission: besides formatting, documentation, testing etc., my current version changes the method signatures, and I would need to avoid that to maintain backward-compatibility.</p>
<p dir="auto">Before putting in that work, I'd like to make sure that such a PR is something you'd be interested in and would be willing to merge in, assuming it meets the requirements.</p> | <p dir="auto"><code class="notranslate">tests/test_trainer_distributed.py</code> fails occasionally on multi-gpu github runner CI and as a result doesn't free up the 29500 default distributed port.</p>
<p dir="auto">This could be caused by an occasional deadlock discusses in testing_utils.py's <code class="notranslate">_stream_subprocess``. When debugging one such zombie it was stuck in </code>exec(eval(sys.stdin.readline()))`</p>
<p dir="auto">Note that other similar tests under <code class="notranslate">examples</code> don't exhibit the same behavior - perhaps it somehow has to do with this being a different script that it runs (this test runs its own file as the distributed script).</p>
<p dir="auto">The bt of the subsequent failures is long and confusing, as there are several mixed failures, but it's all really one failure: <code class="notranslate">Address already in use</code> since the previous distributed run of the same test didn't free up this port.</p>
<p dir="auto">A quick check should show which process is bound to it:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="netstat -tulpn | grep :29500"><pre class="notranslate"><code class="notranslate">netstat -tulpn | grep :29500
</code></pre></div>
<p dir="auto">The full bt:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="NCCL_DEBUG=INFO pytest -sv tests/test_trainer_distributed.py
================================================================ test session starts ================================================================
platform linux -- Python 3.7.4, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /home/github_actions/actions-runner/_work/transformers/transformers/.env/bin/python
cachedir: .pytest_cache
rootdir: /home/github_actions/actions-runner/_work/transformers/transformers
plugins: xdist-2.2.1, forked-1.3.0
collected 1 item
tests/test_trainer_distributed.py::TestTrainerDistributed::test_trainer
Running: /home/github_actions/actions-runner/_work/transformers/transformers/.env/bin/python -m torch.distributed.launch --nproc_per_node=2 /home/github_actions/actions-runner/_work/transformers/transformers/tests/test_trainer_distributed.py --output_dir /tmp/tmp2k265qn5
stderr: Traceback (most recent call last):
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/tests/test_trainer_distributed.py", line 82, in <module>
stderr: training_args = parser.parse_args_into_dataclasses()[0]
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/hf_argparser.py", line 180, in parse_args_into_dataclasses
stderr: obj = dtype(**inputs)
stderr: File "<string>", line 61, in __init__
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 491, in __post_init__
stderr: if is_torch_available() and self.device.type != "cuda" and self.fp16:
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1369, in wrapper
stderr: return func(*args, **kwargs)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 620, in device
stderr: return self._setup_devices
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1359, in __get__
stderr: cached = self.fget(obj)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1369, in wrapper
stderr: return func(*args, **kwargs)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 605, in _setup_devices
stderr: torch.distributed.init_process_group(backend="nccl")
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 436, in init_process_group
stderr: store, rank, world_size = next(rendezvous_iterator)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/rendezvous.py", line 179, in _env_rendezvous_handler
stderr: store = TCPStore(master_addr, master_port, world_size, start_daemon, timeout)
stderr: RuntimeError: Address already in use
stderr: Traceback (most recent call last):
stderr: File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
stderr: "__main__", mod_spec)
stderr: File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
stderr: exec(code, run_globals)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/launch.py", line 260, in <module>
stderr: main()
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/launch.py", line 256, in main
stderr: cmd=cmd)
stderr: subprocess.CalledProcessError: Command '['/home/github_actions/actions-runner/_work/transformers/transformers/.env/bin/python', '-u', '/home/github_actions/actions-runner/_work/transformers/transformers/tests/test_trainer_distributed.py', '--local_rank=1', '--output_dir', '/tmp/tmp2k265qn5']' returned non-zero exit status 1.
stdout: *****************************************
stdout: Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
stdout: *****************************************
stdout: multi-gpu-ci-runner:18062:18062 [1] NCCL INFO Bootstrap : Using [0]ens6:10.128.0.66<0>
stdout: multi-gpu-ci-runner:18062:18062 [1] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation
stdout:
stdout: multi-gpu-ci-runner:18062:18062 [1] misc/ibvwrap.cc:63 NCCL WARN Failed to open libibverbs.so[.1]
stdout: multi-gpu-ci-runner:18062:18062 [1] NCCL INFO NET/Socket : Using [0]ens6:10.128.0.66<0>
stdout: multi-gpu-ci-runner:18062:18062 [1] NCCL INFO Using network Socket
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout:
stdout: multi-gpu-ci-runner:18062:18089 [1] include/socket.h:403 NCCL WARN Connect to 10.128.0.66<52523> failed : Connection refused
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO bootstrap.cc:95 -> 2
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO bootstrap.cc:309 -> 2
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO init.cc:555 -> 2
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO init.cc:840 -> 2
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO group.cc:73 -> 2 [Async thread]
stderr: Traceback (most recent call last):
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/tests/test_trainer_distributed.py", line 82, in <module>
stderr: training_args = parser.parse_args_into_dataclasses()[0]
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/hf_argparser.py", line 180, in parse_args_into_dataclasses
stderr: obj = dtype(**inputs)
stderr: File "<string>", line 61, in __init__
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 491, in __post_init__
stderr: if is_torch_available() and self.device.type != "cuda" and self.fp16:
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1369, in wrapper
stderr: return func(*args, **kwargs)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 620, in device
stderr: return self._setup_devices
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1359, in __get__
stderr: cached = self.fget(obj)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1369, in wrapper
stderr: return func(*args, **kwargs)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 605, in _setup_devices
stderr: torch.distributed.init_process_group(backend="nccl")
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 455, in init_process_group
stderr: barrier()
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 1960, in barrier
stderr: work = _default_pg.barrier()
stderr: RuntimeError: NCCL error in: /pytorch/torch/lib/c10d/ProcessGroupNCCL.cpp:784, unhandled system error, NCCL version 2.7.8
FAILED
===================================================================== FAILURES ======================================================================
________________________________________________________ TestTrainerDistributed.test_trainer ________________________________________________________
self = <tests.test_trainer_distributed.TestTrainerDistributed testMethod=test_trainer>
@require_torch_multi_gpu
def test_trainer(self):
distributed_args = f"""
-m torch.distributed.launch
--nproc_per_node={torch.cuda.device_count()}
{self.test_file_dir}/test_trainer_distributed.py
""".split()
output_dir = self.get_auto_remove_tmp_dir()
args = f"--output_dir {output_dir}".split()
cmd = [sys.executable] + distributed_args + args
> execute_subprocess_async(cmd, env=self.get_env())
tests/test_trainer_distributed.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cmd = ['/home/github_actions/actions-runner/_work/transformers/transformers/.env/bin/python', '-m', 'torch.distributed.launc.../github_actions/actions-runner/_work/transformers/transformers/tests/test_trainer_distributed.py', '--output_dir', ...]
env = {'HOME': '/home/github_actions', 'KMP_DUPLICATE_LIB_OK': 'True', 'KMP_INIT_AT_FORK': 'FALSE', 'LANG': 'C.UTF-8', ...}, stdin = None
timeout = 180, quiet = False, echo = True
def execute_subprocess_async(cmd, env=None, stdin=None, timeout=180, quiet=False, echo=True) -> _RunOutput:
loop = asyncio.get_event_loop()
result = loop.run_until_complete(
_stream_subprocess(cmd, env=env, stdin=stdin, timeout=timeout, quiet=quiet, echo=echo)
)
cmd_str = " ".join(cmd)
if result.returncode > 0:
stderr = "\n".join(result.stderr)
raise RuntimeError(
> f"'{cmd_str}' failed with returncode {result.returncode}\n\n"
f"The combined stderr from workers follows:\n{stderr}"
)"><pre class="notranslate"><code class="notranslate">NCCL_DEBUG=INFO pytest -sv tests/test_trainer_distributed.py
================================================================ test session starts ================================================================
platform linux -- Python 3.7.4, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /home/github_actions/actions-runner/_work/transformers/transformers/.env/bin/python
cachedir: .pytest_cache
rootdir: /home/github_actions/actions-runner/_work/transformers/transformers
plugins: xdist-2.2.1, forked-1.3.0
collected 1 item
tests/test_trainer_distributed.py::TestTrainerDistributed::test_trainer
Running: /home/github_actions/actions-runner/_work/transformers/transformers/.env/bin/python -m torch.distributed.launch --nproc_per_node=2 /home/github_actions/actions-runner/_work/transformers/transformers/tests/test_trainer_distributed.py --output_dir /tmp/tmp2k265qn5
stderr: Traceback (most recent call last):
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/tests/test_trainer_distributed.py", line 82, in <module>
stderr: training_args = parser.parse_args_into_dataclasses()[0]
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/hf_argparser.py", line 180, in parse_args_into_dataclasses
stderr: obj = dtype(**inputs)
stderr: File "<string>", line 61, in __init__
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 491, in __post_init__
stderr: if is_torch_available() and self.device.type != "cuda" and self.fp16:
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1369, in wrapper
stderr: return func(*args, **kwargs)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 620, in device
stderr: return self._setup_devices
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1359, in __get__
stderr: cached = self.fget(obj)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1369, in wrapper
stderr: return func(*args, **kwargs)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 605, in _setup_devices
stderr: torch.distributed.init_process_group(backend="nccl")
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 436, in init_process_group
stderr: store, rank, world_size = next(rendezvous_iterator)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/rendezvous.py", line 179, in _env_rendezvous_handler
stderr: store = TCPStore(master_addr, master_port, world_size, start_daemon, timeout)
stderr: RuntimeError: Address already in use
stderr: Traceback (most recent call last):
stderr: File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
stderr: "__main__", mod_spec)
stderr: File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
stderr: exec(code, run_globals)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/launch.py", line 260, in <module>
stderr: main()
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/launch.py", line 256, in main
stderr: cmd=cmd)
stderr: subprocess.CalledProcessError: Command '['/home/github_actions/actions-runner/_work/transformers/transformers/.env/bin/python', '-u', '/home/github_actions/actions-runner/_work/transformers/transformers/tests/test_trainer_distributed.py', '--local_rank=1', '--output_dir', '/tmp/tmp2k265qn5']' returned non-zero exit status 1.
stdout: *****************************************
stdout: Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
stdout: *****************************************
stdout: multi-gpu-ci-runner:18062:18062 [1] NCCL INFO Bootstrap : Using [0]ens6:10.128.0.66<0>
stdout: multi-gpu-ci-runner:18062:18062 [1] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation
stdout:
stdout: multi-gpu-ci-runner:18062:18062 [1] misc/ibvwrap.cc:63 NCCL WARN Failed to open libibverbs.so[.1]
stdout: multi-gpu-ci-runner:18062:18062 [1] NCCL INFO NET/Socket : Using [0]ens6:10.128.0.66<0>
stdout: multi-gpu-ci-runner:18062:18062 [1] NCCL INFO Using network Socket
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO Call to connect returned Connection refused, retrying
stdout:
stdout: multi-gpu-ci-runner:18062:18089 [1] include/socket.h:403 NCCL WARN Connect to 10.128.0.66<52523> failed : Connection refused
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO bootstrap.cc:95 -> 2
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO bootstrap.cc:309 -> 2
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO init.cc:555 -> 2
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO init.cc:840 -> 2
stdout: multi-gpu-ci-runner:18062:18089 [1] NCCL INFO group.cc:73 -> 2 [Async thread]
stderr: Traceback (most recent call last):
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/tests/test_trainer_distributed.py", line 82, in <module>
stderr: training_args = parser.parse_args_into_dataclasses()[0]
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/hf_argparser.py", line 180, in parse_args_into_dataclasses
stderr: obj = dtype(**inputs)
stderr: File "<string>", line 61, in __init__
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 491, in __post_init__
stderr: if is_torch_available() and self.device.type != "cuda" and self.fp16:
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1369, in wrapper
stderr: return func(*args, **kwargs)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 620, in device
stderr: return self._setup_devices
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1359, in __get__
stderr: cached = self.fget(obj)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/file_utils.py", line 1369, in wrapper
stderr: return func(*args, **kwargs)
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/src/transformers/training_args.py", line 605, in _setup_devices
stderr: torch.distributed.init_process_group(backend="nccl")
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 455, in init_process_group
stderr: barrier()
stderr: File "/home/github_actions/actions-runner/_work/transformers/transformers/.env/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 1960, in barrier
stderr: work = _default_pg.barrier()
stderr: RuntimeError: NCCL error in: /pytorch/torch/lib/c10d/ProcessGroupNCCL.cpp:784, unhandled system error, NCCL version 2.7.8
FAILED
===================================================================== FAILURES ======================================================================
________________________________________________________ TestTrainerDistributed.test_trainer ________________________________________________________
self = <tests.test_trainer_distributed.TestTrainerDistributed testMethod=test_trainer>
@require_torch_multi_gpu
def test_trainer(self):
distributed_args = f"""
-m torch.distributed.launch
--nproc_per_node={torch.cuda.device_count()}
{self.test_file_dir}/test_trainer_distributed.py
""".split()
output_dir = self.get_auto_remove_tmp_dir()
args = f"--output_dir {output_dir}".split()
cmd = [sys.executable] + distributed_args + args
> execute_subprocess_async(cmd, env=self.get_env())
tests/test_trainer_distributed.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cmd = ['/home/github_actions/actions-runner/_work/transformers/transformers/.env/bin/python', '-m', 'torch.distributed.launc.../github_actions/actions-runner/_work/transformers/transformers/tests/test_trainer_distributed.py', '--output_dir', ...]
env = {'HOME': '/home/github_actions', 'KMP_DUPLICATE_LIB_OK': 'True', 'KMP_INIT_AT_FORK': 'FALSE', 'LANG': 'C.UTF-8', ...}, stdin = None
timeout = 180, quiet = False, echo = True
def execute_subprocess_async(cmd, env=None, stdin=None, timeout=180, quiet=False, echo=True) -> _RunOutput:
loop = asyncio.get_event_loop()
result = loop.run_until_complete(
_stream_subprocess(cmd, env=env, stdin=stdin, timeout=timeout, quiet=quiet, echo=echo)
)
cmd_str = " ".join(cmd)
if result.returncode > 0:
stderr = "\n".join(result.stderr)
raise RuntimeError(
> f"'{cmd_str}' failed with returncode {result.returncode}\n\n"
f"The combined stderr from workers follows:\n{stderr}"
)
</code></pre></div>
<p dir="auto">A short term workaround could be to randomize the port, so this test won't trumple upon its previous zombie.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="+ from random import randint
+ master_port = 2950 + randint(1, 99)
distributed_args = f"""
-m torch.distributed.launch
--nproc_per_node={torch.cuda.device_count()}
+ --master_port {master_port}
{self.test_file_dir}/test_trainer_distributed.py
""".split()"><pre class="notranslate"><code class="notranslate">+ from random import randint
+ master_port = 2950 + randint(1, 99)
distributed_args = f"""
-m torch.distributed.launch
--nproc_per_node={torch.cuda.device_count()}
+ --master_port {master_port}
{self.test_file_dir}/test_trainer_distributed.py
""".split()
</code></pre></div>
<p dir="auto">but this is a band-aid and a real solution is needed. It also will be an issue with any other distributed tests that rely on the same default port number.</p>
<p dir="auto">I will keep on monitoring the issue.</p>
<p dir="auto">Meanwhile this PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="812198366" data-permission-text="Title is private" data-url="https://github.com/huggingface/transformers/issues/10281" data-hovercard-type="pull_request" data-hovercard-url="/huggingface/transformers/pull/10281/hovercard" href="https://github.com/huggingface/transformers/pull/10281">#10281</a> should help with preventing the incremental number of zombies from scheduled runs.</p>
<p dir="auto">It's difficult to debug w/o being able to reproduce this problem at will.</p> | 0 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18898.1000]
Windows Terminal version: commit 6c7dfd2ce45841d32f3990147506de2f7903485d"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18898.1000]
Windows Terminal version: commit 6c7dfd2ce45841d32f3990147506de2f7903485d
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Open the Terminal app and try to type any character that requires <code class="notranslate">Alt-Gr</code>, e.g., <code class="notranslate">{</code>, <code class="notranslate">[</code> or <code class="notranslate">\</code> on a German keyboard (probably affects other locales too).</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The terminal should show the character(s).</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The terminal shows control sequences or nothing:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/225266/58176565-d4e78680-7ca2-11e9-9edb-fd5e75eb171d.png"><img src="https://user-images.githubusercontent.com/225266/58176565-d4e78680-7ca2-11e9-9edb-fd5e75eb171d.png" alt="WindowsTerminal_2019-05-22_14-58-42" style="max-width: 100%;"></a></p> | <p dir="auto"><strong>Your Windows build number:</strong><br>
10.0.18362.86</p>
<p dir="auto"><strong>What you're doing and what's happening:</strong><br>
Trying to enter the <code class="notranslate">@</code> sign on a Swedish keyboard in a PowerShell console using <code class="notranslate">Alt Gr</code> + <code class="notranslate">2</code>.<br>
See animated gif:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/357872/57315225-7099c400-70f3-11e9-803f-4d60d11feef5.gif"><img src="https://user-images.githubusercontent.com/357872/57315225-7099c400-70f3-11e9-803f-4d60d11feef5.gif" alt="terminal" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>What's wrong / what should be happening instead:</strong><br>
Windows terminal shows <code class="notranslate">digit-argument</code> instead of outputting the <code class="notranslate">@</code> sign as expected.</p>
<p dir="auto">It's possible this is a PEBKAC error somehow but the problem doesn't show up in the normal PowerShell console... 😓</p> | 1 |
<p dir="auto">This is also present in Julia v1.1:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> struct ProductSpace{T<:Tuple}
end
julia> using StaticArrays
[ Info: Precompiling StaticArrays [90137ffa-7385-5640-81b9-e52037218182]
julia> function convert_space(::Type{ProductSpace{Tuple{SVector{M,T},T}}}, x::SVector{N,T}) where {N,M,T}
end
convert_space (generic function with 1 method)
julia> function convert_space(::Type{ProductSpace{Tuple{T,SVector{M,T}}}}, x::SVector{N,T}) where {N,M,T}
end
ERROR: StackOverflowError:
Stacktrace:
[1] top-level scope at REPL[4]:1
julia> versioninfo()
Julia Version 1.3.0-DEV.121
Commit dc6c7c7e6f (2019-04-27 03:49 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin18.5.0)
CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-k">struct</span> ProductSpace{T<span class="pl-k"><:</span><span class="pl-c1">Tuple</span>}
<span class="pl-k">end</span>
julia<span class="pl-k">></span> <span class="pl-k">using</span> StaticArrays
[ Info<span class="pl-k">:</span> Precompiling StaticArrays [<span class="pl-c1">90137</span>ffa<span class="pl-k">-</span><span class="pl-c1">7385</span><span class="pl-k">-</span><span class="pl-c1">5640</span><span class="pl-k">-</span><span class="pl-c1">81</span>b9<span class="pl-k">-</span>e52037218182]
julia<span class="pl-k">></span> <span class="pl-k">function</span> <span class="pl-en">convert_space</span>(<span class="pl-k">::</span><span class="pl-c1">Type</span>{ProductSpace{Tuple{SVector{M,T},T}}}, x<span class="pl-k">::</span><span class="pl-c1">SVector{N,T}</span>) <span class="pl-k">where</span> {N,M,T}
<span class="pl-c1">end</span>
convert_space (generic <span class="pl-k">function</span> with <span class="pl-c1">1</span> method)
julia<span class="pl-k">></span> <span class="pl-k">function</span> <span class="pl-en">convert_space</span>(<span class="pl-k">::</span><span class="pl-c1">Type</span>{ProductSpace{Tuple{T,SVector{M,T}}}}, x<span class="pl-k">::</span><span class="pl-c1">SVector{N,T}</span>) <span class="pl-k">where</span> {N,M,T}
<span class="pl-c1">end</span>
ERROR<span class="pl-k">:</span> StackOverflowError<span class="pl-k">:</span>
Stacktrace<span class="pl-k">:</span>
[<span class="pl-c1">1</span>] top<span class="pl-k">-</span>level scope at REPL[<span class="pl-c1">4</span>]<span class="pl-k">:</span><span class="pl-c1">1</span>
julia<span class="pl-k">></span> <span class="pl-c1">versioninfo</span>()
Julia Version <span class="pl-c1">1.3</span>.<span class="pl-c1">0</span><span class="pl-k">-</span>DEV.<span class="pl-c1">121</span>
Commit dc6c7c7e6f (<span class="pl-c1">2019</span><span class="pl-k">-</span><span class="pl-c1">04</span><span class="pl-k">-</span><span class="pl-c1">27</span> <span class="pl-c1">03</span><span class="pl-k">:</span><span class="pl-c1">49</span> UTC)
Platform Info<span class="pl-k">:</span>
OS<span class="pl-k">:</span> macOS (x86_64<span class="pl-k">-</span>apple<span class="pl-k">-</span>darwin18.<span class="pl-c1">5.0</span>)
CPU<span class="pl-k">:</span> <span class="pl-c1">Intel</span>(R) <span class="pl-c1">Core</span>(TM) i7<span class="pl-k">-</span><span class="pl-c1">7700</span>HQ CPU @ <span class="pl-c1">2.80</span>GHz
WORD_SIZE<span class="pl-k">:</span> <span class="pl-c1">64</span>
LIBM<span class="pl-k">:</span> libopenlibm
LLVM<span class="pl-k">:</span> libLLVM<span class="pl-k">-</span><span class="pl-c1">6.0</span>.<span class="pl-c1">1</span> (ORCJIT, skylake)</pre></div> | <p dir="auto">I'm making a new issue for an older issue (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="233812880" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/22239" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/22239/hovercard" href="https://github.com/JuliaLang/julia/issues/22239">#22239</a>) that was partially fixed. The problem is a StackOverflow error in the following minimal working example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bar(::Type{Val{Tuple{Tuple{T},T}}}, ::Val{T}) where {T} = 1
bar(::Type{Val{Tuple{T,Tuple{T}}}}, ::Val{T}) where {T} = 2"><pre class="notranslate"><code class="notranslate">bar(::Type{Val{Tuple{Tuple{T},T}}}, ::Val{T}) where {T} = 1
bar(::Type{Val{Tuple{T,Tuple{T}}}}, ::Val{T}) where {T} = 2
</code></pre></div>
<p dir="auto">The output using the current nightly build is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: LoadError: StackOverflowError:
Stacktrace:
[1] top-level scope
[2] include at ./boot.jl:306 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1072
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] exec_options(::Base.JLOptions) at ./client.jl:327
[6] _start() at ./client.jl:455
in expression starting at /tmp/mwe.jl:2"><pre class="notranslate"><code class="notranslate">ERROR: LoadError: StackOverflowError:
Stacktrace:
[1] top-level scope
[2] include at ./boot.jl:306 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1072
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] exec_options(::Base.JLOptions) at ./client.jl:327
[6] _start() at ./client.jl:455
in expression starting at /tmp/mwe.jl:2
</code></pre></div>
<p dir="auto">As <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/martinholters/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/martinholters">@martinholters</a> pointed out in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="233812880" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/22239" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/22239/hovercard" href="https://github.com/JuliaLang/julia/issues/22239">#22239</a>, the error results from <code class="notranslate">typeintersect</code> as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> typeintersect(Tuple{Type{Tuple{T,Val{T}}}, Val{T}} where T, Tuple{Type{Tuple{Val{T},T}}, Val{T}} where T)
ERROR: StackOverflowError:
Stacktrace:
[1] typeintersect(::Any, ::Any) at ./reflection.jl:469
[2] top-level scope"><pre class="notranslate"><code class="notranslate">julia> typeintersect(Tuple{Type{Tuple{T,Val{T}}}, Val{T}} where T, Tuple{Type{Tuple{Val{T},T}}, Val{T}} where T)
ERROR: StackOverflowError:
Stacktrace:
[1] typeintersect(::Any, ::Any) at ./reflection.jl:469
[2] top-level scope
</code></pre></div>
<p dir="auto">Above examples were tested today on master:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> versioninfo()
Julia Version 0.7.0-DEV.4594
Commit 29a1719f95 (2018-03-15 22:41 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)
Environment:"><pre class="notranslate"><code class="notranslate">julia> versioninfo()
Julia Version 0.7.0-DEV.4594
Commit 29a1719f95 (2018-03-15 22:41 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)
Environment:
</code></pre></div>
<p dir="auto">The examples do also lead to similar errors on 0.6.2.</p> | 1 |
<p dir="auto">Since 2.7, it's recommended to use <code class="notranslate">absolute_url</code> to generate absolute assets URL (<a href="http://symfony.com/blog/new-in-symfony-2-7-the-new-asset-component" rel="nofollow">http://symfony.com/blog/new-in-symfony-2-7-the-new-asset-component</a>).</p>
<p dir="auto">However, in a console command, <code class="notranslate">absolute_url</code> does not rely on <code class="notranslate">request_context</code> and, therefore, cannot generate reliable asset URLs...</p>
<p dir="auto"><strong>Reproduction</strong>:</p>
<p dir="auto">Clone: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/lemoinem/symfony-standard/commit/c5bcfb4/hovercard" href="https://github.com/lemoinem/symfony-standard/commit/c5bcfb4">lemoinem/symfony-standard@<tt>c5bcfb4</tt></a> (branch: <code class="notranslate">bug/absolute-url-in-command</code>)<br>
(No DB, nor mailer config required)</p>
<p dir="auto">Command: <code class="notranslate">php app/console TEST:absolute-url</code></p> | <p dir="auto">Hi,</p>
<p dir="auto">I m trying to send emails from the CLI (with a valid scheme/host)</p>
<ul dir="auto">
<li>For the <code class="notranslate">{{ url('app_homepage') }}</code> => it works (cf <a href="http://symfony.com/doc/current/cookbook/console/sending_emails.html#configuring-the-request-context-per-command" rel="nofollow">http://symfony.com/doc/current/cookbook/console/sending_emails.html#configuring-the-request-context-per-command</a>)</li>
<li>For the <code class="notranslate">{{ absolute_url(asset('img/app.jpg')) }}</code> => does not work</li>
</ul>
<p dir="auto">Is this a bug or I should use a different way to succeed ?</p>
<p dir="auto">Many thanks for your answers,</p>
<p dir="auto">Cheers,</p> | 1 |
<h4 dir="auto">A small, complete example of the issue</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd
df = pd.read_csv('greedy.txt', parse_dates=['EuroDate'])
print(df)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-s">'greedy.txt'</span>, <span class="pl-s1">parse_dates</span><span class="pl-c1">=</span>[<span class="pl-s">'EuroDate'</span>])
<span class="pl-en">print</span>(<span class="pl-s1">df</span>)</pre></div>
<p dir="auto">with "greedy.txt" as</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="EuroDate
10/9/2016
30/9/2016"><pre class="notranslate"><code class="notranslate">EuroDate
10/9/2016
30/9/2016
</code></pre></div>
<h4 dir="auto">Expected Output</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" EuroDate
0 2016-09-10
1 2016-09-30"><pre class="notranslate"><code class="notranslate"> EuroDate
0 2016-09-10
1 2016-09-30
</code></pre></div>
<h4 dir="auto">Actual Output</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" EuroDate
0 2016-10-09
1 2016-09-30"><pre class="notranslate"><code class="notranslate"> EuroDate
0 2016-10-09
1 2016-09-30
</code></pre></div>
<p dir="auto"><a href="https://github.com/pydata/pandas/files/493576/greedy.txt">greedy.txt</a></p>
<p dir="auto">So <code class="notranslate">read_csv()</code> has interpreted the first line as a US-format date, then realised that the second line cannot be a US-formatted date, so switched to European format. But it has <em>not</em> gone back and reevaluated the first line in light of its new information. So the resulting data is inconsistent, and pandas knows this.</p>
<p dir="auto">Obviously, I appreciate that</p>
<ul dir="auto">
<li>CSV files are a disaster</li>
<li>This code is <em>asking</em> Pandas to infer the dates</li>
<li>Going back and re-evaluating previous data in light of new information is slow and annoying.</li>
<li>It won't always be possible to do anything except interpret a field as a string if there is inconsistent data.</li>
<li>Some datasets will include dates in multiple formats (e.g. if humans have entered them free-form) and in those cases is might just be useful for Pandas to take its best guess on a row-by-row basis.</li>
</ul>
<p dir="auto">However, I contend that in this case the behaviour is <em>incorrect</em> (because there is a consistent interpretation of the column as a date, which is in fact clear by the second record). Even if some people don't regard this as a bug, I contend that it is at the very least dangerous and likely to cause serious (and sometimes baffling) errors. In my view, it would be much better to go back and reinterpret the data according to the information now available or to fail. If even this is considered too much, at the very least Pandas should issue a prominent warning that it has interpreted different rows in the column using different date formats.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
## INSTALLED VERSIONS
<p dir="auto">commit: None<br>
python: 3.5.1.final.0<br>
python-bits: 64<br>
OS: Darwin<br>
OS-release: 15.6.0<br>
machine: x86_64<br>
processor: i386<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: en_GB.UTF-8</p>
<p dir="auto">pandas: 0.18.1<br>
nose: None<br>
pip: 8.1.2<br>
setuptools: 19.4<br>
Cython: 0.24<br>
numpy: 1.11.1<br>
scipy: None<br>
statsmodels: None<br>
xarray: None<br>
IPython: None<br>
sphinx: None<br>
patsy: None<br>
dateutil: 2.5.3<br>
pytz: 2016.4<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: None<br>
matplotlib: 1.5.1<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: None<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.8<br>
boto: None<br>
pandas_datareader: None</p>
</details> | <p dir="auto">The build dependencies could be enormously simplified if we could remove the reliance of _libs/src/util.pxd on _libs/src/numpy_helper.h. I've ported most of the functions directly to util.pxd, would like input on a few remaining ones.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PANDAS_INLINE PyObject* get_value_1d(PyArrayObject* ap, Py_ssize_t i) {
char* item = (char*)PyArray_DATA(ap) + i * PyArray_STRIDE(ap, 0);
return PyArray_Scalar(item, PyArray_DESCR(ap), (PyObject*)ap);
}"><pre class="notranslate"><code class="notranslate">PANDAS_INLINE PyObject* get_value_1d(PyArrayObject* ap, Py_ssize_t i) {
char* item = (char*)PyArray_DATA(ap) + i * PyArray_STRIDE(ap, 0);
return PyArray_Scalar(item, PyArray_DESCR(ap), (PyObject*)ap);
}
</code></pre></div>
<p dir="auto">It looks like this just returns <code class="notranslate">ap[i]</code>. Presumably more efficient in some way. I'm guessing this was written before typed memoryviews were available in cython; there may be a less verbose plain-cython alternative available.</p>
<p dir="auto">Alternatively, everything there except for <code class="notranslate">PyArray_DESCR</code> can cimported with a little effort. If anyone knows of a way to get at this last piece, then both <code class="notranslate">get_value_1d</code> and <code class="notranslate">assign_value_1d</code> can be moved directly into <code class="notranslate">util</code>.</p> | 0 |
<h4 dir="auto">Problem description</h4>
<p dir="auto">There are several convenient datasets available in <code class="notranslate">sklearn</code>. They consistently return the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_breast_cancer.html#sklearn.datasets.load_breast_cancer" rel="nofollow"><code class="notranslate">Bunch</code></a> <code class="notranslate">sklearn</code> object. Therefore, it would not be too difficult to create a function to convert from <code class="notranslate">sklearn</code> into a nice, clean <code class="notranslate">pandas</code> dataframe.</p>
<h4 dir="auto">Proposal</h4>
<p dir="auto">I am happy to take on the task of creating this conversion, but I'd like to get some input so that I create what users would actually want, and ideally my pull request would be accepted.</p>
<p dir="auto">Below is a toy example of how I would expect the API to work, where <code class="notranslate">to_dataframe</code> is the name of the new method. (I'm happy to call it whatever, that just seemed like a good guess.)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> from sklearn.datasets import load_iris
>>> sk_iris = load_iris()
>>> pd_iris = sk_iris.to_dataframe()
>>> pd_iris.head()
sepal length (cm) sepal width (cm) petal length (cm) petal width (cm) target
0 5.1 3.5 1.4 0.2 setosa
1 4.9 3.0 1.4 0.2 setosa
2 4.7 3.2 1.3 0.2 setosa
3 4.6 3.1 1.5 0.2 setosa
4 5.0 3.6 1.4 0.2 setosa
>>> pd_iris.dtypes
sepal length (cm) float64
sepal width (cm) float64
petal length (cm) float64
petal width (cm) float64
target category
dtype: object
>>> type(pd_iris)
<class 'pandas.core.frame.DataFrame'>"><pre class="notranslate"><code class="notranslate">>>> from sklearn.datasets import load_iris
>>> sk_iris = load_iris()
>>> pd_iris = sk_iris.to_dataframe()
>>> pd_iris.head()
sepal length (cm) sepal width (cm) petal length (cm) petal width (cm) target
0 5.1 3.5 1.4 0.2 setosa
1 4.9 3.0 1.4 0.2 setosa
2 4.7 3.2 1.3 0.2 setosa
3 4.6 3.1 1.5 0.2 setosa
4 5.0 3.6 1.4 0.2 setosa
>>> pd_iris.dtypes
sepal length (cm) float64
sepal width (cm) float64
petal length (cm) float64
petal width (cm) float64
target category
dtype: object
>>> type(pd_iris)
<class 'pandas.core.frame.DataFrame'>
</code></pre></div>
<p dir="auto">Would this be desirable? Is this API I propose reasonable? What should I consider in the API? (E.g., in the example above, I have taken the fact that the <code class="notranslate">sklearn</code> dataset object has both a <code class="notranslate">target</code> and <code class="notranslate">target_names</code>, which means that I could infer that this should be a categorical. This can obviously make things a bit more fragile. Should this inference be skipped?</p> | <p dir="auto">Users should be able to get datasets returned as [Sparse]DataFrames with named columns in this day and age, for those datasets otherwise providing a Bunch with <code class="notranslate">feature_names</code>. This would be controlled with an <code class="notranslate">as_frame</code> parameter (though <code class="notranslate">return_X_y='frame'</code> would mean the common usage is more succinct).</p> | 1 |
<h3 dir="auto">Problem description</h3>
<h3 dir="auto">Steps to reproduce</h3>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>Material-UI:</li>
<li>React:</li>
<li>Browser:</li>
</ul> | <p dir="auto">[x ] I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</p>
<p dir="auto">If using multiple prop on Select component, label goes back to placeholder position on lost focus, although value is set.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1487984/34601653-4c85f406-f1fd-11e7-9b12-2b4a9916f807.gif"><img src="https://user-images.githubusercontent.com/1487984/34601653-4c85f406-f1fd-11e7-9b12-2b4a9916f807.gif" alt="multiselect_label_issue" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto"><a href="https://codesandbox.io/s/oo2r5x7m6q" rel="nofollow">Sandbox</a></p>
<h2 dir="auto">My Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>v1.0.0-beta.26</td>
</tr>
<tr>
<td>React</td>
<td>v16.2.0</td>
</tr>
</tbody>
</table> | 0 |
<h1 dir="auto">Environment</h1>
<p dir="auto">Windows build number: Version 10.0.18362.175<br>
Windows Terminal version (if applicable): Commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/terminal/commit/a08666b58eb65b85ddf94e69892fa3e0a084ba98/hovercard" href="https://github.com/microsoft/terminal/commit/a08666b58eb65b85ddf94e69892fa3e0a084ba98"><tt>a08666b</tt></a></p>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Start the Windows Terminal (Dev Build).</li>
<li>Open an Ubuntu tab (or whatever Linux shell you have).</li>
<li>Do a bunch of directory listings that really fill up the scrollback buffer (the System32 directory is good for that).</li>
<li>Execute <code class="notranslate">printf "\e[3J"</code> to clear the scrollback buffer.</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The scrollback buffer should be cleared and control returned to the user almost immediately.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The app essentially stops responding. It will return to normal eventually, but how long that takes depends on the speed of your computer and how full the scrollback was to start with.</p>
<p dir="auto">This might be a duplicate of one of the other freeze-on-exit bugs (e.g. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="459517763" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/1445" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/1445/hovercard" href="https://github.com/microsoft/terminal/issues/1445">#1445</a>), since the terminal seems to generate an erase scrollback call whenever you exit. But it only happens when actually typing <code class="notranslate">exit</code> in the shell - closing the tab directly works OK.</p>
<p dir="auto">From what I've been able to determine, the source of the problem is in the <code class="notranslate">Terminal::EraseInDisplay</code> method. When the eraseType is <code class="notranslate">EraseType::Scrollback</code>, it performs a loop to clear every line of the scrollback:</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/microsoft/terminal/blob/a08666b58eb65b85ddf94e69892fa3e0a084ba98/src/cascadia/TerminalCore/TerminalApi.cpp#L340-L345">terminal/src/cascadia/TerminalCore/TerminalApi.cpp</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 340 to 345
in
<a data-pjax="true" class="commit-tease-sha" href="/microsoft/terminal/commit/a08666b58eb65b85ddf94e69892fa3e0a084ba98">a08666b</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L340" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="340"></td>
<td id="LC340" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">auto</span> eraseIter = <span class="pl-c1">OutputCellIterator</span>(UNICODE_SPACE, _buffer-><span class="pl-c1">GetCurrentAttributes</span>(), _mutableViewport.<span class="pl-c1">RightInclusive</span>() * (eraseEnd - eraseStart + <span class="pl-c1">1</span>)); </td>
</tr>
<tr class="border-0">
<td id="L341" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="341"></td>
<td id="LC341" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">for</span> (SHORT i = eraseStart; i <= eraseEnd; i++) </td>
</tr>
<tr class="border-0">
<td id="L342" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="342"></td>
<td id="LC342" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L343" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="343"></td>
<td id="LC343" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> COORD erasePos{ <span class="pl-c1">0</span>, i }; </td>
</tr>
<tr class="border-0">
<td id="L344" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="344"></td>
<td id="LC344" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> _buffer-><span class="pl-c1">Write</span>(eraseIter, erasePos); </td>
</tr>
<tr class="border-0">
<td id="L345" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="345"></td>
<td id="LC345" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto">Note that the <em>eraseIter</em> <code class="notranslate">OutputCellIterator</code> is set to the size of the full area being cleared, but a <code class="notranslate">_buffer->Write</code> call is made with that iterator for every line. Each one of those calls is enough to clear the entire area, so it's essentially performing a huge write operation over and over again. If your scrollback buffer is large, this can take forever.</p>
<p dir="auto">I think this is probably a regression. I have preview build 0.2.1831.0 installed on this machine too, and that doesn't seem to have the problem.</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="18362.449: [run `[Environment]::OSVersion: 1903]
Windows Terminal version (if applicable):V0.6
Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">18362.449: [run `[Environment]::OSVersion: 1903]
Windows Terminal version (if applicable):V0.6
Any other software?
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">my project just use euc-jp encode<br>
powerShell command:<br>
chcp 20932<br>
but can't read text for euc-jp encode<br>
and i can't change to write japanese</p>
<h1 dir="auto">Expected behavior</h1>
<h1 dir="auto">Actual behavior</h1> | 0 |
<p dir="auto">ReactBaseClasses.js:64 Uncaught TypeError: this.updater.enqueueCallback is not a function<br>
at Transition../node_modules/react-transition-group/node_modules/react/lib/ReactBaseClasses.js.ReactComponent.setState (ReactBaseClasses.js:64)<br>
at Transition.safeSetState (Transition.js:294)<br>
at Transition.performEnter (Transition.js:244)<br>
at Transition.updateStatus (Transition.js:213)<br>
at Transition.componentDidMount (Transition.js:157)<br>
at commitLifeCycles (react-dom.development.js:11505)<br>
at commitAllLifeCycles (react-dom.development.js:12294)<br>
at HTMLUnknownElement.callCallback (react-dom.development.js:1299)<br>
at Object.invokeGuardedCallbackDev (react-dom.development.js:1338)<br>
at invokeGuardedCallback (react-dom.development.js:1195)<br>
at commitAllWork (react-dom.development.js:12415)<br>
at workLoop (react-dom.development.js:12687)<br>
at HTMLUnknownElement.callCallback (react-dom.development.js:1299)<br>
at Object.invokeGuardedCallbackDev (react-dom.development.js:1338)<br>
at invokeGuardedCallback (react-dom.development.js:1195)<br>
at performWork (react-dom.development.js:12800)<br>
at batchedUpdates (react-dom.development.js:13244)<br>
at performFiberBatchedUpdates (react-dom.development.js:1646)<br>
at stackBatchedUpdates (react-dom.development.js:1637)<br>
at batchedUpdates (react-dom.development.js:1651)<br>
at Object.batchedUpdatesWithControlledComponents [as batchedUpdates] (react-dom.development.js:1664)<br>
at dispatchEvent (react-dom.development.js:1874)</p>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>v1 beta 1.0.12</td>
</tr>
<tr>
<td>React</td>
<td>16</td>
</tr>
<tr>
<td>browser</td>
<td>chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | <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>
<p dir="auto"><code class="notranslate">MenuItem</code>s passing a <code class="notranslate">containerElement</code> prop, e.g.:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<MenuItem
onClick={props.toggleDrawerOpen}
primaryText={t('nav.home')}
containerElement={<NavLink exact to="/" />}
/>"><pre class="notranslate"><code class="notranslate"><MenuItem
onClick={props.toggleDrawerOpen}
primaryText={t('nav.home')}
containerElement={<NavLink exact to="/" />}
/>
</code></pre></div>
<p dir="auto">...throw the following warning:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.
Check the render method of `EnhancedButton`.
in NavLink (at DrawerMenu.js:60)
in EnhancedButton (created by ListItem)
in div (created by ListItem)
in ListItem (created by MenuItem)
in MenuItem (at DrawerMenu.js:57)"><pre class="notranslate"><code class="notranslate">Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.
Check the render method of `EnhancedButton`.
in NavLink (at DrawerMenu.js:60)
in EnhancedButton (created by ListItem)
in div (created by ListItem)
in ListItem (created by MenuItem)
in MenuItem (at DrawerMenu.js:57)
</code></pre></div>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">No warnings should be thrown.</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>0.19.2</td>
</tr>
<tr>
<td>React</td>
<td>16.0.0</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">I've been building an entire application to get my hands wet with deno. It's great so far. Thank you everyone for your hard work and contributions.</p>
<p dir="auto">A main development pain point I experience is importing new packages. I have to visit the package documentation, and get the url. Even for packages I have already used, I have to go to the documentation every time to copy the really long url.</p>
<p dir="auto">Now most of us deno users would be coming from npm, so it'd be more productive to be able to use common packages without having to visit documentations all the time to copy the url.</p>
<p dir="auto">With node, I could just <code class="notranslate">npm i express</code>, then <code class="notranslate">require('express')</code>, because <code class="notranslate">express</code> is easy to remember.</p>
<p dir="auto">My suggestion is to have similar functionality with deno. We could have an alias for urls. For example, <code class="notranslate">import * as log from 'log'</code> resolves to <code class="notranslate">import * as log from 'https://deno.land/std/log/mod.ts'</code>. Deno just resolves the alias behind the scenes.</p>
<p dir="auto">I hope the suggestion makes sense. Looking forward to what you think, or any drawbacks and feedback. Thanks !</p> | <p dir="auto">This has probably cross your mind while in the early stages of development in Deno, but what about an alias standard for packages?</p>
<p dir="auto">If I wanna import say React into most of my files I may not wanna write its url into each one(gotta admit it's kinda ugly), so why not reference it once into a file that act as a synonim of it so i can use it into my project?</p>
<p dir="auto">First thoughts were something like this (not that it is any prettier but will do)</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/42647963/68537684-332e2180-0336-11ea-80aa-d756dce013c2.png"><img src="https://user-images.githubusercontent.com/42647963/68537684-332e2180-0336-11ea-80aa-d756dce013c2.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">This isn't really a feature but more of a standard for Deno development to maybe be included into the documentation now that 1.0 is coming close.</p> | 1 |
<p dir="auto">Domain Errors and Bounds Errors provide incorrect tracebacks when called within loops. For example, if a file contains</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="while true
10^(-1)
end"><pre class="notranslate"><code class="notranslate">while true
10^(-1)
end
</code></pre></div>
<p dir="auto">then the domain error is traced back to line 1, instead of line 2. Bounds errors provide incorrect tracebacks in the following example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function do_something()
foo = rand(4)
foo[5]
end
while true
do_something()
end"><pre class="notranslate"><code class="notranslate">function do_something()
foo = rand(4)
foo[5]
end
while true
do_something()
end
</code></pre></div>
<p dir="auto">In this case, the error is traced back to the do_something() line, instead of where the error actually occurs at the foo[5] line.</p>
<p dir="auto">I'm running Julia commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/74a41d2523e823e956cbf9fca288a75b58734cad/hovercard" href="https://github.com/JuliaLang/julia/commit/74a41d2523e823e956cbf9fca288a75b58734cad"><tt>74a41d2</tt></a> on Windows.</p> | <p dir="auto">Should this test not succeed?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="using Test
function becareful()
@warn "attention"
end
@test_warn r".*attention.*" becareful()"><pre class="notranslate"><code class="notranslate">using Test
function becareful()
@warn "attention"
end
@test_warn r".*attention.*" becareful()
</code></pre></div>
<p dir="auto">I get this error message on Julia 0.7.0 and 1.0.0 (official Linux build).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="┌ Warning: attention
└ @ Main REPL[2]:2
Test Failed at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Test/src/Test.jl:605
Expression: contains_warn(read(fname, String), $(Expr(:escape, :(#= REPL[3]:1 =# @r_str ".*attention.*"))))
ERROR: There was an error during testing"><pre class="notranslate"><code class="notranslate">┌ Warning: attention
└ @ Main REPL[2]:2
Test Failed at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Test/src/Test.jl:605
Expression: contains_warn(read(fname, String), $(Expr(:escape, :(#= REPL[3]:1 =# @r_str ".*attention.*"))))
ERROR: There was an error during testing
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 0.7.0
Commit a4cb80f3ed (2018-08-08 06:46 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i3-3120M CPU @ 2.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, ivybridge)"><pre class="notranslate"><code class="notranslate">Julia Version 0.7.0
Commit a4cb80f3ed (2018-08-08 06:46 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i3-3120M CPU @ 2.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, ivybridge)
</code></pre></div> | 0 |
<p dir="auto">When visualizing high-dimensional datasets, parallel coordinates plots are sometimes very useful. I would love for Seaborn to have a build in function to do this!</p>
<p dir="auto"><strong>Resources</strong></p>
<ul dir="auto">
<li>Wikipedia: <a href="https://en.wikipedia.org/wiki/Parallel_coordinates" rel="nofollow">Parallel coordinates</a></li>
<li>Python Graph Gallery: <a href="https://www.python-graph-gallery.com/parallel-plot/" rel="nofollow">Parallel coordinate plot</a></li>
<li>plotly: <a href="https://plotly.com/python/parallel-coordinates-plot/" rel="nofollow">Parallel Coordinates Plot in Python</a></li>
<li>Pandas docs: <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.plotting.parallel_coordinates.html" rel="nofollow">pandas.plotting.parallel_coordinates</a></li>
</ul> | <p dir="auto">Tested with seaborn's latest dev version, pandas 1.2.3.</p>
<p dir="auto">Dataframes can have indices with repeated entries. For example, <code class="notranslate">df.explode</code> which converts lists in cells into separate rows, keeps the original indices. Some seaborn functions generate an error <code class="notranslate">ValueError: cannot reindex from a duplicate axis</code> with such dataframes. <code class="notranslate">lineplot</code>, <code class="notranslate">stripplot</code>, <code class="notranslate">swarmplot</code> give such error. <code class="notranslate">pointplot</code>, <code class="notranslate">barplot</code> and <code class="notranslate">boxplot</code> work without problem.</p>
<p dir="auto">Calling <code class="notranslate">.reset_index()</code> makes the problem go away.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import` pandas as pd
import seaborn as sns
df = pd.DataFrame({'x': [1, 2],
'val': [[3, 4, 5], [6, 7]] })
sns.stripplot(data=df.explode('val'), x='x', y='val')"><pre class="notranslate"><code class="notranslate">import` pandas as pd
import seaborn as sns
df = pd.DataFrame({'x': [1, 2],
'val': [[3, 4, 5], [6, 7]] })
sns.stripplot(data=df.explode('val'), x='x', y='val')
</code></pre></div>
<p dir="auto">In seaborn 0.11.1 this same problem doesn't seem to exist.</p>
<p dir="auto">PS: <code class="notranslate">sns.violinplot(data=df.explode('val').reset_index(), x='x', y='val')</code> gives a complete different error, although something similar to <code class="notranslate">boxplot</code> would be expected (<code class="notranslate">TypeError: No loop matching the specified signature and casting was found for ufunc add</code>, during a call to <code class="notranslate">gaussian_kde</code>, numpy version <code class="notranslate">1.20.1</code>, scipy <code class="notranslate">1.5.2</code>).</p> | 0 |
<h4 dir="auto">Issue Description</h4>
<ul dir="auto">
<li>When Issue Happens<br>
When I want to scroll down in the Map during a lesson.</li>
<li>Steps To Reproduce</li>
<li>Open a lesson.</li>
<li>Click Map</li>
<li>Try to scroll down.</li>
</ul>
<h4 dir="auto">Browser Information</h4>
<ul dir="auto">
<li>Browser Name, Version<br>
Safari 9.0.3</li>
<li>Operating System<br>
OSX 10.11.3</li>
</ul> | <p dir="auto">This happens many times. When I click on the map tab, I cannot scroll down the list on the right. But I can scroll up normally.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/16045446/13109369/b980fca8-d5b3-11e5-948b-4d874153fc63.png"><img width="1280" alt="screen shot 2016-02-17 at 19 37 02" src="https://cloud.githubusercontent.com/assets/16045446/13109369/b980fca8-d5b3-11e5-948b-4d874153fc63.png" style="max-width: 100%;"></a><br>
It seems that the "menu" button displays abnormally as well.</p> | 1 |
<p dir="auto">This happens every time I have a dirty form on one tab, move to another tab with the same form and come back.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/MSchrenker/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/MSchrenker">@MSchrenker</a> commented a test case below to reproduce a similar issue.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building NotificationListener<KeepAliveNotification>:
flutter: 'package:flutter/src/rendering/object.dart': Failed assertion: line 2756 pos 14:
flutter: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter: https://github.com/flutter/flutter/issues/new
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2 _RenderSliverMultiBoxAdaptor&RenderSliver&ContainerRenderObjectMixin._insertIntoChildList (package:flutter/src/rendering/object.dart)
flutter: #3 _RenderSliverMultiBoxAdaptor&RenderSliver&ContainerRenderObjectMixin.insert (package:flutter/src/rendering/object.dart:2790:5)
flutter: #4 RenderSliverMultiBoxAdaptor.insert (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:209:11)
flutter: #5 SliverMultiBoxAdaptorElement.insertChildRenderObject (package:flutter/src/widgets/sliver.dart:863:18)
flutter: #6 RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:4513:35)
flutter: #7 RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4279:5)
flutter: #8 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4653:11)
flutter: #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
flutter: #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
flutter: #11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #12 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
flutter: #14 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
flutter: #15 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
flutter: #16 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
flutter: #17 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #18 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #19 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
flutter: #20 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
flutter: #21 ParentDataElement.mount (package:flutter/src/widgets/framework.dart:3955:11)
flutter: #22 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
flutter: #23 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
flutter: #24 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #25 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #26 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
flutter: #27 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3769:11)
flutter: #28 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
flutter: #29 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
flutter: #30 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
flutter: #31 SliverMultiBoxAdaptorElement.updateChild (package:flutter/src/widgets/sliver.dart:744:36)
flutter: #32 SliverMultiBoxAdaptorElement.performRebuild (package:flutter/src/widgets/sliver.dart:702:34)
flutter: #33 SliverMultiBoxAdaptorElement.update (package:flutter/src/widgets/sliver.dart:671:7)
flutter: #34 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #35 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4379:32)
flutter: #36 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4769:17)
flutter: #37 _ViewportElement.update (package:flutter/src/widgets/viewport.dart:192:11)
flutter: #38 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #39 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #40 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #41 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #42 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #43 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #44 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #45 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #46 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #47 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #48 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #49 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #50 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #51 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #52 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #53 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #54 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #55 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #56 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #57 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #58 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #59 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #60 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #61 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #62 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #63 StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
flutter: #64 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #65 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #66 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #67 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #68 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #69 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #70 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #71 StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
flutter: #72 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #73 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #74 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #75 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #76 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #77 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #78 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #79 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #80 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #81 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #82 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #83 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #84 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #85 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4379:32)
flutter: #86 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4769:17)
flutter: #87 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #88 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #89 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #90 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #91 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #92 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #93 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #94 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #95 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #96 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #97 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #98 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #99 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #100 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #101 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #102 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #103 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #104 StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
flutter: #105 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #106 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #107 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #108 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #109 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #110 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #111 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #112 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #113 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #114 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #115 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #116 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #117 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #118 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #119 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #120 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #121 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #122 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #123 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #124 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #125 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #126 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #127 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #128 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #129 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #130 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2242:33)
flutter: #131 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:626:20)
flutter: #132 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
flutter: #133 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #134 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
flutter: #135 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
flutter: #136 _invoke (dart:ui/hooks.dart:120:13)
flutter: #137 _drawFrame (dart:ui/hooks.dart:109:3)
flutter: (elided 2 frames from class _AssertionError)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 2756 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
flutter: Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 2756 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
flutter: Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 2756 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: type 'RenderErrorBox' is not a subtype of type 'RenderSemanticsGestureHandler'"><pre class="notranslate"><code class="notranslate">flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building NotificationListener<KeepAliveNotification>:
flutter: 'package:flutter/src/rendering/object.dart': Failed assertion: line 2756 pos 14:
flutter: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter: https://github.com/flutter/flutter/issues/new
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2 _RenderSliverMultiBoxAdaptor&RenderSliver&ContainerRenderObjectMixin._insertIntoChildList (package:flutter/src/rendering/object.dart)
flutter: #3 _RenderSliverMultiBoxAdaptor&RenderSliver&ContainerRenderObjectMixin.insert (package:flutter/src/rendering/object.dart:2790:5)
flutter: #4 RenderSliverMultiBoxAdaptor.insert (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:209:11)
flutter: #5 SliverMultiBoxAdaptorElement.insertChildRenderObject (package:flutter/src/widgets/sliver.dart:863:18)
flutter: #6 RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:4513:35)
flutter: #7 RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4279:5)
flutter: #8 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4653:11)
flutter: #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
flutter: #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
flutter: #11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #12 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
flutter: #14 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
flutter: #15 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
flutter: #16 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
flutter: #17 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #18 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #19 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
flutter: #20 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
flutter: #21 ParentDataElement.mount (package:flutter/src/widgets/framework.dart:3955:11)
flutter: #22 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
flutter: #23 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
flutter: #24 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #25 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #26 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
flutter: #27 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3769:11)
flutter: #28 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
flutter: #29 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
flutter: #30 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
flutter: #31 SliverMultiBoxAdaptorElement.updateChild (package:flutter/src/widgets/sliver.dart:744:36)
flutter: #32 SliverMultiBoxAdaptorElement.performRebuild (package:flutter/src/widgets/sliver.dart:702:34)
flutter: #33 SliverMultiBoxAdaptorElement.update (package:flutter/src/widgets/sliver.dart:671:7)
flutter: #34 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #35 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4379:32)
flutter: #36 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4769:17)
flutter: #37 _ViewportElement.update (package:flutter/src/widgets/viewport.dart:192:11)
flutter: #38 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #39 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #40 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #41 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #42 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #43 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #44 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #45 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #46 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #47 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #48 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #49 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #50 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #51 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #52 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #53 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #54 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #55 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #56 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #57 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #58 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #59 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #60 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #61 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #62 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #63 StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
flutter: #64 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #65 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #66 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #67 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #68 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #69 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #70 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #71 StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
flutter: #72 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #73 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #74 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #75 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #76 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #77 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #78 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #79 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #80 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #81 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #82 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #83 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #84 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #85 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4379:32)
flutter: #86 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4769:17)
flutter: #87 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #88 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #89 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #90 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #91 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #92 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #93 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #94 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #95 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #96 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #97 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #98 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #99 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #100 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #101 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #102 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #103 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #104 StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
flutter: #105 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #106 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #107 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #108 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #109 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #110 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #111 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #112 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #113 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #114 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #115 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #116 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #117 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #118 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #119 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #120 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #121 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #122 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #123 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #124 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #125 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #126 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #127 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #128 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #129 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #130 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2242:33)
flutter: #131 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:626:20)
flutter: #132 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
flutter: #133 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #134 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
flutter: #135 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
flutter: #136 _invoke (dart:ui/hooks.dart:120:13)
flutter: #137 _drawFrame (dart:ui/hooks.dart:109:3)
flutter: (elided 2 frames from class _AssertionError)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 2756 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
flutter: Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 2756 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
flutter: Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 2756 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3497 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
flutter: Another exception was thrown: type 'RenderErrorBox' is not a subtype of type 'RenderSemanticsGestureHandler'
</code></pre></div> | <h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">I have a PageView that contains the top level widgets for my app, with switching between them controlled by a BottomNavBar. As per <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Hixie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Hixie">@Hixie</a>'s advice in the chat, I am adding <code class="notranslate">AutomaticKeepAliveClientMixin</code> to these top level widgets so the PageView won't recycle them and will preserve state. After I added this to the main widget that contains a network loaded ListView, on occasion when switching back to this ListView from another tab I get this failed assertion in the framework.</p>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building NotificationListener<KeepAliveNotification>:
'package:flutter/src/rendering/object.dart': Failed assertion: line 3031 pos 14:
'_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new
When the exception was thrown, this was the stack:
#2 RenderSliver&ContainerRenderObjectMixin._insertIntoChildList (package:flutter/src/rendering/object.dart:3031:14)
#3 RenderSliver&ContainerRenderObjectMixin.insert (package:flutter/src/rendering/object.dart:3065:5)
#4 RenderSliverMultiBoxAdaptor.insert (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:193:17)
#5 SliverMultiBoxAdaptorElement.insertChildRenderObject (package:flutter/src/widgets/sliver.dart:840:18)
#6 RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:4380:35)
#7 RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4151:5)
#8 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4515:16)
#9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#10 Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#12 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3514:5)
#14 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3509:5)
#15 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#16 Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#17 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#18 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#19 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3514:5)
#20 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3509:5)
#21 ParentDataElement.mount (package:flutter/src/widgets/framework.dart:3827:16)
#22 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#23 Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#24 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#25 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#26 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3514:5)
#27 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3652:22)
#28 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3509:5)
#29 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#30 Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#31 SliverMultiBoxAdaptorElement.performRebuild (package:flutter/src/widgets/sliver.dart:696:34)
#32 SliverMultiBoxAdaptorElement.update (package:flutter/src/widgets/sliver.dart:665:7)
#33 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#34 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4250:32)
#35 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4631:17)
#36 _ViewportElement.update (package:flutter/src/widgets/viewport.dart:150:17)
#37 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#38 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#39 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#40 ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#41 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#42 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#43 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#44 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#45 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#46 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#47 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#48 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#49 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#50 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#51 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#52 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#53 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#54 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#55 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#56 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#57 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#58 StatelessElement.update (package:flutter/src/widgets/framework.dart:3596:5)
#59 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#60 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#61 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#62 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#63 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#64 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#65 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#66 ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#67 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#68 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4250:32)
#69 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4631:17)
#70 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#71 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#72 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#73 ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#74 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#75 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#76 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#77 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#78 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#79 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#80 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#81 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#82 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#83 StatelessElement.update (package:flutter/src/widgets/framework.dart:3596:5)
#84 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#85 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#86 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#87 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#88 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#89 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#90 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#91 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#92 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#93 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#94 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#95 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#96 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#97 ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#98 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#99 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#100 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#101 ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#102 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#103 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#104 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#105 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#106 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#107 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#108 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#109 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2260:33)
#110 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:503:20)
#111 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:189:5)
#112 BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:695:15)
#113 BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:643:9)
#114 _invoke (file:///b/build/slave/Mac_Engine/build/src/flutter/lib/ui/hooks.dart:86)
#115 _drawFrame (file:///b/build/slave/Mac_Engine/build/src/flutter/lib/ui/hooks.dart:75)
(elided 2 frames from class _AssertionError)
════════════════════════════════════════════════════════════════════════════════════════════════════
Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 3031 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 3031 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true."><pre class="notranslate"><code class="notranslate">══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building NotificationListener<KeepAliveNotification>:
'package:flutter/src/rendering/object.dart': Failed assertion: line 3031 pos 14:
'_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new
When the exception was thrown, this was the stack:
#2 RenderSliver&ContainerRenderObjectMixin._insertIntoChildList (package:flutter/src/rendering/object.dart:3031:14)
#3 RenderSliver&ContainerRenderObjectMixin.insert (package:flutter/src/rendering/object.dart:3065:5)
#4 RenderSliverMultiBoxAdaptor.insert (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:193:17)
#5 SliverMultiBoxAdaptorElement.insertChildRenderObject (package:flutter/src/widgets/sliver.dart:840:18)
#6 RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:4380:35)
#7 RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4151:5)
#8 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4515:16)
#9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#10 Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#12 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3514:5)
#14 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3509:5)
#15 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#16 Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#17 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#18 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#19 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3514:5)
#20 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3509:5)
#21 ParentDataElement.mount (package:flutter/src/widgets/framework.dart:3827:16)
#22 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#23 Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#24 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#25 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#26 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3514:5)
#27 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3652:22)
#28 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3509:5)
#29 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#30 Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#31 SliverMultiBoxAdaptorElement.performRebuild (package:flutter/src/widgets/sliver.dart:696:34)
#32 SliverMultiBoxAdaptorElement.update (package:flutter/src/widgets/sliver.dart:665:7)
#33 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#34 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4250:32)
#35 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4631:17)
#36 _ViewportElement.update (package:flutter/src/widgets/viewport.dart:150:17)
#37 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#38 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#39 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#40 ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#41 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#42 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#43 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#44 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#45 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#46 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#47 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#48 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#49 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#50 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#51 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#52 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#53 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#54 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#55 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#56 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#57 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#58 StatelessElement.update (package:flutter/src/widgets/framework.dart:3596:5)
#59 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#60 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#61 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#62 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#63 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#64 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#65 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#66 ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#67 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#68 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4250:32)
#69 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4631:17)
#70 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#71 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#72 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#73 ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#74 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#75 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#76 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#77 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#78 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#79 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#80 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#81 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#82 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#83 StatelessElement.update (package:flutter/src/widgets/framework.dart:3596:5)
#84 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#85 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#86 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#87 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#88 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#89 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#90 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#91 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#92 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#93 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#94 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#95 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#96 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#97 ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#98 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#99 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#100 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#101 ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#102 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#103 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#104 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#105 StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#106 Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#107 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#108 Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#109 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2260:33)
#110 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:503:20)
#111 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:189:5)
#112 BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:695:15)
#113 BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:643:9)
#114 _invoke (file:///b/build/slave/Mac_Engine/build/src/flutter/lib/ui/hooks.dart:86)
#115 _drawFrame (file:///b/build/slave/Mac_Engine/build/src/flutter/lib/ui/hooks.dart:75)
(elided 2 frames from class _AssertionError)
════════════════════════════════════════════════════════════════════════════════════════════════════
Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 3031 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 3031 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Analyzing /Users/matt/code/flutter/kudos...
lint • Don't import implementation files from another package at lib/feed.dart:5:8 • implementation_imports
lint • Close instances of `dart.core.Sink` at lib/feed.dart:26:26 • close_sinks
lint • Don't explicitly initialize variables to null at lib/loading_list_view.dart:23:5 • avoid_init_to_null
lint • Don't import implementation files from another package at lib/post.dart:3:8 • implementation_imports
hint • Unused import at lib/application.dart:4:8 • unused_import
hint • Unused import at lib/feed.dart:2:8 • unused_import
hint • Unused import at lib/feed.dart:5:8 • unused_import
hint • Unused import at lib/feed.dart:7:8 • unused_import
hint • Unused import at lib/feed.dart:12:8 • unused_import
hint • Unused import at lib/feed.dart:13:8 • unused_import
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/feed.dart:29:8 • must_call_super
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/feed.dart:40:8 • must_call_super
hint • The type parameter 'widgetAdapter' is annotated with @required but only named parameters without default value can be annotated with it at lib/loading_list_view.dart:23:5 • invalid_required_param
hint • Unused import at lib/main.dart:6:8 • unused_import
hint • The value of the field '_counter' isn't used at lib/main.dart:56:7 • unused_field
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/main.dart:63:8 • must_call_super
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/main.dart:71:8 • must_call_super
hint • The method '_incrementCounter' isn't used at lib/main.dart:76:8 • unused_element
hint • Unused import at lib/post.dart:7:8 • unused_import
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:10:7 • must_be_immutable
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:34:7 • must_be_immutable
hint • The value of the local variable 'plainText' isn't used at lib/post.dart:71:10 • unused_local_variable
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:112:7 • must_be_immutable
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:160:7 • must_be_immutable
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/profile.dart:10:7 • must_be_immutable
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/profile.dart:27:10 • must_call_super
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/profile.dart:145:7 • must_be_immutable
hint • The class '_KudosEarned' isn't used at lib/profile.dart:218:7 • unused_element
hint • Unused import at lib/send_photo.dart:5:8 • unused_import
hint • Unused import at lib/usersearch.dart:6:8 • unused_import
hint • Unused import at lib/usersearch.dart:7:8 • unused_import
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/usersearch.dart:25:10 • must_call_super
32 issues found."><pre class="notranslate"><code class="notranslate">Analyzing /Users/matt/code/flutter/kudos...
lint • Don't import implementation files from another package at lib/feed.dart:5:8 • implementation_imports
lint • Close instances of `dart.core.Sink` at lib/feed.dart:26:26 • close_sinks
lint • Don't explicitly initialize variables to null at lib/loading_list_view.dart:23:5 • avoid_init_to_null
lint • Don't import implementation files from another package at lib/post.dart:3:8 • implementation_imports
hint • Unused import at lib/application.dart:4:8 • unused_import
hint • Unused import at lib/feed.dart:2:8 • unused_import
hint • Unused import at lib/feed.dart:5:8 • unused_import
hint • Unused import at lib/feed.dart:7:8 • unused_import
hint • Unused import at lib/feed.dart:12:8 • unused_import
hint • Unused import at lib/feed.dart:13:8 • unused_import
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/feed.dart:29:8 • must_call_super
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/feed.dart:40:8 • must_call_super
hint • The type parameter 'widgetAdapter' is annotated with @required but only named parameters without default value can be annotated with it at lib/loading_list_view.dart:23:5 • invalid_required_param
hint • Unused import at lib/main.dart:6:8 • unused_import
hint • The value of the field '_counter' isn't used at lib/main.dart:56:7 • unused_field
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/main.dart:63:8 • must_call_super
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/main.dart:71:8 • must_call_super
hint • The method '_incrementCounter' isn't used at lib/main.dart:76:8 • unused_element
hint • Unused import at lib/post.dart:7:8 • unused_import
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:10:7 • must_be_immutable
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:34:7 • must_be_immutable
hint • The value of the local variable 'plainText' isn't used at lib/post.dart:71:10 • unused_local_variable
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:112:7 • must_be_immutable
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:160:7 • must_be_immutable
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/profile.dart:10:7 • must_be_immutable
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/profile.dart:27:10 • must_call_super
hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/profile.dart:145:7 • must_be_immutable
hint • The class '_KudosEarned' isn't used at lib/profile.dart:218:7 • unused_element
hint • Unused import at lib/send_photo.dart:5:8 • unused_import
hint • Unused import at lib/usersearch.dart:6:8 • unused_import
hint • Unused import at lib/usersearch.dart:7:8 • unused_import
hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/usersearch.dart:25:10 • must_call_super
32 issues found.
</code></pre></div>
<h2 dir="auto">Flutter Doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-US, channel alpha)
• Flutter at /Users/matt/code/flutter/flutter
• Framework revision b156a0f054 (3 weeks ago), 2017-08-11 22:01:40 -0700
• Engine revision fef7d827d6
• Tools Dart version 1.25.0-dev.9.0
[✓] Android toolchain - develop for Android devices (Android SDK 25.0.3)
• Android SDK at /Users/matt/code/android/android
• Platform android-25, build-tools 25.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] iOS toolchain - develop for iOS devices (Xcode 8.3.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.3.3, Build version 8E3004b
• ios-deploy 1.9.1
• CocoaPods version 1.3.1
[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] IntelliJ IDEA Ultimate Edition (version 2017.2.2)
• Flutter plugin version 16.0
• Dart plugin version 172.3757.55
[✓] Connected devices
• iPhone 6s • 3DF999CB-1CD6-4649-8187-DDEFBDB14DFA • ios • iOS 10.3 (simulator)
"><pre class="notranslate"><code class="notranslate">[✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-US, channel alpha)
• Flutter at /Users/matt/code/flutter/flutter
• Framework revision b156a0f054 (3 weeks ago), 2017-08-11 22:01:40 -0700
• Engine revision fef7d827d6
• Tools Dart version 1.25.0-dev.9.0
[✓] Android toolchain - develop for Android devices (Android SDK 25.0.3)
• Android SDK at /Users/matt/code/android/android
• Platform android-25, build-tools 25.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] iOS toolchain - develop for iOS devices (Xcode 8.3.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.3.3, Build version 8E3004b
• ios-deploy 1.9.1
• CocoaPods version 1.3.1
[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] IntelliJ IDEA Ultimate Edition (version 2017.2.2)
• Flutter plugin version 16.0
• Dart plugin version 172.3757.55
[✓] Connected devices
• iPhone 6s • 3DF999CB-1CD6-4649-8187-DDEFBDB14DFA • ios • iOS 10.3 (simulator)
</code></pre></div>
<blockquote>
<p dir="auto">For more information about diagnosing and reporting Flutter bugs, please see <a href="https://flutter.io/bug-reports/" rel="nofollow">https://flutter.io/bug-reports/</a>.</p>
</blockquote> | 1 |
<p dir="auto">While playing with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34020893" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6911" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/6911/hovercard" href="https://github.com/JuliaLang/julia/pull/6911">#6911</a> I ran into a strange intermittent problem.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> ° = pi/180
0.017453292519943295
julia> 60°
ERROR: syntax: invalid character "?"
julia> 60°
ERROR: syntax: invalid character "?"
julia> 60°
ERROR: syntax: invalid character "?"
julia> 60°
ERROR: syntax: invalid character "?"
julia> 60°
1.0471975511965976
julia> 60°
1.0471975511965976
julia> 60°
ERROR: syntax: invalid character "?"
julia> 60°
1.0471975511965976"><pre class="notranslate">julia<span class="pl-k">></span> ° <span class="pl-k">=</span> <span class="pl-c1">pi</span><span class="pl-k">/</span><span class="pl-c1">180</span>
<span class="pl-c1">0.017453292519943295</span>
julia<span class="pl-k">></span> <span class="pl-c1">60</span>°
ERROR<span class="pl-k">:</span> syntax<span class="pl-k">:</span> invalid character <span class="pl-s"><span class="pl-pds">"</span>?<span class="pl-pds">"</span></span>
julia<span class="pl-k">></span> <span class="pl-c1">60</span>°
ERROR<span class="pl-k">:</span> syntax<span class="pl-k">:</span> invalid character <span class="pl-s"><span class="pl-pds">"</span>?<span class="pl-pds">"</span></span>
julia<span class="pl-k">></span> <span class="pl-c1">60</span>°
ERROR<span class="pl-k">:</span> syntax<span class="pl-k">:</span> invalid character <span class="pl-s"><span class="pl-pds">"</span>?<span class="pl-pds">"</span></span>
julia<span class="pl-k">></span> <span class="pl-c1">60</span>°
ERROR<span class="pl-k">:</span> syntax<span class="pl-k">:</span> invalid character <span class="pl-s"><span class="pl-pds">"</span>?<span class="pl-pds">"</span></span>
julia<span class="pl-k">></span> <span class="pl-c1">60</span>°
<span class="pl-c1">1.0471975511965976</span>
julia<span class="pl-k">></span> <span class="pl-c1">60</span>°
<span class="pl-c1">1.0471975511965976</span>
julia<span class="pl-k">></span> <span class="pl-c1">60</span>°
ERROR<span class="pl-k">:</span> syntax<span class="pl-k">:</span> invalid character <span class="pl-s"><span class="pl-pds">"</span>?<span class="pl-pds">"</span></span>
julia<span class="pl-k">></span> <span class="pl-c1">60</span>°
<span class="pl-c1">1.0471975511965976</span></pre></div>
<p dir="auto">The first two degree signs were entered with \degree TAB, the remaining lines with arrow up. I cannot provoke the same problem with <code class="notranslate">60.0°</code> or with <code class="notranslate">sin(60°)</code>. Switching from \degree to \alpha gives the same behavior.</p> | <p dir="auto">At first I thought it could have been an issue related to how I copied and pasted the pi character because after pasting it again it simply worked but after playing with multiplications I get seemingly random errors like:</p>
<p dir="auto">ERROR: syntax: invalid character "�"</p>
<p dir="auto">Notice how 2 * π evaluates as expected but 2π raises an exception...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="notroot@dev-mint ~ $ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.0-prerelease
_/ |\__'_|_|_|\__'_| | Official http://julialang.org release
|__/ | i686-linux-gnu
julia> ☃ = 1
1
julia> ☃
1
julia> ☃
1
julia> ☃
1
julia> ☃
1
julia> 3☃
3
julia> 5☃
5
julia> 5☃8
ERROR: ☃8 not defined
julia> 5☃
5
julia> 5☃*2
10
julia> s = "This is a string."
"This is a string."
julia> s = "âThis is a string."
"âThis is a string."
julia> s[1]
'â'
julia> s[2]
ERROR: invalid UTF-8 character index
in getindex at utf8.jl:63
julia> s[3]
'T'
julia> @printf "%d is less than %f" 4.5 5.3 # casa
5 is less than 5.300000
julia> bla! = 2
2
julia> Bla! = 2
2
julia> Bla! = 6
6
julia> bla!
2
julia> Bla!
6
julia> 2 * π
6.283185307179586
julia> 2π
ERROR: syntax: invalid character "�"
julia> ☃
ERROR: syntax: invalid character "�"
julia> π
π = 3.1415926535897...
julia> ☃
ERROR: syntax: invalid character "�"
julia> 5☃
5
julia> ☃
1
julia> 5☃*2
10
julia> 5☃
ERROR: syntax: invalid character "�"
julia> 5☃*2
10
julia> 5☃
5
julia> 5☃*2
10
julia> 5☃
5
julia> 5☃*2
10
julia> 5☃
5
julia> ☃
1
julia> π
π = 3.1415926535897...
julia> "><pre class="notranslate"><code class="notranslate">notroot@dev-mint ~ $ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.0-prerelease
_/ |\__'_|_|_|\__'_| | Official http://julialang.org release
|__/ | i686-linux-gnu
julia> ☃ = 1
1
julia> ☃
1
julia> ☃
1
julia> ☃
1
julia> ☃
1
julia> 3☃
3
julia> 5☃
5
julia> 5☃8
ERROR: ☃8 not defined
julia> 5☃
5
julia> 5☃*2
10
julia> s = "This is a string."
"This is a string."
julia> s = "âThis is a string."
"âThis is a string."
julia> s[1]
'â'
julia> s[2]
ERROR: invalid UTF-8 character index
in getindex at utf8.jl:63
julia> s[3]
'T'
julia> @printf "%d is less than %f" 4.5 5.3 # casa
5 is less than 5.300000
julia> bla! = 2
2
julia> Bla! = 2
2
julia> Bla! = 6
6
julia> bla!
2
julia> Bla!
6
julia> 2 * π
6.283185307179586
julia> 2π
ERROR: syntax: invalid character "�"
julia> ☃
ERROR: syntax: invalid character "�"
julia> π
π = 3.1415926535897...
julia> ☃
ERROR: syntax: invalid character "�"
julia> 5☃
5
julia> ☃
1
julia> 5☃*2
10
julia> 5☃
ERROR: syntax: invalid character "�"
julia> 5☃*2
10
julia> 5☃
5
julia> 5☃*2
10
julia> 5☃
5
julia> 5☃*2
10
julia> 5☃
5
julia> ☃
1
julia> π
π = 3.1415926535897...
julia>
</code></pre></div>
<p dir="auto">Any clues?</p>
<p dir="auto">EDIT: adding versioninfo</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> versioninfo()
Julia Version 0.3.0-prerelease
Platform Info:
System: Linux (i686-linux-gnu)
CPU: Intel(R) Core(TM) i5 CPU M 450 @ 2.40GHz
WORD_SIZE: 32
BLAS: libblas.so.3
LAPACK: liblapack.so.3
LIBM: libopenlibm"><pre class="notranslate"><code class="notranslate">julia> versioninfo()
Julia Version 0.3.0-prerelease
Platform Info:
System: Linux (i686-linux-gnu)
CPU: Intel(R) Core(TM) i5 CPU M 450 @ 2.40GHz
WORD_SIZE: 32
BLAS: libblas.so.3
LAPACK: liblapack.so.3
LIBM: libopenlibm
</code></pre></div> | 1 |
<p dir="auto">The sort functions currently require a pure comparison function. Is this actually required?</p>
<p dir="auto">For example, I need to be able to sort the results of a query where the results are not always orderable. If the comparison functions are allowed to be impure then I can add a <code class="notranslate">err: @mut ~str</code> argument to my function and see if it is set when the sort finishes. But if purity is required then I'll need to do a pass before the sort which is a) duplicating a traversal that sort has to do anyway and b) very inefficient (especially given that queries can have lots of results).</p> | <p dir="auto">When building current rust master, the following warning is emitted (non-fatal)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_typeck
../src/librustc_typeck/astconv.rs:1565:17: 1566:79 warning: diagnostic code E0045 already used
../src/librustc_typeck/astconv.rs:1565 span_err!(tcx.sess, ast_ty.span, E0045,
../src/librustc_typeck/astconv.rs:1566 "variadic function must have C calling convention");
../src/librustc_typeck/check/mod.rs:688:13: 701:14 note: previous invocation
../src/librustc_typeck/check/mod.rs:688 for item in &m.items {
../src/librustc_typeck/check/mod.rs:689 let pty = ccx.tcx.lookup_item_type(local_def(item.id));
../src/librustc_typeck/check/mod.rs:690 if !pty.generics.types.is_empty() {
../src/librustc_typeck/check/mod.rs:691 span_err!(ccx.tcx.sess, item.span, E0044,
../src/librustc_typeck/check/mod.rs:692 "foreign items may not have type parameters");
../src/librustc_typeck/check/mod.rs:693 }
"><pre class="notranslate"><code class="notranslate">rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_typeck
../src/librustc_typeck/astconv.rs:1565:17: 1566:79 warning: diagnostic code E0045 already used
../src/librustc_typeck/astconv.rs:1565 span_err!(tcx.sess, ast_ty.span, E0045,
../src/librustc_typeck/astconv.rs:1566 "variadic function must have C calling convention");
../src/librustc_typeck/check/mod.rs:688:13: 701:14 note: previous invocation
../src/librustc_typeck/check/mod.rs:688 for item in &m.items {
../src/librustc_typeck/check/mod.rs:689 let pty = ccx.tcx.lookup_item_type(local_def(item.id));
../src/librustc_typeck/check/mod.rs:690 if !pty.generics.types.is_empty() {
../src/librustc_typeck/check/mod.rs:691 span_err!(ccx.tcx.sess, item.span, E0044,
../src/librustc_typeck/check/mod.rs:692 "foreign items may not have type parameters");
../src/librustc_typeck/check/mod.rs:693 }
</code></pre></div> | 0 |
<p dir="auto">It is often a pain to track down dependency problems, especially transient dependencies. It is helpful if Druid only ever include a jar ONCE if possible, and not shade it so that the exact version can be tracked. Unfortunately we seem to have missed a few duplicates, or they are in extensions and might be better served to be brought into core somehow.</p>
<p dir="auto">here is a handy little shell command I use to help find duplicates. I ran it against master at <code class="notranslate">e1033bb412244fc9dff9dea1c89d43a8e0081fd3</code> (today):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ TARBALL="/Users/charles.allen/src/druid/distribution/target/apache-druid-0.13.0-incubating-SNAPSHOT-bin.tar.gz"; cat <(tar -t --include='*/lib/*.jar' -f "${TARBALL}" | cut -d / -f 3 ) <(tar -t --include='*/extensions/*.jar' -f "${TARBALL}" | cut -d / -f 4 ) | sed -e 's/-[0-9].*\.jar//' | sort | uniq -c | sort -n -r --stable
5 snappy-java
4 commons-beanutils
4 commons-collections
4 commons-compress
4 gson
4 objenesis
4 slf4j-api
3 commons-codec
3 commons-digester
3 commons-lang
3 commons-logging
3 commons-math3
3 curator-framework
3 curator-recipes
3 guava
3 jetty-util
3 json-smart
3 kafka-clients
3 metrics-core
3 servlet-api
2 apacheds-i18n
2 apacheds-kerberos-codec
2 api-asn1-api
2 api-util
2 aws-java-sdk-core
2 commons-beanutils-core
2 commons-configuration
2 commons-net
2 druid-lookups-cached-global
2 hadoop-auth
2 hadoop-common
2 htrace-core4
2 httpclient
2 httpcore
2 ion-java
2 jackson-annotations
2 jackson-core
2 jackson-databind
2 jackson-dataformat-cbor
2 jackson-jaxrs
2 jackson-xc
2 javax.servlet-api
2 jaxb-api
2 jcip-annotations
2 jersey-client
2 jersey-core
2 jersey-server
2 jetty
2 jetty-client
2 jetty-continuation
2 jetty-http
2 jetty-io
2 jetty-proxy
2 jetty-security
2 jetty-server
2 jetty-servlet
2 jetty-servlets
2 jetty-sslengine
2 jmespath-java
2 joda-time
2 jopt-simple
2 jsp-api
2 jsr311-api
2 kafka_2.10
2 mapdb
2 netty
2 nimbus-jose-jwt
2 okhttp
2 protobuf-java
2 scala-library
2 stax-api
2 xmlenc
2 xz
2 zkclient
1 RoaringBitmap
1 accessors-smart
1 aether-api
1 aether-connector-file
1 aether-connector-okhttp
1 aether-impl
1 aether-spi
1 aether-util
1 aggdesigner-algorithm
1 airline
1 antlr
1 antlr4-runtime
1 aopalliance
1 asm
1 asm-commons
1 asm-tree
1 async-http-client
1 async-http-client-netty-utils
1 audience-annotations
1 avatica-core
1 avatica-metrics
1 avatica-server
1 avro
1 avro-ipc
1 avro-mapred
1 aws-java-sdk-ec2
1 aws-java-sdk-kinesis
1 aws-java-sdk-kms
1 aws-java-sdk-s3
1 aws-java-sdk-sts
1 caffeine
1 calcite-core
1 calcite-linq4j
1 checker
1 classmate
1 commons-cli
1 commons-collections4
1 commons-compiler
1 commons-dbcp2
1 commons-io
1 commons-lang3
1 commons-pool
1 commons-pool2
1 commons-text
1 commons-validator
1 compress-lzf
1 config-magic
1 curator-client
1 curator-x-discovery
1 derby
1 derbyclient
1 derbynet
1 disruptor
1 druid-avro-extensions
1 druid-aws-common
1 druid-basic-security
1 druid-bloom-filter
1 druid-console
1 druid-core
1 druid-datasketches
1 druid-examples
1 druid-hdfs-storage
1 druid-histogram
1 druid-hll
1 druid-indexing-hadoop
1 druid-indexing-service
1 druid-kafka-eight
1 druid-kafka-extraction-namespace
1 druid-kafka-indexing-service
1 druid-kerberos
1 druid-kinesis-indexing-service
1 druid-lookups-cached-single
1 druid-parquet-extensions
1 druid-processing
1 druid-protobuf-extensions
1 druid-s3-extensions
1 druid-server
1 druid-services
1 druid-sql
1 druid-stats
1 error_prone_annotations
1 esri-geometry-api
1 extendedset
1 fastutil
1 geoip2
1 guice
1 guice-multibindings
1 guice-servlet
1 hadoop-client
1 hadoop-hdfs-client
1 hadoop-mapreduce-client-app
1 hadoop-mapreduce-client-common
1 hadoop-mapreduce-client-core
1 hadoop-mapreduce-client-jobclient
1 hadoop-mapreduce-client-shuffle
1 hadoop-yarn-api
1 hadoop-yarn-client
1 hadoop-yarn-common
1 hadoop-yarn-server-common
1 hibernate-validator
1 hive-storage-api
1 icu4j
1 irc-api
1 jackson-core-asl
1 jackson-dataformat-smile
1 jackson-datatype-guava
1 jackson-datatype-joda
1 jackson-jaxrs-base
1 jackson-jaxrs-json-provider
1 jackson-jaxrs-smile-provider
1 jackson-jq
1 jackson-mapper-asl
1 jackson-module-jaxb-annotations
1 janino
1 java-xmlbuilder
1 javax.activation
1 javax.el
1 javax.el-api
1 javax.inject
1 jaxb-impl
1 jboss-logging
1 jcl-over-slf4j
1 jcodings
1 jdbi
1 jersey-guice
1 jersey-json
1 jersey-servlet
1 jets3t
1 jettison
1 jline
1 jna
1 joni
1 jsch
1 json-path
1 jsr305
1 jvm-attach-api
1 kafka-schema-registry-client
1 leveldbjni-all
1 log4j
1 log4j-api
1 log4j-core
1 log4j-jul
1 log4j-slf4j-impl
1 lz4-java
1 maven-aether-provider
1 maven-artifact
1 maven-model
1 maven-model-builder
1 maven-repository-metadata
1 maven-settings
1 maven-settings-builder
1 maxminddb
1 memory
1 mysql-metadata-storage
1 netty-all
1 netty-buffer
1 netty-codec
1 netty-codec-dns
1 netty-codec-http
1 netty-codec-socks
1 netty-common
1 netty-handler
1 netty-handler-proxy
1 netty-reactive-streams
1 netty-resolver
1 netty-resolver-dns
1 netty-transport
1 netty-transport-native-epoll
1 netty-transport-native-unix-common
1 okio
1 opencsv
1 paranamer
1 parquet-avro
1 parquet-column
1 parquet-common
1 parquet-encoding
1 parquet-format
1 parquet-hadoop
1 parquet-jackson
1 plexus-interpolation
1 plexus-utils
1 postgresql
1 postgresql-metadata-storage
1 protobuf-dynamic
1 protobuf-java-util
1 reactive-streams
1 rhino
1 schema-repo-api
1 schema-repo-avro
1 schema-repo-client
1 schema-repo-common
1 shims
1 sigar
1 simple-client-sslcontext
1 sketches-core
1 spymemcached
1 stringtemplate
1 tesla-aether
1 twitter4j-async
1 twitter4j-core
1 twitter4j-stream
1 validation-api
1 velocity
1 wagon-provider-api
1 zookeeper
1 zstd-jni"><pre class="notranslate"><code class="notranslate">$ TARBALL="/Users/charles.allen/src/druid/distribution/target/apache-druid-0.13.0-incubating-SNAPSHOT-bin.tar.gz"; cat <(tar -t --include='*/lib/*.jar' -f "${TARBALL}" | cut -d / -f 3 ) <(tar -t --include='*/extensions/*.jar' -f "${TARBALL}" | cut -d / -f 4 ) | sed -e 's/-[0-9].*\.jar//' | sort | uniq -c | sort -n -r --stable
5 snappy-java
4 commons-beanutils
4 commons-collections
4 commons-compress
4 gson
4 objenesis
4 slf4j-api
3 commons-codec
3 commons-digester
3 commons-lang
3 commons-logging
3 commons-math3
3 curator-framework
3 curator-recipes
3 guava
3 jetty-util
3 json-smart
3 kafka-clients
3 metrics-core
3 servlet-api
2 apacheds-i18n
2 apacheds-kerberos-codec
2 api-asn1-api
2 api-util
2 aws-java-sdk-core
2 commons-beanutils-core
2 commons-configuration
2 commons-net
2 druid-lookups-cached-global
2 hadoop-auth
2 hadoop-common
2 htrace-core4
2 httpclient
2 httpcore
2 ion-java
2 jackson-annotations
2 jackson-core
2 jackson-databind
2 jackson-dataformat-cbor
2 jackson-jaxrs
2 jackson-xc
2 javax.servlet-api
2 jaxb-api
2 jcip-annotations
2 jersey-client
2 jersey-core
2 jersey-server
2 jetty
2 jetty-client
2 jetty-continuation
2 jetty-http
2 jetty-io
2 jetty-proxy
2 jetty-security
2 jetty-server
2 jetty-servlet
2 jetty-servlets
2 jetty-sslengine
2 jmespath-java
2 joda-time
2 jopt-simple
2 jsp-api
2 jsr311-api
2 kafka_2.10
2 mapdb
2 netty
2 nimbus-jose-jwt
2 okhttp
2 protobuf-java
2 scala-library
2 stax-api
2 xmlenc
2 xz
2 zkclient
1 RoaringBitmap
1 accessors-smart
1 aether-api
1 aether-connector-file
1 aether-connector-okhttp
1 aether-impl
1 aether-spi
1 aether-util
1 aggdesigner-algorithm
1 airline
1 antlr
1 antlr4-runtime
1 aopalliance
1 asm
1 asm-commons
1 asm-tree
1 async-http-client
1 async-http-client-netty-utils
1 audience-annotations
1 avatica-core
1 avatica-metrics
1 avatica-server
1 avro
1 avro-ipc
1 avro-mapred
1 aws-java-sdk-ec2
1 aws-java-sdk-kinesis
1 aws-java-sdk-kms
1 aws-java-sdk-s3
1 aws-java-sdk-sts
1 caffeine
1 calcite-core
1 calcite-linq4j
1 checker
1 classmate
1 commons-cli
1 commons-collections4
1 commons-compiler
1 commons-dbcp2
1 commons-io
1 commons-lang3
1 commons-pool
1 commons-pool2
1 commons-text
1 commons-validator
1 compress-lzf
1 config-magic
1 curator-client
1 curator-x-discovery
1 derby
1 derbyclient
1 derbynet
1 disruptor
1 druid-avro-extensions
1 druid-aws-common
1 druid-basic-security
1 druid-bloom-filter
1 druid-console
1 druid-core
1 druid-datasketches
1 druid-examples
1 druid-hdfs-storage
1 druid-histogram
1 druid-hll
1 druid-indexing-hadoop
1 druid-indexing-service
1 druid-kafka-eight
1 druid-kafka-extraction-namespace
1 druid-kafka-indexing-service
1 druid-kerberos
1 druid-kinesis-indexing-service
1 druid-lookups-cached-single
1 druid-parquet-extensions
1 druid-processing
1 druid-protobuf-extensions
1 druid-s3-extensions
1 druid-server
1 druid-services
1 druid-sql
1 druid-stats
1 error_prone_annotations
1 esri-geometry-api
1 extendedset
1 fastutil
1 geoip2
1 guice
1 guice-multibindings
1 guice-servlet
1 hadoop-client
1 hadoop-hdfs-client
1 hadoop-mapreduce-client-app
1 hadoop-mapreduce-client-common
1 hadoop-mapreduce-client-core
1 hadoop-mapreduce-client-jobclient
1 hadoop-mapreduce-client-shuffle
1 hadoop-yarn-api
1 hadoop-yarn-client
1 hadoop-yarn-common
1 hadoop-yarn-server-common
1 hibernate-validator
1 hive-storage-api
1 icu4j
1 irc-api
1 jackson-core-asl
1 jackson-dataformat-smile
1 jackson-datatype-guava
1 jackson-datatype-joda
1 jackson-jaxrs-base
1 jackson-jaxrs-json-provider
1 jackson-jaxrs-smile-provider
1 jackson-jq
1 jackson-mapper-asl
1 jackson-module-jaxb-annotations
1 janino
1 java-xmlbuilder
1 javax.activation
1 javax.el
1 javax.el-api
1 javax.inject
1 jaxb-impl
1 jboss-logging
1 jcl-over-slf4j
1 jcodings
1 jdbi
1 jersey-guice
1 jersey-json
1 jersey-servlet
1 jets3t
1 jettison
1 jline
1 jna
1 joni
1 jsch
1 json-path
1 jsr305
1 jvm-attach-api
1 kafka-schema-registry-client
1 leveldbjni-all
1 log4j
1 log4j-api
1 log4j-core
1 log4j-jul
1 log4j-slf4j-impl
1 lz4-java
1 maven-aether-provider
1 maven-artifact
1 maven-model
1 maven-model-builder
1 maven-repository-metadata
1 maven-settings
1 maven-settings-builder
1 maxminddb
1 memory
1 mysql-metadata-storage
1 netty-all
1 netty-buffer
1 netty-codec
1 netty-codec-dns
1 netty-codec-http
1 netty-codec-socks
1 netty-common
1 netty-handler
1 netty-handler-proxy
1 netty-reactive-streams
1 netty-resolver
1 netty-resolver-dns
1 netty-transport
1 netty-transport-native-epoll
1 netty-transport-native-unix-common
1 okio
1 opencsv
1 paranamer
1 parquet-avro
1 parquet-column
1 parquet-common
1 parquet-encoding
1 parquet-format
1 parquet-hadoop
1 parquet-jackson
1 plexus-interpolation
1 plexus-utils
1 postgresql
1 postgresql-metadata-storage
1 protobuf-dynamic
1 protobuf-java-util
1 reactive-streams
1 rhino
1 schema-repo-api
1 schema-repo-avro
1 schema-repo-client
1 schema-repo-common
1 shims
1 sigar
1 simple-client-sslcontext
1 sketches-core
1 spymemcached
1 stringtemplate
1 tesla-aether
1 twitter4j-async
1 twitter4j-core
1 twitter4j-stream
1 validation-api
1 velocity
1 wagon-provider-api
1 zookeeper
1 zstd-jni
</code></pre></div> | <h1 dir="auto">Proposal Adding Double precision metrics.</h1>
<p dir="auto">Currently Druid stores double aggregated numbers as floats which leads to lose of precision and not expected results set for the case of Min/Max where you sort of expect to see the same precision of the actual indexed data.<br>
The goal of this work is to add support of actual double indexed columns.<br>
There is several ways on how to get there would like to poll the community about which way to go.</p>
<h1 dir="auto">Option 1</h1>
<p dir="auto">Make the double aggregator store numbers as double period !</p>
<ul dir="auto">
<li>This might be radical and surprise druid user since the storage footprint of double columns will double.</li>
<li>Less code duplication (will need to keep float ser/deser code to ensure backward compatible).</li>
</ul>
<h1 dir="auto">Option 1+</h1>
<p dir="auto">If storage footprint is a deal breaker, do the same as option 1 and add new suite of FloatsXXXAggregators.</p>
<ul dir="auto">
<li>Make it more flexible if storage is an issue.</li>
<li>Lot of code duplication.</li>
</ul>
<h1 dir="auto">Option 2</h1>
<p dir="auto">Instead of modifying existing Double aggregator, create new set of aggregator called DoubleSum64...etc.</p>
<ul dir="auto">
<li>lot of code duplication</li>
<li>some how confusing and ugly to have DoubleSum64 and DoubleSum etc</li>
<li>probably the most transparent for current druid users.</li>
</ul>
<h1 dir="auto">Option 3</h1>
<p dir="auto">Add a flag to indexSpec ie "StoreDoubleAsFloat" and set it to true/false</p>
<ul dir="auto">
<li>less code duplication that 1.1 and 1.2</li>
<li>need to have a new precision flag within the column to find out how to deserialize the column (or Maybe not haven't fleshed out this yet but it is doable).</li>
<li>same as option 2 don't see why index double numbers then store it as floats.</li>
</ul> | 0 |
<p dir="auto">This afternoon I have been writing code that relies in both elliptic integrals (<code class="notranslate">scipy.special.ellipk</code> and <code class="notranslate">scipy.special.ellipe</code>) but I was getting completely wrong values.</p>
<p dir="auto">This has been until I realized that scipy defines the elliptic integrals in a different that wikipedia or other resources do.</p>
<p dir="auto">For example, <a href="https://en.wikipedia.org/wiki/Elliptic_integrals" rel="nofollow">wikipedia</a> and Wolfram MathWorld <a href="http://mathworld.wolfram.com/EllipticIntegraloftheFirstKind.html" rel="nofollow">First Kind</a> and <a href="http://mathworld.wolfram.com/EllipticIntegraloftheSecondKind.html" rel="nofollow">Second Kind</a> define the complete integral of first kind as:</p>
<p dir="auto">K(x) = int_0^(pi/2) dy / sqrt(1 - x^2 sin^2 y)</p>
<p dir="auto">While scipy documentation defines it as:</p>
<p dir="auto">K(x) = int_0^(pi/2) dy / sqrt(1 - x sin^2 y)</p>
<p dir="auto">Note the lack of a square in the x.</p>
<p dir="auto">So, problem:</p>
<ul dir="auto">
<li>Different definition of what an elliptic integral is from what would be expected.</li>
</ul>
<p dir="auto">Proposed fix:</p>
<ul dir="auto">
<li>Change the implementation of the functions to match that of the more usual version.</li>
<li>Improve the documentation by including a (possibly in red or some bright colour) note saying that the parameter you pass doesn't get squared, or that you are calculating the integrals of the square root of the parameter.</li>
</ul> | <p dir="auto">Dear All<br>
While working with special functions that can be defined in terms of<br>
the complete elliptic integrals of the first and second kind, provided<br>
by ellipk and ellipe I realized, that , in contrast to<br>
the definition found on wikipedia, i.e.<br>
K(k) = \int_0^{\pi/2} \frac{d\theta}{\sqrt{1-k^2 \sin^2\theta}} = \int_0^1 \frac{dt}{\sqrt{(1-t^2)(1-k^2 t^2)}},<br>
the functions provided in scipy use the parameter m = k^2 appearing in the integral<br>
as argument.<br>
This is not exactly a bug, but it should maybe discussed why this convention<br>
was chosen in contrast to the more common one in<br>
lots of references on this matter.</p>
<p dir="auto">regards</p>
<p dir="auto">Moritz Braun</p> | 1 |
<h1 dir="auto">Checklist</h1>
<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.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</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/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</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/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</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/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</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>
<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.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>:</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b>
</summary>
<p dir="auto">
software -> celery:5.1.0 (sun-harmonics) kombu:5.1.0 py:3.9.2
billiard:3.6.4.0 redis:3.5.3
platform -> system:Linux arch:64bit, ELF
kernel version:4.4.0-198-generic imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:redis://localhost/1
</p><p dir="auto">broker_url: 'redis://localhost:6379/1'<br>
result_backend: 'redis://localhost/1'<br>
result_serializer: 'pickle'<br>
deprecated_settings: None<br>
task_serializer: 'pickle'<br>
accept_content: ['pickle', 'json']<br>
result_expires: 3600<br>
task_default_queue: 'zabbix'</p>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<p dir="auto">Schedule a chord with beat via a task.</p>
<p dir="auto">I created a task that takes a chain/chord as parameter and executes it, since beat does not allow for scheduling anything but a simple task directly:<br>
@app.task()<br>
def execute_chain(ch):<br>
ch.apply_async(ignore_result=True)</p>
<p dir="auto">This is added to the beat schedule via<br>
ch = group(*zbxitems) | func.s() | publish_mqtt.s()<br>
sender.add_periodic_task(interval, execute_chain.s(ch), name=name)</p>
<h2 dir="auto">Required Dependencies</h2>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
amqp==5.0.6
billiard==3.6.4.0
celery==5.1.0
certifi==2021.5.30
chardet==4.0.0
click==7.1.2
click-didyoumean==0.0.3
click-plugins==1.1.1
click-repl==0.2.0
colorama==0.4.4
idna==2.10
kombu==5.1.0
paho-mqtt==1.5.1
prompt-toolkit==3.0.18
pytz==2021.1
PyYAML==5.4.1
pyzabbix==0.8.2
redis==3.5.3
requests==2.25.1
six==1.16.0
urllib3==1.26.5
vine==5.0.0
wcwidth==0.2.5
(venv) root@vmt
</p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>
<p dir="auto">version 3.9.5</p>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">This should continue to work, executing the chain again and again.</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">I works for several hours till it exits with:<br>
2021-06-11 06:25:54,253:CRITICAL:worker.start:line 207:Unrecoverable error: RecursionError('maximum recursion depth exceeded while pickling an object')<br>
Traceback (most recent call last):<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/worker/worker.py", line 203, in start<br>
self.blueprint.start(self)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/bootsteps.py", line 116, in start<br>
step.start(parent)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/bootsteps.py", line 365, in start<br>
return self.obj.start()<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/worker/consumer/consumer.py", line 326, in start<br>
blueprint.start(self)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/bootsteps.py", line 116, in start<br>
step.start(parent)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/worker/consumer/consumer.py", line 618, in start<br>
c.loop(*c.loop_args())<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/worker/loops.py", line 81, in asynloop<br>
next(loop)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/kombu/asynchronous/hub.py", line 361, in create_loop<br>
cb(*cbargs)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 1128, in on_readable<br>
self.cycle.on_readable(fileno)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 398, in on_readable<br>
chan.handlers<a href="">type</a><br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 789, in _brpop_read<br>
self.connection._deliver(loads(bytes_to_str(item)), dest)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/kombu/transport/virtual/base.py", line 980, in _deliver<br>
callback(message)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/kombu/transport/virtual/base.py", line 630, in _callback<br>
return callback(message)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/kombu/messaging.py", line 626, in _receive_callback<br>
return on_m(message) if on_m else self.receive(decoded, message)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/worker/consumer/consumer.py", line 586, in on_task_received<br>
strategy(<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/worker/strategy.py", line 201, in task_message_handler<br>
handle(req)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/worker/worker.py", line 221, in _process_task_sem<br>
return self._quick_acquire(self._process_task, req)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/kombu/asynchronous/semaphore.py", line 57, in acquire<br>
callback(*partial_args, **partial_kwargs)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/worker/worker.py", line 226, in _process_task<br>
req.execute_using_pool(self.pool)<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/worker/request.py", line 691, in execute_using_pool<br>
result = apply_async(<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/concurrency/base.py", line 152, in apply_async<br>
return self.on_apply(target, args, kwargs,<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/billiard/pool.py", line 1530, in apply_async<br>
self._quick_put((TASK, (result._job, None, func, args, kwds)))<br>
File "/usr/share/nd_zabbixexport/venv/lib/python3.9/site-packages/celery/concurrency/asynpool.py", line 859, in send_job<br>
body = dumps(tup, protocol=protocol)<br>
RecursionError: maximum recursion depth exceeded while pickling an object</p>
<p dir="auto">When json dumping the task, I see this after a few iterations (mind the kwargs):<br>
2021-06-11 16:44:16,370:DEBUG:beat.execute_chain:line 90:{"task": "celery.chord", "args": [], "kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {<br>
"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {"kwargs": {}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, "header": [{"task": "tasks.zabbix.get<br>
_zabbix_items_value", "args": ["Memory Free", "rd servers"], "kwargs": {}, "options": {}, "subtask_type": null, "immutable": true}, {"task": "tasks.zabbix.get_zabbix_items_value", "args": ["Available memory", "rd servers"], "kwargs": {}, "options": {}, "subtask_type": n<br>
ull, "immutable": true}], "body": {"task": "celery.chain", "args": [], "kwargs": {"tasks": [{"task": "tasks.aggregate.percentage_per_item", "args": [], "kwargs": {}, "options": {}, "subtask_type": null, "immutable": false}, {"task": "tasks.mqtt.publish_mqtt", "args": ["<br>
vmmqtt01", "zabbix/"], "kwargs": {}, "options": {}, "subtask_type": null, "immutable": false}]}, "options": {}, "subtask_type": "chain", "immutable": false}}, "options": {}, "subtask_type": "chord", "immutable": false}</p>
<p dir="auto">I tried also by cloning the chord first in the scheduled task and executing the clone, but same result.</p> | <p dir="auto">AsyncResult memory leak on task producers when producers retrieves task results from redis results backend. We are using redis as broker and results backend.</p>
<p dir="auto">This is issue is similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="334774919" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4839" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/4839/hovercard" href="https://github.com/celery/celery/pull/4839">#4839</a>. I have attempted to backport this fix: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="409140221" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5332" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/5332/hovercard" href="https://github.com/celery/celery/pull/5332">#5332</a> with vine 1.3 + celery 4.2.2. However, leak of AsyncResult objects continues to happen for task that retrieves the results from redis backend. Tasks that ignores the results do not exhibit this leak when changes are backported from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="409140221" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5332" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/5332/hovercard" href="https://github.com/celery/celery/pull/5332">#5332</a>. Only patch that worked for me was removing <strong>del</strong> method completely: <a href="https://github.com/celery/celery/blame/v4.2.2/celery/result.py#L382">https://github.com/celery/celery/blame/v4.2.2/celery/result.py#L382</a></p>
<p dir="auto">Celery version: 4.2.2<br>
Kombu: 4.2.2<br>
Vine: 1.3.0<br>
Python: 2.7</p>
<p dir="auto">I have attempted to reproduce the issue with celery 4.1.1 but it works on that version.</p>
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li>[x ] I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li>[ x] I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li>[x ] I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</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/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li>[ x] I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li>[x ] 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>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li>[ x] I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li>[x ] I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li>[x ] I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul> | 0 |
<p dir="auto">Just clone <a href="http://www.joda.org/joda-time/" rel="nofollow">JodaTime</a>. Start out of tree.</p> | <p dir="auto">Right now add on two Options effectively treats a <code class="notranslate">None</code> as a <code class="notranslate">Some(Zero::zero())</code>, which is:</p>
<ul dir="auto">
<li>Unnecessary because <code class="notranslate">Some(Zero::zero())</code> is already a valid value, why duplicate it's meaning with <code class="notranslate">None</code>?</li>
<li>Contrary to the way the <code class="notranslate">Maybe</code> Monad in Haskell works: If both values are a <code class="notranslate">Some</code>, add them, else return <code class="notranslate">None</code>.</li>
</ul> | 0 |
<p dir="auto">Hello - thanks for all the hard work on sqlalchemy!</p>
<p dir="auto">I have an application where a handful of processes all interact with a single sqlite DB: <code class="notranslate">foo.db</code>. <code class="notranslate">foo.db</code> starts with 0 tables, and each process "lazily" bootstraps <code class="notranslate">foo.db</code> with a table named <code class="notranslate">"some_table"</code>.</p>
<p dir="auto">I notice, however, that when multiple processes call <code class="notranslate">metadata.create_all(checkfirst=True)</code> to try and create <code class="notranslate">"some_table"</code> in <code class="notranslate">foo.db</code>...sqlalchemy winds up raising an <code class="notranslate">OperationalError</code> "table already exists" error.</p>
<p dir="auto">In other words, running this script...</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import concurrent.futures
from sqlalchemy import create_engine, Table, Column, Integer, MetaData
def make_db():
engine = create_engine("sqlite:///foo.db")
metadata = MetaData()
Table(
"some_table",
metadata,
Column("id", Integer, primary_key=True),
)
metadata.create_all(bind=engine, checkfirst=True)
def main():
n = 3
with concurrent.futures.ProcessPoolExecutor() as executor:
futures = [executor.submit(make_db) for _ in range(n)]
for future in concurrent.futures.as_completed(futures):
future.result()
if __name__ == "__main__":
main()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">concurrent</span>.<span class="pl-s1">futures</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">create_engine</span>, <span class="pl-v">Table</span>, <span class="pl-v">Column</span>, <span class="pl-v">Integer</span>, <span class="pl-v">MetaData</span>
<span class="pl-k">def</span> <span class="pl-en">make_db</span>():
<span class="pl-s1">engine</span> <span class="pl-c1">=</span> <span class="pl-en">create_engine</span>(<span class="pl-s">"sqlite:///foo.db"</span>)
<span class="pl-s1">metadata</span> <span class="pl-c1">=</span> <span class="pl-v">MetaData</span>()
<span class="pl-v">Table</span>(
<span class="pl-s">"some_table"</span>,
<span class="pl-s1">metadata</span>,
<span class="pl-v">Column</span>(<span class="pl-s">"id"</span>, <span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>),
)
<span class="pl-s1">metadata</span>.<span class="pl-en">create_all</span>(<span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-s1">engine</span>, <span class="pl-s1">checkfirst</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-k">def</span> <span class="pl-en">main</span>():
<span class="pl-s1">n</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span>
<span class="pl-k">with</span> <span class="pl-s1">concurrent</span>.<span class="pl-s1">futures</span>.<span class="pl-v">ProcessPoolExecutor</span>() <span class="pl-k">as</span> <span class="pl-s1">executor</span>:
<span class="pl-s1">futures</span> <span class="pl-c1">=</span> [<span class="pl-s1">executor</span>.<span class="pl-en">submit</span>(<span class="pl-s1">make_db</span>) <span class="pl-k">for</span> <span class="pl-s1">_</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-s1">n</span>)]
<span class="pl-k">for</span> <span class="pl-s1">future</span> <span class="pl-c1">in</span> <span class="pl-s1">concurrent</span>.<span class="pl-s1">futures</span>.<span class="pl-en">as_completed</span>(<span class="pl-s1">futures</span>):
<span class="pl-s1">future</span>.<span class="pl-en">result</span>()
<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>:
<span class="pl-en">main</span>()</pre></div>
<p dir="auto">... yields the following error:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "sqlite_multiprocessing_create.py", line 26, in <module>
main()
File "sqlite_multiprocessing_create.py", line 22, in main
future.result()
File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 455, in result
return self.__get_result()
File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 414, in __get_result
raise exception_type, self._exception, self._traceback
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) table some_table already exists
[SQL:
CREATE TABLE some_table (
id INTEGER NOT NULL,
PRIMARY KEY (id)
)
]
(Background on this error at: http://sqlalche.me/e/e3q8)"><pre class="notranslate"><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-v">File</span> <span class="pl-s">"sqlite_multiprocessing_create.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">26</span>, <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-en">main</span>()
<span class="pl-v">File</span> <span class="pl-s">"sqlite_multiprocessing_create.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">22</span>, <span class="pl-s1">in</span> <span class="pl-s1">main</span>
<span class="pl-s1">future</span>.<span class="pl-en">result</span>()
<span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python2.7/dist-packages/concurrent/futures/_base.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">455</span>, <span class="pl-s1">in</span> <span class="pl-s1">result</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">__get_result</span>()
<span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python2.7/dist-packages/concurrent/futures/_base.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">414</span>, <span class="pl-s1">in</span> <span class="pl-s1">__get_result</span>
<span class="pl-k">raise</span> <span class="pl-s1">exception_type</span>, <span class="pl-s1">self</span>.<span class="pl-s1">_exception</span>, <span class="pl-s1">self</span>.<span class="pl-s1">_traceback</span>
<span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">exc</span>.<span class="pl-v">OperationalError</span>: (<span class="pl-s1">sqlite3</span>.<span class="pl-v">OperationalError</span>) <span class="pl-s1">table</span> <span class="pl-s1">some_table</span> <span class="pl-s1">already</span> <span class="pl-s1">exists</span>
[<span class="pl-v">SQL</span>:
<span class="pl-v">CREATE</span> <span class="pl-v">TABLE</span> <span class="pl-en">some_table</span> (
<span class="pl-s1">id</span> <span class="pl-v">INTEGER</span> <span class="pl-v">NOT</span> <span class="pl-v">NULL</span>,
<span class="pl-v">PRIMARY</span> <span class="pl-v">KEY</span> (<span class="pl-s1">id</span>)
)
]
(<span class="pl-v">Background</span> <span class="pl-s1">on</span> <span class="pl-s1">this</span> <span class="pl-s1">error</span> <span class="pl-s1">at</span>: <span class="pl-s1">http</span>:<span class="pl-c1">//</span><span class="pl-s1">sqlalche</span>.<span class="pl-s1">me</span><span class="pl-c1">/</span><span class="pl-s1">e</span><span class="pl-c1">/</span><span class="pl-s1">e3q8</span>)</pre></div>
<p dir="auto">Of course, an obvious workaround would be to have, "the parent process bootstrap tables in <code class="notranslate">foo.db</code>. Is it possible, however, to instruct sqlalchemy to use the <a href="https://www.sqlite.org/lang_createtable.html" rel="nofollow"><code class="notranslate">if not exists</code> clause that sqlite supports</a>?</p>
<p dir="auto">I've read <a href="https://docs.sqlalchemy.org/en/13/dialects/sqlite.html#pysqlite-serializable" rel="nofollow">through the notes on sqlite / <code class="notranslate">pysqlite</code> 's DDL semantics</a>, but hadn't found a nice workaround.</p> | <p dir="auto"><strong>Migrated issue, originally created by Craig Weber (<a href="https://github.com/weberc2">@weberc2</a>)</strong></p>
<p dir="auto">For tables without a primary key, TableClause.count() surprisingly compiles down to <code class="notranslate">SELECT count(<first-column-in-ColumnCollection>)...</code> instead of <code class="notranslate">SELECT count(*)...</code>. As a consequence, the returned result is incorrect by the number of NULLs in the first column in the column collection. This behavior is unexpected, and I couldn't find any documentation on the subject.</p>
<p dir="auto">Here is the offending code (from <a href="https://bitbucket.org/zzzeek/sqlalchemy/src/7189d0bc82598c2d6dcbb55b054837416db2ee7d/lib/sqlalchemy/sql/selectable.py?at=master&fileviewer=file-view-default" rel="nofollow">https://bitbucket.org/zzzeek/sqlalchemy/src/7189d0bc82598c2d6dcbb55b054837416db2ee7d/lib/sqlalchemy/sql/selectable.py?at=master&fileviewer=file-view-default</a>):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" @util.dependencies("sqlalchemy.sql.functions")
def count(self, functions, whereclause=None, **params):
"""return a SELECT COUNT generated against this
:class:`.TableClause`."""
if self.primary_key:
col = list(self.primary_key)[0]
else:
col = list(self.columns)[0]
return Select(
[functions.func.count(col).label('tbl_row_count')],
whereclause,
from_obj=[self],
**params)"><pre class="notranslate"> <span class="pl-en">@<span class="pl-s1">util</span>.<span class="pl-en">dependencies</span>(<span class="pl-s">"sqlalchemy.sql.functions"</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">count</span>(<span class="pl-s1">self</span>, <span class="pl-s1">functions</span>, <span class="pl-s1">whereclause</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-c1">**</span><span class="pl-s1">params</span>):
<span class="pl-s">"""return a SELECT COUNT generated against this</span>
<span class="pl-s"> :class:`.TableClause`."""</span>
<span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">primary_key</span>:
<span class="pl-s1">col</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s1">self</span>.<span class="pl-s1">primary_key</span>)[<span class="pl-c1">0</span>]
<span class="pl-k">else</span>:
<span class="pl-s1">col</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s1">self</span>.<span class="pl-s1">columns</span>)[<span class="pl-c1">0</span>]
<span class="pl-k">return</span> <span class="pl-v">Select</span>(
[<span class="pl-s1">functions</span>.<span class="pl-s1">func</span>.<span class="pl-en">count</span>(<span class="pl-s1">col</span>).<span class="pl-en">label</span>(<span class="pl-s">'tbl_row_count'</span>)],
<span class="pl-s1">whereclause</span>,
<span class="pl-s1">from_obj</span><span class="pl-c1">=</span>[<span class="pl-s1">self</span>],
<span class="pl-c1">**</span><span class="pl-s1">params</span>)</pre></div> | 0 |
<p dir="auto"><em>(Please close this issue if you folks have already discussed a similar request.)</em></p>
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">Window size memory when dragging out of FancyZones alignment.</p>
<h1 dir="auto">Proposed technical implementation details</h1>
<p dir="auto">In default Windows snapping, once you drag a window away from a snapped position, the window returns to its pre-snap size. This return action is not a part of FancyZones behavior.</p>
<p dir="auto">Feature would necessitate a toggle option within FancyZone settings.</p>
<p dir="auto">You devs are superb <g-emoji class="g-emoji" alias="hearts" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2665.png">♥</g-emoji></p> | <p dir="auto">I could never figure out how to make this work. Would be nice but is a hard problem.</p> | 1 |
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timothysc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timothysc">@timothysc</a> has a comment on this on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143028687" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/23387" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/23387/hovercard" href="https://github.com/kubernetes/kubernetes/pull/23387">#23387</a>. It's orthogonal to the issue but of course we could extend it to a discussion.</p>
<p dir="auto">Currently, Codec() and Versioner() wrap an input object that could be shared across different storage back-ends. The code is just a repeat for each implementation:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func NewSomeImpl(codec runtime.Codec, ...) {}
func (i *someImpl) Codec() {
return i.codec
}"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">NewSomeImpl</span>(<span class="pl-s1">codec</span> runtime.<span class="pl-smi">Codec</span>, <span class="pl-c1">...</span>) {}
<span class="pl-k">func</span> (<span class="pl-s1">i</span> <span class="pl-c1">*</span><span class="pl-smi">someImpl</span>) <span class="pl-en">Codec</span>() {
<span class="pl-k">return</span> <span class="pl-s1">i</span>.<span class="pl-c1">codec</span>
}</pre></div> | <p dir="auto">BUG REPORT</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):<br>
Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.6", GitCommit:"ae4550cc9c89a593bcda6678df201db1b208133b", GitTreeState:"clean", BuildDate:"2016-08-26T18:13:23Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}<br>
Server Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.6", GitCommit:"ae4550cc9c89a593bcda6678df201db1b208133b", GitTreeState:"clean", BuildDate:"2016-08-26T18:06:06Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:<br>
bare metal ubuntu</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):<br>
14.04.5 LTS</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):<br>
Linux yehiyam-adsl 3.19.0-68-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35609427" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/76" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/76/hovercard" href="https://github.com/kubernetes/kubernetes/pull/76">#76</a>~14.04.1-Ubuntu SMP Fri Aug 12 11:46:25 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
In kubernetes 1.3.6 every container that is created has an ipv6 address that is marked as duplicate address.<br>
i.e.<br>
<code class="notranslate">10: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 inet6 fe80::42:acff:fe10:2e02/64 scope link tentative dadfailed valid_lft forever preferred_lft forever</code><br>
this prevents one of our services (kurento-media-server) from working correctly.<br>
This never happened with an older version of k8s (1.1.7)<br>
<strong>What you expected to happen</strong>:<br>
The IPv6 address should not be marked as duplicate</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):<br>
Create a container (e.g. busybox, nginx)<br>
execute the <strong>ip</strong> command in the container<br>
<code class="notranslate">kubectl exec pod_name ip add show</code></p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p> | 0 |
<p dir="auto">Passing a list of strings to the DataFrame.sort() method is stable, but passing a string by itself causes the sort to be unstable.</p>
<p dir="auto">I'm defining sort stability to mean row order is maintained for duplicate values in the sorted column.</p>
<h2 dir="auto">Code to recreate</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>>import pandas as pd
>>>df = pd.DataFrame(list('ABCDABCDABCD'), columns=['x'])
>>>print df.sort(['x'])
x
0 A
4 A
8 A
1 B
5 B
9 B
2 C
6 C
10 C
3 D
7 D
11 D
>>>print df.sort('x')
x
0 A
4 A
8 A
1 B
5 B
9 B
6 C
10 C
2 C
3 D
11 D
7 D"><pre class="notranslate"><code class="notranslate">>>>import pandas as pd
>>>df = pd.DataFrame(list('ABCDABCDABCD'), columns=['x'])
>>>print df.sort(['x'])
x
0 A
4 A
8 A
1 B
5 B
9 B
2 C
6 C
10 C
3 D
7 D
11 D
>>>print df.sort('x')
x
0 A
4 A
8 A
1 B
5 B
9 B
6 C
10 C
2 C
3 D
11 D
7 D
</code></pre></div>
<p dir="auto">The index is out of order for C and D in the 2nd case.</p>
<p dir="auto">pandas version 0.10.0<br>
Python version 2.7.2<br>
Windows 7, 64-bit</p> | <p dir="auto">see discussion in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="12049172" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/3059" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/3059/hovercard" href="https://github.com/pandas-dev/pandas/pull/3059">#3059</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="12196758" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/3095" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/3095/hovercard" href="https://github.com/pandas-dev/pandas/issues/3095">#3095</a>, also see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7013605" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/1943" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/1943/hovercard" href="https://github.com/pandas-dev/pandas/issues/1943">#1943</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="12210717" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/3102" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/3102/hovercard" href="https://github.com/pandas-dev/pandas/pull/3102">#3102</a></p>
<p dir="auto">This only applies with a non-unique column index</p>
<p dir="auto">Currently if duplicate columns across dtypes there are issues in getting the correct block given a column name.</p>
<p dir="auto">I think it is possible, though non-trivial, to instead have a positional map from the frame columns to the BlockManager blocks, will simplify BlockManager.iget.</p>
<p dir="auto">Primary motivation is to_csv currently cannot handle these types of lookups.</p>
<p dir="auto">Also should eliminate need for _find_block</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [6]: df = pd.DataFrame(np.random.randn(8,4))
In [12]: df = pd.DataFrame(np.random.randn(8,4))
In [13]: df._data.blocks[0].ref_locs
Out[13]: array([0, 1, 2, 3])
In [14]: df = pd.DataFrame(np.random.randn(8,4),columns=['a']*4)
In [15]: df._data.blocks[0].ref_locs
---------------------------------------------------------------------------
/mnt/home/jreback/pandas/pandas/core/internals.py in ref_locs(self)
52 def ref_locs(self):
53 if self._ref_locs is None:
---> 54 indexer = self.ref_items.get_indexer(self.items)
55 indexer = com._ensure_platform_int(indexer)
56 if (indexer == -1).any():
/mnt/home/jreback/pandas/pandas/core/index.pyc in get_indexer(self, target, method, limit)
835
836 if not self.is_unique:
--> 837 raise Exception('Reindexing only valid with uniquely valued Index '
838 'objects')
839
Exception: Reindexing only valid with uniquely valued Index objects"><pre class="notranslate"><code class="notranslate">In [6]: df = pd.DataFrame(np.random.randn(8,4))
In [12]: df = pd.DataFrame(np.random.randn(8,4))
In [13]: df._data.blocks[0].ref_locs
Out[13]: array([0, 1, 2, 3])
In [14]: df = pd.DataFrame(np.random.randn(8,4),columns=['a']*4)
In [15]: df._data.blocks[0].ref_locs
---------------------------------------------------------------------------
/mnt/home/jreback/pandas/pandas/core/internals.py in ref_locs(self)
52 def ref_locs(self):
53 if self._ref_locs is None:
---> 54 indexer = self.ref_items.get_indexer(self.items)
55 indexer = com._ensure_platform_int(indexer)
56 if (indexer == -1).any():
/mnt/home/jreback/pandas/pandas/core/index.pyc in get_indexer(self, target, method, limit)
835
836 if not self.is_unique:
--> 837 raise Exception('Reindexing only valid with uniquely valued Index '
838 'objects')
839
Exception: Reindexing only valid with uniquely valued Index objects
</code></pre></div>
<p dir="auto">This is the root of all evil, this should raise the same as above (but doesn't even if<br>
I consolidate)......</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [16]: df = pd.DataFrame(np.random.randn(8,4))
In [17]: df.columns = ['a']*4
In [18]: df._data.blocks[0].ref_locs
Out[18]: array([0, 1, 2, 3])"><pre class="notranslate"><code class="notranslate">In [16]: df = pd.DataFrame(np.random.randn(8,4))
In [17]: df.columns = ['a']*4
In [18]: df._data.blocks[0].ref_locs
Out[18]: array([0, 1, 2, 3])
</code></pre></div> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[X ] bug report
[ ] feature request
[ ] support request"><pre class="notranslate"><code class="notranslate">[X ] bug report
[ ] feature request
[ ] support request
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
I am working on my Angular2 component where I have a component that displays a login status that has no dependency on which routing is picked. I have also a component that displays the proper page with . Both are defined in the same <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/NgModule/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/NgModule">@NgModule</a> annotation and both need to be bootstrapped as they are part of a static html page.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@NgModule({
declarations: [DisplayPageComponent, LoginStatusComponent],
imports: [RouterModule.forRoot(routes)],
bootstrap: [DisplayPageComponent, LoginStatusComponent]
})"><pre class="notranslate"><code class="notranslate">@NgModule({
declarations: [DisplayPageComponent, LoginStatusComponent],
imports: [RouterModule.forRoot(routes)],
bootstrap: [DisplayPageComponent, LoginStatusComponent]
})
</code></pre></div>
<p dir="auto">When I press the next button to go a different page, I go to the other page for a split second and then go back to the previous step.</p>
<p dir="auto">If I subscribe to router.events I see I navigate to the page and then the page is disabled again as the id has changed on this line:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this.routerEvents.next(new NavigationCancel(id, this.serializeUrl(url), "Navigation ID " + id + " is not equal to the current navigation id " + this.navigationId));"><pre class="notranslate"><code class="notranslate">this.routerEvents.next(new NavigationCancel(id, this.serializeUrl(url), "Navigation ID " + id + " is not equal to the current navigation id " + this.navigationId));
</code></pre></div>
<p dir="auto">It seems the login status component also listens to the routing and disables the page and you receive no feedback if you do not subscribe to router events.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
I expect the routing navigation is only handled once and not the number of components that are bootstrapped.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
I can create a plunkr if required</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Even if the way I use modules is incorrect I would expect to get at least some feedback why the navigation was blocked/failed</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.1</li>
<li><strong>Browser:</strong> all</li>
<li><strong>Language:</strong> all</li>
</ul> | <ul dir="auto">
<li>*<em>I'm submitting a ... *</em><br>
[ ] bug report<br>
[ X] feature request</li>
<li><strong>What is the current behavior?</strong></li>
</ul>
<p dir="auto">I'm using Http in an app and accidentally forgot to include <strong>http.dev.js</strong> in my index.html and received the following error as the app tried to load:</p>
<p dir="auto">angular2-polyfills.js:322 Error: SyntaxError: <strong>Unexpected number(…)</strong><br>
ZoneDelegate.invoke @ angular2-polyfills.js:322<br>
Zone.run @ angular2-polyfills.js:218<br>
(anonymous function) @ angular2-polyfills.js:567<br>
ZoneDelegate.invokeTask @ angular2-polyfills.js:355<br>
Zone.runTask @ angular2-polyfills.js:254<br>
drainMicroTaskQueue @ angular2-polyfills.js:473<br>
ZoneTask.invoke @ angular2-polyfills.js:425</p>
<ul dir="auto">
<li><strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem</strong> via</li>
</ul>
<p dir="auto">Although this isn't a bug, here's how to duplicate the error above:</p>
<p dir="auto">Use an Http import in an Angular 2 service:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { Http, Response } from 'angular2/http';"><pre class="notranslate"><code class="notranslate">import { Http, Response } from 'angular2/http';
</code></pre></div>
<p dir="auto">Leave out the http.dev.js script from index.html (I should've included something like the script below but forgot it). Leaving out any of the key Angular scripts seems to cause the error if imports need objects that are in the missing script.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<!-- Should have included this script -->
<script src="node_modules/angular2/bundles/http.dev.js"></script>"><pre class="notranslate"><code class="notranslate"><!-- Should have included this script -->
<script src="node_modules/angular2/bundles/http.dev.js"></script>
</code></pre></div>
<p dir="auto">Since Http is missing you'll get the angular2-polyfills.js:322 Error: SyntaxError: Unexpected number(…) error. The obvious answer is "Don't forget the script!" but I suspect I won't be the first or the last to do that and having a more detailed error would be helpful.</p>
<ul dir="auto">
<li><strong>What is the expected behavior?</strong></li>
</ul>
<p dir="auto">Show a more detailed error about the actual script, object (or import) that is missing or that led to the problem. Getting "Unexpected number" is tough to debug.</p>
<ul dir="auto">
<li><strong>What is the motivation / use case for changing the behavior?</strong></li>
</ul>
<p dir="auto">Would save devs a lot of time figuring out simple mistakes like this if an import won't work due to a missing script.</p>
<ul dir="auto">
<li><strong>Please tell us about your environment:</strong></li>
<li>Angular version: 2.0.0-beta.11</li>
<li>Browser: [Chrome 49 ]</li>
<li>Language: [TypeScript 1.8.7]</li>
</ul> | 0 |
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 3.1.0-master</li>
<li>Operating System / Platform => macOS Sierra (10.12) x86_64</li>
<li>Compiler => Apple LLVM version 8.0.0 (clang-800.0.38)</li>
<li>build using Homebrew [today, 08:30CEST]:<br>
brew install ant<br>
brew install opencv3 --HEAD --with-java --with-ffmpeg --with-tbb</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">If you use VideoCapture via Java wrappers and if you try to release the camera, it always crashes the Java process. It can successfully read the frame though. Releasing the mat works fine, releasing the video capture crashes.</p>
<h5 dir="auto">Steps to reproduce</h5>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" public static void main(String[] args) {
VideoCapture capture = new VideoCapture(0);
Mat mat = new Mat();
capture.read(mat);
mat.release();
capture.release(); //crashes here
}"><pre class="notranslate"> <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-s1">main</span>(<span class="pl-smi">String</span>[] <span class="pl-s1">args</span>) {
<span class="pl-smi">VideoCapture</span> <span class="pl-s1">capture</span> = <span class="pl-k">new</span> <span class="pl-smi">VideoCapture</span>(<span class="pl-c1">0</span>);
<span class="pl-smi">Mat</span> <span class="pl-s1">mat</span> = <span class="pl-k">new</span> <span class="pl-smi">Mat</span>();
<span class="pl-s1">capture</span>.<span class="pl-en">read</span>(<span class="pl-s1">mat</span>);
<span class="pl-s1">mat</span>.<span class="pl-en">release</span>();
<span class="pl-s1">capture</span>.<span class="pl-en">release</span>(); <span class="pl-c">//crashes here</span>
}</pre></div>
<p dir="auto">Afterwards it shows following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fff954f9f6f, pid=4925, tid=0x000000000000080b
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b14) (build 1.8.0_102-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libobjc.A.dylib+0x8f6f] objc_release+0x1f
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#"><pre class="notranslate"><code class="notranslate">#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fff954f9f6f, pid=4925, tid=0x000000000000080b
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b14) (build 1.8.0_102-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libobjc.A.dylib+0x8f6f] objc_release+0x1f
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
</code></pre></div> | <h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 3.1</li>
<li>Operating System / Platform => Mac OSX</li>
<li>Compiler => XCode Version 8.0 (8A218a)</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I tried to experiment with VideoCapture class in java. It looks like there is a bug - it is possible to open the camera but closing is not possible.</p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">This code leads to java crash ():</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" VideoCapture cap = new VideoCapture();
cap.open(0); // camera is opening up
Mat img = new Mat();
cap.read(img);
cap.release(); // java crashes
"><pre class="notranslate"><code class="notranslate"> VideoCapture cap = new VideoCapture();
cap.open(0); // camera is opening up
Mat img = new Mat();
cap.read(img);
cap.release(); // java crashes
</code></pre></div> | 1 |
<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">group module</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">1.9</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Hi,</p>
<p dir="auto">the group module seems to not work right. I am using centos 7. The expected result is that it wouldn't fail since the group is properly present. The group was added by ´yum install docker´</p>
<p dir="auto">Task:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- group: name=dockerroot state=present gid=989"><pre class="notranslate">- <span class="pl-ent">group</span>: <span class="pl-s">name=dockerroot state=present gid=989</span></pre></div>
<p dir="auto">Sample</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="TASK: [newrelic | Configure New Relic Sysmond] ********************************
changed: [192.168.0.244]
TASK: [newrelic | group name=dockerroot state=present gid=989] ****************
failed: [192.168.0.244] => {"failed": true, "name": "dockerroot"}
msg: groupmod: GID '989' already exists
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/root/vmbuilder.retry
192.168.0.244 : ok=73 changed=17 unreachable=0 failed=1
[root@172-17-42-1 ~]# ansible-playbook --version
ansible-playbook 1.9.0.1
configured module search path = None
[root@172-17-42-1 ~]# grep -i "989" /etc/group
dockerroot:x:989:newrelic"><pre class="notranslate">TASK: [newrelic <span class="pl-k">|</span> Configure New Relic Sysmond] <span class="pl-k">********************************</span>
changed: [192.168.0.244]
TASK: [newrelic <span class="pl-k">|</span> group name<span class="pl-k">=</span>dockerroot state<span class="pl-k">=</span>present gid<span class="pl-k">=</span>989] <span class="pl-k">****************</span>
failed: [192.168.0.244] =<span class="pl-k">></span> {<span class="pl-s"><span class="pl-pds">"</span>failed<span class="pl-pds">"</span></span>: true, <span class="pl-s"><span class="pl-pds">"</span>name<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>dockerroot<span class="pl-pds">"</span></span>}
msg: groupmod: GID <span class="pl-s"><span class="pl-pds">'</span>989<span class="pl-pds">'</span></span> already exists
FATAL: all hosts have already failed -- aborting
PLAY RECAP <span class="pl-k">********************************************************************</span>
to retry, use: --limit @/root/vmbuilder.retry
192.168.0.244 <span class="pl-c1">:</span> ok=73 changed=17 unreachable=0 failed=1
[root@172-17-42-1 <span class="pl-k">~</span>]<span class="pl-c"><span class="pl-c">#</span> ansible-playbook --version</span>
ansible-playbook 1.9.0.1
configured module search path = None
[root@172-17-42-1 <span class="pl-k">~</span>]<span class="pl-c"><span class="pl-c">#</span> grep -i "989" /etc/group </span>
dockerroot:x:989:newrelic</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">ec2</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.4.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/Users/rpm/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Users/rpm/sandbox/venv-ansible-2.4.0/lib/python2.7/site-packages/ansible
executable location = /Users/rpm/sandbox/venv-ansible-2.4.0/bin/ansible
python version = 2.7.13 (default, Dec 18 2016, 07:03:39) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]"><pre class="notranslate"><code class="notranslate">ansible 2.4.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/Users/rpm/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Users/rpm/sandbox/venv-ansible-2.4.0/lib/python2.7/site-packages/ansible
executable location = /Users/rpm/sandbox/venv-ansible-2.4.0/bin/ansible
python version = 2.7.13 (default, Dec 18 2016, 07:03:39) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">All defaults</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Issue not platform specific</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">The <code class="notranslate">count_tag</code> parameter on the ec2 module should maintain the <code class="notranslate">exact_count</code> number of ec2 instances which match the supplied tags, <em>wherever these ec2 instances are found within the account and region</em>. This was the behavior until version 2.4.</p>
<p dir="auto">As of version 2.4, the behavior changed, so that the match is no longer on 'count_tag' alone (as documented), but also on the <code class="notranslate">vpc_subnet_id</code>. Any instances with matching tags but in different subnets (even within the same VPC) are no longer counted as matching, and new instances are created.</p>
<p dir="auto">This is a serious bug for people maintaining EC2 infrastructure.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Create instance, like so:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
- hosts: localhost
vars:
subnet_id: subnet-1111111
tasks:
- ec2:
count_tag:
Name: duplicate-test-1
Department: FooBar
Application: Baz
exact_count: 1
group_id: sg-000000
image: ami-3bdd502c
instance_tags:
Name: duplicate-test-1
Department: FooBar
Application: Baz
instance_type: t2.nano
key_name: some.key.name
region: us-east-1
vpc_subnet_id: "{{ subnet_id }}"
"><pre class="notranslate">---
- <span class="pl-ent">hosts</span>: <span class="pl-s">localhost</span>
<span class="pl-ent">vars</span>:
<span class="pl-ent">subnet_id</span>: <span class="pl-s">subnet-1111111</span>
<span class="pl-ent">tasks</span>:
- <span class="pl-ent">ec2</span>:
<span class="pl-ent">count_tag</span>:
<span class="pl-ent">Name</span>: <span class="pl-s">duplicate-test-1</span>
<span class="pl-ent">Department</span>: <span class="pl-s">FooBar</span>
<span class="pl-ent">Application</span>: <span class="pl-s">Baz</span>
<span class="pl-ent">exact_count</span>: <span class="pl-c1">1</span>
<span class="pl-ent">group_id</span>: <span class="pl-s">sg-000000</span>
<span class="pl-ent">image</span>: <span class="pl-s">ami-3bdd502c</span>
<span class="pl-ent">instance_tags</span>:
<span class="pl-ent">Name</span>: <span class="pl-s">duplicate-test-1</span>
<span class="pl-ent">Department</span>: <span class="pl-s">FooBar</span>
<span class="pl-ent">Application</span>: <span class="pl-s">Baz</span>
<span class="pl-ent">instance_type</span>: <span class="pl-s">t2.nano</span>
<span class="pl-ent">key_name</span>: <span class="pl-s">some.key.name</span>
<span class="pl-ent">region</span>: <span class="pl-s">us-east-1</span>
<span class="pl-ent">vpc_subnet_id</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ subnet_id }}<span class="pl-pds">"</span></span>
</pre></div>
<p dir="auto">Later, re-run playbook but use different subnet ID:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
- hosts: localhost
vars:
subnet_id: subnet-2222222
tasks:
- ec2:
count_tag:
Name: duplicate-test-1
Department: FooBar
Application: Baz
exact_count: 1
group_id: sg-000000
image: ami-3bdd502c
instance_tags:
Name: duplicate-test-1
Department: FooBar
Application: Baz
instance_type: t2.nano
key_name: some.key.name
region: us-east-1
vpc_subnet_id: "{{ subnet_id }}"
"><pre class="notranslate">---
- <span class="pl-ent">hosts</span>: <span class="pl-s">localhost</span>
<span class="pl-ent">vars</span>:
<span class="pl-ent">subnet_id</span>: <span class="pl-s">subnet-2222222</span>
<span class="pl-ent">tasks</span>:
- <span class="pl-ent">ec2</span>:
<span class="pl-ent">count_tag</span>:
<span class="pl-ent">Name</span>: <span class="pl-s">duplicate-test-1</span>
<span class="pl-ent">Department</span>: <span class="pl-s">FooBar</span>
<span class="pl-ent">Application</span>: <span class="pl-s">Baz</span>
<span class="pl-ent">exact_count</span>: <span class="pl-c1">1</span>
<span class="pl-ent">group_id</span>: <span class="pl-s">sg-000000</span>
<span class="pl-ent">image</span>: <span class="pl-s">ami-3bdd502c</span>
<span class="pl-ent">instance_tags</span>:
<span class="pl-ent">Name</span>: <span class="pl-s">duplicate-test-1</span>
<span class="pl-ent">Department</span>: <span class="pl-s">FooBar</span>
<span class="pl-ent">Application</span>: <span class="pl-s">Baz</span>
<span class="pl-ent">instance_type</span>: <span class="pl-s">t2.nano</span>
<span class="pl-ent">key_name</span>: <span class="pl-s">some.key.name</span>
<span class="pl-ent">region</span>: <span class="pl-s">us-east-1</span>
<span class="pl-ent">vpc_subnet_id</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ subnet_id }}<span class="pl-pds">"</span></span>
</pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">The <code class="notranslate">count_tags</code> and <code class="notranslate">exact_count</code> parameter should be respected, based on tags alone, and the running instance created in the first playbook run should be recognized as matching those parameters during the second playbook run.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">As of version 2.4, the running instance with matching tags is no longer counted because it is in a different subnet, and a redundant instance is created.</p>
<h5 dir="auto">COMMENTS</h5>
<p dir="auto">This behavior change was introduced without documentation, and is very problematic - the point of using <code class="notranslate">count_tags</code> and <code class="notranslate">exact_count</code> is to be able to maintain an instance or set of instances based on a tagging strategy - subnets may change over time, and often multiple instances will be distributed across subnets for resiliency. Silently including the subnet as an additional criterion for tag matching doesn't make a lot of sense, and breaks the expected behavior.</p>
<p dir="auto">If matching on tags + subnet is actually useful to someone, it would make more sense to make it an explicit parameter (although at that point, offering matching on VPCs, or instance types, or AMIs, or various other attributes which are not currently matched on should maybe come into consideration... and personally I feel that if that's necessary, then one's EC2 tagging strategy needs a revisit).</p> | 0 |
<p dir="auto"><a href="url"><br>
<img width="1531" alt="Screenshot 2020-06-17 at 9 45 18 AM" src="https://user-images.githubusercontent.com/36409924/84854453-50bb2a80-b07f-11ea-8609-92f2c44d4e8b.png" style="max-width: 100%;"><br>
</a><br>
The search on documentation page keeps saying initializing search. Never searches really. I have even tried clearing cache, cookies and changing network.</p> | <p dir="auto">Not a bug in library itself but on docs webpage. The issue is that the search bar on documentation page (fastapi.tiangolo.com) does not work on safari browser on mac. Clicking on search bar shows <code class="notranslate">Initializing search</code> and then nothing else happens.</p>
<p dir="auto">It works on chrome though on the same system.</p>
<p dir="auto">Here's the screenshot:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/62844365/82579924-1a87a980-9bac-11ea-9756-ab6600f5c89c.png"><img src="https://user-images.githubusercontent.com/62844365/82579924-1a87a980-9bac-11ea-9756-ab6600f5c89c.png" alt="Screenshot 2020-05-21 at 7 22 19 PM" style="max-width: 100%;"></a></p> | 1 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: v1.31.2</li>
<li>Operating System: mcr.microsoft.com/playwright:v1.31.2-focal image</li>
<li>Browser: WebKit</li>
<li>Other info: JavaScript disabled</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 default defineConfig({
projects: [
{
name: 'Chromium without JS',
use: { ...devices['Desktop Chrome'], javaScriptEnabled: false },
},
{
name: 'WebKit with JS',
use: { ...devices['Desktop Safari'], javaScriptEnabled: true },
},
{
name: 'WebKit without JS',
use: { ...devices['Desktop Safari'], javaScriptEnabled: false },
},
]
});"><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-k">default</span> <span class="pl-en">defineConfig</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 without JS'</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-c1">javaScriptEnabled</span>: <span class="pl-c1">false</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 with JS'</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-c1">javaScriptEnabled</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-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'WebKit without JS'</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-c1">javaScriptEnabled</span>: <span class="pl-c1">false</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="import { test, expect } from '@playwright/test';
test('Page.setContent', async ({ page }) => {
await page.setContent('<h1>Hello</h1>')
await expect(page.locator('h1')).toHaveText('Hello')
})
"><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-s1">expect</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-en">test</span><span class="pl-kos">(</span><span class="pl-s">'Page.setContent'</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">=></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">setContent</span><span class="pl-kos">(</span><span class="pl-s">'<h1>Hello</h1>'</span><span class="pl-kos">)</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">locator</span><span class="pl-kos">(</span><span class="pl-s">'h1'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveText</span><span class="pl-kos">(</span><span class="pl-s">'Hello'</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">Tests pass.</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">The test fails when JavaScript is not available in WebKit:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Running 3 tests using 2 workers
✓ 1 [Chromium without JS] › publishing-a-prereview.spec.ts:690:6 › Page.setContent (1.3s)
✓ 2 [WebKit with JS] › publishing-a-prereview.spec.ts:690:6 › Page.setContent (1.3s)
✘ 3 [WebKit without JS] › publishing-a-prereview.spec.ts:690:6 › Page.setContent (30.0s)
1) [WebKit without JS] › publishing-a-prereview.spec.ts:690:6 › Page.setContent ──────────────────
Test timeout of 30000ms exceeded.
page.setContent: Navigation failed because page was closed!
=========================== logs ===========================
setting frame content, waiting until "load"
============================================================
689 |
690 | test.only('Page.setContent', async ({ page }) => {
> 691 | await page.setContent('<h1>Hello</h1>')
| ^
692 |
693 | await expect(page.locator('h1')).toHaveText('Hello')
694 | })
at /app/integration/publishing-a-prereview.spec.ts:691:14
Pending operations:
- page.setContent at integration/publishing-a-prereview.spec.ts:691:14
1 failed
[WebKit without JS] › publishing-a-prereview.spec.ts:690:6 › Page.setContent ───────────────────
2 passed (44.0s)"><pre class="notranslate"><code class="notranslate">Running 3 tests using 2 workers
✓ 1 [Chromium without JS] › publishing-a-prereview.spec.ts:690:6 › Page.setContent (1.3s)
✓ 2 [WebKit with JS] › publishing-a-prereview.spec.ts:690:6 › Page.setContent (1.3s)
✘ 3 [WebKit without JS] › publishing-a-prereview.spec.ts:690:6 › Page.setContent (30.0s)
1) [WebKit without JS] › publishing-a-prereview.spec.ts:690:6 › Page.setContent ──────────────────
Test timeout of 30000ms exceeded.
page.setContent: Navigation failed because page was closed!
=========================== logs ===========================
setting frame content, waiting until "load"
============================================================
689 |
690 | test.only('Page.setContent', async ({ page }) => {
> 691 | await page.setContent('<h1>Hello</h1>')
| ^
692 |
693 | await expect(page.locator('h1')).toHaveText('Hello')
694 | })
at /app/integration/publishing-a-prereview.spec.ts:691:14
Pending operations:
- page.setContent at integration/publishing-a-prereview.spec.ts:691:14
1 failed
[WebKit without JS] › publishing-a-prereview.spec.ts:690:6 › Page.setContent ───────────────────
2 passed (44.0s)
</code></pre></div>
<p dir="auto">The failure screenshot shows that it was able to set the content:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1784740/222746889-7013ffd8-8414-4607-954c-41c90265dd52.png"><img src="https://user-images.githubusercontent.com/1784740/222746889-7013ffd8-8414-4607-954c-41c90265dd52.png" alt="test-failed-1" style="max-width: 100%;"></a></p>
<p dir="auto">I've tried all the <code class="notranslate">waitUntil</code> options, and none work.</p> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.34.3]</li>
<li>Operating System: [Windows 11]</li>
<li>Browser: [Chrome]</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 default defineConfig({
projects: [
{
name: 'Chrome',
use: {
...devices['Desktop Chrome'],
},
},
],
});"><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-k">default</span> <span class="pl-en">defineConfig</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">'Chrome'</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-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="test('user should upload too big file and expect error appears successfully', async ({ page }) => {
await page.getByTestId('upload-file-input').setInputFiles('./Assets/11mbphoto.jpg')
await expect(page.getByText('Error: file size is too big')).toBeVisible()
await expect(page.locator('div').filter({ hasText: /^Next step$/ })).not.toBeVisible()
})"><pre class="notranslate"><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'user should upload too big file and expect error appears successfully'</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">=></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">getByTestId</span><span class="pl-kos">(</span><span class="pl-s">'upload-file-input'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">setInputFiles</span><span class="pl-kos">(</span><span class="pl-s">'./Assets/11mbphoto.jpg'</span><span class="pl-kos">)</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByText</span><span class="pl-kos">(</span><span class="pl-s">'Error: file size is too big'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBeVisible</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">locator</span><span class="pl-kos">(</span><span class="pl-s">'div'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">hasText</span>: <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">^</span>Next step<span class="pl-cce">$</span><span class="pl-c1">/</span></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">not</span><span class="pl-kos">.</span><span class="pl-en">toBeVisible</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">[Describe actual behavior]</p>
<p dir="auto">if you run this test with setInputFiles in new ui mode test will fail, becouze file not uploaded.<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/29463426/241989247-90a9710a-807a-4ff2-afa0-a6409d6827c2.png"><img src="https://user-images.githubusercontent.com/29463426/241989247-90a9710a-807a-4ff2-afa0-a6409d6827c2.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">if you run same test in vs code headless mode it pass<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/29463426/241989566-d8c3e9b4-a8b0-4ff8-ace6-174a704745f9.png"><img src="https://user-images.githubusercontent.com/29463426/241989566-d8c3e9b4-a8b0-4ff8-ace6-174a704745f9.png" alt="image" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">Attached are 3 test cases (<a href="https://gist.github.com/ppf2/3ce59f1f1332bb41af46">https://gist.github.com/ppf2/3ce59f1f1332bb41af46</a>):</p>
<h1 dir="auto">TEST 1 (Dynamically mapped fields): Create an index at index creation time. Then add data. You will see that the alias does not work.</h1>
<h1 dir="auto">TEST 2 (Dynamically mapped fields): Create an index with no alias defined. Add data, then create the alias afterwards. You will see that the alias works this time.</h1>
<h1 dir="auto">TEST 3 (Explicitly mapped fields): Create an index at index creation time. But this time, define an explicit mapping for the fields as well. Then add data. You will see that the alias works this time.</h1>
<p dir="auto">If this is the expected behavior, can we include a disclaimer in the documentation (and ideally, catch this condition and throw and error to prevent the index alias from being created in the first place?)</p> | <p dir="auto">Today, if we create a filtered alias or a percolator query which references a field that is not yet mapped, the field is interpreted as a string.</p>
<p dir="auto">This is a problem when (eg) the user then indexes a document where the field is really numeric or a date. Any existing filters or percolator queries will not work correctly until the cached filter/query is regenerated (eg after a restart).</p>
<p dir="auto">Instead, we should support a "strict" query parsing mode which throws an error if an unmapped field is referenced.</p> | 1 |
<p dir="auto">Hi,<br>
I am using Symfony 2.8.6, and after creating a new Command, I stumbled upon an unexpected error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="An argument with name "command" already exists.
[Symfony\Component\Console\Exception\LogicException]
An argument with name "command" already exists."><pre class="notranslate"><code class="notranslate">An argument with name "command" already exists.
[Symfony\Component\Console\Exception\LogicException]
An argument with name "command" already exists.
</code></pre></div>
<p dir="auto">After trying a lot of different solutions, I found out that the error had to do with the option shortcut I used:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$this->setName('my:super:command')
->setAliases(['my:super:commandalias'])
->setDescription('Performs some irrelevant work.')
->addOption('survey', 's', InputOption::VALUE_REQUIRED, 'My option with a shortcut.')"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-en">setName</span>(<span class="pl-s">'my:super:command'</span>)
-><span class="pl-en">setAliases</span>([<span class="pl-s">'my:super:commandalias'</span>])
-><span class="pl-en">setDescription</span>(<span class="pl-s">'Performs some irrelevant work.'</span>)
-><span class="pl-en">addOption</span>(<span class="pl-s">'survey'</span>, <span class="pl-s">'s'</span>, <span class="pl-v">InputOption</span>::<span class="pl-c1">VALUE_REQUIRED</span>, <span class="pl-s">'My option with a shortcut.'</span>)</pre></div>
<p dir="auto">After changing the alias (or setting it to null), the error just stopped popping out.<br>
Is there any obvious reason I am missing here, or is this a bug?<br>
Because to my knowledge "s" is not used anywhere else.</p>
<p dir="auto">Furthermore, the error is awkwardly cryptic and gave me a hard time debugging this.</p>
<p dir="auto">Regards,<br>
Nicolas</p> | <p dir="auto">Symfony toolbar in 2.8.0 is generating an error because the FileCache the doctrine is generating file with the very big name in windows 10</p> | 0 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
Failing to compile correct code</p>
<p dir="auto"><strong>Input Code</strong></p>
<ul dir="auto">
<li>REPL or Repo link if applicable:</li>
</ul>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {NetworkListenerEvent} from "../listeners/network-listener";
export enum NetworkControllerEnvironment {
Unicast,
Multicast,
Broadcast,
All
}
export default interface NetworkController {
readonly endpoint: string;
readonly environment: NetworkControllerEnvironment;
readonly handle: (event: NetworkListenerEvent) => void;
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-smi">NetworkListenerEvent</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"../listeners/network-listener"</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">enum</span> <span class="pl-smi">NetworkControllerEnvironment</span> <span class="pl-kos">{</span>
<span class="pl-c1">Unicast</span><span class="pl-kos">,</span>
<span class="pl-c1">Multicast</span><span class="pl-kos">,</span>
<span class="pl-c1">Broadcast</span><span class="pl-kos">,</span>
<span class="pl-c1">All</span>
<span class="pl-kos">}</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">interface</span> <span class="pl-smi">NetworkController</span> <span class="pl-kos">{</span>
<span class="pl-k">readonly</span> <span class="pl-c1">endpoint</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-k">readonly</span> <span class="pl-c1">environment</span>: <span class="pl-smi">NetworkControllerEnvironment</span><span class="pl-kos">;</span>
<span class="pl-k">readonly</span> <span class="pl-c1">handle</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">NetworkListenerEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
Compile successfully</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"presets": [
"@babel/env",
"@babel/typescript"
],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread"
]
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"presets"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"@babel/env"</span><span class="pl-kos">,</span>
<span class="pl-s">"@babel/typescript"</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span>
<span class="pl-s">"@babel/proposal-class-properties"</span><span class="pl-kos">,</span>
<span class="pl-s">"@babel/proposal-object-rest-spread"</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): v7.0.0-beta.49</li>
<li>Node/npm version: 5.6.0</li>
<li>OS: Windows 10</li>
<li>Monorepo: no</li>
<li>How you are using Babel: cli</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto"><strong>Additional context/Screenshots</strong><br>
Stack trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ tsc --emitDeclarationOnly && babel src --out-dir lib --extensions ".ts,.tsx"
{ SyntaxError: D:\Projects\local-network\src\core\network-controller.ts: Unexpected token, expected ";" (10:25)
8 | }
9 |
> 10 | export default interface NetworkController {
| ^
11 | readonly endpoint: string;
12 | readonly environment: NetworkControllerEnvironment;
13 | readonly handle: (event: NetworkListenerEvent) => void;
at _class.raise (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:3861:15)
at _class.unexpected (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:5190:16)
at _class.semicolon (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:5174:40)
at _class.parseExportDefaultExpression (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:8149:12
)
at _class.parseExportDefaultExpression (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:9801:65
)
at _class.parseExport (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:8102:31)
at _class.parseExport (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:9784:50)
at _class.parseStatementContent (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:7172:27)
at _class.parseStatementContent (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:9816:58)
at _class.parseStatement (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:7085:17)
pos: 200,
loc: Position { line: 10, column: 25 },
code: 'BABEL_PARSE_ERROR' }"><pre class="notranslate"><code class="notranslate">$ tsc --emitDeclarationOnly && babel src --out-dir lib --extensions ".ts,.tsx"
{ SyntaxError: D:\Projects\local-network\src\core\network-controller.ts: Unexpected token, expected ";" (10:25)
8 | }
9 |
> 10 | export default interface NetworkController {
| ^
11 | readonly endpoint: string;
12 | readonly environment: NetworkControllerEnvironment;
13 | readonly handle: (event: NetworkListenerEvent) => void;
at _class.raise (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:3861:15)
at _class.unexpected (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:5190:16)
at _class.semicolon (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:5174:40)
at _class.parseExportDefaultExpression (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:8149:12
)
at _class.parseExportDefaultExpression (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:9801:65
)
at _class.parseExport (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:8102:31)
at _class.parseExport (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:9784:50)
at _class.parseStatementContent (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:7172:27)
at _class.parseStatementContent (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:9816:58)
at _class.parseStatement (D:\Projects\local-network\node_modules\@babel\parser\lib\index.js:7085:17)
pos: 200,
loc: Position { line: 10, column: 25 },
code: 'BABEL_PARSE_ERROR' }
</code></pre></div> | <p dir="auto">Choose one: is this a bug report or feature request?<br>
<strong>Bug report.</strong></p>
<h3 dir="auto">Input Code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default interface A {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">interface</span> <span class="pl-v">A</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto"><a href="http://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&code_lz=KYDwDg9gTgLgBAE2AMwIYFcA28CWA7GYKNAY2DgEE4BvAXyA&debug=false&circleciRepo=&evaluate=true&lineWrap=false&presets=es2015%2Ces2016%2Ces2017%2Creact%2Cstage-0%2Cstage-1%2Cstage-2%2Cstage-3%2Ces2015-loose%2Ctypescript&prettier=true&targets=Node-8&version=7.0.0-beta.36" rel="nofollow">Parse error in Babel repl</a><br>
<a href="https://www.typescriptlang.org/play/index.html#src=export%20default%20interface%20A%20%7B%7D" rel="nofollow">Works in TypeScript repl</a></p>
<h3 dir="auto">Babel/Babylon Configuration (.babelrc, package.json, cli command)</h3>
<p dir="auto">7.0.0-beta.35 repl with TypeScript transform enabled.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">The syntax was added in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="230828181" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/16040" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/TypeScript/pull/16040/hovercard" href="https://github.com/microsoft/TypeScript/pull/16040">microsoft/TypeScript#16040</a>, so Babel should accept it (and no code should be emitted since it's a type export).</p>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Babylon gives a parse error saying it's an unexpected token.</p>
<h3 dir="auto">Possible Solution</h3>
<p dir="auto">Probably something similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="283650526" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/7075" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/7075/hovercard" href="https://github.com/babel/babel/pull/7075">#7075</a> <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p>
<h3 dir="auto">Context</h3>
<p dir="auto">I have a TypeScript project that I'm trying to run through a custom fork of Babylon, and it's hitting an error on that syntax.</p>
<h3 dir="auto">Your Environment</h3>
<table role="table">
<thead>
<tr>
<th>software</th>
<th>version(s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babel</td>
<td>master</td>
</tr>
<tr>
<td>Babylon</td>
<td>master (from the last week or so)</td>
</tr>
<tr>
<td>node</td>
<td>9.2.0</td>
</tr>
<tr>
<td>npm</td>
<td>yarn 1.3.2</td>
</tr>
<tr>
<td>Operating System</td>
<td>macOS 10.13.2</td>
</tr>
</tbody>
</table> | 1 |
<p dir="auto">Let us know what functionality you'd like to see in Playwright and what is your use case.<br>
Do you think others might benefit from this as well?<br>
the selenium support it<br>
Actions actions= new Actions(driver);<br>
actions.moveToElement(webElement).clickAndHold().perform();</p> | <p dir="auto">Drag and drop should work with playwright. Using the existing mouse apis should generate working <code class="notranslate">dragstart</code>, <code class="notranslate">drag</code>, and <code class="notranslate">drop</code> events. There should also be new APIs to simulate dropping in external content, and to inspect content dragged from the web page.</p> | 1 |
<p dir="auto">Expected result: rendered text <code class="notranslate">There was an error</code><br>
Actual result: <code class="notranslate">Uncaught TypeError: Cannot read property 'unmountComponent' of undefined</code><br>
JSFiddle: <a href="http://jsfiddle.net/kb3gN/10167/" rel="nofollow">http://jsfiddle.net/kb3gN/10167/</a></p>
<p dir="auto">The code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var Parent = React.createClass({
getInitialState: function() {
return {error: false};
},
componentWillMount: function() {
var self = this;
// window.onerror is only used for brevity
window.onerror = function() {
if(self.isMounted()) {
self.setState({error: true});
}
};
},
render: function() {
if(this.state.error) {
return <div>There was an error</div>;
} else {
return <Child />;
}
}
});
var Child = React.createClass({
componentWillMount: function() {
throw new Error("test error");
},
render: function() {
return <div>Child</div>;
}
});
React.render(<Parent />, document.body);"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-v">Parent</span> <span class="pl-c1">=</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createClass</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-en">getInitialState</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">return</span> <span class="pl-kos">{</span><span class="pl-c1">error</span>: <span class="pl-c1">false</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">componentWillMount</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">self</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">;</span>
<span class="pl-c">// window.onerror is only used for brevity</span>
<span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-en">onerror</span> <span class="pl-c1">=</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">if</span><span class="pl-kos">(</span><span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-en">isMounted</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">self</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">error</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-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-en">render</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">if</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">error</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-c1"><</span><span class="pl-ent">div</span><span class="pl-c1">></span>There was an error<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-c1"><</span><span class="pl-ent">Child</span> <span class="pl-c1">/</span><span class="pl-c1">></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">var</span> <span class="pl-v">Child</span> <span class="pl-c1">=</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createClass</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-en">componentWillMount</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">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">"test error"</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">render</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">return</span> <span class="pl-c1"><</span><span class="pl-ent">div</span><span class="pl-c1">></span>Child<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></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-v">React</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-v">Parent</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">,</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | <p dir="auto">So I'm trying to put some graceful error handling in case 1 of my views crap out:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var MyGoodView = React.createClass({
render: function () {
return <p>Cool</p>;
}
});
var MyBadView = React.createClass({
render: function () {
throw new Error('crap');
}
});
try {
React.render(<MyBadView/>, document.body);
} catch (e) {
React.render(<MyGoodView/>, document.body);
}"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-v">MyGoodView</span> <span class="pl-c1">=</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createClass</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-en">render</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">return</span> <span class="pl-c1"><</span><span class="pl-ent">p</span><span class="pl-c1">></span>Cool<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">></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">var</span> <span class="pl-v">MyBadView</span> <span class="pl-c1">=</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createClass</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-en">render</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">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">'crap'</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">try</span> <span class="pl-kos">{</span>
<span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-v">MyBadView</span><span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">,</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">catch</span> <span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-v">MyGoodView</span><span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">,</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">However, <code class="notranslate">MyGoodView</code> does not get rendered w/ the following stack trace:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/fd284309818d836a1305ff759d73533cd3b2e9668c4a179d0e76c1b975190cc4/687474703a2f2f662e636c2e6c792f6974656d732f304733643373314734353270336731713054326a2f53637265656e25323053686f74253230323031342d31312d3034253230617425323031322e31312e3433253230414d2e706e67"><img src="https://camo.githubusercontent.com/fd284309818d836a1305ff759d73533cd3b2e9668c4a179d0e76c1b975190cc4/687474703a2f2f662e636c2e6c792f6974656d732f304733643373314734353270336731713054326a2f53637265656e25323053686f74253230323031342d31312d3034253230617425323031322e31312e3433253230414d2e706e67" alt="stack trace" data-canonical-src="http://f.cl.ly/items/0G3d3s1G452p3g1q0T2j/Screen%20Shot%202014-11-04%20at%2012.11.43%20AM.png" style="max-width: 100%;"></a></p>
<p dir="auto">Seems like error throw React in a bad state where <code class="notranslate">renderedComponent</code> is <code class="notranslate">undefined</code>, thus cannot be unmounted. How do I handle this scenario?</p> | 1 |
<p dir="auto">Allow functions that return aux information, similarly to grad or jvp.</p> | <p dir="auto">Repro case:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="!pip install -U -q jax jaxlib
import jax, jax.numpy as jnp, functools
@functools.partial(jax.custom_jvp, nondiff_argnums=(0, 2))
def sample(shape, param, seed):
return jax.random.gamma(key=seed, shape=shape, a=param)
@sample.defjvp
def sample_jvp(shape, seed, primals, tangents):
param, = primals
dparam, = tangents
dparam = jnp.broadcast_to(dparam, shape)
samples = sample(shape, param, seed)
return samples, samples * dparam # dummy jvp for proof of concept
jax.vmap(lambda seed: sample((2,3), 1., seed))(
jax.random.split(jax.random.PRNGKey(1), 10))"><pre class="notranslate">!p<span class="pl-s1">ip</span> <span class="pl-s1">install</span> <span class="pl-c1">-</span><span class="pl-v">U</span> <span class="pl-c1">-</span><span class="pl-s1">q</span> <span class="pl-s1">jax</span> <span class="pl-s1">jaxlib</span>
<span class="pl-k">import</span> <span class="pl-s1">jax</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">functools</span>
<span class="pl-en">@<span class="pl-s1">functools</span>.<span class="pl-en">partial</span>(<span class="pl-s1">jax</span>.<span class="pl-s1">custom_jvp</span>, <span class="pl-s1">nondiff_argnums</span><span class="pl-c1">=</span>(<span class="pl-c1">0</span>, <span class="pl-c1">2</span>))</span>
<span class="pl-k">def</span> <span class="pl-en">sample</span>(<span class="pl-s1">shape</span>, <span class="pl-s1">param</span>, <span class="pl-s1">seed</span>):
<span class="pl-k">return</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">gamma</span>(<span class="pl-s1">key</span><span class="pl-c1">=</span><span class="pl-s1">seed</span>, <span class="pl-s1">shape</span><span class="pl-c1">=</span><span class="pl-s1">shape</span>, <span class="pl-s1">a</span><span class="pl-c1">=</span><span class="pl-s1">param</span>)
<span class="pl-en">@<span class="pl-s1">sample</span>.<span class="pl-s1">defjvp</span></span>
<span class="pl-k">def</span> <span class="pl-en">sample_jvp</span>(<span class="pl-s1">shape</span>, <span class="pl-s1">seed</span>, <span class="pl-s1">primals</span>, <span class="pl-s1">tangents</span>):
<span class="pl-s1">param</span>, <span class="pl-c1">=</span> <span class="pl-s1">primals</span>
<span class="pl-s1">dparam</span>, <span class="pl-c1">=</span> <span class="pl-s1">tangents</span>
<span class="pl-s1">dparam</span> <span class="pl-c1">=</span> <span class="pl-s1">jnp</span>.<span class="pl-en">broadcast_to</span>(<span class="pl-s1">dparam</span>, <span class="pl-s1">shape</span>)
<span class="pl-s1">samples</span> <span class="pl-c1">=</span> <span class="pl-en">sample</span>(<span class="pl-s1">shape</span>, <span class="pl-s1">param</span>, <span class="pl-s1">seed</span>)
<span class="pl-k">return</span> <span class="pl-s1">samples</span>, <span class="pl-s1">samples</span> <span class="pl-c1">*</span> <span class="pl-s1">dparam</span> <span class="pl-c"># dummy jvp for proof of concept</span>
<span class="pl-s1">jax</span>.<span class="pl-en">vmap</span>(<span class="pl-k">lambda</span> <span class="pl-s1">seed</span>: <span class="pl-en">sample</span>((<span class="pl-c1">2</span>,<span class="pl-c1">3</span>), <span class="pl-c1">1.</span>, <span class="pl-s1">seed</span>))(
<span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">split</span>(<span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-v">PRNGKey</span>(<span class="pl-c1">1</span>), <span class="pl-c1">10</span>))</pre></div>
<p dir="auto">=></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/usr/local/lib/python3.6/dist-packages/jax/custom_derivatives.py in bind(self, fun, jvp, *args)
285 _, env_trace_todo = lu.merge_linear_aux(env_trace_todo1, env_trace_todo2)
286 if env_trace_todo:
--> 287 raise core.UnexpectedTracerError
288 return map(core.full_lower, outs)
289
UnexpectedTracerError: "><pre class="notranslate"><code class="notranslate">/usr/local/lib/python3.6/dist-packages/jax/custom_derivatives.py in bind(self, fun, jvp, *args)
285 _, env_trace_todo = lu.merge_linear_aux(env_trace_todo1, env_trace_todo2)
286 if env_trace_todo:
--> 287 raise core.UnexpectedTracerError
288 return map(core.full_lower, outs)
289
UnexpectedTracerError:
</code></pre></div> | 0 |
<p dir="auto">It would be great to have a numerical dodge option for boxplot that matches the behaviour of pointplot.<br>
This would allow boxplots over violin plots:<br>
<a href="https://discourse.matplotlib.org/t/boxplots-on-top-of-violinplots/22807" rel="nofollow">https://discourse.matplotlib.org/t/boxplots-on-top-of-violinplots/22807</a></p> | <p dir="auto">Hi,</p>
<p dir="auto">thanks for the seaborn library, it's a great tool!</p>
<p dir="auto">I'd like to suggest an aesthetic improvement: A configurable gap between boxes inside a group of boxes: <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/6ea6e59392a52550426c6a39b1d0379f7316b495c6bfdbf16a4d40c05313d832/68747470733a2f2f696d6167652e6962622e636f2f65714b3273792f736561626f726e5f626f78706c6f745f6761702e706e67"><img src="https://camo.githubusercontent.com/6ea6e59392a52550426c6a39b1d0379f7316b495c6bfdbf16a4d40c05313d832/68747470733a2f2f696d6167652e6962622e636f2f65714b3273792f736561626f726e5f626f78706c6f745f6761702e706e67" alt="Boxplot with Gap" data-canonical-src="https://image.ibb.co/eqK2sy/seaborn_boxplot_gap.png" style="max-width: 100%;"></a></p>
<p dir="auto">Since I'm currently writing my thesis, I'm a bit short on time, all I've got for now is a patch. If you consider this feature worthwhile, I'd create a proper pull request, of course.</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Index: categorical.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- categorical.py (date 1528960332000)
+++ categorical.py (date 1528960332000)
@@ -366,6 +366,7 @@
n_levels = len(self.hue_names)
if self.dodge:
- each_width = self.width / n_levels
+ each_width = (self.width - (self.gap * (n_levels - 1))) / n_levels
offsets = np.linspace(0, self.width - each_width, n_levels)
offsets -= offsets.mean()
else:
@@ -436,13 +437,14 @@
def __init__(self, x, y, hue, data, order, hue_order,
orient, color, palette, saturation,
- width, dodge, fliersize, linewidth):
+ width, gap, dodge, fliersize, linewidth):
self.establish_variables(x, y, hue, data, orient, order, hue_order)
self.establish_colors(color, palette, saturation)
self.dodge = dodge
self.width = width
+ self.gap = gap
self.fliersize = fliersize
if linewidth is None:
@@ -2203,12 +2205,12 @@
def boxplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None,
orient=None, color=None, palette=None, saturation=.75,
- width=.8, dodge=True, fliersize=5, linewidth=None,
+ width=.8, gap=0.1, dodge=True, fliersize=5, linewidth=None,
whis=1.5, notch=False, ax=None, **kwargs):
plotter = _BoxPlotter(x, y, hue, data, order, hue_order,
orient, color, palette, saturation,
- width, dodge, fliersize, linewidth)
+ width, gap, dodge, fliersize, linewidth)
if ax is None:
ax = plt.gca()"><pre class="notranslate">Index: categorical.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
<span class="pl-ms">===================================================================</span>
<span class="pl-md">--- categorical.py (date 1528960332000)</span>
<span class="pl-mi1">+++ categorical.py (date 1528960332000)</span>
<span class="pl-mdr">@@ -366,6 +366,7 @@</span>
n_levels = len(self.hue_names)
if self.dodge:
<span class="pl-md"><span class="pl-md">-</span> each_width = self.width / n_levels</span>
<span class="pl-mi1"><span class="pl-mi1">+</span> each_width = (self.width - (self.gap * (n_levels - 1))) / n_levels</span>
offsets = np.linspace(0, self.width - each_width, n_levels)
offsets -= offsets.mean()
else:
<span class="pl-mdr">@@ -436,13 +437,14 @@</span>
def __init__(self, x, y, hue, data, order, hue_order,
orient, color, palette, saturation,
<span class="pl-md"><span class="pl-md">-</span> width, dodge, fliersize, linewidth):</span>
<span class="pl-mi1"><span class="pl-mi1">+</span> width, gap, dodge, fliersize, linewidth):</span>
self.establish_variables(x, y, hue, data, orient, order, hue_order)
self.establish_colors(color, palette, saturation)
self.dodge = dodge
self.width = width
<span class="pl-mi1"><span class="pl-mi1">+</span> self.gap = gap</span>
self.fliersize = fliersize
if linewidth is None:
<span class="pl-mdr">@@ -2203,12 +2205,12 @@</span>
def boxplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None,
orient=None, color=None, palette=None, saturation=.75,
<span class="pl-md"><span class="pl-md">-</span> width=.8, dodge=True, fliersize=5, linewidth=None,</span>
<span class="pl-mi1"><span class="pl-mi1">+</span> width=.8, gap=0.1, dodge=True, fliersize=5, linewidth=None,</span>
whis=1.5, notch=False, ax=None, **kwargs):
plotter = _BoxPlotter(x, y, hue, data, order, hue_order,
orient, color, palette, saturation,
<span class="pl-md"><span class="pl-md">-</span> width, dodge, fliersize, linewidth)</span>
<span class="pl-mi1"><span class="pl-mi1">+</span> width, gap, dodge, fliersize, linewidth)</span>
if ax is None:
ax = plt.gca()</pre></div>
<p dir="auto">Please let me know what you think.</p>
<p dir="auto">Cheers,<br>
Peter</p> | 1 |
<p dir="auto">Downloaded bootstrap and had to recompile it to use the grid system we are using for the site. Only changed variables.less. Once I recompiled, placeholder text on all inputs no longer works. Did some testing and found it was due to the "-webkit-transform-style: preserve-3d;" property on inputs and selects. Looked in the forms.less and the pre-compiled bootstrap.css files and didn't see the rule.</p>
<p dir="auto">Honestly, I'm not sure if this is a problem with the compilers I'm using (Less.app and SimpLESS.app on Mac OS X) but considering they should be using the same compiler, not sure why this property is appearing in my compiled versions but not the pre-compiled version (<a href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css</a>). Any ideas? Removing that line fixes placeholder text but I'd rather not have to touch the file beyond editing variables.less.</p> | <h2 dir="auto">Do not comment here.</h2>
<p dir="auto">This is a tracking issue for the next release, v3.1.0. Only linked issues, pull requests, and commits should be included. See the <a href="/twbs/bootstrap/blob/master/CONTRIBUTING.md">contributing guidelines</a> for more information. All notable changes have been mentioned here. See the <a href="/twbs/bootstrap/issues?milestone=21&state=closed">v3.1.0 milestone</a> for a complete set of changes.</p>
<p dir="auto">X-Ref: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17970666" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/9397" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/9397/hovercard" href="https://github.com/twbs/bootstrap/issues/9397">#9397</a>.</p> | 0 |
<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">Model I am using (Bert, XLNet....): Bert</p>
<p dir="auto">Language I am using the model on (English, Chinese....): English</p>
<p dir="auto">The problem arise when using:</p>
<ul dir="auto">
<li>the official example scripts: modeling_bert.py</li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul dir="auto">
<li>my own task or dataset: fine-tuning Bert with added new tokens to vocabulary</li>
</ul>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<p dir="auto">Running "run_lm_finetuning.py" with added tokens to vocabulary.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="new_vocab_list = ['token_1', 'token_2', 'token_3']
tokenizer.add_tokens(new_vocab_list)
logger.info("vocabulary size after adding: " + str(len(tokenizer)))
model.resize_token_embeddings(len(tokenizer))
logger.info("size of model.cls.predictions.bias: " + str(len(model.cls.predictions.bias)))"><pre class="notranslate"><code class="notranslate">new_vocab_list = ['token_1', 'token_2', 'token_3']
tokenizer.add_tokens(new_vocab_list)
logger.info("vocabulary size after adding: " + str(len(tokenizer)))
model.resize_token_embeddings(len(tokenizer))
logger.info("size of model.cls.predictions.bias: " + str(len(model.cls.predictions.bias)))
</code></pre></div>
<h2 dir="auto">Expected behavior</h2>
<ul dir="auto">
<li>The result should be:<br>
vocabulary size after adding: 31119<br>
size of model.cls.predictions.bias: 31119</li>
<li>But actually the result is:<br>
vocabulary size after adding: 31119<br>
size of model.cls.predictions.bias: 31116</li>
</ul>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>OS: Ubuntu</li>
<li>Python version: 3.6</li>
<li>PyTorch version: 1.3.1</li>
<li>PyTorch Transformers version (or branch): 2.2.1</li>
<li>Using GPU: yes</li>
<li>Distributed or parallel setup: no</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">I have found the problem to be: for BERT model, the class "BertLMPredictionHead" has two separate attributes "decoder" and "bias". When adding new tokens, the code "model.resize_token_embeddings(len(tokenizer))" only updates the size of "decoder" and its bias if it has (this bias is different from the "BertLMPredictionHead.bias"). The attribute "BertLMPredictionHead.bias" is not updated and therefore, causes the error.</p>
<p dir="auto">I have added the updating-bias code in my "modeling_bert.py". And if you want, I can merge my branch to your code. However, if I misunderstand something, please notice me too.</p>
<p dir="auto">Thank you very much for your code base.</p> | <h2 dir="auto">🐛 Bug</h2>
<p dir="auto">Model I am using : <strong>BertForMaskedLM</strong></p>
<p dir="auto">Language I am using the model on (English, Chinese....): <strong>multilingual</strong></p>
<p dir="auto">The problem arise when using:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> the official example scripts: <strong>BertForMaskedLM</strong></li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> my own task or dataset: <strong>Finetuning with newly added tokens</strong>.</li>
</ul>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Get model
model = BertForMaskedLM.from_pretrained("bert-base-multilingual-cased")
# define input
input = torch.tensor([[1,2,3,4,5]])
# before experiment
print(f"BERT num embeddings before\t: {model.bert.embeddings.word_embeddings.num_embeddings}")
print(f"LM Decoder num embedding before\t: {model.cls.predictions.decoder.out_features}")
print(f"MLM Loss\t\t\t: {model(input_ids=input, masked_lm_labels=input)[0]}")
# change embedding size for experiment
model.resize_token_embeddings(119547 + 5)
print(f"\nBERT num embeddings after\t: {model.bert.embeddings.word_embeddings.num_embeddings}")
print(f"LM Decoder num embedding after\t: {model.cls.predictions.decoder.out_features}")
# print failuire
try:
print(f"MLM Loss\t\t\t: {model(input_ids=input, masked_lm_labels=input)[0]}")
except RuntimeError:
print(" ---- Forward Pass failed ---- ")"><pre class="notranslate"><span class="pl-c"># Get model</span>
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">BertForMaskedLM</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s">"bert-base-multilingual-cased"</span>)
<span class="pl-c"># define input</span>
<span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</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">5</span>]])
<span class="pl-c"># before experiment</span>
<span class="pl-en">print</span>(<span class="pl-s">f"BERT num embeddings before<span class="pl-cce">\t</span>: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">model</span>.<span class="pl-s1">bert</span>.<span class="pl-s1">embeddings</span>.<span class="pl-s1">word_embeddings</span>.<span class="pl-s1">num_embeddings</span><span class="pl-kos">}</span></span>"</span>)
<span class="pl-en">print</span>(<span class="pl-s">f"LM Decoder num embedding before<span class="pl-cce">\t</span>: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">model</span>.<span class="pl-s1">cls</span>.<span class="pl-s1">predictions</span>.<span class="pl-s1">decoder</span>.<span class="pl-s1">out_features</span><span class="pl-kos">}</span></span>"</span>)
<span class="pl-en">print</span>(<span class="pl-s">f"MLM Loss<span class="pl-cce">\t</span><span class="pl-cce">\t</span><span class="pl-cce">\t</span>: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-en">model</span>(<span class="pl-s1">input_ids</span><span class="pl-c1">=</span><span class="pl-s1">input</span>, <span class="pl-s1">masked_lm_labels</span><span class="pl-c1">=</span><span class="pl-s1">input</span>)[<span class="pl-c1">0</span>]<span class="pl-kos">}</span></span>"</span>)
<span class="pl-c"># change embedding size for experiment</span>
<span class="pl-s1">model</span>.<span class="pl-en">resize_token_embeddings</span>(<span class="pl-c1">119547</span> <span class="pl-c1">+</span> <span class="pl-c1">5</span>)
<span class="pl-en">print</span>(<span class="pl-s">f"<span class="pl-cce">\n</span>BERT num embeddings after<span class="pl-cce">\t</span>: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">model</span>.<span class="pl-s1">bert</span>.<span class="pl-s1">embeddings</span>.<span class="pl-s1">word_embeddings</span>.<span class="pl-s1">num_embeddings</span><span class="pl-kos">}</span></span>"</span>)
<span class="pl-en">print</span>(<span class="pl-s">f"LM Decoder num embedding after<span class="pl-cce">\t</span>: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">model</span>.<span class="pl-s1">cls</span>.<span class="pl-s1">predictions</span>.<span class="pl-s1">decoder</span>.<span class="pl-s1">out_features</span><span class="pl-kos">}</span></span>"</span>)
<span class="pl-c"># print failuire</span>
<span class="pl-k">try</span>:
<span class="pl-en">print</span>(<span class="pl-s">f"MLM Loss<span class="pl-cce">\t</span><span class="pl-cce">\t</span><span class="pl-cce">\t</span>: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-en">model</span>(<span class="pl-s1">input_ids</span><span class="pl-c1">=</span><span class="pl-s1">input</span>, <span class="pl-s1">masked_lm_labels</span><span class="pl-c1">=</span><span class="pl-s1">input</span>)[<span class="pl-c1">0</span>]<span class="pl-kos">}</span></span>"</span>)
<span class="pl-k">except</span> <span class="pl-v">RuntimeError</span>:
<span class="pl-en">print</span>(<span class="pl-s">" ---- Forward Pass failed ---- "</span>)</pre></div>
<p dir="auto">This is the output that I see</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="BERT num embeddings before : 119547
LM Decoder num embedding before : 119547
MLM Loss : 18.269268035888672
BERT num embeddings after : 119552
LM Decoder num embedding after : 119547
---- Forward Pass failed ---- "><pre class="notranslate"><code class="notranslate">BERT num embeddings before : 119547
LM Decoder num embedding before : 119547
MLM Loss : 18.269268035888672
BERT num embeddings after : 119552
LM Decoder num embedding after : 119547
---- Forward Pass failed ----
</code></pre></div>
<p dir="auto">If you see the LM decoder did not change the embedding size, hence won't ever predict the new tokens.</p>
<p dir="auto">The expectation would be that <code class="notranslate">resize_token_embeddings</code> handles the FC inside LM decoder.</p>
<p dir="auto">I tried also using BertConfig</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="config = BertConfig.from_pretrained("bert-base-multilingual-cased")
config.vocab_size = 119547 + 5
model = BertForMaskedLM.from_pretrained("bert-base-multilingual-cased", config=config)"><pre class="notranslate"><span class="pl-s1">config</span> <span class="pl-c1">=</span> <span class="pl-v">BertConfig</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s">"bert-base-multilingual-cased"</span>)
<span class="pl-s1">config</span>.<span class="pl-s1">vocab_size</span> <span class="pl-c1">=</span> <span class="pl-c1">119547</span> <span class="pl-c1">+</span> <span class="pl-c1">5</span>
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">BertForMaskedLM</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s">"bert-base-multilingual-cased"</span>, <span class="pl-s1">config</span><span class="pl-c1">=</span><span class="pl-s1">config</span>)</pre></div>
<p dir="auto">Which naturally results in error while loading <code class="notranslate">state_dict</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RuntimeError: Error(s) in loading state_dict for BertForMaskedLM:
size mismatch for bert.embeddings.word_embeddings.weight: copying a param with shape torch.Size([119547, 768]) from checkpoint, the shape in current model is torch.Size([119554, 768]).
size mismatch for cls.predictions.bias: copying a param with shape torch.Size([119547]) from checkpoint, the shape in current model is torch.Size([119554]).
size mismatch for cls.predictions.decoder.weight: copying a param with shape torch.Size([119547, 768]) from checkpoint, the shape in current model is torch.Size([119554, 768])."><pre class="notranslate"><code class="notranslate">RuntimeError: Error(s) in loading state_dict for BertForMaskedLM:
size mismatch for bert.embeddings.word_embeddings.weight: copying a param with shape torch.Size([119547, 768]) from checkpoint, the shape in current model is torch.Size([119554, 768]).
size mismatch for cls.predictions.bias: copying a param with shape torch.Size([119547]) from checkpoint, the shape in current model is torch.Size([119554]).
size mismatch for cls.predictions.decoder.weight: copying a param with shape torch.Size([119547, 768]) from checkpoint, the shape in current model is torch.Size([119554, 768]).
</code></pre></div> | 1 |
<p dir="auto">ICE when accessing a non-existent enum variant through a reference.</p>
<p dir="auto">Test case 1 (<code class="notranslate">Bar</code> is a struct, not even an enum):</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn foo<T>(t: &T) {}
struct Bar;
fn main() {
foo(&Bar::Baz);
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">foo</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-s1">t</span><span class="pl-kos">:</span> <span class="pl-c1">&</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-k">struct</span> <span class="pl-smi">Bar</span><span class="pl-kos">;</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-en">foo</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">Bar</span><span class="pl-kos">::</span><span class="pl-v">Baz</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Test case 2 (Bar::Baz is a non-existent enum variant):</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn foo<T>(t: &T) {}
enum Bar {
NotBaz
}
fn main() {
foo(&Bar::Baz);
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">foo</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-s1">t</span><span class="pl-kos">:</span> <span class="pl-c1">&</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-k">enum</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span>
<span class="pl-v">NotBaz</span>
<span class="pl-kos">}</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-en">foo</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">Bar</span><span class="pl-kos">::</span><span class="pl-v">Baz</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">ICE backtrace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: unexpected panic
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 'path not fully resolved: PathResolution { base_def: DefTy(DefId { krate: 0, node: 12 }, false), last_private: LastMod(AllPublic), depth: 1 }', C:/bot/slave/nightly-dist-rustc-win-64/build/src/librustc\middle\def.rs:81
stack backtrace:
1: 0x711b8f12 - sys::backtrace::write::hdb51798d383e2c695rs
2: 0x711c2376 - rt::unwind::register::hef1903092323c9734Yv
3: 0x71185220 - rt::unwind::begin_unwind_inner::h2fa0652062c22375eWv
4: 0x71185c27 - rt::unwind::begin_unwind_fmt::h13657eb4ac5da50ekVv
5: 0xee0c56 - middle::ty::resolve_expr::h51d7abf3a2732b230v6
6: 0x1026a06 - middle::ty::expr_kind::he8d8b524640e8d6b6x6
7: 0x10267f9 - middle::ty::expr_is_lval::h9fe5b61c1e6534c03w6
8: 0x163fff5 - check::UnresolvedTypeAction...std..clone..Clone::clone::hf4c3a245578662abVEp
9: 0x161ae79 - check::callee::CallResolution<'tcx>.DeferredCallResolution<'tcx>::resolve::he161ac943e0493a8hcm
10: 0x161884a - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h240f52ba63e8d53aBNo
11: 0x16173ef - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h240f52ba63e8d53aBNo
12: 0x166c818 - check::UnresolvedTypeAction...std..clone..Clone::clone::hf4c3a245578662abVEp
13: 0x162f1e1 - check::GatherLocalsVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h575c0a1a31f9fe703Rn
14: 0x161525a - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h240f52ba63e8d53aBNo
15: 0x162abac - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h93ccea520f14b38cXEn
16: 0x1628d8f - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h93ccea520f14b38cXEn
17: 0x16dec1b - check_crate::hc2ca7a846886762c5CC
18: 0x16d7c29 - check_crate::hc2ca7a846886762c5CC
19: 0x652e24a2 - driver::phase_3_run_analysis_passes::h6baa270e309301b6tGa
20: 0x652c2b40 - driver::compile_input::h26af5f3f80d0ca83Qba
21: 0x65378e23 - run_compiler::h08ad06f8fc43c8db65b
22: 0x653769af - run::h3d20f7e70be2f675M5b
23: 0x65375f69 - run::h3d20f7e70be2f675M5b
24: 0x711f727c - rust_try
25: 0x711f7259 - rust_try
26: 0x653761e5 - run::h3d20f7e70be2f675M5b
27: 0x711c0624 - sys::process2::Command::cwd::h53354db0f20fd45brGu
28: 0x775a59cd - BaseThreadInitThunk
Could not compile `rust-test`.
To learn more, run the command again with --verbose."><pre class="notranslate"><code class="notranslate">error: internal compiler error: unexpected panic
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 'path not fully resolved: PathResolution { base_def: DefTy(DefId { krate: 0, node: 12 }, false), last_private: LastMod(AllPublic), depth: 1 }', C:/bot/slave/nightly-dist-rustc-win-64/build/src/librustc\middle\def.rs:81
stack backtrace:
1: 0x711b8f12 - sys::backtrace::write::hdb51798d383e2c695rs
2: 0x711c2376 - rt::unwind::register::hef1903092323c9734Yv
3: 0x71185220 - rt::unwind::begin_unwind_inner::h2fa0652062c22375eWv
4: 0x71185c27 - rt::unwind::begin_unwind_fmt::h13657eb4ac5da50ekVv
5: 0xee0c56 - middle::ty::resolve_expr::h51d7abf3a2732b230v6
6: 0x1026a06 - middle::ty::expr_kind::he8d8b524640e8d6b6x6
7: 0x10267f9 - middle::ty::expr_is_lval::h9fe5b61c1e6534c03w6
8: 0x163fff5 - check::UnresolvedTypeAction...std..clone..Clone::clone::hf4c3a245578662abVEp
9: 0x161ae79 - check::callee::CallResolution<'tcx>.DeferredCallResolution<'tcx>::resolve::he161ac943e0493a8hcm
10: 0x161884a - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h240f52ba63e8d53aBNo
11: 0x16173ef - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h240f52ba63e8d53aBNo
12: 0x166c818 - check::UnresolvedTypeAction...std..clone..Clone::clone::hf4c3a245578662abVEp
13: 0x162f1e1 - check::GatherLocalsVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h575c0a1a31f9fe703Rn
14: 0x161525a - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h240f52ba63e8d53aBNo
15: 0x162abac - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h93ccea520f14b38cXEn
16: 0x1628d8f - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h93ccea520f14b38cXEn
17: 0x16dec1b - check_crate::hc2ca7a846886762c5CC
18: 0x16d7c29 - check_crate::hc2ca7a846886762c5CC
19: 0x652e24a2 - driver::phase_3_run_analysis_passes::h6baa270e309301b6tGa
20: 0x652c2b40 - driver::compile_input::h26af5f3f80d0ca83Qba
21: 0x65378e23 - run_compiler::h08ad06f8fc43c8db65b
22: 0x653769af - run::h3d20f7e70be2f675M5b
23: 0x65375f69 - run::h3d20f7e70be2f675M5b
24: 0x711f727c - rust_try
25: 0x711f7259 - rust_try
26: 0x653761e5 - run::h3d20f7e70be2f675M5b
27: 0x711c0624 - sys::process2::Command::cwd::h53354db0f20fd45brGu
28: 0x775a59cd - BaseThreadInitThunk
Could not compile `rust-test`.
To learn more, run the command again with --verbose.
</code></pre></div>
<h2 dir="auto">Meta</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 1.1.0-nightly (7bd71637c 2015-05-06) (built 2015-05-06)
binary: rustc
commit-hash: 7bd71637ca40910dbd310813a19abf76db84f8f6
commit-date: 2015-05-06
build-date: 2015-05-06
host: x86_64-pc-windows-gnu
release: 1.1.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 1.1.0-nightly (7bd71637c 2015-05-06) (built 2015-05-06)
binary: rustc
commit-hash: 7bd71637ca40910dbd310813a19abf76db84f8f6
commit-date: 2015-05-06
build-date: 2015-05-06
host: x86_64-pc-windows-gnu
release: 1.1.0-nightly
</code></pre></div> | <p dir="auto">The compiler seems to raise a ICE whenever an enum literal reference that's passed directly as a function parameter is missing or misspelled:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
fn use_token(token: &Token) { unimplemented!() }
fn main() {
// Token::LeftParens is misspelled, should be Token::LeftParen.
use_token(&Token::LeftParens);
}"><pre class="notranslate"><span class="pl-k">enum</span> <span class="pl-smi">Token</span> <span class="pl-kos">{</span> <span class="pl-v">LeftParen</span><span class="pl-kos">,</span> <span class="pl-v">RightParen</span><span class="pl-kos">,</span> <span class="pl-v">Plus</span><span class="pl-kos">,</span> <span class="pl-v">Minus</span><span class="pl-kos">,</span> <span class="pl-c">/* etc */</span> <span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">use_token</span><span class="pl-kos">(</span><span class="pl-s1">token</span><span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-smi">Token</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">unimplemented</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</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-c">// Token::LeftParens is misspelled, should be Token::LeftParen.</span>
<span class="pl-en">use_token</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">Token</span><span class="pl-kos">::</span><span class="pl-v">LeftParens</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'rustc' panicked at 'path not fully resolved: PathResolution { base_def: DefTy(DefId { krate: 0, node: 4 }, true), last_private: LastMod(AllPublic), depth: 1 }', C:/bot/slave/nightly-dist-rustc-win-64/build/src/librustc\middle\def.rs:79
stack backtrace:
1: 0x71217094 - sys::backtrace::write::h702ba69fda76a133UVA
2: 0x71231708 - rt::unwind::register::h2807fa6be024d773ZpJ
3: 0x71183427 - rt::unwind::begin_unwind_inner::h33dce4042bd21f85onJ
4: 0x71183beb - rt::unwind::begin_unwind_fmt::hae30e0776fdf0958ZlJ
5: 0xf5ba4a - middle::ty::resolve_expr::h3413f822b132c794uV6
6: 0x108d876 - middle::ty::expr_kind::h7a4229e8cf2923d94W6
7: 0x108d589 - middle::ty::expr_is_lval::hee14165bdb90e648xW6
8: 0x1685988 - check::UnresolvedTypeAction...std..fmt..Debug::fmt::h6fea2f9b6c32405bN8o
9: 0x1663989 - check::callee::CallResolution<'tcx>.DeferredCallResolution<'tcx>::resolve::h620708a97b262156Qlm
10: 0x1660e5b - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h3d9369be1c793797zjo
11: 0x165fad8 - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h3d9369be1c793797zjo
12: 0x16af2f8 - check::UnresolvedTypeAction...std..fmt..Debug::fmt::h6fea2f9b6c32405bN8o
13: 0x16751e1 - check::GatherLocalsVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hccf69f0ad25ab806Xln
14: 0x165d854 - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h3d9369be1c793797zjo
15: 0x1672a8c - check::CheckItemTypesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_ty::hb08a5401782be257man
16: 0x166b304 - check::CheckItemTypesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hbc63086752858e7d09m
17: 0x17280d4 - check_crate::h490a1c107c2f6f04hfC
18: 0x1723821 - check_crate::h490a1c107c2f6f04hfC
19: 0x652deb3b - driver::phase_3_run_analysis_passes::h95f5e5d96e327896mGa
20: 0x652c2669 - driver::compile_input::h5f994866bdbf7f9fNba
21: 0x6538530d - run_compiler::h716ee0dff1e124acG6b
22: 0x65383253 - run::h15ad65cc2cf082cdm6b
23: 0x65381e1e - run::h15ad65cc2cf082cdm6b
24: 0x7125f58c - rust_try
25: 0x7125f569 - rust_try
26: 0x65382597 - run::h15ad65cc2cf082cdm6b
27: 0x71221c32 - sys::tcp::TcpListener::bind::h29247aa3f005ffa1WSE
28: 0x7ffd672316ad - BaseThreadInitThunk"><pre class="notranslate"><code class="notranslate">thread 'rustc' panicked at 'path not fully resolved: PathResolution { base_def: DefTy(DefId { krate: 0, node: 4 }, true), last_private: LastMod(AllPublic), depth: 1 }', C:/bot/slave/nightly-dist-rustc-win-64/build/src/librustc\middle\def.rs:79
stack backtrace:
1: 0x71217094 - sys::backtrace::write::h702ba69fda76a133UVA
2: 0x71231708 - rt::unwind::register::h2807fa6be024d773ZpJ
3: 0x71183427 - rt::unwind::begin_unwind_inner::h33dce4042bd21f85onJ
4: 0x71183beb - rt::unwind::begin_unwind_fmt::hae30e0776fdf0958ZlJ
5: 0xf5ba4a - middle::ty::resolve_expr::h3413f822b132c794uV6
6: 0x108d876 - middle::ty::expr_kind::h7a4229e8cf2923d94W6
7: 0x108d589 - middle::ty::expr_is_lval::hee14165bdb90e648xW6
8: 0x1685988 - check::UnresolvedTypeAction...std..fmt..Debug::fmt::h6fea2f9b6c32405bN8o
9: 0x1663989 - check::callee::CallResolution<'tcx>.DeferredCallResolution<'tcx>::resolve::h620708a97b262156Qlm
10: 0x1660e5b - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h3d9369be1c793797zjo
11: 0x165fad8 - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h3d9369be1c793797zjo
12: 0x16af2f8 - check::UnresolvedTypeAction...std..fmt..Debug::fmt::h6fea2f9b6c32405bN8o
13: 0x16751e1 - check::GatherLocalsVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hccf69f0ad25ab806Xln
14: 0x165d854 - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h3d9369be1c793797zjo
15: 0x1672a8c - check::CheckItemTypesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_ty::hb08a5401782be257man
16: 0x166b304 - check::CheckItemTypesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hbc63086752858e7d09m
17: 0x17280d4 - check_crate::h490a1c107c2f6f04hfC
18: 0x1723821 - check_crate::h490a1c107c2f6f04hfC
19: 0x652deb3b - driver::phase_3_run_analysis_passes::h95f5e5d96e327896mGa
20: 0x652c2669 - driver::compile_input::h5f994866bdbf7f9fNba
21: 0x6538530d - run_compiler::h716ee0dff1e124acG6b
22: 0x65383253 - run::h15ad65cc2cf082cdm6b
23: 0x65381e1e - run::h15ad65cc2cf082cdm6b
24: 0x7125f58c - rust_try
25: 0x7125f569 - rust_try
26: 0x65382597 - run::h15ad65cc2cf082cdm6b
27: 0x71221c32 - sys::tcp::TcpListener::bind::h29247aa3f005ffa1WSE
28: 0x7ffd672316ad - BaseThreadInitThunk
</code></pre></div>
<p dir="auto">Version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 1.0.0-nightly (270a677d4 2015-03-07) (built 2015-03-07)
binary: rustc
commit-hash: 270a677d4d698916f5ad103f0afc3c070b8dbeb4
commit-date: 2015-03-07
build-date: 2015-03-07
host: x86_64-pc-windows-gnu
release: 1.0.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 1.0.0-nightly (270a677d4 2015-03-07) (built 2015-03-07)
binary: rustc
commit-hash: 270a677d4d698916f5ad103f0afc3c070b8dbeb4
commit-date: 2015-03-07
build-date: 2015-03-07
host: x86_64-pc-windows-gnu
release: 1.0.0-nightly
</code></pre></div>
<hr>
<p dir="auto">The compiler seems to only panic when the enum is misspelled or missing, and passed directly as a function argument. The following (erroneous) code will not cause any compiler panics:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
fn use_token(token: &Token) { unimplemented!() }
fn main() {
// yields the error: type `Token` does not implement any method in scope named `LeftParens`
// The compiler error is correct behavior.
let token = &Token::LeftParens;
use_token(token);
}"><pre class="notranslate"><span class="pl-k">enum</span> <span class="pl-smi">Token</span> <span class="pl-kos">{</span> <span class="pl-v">LeftParen</span><span class="pl-kos">,</span> <span class="pl-v">RightParen</span><span class="pl-kos">,</span> <span class="pl-v">Plus</span><span class="pl-kos">,</span> <span class="pl-v">Minus</span><span class="pl-kos">,</span> <span class="pl-c">/* etc */</span> <span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">use_token</span><span class="pl-kos">(</span><span class="pl-s1">token</span><span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-smi">Token</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">unimplemented</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</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-c">// yields the error: type `Token` does not implement any method in scope named `LeftParens`</span>
<span class="pl-c">// The compiler error is correct behavior.</span>
<span class="pl-k">let</span> token = <span class="pl-c1">&</span><span class="pl-smi">Token</span><span class="pl-kos">::</span><span class="pl-v">LeftParens</span><span class="pl-kos">;</span>
<span class="pl-en">use_token</span><span class="pl-kos">(</span>token<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
fn use_token(token: &Token) { unimplemented!() }
fn main() {
// spelled correctly; compiles successfully
use_token(&Token::LeftParen);
}"><pre class="notranslate"><span class="pl-k">enum</span> <span class="pl-smi">Token</span> <span class="pl-kos">{</span> <span class="pl-v">LeftParen</span><span class="pl-kos">,</span> <span class="pl-v">RightParen</span><span class="pl-kos">,</span> <span class="pl-v">Plus</span><span class="pl-kos">,</span> <span class="pl-v">Minus</span><span class="pl-kos">,</span> <span class="pl-c">/* etc */</span> <span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">use_token</span><span class="pl-kos">(</span><span class="pl-s1">token</span><span class="pl-kos">:</span> <span class="pl-c1">&</span><span class="pl-smi">Token</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">unimplemented</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</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-c">// spelled correctly; compiles successfully</span>
<span class="pl-en">use_token</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">Token</span><span class="pl-kos">::</span><span class="pl-v">LeftParen</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div> | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.