text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<p dir="auto">For whatever reason, the latest canary with babel 7 isn't working well with styled jsx plugins via custom babelrc.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Expected to build the page and display in dev environment, instead spits error each build.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Instead of building page, the following error is displayed.</p> <p dir="auto">Module build failed: Error: Nesting detected at 11:9. Unfortunately nesting is not supported by styled-jsx.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Download and install with-styled-jsx-plugins example from next repo.</li> <li>yarn add next@6.0.0-canary.3 react@16.3.2 react-dom@16.3.2</li> <li>yarn dev</li> <li>goto localhost:3000</li> </ol> <p dir="auto">I can verify that the babel preset next/babel isn't receiving any custom options, so when the preset looks for the options, they aren't found.</p> <p dir="auto"><a href="https://github.com/zeit/next.js/blob/canary/server/build/babel/preset.js#L55">https://github.com/zeit/next.js/blob/canary/server/build/babel/preset.js#L55</a></p> <h2 dir="auto">Context</h2> <p dir="auto">Impossible to build pages currently.</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>6.0.0-canary.3</td> </tr> <tr> <td>node</td> <td>9.3.0</td> </tr> <tr> <td>OS</td> <td>High Sierra</td> </tr> <tr> <td>browser</td> <td>Chrome</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
<p dir="auto">Hi,</p> <p dir="auto">is it possible to define and use multiple custom Documents in next.js? Should I operate with subfolders?</p> <ul dir="auto"> <li>[ x] 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 would like to define and import more than one custom document (<a href="https://github.com/zeit/next.js/#custom-document">https://github.com/zeit/next.js/#custom-document</a>).</p> <p dir="auto">Should I operate with subfolders?</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">I can't define more than one custom document definition.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">I just run the code you can find here <a href="https://github.com/zeit/next.js/#custom-document">https://github.com/zeit/next.js/#custom-document</a></p> <h2 dir="auto">Context</h2> <p dir="auto">I'd like to set the lang attribute in HTML tag in a multi-language website.</p> <h2 dir="auto">Your Environment</h2> <p dir="auto">| Tech | Version |<br> | next | 4.1.3 |<br> | node | 8.8.1 |<br> | OS | Ubuntu 16.04.2 LTS |<br> | browser | Google Chrome 64 bit v58.0.3029.110 |</p> <p dir="auto">Thanks,<br> Luca</p>
0
<p dir="auto">kubernetes-pull-build-test-e2e-gce/33760 for PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143373531" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/23454" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/23454/hovercard" href="https://github.com/kubernetes/kubernetes/pull/23454">#23454</a></p> <p dir="auto">This might a duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="139104616" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/22671" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/22671/hovercard" href="https://github.com/kubernetes/kubernetes/issues/22671">#22671</a>, but the failure wasn't entirely the same.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Stacktrace /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:227 Expected error: &lt;*errors.errorString | 0xc20851ad50&gt;: { s: &quot;Error running &amp;{/var/lib/jenkins/workspace/kubernetes-pull-build-test-e2e-gce@2/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://146.148.99.243 --kubeconfig=/var/lib/jenkins/workspace/kubernetes-pull-build-test-e2e-gce@2/.kube/config exec --namespace=e2e-tests-kubectl-4sutt -i nginx bash] [] 0xc20846b088 hi\n [] &lt;nil&gt; 0xc208925b20 exit status 2 &lt;nil&gt; true [0xc20846b088 0xc20846b0d0 0xc20846b0f0] [0xc20846b0d0 0xc20846b0f0] [0xc20846b0c8 0xc20846b0e8] [0x972bb0 0x972bb0] 0xc208920d20}:\nCommand stdout:\nhi\n\nstderr:\n\nerror:\nexit status 2\n&quot;, } Error running &amp;{/var/lib/jenkins/workspace/kubernetes-pull-build-test-e2e-gce@2/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://146.148.99.243 --kubeconfig=/var/lib/jenkins/workspace/kubernetes-pull-build-test-e2e-gce@2/.kube/config exec --namespace=e2e-tests-kubectl-4sutt -i nginx bash] [] 0xc20846b088 hi [] &lt;nil&gt; 0xc208925b20 exit status 2 &lt;nil&gt; true [0xc20846b088 0xc20846b0d0 0xc20846b0f0] [0xc20846b0d0 0xc20846b0f0] [0xc20846b0c8 0xc20846b0e8] [0x972bb0 0x972bb0] 0xc208920d20}: Command stdout: hi stderr: error: exit status 2 not to have occurred"><pre class="notranslate"><code class="notranslate">Stacktrace /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:227 Expected error: &lt;*errors.errorString | 0xc20851ad50&gt;: { s: "Error running &amp;{/var/lib/jenkins/workspace/kubernetes-pull-build-test-e2e-gce@2/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://146.148.99.243 --kubeconfig=/var/lib/jenkins/workspace/kubernetes-pull-build-test-e2e-gce@2/.kube/config exec --namespace=e2e-tests-kubectl-4sutt -i nginx bash] [] 0xc20846b088 hi\n [] &lt;nil&gt; 0xc208925b20 exit status 2 &lt;nil&gt; true [0xc20846b088 0xc20846b0d0 0xc20846b0f0] [0xc20846b0d0 0xc20846b0f0] [0xc20846b0c8 0xc20846b0e8] [0x972bb0 0x972bb0] 0xc208920d20}:\nCommand stdout:\nhi\n\nstderr:\n\nerror:\nexit status 2\n", } Error running &amp;{/var/lib/jenkins/workspace/kubernetes-pull-build-test-e2e-gce@2/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://146.148.99.243 --kubeconfig=/var/lib/jenkins/workspace/kubernetes-pull-build-test-e2e-gce@2/.kube/config exec --namespace=e2e-tests-kubectl-4sutt -i nginx bash] [] 0xc20846b088 hi [] &lt;nil&gt; 0xc208925b20 exit status 2 &lt;nil&gt; true [0xc20846b088 0xc20846b0d0 0xc20846b0f0] [0xc20846b0d0 0xc20846b0f0] [0xc20846b0c8 0xc20846b0e8] [0x972bb0 0x972bb0] 0xc208920d20}: Command stdout: hi stderr: error: exit status 2 not to have occurred </code></pre></div>
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p> <p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p> <hr> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):<br> 1.4.0</p> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>: bare metal</li> <li><strong>OS</strong> (e.g. from /etc/os-release): all nodes have ubuntu 16.04</li> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li> <li><strong>Install tools</strong>: manual</li> <li><strong>Others</strong>: quay.io/coreos/flannel:v0.6.2 VXLAN, but same issue is present with 0.5.5 VXLAN</li> </ul> <p dir="auto"><strong>What happened</strong>:<br> clients gets timeout when contacting the default ingress controller ,<br> Took me a while to find the cause of a much higher level issue that I had to investigate ( very sporadic timeout from applications behind ingress-controller ) ..<br> everything now is quite reproducible,<br> I have 5 nodes cluster, 3 of them are master ( also schedulable ),I'm using flannel networking on bare metals,<br> The setup is weird and has been create only for test purpose</p> <ul dir="auto"> <li>I have a "gcr.io/google_containers/serve_hostname" (call it "pod-hostnames" )</li> <li>a service pointing to pod-hostnames, and the service expose on port 90 to "externalIPs"</li> <li>then i have created a pod with ( same configuration of "default nginx ingress controller" but slurped configuration, removed the geolocation part that and applied the configuration to standard nginx image "nginx:1.11.4" , so the upstream is static and pointing to the pod-hostnames:port , configuration isn't refreshed automatically ( only manually ) , this pod of this nginx instance is also connected to "hostNetwork: true" ( this has been done on purpose for testing ) and on port 89, so no service required</li> </ul> <p dir="auto">everything works as expected,<br> from multiple clients I can access port 90 or 89 and get the same service..</p> <p dir="auto">now there is some kind of filter that I didn't understood,<br> Let's call</p> <ul dir="auto"> <li>TESTSRVC: "ab -n 1000 -c 10 http://$host:90" ( which is the test on the nodePort exposed by the service ) NB those are only 1000 requests with concurrency 10!</li> <li>CURLSRVC: "curl http://$host:90"</li> <li>TESTNGINX: "ab -n 1000 -c 10 http://$host:89" ( which is the test on pod, fully exposed with the "hostNetwork: true" flag ) NB those are only 1000 requests with concurrency 10</li> <li>CURLNGINX: "curl http://$host:89"</li> </ul> <p dir="auto">I have 2 pc in office ( pc1 and pc2 ) same external ip<br> I also have other severs around to use as clients.. ( call them ext1...n)</p> <p dir="auto">all bare metal nodes in the cluster are in another datacenter , every server have it's dedicated ipv4 ( and are not natted )</p> <p dir="auto">iptables have "accept" in filter (input/forward) tables policies , no rate limiters, or other special filter ,</p> <p dir="auto">CURLNGINX works on pc1,pc2,ext1<br> CURLSRVC works only on pc1,ext2 -that's weird..-</p> <p dir="auto">if from pc1 I run TESTNGINX ( which takes about 5 seconds to run ) , pc2 cannot connect to nginx for 60 seconds, nginx logs nothing about those requests from pc2, tcpdump see the requests from the pc2, after those 60 seconds.. nginx start again to reply to pc2 , pc1 and ext1 during those 60 seconds have no problem contacting both :89 or :90</p> <p dir="auto">if from ext1 I run TESTNGINX, there are no issues for ext1,pc1,pc2,ext2<br> if from ext2 I run TESTNGINX, there are no issues for ext1,pc1,pc2,ext2</p> <p dir="auto">if I run TESTSRVC from pc1 or ext2, the nginx start logging issues (499 CLIENT CLOSED REQUEST) and in his epoll like</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="10.200.9.1 - [10.200.9.1] - - [03/Oct/2016:16:23:35 +0000] &quot;GET /?w2 HTTP/1.1&quot; 499 0 &quot;-&quot; &quot;curl/7.47.0&quot; 97 4.814 10.200.78.7:9376 0 - - 2016/10/03 16:19:51 [info] 14#14: *131367 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while connecting to upstream, client: 10.200.9.1, server: _, request: &quot;GET /?w2 HTTP/1.1&quot;, upstream: &quot;http://10.200.78.7:9376/?w2&quot;, host: &quot;vpr4.xxxxx:89&quot;"><pre class="notranslate"><code class="notranslate">10.200.9.1 - [10.200.9.1] - - [03/Oct/2016:16:23:35 +0000] "GET /?w2 HTTP/1.1" 499 0 "-" "curl/7.47.0" 97 4.814 10.200.78.7:9376 0 - - 2016/10/03 16:19:51 [info] 14#14: *131367 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while connecting to upstream, client: 10.200.9.1, server: _, request: "GET /?w2 HTTP/1.1", upstream: "http://10.200.78.7:9376/?w2", host: "vpr4.xxxxx:89" </code></pre></div> <p dir="auto">and no one of the client can reach the port :89, but the port :90 still being available to pc1,ext2 -that's weird too-<br> seems that some kind of limits has been reached on the service and also to node cannot reach the service .. for 60 seconds..<br> after 60 seconds.. everything is available again..</p> <p dir="auto">now.. these 60 seconds seems to be a constant.. is ALWAYS EXACTLY 60 seconds..<br> I've tryed to search for those 60 seconds.. increase in sysctl all timeout that have 60 seconds or 60.000 ms as limits .. doubled them to 120 seconds but my timeout issues still lasting 60 seconds..</p> <p dir="auto"><strong>obviously no pods has been restarted (nor manually or automatically) during those 60 seconds , everything that has been tested here have 0 restart.</strong></p> <p dir="auto">do you have any idea about what I can try to do ?<br> in your clusters you have the same issue ?</p>
0
<ul dir="auto"> <li>VSCode Version: 1.1.0-alpha</li> <li>OS Version: Windows 10</li> </ul> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>In the Explorer viewlet, right click on a file &gt; Select for Compare</li> <li>Right click another file &gt; Compare with 'selected.js'</li> <li>Try to modify the first file (left side compare window)</li> </ol> <p dir="auto">It makes sense when comparing the changes of a single file, but when two different files are being compared you should be able to modify the first opened one.</p>
<p dir="auto">Trying to publish while the repo url contains username will still ask me for username.<br> Leaving empty or filling in the username and password will result in authentication fail by remote server.</p> <p dir="auto">Example,<br> repo url: <a href="https://FilipDz@bitbucket.org/FilipDz/baze.git" rel="nofollow">https://FilipDz@bitbucket.org/FilipDz/baze.git</a><br> username: or FilipDz<br> password: ******<br> output:<br> remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.<br> fatal: Authentication failed for '<a href="https://FilipDz@bitbucket.org/FilipDz/node-baze.git/" rel="nofollow">https://FilipDz@bitbucket.org/FilipDz/node-baze.git/</a>'</p>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <p dir="auto">When the columns are aligned, no problem, the columns in the result have the correct name ('ID' here).</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pd.concat([ pd.DataFrame([[0, 1]], index=['r0'], columns=pd.Index(['a', 'b'], name='ID')), pd.DataFrame([[2, 3]], index=['r1'], columns=pd.Index(['a', 'b'], name='ID')), ], sort=True) # out: # ID a b # r0 0 1 # r1 2 3"><pre class="notranslate"><span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([ <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>([[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>]], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-s">'r0'</span>], <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">Index</span>([<span class="pl-s">'a'</span>, <span class="pl-s">'b'</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'ID'</span>)), <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>([[<span class="pl-c1">2</span>, <span class="pl-c1">3</span>]], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-s">'r1'</span>], <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">Index</span>([<span class="pl-s">'a'</span>, <span class="pl-s">'b'</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'ID'</span>)), ], <span class="pl-s1">sort</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-c"># out:</span> <span class="pl-c"># ID a b</span> <span class="pl-c"># r0 0 1</span> <span class="pl-c"># r1 2 3</span></pre></div> <p dir="auto">However, when the columns are not aligned, then the name seems to disappear:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pd.concat([ pd.DataFrame([[0, 1]], index=['r0'], columns=pd.Index(['a', 'b'], name='ID')), pd.DataFrame([[2, 3]], index=['r1'], columns=pd.Index(['a', 'c'], name='ID')), ], sort=True) # out: # a b c &lt;-- notice how the columns have lost their name ('ID'). # r0 0 1.0 NaN # r1 2 NaN 3.0"><pre class="notranslate"><span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([ <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>([[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>]], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-s">'r0'</span>], <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">Index</span>([<span class="pl-s">'a'</span>, <span class="pl-s">'b'</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'ID'</span>)), <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>([[<span class="pl-c1">2</span>, <span class="pl-c1">3</span>]], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-s">'r1'</span>], <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">Index</span>([<span class="pl-s">'a'</span>, <span class="pl-s">'c'</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'ID'</span>)), ], <span class="pl-s1">sort</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-c"># out:</span> <span class="pl-c"># a b c &lt;-- notice how the columns have lost their name ('ID').</span> <span class="pl-c"># r0 0 1.0 NaN</span> <span class="pl-c"># r1 2 NaN 3.0</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">When concatenating DataFrames, I expect the non-concatenating axis (the columns axis, in the examples above) to keep its name(s).</p> <p dir="auto">An interesting question occurs if the instances of the non-concatenating axis are not only misaligned, but also have different names. In that case, we could use the majority value or drop altogether (None). In our code, we use <code class="notranslate">names = collections.Counter([df.axes[nc_axis].names for df in objs]).most_common(1)[0][0]</code>.</p> <h4 dir="auto">Expected Output</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pd.concat([ pd.DataFrame([[0, 1]], index=['r0'], columns=pd.Index(['a', 'b'], name='ID')), pd.DataFrame([[2, 3]], index=['r1'], columns=pd.Index(['a', 'c'], name='ID')), ], sort=True) # out: # ID a b c &lt;-- name 'ID' should be retained, since there is no ambiguity # r0 0 1.0 NaN # r1 2 NaN 3.0 # notice how the columns have lost their name ('ID')."><pre class="notranslate"><span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([ <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>([[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>]], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-s">'r0'</span>], <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">Index</span>([<span class="pl-s">'a'</span>, <span class="pl-s">'b'</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'ID'</span>)), <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>([[<span class="pl-c1">2</span>, <span class="pl-c1">3</span>]], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-s">'r1'</span>], <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">Index</span>([<span class="pl-s">'a'</span>, <span class="pl-s">'c'</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'ID'</span>)), ], <span class="pl-s1">sort</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-c"># out:</span> <span class="pl-c"># ID a b c &lt;-- name 'ID' should be retained, since there is no ambiguity</span> <span class="pl-c"># r0 0 1.0 NaN</span> <span class="pl-c"># r1 2 NaN 3.0</span> <span class="pl-c"># notice how the columns have lost their name ('ID').</span></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INSTALLED VERSIONS ------------------ commit: None python: 3.6.4.final.0 python-bits: 64 OS: Linux OS-release: 3.13.0-77-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.23.1 pytest: 3.3.2 pip: 9.0.1 setuptools: 38.4.0 Cython: 0.27.3 numpy: 1.14.5 scipy: 1.0.0 pyarrow: 0.8.0 xarray: None IPython: 6.1.0 sphinx: 1.6.3 patsy: 0.4.1 dateutil: 2.6.1 pytz: 2017.3 blosc: None bottleneck: 1.2.1 tables: 3.4.3 numexpr: 2.6.4 feather: None matplotlib: 2.1.0 openpyxl: 2.4.8 xlrd: 1.1.0 xlwt: 1.3.0 xlsxwriter: 1.0.2 lxml: 4.1.0 bs4: 4.6.0 html5lib: 0.999999999 sqlalchemy: 1.1.13 pymysql: None psycopg2: 2.7.3.2 (dt dec pq3 ext lo64) jinja2: 2.10 s3fs: None fastparquet: 0.1.3 pandas_gbq: None pandas_datareader: None"><pre class="notranslate"><code class="notranslate">INSTALLED VERSIONS ------------------ commit: None python: 3.6.4.final.0 python-bits: 64 OS: Linux OS-release: 3.13.0-77-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.23.1 pytest: 3.3.2 pip: 9.0.1 setuptools: 38.4.0 Cython: 0.27.3 numpy: 1.14.5 scipy: 1.0.0 pyarrow: 0.8.0 xarray: None IPython: 6.1.0 sphinx: 1.6.3 patsy: 0.4.1 dateutil: 2.6.1 pytz: 2017.3 blosc: None bottleneck: 1.2.1 tables: 3.4.3 numexpr: 2.6.4 feather: None matplotlib: 2.1.0 openpyxl: 2.4.8 xlrd: 1.1.0 xlwt: 1.3.0 xlsxwriter: 1.0.2 lxml: 4.1.0 bs4: 4.6.0 html5lib: 0.999999999 sqlalchemy: 1.1.13 pymysql: None psycopg2: 2.7.3.2 (dt dec pq3 ext lo64) jinja2: 2.10 s3fs: None fastparquet: 0.1.3 pandas_gbq: None pandas_datareader: None </code></pre></div> </details>
<p dir="auto">xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="166800647" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/13742" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/13742/hovercard" href="https://github.com/pandas-dev/pandas/issues/13742">#13742</a> for addl cases.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [23]: df1 = pd.DataFrame({'a':[1,2]}, index=pd.Index(['a', 'b'], name='idx')) In [24]: df2 = pd.DataFrame({'b':[2,3]}, index=pd.Index(['b', 'c'], name='idx')) In [26]: pd.concat([df1, df2], axis=1) Out[26]: a b a 1.0 NaN b 2.0 2.0 c NaN 3.0 In [27]: print pd.concat([df1, df2], axis=1).index.name None"><pre class="notranslate"><code class="notranslate">In [23]: df1 = pd.DataFrame({'a':[1,2]}, index=pd.Index(['a', 'b'], name='idx')) In [24]: df2 = pd.DataFrame({'b':[2,3]}, index=pd.Index(['b', 'c'], name='idx')) In [26]: pd.concat([df1, df2], axis=1) Out[26]: a b a 1.0 NaN b 2.0 2.0 c NaN 3.0 In [27]: print pd.concat([df1, df2], axis=1).index.name None </code></pre></div> <p dir="auto">So the issue seems to be with a string index that is not equal, as when the index of the two frames is equal (no NaNs are introduced), the name is kept and also when using numerical indexes, see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="160946165" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/13475" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/13475/hovercard?comment_id=232310977&amp;comment_type=issue_comment" href="https://github.com/pandas-dev/pandas/issues/13475#issuecomment-232310977">#13475 (comment)</a></p> <hr> <p dir="auto">When I use the concat function with input dataframes that have index.name assigned, sometimes the resulting dataframe has the index.name assigned, sometimes it does not.</p> <p dir="auto">I ran the code below from the python interpreter, using a conda environment with pandas-0.18.1</p> <p dir="auto">I don't see any odd / extra characters around the "pert_well" column in the files between the files.</p> <h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas a_data = &quot;&quot;&quot;x_amount_mg x_annotation x_mmoles_per_liter mfc_plate_name x_avg_mol_weight x_volume_ul pert_mfc_desc pert_iname x_purity pert_id_vendor pert_well pert_vehicle pert_mfc_id x_smiles x_mg_per_ml pert_dose_unit pert_dose pert_id pert_plate pert_type 0.04784 ACCEPT 10.0 B-REPO-01-B64-101 405.4084 11 Taltirelin Taltirelin 86.52 HY-B0596 C18 DMSO BRD-K93869735-001-01-1 CN1C(=O)C[C@H](NC1=O)C(=O)N[C@@H](Cc1cnc[nH]1)C(=O)N1CCC[C@H]1C(N)=O 4.054084 um 20.0 BRD-K93869735 PMEL008 trt_cp&quot;&quot;&quot; b_data = &quot;&quot;&quot;pert_well pert_2_type pert_2_id pert_2_mfc_id pert_2_mfc_desc pert_2_id_vendor pert_2_iname pert_2_dose pert_2_dose_unit pert_2_vehicle pert_3_type pert_3_idpert_3_mfc_id pert_3_mfc_desc pert_3_id_vendor pert_3_iname pert_3_dose pert_3_dose_unit pert_3_vehicle A01 ctl_vehicle DMSO DMSO DMSO -666 DMSO -666 -666 -666 ctl_untrt CMAP-000 -666 UnTrt -666 -666 -666 -666 -666&quot;&quot;&quot; d_data = &quot;&quot;&quot;x_amount_mg x_annotation x_mmoles_per_liter mfc_plate_name x_avg_mol_weight x_volume_ul pert_mfc_desc pert_iname x_purity pert_id_vendor pert_well pert_vehicle pert_mfc_id x_smiles x_mg_per_ml pert_dose_unit pert_dose pert_id pert_plate pert_type 0.0 -666 -666 B-REPO-01-B64-107 -666 0 -666 -666 -666 -666 A01 -666 -666 -666 -666 -666 -666 CMAP-000 PMEL001 ctl_untrt&quot;&quot;&quot; a = pandas.read_csv(StringIO(a_data), sep=&quot;\t&quot;, index_col=&quot;pert_well&quot;) b = pandas.read_csv(StringIO(b_data), sep=&quot;\t&quot;, index_col=&quot;pert_well&quot;) c = pandas.concat([a,b], axis=1) c.index d = pandas.read_csv(StringIO(d_data), sep=&quot;\t&quot;, index_col=&quot;pert_well&quot;) e = pandas.concat([d,b], axis=1) e.index"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-s1">a_data</span> <span class="pl-c1">=</span> <span class="pl-s">"""x_amount_mg x_annotation x_mmoles_per_liter mfc_plate_name x_avg_mol_weight x_volume_ul pert_mfc_desc pert_iname x_purity pert_id_vendor pert_well pert_vehicle pert_mfc_id x_smiles x_mg_per_ml pert_dose_unit pert_dose pert_id pert_plate pert_type</span> <span class="pl-s">0.04784 ACCEPT 10.0 B-REPO-01-B64-101 405.4084 11 Taltirelin Taltirelin 86.52 HY-B0596 C18 DMSO BRD-K93869735-001-01-1 CN1C(=O)C[C@H](NC1=O)C(=O)N[C@@H](Cc1cnc[nH]1)C(=O)N1CCC[C@H]1C(N)=O 4.054084 um 20.0 BRD-K93869735 PMEL008 trt_cp"""</span> <span class="pl-s1">b_data</span> <span class="pl-c1">=</span> <span class="pl-s">"""pert_well pert_2_type pert_2_id pert_2_mfc_id pert_2_mfc_desc pert_2_id_vendor pert_2_iname pert_2_dose pert_2_dose_unit pert_2_vehicle pert_3_type pert_3_idpert_3_mfc_id pert_3_mfc_desc pert_3_id_vendor pert_3_iname pert_3_dose pert_3_dose_unit pert_3_vehicle</span> <span class="pl-s">A01 ctl_vehicle DMSO DMSO DMSO -666 DMSO -666 -666 -666 ctl_untrt CMAP-000 -666 UnTrt -666 -666 -666 -666 -666"""</span> <span class="pl-s1">d_data</span> <span class="pl-c1">=</span> <span class="pl-s">"""x_amount_mg x_annotation x_mmoles_per_liter mfc_plate_name x_avg_mol_weight x_volume_ul pert_mfc_desc pert_iname x_purity pert_id_vendor pert_well pert_vehicle pert_mfc_id x_smiles x_mg_per_ml pert_dose_unit pert_dose pert_id pert_plate pert_type</span> <span class="pl-s">0.0 -666 -666 B-REPO-01-B64-107 -666 0 -666 -666 -666 -666 A01 -666 -666 -666 -666 -666 -666 CMAP-000 PMEL001 ctl_untrt"""</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">read_csv</span>(<span class="pl-v">StringIO</span>(<span class="pl-s1">a_data</span>), <span class="pl-s1">sep</span><span class="pl-c1">=</span><span class="pl-s">"<span class="pl-cce">\t</span>"</span>, <span class="pl-s1">index_col</span><span class="pl-c1">=</span><span class="pl-s">"pert_well"</span>) <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">read_csv</span>(<span class="pl-v">StringIO</span>(<span class="pl-s1">b_data</span>), <span class="pl-s1">sep</span><span class="pl-c1">=</span><span class="pl-s">"<span class="pl-cce">\t</span>"</span>, <span class="pl-s1">index_col</span><span class="pl-c1">=</span><span class="pl-s">"pert_well"</span>) <span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">concat</span>([<span class="pl-s1">a</span>,<span class="pl-s1">b</span>], <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>) <span class="pl-s1">c</span>.<span class="pl-s1">index</span> <span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">read_csv</span>(<span class="pl-v">StringIO</span>(<span class="pl-s1">d_data</span>), <span class="pl-s1">sep</span><span class="pl-c1">=</span><span class="pl-s">"<span class="pl-cce">\t</span>"</span>, <span class="pl-s1">index_col</span><span class="pl-c1">=</span><span class="pl-s">"pert_well"</span>) <span class="pl-s1">e</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">concat</span>([<span class="pl-s1">d</span>,<span class="pl-s1">b</span>], <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>) <span class="pl-s1">e</span>.<span class="pl-s1">index</span></pre></div> <p dir="auto">results:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Index([u'A01', u'A02', u'A03', u'A04', u'A05', u'A06', u'A07', u'A08', u'A09', u'A10', ... u'P15', u'P16', u'P17', u'P18', u'P19', u'P20', u'P21', u'P22', u'P23', u'P24'], dtype='object', length=384) Index([u'A01', u'A02', u'A03', u'A04', u'A05', u'A06', u'A07', u'A08', u'A09', u'A10', ... u'P15', u'P16', u'P17', u'P18', u'P19', u'P20', u'P21', u'P22', u'P23', u'P24'], dtype='object', name=u'pert_well', length=384)"><pre class="notranslate"><span class="pl-v">Index</span>([<span class="pl-s">u'A01'</span>, <span class="pl-s">u'A02'</span>, <span class="pl-s">u'A03'</span>, <span class="pl-s">u'A04'</span>, <span class="pl-s">u'A05'</span>, <span class="pl-s">u'A06'</span>, <span class="pl-s">u'A07'</span>, <span class="pl-s">u'A08'</span>, <span class="pl-s">u'A09'</span>, <span class="pl-s">u'A10'</span>, ... <span class="pl-s">u'P15'</span>, <span class="pl-s">u'P16'</span>, <span class="pl-s">u'P17'</span>, <span class="pl-s">u'P18'</span>, <span class="pl-s">u'P19'</span>, <span class="pl-s">u'P20'</span>, <span class="pl-s">u'P21'</span>, <span class="pl-s">u'P22'</span>, <span class="pl-s">u'P23'</span>, <span class="pl-s">u'P24'</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'object'</span>, <span class="pl-s1">length</span><span class="pl-c1">=</span><span class="pl-c1">384</span>) <span class="pl-v">Index</span>([<span class="pl-s">u'A01'</span>, <span class="pl-s">u'A02'</span>, <span class="pl-s">u'A03'</span>, <span class="pl-s">u'A04'</span>, <span class="pl-s">u'A05'</span>, <span class="pl-s">u'A06'</span>, <span class="pl-s">u'A07'</span>, <span class="pl-s">u'A08'</span>, <span class="pl-s">u'A09'</span>, <span class="pl-s">u'A10'</span>, ... <span class="pl-s">u'P15'</span>, <span class="pl-s">u'P16'</span>, <span class="pl-s">u'P17'</span>, <span class="pl-s">u'P18'</span>, <span class="pl-s">u'P19'</span>, <span class="pl-s">u'P20'</span>, <span class="pl-s">u'P21'</span>, <span class="pl-s">u'P22'</span>, <span class="pl-s">u'P23'</span>, <span class="pl-s">u'P24'</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'object'</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">u'pert_well'</span>, <span class="pl-s1">length</span><span class="pl-c1">=</span><span class="pl-c1">384</span>)</pre></div> <h4 dir="auto">Expected Output</h4> <p dir="auto">c.index.name should be "pert_well"</p> <h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 2.7.11.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 2.6.32-573.7.1.el6.x86_64<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: C</p> <p dir="auto">pandas: 0.18.1<br> nose: None<br> pip: 8.1.2<br> setuptools: 23.0.0<br> Cython: None<br> numpy: 1.11.0<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: None<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: None<br> boto: None<br> pandas_datareader: None</p> <p dir="auto"><a href="https://github.com/pydata/pandas/files/321051/PMEL_input_files_for_pandas_issue.zip">PMEL_input_files_for_pandas_issue.zip</a></p>
1
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <ul dir="auto"> <li>play</li> <li>role</li> <li>loop</li> <li>with_items</li> </ul> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">ansible 2.2.2.0<br> config file =<br> configured module search path = Default w/o overrides</p> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">None</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Ansile OS: debian 9</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">When using calling a role from a play with a with_items loop for a var, ansible is making a double loop on each hosts</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">ansible-playbook test.yml</p> <p dir="auto">test.yml:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="plays$ cat test.yml --- - name: Test hosts: all gather_facts: no tasks: - name: Enter role include_role: name: sib vars: foo: &quot;{{ item }}&quot; with_items: - bar"><pre class="notranslate"><code class="notranslate">plays$ cat test.yml --- - name: Test hosts: all gather_facts: no tasks: - name: Enter role include_role: name: sib vars: foo: "{{ item }}" with_items: - bar </code></pre></div> <p dir="auto">sib/tasks/main.yml</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="plays$ cat roles/sib/tasks/main.yml --- - debug: var: foo"><pre class="notranslate"><code class="notranslate">plays$ cat roles/sib/tasks/main.yml --- - debug: var: foo </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="plays$ ansible-playbook -i ~/dev/project/base/ansible/hosts test.yml PLAY [Test] ******************************************************************** TASK [Enter role] ************************************************************** TASK [sib : debug] ************************************************************* ok: [fe1] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [fe2] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [be1] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [be2] =&gt; { &quot;foo&quot;: &quot;bar&quot; }"><pre class="notranslate"><code class="notranslate">plays$ ansible-playbook -i ~/dev/project/base/ansible/hosts test.yml PLAY [Test] ******************************************************************** TASK [Enter role] ************************************************************** TASK [sib : debug] ************************************************************* ok: [fe1] =&gt; { "foo": "bar" } ok: [fe2] =&gt; { "foo": "bar" } ok: [be1] =&gt; { "foo": "bar" } ok: [be2] =&gt; { "foo": "bar" } </code></pre></div> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="plays$ ansible-playbook -i ~/dev/project/base/ansible/hosts test.yml PLAY [Test] ******************************************************************** TASK [Enter role] ************************************************************** TASK [sib : debug] ************************************************************* ok: [fe1] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [fe2] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [be1] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [be2] =&gt; { &quot;foo&quot;: &quot;bar&quot; } TASK [sib : debug] ************************************************************* ok: [be1] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [fe2] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [fe1] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [be2] =&gt; { &quot;foo&quot;: &quot;bar&quot; } TASK [sib : debug] ************************************************************* ok: [fe1] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [fe2] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [be1] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [be2] =&gt; { &quot;foo&quot;: &quot;bar&quot; } TASK [sib : debug] ************************************************************* ok: [fe1] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [fe2] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [be1] =&gt; { &quot;foo&quot;: &quot;bar&quot; } ok: [be2] =&gt; { &quot;foo&quot;: &quot;bar&quot; } PLAY RECAP ********************************************************************* be1 : ok=4 changed=0 unreachable=0 failed=0 be2 : ok=4 changed=0 unreachable=0 failed=0 fe1 : ok=4 changed=0 unreachable=0 failed=0 fe2 : ok=4 changed=0 unreachable=0 failed=0 "><pre class="notranslate"><code class="notranslate">plays$ ansible-playbook -i ~/dev/project/base/ansible/hosts test.yml PLAY [Test] ******************************************************************** TASK [Enter role] ************************************************************** TASK [sib : debug] ************************************************************* ok: [fe1] =&gt; { "foo": "bar" } ok: [fe2] =&gt; { "foo": "bar" } ok: [be1] =&gt; { "foo": "bar" } ok: [be2] =&gt; { "foo": "bar" } TASK [sib : debug] ************************************************************* ok: [be1] =&gt; { "foo": "bar" } ok: [fe2] =&gt; { "foo": "bar" } ok: [fe1] =&gt; { "foo": "bar" } ok: [be2] =&gt; { "foo": "bar" } TASK [sib : debug] ************************************************************* ok: [fe1] =&gt; { "foo": "bar" } ok: [fe2] =&gt; { "foo": "bar" } ok: [be1] =&gt; { "foo": "bar" } ok: [be2] =&gt; { "foo": "bar" } TASK [sib : debug] ************************************************************* ok: [fe1] =&gt; { "foo": "bar" } ok: [fe2] =&gt; { "foo": "bar" } ok: [be1] =&gt; { "foo": "bar" } ok: [be2] =&gt; { "foo": "bar" } PLAY RECAP ********************************************************************* be1 : ok=4 changed=0 unreachable=0 failed=0 be2 : ok=4 changed=0 unreachable=0 failed=0 fe1 : ok=4 changed=0 unreachable=0 failed=0 fe2 : ok=4 changed=0 unreachable=0 failed=0 </code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">core</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="devel"><pre class="notranslate"><code class="notranslate">devel </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">N/A</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">N/A</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">include_role+with_items executes once per item per host <strong>on each host</strong>.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">x.yml::</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- - hosts: all gather_facts: no tasks: - include_role: name=p with_items: [1,2]"><pre class="notranslate"><code class="notranslate">--- - hosts: all gather_facts: no tasks: - include_role: name=p with_items: [1,2] </code></pre></div> <p dir="auto">roles/p/tasks/main.yml::</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- command: cat /proc/uptime"><pre class="notranslate"><code class="notranslate">- command: cat /proc/uptime </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">I expected <code class="notranslate">cat /proc/uptime</code> to be executed twice on a and twice on b.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">It actually executes <code class="notranslate">cat /proc/uptime</code> <strong>four times</strong> on both hosts.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002532&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.080587&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.078055&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.64 3614256.86&quot;, &quot;stdout_lines&quot;: [&quot;987830.64 3614256.86&quot;], &quot;warnings&quot;: []} changed: [a] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002532&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.080587&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.078055&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.64 3614256.86&quot;, &quot;stdout_lines&quot;: [&quot;987830.64 3614256.86&quot;], &quot;warnings&quot;: []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002069&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.214287&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.212218&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.77 3614257.08&quot;, &quot;stdout_lines&quot;: [&quot;987830.77 3614257.08&quot;], &quot;warnings&quot;: []} changed: [a] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002710&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.214238&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.211528&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.77 3614257.08&quot;, &quot;stdout_lines&quot;: [&quot;987830.77 3614257.08&quot;], &quot;warnings&quot;: []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [a] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002648&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.340613&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.337965&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.90 3614257.30&quot;, &quot;stdout_lines&quot;: [&quot;987830.90 3614257.30&quot;], &quot;warnings&quot;: []} changed: [b] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002124&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.345231&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.343107&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987830.91 3614257.30&quot;, &quot;stdout_lines&quot;: [&quot;987830.91 3614257.30&quot;], &quot;warnings&quot;: []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002734&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.475102&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.472368&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987831.04 3614257.51&quot;, &quot;stdout_lines&quot;: [&quot;987831.04 3614257.51&quot;], &quot;warnings&quot;: []} changed: [a] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: [&quot;cat&quot;, &quot;/proc/uptime&quot;], &quot;delta&quot;: &quot;0:00:00.002468&quot;, &quot;end&quot;: &quot;2016-12-05 20:00:08.478968&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2016-12-05 20:00:08.476500&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;987831.04 3614257.52&quot;, &quot;stdout_lines&quot;: [&quot;987831.04 3614257.52&quot;], &quot;warnings&quot;: []} PLAY RECAP ************************************************************************************************************************************************************************************ a : ok=4 changed=4 unreachable=0 failed=0 b : ok=4 changed=4 unreachable=0 failed=0 "><pre class="notranslate"><code class="notranslate">TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002532", "end": "2016-12-05 20:00:08.080587", "rc": 0, "start": "2016-12-05 20:00:08.078055", "stderr": "", "stdout": "987830.64 3614256.86", "stdout_lines": ["987830.64 3614256.86"], "warnings": []} changed: [a] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002532", "end": "2016-12-05 20:00:08.080587", "rc": 0, "start": "2016-12-05 20:00:08.078055", "stderr": "", "stdout": "987830.64 3614256.86", "stdout_lines": ["987830.64 3614256.86"], "warnings": []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002069", "end": "2016-12-05 20:00:08.214287", "rc": 0, "start": "2016-12-05 20:00:08.212218", "stderr": "", "stdout": "987830.77 3614257.08", "stdout_lines": ["987830.77 3614257.08"], "warnings": []} changed: [a] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002710", "end": "2016-12-05 20:00:08.214238", "rc": 0, "start": "2016-12-05 20:00:08.211528", "stderr": "", "stdout": "987830.77 3614257.08", "stdout_lines": ["987830.77 3614257.08"], "warnings": []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [a] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002648", "end": "2016-12-05 20:00:08.340613", "rc": 0, "start": "2016-12-05 20:00:08.337965", "stderr": "", "stdout": "987830.90 3614257.30", "stdout_lines": ["987830.90 3614257.30"], "warnings": []} changed: [b] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002124", "end": "2016-12-05 20:00:08.345231", "rc": 0, "start": "2016-12-05 20:00:08.343107", "stderr": "", "stdout": "987830.91 3614257.30", "stdout_lines": ["987830.91 3614257.30"], "warnings": []} TASK [p : command] **************************************************************************************************************************************************************************** changed: [b] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002734", "end": "2016-12-05 20:00:08.475102", "rc": 0, "start": "2016-12-05 20:00:08.472368", "stderr": "", "stdout": "987831.04 3614257.51", "stdout_lines": ["987831.04 3614257.51"], "warnings": []} changed: [a] =&gt; {"changed": true, "cmd": ["cat", "/proc/uptime"], "delta": "0:00:00.002468", "end": "2016-12-05 20:00:08.478968", "rc": 0, "start": "2016-12-05 20:00:08.476500", "stderr": "", "stdout": "987831.04 3614257.52", "stdout_lines": ["987831.04 3614257.52"], "warnings": []} PLAY RECAP ************************************************************************************************************************************************************************************ a : ok=4 changed=4 unreachable=0 failed=0 b : ok=4 changed=4 unreachable=0 failed=0 </code></pre></div>
1
<p dir="auto"><strong>Migrated issue, originally created by Craig Radcliffe (<a href="https://github.com/chradcliffe">@chradcliffe</a>)</strong></p> <p dir="auto">I noticed this issue while trying to use sqlalchemy as a query generator to produce a string for input into a system that doesn't accept bind parameters.</p> <p dir="auto">The literal_binds parameter, when passed through the compile_kwargs parameter in the compile() method, does not seem to apply to a LIMIT clause. Here is a basic example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import select from sqlalchemy.sql import table, literal_column t = table(&quot;foo&quot;) t.append_column(literal_column(&quot;bar&quot;)) print select([t.c[&quot;bar&quot;]]).limit(100).compile(compile_kwargs={'literal_binds': True}) "><pre class="notranslate"><code class="notranslate">from sqlalchemy import select from sqlalchemy.sql import table, literal_column t = table("foo") t.append_column(literal_column("bar")) print select([t.c["bar"]]).limit(100).compile(compile_kwargs={'literal_binds': True}) </code></pre></div> <p dir="auto">The output is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#! SELECT foo.bar FROM foo LIMIT :param_1 "><pre class="notranslate"><code class="notranslate">#! SELECT foo.bar FROM foo LIMIT :param_1 </code></pre></div> <p dir="auto">I would expect:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#! SELECT foo.bar FROM foo LIMIT 100"><pre class="notranslate"><code class="notranslate">#! SELECT foo.bar FROM foo LIMIT 100 </code></pre></div> <p dir="auto">Other clauses, including JOINs, WHEREs, GROUP BYs, etc. work as expected.</p> <p dir="auto">The issue is present in 0.9.8.</p>
<p dir="auto"><strong>Migrated issue, originally created by Dobes Vandermeer (<a href="https://github.com/dobesv">@dobesv</a>)</strong></p> <p dir="auto">I am trying to use the "baked query" pattern to reduce the time spent generating SQL, which currently is quite significant for our app.</p> <p dir="auto">One thing I can't seem to parameterize using a bindparam, however, is the limit on the query.</p> <p dir="auto">Although in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384612604" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/805" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/805/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/805">#805</a> the limit was changed into a bindparam, this doesn't allow me to provide my own bindparam but rather always creates its own bindparam, assuming the limit I procide is a number already.</p> <p dir="auto">I think that if the places where currently it wraps a numeric limit into a bindparam using sql.literal() it would also check if limit was already a bindparam then it would be good.</p> <p dir="auto">Here's an example that can be pasted into the test suite:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" def test_select_with_bindparam_limit(self): &quot;&quot;&quot;Does a query allow bindparam for the limit?&quot;&quot;&quot; sess = create_session() users = [] q1 = sess.query(self.classes.User).order_by(self.classes.User.id).limit(sa.bindparam('n')) for n in xrange(1,4): users[:] = q1.params(n=n).all() assert len(users) == n"><pre class="notranslate"><code class="notranslate"> def test_select_with_bindparam_limit(self): """Does a query allow bindparam for the limit?""" sess = create_session() users = [] q1 = sess.query(self.classes.User).order_by(self.classes.User.id).limit(sa.bindparam('n')) for n in xrange(1,4): users[:] = q1.params(n=n).all() assert len(users) == n </code></pre></div>
1
<p dir="auto"><strong>Migrated issue, originally created by moon cake (<a href="https://github.com/mooncake4132">@mooncake4132</a>)</strong></p> <p dir="auto">It seems like <code class="notranslate">_sort_states</code> in <code class="notranslate">persistence.py</code> is trying to sort the primary key(s), irregardless whether it is sortable. In this case, I'm using an <code class="notranslate">enum.Enum</code>. Full repro code follows.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(sqlalchemy) $ python test.py Traceback (most recent call last): File &quot;test.py&quot;, line 35, in &lt;module&gt; create_trees(session) File &quot;test.py&quot;, line 29, in create_trees session.query(Tree).merge_result([Tree(color=Color.red), Tree(color=Color.black)]) File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 572, in __exit__ self.rollback() File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py&quot;, line 66, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/util/compat.py&quot;, line 187, in reraise raise value File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 569, in __exit__ self.commit() File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 467, in commit self._prepare_impl() File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 447, in _prepare_impl self.session.flush() File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 2254, in flush self._flush(objects) File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 2380, in _flush transaction.rollback(_capture_exception=True) File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py&quot;, line 66, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/util/compat.py&quot;, line 187, in reraise raise value File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 2344, in _flush flush_context.execute() File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/unitofwork.py&quot;, line 391, in execute rec.execute(self) File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/unitofwork.py&quot;, line 556, in execute uow File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py&quot;, line 156, in save_obj base_mapper, states, uowtransaction File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py&quot;, line 286, in _organize_states_for_save states): File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py&quot;, line 1255, in _connections_for_states for state in _sort_states(states): File &quot;/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py&quot;, line 1277, in _sort_states sorted(persistent, key=lambda q: q.key[1]) TypeError: '&lt;' not supported between instances of 'Color' and 'Color'"><pre class="notranslate"><code class="notranslate">(sqlalchemy) $ python test.py Traceback (most recent call last): File "test.py", line 35, in &lt;module&gt; create_trees(session) File "test.py", line 29, in create_trees session.query(Tree).merge_result([Tree(color=Color.red), Tree(color=Color.black)]) File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 572, in __exit__ self.rollback() File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 187, in reraise raise value File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 569, in __exit__ self.commit() File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 467, in commit self._prepare_impl() File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 447, in _prepare_impl self.session.flush() File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2254, in flush self._flush(objects) File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2380, in _flush transaction.rollback(_capture_exception=True) File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 187, in reraise raise value File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2344, in _flush flush_context.execute() File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute rec.execute(self) File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute uow File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 156, in save_obj base_mapper, states, uowtransaction File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 286, in _organize_states_for_save states): File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 1255, in _connections_for_states for state in _sort_states(states): File "/tmp/sqlalchemy/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 1277, in _sort_states sorted(persistent, key=lambda q: q.key[1]) TypeError: '&lt;' not supported between instances of 'Color' and 'Color' </code></pre></div> <p dir="auto">=======</p> <p dir="auto">Version</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Python 3.6.5 (default, Mar 29 2018, 03:28:50) [GCC 5.4.0 20160609] on linux Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. &gt;&gt;&gt; import sqlalchemy &gt;&gt;&gt; sqlalchemy.__version__ '1.2.8'"><pre class="notranslate"><code class="notranslate">Python 3.6.5 (default, Mar 29 2018, 03:28:50) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; import sqlalchemy &gt;&gt;&gt; sqlalchemy.__version__ '1.2.8' </code></pre></div> <p dir="auto">=======</p> <p dir="auto">Repro code</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import enum from sqlalchemy import create_engine, Column, Enum from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base class Color(enum.Enum): red = 'Red' black = 'Black' Base = declarative_base() class Tree(Base): __tablename__ = 'tree' color = Column(Enum(Color), primary_key=True) engine = create_engine('postgresql://tree:tree@127.0.0.1/trees') Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) def create_trees(session): with session.begin_nested(): session.query(Tree).merge_result([Tree(color=Color.red), Tree(color=Color.black)]) session.commit() session = Session() create_trees(session) create_trees(session)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">enum</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">Column</span>, <span class="pl-v">Enum</span> <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">orm</span> <span class="pl-k">import</span> <span class="pl-s1">sessionmaker</span> <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">ext</span>.<span class="pl-s1">declarative</span> <span class="pl-k">import</span> <span class="pl-s1">declarative_base</span> <span class="pl-k">class</span> <span class="pl-v">Color</span>(<span class="pl-s1">enum</span>.<span class="pl-v">Enum</span>): <span class="pl-s1">red</span> <span class="pl-c1">=</span> <span class="pl-s">'Red'</span> <span class="pl-s1">black</span> <span class="pl-c1">=</span> <span class="pl-s">'Black'</span> <span class="pl-v">Base</span> <span class="pl-c1">=</span> <span class="pl-en">declarative_base</span>() <span class="pl-k">class</span> <span class="pl-v">Tree</span>(<span class="pl-v">Base</span>): <span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">'tree'</span> <span class="pl-s1">color</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Enum</span>(<span class="pl-v">Color</span>), <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-s1">engine</span> <span class="pl-c1">=</span> <span class="pl-en">create_engine</span>(<span class="pl-s">'postgresql://tree:tree@127.0.0.1/trees'</span>) <span class="pl-v">Base</span>.<span class="pl-s1">metadata</span>.<span class="pl-en">create_all</span>(<span class="pl-s1">engine</span>) <span class="pl-v">Session</span> <span class="pl-c1">=</span> <span class="pl-en">sessionmaker</span>(<span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-s1">engine</span>) <span class="pl-k">def</span> <span class="pl-en">create_trees</span>(<span class="pl-s1">session</span>): <span class="pl-k">with</span> <span class="pl-s1">session</span>.<span class="pl-en">begin_nested</span>(): <span class="pl-s1">session</span>.<span class="pl-en">query</span>(<span class="pl-v">Tree</span>).<span class="pl-en">merge_result</span>([<span class="pl-v">Tree</span>(<span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-v">Color</span>.<span class="pl-s1">red</span>), <span class="pl-v">Tree</span>(<span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-v">Color</span>.<span class="pl-s1">black</span>)]) <span class="pl-s1">session</span>.<span class="pl-en">commit</span>() <span class="pl-s1">session</span> <span class="pl-c1">=</span> <span class="pl-v">Session</span>() <span class="pl-en">create_trees</span>(<span class="pl-s1">session</span>) <span class="pl-en">create_trees</span>(<span class="pl-s1">session</span>)</pre></div>
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p> <p dir="auto">original description:</p> <p dir="auto">I'm using SA to talk to a MySQL database, but the database has a<br> tendency to drop my connection while the queries are running.</p> <p dir="auto">SQLError: (OperationalError) (2013, 'Lost connection to MySQL server<br> during query') 'SELECT sum(bgp_churn.count) \nFROM bgp_churn \nWHERE<br> bgp_churn.tstamp &gt; %s AND bgp_churn.type = %s \n LIMIT 1'<br> <a href="1158084083.0,">'U'</a></p> <p dir="auto">This isn't a particularly big deal for my application, I'm caching the<br> results and can just retry a minute or two later. Unfortunately, this<br> IS a big deal to SQLAlchemy. Frequently, but not always, it gets into<br> a state where every query after this results in a 'Commands out of<br> sync' message.</p> <p dir="auto">SQLError: (ProgrammingError) (2014, "Commands out of sync; you can't<br> run this command now") 'SELECT bgp_churn.asn, sum(bgp_churn.count) AS<br> count \nFROM bgp_churn \nWHERE bgp_churn.tstamp &gt; %s AND<br> bgp_churn.type = %s GROUP BY bgp_churn.asn ORDER BY count DESC \n<br> LIMIT 4' [1158089885.0, 'U'</p> <p dir="auto">Here's the MySQL manual page on this error:</p> <p dir="auto"><a href="http://dev.mysql.com/doc/refman/4.1/en/commands-out-of-sync.html" rel="nofollow">http://dev.mysql.com/doc/refman/4.1/en/commands-out-of-sync.html</a></p> <p dir="auto">The strange thing is that this does not occur consistently. It seems<br> to occur less frequently when echo is on but that might be a placebo<br> on my part.</p> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/306/cursors_check.diff">cursors_check.diff</a></p>
0
<p dir="auto">The current watch mode for webpack is fairly good at caching load results and general workload between file changes as long as you keep the same webpack process running. The initial build for some projects, on the other hand, can be on the order of more than a minute. This can make the build process very slow if for some reason you need to stop your watcher, or node crashes, or you simply want to restart your connect server with different flags.</p> <p dir="auto">It would be nice if webpack were able to persist compilation information between invocations of the node process to the filesystem and reload that cache later -- so ideally, performance between different <code class="notranslate">$ webpack</code> calls would be close to how long it takes to <code class="notranslate">--watch</code> to recompile when it detects a change.</p>
<p dir="auto">I'm sure this has been talked about before, but I can't find a clear issue for it. I'm playing around with using webpack with server-side node modules (using <code class="notranslate">target: node</code>). I started to like the idea of bundling of everything into a single js file because that would be cool for deployment, but what kills that idea is binary dependencies. They definitely can't be bundled in, though you might know of a hack that lets me alias them or something.</p> <p dir="auto">Is there any way to tell the system ignore bundling anything coming from <code class="notranslate">node_modules</code>, and just leave it as a <code class="notranslate">require</code> statement?</p> <p dir="auto">I don't know if the <code class="notranslate">IgnorePlugin</code> means that, but if so, trying it results in an error: <code class="notranslate">plugins: [ new webpack.IgnorePlugin(/.*/, /.*node_modules.*/) ]</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="% webpack --config webpack.node.config.js /Users/james/projects/jlongster4/node_modules/webpack/lib/Compilation.js:203 factory.create(module.context, dependencies[0], function(err, dependantModul ^ TypeError: Cannot read property 'context' of null at Tapable.&lt;anonymous&gt; (/Users/james/projects/jlongster4/node_modules/webpack/lib/Compilation.js:203:24)"><pre class="notranslate"><code class="notranslate">% webpack --config webpack.node.config.js /Users/james/projects/jlongster4/node_modules/webpack/lib/Compilation.js:203 factory.create(module.context, dependencies[0], function(err, dependantModul ^ TypeError: Cannot read property 'context' of null at Tapable.&lt;anonymous&gt; (/Users/james/projects/jlongster4/node_modules/webpack/lib/Compilation.js:203:24) </code></pre></div>
0
<p dir="auto">Right now, pandas's read_csv() supports forcing column names read from CSV data to be unique:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import pandas as pd p&gt;&gt;&gt; pd.__version__ u'0.20.3' &gt;&gt;&gt; from StringIO import StringIO &gt;&gt;&gt; csv_data = &quot;&quot;&quot;a,a,b ... 1,2,3 ... 4,5,6&quot;&quot;&quot; &gt;&gt;&gt; df = pd.read_csv(StringIO(csv_data)) &gt;&gt;&gt; df.columns.tolist() ['a', 'a.1', 'b']"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-s1">p</span><span class="pl-c1">&gt;&gt;</span><span class="pl-s1"></span><span class="pl-c1">&gt;</span> <span class="pl-s1">pd</span>.<span class="pl-s1">__version__</span> <span class="pl-s">u'0.20.3'</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">from</span> <span class="pl-v">StringIO</span> <span class="pl-k">import</span> <span class="pl-v">StringIO</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">csv_data</span> <span class="pl-c1">=</span> <span class="pl-s">"""a,a,b</span> <span class="pl-s">... 1,2,3</span> <span class="pl-s">... 4,5,6"""</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-v">StringIO</span>(<span class="pl-s1">csv_data</span>)) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>.<span class="pl-s1">columns</span>.<span class="pl-en">tolist</span>() [<span class="pl-s">'a'</span>, <span class="pl-s">'a.1'</span>, <span class="pl-s">'b'</span>]</pre></div> <p dir="auto">The documentation suggests that passing <code class="notranslate">mangle_dupe_cols=False</code> to <code class="notranslate">read_csv()</code> will change this behavior to one where it'll overwrite data on load. That doesn't seem to be implemented as of this version:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; df = pd.read_csv(StringIO(csv_data), mangle_dupe_cols=False) # snip ValueError: Setting mangle_dupe_cols=False is not supported yet"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-v">StringIO</span>(<span class="pl-s1">csv_data</span>), <span class="pl-s1">mangle_dupe_cols</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-c"># snip</span> <span class="pl-v">ValueError</span>: <span class="pl-v">Setting</span> <span class="pl-s1">mangle_dupe_cols</span><span class="pl-c1">=</span><span class="pl-c1">False</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-s1">supported</span> <span class="pl-s1">yet</span></pre></div> <p dir="auto">However! Pandas doesn't fundamentally disallow duplicate column names. There's a simple (but somewhat convoluted) trick to get duplicate columns from a CSV file into your headers:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; df = pd.read_csv(StringIO(csv_data), header=None) &gt;&gt;&gt; df.columns = df.iloc[0] &gt;&gt;&gt; df = df.reindex(df.index.drop(0)).reset_index(drop=True) &gt;&gt;&gt; df 0 a a b 0 1 2 3 1 4 5 6"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-v">StringIO</span>(<span class="pl-s1">csv_data</span>), <span class="pl-s1">header</span><span class="pl-c1">=</span><span class="pl-c1">None</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>.<span class="pl-s1">columns</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-s1">iloc</span>[<span class="pl-c1">0</span>] <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-en">reindex</span>(<span class="pl-s1">df</span>.<span class="pl-s1">index</span>.<span class="pl-en">drop</span>(<span class="pl-c1">0</span>)).<span class="pl-en">reset_index</span>(<span class="pl-s1">drop</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span> <span class="pl-c1">0</span> <span class="pl-s1">a</span> <span class="pl-s1">a</span> <span class="pl-s1">b</span> <span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">3</span> <span class="pl-c1">1</span> <span class="pl-c1">4</span> <span class="pl-c1">5</span> <span class="pl-c1">6</span></pre></div> <p dir="auto">(Then again, maybe this isn't so simple; there's a funny "0" in there with the column headings and that seems weird.)</p> <h4 dir="auto">Problem description</h4> <p dir="auto">I would like a native way to read CSV files with repeated headers. In my application, it's literally so I can warn people about duplicated column headers. Yes, I could use python's built-in <code class="notranslate">csv</code> module for this, but then I'm using two methods to read CSV files and it gets weird.</p> <p dir="auto">Since <code class="notranslate">mangle_dupe_cols=False</code> is not yet implemented, I might propose this behavior in this case.</p> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <blockquote> <blockquote> <blockquote> <p dir="auto">pd.show_versions()</p> </blockquote> </blockquote> </blockquote> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 2.7.11.final.0<br> python-bits: 64<br> OS: Darwin<br> OS-release: 17.3.0<br> machine: x86_64<br> processor: i386<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8<br> LOCALE: None.None</p> <p dir="auto">pandas: 0.20.3<br> pytest: 3.2.1<br> pip: 9.0.1<br> setuptools: 36.2.7<br> Cython: None<br> numpy: 1.13.1<br> scipy: None<br> xarray: None<br> IPython: 5.4.1<br> sphinx: None<br> patsy: None<br> dateutil: 2.6.1<br> pytz: 2017.2<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> feather: None<br> matplotlib: None<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: 0.999999999<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.9.6<br> s3fs: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="149815976" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/12935" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/12935/hovercard" href="https://github.com/pandas-dev/pandas/pull/12935">#12935</a> added full support for duplicate column names (in header or in <code class="notranslate">names</code>) by mangling them. While this has been considered <em>acceptable</em> by users, ideally, we would like to not have to mangle them.</p>
1
<p dir="auto">It would be great if you could add <code class="notranslate">torch.pi</code>, which should return the constant 3.14159(etc).</p> <p dir="auto">Torch is highly desirable as a significantly faster alternative to numpy, implementing most of its functions. But it's missing a very basic thing, which is an easily accessible <code class="notranslate">pi</code> constant. It would be great and convenient if this simple thing were added.</p> <p dir="auto">As for implementation, literally linking to math.pi would be fine.</p> <p dir="auto">Currently, the only way to access <code class="notranslate">pi</code> would be to import it from another library like math/numpy, or to do <code class="notranslate">torch.asin(torch.tensor(1.))</code>.</p>
<p dir="auto">See title. I think this could be useful if you don't want to google it every time.</p>
1
<p dir="auto">It would be convenient to rewind video back and force to see the issue. Now it is required to download video to do so. Allure report support this, would be nice to have it in Html report.</p>
<p dir="auto"><strong>Context:</strong></p> <ul dir="auto"> <li>Playwright Version: 1.16.3</li> <li>Operating System: Mac</li> <li>Node.js version: 17.0.1</li> <li>Browser: Chromium</li> </ul> <p dir="auto"><strong>Code Snippet</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test } from &quot;@playwright/test&quot;; test(&quot;example&quot;, async ({ page }) =&gt; { await page.goto(&quot;https://www.google.com&quot;); const s = page.locator(&quot;input[name=q]&quot;); await s.fill(&quot;example&quot;); await page.waitForTimeout(5000); await s.fill(&quot;overwritten&quot;); await page.waitForTimeout(5000); }); "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"@playwright/test"</span><span class="pl-kos">;</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"example"</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">"https://www.google.com"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">s</span> <span class="pl-c1">=</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">"input[name=q]"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">s</span><span class="pl-kos">.</span><span class="pl-en">fill</span><span class="pl-kos">(</span><span class="pl-s">"example"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">waitForTimeout</span><span class="pl-kos">(</span><span class="pl-c1">5000</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">s</span><span class="pl-kos">.</span><span class="pl-en">fill</span><span class="pl-kos">(</span><span class="pl-s">"overwritten"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">waitForTimeout</span><span class="pl-kos">(</span><span class="pl-c1">5000</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>Describe the bug</strong></p> <p dir="auto">When trying to select other times (rewind/forward) on the video, the clip continues to play from its current location.</p> <p dir="auto">When I play the video in <code class="notranslate">test-results</code>, I can rewind/forward it as expected</p> <details open="" class="details-reset border rounded-2"> <summary class="px-3 py-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-camera-video"> <path d="M16 3.75v8.5a.75.75 0 0 1-1.136.643L11 10.575v.675A1.75 1.75 0 0 1 9.25 13h-7.5A1.75 1.75 0 0 1 0 11.25v-6.5C0 3.784.784 3 1.75 3h7.5c.966 0 1.75.784 1.75 1.75v.675l3.864-2.318A.75.75 0 0 1 16 3.75Zm-6.5 1a.25.25 0 0 0-.25-.25h-7.5a.25.25 0 0 0-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-6.5ZM11 8.825l3.5 2.1v-5.85l-3.5 2.1Z"></path> </svg> <span aria-label="Video description html.report.video.mp4" class="m-1">html.report.video.mp4</span> <span class="dropdown-caret"></span> </summary> <video src="https://user-images.githubusercontent.com/20273647/141875252-7d8f47fe-f6d7-474b-83fb-fa12174f9dae.mp4" data-canonical-src="https://user-images.githubusercontent.com/20273647/141875252-7d8f47fe-f6d7-474b-83fb-fa12174f9dae.mp4" controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" style="max-height:640px; min-height: 200px"> </video> </details>
1
<p dir="auto">Something has changed in numpy.distutils that is causing matplotlib to not build.</p> <p dir="auto">I've tried <code class="notranslate">git bisecting</code>, but the history seems a little convoluted and it isn't helping to find the issue.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 152, in save_modules yield saved File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 193, in setup_context yield File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 237, in run_setup DirectorySandbox(setup_dir).run(runner) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 267, in run return func() File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 236, in runner _execfile(setup_script, ns) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 46, in _execfile exec(code, globals, locals) File &quot;/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py&quot;, line 264, in &lt;module&gt; if isinstance(package, str): File &quot;/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py&quot;, line 256, in setup_package # Go through all of the packages and figure out which ones we are File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/core.py&quot;, line 135, in setup config = configuration() File &quot;/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py&quot;, line 156, in configuration File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 1001, in add_subpackage caller_level = 2) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 970, in get_subpackage caller_level = caller_level + 1) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 907, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File &quot;numpy/setup.py&quot;, line 11, in configuration from setuptools.command.test import test as TestCommand File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 1001, in add_subpackage caller_level = 2) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 970, in get_subpackage caller_level = caller_level + 1) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 882, in _get_configuration_from_setup_py ('.py', 'U', 1)) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/imp.py&quot;, line 234, in load_module return load_source(name, filename, file) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/imp.py&quot;, line 172, in load_source module = _load(spec) File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 693, in _load File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 673, in _load_unlocked File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 662, in exec_module File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 222, in _call_with_frames_removed File &quot;numpy/core/setup.py&quot;, line 13, in &lt;module&gt; import sys ImportError: No module named 'numpy._build_utils' During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;setup.py&quot;, line 381, in &lt;module&gt; **extra_args File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/distutils/core.py&quot;, line 108, in setup _setup_distribution = dist = klass(attrs) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/dist.py&quot;, line 268, in __init__ self.fetch_build_eggs(attrs['setup_requires']) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/dist.py&quot;, line 313, in fetch_build_eggs replace_conflicting=True, File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/__init__.py&quot;, line 836, in resolve dist = best[req.key] = env.best_match(req, ws, installer) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/__init__.py&quot;, line 1081, in best_match return self.obtain(req, installer) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/__init__.py&quot;, line 1093, in obtain return installer(requirement) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/dist.py&quot;, line 380, in fetch_build_egg return cmd.easy_install(req) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/command/easy_install.py&quot;, line 629, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/command/easy_install.py&quot;, line 659, in install_item dists = self.install_eggs(spec, download, tmpdir) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/command/easy_install.py&quot;, line 842, in install_eggs return self.build_and_install(setup_script, setup_base) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/command/easy_install.py&quot;, line 1070, in build_and_install self.run_setup(setup_script, setup_base, args) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/command/easy_install.py&quot;, line 1056, in run_setup run_setup(setup_script, args) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 240, in run_setup raise File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/contextlib.py&quot;, line 77, in __exit__ self.gen.throw(type, value, traceback) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 193, in setup_context yield File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/contextlib.py&quot;, line 77, in __exit__ self.gen.throw(type, value, traceback) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 164, in save_modules saved_exc.resume() File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 139, in resume compat.reraise(type, exc, self._tb) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/compat.py&quot;, line 65, in reraise raise value.with_traceback(tb) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 152, in save_modules yield saved File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 193, in setup_context yield File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 237, in run_setup DirectorySandbox(setup_dir).run(runner) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 267, in run return func() File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 236, in runner _execfile(setup_script, ns) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py&quot;, line 46, in _execfile exec(code, globals, locals) File &quot;/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py&quot;, line 264, in &lt;module&gt; if isinstance(package, str): File &quot;/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py&quot;, line 256, in setup_package # Go through all of the packages and figure out which ones we are File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/core.py&quot;, line 135, in setup config = configuration() File &quot;/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py&quot;, line 156, in configuration File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 1001, in add_subpackage caller_level = 2) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 970, in get_subpackage caller_level = caller_level + 1) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 907, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File &quot;numpy/setup.py&quot;, line 11, in configuration from setuptools.command.test import test as TestCommand File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 1001, in add_subpackage caller_level = 2) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 970, in get_subpackage caller_level = caller_level + 1) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py&quot;, line 882, in _get_configuration_from_setup_py ('.py', 'U', 1)) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/imp.py&quot;, line 234, in load_module return load_source(name, filename, file) File &quot;/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/imp.py&quot;, line 172, in load_source module = _load(spec) File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 693, in _load File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 673, in _load_unlocked File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 662, in exec_module File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 222, in _call_with_frames_removed File &quot;numpy/core/setup.py&quot;, line 13, in &lt;module&gt; import sys ImportError: No module named 'numpy._build_utils'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 152, in save_modules yield saved File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 193, in setup_context yield File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 237, in run_setup DirectorySandbox(setup_dir).run(runner) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 267, in run return func() File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 236, in runner _execfile(setup_script, ns) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 46, in _execfile exec(code, globals, locals) File "/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py", line 264, in &lt;module&gt; if isinstance(package, str): File "/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py", line 256, in setup_package # Go through all of the packages and figure out which ones we are File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/core.py", line 135, in setup config = configuration() File "/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py", line 156, in configuration File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 1001, in add_subpackage caller_level = 2) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 970, in get_subpackage caller_level = caller_level + 1) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 907, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "numpy/setup.py", line 11, in configuration from setuptools.command.test import test as TestCommand File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 1001, in add_subpackage caller_level = 2) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 970, in get_subpackage caller_level = caller_level + 1) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 882, in _get_configuration_from_setup_py ('.py', 'U', 1)) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/imp.py", line 234, in load_module return load_source(name, filename, file) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/imp.py", line 172, in load_source module = _load(spec) File "&lt;frozen importlib._bootstrap&gt;", line 693, in _load File "&lt;frozen importlib._bootstrap&gt;", line 673, in _load_unlocked File "&lt;frozen importlib._bootstrap_external&gt;", line 662, in exec_module File "&lt;frozen importlib._bootstrap&gt;", line 222, in _call_with_frames_removed File "numpy/core/setup.py", line 13, in &lt;module&gt; import sys ImportError: No module named 'numpy._build_utils' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "setup.py", line 381, in &lt;module&gt; **extra_args File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/distutils/core.py", line 108, in setup _setup_distribution = dist = klass(attrs) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/dist.py", line 268, in __init__ self.fetch_build_eggs(attrs['setup_requires']) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs replace_conflicting=True, File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/__init__.py", line 836, in resolve dist = best[req.key] = env.best_match(req, ws, installer) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1081, in best_match return self.obtain(req, installer) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1093, in obtain return installer(requirement) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/dist.py", line 380, in fetch_build_egg return cmd.easy_install(req) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 629, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 659, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 842, in install_eggs return self.build_and_install(setup_script, setup_base) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1070, in build_and_install self.run_setup(setup_script, setup_base, args) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1056, in run_setup run_setup(setup_script, args) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 240, in run_setup raise File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/contextlib.py", line 77, in __exit__ self.gen.throw(type, value, traceback) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 193, in setup_context yield File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/contextlib.py", line 77, in __exit__ self.gen.throw(type, value, traceback) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 164, in save_modules saved_exc.resume() File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 139, in resume compat.reraise(type, exc, self._tb) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/compat.py", line 65, in reraise raise value.with_traceback(tb) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 152, in save_modules yield saved File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 193, in setup_context yield File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 237, in run_setup DirectorySandbox(setup_dir).run(runner) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 267, in run return func() File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 236, in runner _execfile(setup_script, ns) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/setuptools/sandbox.py", line 46, in _execfile exec(code, globals, locals) File "/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py", line 264, in &lt;module&gt; if isinstance(package, str): File "/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py", line 256, in setup_package # Go through all of the packages and figure out which ones we are File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/core.py", line 135, in setup config = configuration() File "/tmp/easy_install-ywbtwurq/numpy-1.10.1/setup.py", line 156, in configuration File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 1001, in add_subpackage caller_level = 2) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 970, in get_subpackage caller_level = caller_level + 1) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 907, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "numpy/setup.py", line 11, in configuration from setuptools.command.test import test as TestCommand File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 1001, in add_subpackage caller_level = 2) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 970, in get_subpackage caller_level = caller_level + 1) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/distutils/misc_util.py", line 882, in _get_configuration_from_setup_py ('.py', 'U', 1)) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/imp.py", line 234, in load_module return load_source(name, filename, file) File "/home/mdboom/.pyenv/versions/3.5.0/lib/python3.5/imp.py", line 172, in load_source module = _load(spec) File "&lt;frozen importlib._bootstrap&gt;", line 693, in _load File "&lt;frozen importlib._bootstrap&gt;", line 673, in _load_unlocked File "&lt;frozen importlib._bootstrap_external&gt;", line 662, in exec_module File "&lt;frozen importlib._bootstrap&gt;", line 222, in _call_with_frames_removed File "numpy/core/setup.py", line 13, in &lt;module&gt; import sys ImportError: No module named 'numpy._build_utils' </code></pre></div>
<p dir="auto">NumPy prefers using <code class="notranslate">distutils</code> to <code class="notranslate">setuptools</code> for the <code class="notranslate">install</code> step and thus creation of the <code class="notranslate">egg-info</code> filename. This means that the <code class="notranslate">egg-info</code> filename gets the <code class="notranslate">+</code> in the version replaced with <code class="notranslate">_</code> and written out as <code class="notranslate">numpy-1.11.0.dev0_2329eae.egg-info</code>, despite the fact that the version is <code class="notranslate">numpy-1.11.0.dev0+2329eae</code>.</p> <p dir="auto">This causes a problem for satisfying requirements for other packages, since <code class="notranslate">setuptools</code> sees this as a <code class="notranslate">LegacyVersion</code> (after replacing the <code class="notranslate">_</code> with a <code class="notranslate">-</code> in the filename), and thus you can get errors like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pkg_resources.VersionConflict: (numpy 1.11.0.dev0-2329eae (/home/larsoner/.local/lib/python2.7/site-packages), Requirement.parse('numpy&gt;=1.6.1'))"><pre class="notranslate"><code class="notranslate">pkg_resources.VersionConflict: (numpy 1.11.0.dev0-2329eae (/home/larsoner/.local/lib/python2.7/site-packages), Requirement.parse('numpy&gt;=1.6.1')) </code></pre></div> <p dir="auto">One solution that might work is using <code class="notranslate">setuptools</code> for the <code class="notranslate">install</code> step, because <code class="notranslate">setuptools</code> creates the name with the <code class="notranslate">+</code> in it and it thus gets parsed properly. However, given the lengths taken to triage <code class="notranslate">distutils</code> vs <code class="notranslate">setuptools</code> in that step, I assume there is a reason why <code class="notranslate">distutils</code> is preferred. And it looks like back in 2013 this was addressed:</p> <p dir="auto"><a class="commit-link" href="https://github.com/scipy/scipy/commit/a4e93fbd1c1e192b699e1ff545236dab7cffc579#diff-2eeaed663bd0d25b7e608891384b7298L185">scipy/scipy@<tt>a4e93fb</tt>#diff-2eeaed663bd0d25b7e608891384b7298L185</a></p> <p dir="auto">Maybe <code class="notranslate">setuptools</code> would be okay to use now...?</p> <p dir="auto">Related <code class="notranslate">setuptools</code> ticket:</p> <p dir="auto"><a href="https://bitbucket.org/pypa/setuptools/issues/419/setuptools-pkg_resources-fails-to-detect" rel="nofollow">https://bitbucket.org/pypa/setuptools/issues/419/setuptools-pkg_resources-fails-to-detect</a></p> <p dir="auto">Any ideas for how to solve this problem?</p>
1
<p dir="auto">This could just be a limitation of my knowledge of bespoke css, but it seems there is redundant code in /dist/css/bootstrap.css (and, presumably in the .min file).</p> <p dir="auto">Lines 723 - 761 contain repeats, e.g.,</p> <pre class="notranslate">.container:before, .container:after { display: table; content: " "; } .container:after { clear: both; } .container:before, .container:after { display: table; content: " "; } </pre> <p dir="auto">etc. I did not see this anywhere else in the .css issues, so I apologize if this is known.</p>
<p dir="auto">show on bootstrap.css</p> <p dir="auto"><a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L581">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L581</a><br> <a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L723">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L723</a><br> <a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L743">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L743</a><br> <a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2023">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2023</a><br> <a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2433">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2433</a><br> <a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2617">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2617</a><br> <a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2637">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L2637</a><br> <a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3032">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3032</a><br> <a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3296">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3296</a><br> <a href="https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3453">https://github.com/twbs/bootstrap/blob/3.0.0-wip/dist/css/bootstrap.css#L3453</a></p>
1
<p dir="auto">I'm using Glide 3.7.0 to load images from local storage to a <strong><code class="notranslate">ListView</code></strong> in an appwidget. Here's a part of my code:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="BitmapRequestBuilder builder = Glide.with(context) .load(pathName) // absolute path of local image file .asBitmap() .override(width, height) .centerCrop(); FutureTarget futureTarget = builder.into(width, height); try { remoteViews.setImageViewBitmap(R.id.iv_image_attachment, (Bitmap) futureTarget.get()); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); }"><pre class="notranslate"><span class="pl-smi">BitmapRequestBuilder</span> <span class="pl-s1">builder</span> = <span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">context</span>) .<span class="pl-en">load</span>(<span class="pl-s1">pathName</span>) <span class="pl-c">// absolute path of local image file</span> .<span class="pl-en">asBitmap</span>() .<span class="pl-en">override</span>(<span class="pl-s1">width</span>, <span class="pl-s1">height</span>) .<span class="pl-en">centerCrop</span>(); <span class="pl-smi">FutureTarget</span> <span class="pl-s1">futureTarget</span> = <span class="pl-s1">builder</span>.<span class="pl-en">into</span>(<span class="pl-s1">width</span>, <span class="pl-s1">height</span>); <span class="pl-k">try</span> { <span class="pl-s1">remoteViews</span>.<span class="pl-en">setImageViewBitmap</span>(<span class="pl-smi">R</span>.<span class="pl-s1">id</span>.<span class="pl-s1">iv_image_attachment</span>, (<span class="pl-smi">Bitmap</span>) <span class="pl-s1">futureTarget</span>.<span class="pl-en">get</span>()); } <span class="pl-k">catch</span> (<span class="pl-smi">InterruptedException</span> | <span class="pl-smi">ExecutionException</span> <span class="pl-s1">e</span>) { <span class="pl-s1">e</span>.<span class="pl-en">printStackTrace</span>(); }</pre></div> <p dir="auto">I didn't use <code class="notranslate">Glide.with(context).asBitmap().into(AppWidgetTarget)</code> because it's useless to load image for <strong><code class="notranslate">ListView</code></strong> in appwidget. Anyway, above code will be executed in <code class="notranslate">RemoteViewsFactory#getViewAt(int position)</code> inside my custom <code class="notranslate">RemoteViewsService</code>. It can work well at most time, but sometimes I will get following error info with images not loaded:</p> <div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="java.lang.SecurityException: ConnectivityService: Neither user 10214 nor current process has android.permission.ACCESS_NETWORK_STATE. at android.os.Parcel.readException(Parcel.java:1620) at android.os.Parcel.readException(Parcel.java:1573) at android.net.IConnectivityManager$Stub$Proxy.getActiveNetworkInfo(IConnectivityManager.java:1029) at android.net.ConnectivityManager.getActiveNetworkInfo(ConnectivityManager.java:667) at com.bumptech.glide.manager.DefaultConnectivityMonitor.isConnected(DefaultConnectivityMonitor.java:55) at com.bumptech.glide.manager.DefaultConnectivityMonitor.register(DefaultConnectivityMonitor.java:38) at com.bumptech.glide.manager.DefaultConnectivityMonitor.onStart(DefaultConnectivityMonitor.java:61) at com.bumptech.glide.manager.ApplicationLifecycle.addListener(ApplicationLifecycle.java:15) at com.bumptech.glide.RequestManager.&lt;init&gt;(RequestManager.java:81) at com.bumptech.glide.RequestManager.&lt;init&gt;(RequestManager.java:53) at com.bumptech.glide.manager.RequestManagerRetriever.getApplicationManager(RequestManagerRetriever.java:73) at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:95) at com.bumptech.glide.Glide.with(Glide.java:629)"><pre class="notranslate"><span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">SecurityException</span>: <span class="pl-pds">ConnectivityService</span>: <span class="pl-v">Neither</span> <span class="pl-en">user</span> <span class="pl-c1">10214</span> <span class="pl-en">nor</span> <span class="pl-en">current</span> <span class="pl-en">process</span> <span class="pl-en">has</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">permission</span><span class="pl-kos">.</span><span class="pl-en">ACCESS_NETWORK_STATE</span><span class="pl-kos">.</span> <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">Parcel</span><span class="pl-kos">.</span><span class="pl-en">readException</span><span class="pl-kos">(</span><span class="pl-v">Parcel</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1620</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">Parcel</span><span class="pl-kos">.</span><span class="pl-en">readException</span><span class="pl-kos">(</span><span class="pl-v">Parcel</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1573</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">net</span><span class="pl-kos">.</span><span class="pl-en">IConnectivityManager</span>$Stub$Proxy<span class="pl-kos">.</span><span class="pl-en">getActiveNetworkInfo</span><span class="pl-kos">(</span><span class="pl-v">IConnectivityManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1029</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">net</span><span class="pl-kos">.</span><span class="pl-en">ConnectivityManager</span><span class="pl-kos">.</span><span class="pl-en">getActiveNetworkInfo</span><span class="pl-kos">(</span><span class="pl-v">ConnectivityManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:667</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">manager</span><span class="pl-kos">.</span><span class="pl-en">DefaultConnectivityMonitor</span><span class="pl-kos">.</span><span class="pl-en">isConnected</span><span class="pl-kos">(</span><span class="pl-v">DefaultConnectivityMonitor</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:55</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">manager</span><span class="pl-kos">.</span><span class="pl-en">DefaultConnectivityMonitor</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-v">DefaultConnectivityMonitor</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:38</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">manager</span><span class="pl-kos">.</span><span class="pl-en">DefaultConnectivityMonitor</span><span class="pl-kos">.</span><span class="pl-en">onStart</span><span class="pl-kos">(</span><span class="pl-v">DefaultConnectivityMonitor</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:61</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">manager</span><span class="pl-kos">.</span><span class="pl-en">ApplicationLifecycle</span><span class="pl-kos">.</span><span class="pl-en">addListener</span><span class="pl-kos">(</span><span class="pl-v">ApplicationLifecycle</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:15</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">RequestManager</span><span class="pl-kos">.</span>&lt;<span class="pl-en">init</span>&gt;<span class="pl-kos">(</span><span class="pl-v">RequestManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:81</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">RequestManager</span><span class="pl-kos">.</span>&lt;<span class="pl-en">init</span>&gt;<span class="pl-kos">(</span><span class="pl-v">RequestManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:53</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">manager</span><span class="pl-kos">.</span><span class="pl-en">RequestManagerRetriever</span><span class="pl-kos">.</span><span class="pl-en">getApplicationManager</span><span class="pl-kos">(</span><span class="pl-v">RequestManagerRetriever</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:73</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">manager</span><span class="pl-kos">.</span><span class="pl-en">RequestManagerRetriever</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-v">RequestManagerRetriever</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:95</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">Glide</span><span class="pl-kos">.</span><span class="pl-en">with</span><span class="pl-kos">(</span><span class="pl-v">Glide</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:629</span><span class="pl-kos">)</span></pre></div> <p dir="auto">It seems that this exception is caused by checking network state without corresponding permission. I didn't request <code class="notranslate">ACCESS_NETWORK_STATUS</code> permission in <code class="notranslate">AndroidManifest.xml</code> indeed, but my app really doesn't need this permission. In my user case, Glide will only be used to load images from local storage so I think it should not do such kind of operation like checking network state. Maybe it's designed for loading images from everywhere including Internet(OK, perhaps this is most important user case), but I think it should handle this mistake if it's not asked to load images from Internet, and then load images correctly.<br> Thank you.</p>
<p dir="auto"><strong>Glide Version</strong>: 4.7.1</p> <p dir="auto"><strong>Device/Android Version</strong>: HTC Desire 820 5.0.2</p> <p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:<br> I want to show the video thumbnail with mp4 source from server and it work with default diskCacheStrategy.<br> But the Android Profiler - Network Profiler show Glide load whole video source, it take too much time.<br> So I set diskCacheStrategy to <code class="notranslate">DiskCacheStrategy.RESOURCE</code> then I got <code class="notranslate">FileNotFoundException</code>.</p> <p dir="auto">Not only <code class="notranslate">DiskCacheStrategy.RESOURCE</code> but also <code class="notranslate">DiskCacheStrategy.NONE</code>.</p> <p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:<br> Success</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="GlideApp.with(context) .load(url) // .mp4 .into(imageVIew)"><pre class="notranslate"><span class="pl-smi">GlideApp</span>.<span class="pl-en">with</span>(<span class="pl-s1">context</span>) .<span class="pl-en">load</span>(<span class="pl-s1">url</span>) <span class="pl-c">// .mp4</span> .<span class="pl-en">into</span>(<span class="pl-s1">imageVIew</span>)</pre></div> <p dir="auto">Failure</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GlideApp.with(context) .load(url) // .mp4 .diskCacheStrategy(DiskCacheStrategy.RESOURCE) .into(imageVIew)"><pre class="notranslate"><code class="notranslate">GlideApp.with(context) .load(url) // .mp4 .diskCacheStrategy(DiskCacheStrategy.RESOURCE) .into(imageVIew) </code></pre></div> <p dir="auto"><strong>Stack trace / LogCat</strong>:</p> <div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Root cause (1 of 1) java.io.FileNotFoundException: No content provider: private url at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1131) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:986) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:913) at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:22) at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:13) at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:44) at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302) at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:418) at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:379) at com.bumptech.glide.load.engine.SourceGenerator.onDataReady(SourceGenerator.java:112) at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.onDataReady(MultiModelLoader.java:135) at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:60) at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:99) at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302) at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:272) at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)"><pre class="notranslate"><span class="pl-en">Root</span> <span class="pl-en">cause</span> <span class="pl-kos">(</span><span class="pl-c1">1</span> <span class="pl-en">of</span> <span class="pl-c1">1</span><span class="pl-kos">)</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">io</span><span class="pl-kos">.</span><span class="pl-en">FileNotFoundException</span>: <span class="pl-en">No</span> <span class="pl-en">content</span> <span class="pl-pds">provider</span>: <span class="pl-k">private</span> <span class="pl-en">url</span> <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">content</span><span class="pl-kos">.</span><span class="pl-en">ContentResolver</span><span class="pl-kos">.</span><span class="pl-en">openTypedAssetFileDescriptor</span><span class="pl-kos">(</span><span class="pl-v">ContentResolver</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1131</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">content</span><span class="pl-kos">.</span><span class="pl-en">ContentResolver</span><span class="pl-kos">.</span><span class="pl-en">openAssetFileDescriptor</span><span class="pl-kos">(</span><span class="pl-v">ContentResolver</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:986</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">content</span><span class="pl-kos">.</span><span class="pl-en">ContentResolver</span><span class="pl-kos">.</span><span class="pl-en">openAssetFileDescriptor</span><span class="pl-kos">(</span><span class="pl-v">ContentResolver</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:913</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">data</span><span class="pl-kos">.</span><span class="pl-en">AssetFileDescriptorLocalUriFetcher</span><span class="pl-kos">.</span><span class="pl-en">loadResource</span><span class="pl-kos">(</span><span class="pl-v">AssetFileDescriptorLocalUriFetcher</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:22</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">data</span><span class="pl-kos">.</span><span class="pl-en">AssetFileDescriptorLocalUriFetcher</span><span class="pl-kos">.</span><span class="pl-en">loadResource</span><span class="pl-kos">(</span><span class="pl-v">AssetFileDescriptorLocalUriFetcher</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:13</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">data</span><span class="pl-kos">.</span><span class="pl-en">LocalUriFetcher</span><span class="pl-kos">.</span><span class="pl-en">loadData</span><span class="pl-kos">(</span><span class="pl-v">LocalUriFetcher</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:44</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">SourceGenerator</span><span class="pl-kos">.</span><span class="pl-en">startNext</span><span class="pl-kos">(</span><span class="pl-v">SourceGenerator</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:62</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">runGenerators</span><span class="pl-kos">(</span><span class="pl-v">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:302</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">decodeFromRetrievedData</span><span class="pl-kos">(</span><span class="pl-v">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:418</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">onDataFetcherReady</span><span class="pl-kos">(</span><span class="pl-v">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:379</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">SourceGenerator</span><span class="pl-kos">.</span><span class="pl-en">onDataReady</span><span class="pl-kos">(</span><span class="pl-v">SourceGenerator</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:112</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">model</span><span class="pl-kos">.</span><span class="pl-en">MultiModelLoader</span>$MultiFetcher<span class="pl-kos">.</span><span class="pl-en">onDataReady</span><span class="pl-kos">(</span><span class="pl-v">MultiModelLoader</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:135</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">data</span><span class="pl-kos">.</span><span class="pl-en">HttpUrlFetcher</span><span class="pl-kos">.</span><span class="pl-en">loadData</span><span class="pl-kos">(</span><span class="pl-v">HttpUrlFetcher</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:60</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">model</span><span class="pl-kos">.</span><span class="pl-en">MultiModelLoader</span>$MultiFetcher<span class="pl-kos">.</span><span class="pl-en">loadData</span><span class="pl-kos">(</span><span class="pl-v">MultiModelLoader</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:99</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">SourceGenerator</span><span class="pl-kos">.</span><span class="pl-en">startNext</span><span class="pl-kos">(</span><span class="pl-v">SourceGenerator</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:62</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">runGenerators</span><span class="pl-kos">(</span><span class="pl-v">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:302</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">runWrapped</span><span class="pl-kos">(</span><span class="pl-v">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:272</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">DecodeJob</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:233</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">util</span><span class="pl-kos">.</span><span class="pl-en">concurrent</span><span class="pl-kos">.</span><span class="pl-en">ThreadPoolExecutor</span><span class="pl-kos">.</span><span class="pl-en">runWorker</span><span class="pl-kos">(</span><span class="pl-v">ThreadPoolExecutor</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1112</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">util</span><span class="pl-kos">.</span><span class="pl-en">concurrent</span><span class="pl-kos">.</span><span class="pl-en">ThreadPoolExecutor</span>$Worker<span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">ThreadPoolExecutor</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:587</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">Thread</span><span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">Thread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:818</span><span class="pl-kos">)</span> <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">bumptech</span><span class="pl-kos">.</span><span class="pl-en">glide</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">.</span><span class="pl-en">engine</span><span class="pl-kos">.</span><span class="pl-en">executor</span><span class="pl-kos">.</span><span class="pl-en">GlideExecutor</span>$DefaultThreadFactory$1<span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">GlideExecutor</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:446</span><span class="pl-kos">)</span></pre></div>
0
<p dir="auto">version: go version go1.5 darwin/amd64</p> <p dir="auto">There is an example about variable initialization order in the go specs:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var ( a = c + b b = f() c = f() d = 3 ) func f() int { d++ return d } "><pre class="notranslate"><code class="notranslate">var ( a = c + b b = f() c = f() d = 3 ) func f() int { d++ return d } </code></pre></div> <p dir="auto">the spec gives the initialization order is d, b, c, a. but the result of above example is not the same as the order spec gives.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package main import &quot;fmt&quot; var ( a = c + b b = f() c = f() d = 3 ) func f() int { d++ return d } func main() { fmt.Println(a, b, c, d) }"><pre class="notranslate"><code class="notranslate">package main import "fmt" var ( a = c + b b = f() c = f() d = 3 ) func f() int { d++ return d } func main() { fmt.Println(a, b, c, d) } </code></pre></div> <p dir="auto">$go run example.go<br> 9 5 4 5</p> <p dir="auto">according to the result, the actual init order should be d ,c ,b, a, not the same as the order in spec.</p>
<pre class="notranslate">$ cat incorrect_init.go package main var ( a = p("a") + c + b b = p("b") + f() c = p("c") + f() d = p("d") + 3 ) func f() int { d++ return d } func p(s string) int { println(s) return 0 } func main() { println(a, b, c, d) } compiling and executing produces: $ go run incorrect_init.go d c b a 9 5 4 5 But the correct order per the spec should be: d, b, c, a, with values 9, 4, 5, 5. See: <a href="http://tip.golang.org/ref/spec#Package_initialization" rel="nofollow">http://tip.golang.org/ref/spec#Package_initialization</a></pre>
1
<p dir="auto">This is my simple code in index.js</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="globalShortcut.register(&quot;CmdOrCtrl+q&quot;, () =&gt; { app.isQuiting = true; app.quit(); }) "><pre class="notranslate"><code class="notranslate">globalShortcut.register("CmdOrCtrl+q", () =&gt; { app.isQuiting = true; app.quit(); }) </code></pre></div> <p dir="auto">This works fine. But when used via an azerty keyboard, CMD + A is triggering the actions inside this block.</p> <h3 dir="auto">Issue Details</h3> <ul dir="auto"> <li><strong>Electron Version:</strong> <ul dir="auto"> <li>8</li> </ul> </li> <li><strong>Operating System:</strong> <ul dir="auto"> <li>Mac 10.15.7</li> </ul> </li> </ul> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">CMD + A should select all</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">CMD + A is triggering events for CMD + Q</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> <ul dir="auto"> <li>9.0.0-beta.2</li> <li>8.0.1</li> <li>7.1.13</li> <li>7.0.0</li> </ul> </li> <li><strong>Operating System:</strong> <ul dir="auto"> <li><code class="notranslate">Linux xps 5.5.4-arch1-1 #1 SMP PREEMPT Sat, 15 Feb 2020 00:36:29 +0000 x86_64 GNU/Linux</code> (Arch Linux current)</li> <li>macOS 10.15.3</li> </ul> </li> <li><strong>Last Known Working Electron version:</strong> <ul dir="auto"> <li>6.1.8 -- fine, not affected</li> </ul> </li> </ul> <h3 dir="auto">Expected Behavior</h3> <ul dir="auto"> <li>When <code class="notranslate">safeDialogs</code> option is used, I expect to see a "Prevent this app from creating additional dialogs" checkbox on all alerts after the first one, like it happened in Electron 6.1.8.</li> <li>I expect <code class="notranslate">safeDialogs</code> option to do at least something.</li> </ul> <p dir="auto">Basically, how 6.x behaves.</p> <h3 dir="auto">Actual Behavior</h3> <ul dir="auto"> <li>That checkbox does not appear on second alert, or on any other subsequent alert (tried about 10).</li> <li>There seems to no observable difference at all between turning that option on or off.</li> </ul> <h3 dir="auto">To Reproduce</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { BrowserWindow, app } = require('electron') app.on('ready', () =&gt; { const window = new BrowserWindow({ webPreferences: { //partition: 'memory', safeDialogs: true, } }) window.webContents.loadURL('about:blank') // also could be e.g. https://example.com/ window.webContents.on('did-finish-load', () =&gt; { window.webContents.executeJavaScript(` document.body.innerText = window.navigator.userAgent // (not required) alert(0) setTimeout(() =&gt; { alert(1) }, 100) // timeout for UA to be shown `) }) window.show() })"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> BrowserWindow<span class="pl-kos">,</span> app <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'ready'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">window</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">webPreferences</span>: <span class="pl-kos">{</span> <span class="pl-c">//partition: 'memory',</span> <span class="pl-c1">safeDialogs</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-s1">window</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s">'about:blank'</span><span class="pl-kos">)</span> <span class="pl-c">// also could be e.g. https://example.com/</span> <span class="pl-s1">window</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'did-finish-load'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">window</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">executeJavaScript</span><span class="pl-kos">(</span><span class="pl-s">`</span> <span class="pl-s"> document.body.innerText = window.navigator.userAgent // (not required)</span> <span class="pl-s"> alert(0)</span> <span class="pl-s"> setTimeout(() =&gt; { alert(1) }, 100) // timeout for UA to be shown</span> <span class="pl-s"> `</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-s1">window</span><span class="pl-kos">.</span><span class="pl-en">show</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">Screenshots</h3> <h4 dir="auto">v6.1.8 (correct behavior)</h4> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/291301/75118279-dad32380-5689-11ea-84bd-fbb93d3fefb2.png"><img src="https://user-images.githubusercontent.com/291301/75118279-dad32380-5689-11ea-84bd-fbb93d3fefb2.png" alt="Screenshot_20200223_221526" style="max-width: 100%;"></a></p> <h4 dir="auto">v7.0.0</h4> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/291301/75118399-e410c000-568a-11ea-8b3b-e414cb0b8c6b.png"><img src="https://user-images.githubusercontent.com/291301/75118399-e410c000-568a-11ea-8b3b-e414cb0b8c6b.png" alt="Screenshot_20200223_222330" style="max-width: 100%;"></a></p> <h4 dir="auto">v7.1.13</h4> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/291301/75118348-5f25a680-568a-11ea-8a18-7fb253ea90e6.png"><img src="https://user-images.githubusercontent.com/291301/75118348-5f25a680-568a-11ea-8a18-7fb253ea90e6.png" alt="Screenshot_20200223_221938" style="max-width: 100%;"></a></p> <h4 dir="auto">v8.0.1</h4> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/291301/75118421-115d6e00-568b-11ea-9d1e-30dc4201fb17.png"><img src="https://user-images.githubusercontent.com/291301/75118421-115d6e00-568b-11ea-9d1e-30dc4201fb17.png" alt="Screenshot_20200223_222409" style="max-width: 100%;"></a></p> <h4 dir="auto">9.0.0-beta.2</h4> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/291301/75118467-7ca74000-568b-11ea-830f-2cfe2a11ba73.png"><img src="https://user-images.githubusercontent.com/291301/75118467-7ca74000-568b-11ea-830f-2cfe2a11ba73.png" alt="Screenshot_20200223_222754" style="max-width: 100%;"></a></p> <h3 dir="auto"></h3> <h3 dir="auto">Additional Information</h3> <ul dir="auto"> <li>Documented here: <a href="https://www.electronjs.org/docs/api/browser-window#new-browserwindowoptions" rel="nofollow">https://www.electronjs.org/docs/api/browser-window#new-browserwindowoptions</a></li> <li>This does not seem to be a duplicate of closed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="425188730" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/17543" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/17543/hovercard" href="https://github.com/electron/electron/issues/17543">#17543</a>, as this affects only versions starting from v7.0.0.</li> <li>This does not seem to be a problem of specific configuration/url/scheme/whatever -- I was not able to make that option work on a recent Electron version with any attempted configuration.</li> </ul>
0
<p dir="auto">I am trying to view image using Glide Library for some reason the background is coming up green/white.. I am checked the image URL the background is transparent. First time the images show up properly but when I open the APP again the images have green/white background. I am not sure why this is happening could be a bug?</p> <p dir="auto">Here are the code:</p> <p dir="auto">activityadapter.xml:</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;RelativeLayout android:id=&quot;@+id/abcd&quot; android:layout_width=&quot;120dp&quot; android:layout_height=&quot;120dp&quot; android:layout_centerHorizontal=&quot;true&quot; android:gravity=&quot;center_vertical&quot;&gt; &lt;ImageView android:id=&quot;@+id/grid_item_image&quot; android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;wrap_content&quot; android:layout_centerHorizontal=&quot;true&quot; android:layout_centerInParent=&quot;true&quot; tools:ignore=&quot;ContentDescription&quot; /&gt; &lt;/RelativeLayout&gt;"><pre class="notranslate">&lt;<span class="pl-ent">RelativeLayout</span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/abcd<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>120dp<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>120dp<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_centerHorizontal</span>=<span class="pl-s"><span class="pl-pds">"</span>true<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">gravity</span>=<span class="pl-s"><span class="pl-pds">"</span>center_vertical<span class="pl-pds">"</span></span>&gt; &lt;<span class="pl-ent">ImageView</span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/grid_item_image<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>wrap_content<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_centerHorizontal</span>=<span class="pl-s"><span class="pl-pds">"</span>true<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_centerInParent</span>=<span class="pl-s"><span class="pl-pds">"</span>true<span class="pl-pds">"</span></span> <span class="pl-e">tools</span><span class="pl-e">:</span><span class="pl-e">ignore</span>=<span class="pl-s"><span class="pl-pds">"</span>ContentDescription<span class="pl-pds">"</span></span> /&gt; &lt;/<span class="pl-ent">RelativeLayout</span>&gt;</pre></div> <p dir="auto">activityAdapter.java: Put all the images inside listview:<br> Has glide details from aDapter:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(DetailActivity.this) .load(pd.getImage()) .diskCacheStrategy(DiskCacheStrategy.ALL) .fitCenter() .dontTransform() .crossFade() .into(imageProduct);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-smi">DetailActivity</span>.<span class="pl-smi">this</span>) .<span class="pl-en">load</span>(<span class="pl-s1">pd</span>.<span class="pl-en">getImage</span>()) .<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">ALL</span>) .<span class="pl-en">fitCenter</span>() .<span class="pl-en">dontTransform</span>() .<span class="pl-en">crossFade</span>() .<span class="pl-en">into</span>(<span class="pl-s1">imageProduct</span>);</pre></div> <p dir="auto">Screenshot:</p> <p dir="auto">Check the black marks: They have green background - It should be transparent which happens the first time it loads.</p> <p dir="auto">{removed}</p> <p dir="auto">Is this a bug or am I doing something wrong?</p>
<p dir="auto">This is the original image:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/784063/8439742/bbe02ae8-1f22-11e5-8676-c7a1d525782d.jpg"><img src="https://cloud.githubusercontent.com/assets/784063/8439742/bbe02ae8-1f22-11e5-8676-c7a1d525782d.jpg" alt="9k_" style="max-width: 100%;"></a></p> <p dir="auto">This is the image rendered using Glide and ImageView:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/784063/8439751/cd1b0864-1f22-11e5-96c8-f3ee83b75f72.png"><img src="https://cloud.githubusercontent.com/assets/784063/8439751/cd1b0864-1f22-11e5-96c8-f3ee83b75f72.png" alt="screen shot 2015-06-30 at 12 16 04 pm" style="max-width: 100%;"></a></p> <p dir="auto">I'm already using the ARGB_8888 option with the following initialization code:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="new GlideBuilder(this).setDecodeFormat(DecodeFormat.PREFER_ARGB_8888);"><pre class="notranslate"><span class="pl-k">new</span> <span class="pl-smi">GlideBuilder</span>(<span class="pl-smi">this</span>).<span class="pl-en">setDecodeFormat</span>(<span class="pl-smi">DecodeFormat</span>.<span class="pl-c1">PREFER_ARGB_8888</span>);</pre></div> <p dir="auto">Switching to Picasso does seem to resolve the problem. What might be wrong here?</p>
1
<p dir="auto">When I run example in nextjs. Do <code class="notranslate">yarn</code> and <code class="notranslate">yarn dev</code> to run the demo application. Hit to <code class="notranslate">http://localhost:3000</code> then it throw the error <code class="notranslate">is not a function</code></p> <ul dir="auto"> <li>[ 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.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Can call the <code class="notranslate">createGenerateClasName</code> as usually</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Error throwed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: (0 , _styles.createGenerateClassName) is not a function at createContext (/Users/nampdn/Projects/wfc/@example/nextjs/styles/getContext.js:20:3) at getContext (/Users/nampdn/Projects/wfc/@example/nextjs/styles/getContext.js:35:5) at Function.MyDocument.getInitialProps (/Users/nampdn/Projects/wfc/@example/nextjs/pages/_document.js:61:3) at _callee$ (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/next/dist/lib/utils.js:36:30) at tryCatch (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/regenerator-runtime/runtime.js:62:40) at Generator.invoke [as _invoke] (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/regenerator-runtime/runtime.js:296:22) at Generator.prototype.(anonymous function) [as next] (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/regenerator-runtime/runtime.js:114:21) at step (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30) at /Users/nampdn/Projects/wfc/@example/nextjs/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14 at new Promise (&lt;anonymous&gt;)"><pre class="notranslate"><code class="notranslate">TypeError: (0 , _styles.createGenerateClassName) is not a function at createContext (/Users/nampdn/Projects/wfc/@example/nextjs/styles/getContext.js:20:3) at getContext (/Users/nampdn/Projects/wfc/@example/nextjs/styles/getContext.js:35:5) at Function.MyDocument.getInitialProps (/Users/nampdn/Projects/wfc/@example/nextjs/pages/_document.js:61:3) at _callee$ (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/next/dist/lib/utils.js:36:30) at tryCatch (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/regenerator-runtime/runtime.js:62:40) at Generator.invoke [as _invoke] (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/regenerator-runtime/runtime.js:296:22) at Generator.prototype.(anonymous function) [as next] (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/regenerator-runtime/runtime.js:114:21) at step (/Users/nampdn/Projects/wfc/@example/nextjs/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30) at /Users/nampdn/Projects/wfc/@example/nextjs/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14 at new Promise (&lt;anonymous&gt;) </code></pre></div> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li><code class="notranslate">curl https://codeload.github.com/mui-org/material-ui/tar.gz/v1-beta | tar -xz --strip=2 material-ui-1-beta/examples/nextjs</code></li> <li><code class="notranslate">cd nextjs</code></li> <li><code class="notranslate">yarn</code></li> <li><code class="notranslate">yarn dev</code></li> <li>Open browser: <code class="notranslate">http://localhost:3000</code></li> </ol> <h2 dir="auto">Context</h2> <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.24</td> </tr> <tr> <td>React</td> <td>16.2</td> </tr> <tr> <td>browser</td> <td>Chrome</td> </tr> <tr> <td>OS</td> <td>MacOS</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">App should start without issue with MUI compiling properly.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">I get the following error after installing v0.20.0 and running <code class="notranslate">npm start</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Failed to compile ./node_modules/@devexpress/dx-react-grid-material-ui/dist/dx-react-grid-material-ui.es.js 1071:4-18 'material-ui' does not contain an export named 'TableSortLabel'."><pre class="notranslate"><code class="notranslate">Failed to compile ./node_modules/@devexpress/dx-react-grid-material-ui/dist/dx-react-grid-material-ui.es.js 1071:4-18 'material-ui' does not contain an export named 'TableSortLabel'. </code></pre></div> <p dir="auto">When l look in the <code class="notranslate">node_modules</code> folder, there is no <code class="notranslate">TableSortLabel.js</code> file in the <code class="notranslate">Table</code> folder. I do see it in the repo though (<a href="https://github.com/mui-org/material-ui/blob/v1-beta/src/Table/TableSortLabel.js">https://github.com/mui-org/material-ui/blob/v1-beta/src/Table/TableSortLabel.js</a>).</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li><code class="notranslate">npm uninstall material-ui</code></li> <li><code class="notranslate">npm install material-ui@latest</code></li> <li>Start your app (<code class="notranslate">npm start</code>, <code class="notranslate">yarn start</code>, etc.)</li> <li>See the "Failed to Compile" error.</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">Can not start app with lastest version of MUI.</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.20.0</td> </tr> <tr> <td>React</td> <td>15.6.1</td> </tr> <tr> <td>browser</td> <td>all</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
0
<p dir="auto"><strong>Proposed feature</strong></p> <p dir="auto">I have often had to use interpolation to plot the mean ROC or PR curves of several classifiers, as the number of thresholds can be distinct for each und thus their TPR, FPR, precision, and recall lengths vary. I thought it would be convenient to add a function argument "interp_dim" to the functions "roc_curve" and "precision_recall_curve" so the user can ensure that all classifier metrics have the same lengths, which would make it easier to plot the average.</p> <p dir="auto"><strong>Proposed solution</strong></p> <p dir="auto">Perform numpy interpolation on TPR, FPR, precision and recall arrays to ensure they have the same length (as specified by the "interp_dim" function argument), which simplifies the computation of the mean.</p> <p dir="auto">I opened this issue to see if this idea receives support from the community before making a pull request.</p>
<p dir="auto">Hi,</p> <p dir="auto">Scikit Learn seems to implement Precision Recall curves (and Average Precision values/AUC under PR curve) in a non-standard way, without documenting the discrepancy. The standard way of computing Precision Recall numbers is by interpolating the curve, as described here:<br> <a href="http://nlp.stanford.edu/IR-book/html/htmledition/evaluation-of-ranked-retrieval-results-1.html" rel="nofollow">http://nlp.stanford.edu/IR-book/html/htmledition/evaluation-of-ranked-retrieval-results-1.html</a><br> the motivation is to</p> <ol dir="auto"> <li>Smooth out the kinks and reduce noise contribution to the score</li> <li>In any practical application, if your PR curve ever went up, then you would strictly prefer to set your threshold there rather than at the original place (achieving both more precision and recall). Hence, people prefer to interpolate the curve, which better integrates out the threshold parameter and gives a more sensible estimate of the real performance.</li> </ol> <p dir="auto">This is also what standard code for Pascal VOC does and explain this in their writeup:<br> <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.157.5766&amp;rep=rep1&amp;type=pdf" rel="nofollow">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.157.5766&amp;rep=rep1&amp;type=pdf</a></p> <p dir="auto">VL_FEAT also has options for interpolation:<br> <a href="http://www.vlfeat.org/matlab/vl_pr.html" rel="nofollow">http://www.vlfeat.org/matlab/vl_pr.html</a><br> and as shown in their code here: <a href="https://github.com/vlfeat/vlfeat/blob/edc378a722ea0d79e29f4648a54bb62f32b22568/toolbox/plotop/vl_pr.m">https://github.com/vlfeat/vlfeat/blob/edc378a722ea0d79e29f4648a54bb62f32b22568/toolbox/plotop/vl_pr.m</a></p> <p dir="auto">The concern is that people using the scikit version will see incorrectly reported LOWER performance, than what they might see reported in other papers.</p>
1
<p dir="auto">I just updated my composer deps regarding the fresh new Symfony 3.0.4.</p> <p dir="auto">I was surprised to see when I loaded my application in the Web debug bar the symfony version to 3.0.4-dev.</p> <p dir="auto">I looked at <a href="https://github.com/symfony/symfony/tree/v3.0.4">v3.0.4 tag</a> and seems that it's not pointing to the good commit.</p> <p dir="auto">What happened?</p>
<p dir="auto">follow up to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="47624389" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/12401" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/12401/hovercard" href="https://github.com/symfony/symfony/issues/12401">#12401</a></p> <p dir="auto">in the CMF project we have encountered some bugs with 5.3 that we cannot work around (mostly with image manipulation). Also 5.3 can cause issues with memory consumption with composer.</p> <p dir="auto">Also as long as Symfony core supports 5.3, we kind of also imply we expect the same from our eco system. If however our ecosystem starts using 5.4+ more, then it will become more confusing for our users. Especially hosters (even internal IT) might claim that "5.3 is good enough because its supported by Symfony core" .. so I think its worth thinking about moving to 5.4+, even if there are no specific features we intend to use from 5.4 (we can of course provide traits without moving to 5.4)</p>
0
<p dir="auto">I can make changes to an object displayed in an <code class="notranslate">*ngFor</code> repeater with <code class="notranslate">trackBy</code> ... until I do something to trigger <code class="notranslate">trackBy</code> intervention.</p> <p dir="auto"><em>NgForTrackBy</em> indeed does prevent unnecessary DOM updates when the list is refreshed with "new" content that satisfies the <em>trackBy</em> selection criteria.</p> <p dir="auto">However, it is a little too rigorous. Once I trigger it, it no longer updates the view with changes to the data-bound object.</p> <p dir="auto">Here is a <a href="http://plnkr.co/edit/gFhiYPk9gk9YyDq7lQ16?p=preview" rel="nofollow">plunker repro</a>.</p> <ul dir="auto"> <li>Change the name ... both repeater displays update</li> <li>Click <em>Refresh Heroes</em> a few times. Each click replaces the heroes list with a new array of hero clones.</li> <li>Note the message under the first (no trackBy) display that reports each time the DOM elements have changed.</li> <li>Note that no such message appears under the second (with trackBy) display because the DOM elements are untouched. Although the hero objects change, <em>trackBy</em> doesn't replace the DOM elements. <strong>That's exactly what we want from <em>trackBy</em>!</strong></li> <li>Now change the name again. <strong>SAD FACE!</strong> The second (with trackBy) display is frozen. The changes do not appear.</li> </ul> <p dir="auto">This behavior makes <code class="notranslate">ngForTrackBy</code> essentially useless.</p> <ul dir="auto"> <li>the displayed list is semi-immutability, which fits few if any scenarios</li> <li>we can't update the displayed object in any way once frozen</li> <li>this is no good for <em>mutable</em> entity scenarios</li> <li>this is no good for <em>redux</em> or <em>immutable</em> scenarios either ... because we see only the last mutated state of the entities, not the refreshed entities (as they might be after re-query from a server).</li> </ul> <p dir="auto">Here is an animated gif showing the unexpected and unwanted behavior.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/129061/12870420/c1878da4-ccf8-11e5-8a84-6a757a44ece9.gif"><img src="https://cloud.githubusercontent.com/assets/129061/12870420/c1878da4-ccf8-11e5-8a84-6a757a44ece9.gif" alt="ng-for-track-by" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">Notice the last few frames where I make changes <strong>_after</strong>_ freezing the second <em>trackBy</em> display .</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] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong><br> When Resolve returns Observable and non-false value is resolved, navigation should continue, but it doesn't.</p> <p dir="auto"><strong>Expected behavior</strong><br> Navigation should proceed and resolved data should be passed to ActivatedRoute.data field.</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br> <a href="http://plnkr.co/edit/eJpzsXEM5CyurCs4jc1e?p=preview" rel="nofollow">http://plnkr.co/edit/eJpzsXEM5CyurCs4jc1e?p=preview</a></p> <p dir="auto">In menu click on "Second Link - Correct using Resolve"</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li> <p dir="auto"><strong>Fedora 24</strong></p> </li> <li> <p dir="auto"><strong>Angular version:</strong> 2.1.2</p> </li> <li> <p dir="auto"><strong>Browser:</strong> [ Chrome 54 | Firefox 49 ]</p> </li> <li> <p dir="auto"><strong>Language:</strong> [TypeScript 2]</p> </li> </ul>
0
<p dir="auto">When you open Atom, the first project is opened in the current window without loading information like opened tabs and panes.</p> <p dir="auto">If you try open it in dev mode (shift+cmd+O), the same happens plus it does not open in dev mode like it should.</p>
<p dir="auto">Like I mentioned <a href="https://github.com/atom/atom/issues/3405#issuecomment-53685094" data-hovercard-type="issue" data-hovercard-url="/atom/atom/issues/3405/hovercard">here in my comment</a> opening a folder won't work for the first time you open it, wether if you drag&amp;drop it or just open it via the shortcut.</p> <p dir="auto">Same Problem on two different computers with Atom (0.124.0) running on Mac OS X (Mavericks).</p>
1
<p dir="auto">I have an auto-scaling group that's a duplicate of the one created by <code class="notranslate">kube-up</code> for AWS using Ubuntu 15.04 minions, the only difference being it requests spot instances. When a spot instances is rebooted for whatever reason (they aren't stable), it fails to launch any pods because of an aufs error. I don't know if this only happens with spot instances, but this was the case for me this time, so it might be relevant.</p> <p dir="auto">This is not the first time I've seen this error. If I manually terminate the instance, which causes the ASG to request a new spot instance, the new node will launch pods successfully.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error pulling image (prd-beb0010d) from me/project, Driver aufs failed to create image rootfs 08ecf065655b44634e66f45201a7d379d30ba877791b1765322dabf57e993f11: open /mnt/ephemeral/docker/aufs/layers/4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf: no such file or directory API error (500): error creating aufs mount to /mnt/ephemeral/docker/aufs/mnt/38143c22f7a2644da4bc0cd8782a24a95274eaf255c9468dedbeea2d7c4b2b76-init: invalid argument"><pre class="notranslate"><code class="notranslate">Error pulling image (prd-beb0010d) from me/project, Driver aufs failed to create image rootfs 08ecf065655b44634e66f45201a7d379d30ba877791b1765322dabf57e993f11: open /mnt/ephemeral/docker/aufs/layers/4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf: no such file or directory API error (500): error creating aufs mount to /mnt/ephemeral/docker/aufs/mnt/38143c22f7a2644da4bc0cd8782a24a95274eaf255c9468dedbeea2d7c4b2b76-init: invalid argument </code></pre></div>
<p dir="auto">Running Kubernetes 1.4.1 at AWS (Ubuntu 14.04 LTS). Kubernetes cluster is spinned with 'contrib/ansible' playbook with the only change of <code class="notranslate">--cloud-provider aws</code> argument added to all cluster internal services (such as kubelet).</p> <p dir="auto">After spinning up and terminating several pods with config like below</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apiVersion: extensions/v1beta1 kind: Deployment metadata: name: kafka1 spec: replicas: 1 template: spec: containers: - name: kafka1 image: daniilyar/kafka ports: - containerPort: 9092 name: clientconnct protocol: TCP volumeMounts: - mountPath: /kafka name: storage volumes: - name: storage awsElasticBlockStore: volumeID: vol-56676d83 fsType: ext4"><pre class="notranslate"><code class="notranslate">apiVersion: extensions/v1beta1 kind: Deployment metadata: name: kafka1 spec: replicas: 1 template: spec: containers: - name: kafka1 image: daniilyar/kafka ports: - containerPort: 9092 name: clientconnct protocol: TCP volumeMounts: - mountPath: /kafka name: storage volumes: - name: storage awsElasticBlockStore: volumeID: vol-56676d83 fsType: ext4 </code></pre></div> <p dir="auto">I see a following error in kubelet logs logged each 40-60 sec:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E1018 21:03:09.616581 22780 fs.go:332] Stat fs failed. Error: no such file or directory"><pre class="notranslate"><code class="notranslate">E1018 21:03:09.616581 22780 fs.go:332] Stat fs failed. Error: no such file or directory </code></pre></div> <p dir="auto">Error contains a different line number than in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="118601311" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/17725" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/17725/hovercard" href="https://github.com/kubernetes/kubernetes/issues/17725">#17725</a> , so I assume this one is probably not a duplicate.</p>
0
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=eric.bottard" rel="nofollow">Eric Bottard</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5924?redirect=false" rel="nofollow">SPR-5924</a></strong> and commented</p> <p dir="auto">Hard coded request mapping values should take precedence over path variables. Wild card patterns in a path are currently inferior to explicit values. Path variables should be applied after explicit paths and before wild cards.</p> <p dir="auto">For example:</p> <p dir="auto"><code class="notranslate">@RequestMapping</code>(value = "/resources/new/", method = RequestMethod.GET)<br> is currently trumped by<br> <code class="notranslate">@RequestMapping</code>(value = "/resources/{resourceName}/", method = RequestMethod.GET)</p> <p dir="auto"><code class="notranslate">@RequestMapping</code>(value = "/resources/new/", method = RequestMethod.GET)<br> currently trumps<br> <code class="notranslate">@RequestMapping</code>(value = "/resources/*/", method = RequestMethod.GET)</p> <p dir="auto"><code class="notranslate">@RequestMapping</code>(value = "/resources/new/", method = RequestMethod.GET)<br> should trump<br> <code class="notranslate">@RequestMapping</code>(value = "/resources/{resourceName}/", method = RequestMethod.GET)<br> should trump<br> <code class="notranslate">@RequestMapping</code>(value = "/resources/*/", method = RequestMethod.GET)</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0 M1</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="398092403" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10035" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10035/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10035">#10035</a> <code class="notranslate">@RequestMapping</code> best match gives wrong Controller method when using wildcards (<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="398092440" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10040" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10040/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10040">#10040</a> PathVariable mappings are greedy over hard coded mappings</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398094868" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10401" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10401/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10401">#10401</a> <code class="notranslate">@Controller</code> method order effects <code class="notranslate">@RequestMapping</code> behavior in ways not expected</li> </ul> <p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/8073efd69f481590a6d22688dc2b9a0e8f6e124e/hovercard" href="https://github.com/spring-projects/spring-framework/commit/8073efd69f481590a6d22688dc2b9a0e8f6e124e"><tt>8073efd</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/abfc479bdb0eb28decc24fb720bb4e6827cbe7e3/hovercard" href="https://github.com/spring-projects/spring-framework/commit/abfc479bdb0eb28decc24fb720bb4e6827cbe7e3"><tt>abfc479</tt></a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jon_ruckwood" rel="nofollow">Jonathan Ruckwood</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7242?redirect=false" rel="nofollow">SPR-7242</a></strong> and commented</p> <p dir="auto">I'm in a situation where there is prolific use of <code class="notranslate">@ModelAttribute</code> annotations in a project, however in most circumstances the model-data is only needed on either the POST or GET, consequently we are needlessly resolving attributes when they won't be used.</p> <p dir="auto">I'm proposing something along the lines of this:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@ModelAttribute(&quot;orderAddressList&quot;, RequestMethod.GET) @ModelAttribute(&quot;orderAddressList&quot;, {RequestMethod.GET, RequestMethod.POST}) @ModelAttribute(&quot;orderAddressList&quot;) // Optional, without any RequestMethod the annotation works as it does currently."><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">ModelAttribute</span>(<span class="pl-s">"orderAddressList"</span>, <span class="pl-smi">RequestMethod</span>.<span class="pl-c1">GET</span>) <span class="pl-c1">@</span><span class="pl-c1">ModelAttribute</span>(<span class="pl-s">"orderAddressList"</span>, {<span class="pl-smi">RequestMethod</span>.<span class="pl-c1">GET</span>, <span class="pl-smi">RequestMethod</span>.<span class="pl-c1">POST</span>}) <span class="pl-c1">@</span><span class="pl-c1">ModelAttribute</span>(<span class="pl-s">"orderAddressList"</span>) <span class="pl-c">// Optional, without any RequestMethod the annotation works as it does currently.</span></pre></div> <p dir="auto">The following should not be allowed, i.e. an exception should be thrown:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@ModelAttribute(&quot;foo&quot;, RequestMethod.GET) public Foos getFoos() { return foos; } @RequestMapping(method = RequestMethod.POST) public String doPost(@ModelAttribute(&quot;foo&quot;) Foos foos) { // &lt;-- causes exception as foo is only available for GET request. return &quot;fooView&quot;; }"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">ModelAttribute</span>(<span class="pl-s">"foo"</span>, <span class="pl-smi">RequestMethod</span>.<span class="pl-c1">GET</span>) <span class="pl-k">public</span> <span class="pl-smi">Foos</span> <span class="pl-s1">getFoos</span>() { <span class="pl-k">return</span> <span class="pl-s1">foos</span>; } <span class="pl-c1">@</span><span class="pl-c1">RequestMapping</span>(<span class="pl-s1">method</span> = <span class="pl-smi">RequestMethod</span>.<span class="pl-c1">POST</span>) <span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-s1">doPost</span>(<span class="pl-c1">@</span><span class="pl-c1">ModelAttribute</span>(<span class="pl-s">"foo"</span>) <span class="pl-smi">Foos</span> <span class="pl-s1">foos</span>) { <span class="pl-c">// &lt;-- causes exception as foo is only available for GET request.</span> <span class="pl-k">return</span> <span class="pl-s">"fooView"</span>; }</pre></div> <p dir="auto">An added benefit of this is that it increases readability of annotated controllers. For example, a new developer can get more information from a controller's data-model by scanning the annotations alone.</p> <p dir="auto">Implementing this would help us mitigate our problem, however I also feel that it would be a useful enhancement to the wider community.</p> <p dir="auto">Thanks.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.2</p> <p dir="auto">4 votes, 7 watchers</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] feature request"><pre class="notranslate"><code class="notranslate">[x] feature request </code></pre></div> <p dir="auto"><strong>Current behavior</strong><br> There's no way to list the current validators that are applied to a FormControl / AbstractControl.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> I'd like to create dynamic error messages, and apply attributes in child components based on the validators that are present.</p> <p dir="auto">For example, I would like to be able to add the <code class="notranslate">maxlength</code> HTML attribute on to a text box control, if the maxLength validator is present (to reduce duplication) - but I need to be able to access the validator's metadata to do so.</p> <p dir="auto">The closest I can get is the following, but because the <code class="notranslate">error</code> object only exists after the user has typed over the validator limit, I can only limit it to 11 chars, instead of the expected 10:</p> <p dir="auto">FormBuilder config excerpt:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="firstName: ['', [Validators.required, Validators.maxLength(10)]]"><pre class="notranslate"><code class="notranslate">firstName: ['', [Validators.required, Validators.maxLength(10)]] </code></pre></div> <p dir="auto">Template:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;input type=&quot;text&quot; formControlName=&quot;firstName&quot; [attr.maxlength]=&quot;control.getError('maxlength')?.requiredLength&quot;"><pre class="notranslate"><code class="notranslate">&lt;input type="text" formControlName="firstName" [attr.maxlength]="control.getError('maxlength')?.requiredLength" </code></pre></div> <p dir="auto">Where <code class="notranslate">control</code> is an AbstractControl.</p>
<p dir="auto"><strong>Potential Bug</strong>:<br> The string <code class="notranslate">"1"</code> results in query param value <code class="notranslate">true</code>:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="this.router.navigate([ '/UserList', {page: '1'} ]); // --&gt; /users/?page (actual) // --&gt; /users/?page=1 (expected)"><pre class="notranslate"><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">router</span><span class="pl-kos">.</span><span class="pl-en">navigate</span><span class="pl-kos">(</span><span class="pl-kos">[</span> <span class="pl-s">'/UserList'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">page</span>: <span class="pl-s">'1'</span><span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// --&gt; /users/?page (actual)</span> <span class="pl-c">// --&gt; /users/?page=1 (expected)</span></pre></div> <p dir="auto"><strong>Question</strong>:<br> <em>Update: Duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="94040246" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/2959" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/2959/hovercard" href="https://github.com/angular/angular/issues/2959">#2959</a></em>.<br> Is it intended that more complex query params aren't supported? Example:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="this.router.navigate([ '/UserList', { filtering: { name: 'Andrew', age: 22 } } ]); // --&gt; /users/?filtering=[object%20Object] (actual) // --&gt; /users/?filtering[name]=Andrew&amp;filtering[age]=22 (expected)"><pre class="notranslate"><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">router</span><span class="pl-kos">.</span><span class="pl-en">navigate</span><span class="pl-kos">(</span><span class="pl-kos">[</span> <span class="pl-s">'/UserList'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">filtering</span>: <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'Andrew'</span><span class="pl-kos">,</span> <span class="pl-c1">age</span>: <span class="pl-c1">22</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// --&gt; /users/?filtering=[object%20Object] (actual)</span> <span class="pl-c">// --&gt; /users/?filtering[name]=Andrew&amp;filtering[age]=22 (expected)</span></pre></div>
0
<p dir="auto">It's currently possible to do this:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" method&lt;A extends Array&lt;number&gt;&gt;(one):number; method&lt;A extends Array&lt;string&gt;&gt;(two):string;"><pre class="notranslate"> <span class="pl-s1">method</span><span class="pl-c1">&lt;</span><span class="pl-smi">A</span> <span class="pl-k">extends</span> <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-smi">one</span><span class="pl-kos">)</span>:<span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-s1">method</span><span class="pl-c1">&lt;</span><span class="pl-smi">A</span> <span class="pl-k">extends</span> <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-smi">two</span><span class="pl-kos">)</span>:<span class="pl-smi">string</span><span class="pl-kos">;</span></pre></div> <p dir="auto">But not possible to do this:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Example&lt;T extends Array&lt;number&gt;&gt; { method(one):number; } interface Example&lt;T extends Array&lt;string&gt;&gt; { method(two):string; }"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Example</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">method</span><span class="pl-kos">(</span><span class="pl-s1">one</span><span class="pl-kos">)</span>:<span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">Example</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">method</span><span class="pl-kos">(</span><span class="pl-s1">two</span><span class="pl-kos">)</span>:<span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">This means we cannot have different typings depending on the generic type constraint of the interface.<br> I've even tried a hack like this:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Example&lt;T extends Array&lt;any&gt;&gt; { method&lt;A extends T &amp; Array&lt;number&gt;&gt;(one):number; method&lt;A extends T &amp; Array&lt;string&gt;&gt;(two):string; }"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Example</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">any</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">method</span><span class="pl-c1">&lt;</span><span class="pl-smi">A</span> <span class="pl-k">extends</span> <span class="pl-smi">T</span> <span class="pl-c1">&amp;</span> <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">one</span><span class="pl-kos">)</span>:<span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-c1">method</span><span class="pl-c1">&lt;</span><span class="pl-smi">A</span> <span class="pl-k">extends</span> <span class="pl-smi">T</span> <span class="pl-c1">&amp;</span> <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">two</span><span class="pl-kos">)</span>:<span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">I was hoping that TS will infer the type of the T array from the intersect, unfortunately that does not happen (it offers both methods, regardless of whether Example is an instance of <code class="notranslate">Example&lt;Array&lt;number&gt;&gt;</code> or of <code class="notranslate">Example&lt;Array&lt;string&gt;&gt;</code>).</p> <p dir="auto">Among other uses, this feature would be useful for a variety of database libraries that return internal types that can have their own operations done on them. For example, when I <code class="notranslate">map</code> an <code class="notranslate">DbArray&lt;DbNumber&gt;</code>, I should get a different set of methods than when operating on <code class="notranslate">DbArray&lt;DbString&gt;</code>.</p> <p dir="auto">The current workaround is to ask the user to explicitly declare both - the outer and the inner type, e.g.:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Example&lt;TOuter, TInner&gt; { map&lt;TOut&gt;((item: TInner) =&gt; TOut): TOut; // ...TOuter used in another method }"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Example</span><span class="pl-c1">&lt;</span><span class="pl-smi">TOuter</span><span class="pl-kos">,</span> <span class="pl-smi">TInner</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">map</span><span class="pl-c1">&lt;</span><span class="pl-smi">TOut</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">item</span>: <span class="pl-smi">TInner</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">TOut</span><span class="pl-kos">)</span>: <span class="pl-smi">TOut</span><span class="pl-kos">;</span> <span class="pl-c">// ...TOuter used in another method</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">However, this <code class="notranslate">TInner</code> is redundant (it's already inside of TOuter) and sometimes not relevant at all.<br> With more complex types this can cause the introduction of even more generic types, that grow like cancer in the declarations (<code class="notranslate">interface Example&lt;A, B, C, D, ...&gt;</code>) - the more possibilities there are, the more explicit declarations need to be done at the interface level. This has been an obstacle to creating proper type definitions for RethinkDB <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="85172338" data-permission-text="Title is private" data-url="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/4551" data-hovercard-type="issue" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/issues/4551/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/4551">DefinitelyTyped/DefinitelyTyped#4551</a>.</p> <p dir="auto">Last example: an interface <code class="notranslate">DbValue</code> can be a generic of any primitive type in the database: an <code class="notranslate">array</code>, a <code class="notranslate">string</code> or a <code class="notranslate">number</code>.<br> For an instance of an <code class="notranslate">array</code>, you'd need to pass in <code class="notranslate">DbValue&lt;Array&lt;number&gt;, number&gt;</code>, yet for an instance of string, the second parameter is irrelevant: <code class="notranslate">DbValue&lt;string, void&gt;</code>.</p> <p dir="auto">What we'd need is to be able to constrain not only by method's own generics, but by the containing interfaces generics, for method signatures themselves, something like:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Example&lt;T&gt; { // here the constraint is not of the method, but of the type method(one):number where T extends Array&lt;number&gt;; method(two):string where T extends Array&lt;string&gt;; }"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Example</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// here the constraint is not of the method, but of the type</span> <span class="pl-c1">method</span><span class="pl-kos">(</span><span class="pl-s1">one</span><span class="pl-kos">)</span>:<span class="pl-smi">number</span> <span class="pl-s1">where</span> <span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-c1">method</span><span class="pl-kos">(</span><span class="pl-s1">two</span><span class="pl-kos">)</span>:<span class="pl-smi">string</span> <span class="pl-s1">where</span> <span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
<blockquote> <p dir="auto">This is a suggestion for spec change.</p> </blockquote> <h3 dir="auto">Problem</h3> <p dir="auto">Sometimes type's members could only be applicable with some restrictions of enclosing type parameter (generic type constraints).</p> <p dir="auto">For instance, this is use case of RxJS:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var xs: Observable&lt;Observable&lt;string&gt;&gt;; xs.mergeAll(); // mergeAll is applicable here var ys: Observable&lt;string&gt;; ys.mergeAll(); // mergeAll is NOT applicable here"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">xs</span>: <span class="pl-smi">Observable</span><span class="pl-kos">&lt;</span><span class="pl-smi">Observable</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-kos">&gt;</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-s1">xs</span><span class="pl-kos">.</span><span class="pl-en">mergeAll</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// mergeAll is applicable here</span> <span class="pl-k">var</span> <span class="pl-s1">ys</span>: <span class="pl-smi">Observable</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-s1">ys</span><span class="pl-kos">.</span><span class="pl-en">mergeAll</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// mergeAll is NOT applicable here</span></pre></div> <p dir="auto">Original Rx.NET <a href="http://msdn.microsoft.com/en-us/library/hh229740%28v=vs.103%29.aspx" rel="nofollow">Merge</a> method implemented as C# extension method on type <code class="notranslate">IObservable&lt;IObservable&lt;T&gt;&gt;</code>. In RxJS it's implemented as an instance method.</p> <p dir="auto">Current RxJS typescript definition just use <a href="https://github.com/Reactive-Extensions/RxJS/blob/master/ts/rx-lite.d.ts#L258">unsafe trick</a>:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export interface Observable&lt;T&gt; { ... mergeAll(): T; ... }"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">Observable</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> ... <span class="pl-c1">mergeAll</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">T</span><span class="pl-kos">;</span> ... <span class="pl-kos">}</span></pre></div> <p dir="auto">But it can be still unsafely called for as instance of any <code class="notranslate">Observable&lt;T&gt;</code>.</p> <h3 dir="auto">Possible solutions</h3> <h4 dir="auto">Extension methods</h4> <p dir="auto">Something like C# extension methods. But don't think it's useful in such cases.</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare extensions { mergeAll&lt;T&gt;(this Observable&lt;Observable&lt;T&gt;&gt; source): Observable&lt;T&gt;; }"><pre class="notranslate"><span class="pl-k">declare</span> <span class="pl-s1">extensions</span> <span class="pl-kos">{</span> <span class="pl-c1">mergeAll</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-smi">this</span> <span class="pl-smi">Observable</span><span class="pl-c1">&lt;</span><span class="pl-smi">Observable</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;&gt;</span> <span class="pl-s1">source</span><span class="pl-kos">)</span>: <span class="pl-smi">Observable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">BTW, extensions method could be other cool feature, which change call method (from instance-like to static-like).</p> <h4 dir="auto">Multiple interface definitions with different constraints</h4> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface A&lt;T&gt; { x(): void; } interface A&lt;T extends B&gt; { y(): void; } var a: A&lt;number&gt;; var b: A&lt;B&gt;; a.x(); b.x(); // ok b.y(); // ok a.y(); // error"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">A</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">x</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">A</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">B</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">y</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">var</span> <span class="pl-s1">a</span>: <span class="pl-smi">A</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">b</span>: <span class="pl-smi">A</span><span class="pl-kos">&lt;</span><span class="pl-smi">B</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-en">x</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-en">x</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// ok</span> <span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-en">y</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// ok</span> <span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-en">y</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// error</span></pre></div> <h4 dir="auto">Member-level constraints with reference to enclosing type arguments</h4> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface A&lt;T&gt; { x(): void; y&lt;T extends B&gt;(): void; // only applicable if T extends B z&lt;T extends B&gt;: number; // for any property // alternative syntax options: &lt;T extends B&gt;z: number; // 1 z: number where T extends B; // 2 y(): void where T extends B; }"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">A</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">x</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-c1">y</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">B</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-c">// only applicable if T extends B</span> <span class="pl-c1">z</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">B</span><span class="pl-c1">&gt;</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-c">// for any property</span> <span class="pl-c">// alternative syntax options:</span> <span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">B</span><span class="pl-c1">&gt;</span><span class="pl-c1">z</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-c">// 1</span> <span class="pl-c1">z</span>: <span class="pl-smi">number</span> <span class="pl-s1">where</span> <span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">B</span><span class="pl-kos">;</span> <span class="pl-c">// 2</span> <span class="pl-c1">y</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-s1">where</span> <span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">B</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">I'll suggest this option. Moreover the previous solution options is special case of this one (incompatible constraints are merged on member level).</p>
1
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-remove-classes-from-an-element-with-jquery" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-remove-classes-from-an-element-with-jquery</a> has an issue. You can complete the waypoint by simply calling removeClass() on all of the button elements without specifically removing "btn-default".<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/13123810/9349307/db50e7b0-4609-11e5-9dcc-7d521efaf852.PNG"><img src="https://cloud.githubusercontent.com/assets/13123810/9349307/db50e7b0-4609-11e5-9dcc-7d521efaf852.PNG" alt="capture" style="max-width: 100%;"></a></p>
<h4 dir="auto">Challenge Name</h4> <p dir="auto"><a href="https://www.freecodecamp.com/challenges/nest-an-anchor-element-within-a-paragraph#?solution=%0A%3Clink%20href%3D%22https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%20%20.smaller-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%3Cp%3Eview%20more%20%3Ca%20href%3D%22https%3A%2F%2Ffreecodecamp.com%22%3Ecat%20photos%3C%2Fa%3E%3C%2Fp%3E%0A%0A%3Ca%20href%3D%22http%3A%2F%2Fwww.freecatphotoapp.com%22%3Ecat%20photos%3C%2Fa%3E%0A%0A%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%0A%0A%3Cp%20class%3D%22red-text%22%3EKitty%20ipsum%20dolor%20sit%20amet%2C%20shed%20everywhere%20shed%20everywhere%20stretching%20attack%20your%20ankles%20chase%20the%20red%20dot%2C%20hairball%20run%20catnip%20eat%20the%20grass%20sniff.%3C%2Fp%3E%0A%3Cp%20class%3D%22red-text%22%3EPurr%20jump%20eat%20the%20grass%20rip%20the%20couch%20scratched%20sunbathe%2C%20shed%20everywhere%20rip%20the%20couch%20sleep%20in%20the%20sink%20fluffy%20fur%20catnip%20scratched.%3C%2Fp%3E%0A" rel="nofollow">https://www.freecodecamp.com/challenges/nest-an-anchor-element-within-a-paragraph#?solution=%0A%3Clink%20href%3D%22https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%20%20.smaller-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%3Cp%3Eview%20more%20%3Ca%20href%3D%22https%3A%2F%2Ffreecodecamp.com%22%3Ecat%20photos%3C%2Fa%3E%3C%2Fp%3E%0A%0A%3Ca%20href%3D%22http%3A%2F%2Fwww.freecatphotoapp.com%22%3Ecat%20photos%3C%2Fa%3E%0A%0A%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%0A%0A%3Cp%20class%3D%22red-text%22%3EKitty%20ipsum%20dolor%20sit%20amet%2C%20shed%20everywhere%20shed%20everywhere%20stretching%20attack%20your%20ankles%20chase%20the%20red%20dot%2C%20hairball%20run%20catnip%20eat%20the%20grass%20sniff.%3C%2Fp%3E%0A%3Cp%20class%3D%22red-text%22%3EPurr%20jump%20eat%20the%20grass%20rip%20the%20couch%20scratched%20sunbathe%2C%20shed%20everywhere%20rip%20the%20couch%20sleep%20in%20the%20sink%20fluffy%20fur%20catnip%20scratched.%3C%2Fp%3E%0A</a></p> <h4 dir="auto">Issue Description</h4> <p dir="auto">it asks you to nest an a tag inside of p. When you do just so, it still states that you have not yet done that step and will not let you continue.</p> <h4 dir="auto">Browser Information</h4> <ul dir="auto"> <li>Browser Name, Version: chrome</li> <li>Operating System: windows</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=" &lt;link href=&quot;https://fonts.googleapis.com/css?family=Lobster&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt; &lt;style&gt; .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; } &lt;/style&gt; &lt;h2 class=&quot;red-text&quot;&gt;CatPhotoApp&lt;/h2&gt; &lt;p&gt;view more &lt;a href=&quot;https://freecodecamp.com&quot;&gt;cat photos&lt;/a&gt;&lt;/p&gt; &lt;a href=&quot;http://www.freecatphotoapp.com&quot;&gt;cat photos&lt;/a&gt; &lt;img class=&quot;smaller-image thick-green-border&quot; src=&quot;https://bit.ly/fcc-relaxing-cat&quot;&gt; &lt;p class=&quot;red-text&quot;&gt;Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.&lt;/p&gt; &lt;p class=&quot;red-text&quot;&gt;Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.&lt;/p&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</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">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">style</span><span class="pl-c1">&gt;</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">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">style</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</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">&gt;</span>CatPhotoApp<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">h2</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">p</span><span class="pl-c1">&gt;</span>view more <span class="pl-c1">&lt;</span><span class="pl-ent">a</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-s">"https://freecodecamp.com"</span><span class="pl-c1">&gt;</span>cat photos<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">a</span><span class="pl-c1">&gt;</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">a</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-s">"http://www.freecatphotoapp.com"</span><span class="pl-c1">&gt;</span>cat photos<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">a</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</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">src</span><span class="pl-c1">=</span><span class="pl-s">"https://bit.ly/fcc-relaxing-cat"</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">p</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"red-text"</span><span class="pl-c1">&gt;</span>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">p</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"red-text"</span><span class="pl-c1">&gt;</span>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">&gt;</span></pre></div> <h4 dir="auto">Screenshot</h4>
0
<p dir="auto">[Enter steps to reproduce below:]</p> <ol dir="auto"> <li>...</li> <li>...</li> </ol> <p dir="auto"><strong>Atom Version</strong>: 0.179.0<br> <strong>System</strong>: Mac OS X 10.10.2<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught IndexSizeError: Failed to execute 'setEnd' on 'Range': The offset 17 is larger than or equal to the node's length (16).</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At /Applications/Atom.app/Contents/Resources/app/src/lines-component.js:396 Error: Failed to execute 'setEnd' on 'Range': The offset 17 is larger than or equal to the node's length (16). at Error (native) at [object Object].module.exports.React.createClass.measureCharactersInLine (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:396:33) at [object Object].boundMethod [as measureCharactersInLine] (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21) at /Applications/Atom.app/Contents/Resources/app/src/lines-component.js:349:21 at DisplayBuffer.module.exports.DisplayBuffer.batchCharacterMeasurement (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:560:7) at TextEditor.module.exports.TextEditor.batchCharacterMeasurement (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2897:33) at TextEditorPresenter.module.exports.TextEditorPresenter.batchCharacterMeasurement (/Applications/Atom.app/Contents/Resources/app/src/text-editor-presenter.js:782:18) at [object Object].module.exports.React.createClass.measureCharactersInNewLines (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:341:24) at [object Object].boundMethod [as measureCharactersInNewLines] (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21) at [object Object].module.exports.React.createClass.componentDidUpdate (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:108:14) at CallbackQueue.mixInto.notifyAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/CallbackQueue.js:75:22) at ReactReconcileTransaction.ON_DOM_READY_QUEUEING.close (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactReconcileTransaction.js:88:26) at ReactReconcileTransaction.Mixin.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42) at ReactReconcileTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16) at ReactUpdatesFlushTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:141:20) at ReactUpdatesFlushTransaction.mixInto.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:98:38) at Object.flushBatchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:176:19) at ReactDefaultBatchingStrategyTransaction.Mixin.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42) at ReactDefaultBatchingStrategyTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16) at Object.ReactDefaultBatchingStrategy.batchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactDefaultBatchingStrategy.js:70:19) at Object.enqueueUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:209:22) at [object Object].ReactCompositeComponentMixin.forceUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1232:18) at /Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:243:28 "><pre class="notranslate"><code class="notranslate">At /Applications/Atom.app/Contents/Resources/app/src/lines-component.js:396 Error: Failed to execute 'setEnd' on 'Range': The offset 17 is larger than or equal to the node's length (16). at Error (native) at [object Object].module.exports.React.createClass.measureCharactersInLine (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:396:33) at [object Object].boundMethod [as measureCharactersInLine] (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21) at /Applications/Atom.app/Contents/Resources/app/src/lines-component.js:349:21 at DisplayBuffer.module.exports.DisplayBuffer.batchCharacterMeasurement (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:560:7) at TextEditor.module.exports.TextEditor.batchCharacterMeasurement (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2897:33) at TextEditorPresenter.module.exports.TextEditorPresenter.batchCharacterMeasurement (/Applications/Atom.app/Contents/Resources/app/src/text-editor-presenter.js:782:18) at [object Object].module.exports.React.createClass.measureCharactersInNewLines (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:341:24) at [object Object].boundMethod [as measureCharactersInNewLines] (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21) at [object Object].module.exports.React.createClass.componentDidUpdate (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:108:14) at CallbackQueue.mixInto.notifyAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/CallbackQueue.js:75:22) at ReactReconcileTransaction.ON_DOM_READY_QUEUEING.close (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactReconcileTransaction.js:88:26) at ReactReconcileTransaction.Mixin.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42) at ReactReconcileTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16) at ReactUpdatesFlushTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:141:20) at ReactUpdatesFlushTransaction.mixInto.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:98:38) at Object.flushBatchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:176:19) at ReactDefaultBatchingStrategyTransaction.Mixin.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42) at ReactDefaultBatchingStrategyTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16) at Object.ReactDefaultBatchingStrategy.batchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactDefaultBatchingStrategy.js:70:19) at Object.enqueueUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:209:22) at [object Object].ReactCompositeComponentMixin.forceUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1232:18) at /Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:243:28 </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -6:41.1 core:confirm (atom-text-editor.editor.mini) 4x -6:28.9 core:backspace (atom-text-editor.editor) -6:16.1 core:save (atom-text-editor.editor) 3x -2:40.9 core:move-left (atom-text-editor.editor) 2x -2:33.7 core:move-right (atom-text-editor.editor) -2:27.9 core:copy (atom-text-editor.editor) -2:25.7 core:paste (atom-text-editor.editor) -2:17.0 core:save (atom-text-editor.editor) -1:09.1 core:copy (atom-text-editor.editor) -0:53.9 core:move-to-bottom (atom-text-editor.editor) -0:51.0 core:paste (atom-text-editor.editor) -0:49.0 editor:newline (atom-text-editor.editor) -0:48.5 snippets:next-tab-stop (atom-text-editor.editor) -0:48.5 snippets:expand (atom-text-editor.editor) -0:48.5 editor:indent (atom-text-editor.editor) -0:38.2 core:save (atom-text-editor.editor)"><pre class="notranslate"><code class="notranslate"> -6:41.1 core:confirm (atom-text-editor.editor.mini) 4x -6:28.9 core:backspace (atom-text-editor.editor) -6:16.1 core:save (atom-text-editor.editor) 3x -2:40.9 core:move-left (atom-text-editor.editor) 2x -2:33.7 core:move-right (atom-text-editor.editor) -2:27.9 core:copy (atom-text-editor.editor) -2:25.7 core:paste (atom-text-editor.editor) -2:17.0 core:save (atom-text-editor.editor) -1:09.1 core:copy (atom-text-editor.editor) -0:53.9 core:move-to-bottom (atom-text-editor.editor) -0:51.0 core:paste (atom-text-editor.editor) -0:49.0 editor:newline (atom-text-editor.editor) -0:48.5 snippets:next-tab-stop (atom-text-editor.editor) -0:48.5 snippets:expand (atom-text-editor.editor) -0:48.5 editor:indent (atom-text-editor.editor) -0:38.2 core:save (atom-text-editor.editor) </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="{ &quot;core&quot;: {}, &quot;editor&quot;: { &quot;fontSize&quot;: 13, &quot;autoIndent&quot;: false, &quot;invisibles&quot;: {} } }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: {}, <span class="pl-ent">"editor"</span>: { <span class="pl-ent">"fontSize"</span>: <span class="pl-c1">13</span>, <span class="pl-ent">"autoIndent"</span>: <span class="pl-c1">false</span>, <span class="pl-ent">"invisibles"</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 No installed packages # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> <span class="pl-en">No</span> <span class="pl-en">installed</span> packages <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">[Enter steps to reproduce below:]</p> <ol dir="auto"> <li>Opened <code class="notranslate">waf</code> script</li> <li>Scrolled up to binary data</li> </ol> <p dir="auto"><strong>Atom Version</strong>: 0.176.0<br> <strong>System</strong>: Mac OS X 10.10.2<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught IndexSizeError: Failed to execute 'setEnd' on 'Range': The offset 2 is larger than or equal to the node's length (1).</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At /Applications/Atom.app/Contents/Resources/app/src/lines-component.js:465 Error: Failed to execute 'setEnd' on 'Range': The offset 2 is larger than or equal to the node's length (1). at Error (native) at [object Object].module.exports.React.createClass.measureCharactersInLine (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:465:33) at [object Object].boundMethod [as measureCharactersInLine] (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21) at /Applications/Atom.app/Contents/Resources/app/src/lines-component.js:418:21 at DisplayBuffer.module.exports.DisplayBuffer.batchCharacterMeasurement (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:560:7) at TextEditor.module.exports.TextEditor.batchCharacterMeasurement (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2877:33) at [object Object].module.exports.React.createClass.measureCharactersInNewLines (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:411:21) at [object Object].boundMethod [as measureCharactersInNewLines] (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21) at [object Object].module.exports.React.createClass.componentDidUpdate (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:147:14) at CallbackQueue.mixInto.notifyAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/CallbackQueue.js:75:22) at ReactReconcileTransaction.ON_DOM_READY_QUEUEING.close (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactReconcileTransaction.js:88:26) at ReactReconcileTransaction.Mixin.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42) at ReactReconcileTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16) at ReactUpdatesFlushTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:141:20) at ReactUpdatesFlushTransaction.mixInto.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:98:38) at Object.flushBatchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:176:19) at ReactDefaultBatchingStrategyTransaction.Mixin.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42) at ReactDefaultBatchingStrategyTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16) at Object.ReactDefaultBatchingStrategy.batchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactDefaultBatchingStrategy.js:70:19) at Object.enqueueUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:209:22) at [object Object].ReactCompositeComponentMixin.forceUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1232:18) at /Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:313:28 "><pre class="notranslate"><code class="notranslate">At /Applications/Atom.app/Contents/Resources/app/src/lines-component.js:465 Error: Failed to execute 'setEnd' on 'Range': The offset 2 is larger than or equal to the node's length (1). at Error (native) at [object Object].module.exports.React.createClass.measureCharactersInLine (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:465:33) at [object Object].boundMethod [as measureCharactersInLine] (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21) at /Applications/Atom.app/Contents/Resources/app/src/lines-component.js:418:21 at DisplayBuffer.module.exports.DisplayBuffer.batchCharacterMeasurement (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:560:7) at TextEditor.module.exports.TextEditor.batchCharacterMeasurement (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2877:33) at [object Object].module.exports.React.createClass.measureCharactersInNewLines (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:411:21) at [object Object].boundMethod [as measureCharactersInNewLines] (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21) at [object Object].module.exports.React.createClass.componentDidUpdate (/Applications/Atom.app/Contents/Resources/app/src/lines-component.js:147:14) at CallbackQueue.mixInto.notifyAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/CallbackQueue.js:75:22) at ReactReconcileTransaction.ON_DOM_READY_QUEUEING.close (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactReconcileTransaction.js:88:26) at ReactReconcileTransaction.Mixin.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42) at ReactReconcileTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16) at ReactUpdatesFlushTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:141:20) at ReactUpdatesFlushTransaction.mixInto.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:98:38) at Object.flushBatchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:176:19) at ReactDefaultBatchingStrategyTransaction.Mixin.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42) at ReactDefaultBatchingStrategyTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16) at Object.ReactDefaultBatchingStrategy.batchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactDefaultBatchingStrategy.js:70:19) at Object.enqueueUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:209:22) at [object Object].ReactCompositeComponentMixin.forceUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1232:18) at /Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:313:28 </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <h3 dir="auto">Config</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: { &quot;themes&quot;: [ &quot;atom-dark-ui&quot;, &quot;atom-dark-syntax&quot; ] }, &quot;editor&quot;: { &quot;fontSize&quot;: 16 } }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: { <span class="pl-ent">"themes"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>atom-dark-syntax<span class="pl-pds">"</span></span> ] }, <span class="pl-ent">"editor"</span>: { <span class="pl-ent">"fontSize"</span>: <span class="pl-c1">16</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 No installed packages # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> <span class="pl-en">No</span> <span class="pl-en">installed</span> packages <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
1
<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.3</li> <li>Operating System version: Windows 10</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <p dir="auto">正常运行demo</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">不会发生报错</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">报path和contextpath长度超过200错误。分析代码得知这两个值是系统的环境变量,windows上环境变量通常设置很多,长度很容易超过200。不知道为啥要设置长度不超过200。</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/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: xxx</li> <li>Operating System version: xxx</li> <li>Java version: xxx</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <p dir="auto"><a href="http://start.dubbo.io/" rel="nofollow">http://start.dubbo.io/</a> 无法正常访问</p> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! </code></pre></div>
0
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong></p> <p dir="auto">Introduced here – <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="440453318" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/16390" data-hovercard-type="pull_request" data-hovercard-url="/mrdoob/three.js/pull/16390/hovercard" href="https://github.com/mrdoob/three.js/pull/16390">#16390</a>, WebGLMultipleRenderTargets extends WebGLMultipleRenderTarget which on the surface works, however when we came to create the .d.ts file – <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="904062224" data-permission-text="Title is private" data-url="https://github.com/three-types/three-ts-types/issues/85" data-hovercard-type="pull_request" data-hovercard-url="/three-types/three-ts-types/pull/85/hovercard" href="https://github.com/three-types/three-ts-types/pull/85">three-types/three-ts-types#85</a> we began to discuss how maybe this shouldn't be the case. Calling <code class="notranslate">WebGLMultipleRenderTargets.setTexture</code> would fail because you'd either have to supply an array which would break:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="texture.image = { width: this.width, height: this.height, depth: this.depth };"><pre class="notranslate"><span class="pl-s1">texture</span><span class="pl-kos">.</span><span class="pl-c1">image</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">width</span>: <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">width</span><span class="pl-kos">,</span> <span class="pl-c1">height</span>: <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">height</span><span class="pl-kos">,</span> <span class="pl-c1">depth</span>: <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">depth</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto">see:<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/mrdoob/three.js/blob/d39d82999f0ac5cdd1b4eb9f4aba3f9626f32ab6/src/renderers/WebGLRenderTarget.js#L46">three.js/src/renderers/WebGLRenderTarget.js</a> </p> <p class="mb-0 color-fg-muted"> Line 46 in <a data-pjax="true" class="commit-tease-sha" href="/mrdoob/three.js/commit/d39d82999f0ac5cdd1b4eb9f4aba3f9626f32ab6">d39d829</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="L46" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="46"></td> <td id="LC46" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">texture</span><span class="pl-kos">.</span><span class="pl-c1">image</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">Alternatively not passing an array of Textures, would break the <code class="notranslate">WebGLMultipleRenderTargets</code>.</p> <p dir="auto"><strong>Describe the solution you'd like</strong></p> <p dir="auto">Whilst I appreciate how helpful it is to extend a lot of the features already written in WebGLMultipleRenderTarget, maybe there should be a utility/base class that they both inherit from, this would reduce duplication (which is why we extend classes in the first place) and equally avoid the edge cases described above that will impact users.</p> <p dir="auto"><strong>Additional context</strong></p> <p dir="auto">For anyone interested, the <code class="notranslate">.d.ts</code> file will probably just duplicate the properties and methods included in <code class="notranslate">WebGLMultipleRenderTarget</code></p>
<p dir="auto">In <code class="notranslate">GLTFLoader</code> we can load standard materials using <code class="notranslate">StandardMaterial</code> .<br> However, the alpha channel of its texture doesn't be handled properly, when renderer's alpha is activated.</p> <p dir="auto">In <code class="notranslate">OPAQUE</code> or <code class="notranslate">MASK</code> material, alpha channels of texture should be negated:<br> <a href="https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#alpha-coverage">https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#alpha-coverage</a></p> <p dir="auto">Change the material's blend mode to ZERO-ONE (in GLTFLoader) might solve this problem?</p> <p dir="auto">This is how it should be (rendered in Unity):</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7824814/50501529-30b73600-0a9c-11e9-9a4d-ef35f3c785e1.png"><img src="https://user-images.githubusercontent.com/7824814/50501529-30b73600-0a9c-11e9-9a4d-ef35f3c785e1.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Here's how it looks like in Three.js GLTFLoader:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7824814/50501707-8b04c680-0a9d-11e9-80dd-a68189f90156.png"><img src="https://user-images.githubusercontent.com/7824814/50501707-8b04c680-0a9d-11e9-80dd-a68189f90156.png" alt="default" style="max-width: 100%;"></a></p> <p dir="auto">This is the source code:<br> <a href="https://github.com/FMS-Cat/cube-gradient-alpha">https://github.com/FMS-Cat/cube-gradient-alpha</a></p> <h3 dir="auto">Environment:</h3> <ul dir="auto"> <li>Three.js version: <strong>r99</strong></li> <li>Browser: Confirmed in <strong>Chrome, Firefox, Edge</strong></li> <li>OSes: <strong>Windows</strong>. Has not tested in other env</li> <li>Hardware: <strong>Probably no requirements</strong></li> </ul>
0
<p dir="auto">After upgrading to Druid 0.16.0-incubating, I am receiving a MySQLIntegrityConstraintViolationException complaining about:</p> <p dir="auto">"Duplicate entry XXX for key 'PRIMARY' [statement:"INSERT INTO druid_pendingSegments (id, dataSource.."</p> <p dir="auto">This results in the Kafka indexing tasks not being able to complete and the eventual failure of the coordinator/overlord nodes. This scenario only seems to happen after I drop some segments from Druid and then push in new data for the time period which was dropped. The only way I have found to fix this has been to force stop all of my Kafka indexing supervisors &amp; tasks and manually delete all of the entires in the druid_pendingSegments table. After I do that, I no longer receive the sql exception and corresponding duplicate entry error message. Any thoughts on this would be greatly appreciated!</p> <p dir="auto"><strong>How to Reproduce:</strong></p> <ol dir="auto"> <li>Suspend a Kafka indexing supervisor for a given data source and wait for the indexing task(s) to complete.</li> <li>Drop segments for a certain time period from the given data source and wait for the segments to be unloaded from the historical nodes.</li> <li>Resume the Kafka indexing supervisor for a given data source.</li> <li>Push new data through Kafka for the same time period which was previously dropped on the given data source.</li> <li>Check the indexing logs for the Kafka indexing tasks to see them complaining about duplicate primary key errors.</li> </ol> <p dir="auto"><strong>Other Notables:</strong></p> <ol dir="auto"> <li>The druid_pendingSegments table doesn't seem to get cleaned up once a Kafka indexing supervisor is suspended. Entries are still left in this table for the given data source despite all the segments having been published to deepstorage / historical nodes. I do have <code class="notranslate">druid.coordinator.kill.pendingSegments.on=true</code> enabled. Maybe this is normal?</li> </ol>
<p dir="auto">There have been multiple discussions about Druid source having too many sub-projects which really doesn't provide much value and often leads to complications e.g. <code class="notranslate">server/src/main/java/io/druid/client/indexing/ClientXXXQuery.java</code> classes are equivalent to <code class="notranslate">XXXTask.java</code> classes in <code class="notranslate">indexing-service/</code> and needs to stay in sync .. more such classes are created in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="275054823" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/5102" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/5102/hovercard" href="https://github.com/apache/druid/pull/5102">#5102</a> .<br> similar desire has been mentioned in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="283950444" data-permission-text="Title is private" data-url="https://github.com/metamx/java-util/issues/74" data-hovercard-type="pull_request" data-hovercard-url="/metamx/java-util/pull/74/hovercard?comment_id=353473234&amp;comment_type=issue_comment" href="https://github.com/metamx/java-util/pull/74#issuecomment-353473234">metamx/java-util#74 (comment)</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="275054823" data-permission-text="Title is private" data-url="https://github.com/apache/druid/issues/5102" data-hovercard-type="pull_request" data-hovercard-url="/apache/druid/pull/5102/hovercard?comment_id=158430657&amp;comment_type=review_comment" href="https://github.com/apache/druid/pull/5102#discussion_r158430657">#5102 (comment)</a> .</p> <p dir="auto">So, here is my initial idea....</p> <ol dir="auto"> <li>merge <code class="notranslate">druid-api, druid-commons, java-utils, druid-processing</code> into <code class="notranslate">druid-core</code></li> <li>merge <code class="notranslate">druid-server, druid-indexing-service</code> into <code class="notranslate">druid-server</code></li> </ol> <p dir="auto">we can merge things further if necessary.</p>
0
<h5 dir="auto">Issue Type: Bug Report</h5> <h5 dir="auto">Ansible Version: 1.7.2</h5> <h5 dir="auto">Environment: Arch Linux, virtualenv, python 2.7.8</h5> <h5 dir="auto">Summary:</h5> <p dir="auto">Ansible is <strong>NOT</strong> respecting specified delegate_to in this case !</p> <h5 dir="auto">Steps To Reproduce:</h5> <p dir="auto">With inventory and playbook in <a href="https://gist.github.com/jpic/d7769dbbeb2262f2a29b">https://gist.github.com/jpic/d7769dbbeb2262f2a29b</a></p> <p dir="auto">Run command</p> <p dir="auto">ansible-playbook -v site.yml -i inventory</p> <h5 dir="auto">Expected Results:</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [do something on the kvm hosting the vm] ******************************** changed: [hostb -&gt; kvmb] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: &quot;echo domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:27:50&quot;, &quot;delta&quot;: &quot;0:00:00.002954&quot;, &quot;end&quot;: &quot;2014-10-23 02:27:50.729417&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2014-10-23 02:27:50.726463&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:27:50&quot;} TASK: [do something on the kvm hosting the vm] ******************************** changed: [hosta -&gt; kvma] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: &quot;echo domain=hosta kvm=kvma snapshot_name=MEP-2014-10-23-02:27:50&quot;, &quot;delta&quot;: &quot;0:00:00.003011&quot;, &quot;end&quot;: &quot;2014-10-23 02:27:50.792144&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2014-10-23 02:27:50.789133&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;domain=hosta kvm=kvma snapshot_name=MEP-2014-10-23-02:27:50&quot;}"><pre class="notranslate"><code class="notranslate">TASK: [do something on the kvm hosting the vm] ******************************** changed: [hostb -&gt; kvmb] =&gt; {"changed": true, "cmd": "echo domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:27:50", "delta": "0:00:00.002954", "end": "2014-10-23 02:27:50.729417", "rc": 0, "start": "2014-10-23 02:27:50.726463", "stderr": "", "stdout": "domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:27:50"} TASK: [do something on the kvm hosting the vm] ******************************** changed: [hosta -&gt; kvma] =&gt; {"changed": true, "cmd": "echo domain=hosta kvm=kvma snapshot_name=MEP-2014-10-23-02:27:50", "delta": "0:00:00.003011", "end": "2014-10-23 02:27:50.792144", "rc": 0, "start": "2014-10-23 02:27:50.789133", "stderr": "", "stdout": "domain=hosta kvm=kvma snapshot_name=MEP-2014-10-23-02:27:50"} </code></pre></div> <h5 dir="auto">Actual Results:</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [do something on the kvm hosting the vm] ******************************** changed: [hostb -&gt; kvmb] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: &quot;echo domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:27:50&quot;, &quot;delta&quot;: &quot;0:00:00.002954&quot;, &quot;end&quot;: &quot;2014-10-23 02:27:50.729417&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2014-10-23 02:27:50.726463&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:27:50&quot;} TASK: [do something on the kvm hosting the vm] ******************************** changed: [hosta -&gt; kvmb] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: &quot;echo domain=hosta kvm=kvma snapshot_name=MEP-2014-10-23-02:27:50&quot;, &quot;delta&quot;: &quot;0:00:00.003011&quot;, &quot;end&quot;: &quot;2014-10-23 02:27:50.792144&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2014-10-23 02:27:50.789133&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;domain=hosta kvm=kvma snapshot_name=MEP-2014-10-23-02:27:50&quot;}"><pre class="notranslate"><code class="notranslate">TASK: [do something on the kvm hosting the vm] ******************************** changed: [hostb -&gt; kvmb] =&gt; {"changed": true, "cmd": "echo domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:27:50", "delta": "0:00:00.002954", "end": "2014-10-23 02:27:50.729417", "rc": 0, "start": "2014-10-23 02:27:50.726463", "stderr": "", "stdout": "domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:27:50"} TASK: [do something on the kvm hosting the vm] ******************************** changed: [hosta -&gt; kvmb] =&gt; {"changed": true, "cmd": "echo domain=hosta kvm=kvma snapshot_name=MEP-2014-10-23-02:27:50", "delta": "0:00:00.003011", "end": "2014-10-23 02:27:50.792144", "rc": 0, "start": "2014-10-23 02:27:50.789133", "stderr": "", "stdout": "domain=hosta kvm=kvma snapshot_name=MEP-2014-10-23-02:27:50"} </code></pre></div> <p dir="auto"><strong>Why is hosta task delegated to kvmb in actual results ?</strong> -&gt; <code class="notranslate">[hosta -&gt; kvmb]</code></p> <p dir="auto">I wonder, it really looks like a bug to me.</p> <p dir="auto">Am I doing anything wrong ?</p> <p dir="auto">Is it a regression ? <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7379957" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/1241" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/1241/hovercard" href="https://github.com/ansible/ansible/issues/1241">#1241</a></p> <p dir="auto">Here's an interresting debug session:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook -i inventory -v site.yml PLAY [foo] ******************************************************************** GATHERING FACTS *************************************************************** ok: [hostb] ok: [hosta] TASK: [do something on the kvm hosting the vm] ******************************** &gt; /home/jpic/env/lib/python2.7/site-packages/ansible/runner/__init__.py(622)_executor_internal() 621 import ipdb; ipdb.set_trace() ### XXX BREAKPOINT --&gt; 622 self.module_vars['delegate_to'] = template.template(self.basedir, delegate_to, inject) 623 ipdb&gt; self.module_vars['delegate_to'] '{% if True %}{{ kvm }}{% endif %}' ipdb&gt; c changed: [hostb -&gt; kvmb] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: &quot;echo domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:45:27&quot;, &quot;delta&quot;: &quot;0:00:00.004601&quot;, &quot;end&quot;: &quot;2014-10-23 02:45:33.465961&quot;, &quot;rc&quot;: 0, &quot;start&quot;: &quot;2014-10-23 02:45:33.461360&quot;, &quot;stderr&quot;: &quot;&quot;, &quot;stdout&quot;: &quot;domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:45:27&quot;} TASK: [do something on the kvm hosting the vm] ******************************** &gt; /home/jpic/env/lib/python2.7/site-packages/ansible/runner/__init__.py(622)_executor_internal() 621 import ipdb; ipdb.set_trace() ### XXX BREAKPOINT --&gt; 622 self.module_vars['delegate_to'] = template.template(self.basedir, delegate_to, inject) 623 ipdb&gt; self.module_vars['delegate_to'] u'kvmb' &lt;-------- it has not been re-interpreted ipdb&gt; "><pre class="notranslate"><code class="notranslate">$ ansible-playbook -i inventory -v site.yml PLAY [foo] ******************************************************************** GATHERING FACTS *************************************************************** ok: [hostb] ok: [hosta] TASK: [do something on the kvm hosting the vm] ******************************** &gt; /home/jpic/env/lib/python2.7/site-packages/ansible/runner/__init__.py(622)_executor_internal() 621 import ipdb; ipdb.set_trace() ### XXX BREAKPOINT --&gt; 622 self.module_vars['delegate_to'] = template.template(self.basedir, delegate_to, inject) 623 ipdb&gt; self.module_vars['delegate_to'] '{% if True %}{{ kvm }}{% endif %}' ipdb&gt; c changed: [hostb -&gt; kvmb] =&gt; {"changed": true, "cmd": "echo domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:45:27", "delta": "0:00:00.004601", "end": "2014-10-23 02:45:33.465961", "rc": 0, "start": "2014-10-23 02:45:33.461360", "stderr": "", "stdout": "domain=hostb kvm=kvmb snapshot_name=MEP-2014-10-23-02:45:27"} TASK: [do something on the kvm hosting the vm] ******************************** &gt; /home/jpic/env/lib/python2.7/site-packages/ansible/runner/__init__.py(622)_executor_internal() 621 import ipdb; ipdb.set_trace() ### XXX BREAKPOINT --&gt; 622 self.module_vars['delegate_to'] = template.template(self.basedir, delegate_to, inject) 623 ipdb&gt; self.module_vars['delegate_to'] u'kvmb' &lt;-------- it has not been re-interpreted ipdb&gt; </code></pre></div>
<h5 dir="auto">Issue Type:</h5> <p dir="auto">Bug Report</p> <h5 dir="auto">Ansible Version:</h5> <p dir="auto">all versions</p> <h5 dir="auto">Environment:</h5> <p dir="auto">N/A</p> <h5 dir="auto">Summary:</h5> <p dir="auto">There is a bug in the templating code of <code class="notranslate">delegate_to:</code> in that, it only happens once per runner proces fork, instead of for every host.</p> <h5 dir="auto">Steps To Reproduce:</h5> <p dir="auto">Test inventory and playbook:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ for n in `seq 0 20`; do echo host$n &gt;&gt; hosts ; done $ cat test.yml --- - hosts: all gather_facts: false connection: local tasks: - command: sleep 1 delegate_to: '{{ inventory_hostname }}'"><pre class="notranslate"><code class="notranslate">$ for n in `seq 0 20`; do echo host$n &gt;&gt; hosts ; done $ cat test.yml --- - hosts: all gather_facts: false connection: local tasks: - command: sleep 1 delegate_to: '{{ inventory_hostname }}' </code></pre></div> <h5 dir="auto">Expected Results:</h5> <p dir="auto"><code class="notranslate">ansible-playbook -i hosts test.yml -f 1</code> (or whatever value for fork)</p> <p dir="auto">TASK: [command sleep 1] *******************************************************<br> changed: [host1 -&gt; host1]<br> changed: [host0 -&gt; host0]<br> changed: [host2 -&gt; host2]<br> changed: [host4 -&gt; host4]<br> changed: [host8 -&gt; host8]<br> changed: [host3 -&gt; host3]<br> changed: [host6 -&gt; host6]<br> changed: [host9 -&gt; host9]<br> changed: [host5 -&gt; host5]<br> changed: [host14 -&gt; host14]<br> changed: [host16 -&gt; host16]<br> changed: [host15 -&gt; host15]<br> changed: [host10 -&gt; host10]<br> changed: [host13 -&gt; host13]<br> changed: [host11 -&gt; host11]<br> changed: [host18 -&gt; host18]<br> changed: [host17 -&gt; host17]<br> changed: [host20 -&gt; host20]<br> changed: [host19 -&gt; host19]<br> changed: [host7 -&gt; host7]<br> changed: [host12 -&gt; host12]</p> <h5 dir="auto">Actual Results:</h5> <p dir="auto"><code class="notranslate">ansible-playbook -i hosts test.yml -f 1</code><br> TASK: [command sleep 1] *******************************************************<br> changed: [host0 -&gt; host0]<br> changed: [host1 -&gt; host0]<br> changed: [host2 -&gt; host0]<br> changed: [host3 -&gt; host0]<br> changed: [host4 -&gt; host0]<br> changed: [host5 -&gt; host0]<br> changed: [host6 -&gt; host0]<br> changed: [host7 -&gt; host0]<br> changed: [host8 -&gt; host0]<br> ...</p> <p dir="auto"><code class="notranslate">ansible-playbook -i hosts test.yml -f 2</code><br> TASK: [command sleep 1] *******************************************************<br> changed: [host1 -&gt; host1]<br> changed: [host0 -&gt; host0]<br> changed: [host3 -&gt; host0]<br> changed: [host2 -&gt; host1]<br> changed: [host5 -&gt; host1]<br> changed: [host4 -&gt; host0]<br> changed: [host6 -&gt; host1]<br> changed: [host7 -&gt; host0]<br> changed: [host9 -&gt; host0]<br> ...</p> <p dir="auto"><code class="notranslate">ansible-playbook -i hosts test.yml -f 3</code><br> TASK: [command sleep 1] *******************************************************<br> changed: [host2 -&gt; host2]<br> changed: [host1 -&gt; host1]<br> changed: [host0 -&gt; host0]<br> changed: [host3 -&gt; host2]<br> changed: [host4 -&gt; host1]<br> changed: [host5 -&gt; host0]<br> changed: [host6 -&gt; host2]<br> changed: [host7 -&gt; host1]<br> ...</p> <p dir="auto">The same effect can also be seen by varying the <code class="notranslate">serial:</code> option in the play.</p>
1
<ul dir="auto"> <li><strong>Electron Version</strong> (output of <code class="notranslate">node_modules/.bin/electron --version</code>): 4.0.x also in 3.x.x or older</li> <li><strong>Operating System</strong> (Platform and Version): Windows 7 &amp; Windows 10</li> </ul> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">The tray menu displays the same speed as normal.</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">Windows 7:<br> It took almost a second to show up.<br> Almost impossible to display when the number of menus increases.<br> macOS 10.14.2:<br> No difference from the normal menu. There is no problem.</p> <h3 dir="auto">To Reproduce</h3> <p dir="auto"><a href="https://github.com/orangeChu/multi-level-menu-for-tray.git">multi-level-menu-for-tray</a><br> <a href="https://github.com/electron/electron/issues/16156" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/16156/hovercard">link issue#16156</a><br> <a href="https://github.com/electron/electron/issues/16413" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/16413/hovercard">link issue#16413</a></p> <h3 dir="auto">Screenshots</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/25950247/51219452-f7bc0400-196b-11e9-866f-9d5e91b06bc1.gif"><img src="https://user-images.githubusercontent.com/25950247/51219452-f7bc0400-196b-11e9-866f-9d5e91b06bc1.gif" alt="screen" data-animated-image="" style="max-width: 100%;"></a></p> <h3 dir="auto">Additional Information</h3> <p dir="auto">In issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="399600688" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/16413" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/16413/hovercard" href="https://github.com/electron/electron/issues/16413">#16413</a>, codebytere is said to be a limitation of the Windows platform, but I use the <a href="https://github.com/weolar/miniblink49"><code class="notranslate">miniblink</code></a> (more compact, which implements most of the electron functions) to create a tray menu that loads the multi-level menu at a different speed than the normal menu. . So I want to re-create a new problem for loading multi-level menus.<br> <a href="https://github.com/electron/electron/files/2860844/demo.zip">demo(with miniblink).zip</a><br> Can you please re-emphasize this issue? Thanks.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/codebytere/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/codebytere">@codebytere</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/MarshallOfSound/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/MarshallOfSound">@MarshallOfSound</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zcbenz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zcbenz">@zcbenz</a></p>
<ul dir="auto"> <li>electron@3.0.12(It also happens in 4.0.0)</li> <li>win7 ultimate 64bit</li> </ul> <p dir="auto">Hi guys,<br> When I try to create multi-level menu for tray-menu,it worked,but loading speed is too slow.</p> <p dir="auto">Example code is below.<br> main.js</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'use strict'; const app = require('electron').app; const Tray = require('electron').Tray; const Menu = require('electron').Menu; const path = require('path'); let tray; let contextMenu; class Test { constructor() { } initApp() { app.on('ready', () =&gt; { this.createTray(); }); } createTray() { tray = new Tray(path.join(__dirname, 'icon.png')); tray.setToolTip('Test'); let childMenu = []; let submenu = []; let lastLv = []; for (let index = 0; index &lt; 5; index++) { lastLv.push({ label: `lastLv${index}` }); } for (let index = 0; index &lt; 10; index++) { childMenu.push({ label: `childMenu${index}`, type: 'submenu', submenu: lastLv }); } for (let index = 0; index &lt; 500; index++) { submenu.push({ label: `menuItem${index}`, type: 'submenu', submenu: childMenu }); } contextMenu = Menu.buildFromTemplate([{ label: 'test', type: 'submenu', submenu }]); tray.on('right-click', () =&gt; { //It may be cost 2's or more tray.popUpContextMenu(contextMenu); }); } } new Test().initApp();"><pre class="notranslate"><code class="notranslate">'use strict'; const app = require('electron').app; const Tray = require('electron').Tray; const Menu = require('electron').Menu; const path = require('path'); let tray; let contextMenu; class Test { constructor() { } initApp() { app.on('ready', () =&gt; { this.createTray(); }); } createTray() { tray = new Tray(path.join(__dirname, 'icon.png')); tray.setToolTip('Test'); let childMenu = []; let submenu = []; let lastLv = []; for (let index = 0; index &lt; 5; index++) { lastLv.push({ label: `lastLv${index}` }); } for (let index = 0; index &lt; 10; index++) { childMenu.push({ label: `childMenu${index}`, type: 'submenu', submenu: lastLv }); } for (let index = 0; index &lt; 500; index++) { submenu.push({ label: `menuItem${index}`, type: 'submenu', submenu: childMenu }); } contextMenu = Menu.buildFromTemplate([{ label: 'test', type: 'submenu', submenu }]); tray.on('right-click', () =&gt; { //It may be cost 2's or more tray.popUpContextMenu(contextMenu); }); } } new Test().initApp(); </code></pre></div>
1
<h2 dir="auto">Checklist</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <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> </ul> <h2 dir="auto">Report</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.0.2 (latentcall) kombu:4.0.2 py:3.5.0 billiard:3.5.0.2 py-amqp:2.1.4 platform -&gt; system:Darwin arch:64bit imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:amqp results:rpc imports: ('project.myapp.tasks',) task_annotations: { 'tasks.add': {'rate_limit': '10/s'}} broker_url: 'amqp://guest:********@localhost:5672//' result_backend: 'rpc'"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.0.2 (latentcall) kombu:4.0.2 py:3.5.0 billiard:3.5.0.2 py-amqp:2.1.4 platform -&gt; system:Darwin arch:64bit imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:amqp results:rpc imports: ('project.myapp.tasks',) task_annotations: { 'tasks.add': {'rate_limit': '10/s'}} broker_url: 'amqp://guest:********@localhost:5672//' result_backend: 'rpc' </code></pre></div> <h2 dir="auto">Steps to reproduce</h2> <ol dir="auto"> <li>Start default <code class="notranslate">rabbitmq-server</code> and a default <code class="notranslate">worker</code></li> <li>Have two tasks, one called inside the other:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@celery_app.task def super_task(): async_res = sub_task.apply_async() while not async_res.ready(): time.sleep(1) if async_res.failed(): raise async_res.result else: return async_res.result @celery_app.task def sub_task(): raise Exception('Controlled error')"><pre class="notranslate"><code class="notranslate">@celery_app.task def super_task(): async_res = sub_task.apply_async() while not async_res.ready(): time.sleep(1) if async_res.failed(): raise async_res.result else: return async_res.result @celery_app.task def sub_task(): raise Exception('Controlled error') </code></pre></div> <ol start="3" dir="auto"> <li>Call for <code class="notranslate">super_task</code></li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="r = super_task.apply_async() try: r.get() except Exception as exc: if exc.__class__.__module__ != 'builtins': assert 0, 'Exception type is not builtin'"><pre class="notranslate"><code class="notranslate">r = super_task.apply_async() try: r.get() except Exception as exc: if exc.__class__.__module__ != 'builtins': assert 0, 'Exception type is not builtin' </code></pre></div> <p dir="auto"><em>optionally</em>: download the attached project, install celery and run the file <code class="notranslate">test_raising.py</code><br> <a href="https://github.com/celery/celery/files/702053/celery_project.zip">celery_project.zip</a></p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">The subtask exception of type <code class="notranslate">Exception</code> from python <code class="notranslate">builtins</code> module to be arisen up to the main process and the assert check successful</p> <h2 dir="auto">Actual behavior</h2> <p dir="auto">The arisen exception is not builtin is of class <code class="notranslate">celery.backends.base.Exception</code> instead, and if you check the <code class="notranslate">worker</code> log a <code class="notranslate">super_task</code> task handler raised an error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;MaybeEncodingError: Error sending result: '&quot;(1, &lt;ExceptionInfo: Exception('Controlled error',)&gt;, None)&quot;'. Reason: ''PicklingError(&quot;Can\'t pickle &lt;class \'celery.backends.base.Exception\'&gt;: attribute lookup Exception on celery.backends.base failed&quot;,)''.&gt;"><pre class="notranslate"><code class="notranslate">&lt;MaybeEncodingError: Error sending result: '"(1, &lt;ExceptionInfo: Exception('Controlled error',)&gt;, None)"'. Reason: ''PicklingError("Can\'t pickle &lt;class \'celery.backends.base.Exception\'&gt;: attribute lookup Exception on celery.backends.base failed",)''.&gt; </code></pre></div>
<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>[] 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> <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" checked=""> 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" checked=""> 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" checked=""> 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" checked=""> 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" checked=""> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; 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</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>: 4.4.0</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><p dir="auto">keep having <code class="notranslate">celery: error: unrecognized arguments: report</code><br> but the error is in when calling to celery and not from celery it self</p> <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>: 3.6.1</li> <li><strong>Minimal Celery Version</strong>: 4.4.0</li> <li><strong>Minimal Kombu Version</strong>: 4.6.7</li> <li><strong>Minimal Broker Version</strong>: 3.8.3</li> <li><strong>Minimal Result Backend Version</strong>: 5.0.3</li> <li><strong>Minimal OS and/or Kernel Version</strong>: Mac 10.14.6</li> <li><strong>Minimal Broker Client Version</strong>: 3.3.11</li> <li><strong>Minimal Result Backend Client Version</strong>: 3.3.11</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="kombu==4.6.7 amqp==2.5.2 celery==4.4.0 redis==3.3.11"><pre class="notranslate"><code class="notranslate">kombu==4.6.7 amqp==2.5.2 celery==4.4.0 redis==3.3.11 </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"> </p><p dir="auto">Its not a test case but please run the python file here<br> <a href="https://gist.github.com/ericman93/2ec31270ea68b3cfd56338039c766e9c">https://gist.github.com/ericman93/2ec31270ea68b3cfd56338039c766e9c</a></p> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Taks to run</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">Trying to run this pipeline</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="eric.celery.core.print_message('START!') | %(dummy([print_message('Starting subtask A'), eric.celery.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask A')]) | %(dummy([print_message('Starting Subtask B'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask B'), eric.tasks.subtask_b('ad56c520f9a74173ad3e6446f19712b8', '458db63427bd48e98f9b3d27204589a9', 2, '946f464babca43de8bc03e5c1202f813')]) | %(dummy([print_message('Starting Subtask C'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask C'), eric.tasks.subtask_c('ad56c520f9a74173ad3e6446f19712b8', 'C')]) | print_message('Starting next session') | %(dummy([%(dummy([print_message('Starting subtask D-I'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask D'), eric.tasks.subtask_d('974fb9cb12e04a3a856c4438b5bb33b7')]) | %dummy([print_message('Starting Subtask D-I'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask E'), eric.tasks.subtask_e('aa107a89e6d84aa1999269725f5a6b11', 2), eric.tasks.subtask_e('ce2d6f8dc6494222979b00582f75a0eb', 2), eric.tasks.subtask_e('35d2c5f0d04a4c7cb48751ddec3e469d', 2), eric.tasks.subtask_e('410318c5579046cdbf009be243e4596c', 2)])), %(dummy([print_message('Starting subtask D-II'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask D'), eric.tasks.subtask_d('0cd1a4cd01774644aa9ee8cc1fbac834')]) | %dummy([print_message('Starting Subtask E-II'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask E'), eric.tasks.subtask_e('c6d0947ac9214d68a1b3ef889a2fe2b2', 2), eric.tasks.subtask_e('81a7e39833e54fdcba9dbe0590354954', 2), eric.tasks.subtask_e('38f80253760c4f8d8747e667dfc90914', 2), eric.tasks.subtask_e('5249d50e4c0342e8abe3d343f9998361', 2)]))]) | %(dummy([print_message('Staring subtask F'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask F'), eric.tasks.subtask_f('ad56c520f9a74173ad3e6446f19712b8')]) | %(dummy([print_message('Starting subtask G'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask G'), eric.tasks.subtask_g_1('ad56c520f9a74173ad3e6446f19712b8'), eric.tasks.subtask_g_2('ad56c520f9a74173ad3e6446f19712b8')]) | %dummy([print_message('Final sub task'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Complete'), eric.tasks.finish_1('ad56c520f9a74173ad3e6446f19712b8'), eric.tasks.finish_2('ad56c520f9a74173ad3e6446f19712b8')])))))))"><pre class="notranslate"><code class="notranslate">eric.celery.core.print_message('START!') | %(dummy([print_message('Starting subtask A'), eric.celery.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask A')]) | %(dummy([print_message('Starting Subtask B'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask B'), eric.tasks.subtask_b('ad56c520f9a74173ad3e6446f19712b8', '458db63427bd48e98f9b3d27204589a9', 2, '946f464babca43de8bc03e5c1202f813')]) | %(dummy([print_message('Starting Subtask C'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask C'), eric.tasks.subtask_c('ad56c520f9a74173ad3e6446f19712b8', 'C')]) | print_message('Starting next session') | %(dummy([%(dummy([print_message('Starting subtask D-I'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask D'), eric.tasks.subtask_d('974fb9cb12e04a3a856c4438b5bb33b7')]) | %dummy([print_message('Starting Subtask D-I'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask E'), eric.tasks.subtask_e('aa107a89e6d84aa1999269725f5a6b11', 2), eric.tasks.subtask_e('ce2d6f8dc6494222979b00582f75a0eb', 2), eric.tasks.subtask_e('35d2c5f0d04a4c7cb48751ddec3e469d', 2), eric.tasks.subtask_e('410318c5579046cdbf009be243e4596c', 2)])), %(dummy([print_message('Starting subtask D-II'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask D'), eric.tasks.subtask_d('0cd1a4cd01774644aa9ee8cc1fbac834')]) | %dummy([print_message('Starting Subtask E-II'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask E'), eric.tasks.subtask_e('c6d0947ac9214d68a1b3ef889a2fe2b2', 2), eric.tasks.subtask_e('81a7e39833e54fdcba9dbe0590354954', 2), eric.tasks.subtask_e('38f80253760c4f8d8747e667dfc90914', 2), eric.tasks.subtask_e('5249d50e4c0342e8abe3d343f9998361', 2)]))]) | %(dummy([print_message('Staring subtask F'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask F'), eric.tasks.subtask_f('ad56c520f9a74173ad3e6446f19712b8')]) | %(dummy([print_message('Starting subtask G'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Subtask G'), eric.tasks.subtask_g_1('ad56c520f9a74173ad3e6446f19712b8'), eric.tasks.subtask_g_2('ad56c520f9a74173ad3e6446f19712b8')]) | %dummy([print_message('Final sub task'), eric.tasks.change_project_status_task('ad56c520f9a74173ad3e6446f19712b8', 'Complete'), eric.tasks.finish_1('ad56c520f9a74173ad3e6446f19712b8'), eric.tasks.finish_2('ad56c520f9a74173ad3e6446f19712b8')]))))))) </code></pre></div> <p dir="auto">When using Rabbit as a broker it tasks 20 seconds to run <code class="notranslate">applay_async</code> and then the tasks are not starting in celery.<br> When using Redis as a broker this exception raising</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/connection.py&quot;, line 666, in send_packed_command sendall(self._sock, item) File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/_compat.py&quot;, line 8, in sendall return sock.sendall(*args, **kwargs) BrokenPipeError: [Errno 32] Broken pipe During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/kombu/connection.py&quot;, line 439, in _reraise_as_library_errors yield File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/kombu/connection.py&quot;, line 518, in _ensured return fun(*args, **kwargs) File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/kombu/messaging.py&quot;, line 203, in _publish mandatory=mandatory, immediate=immediate, File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/kombu/transport/virtual/base.py&quot;, line 608, in basic_publish return self._put(routing_key, message, **kwargs) File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/kombu/transport/redis.py&quot;, line 789, in _put client.lpush(self._q_for_pri(queue, pri), dumps(message)) File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/client.py&quot;, line 1679, in lpush return self.execute_command('LPUSH', name, *values) File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/client.py&quot;, line 838, in execute_command conn.send_command(*args) File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/connection.py&quot;, line 687, in send_command check_health=kwargs.get('check_health', True)) File &quot;/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/connection.py&quot;, line 679, in send_packed_command (errno, errmsg)) redis.exceptions.ConnectionError: Error 32 while writing to socket. Broken pipe."><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/connection.py", line 666, in send_packed_command sendall(self._sock, item) File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/_compat.py", line 8, in sendall return sock.sendall(*args, **kwargs) BrokenPipeError: [Errno 32] Broken pipe During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/kombu/connection.py", line 439, in _reraise_as_library_errors yield File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/kombu/connection.py", line 518, in _ensured return fun(*args, **kwargs) File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/kombu/messaging.py", line 203, in _publish mandatory=mandatory, immediate=immediate, File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/kombu/transport/virtual/base.py", line 608, in basic_publish return self._put(routing_key, message, **kwargs) File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/kombu/transport/redis.py", line 789, in _put client.lpush(self._q_for_pri(queue, pri), dumps(message)) File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/client.py", line 1679, in lpush return self.execute_command('LPUSH', name, *values) File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/client.py", line 838, in execute_command conn.send_command(*args) File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/connection.py", line 687, in send_command check_health=kwargs.get('check_health', True)) File "/Users/eric/.local/share/virtualenvs/romee-vHL_yubm/lib/python3.6/site-packages/redis/connection.py", line 679, in send_packed_command (errno, errmsg)) redis.exceptions.ConnectionError: Error 32 while writing to socket. Broken pipe. </code></pre></div> <p dir="auto">This is really gets stuck at <code class="notranslate">producer.publish</code> in <code class="notranslate">amqp.py</code><br> If I make the pipeline smaller, everthing works fine</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> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">In the docs and in the code the Tooltip component uses the prop <code class="notranslate">placement</code> to position the Tooltip, but in the declaration file the prop is called <code class="notranslate">place</code>. I believe it's just a simple typo.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0.0-beta.10</td> </tr> </tbody> </table>
<p dir="auto">Thanks for the new <code class="notranslate">Tooltip</code> component! Currently the <code class="notranslate">label</code> does not use the font from the theme.</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 tooltip label should be in the same fontface as the theme</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">The label fontface is inherited from parent</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;Tooltip label='My Tooltip' placement='bottom'&gt; &lt;Button onClick={onClick}&gt; &lt;AddIcon /&gt; &lt;/Button&gt; &lt;/Tooltip&gt;"><pre class="notranslate"><code class="notranslate">&lt;Tooltip label='My Tooltip' placement='bottom'&gt; &lt;Button onClick={onClick}&gt; &lt;AddIcon /&gt; &lt;/Button&gt; &lt;/Tooltip&gt; </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.10</td> </tr> <tr> <td>React</td> <td>15.6.1</td> </tr> </tbody> </table>
0
<p dir="auto">The source code is contained within this repo:<br> <a href="https://github.com/ChiKler/2D-container-of-2D-items-TS-JS/tree/36ef9c152bc3f27b0d2eef00ef599be696331fcf">https://github.com/ChiKler/2D-container-of-2D-items-TS-JS/tree/36ef9c152bc3f27b0d2eef00ef599be696331fcf</a></p> <p dir="auto">Here's the sequence of commands you must execute in order to replicate this behaviour:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone https://github.com/ChiKler/2D-container-of-2D-items-TS-JS.git cd 2D-container-of-2D-items-TS-JS git reset --hard 36ef9c152bc3f27b0d2eef00ef599be696331fcf deno run --allow-net --allow-read --reload ./src/mod.test.ts deno run --allow-net --allow-read ./src/mod.test.ts"><pre class="notranslate"><code class="notranslate">git clone https://github.com/ChiKler/2D-container-of-2D-items-TS-JS.git cd 2D-container-of-2D-items-TS-JS git reset --hard 36ef9c152bc3f27b0d2eef00ef599be696331fcf deno run --allow-net --allow-read --reload ./src/mod.test.ts deno run --allow-net --allow-read ./src/mod.test.ts </code></pre></div> <p dir="auto">As you can see, the first time you run the script, it throws some errors; the next time it doesn't.</p> <p dir="auto">Edit: In order to fix this, I added some <code class="notranslate">// @ts-ignore</code> comments.<br> Here's the commit that fixes it:<br> <a href="https://github.com/ChiKler/2D-container-of-2D-items-TS-JS/commit/2adf4611d4f9b13ec4ec4d64524a66a491f7508d">https://github.com/ChiKler/2D-container-of-2D-items-TS-JS/commit/2adf4611d4f9b13ec4ec4d64524a66a491f7508d</a></p>
<p dir="auto">Because <code class="notranslate">std/http/server.ts</code> uses <code class="notranslate">MuxAsyncIterator</code> to serve up requests, any errors thrown there cannot be caught:</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/denoland/deno/blob/e34a3b61f449cf6197b6d701770a85d9205c2a7b/std/http/server.ts#L235-L239">deno/std/http/server.ts</a> </p> <p class="mb-0 color-fg-muted"> Lines 235 to 239 in <a data-pjax="true" class="commit-tease-sha" href="/denoland/deno/commit/e34a3b61f449cf6197b6d701770a85d9205c2a7b">e34a3b6</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="L235" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="235"></td> <td id="LC235" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">[</span><span class="pl-smi">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">asyncIterator</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">AsyncIterableIterator</span><span class="pl-kos">&lt;</span><span class="pl-smi">ServerRequest</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> </td> </tr> <tr class="border-0"> <td id="L236" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="236"></td> <td id="LC236" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">const</span> <span class="pl-s1">mux</span>: <span class="pl-smi">MuxAsyncIterator</span><span class="pl-kos">&lt;</span><span class="pl-smi">ServerRequest</span><span class="pl-kos">&gt;</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">MuxAsyncIterator</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td> </tr> <tr class="border-0"> <td id="L237" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="237"></td> <td id="LC237" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">mux</span><span class="pl-kos">.</span><span class="pl-en">add</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">acceptConnAndIterateHttpRequests</span><span class="pl-kos">(</span><span class="pl-s1">mux</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td> </tr> <tr class="border-0"> <td id="L238" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="238"></td> <td id="LC238" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-s1">mux</span><span class="pl-kos">.</span><span class="pl-en">iterate</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td> </tr> <tr class="border-0"> <td id="L239" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="239"></td> <td id="LC239" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">The comments on <code class="notranslate">MuxAsyncIterator</code> make it clear that:</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/denoland/deno/blob/e34a3b61f449cf6197b6d701770a85d9205c2a7b/std/async/mux_async_iterator.ts#L9-L14">deno/std/async/mux_async_iterator.ts</a> </p> <p class="mb-0 color-fg-muted"> Lines 9 to 14 in <a data-pjax="true" class="commit-tease-sha" href="/denoland/deno/commit/e34a3b61f449cf6197b6d701770a85d9205c2a7b">e34a3b6</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="L9" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="9"></td> <td id="LC9" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">/** The MuxAsyncIterator class multiplexes multiple async iterators into a</span> </td> </tr> <tr class="border-0"> <td id="L10" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="10"></td> <td id="LC10" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * single stream. It currently makes a few assumptions:</span> </td> </tr> <tr class="border-0"> <td id="L11" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="11"></td> <td id="LC11" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * - The iterators do not throw.</span> </td> </tr> <tr class="border-0"> <td id="L12" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="12"></td> <td id="LC12" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * - The final result (the value returned and not yielded from the iterator)</span> </td> </tr> <tr class="border-0"> <td id="L13" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="13"></td> <td id="LC13" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * does not matter; if there is any, it is discarded.</span> </td> </tr> <tr class="border-0"> <td id="L14" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="14"></td> <td id="LC14" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> */</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">And in situations where you have a TLS connection where the browser rejects the certificate, you end up with something like this with Deno dumping and no way to recover:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: Uncaught InvalidData: received corrupt message at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11) at Object.sendAsync ($deno$/ops/dispatch_json.ts:98:10) at async TLSListenerImpl.accept ($deno$/tls.ts:31:17) at async Server.acceptConnAndIterateHttpRequests (https://deno.land/std@0.50.0/http/server.ts:221:14) at async MuxAsyncIterator.callIteratorNext (https://deno.land/std@0.50.0/async/mux_async_iterator.ts:28:29)"><pre class="notranslate"><code class="notranslate">error: Uncaught InvalidData: received corrupt message at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11) at Object.sendAsync ($deno$/ops/dispatch_json.ts:98:10) at async TLSListenerImpl.accept ($deno$/tls.ts:31:17) at async Server.acceptConnAndIterateHttpRequests (https://deno.land/std@0.50.0/http/server.ts:221:14) at async MuxAsyncIterator.callIteratorNext (https://deno.land/std@0.50.0/async/mux_async_iterator.ts:28:29) </code></pre></div> <p dir="auto">We need a way to iterate that allows errors to be caught when iterating on HTTP server.</p>
0
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p> <p dir="auto">I'm building a search doo-dad and trying to describe criteria with chains of attributes, like might appear in a loading option: <code class="notranslate">Song.album, Album.artist, Artist.birth_year</code>.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="* Some tables need to be joined to multiple times, so I have to alias every table involved to be safe. If all I have is `attr = Song.album`, the best way I can find to create a corresponding alias is `getattr(aliased(attr.property.argument), attr.key)` -- which is ugly, not really documented, and doesn't work with association proxies and other special relationships that have no `key` attribute. * After getting some result rows, I often want to retrieve the column data corresponding to some criteria; e.g. if the user searched for a range, it's helpful to show the actual values. How do I get `some_song.album` given `Song.album`? I've only come up with the `key` line above, or the slightly more &quot;correct&quot; `attr.__get__(type(some_song), some_song)`."><pre class="notranslate"><code class="notranslate">* Some tables need to be joined to multiple times, so I have to alias every table involved to be safe. If all I have is `attr = Song.album`, the best way I can find to create a corresponding alias is `getattr(aliased(attr.property.argument), attr.key)` -- which is ugly, not really documented, and doesn't work with association proxies and other special relationships that have no `key` attribute. * After getting some result rows, I often want to retrieve the column data corresponding to some criteria; e.g. if the user searched for a range, it's helpful to show the actual values. How do I get `some_song.album` given `Song.album`? I've only come up with the `key` line above, or the slightly more "correct" `attr.__get__(type(some_song), some_song)`. </code></pre></div> <p dir="auto">I could just use string names of properties, I suppose, but I like the compile-time checking I get by using the actual objects.</p> <p dir="auto">A more general comment: some of the recipes and examples are absolutely fabulous, but I'd never have guessed that SQLAlchemy was even capable of such things, let alone figured out how to implement them. More documentation on extending SQLAlchemy itself would be phenomenally helpful. Note, for example, that the docs for <code class="notranslate">ConnectionEvents</code> don't describe the events' arguments.</p>
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong></p> <p dir="auto">In the next major version of <a href="https://python-gino.org" rel="nofollow">GINO</a> which will be built on SQLAlchemy 1.4, <code class="notranslate">AsyncConnection</code> is subclassed to be lazy (and together with many other contextual features, to be compatible with the current GINO version). It would be neat to put the lazy-connection initialization code in the overridden <code class="notranslate">AsyncConnection._sync_connection()</code> method to avoid a lot of code duplicates.</p> <p dir="auto"><strong>Describe the solution you'd like</strong></p> <p dir="auto">As demonstrated in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/fantix/sqlalchemy/commit/async-sync-connection/hovercard" href="https://github.com/fantix/sqlalchemy/commit/async-sync-connection">fantix@<tt>async-sync-connection</tt></a>, making the <code class="notranslate">_sync_connection()</code> method sync would allow subclasses to blend in async logic to get the actual connection.</p> <p dir="auto"><strong>Describe alternatives you've considered</strong></p> <p dir="auto">Otherwise, the subclasses would have to override and copy over all <code class="notranslate">AsyncConnection</code> methods to add async logic.</p> <p dir="auto"><strong>Additional context</strong></p> <p dir="auto"><a href="https://github.com/python-gino/gino/blob/501840be96a875490fda39f43ed5139fdee56d5d/src/gino/engine.py#L154-L166">https://github.com/python-gino/gino/blob/501840be96a875490fda39f43ed5139fdee56d5d/src/gino/engine.py#L154-L166</a></p> <p dir="auto"><strong>Have a nice day!</strong></p>
0
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">When I try to plot a scatterplot where all points are positioned in a regular 2D-grid layout, plotted points are not evenly spaced. Spacings differ systematically which leads to strange regular vertical patterns. With a 100x100 grid, this is the case for (9, 9) or smaller figures. Patterns get less visible with larger figures and disappear around (12, 12)</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import matplotlib.pyplot as plt x = np.tile(np.arange(100), 100) y = np.repeat(np.arange(100), 100) f, ax = plt.subplots(figsize=(7, 7)) ax.scatter(x, y, s=1, c='k')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">tile</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">100</span>), <span class="pl-c1">100</span>) <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">repeat</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">100</span>), <span class="pl-c1">100</span>) <span class="pl-s1">f</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">7</span>, <span class="pl-c1">7</span>)) <span class="pl-s1">ax</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>, <span class="pl-s1">s</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">c</span><span class="pl-c1">=</span><span class="pl-s">'k'</span>)</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1140359/50409159-5ef7f580-07be-11e9-9083-5ce18d34311a.png"><img src="https://user-images.githubusercontent.com/1140359/50409159-5ef7f580-07be-11e9-9083-5ce18d34311a.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">Here is a figure of size (12, 12):</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1140359/50409217-fa896600-07be-11e9-8ce9-24a8294472cd.png"><img src="https://user-images.githubusercontent.com/1140359/50409217-fa896600-07be-11e9-8ce9-24a8294472cd.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Here is a figure from R for comparison:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1140359/50409242-3de3d480-07bf-11e9-99f1-35cc481e0edf.png"><img src="https://user-images.githubusercontent.com/1140359/50409242-3de3d480-07bf-11e9-99f1-35cc481e0edf.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: osx 10.14</li> <li>Matplotlib version: 3.0.2</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://ipykernel.pylab.backend_inline</li> <li>Python version: 3.6.6</li> <li>Jupyter version (if applicable): 4.4.0</li> </ul>
<p dir="auto">mpl 1.5.3/2.0b4/master, no matplotlibrc</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_xs = np.linspace(0, 30, 201); plt.plot(_xs, scipy.stats.lognorm.pdf(_xs / 14, .472) / 14, &quot;.&quot;)"><pre class="notranslate"><code class="notranslate">_xs = np.linspace(0, 30, 201); plt.plot(_xs, scipy.stats.lognorm.pdf(_xs / 14, .472) / 14, ".") </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1322974/19205573/2ae8b19c-8c98-11e6-84f8-89ecbdca82c1.png"><img src="https://cloud.githubusercontent.com/assets/1322974/19205573/2ae8b19c-8c98-11e6-84f8-89ecbdca82c1.png" alt="plot" style="max-width: 100%;"></a></p> <p dir="auto">Note the slight inaccuracy in positioning of the markers at the positioning of the markers at the positions marked with the red circles, resulting in a "step-like" behavior (you may need to open the image in a larger viewer to notice it).</p> <p dir="auto">The data itself does not present this behavior, as can be checked just by zooming in these regions.</p>
1
<p dir="auto">Go spec says:</p> <blockquote> <p dir="auto">Converting a signed or unsigned integer value to a string type yields a string containing the UTF-8 representation of the integer. Values outside the range of valid Unicode code points are converted to "\uFFFD".</p> </blockquote> <ol dir="auto"> <li>cmd/compile rejects <code class="notranslate">string(1&lt;&lt;100)</code> instead of yielding <code class="notranslate">"\uFFFD"</code>: <a href="http://play.golang.org/p/1s6ge-XFqd" rel="nofollow">http://play.golang.org/p/1s6ge-XFqd</a> (gccgo also rejects this; gotype accepts it.)</li> <li>runtime incorrectly truncates 64-bit integer values to uint32 before checking if they're a valid Unicode code point: <a href="http://play.golang.org/p/M_Gkll5VY-" rel="nofollow">http://play.golang.org/p/M_Gkll5VY-</a></li> </ol>
<p dir="auto">Gc rejects to compile the following program:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package a var a = string(9223372036854775808)"><pre class="notranslate"><span class="pl-k">package</span> a <span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-en">string</span>(<span class="pl-c1">9223372036854775808</span>)</pre></div> <p dir="auto">saying:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="overflow in int -&gt; string"><pre class="notranslate"><code class="notranslate">overflow in int -&gt; string </code></pre></div> <p dir="auto">go/types compile it successfully.</p> <p dir="auto">Compilers must agree on whether it is a valid Go program or not.</p> <p dir="auto">on commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/golang/go/commit/af817890aa7b628234075a6cb01a3a435fb8317d/hovercard" href="https://github.com/golang/go/commit/af817890aa7b628234075a6cb01a3a435fb8317d"><tt>af81789</tt></a></p>
1
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 4.5.1-194-gc527b3cefd-dirty</li> <li>OpenCV Contrib=&gt; 4.5.1-60-g4e85f8c6-dirty</li> <li>Operating System / Platform =&gt; Ubuntu 64 Bit</li> <li>Compiler =&gt; emscripten<g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">Hi,<br> I am able to generate a build which has linear KalmanFilter by including the <code class="notranslate">'KalmanFilter': ['correct','predict']</code> in the opencv_js.config.py file and running the python build command. Now I am trying to build a opencv js wasm build with UnscentedKalmanFilter but not sure how to proceed. I have tried the following steps:</p> <h5 dir="auto">Steps to reproduce</h5> <ol dir="auto"> <li>Append <code class="notranslate">“-DOPENCV_EXTRA_MODULES_PATH=/opencv_contrib/modules”</code> to cmd in <code class="notranslate">get_cmake_cmd</code> method in build_js.py to include the extra modules in the build.</li> <li>Add <code class="notranslate">js</code> under WRAP in <code class="notranslate">opencv_contrib/modules/tracking/CMakeLists.txt</code>.</li> <li>Added <code class="notranslate">using namespace cv::detail::tracking;</code> to <code class="notranslate">/opencv/modules/js/src/core_bindings.cpp</code>.</li> <li>Defined tracking as <code class="notranslate">tracking = {'AugmentedUnscentedKalmanFilterParams':['AugmentedUnscentedKalmanFilterParams'], 'UnscentedKalmanFilterParams': ['UnscentedKalmanFilterParams'], 'UkfSystemModel': ['measurementFunction','stateConversionFunction'], 'UnscentedKalmanFilter': ['correct','getErrorCov','getMeasurementNoiseCov','getState','predict'], }</code> and added tracking to the whitelist <code class="notranslate">white_list = makeWhiteList([core, imgproc, tracking]). Not sure the above definition is the correct one. </code> in <code class="notranslate">/opencv/platforms/js/opencv_js.config.py</code>.</li> </ol> <p dir="auto">After following the above steps i did not get any errors but the final build did not contain required <code class="notranslate">UnscentedKalmanFilter</code> module in it.<br> Related issue: <a href="https://forum.opencv.org/t/opencv-js-build-tracking-module-in-opencv-contrib-but-encounter-generate-error/608" rel="nofollow">https://forum.opencv.org/t/opencv-js-build-tracking-module-in-opencv-contrib-but-encounter-generate-error/608</a></p> <p dir="auto">Documentation of the module i want to include. <a href="https://docs.opencv.org/3.4/d6/db3/kalman__filters_8hpp.html" rel="nofollow">https://docs.opencv.org/3.4/d6/db3/kalman__filters_8hpp.html</a></p>
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 4.0.0 - pre(Latest - master)</li> <li>Operating System / Platform =&gt; Ubuntu 18.04 64 Bit</li> <li>Compiler =&gt; GCC 7.3.0 (Default)</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">Hello there,</p> <p dir="auto">I found a simple &amp; straightforward solution to the problems of OpenBLAS Library not being identified properly on Ubuntu machine (64-bit) in CMAKE configuring step, also may work on other Linux Distros :)</p> <p dir="auto"><strong>Completely Solves:</strong> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="269152063" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv/issues/9953" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv/issues/9953/hovercard" href="https://github.com/opencv/opencv/issues/9953">#9953</a></p> <h3 dir="auto">Installation:</h3> <p dir="auto">OpenBLAS can installed from respected default repository with the following command:</p> <p dir="auto"><code class="notranslate">sudo apt install libopenblas-dev, libopenblas-base</code></p> <p dir="auto">Whereas LAPACK Library is little trickier to install, as OpenBLAS doesn't provide Lapacke header file(<em>i cannot find the <strong>lapacke.h</strong> header fie</em> ), Therefore I ought to install LAPACK Library instead, which works absolutely fine:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo apt install liblapacke-dev sudo ln -s /usr/include/lapacke.h /usr/include/x86_64-linux-gnu # corrected path for the library "><pre class="notranslate"><code class="notranslate">sudo apt install liblapacke-dev sudo ln -s /usr/include/lapacke.h /usr/include/x86_64-linux-gnu # corrected path for the library </code></pre></div> <h3 dir="auto">Setting Correct Path:</h3> <p dir="auto">So, The only thing left is setting Correct Default Search Path for Include and Libs Directory of OpenBLAS Library which is as below :</p> <ul dir="auto"> <li>Open_BLAS_INCLUDE_SEARCH_PATHS path: <code class="notranslate"> /usr/include/x86_64-linux-gnu</code></li> <li>Open_BLAS_LIB_SEARCH_PATHS path: <code class="notranslate">/usr/lib/x86_64-linux-gnu</code></li> </ul> <p dir="auto">Appending these respective additional Paths in <strong>OpenCVFindOpenBLAS.cmake</strong> :<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/opencv/opencv/blob/eb981cc7d7011f60a7a8dd03b9db9cd2dcdd8596/cmake/OpenCVFindOpenBLAS.cmake#L46">opencv/cmake/OpenCVFindOpenBLAS.cmake</a> </p> <p class="mb-0 color-fg-muted"> Line 46 in <a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/eb981cc7d7011f60a7a8dd03b9db9cd2dcdd8596">eb981cc</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="L46" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="46"></td> <td id="LC46" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c1">SET</span>(Open_BLAS_INCLUDE_SEARCH_PATHS </td> </tr> </tbody></table> </div> </div> <br> and<br> <div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/opencv/opencv/blob/eb981cc7d7011f60a7a8dd03b9db9cd2dcdd8596/cmake/OpenCVFindOpenBLAS.cmake#L58">opencv/cmake/OpenCVFindOpenBLAS.cmake</a> </p> <p class="mb-0 color-fg-muted"> Line 58 in <a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/eb981cc7d7011f60a7a8dd03b9db9cd2dcdd8596">eb981cc</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="L58" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="58"></td> <td id="LC58" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c1">SET</span>(Open_BLAS_LIB_SEARCH_PATHS </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">Completely solves the issue without altering any additional file in OpenCV. <strong>Kindly Add these additional paths to the above-mentioned file :)</strong></p> <h3 dir="auto">Results:</h3> <h4 dir="auto">Before appending path:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off -- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off -- Could NOT find Atlas (missing: Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY) . . -- LAPACK(LAPACK/Generic): LAPACK_LIBRARIES: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so -- LAPACK(LAPACK/Generic): Support is enabled."><pre class="notranslate"><code class="notranslate">-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off -- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off -- Could NOT find Atlas (missing: Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY) . . -- LAPACK(LAPACK/Generic): LAPACK_LIBRARIES: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so -- LAPACK(LAPACK/Generic): Support is enabled. </code></pre></div> <h4 dir="auto">After appending path:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-- Found OpenBLAS libraries: /usr/lib/x86_64-linux-gnu/libopenblas.so -- Found OpenBLAS include: /usr/include/x86_64-linux-gnu -- LAPACK(OpenBLAS): LAPACK_LIBRARIES: /usr/lib/x86_64-linux-gnu/libopenblas.so -- LAPACK(OpenBLAS): Support is enabled."><pre class="notranslate"><code class="notranslate">-- Found OpenBLAS libraries: /usr/lib/x86_64-linux-gnu/libopenblas.so -- Found OpenBLAS include: /usr/include/x86_64-linux-gnu -- LAPACK(OpenBLAS): LAPACK_LIBRARIES: /usr/lib/x86_64-linux-gnu/libopenblas.so -- LAPACK(OpenBLAS): Support is enabled. </code></pre></div> <p dir="auto">After Correction, OpenBLAS library configured correctly with OpenCV on my system, Cheers.</p>
0
<p dir="auto">See:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/687b7e99adc848e09bb34ccacbe838685a7c5c17e03abe896af8b1a69162d609/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3935343035352f313036323236392f64633932353038612d313233372d313165332d383230382d3635333037626463386537302e706e67"><img src="https://camo.githubusercontent.com/687b7e99adc848e09bb34ccacbe838685a7c5c17e03abe896af8b1a69162d609/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3935343035352f313036323236392f64633932353038612d313233372d313165332d383230382d3635333037626463386537302e706e67" alt="navbaroverlap" data-canonical-src="https://f.cloud.github.com/assets/954055/1062269/dc92508a-1237-11e3-8208-65307bdc8e70.png" style="max-width: 100%;"></a></p> <p dir="auto">Caused by the position:relative of the navbar and / or the same z-index of the .navbar and .dropdown menu class</p>
<p dir="auto">With Bootstrap 3.0.0 if you have a navbar below a dropdown it will overlap on top of the dropdown links and block vision and input.</p> <p dir="auto">Here's an example (try using the dropdown link or button in the primary nav): <a href="http://jsfiddle.net/dBdpj/embedded/result/" rel="nofollow">http://jsfiddle.net/dBdpj/embedded/result/</a></p> <p dir="auto">Edit: This could probably be solved by ensuring dropdowns have a higher z-index.</p>
1
<p dir="auto">To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply.</p> <h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <ul dir="auto"> <li>A short 1-2 sentences that succinctly describes the bug</li> </ul> <p dir="auto">I receive a UTF-8 error when importing matplotlib == 1.5.1 when installed either from conda or pip. I am using OSX 10.11.6 and Python 3.5.2. This laptop has Spanish locale support but this was done entirely within the US locale setting. There is no matplotlibrc file that I am aware of.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ conda install matplotlib $ python &gt; import matplotlib"><pre class="notranslate">$ conda install matplotlib $ python <span class="pl-k">&gt;</span> import matplotlib</pre></div> <ul dir="auto"> <li>A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required</li> </ul> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ conda install matplotlib $ python &gt; import matplotlib# Paste your code here"><pre class="notranslate">$ conda install matplotlib $ python <span class="pl-k">&gt;</span> import matplotlib# Paste your code here</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <ul dir="auto"> <li>The output produced by the above code, which may be a screenshot, console output, etc.</li> </ul> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ python Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:52:12) [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. &gt;&gt;&gt; import matplotlib Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;//anaconda/envs/qiime2/lib/python3.5/site-packages/matplotlib/__init__.py&quot;, line 1131, in &lt;module&gt; rcParams = rc_params() File &quot;//anaconda/envs/qiime2/lib/python3.5/site-packages/matplotlib/__init__.py&quot;, line 975, in rc_params return rc_params_from_file(fname, fail_on_error) File &quot;//anaconda/envs/qiime2/lib/python3.5/site-packages/matplotlib/__init__.py&quot;, line 1100, in rc_params_from_file config_from_file = _rc_params_in_file(fname, fail_on_error) File &quot;//anaconda/envs/qiime2/lib/python3.5/site-packages/matplotlib/__init__.py&quot;, line 1018, in _rc_params_in_file with _open_file_or_url(fname) as fd: File &quot;//anaconda/envs/qiime2/lib/python3.5/contextlib.py&quot;, line 59, in __enter__ return next(self.gen) File &quot;//anaconda/envs/qiime2/lib/python3.5/site-packages/matplotlib/__init__.py&quot;, line 1000, in _open_file_or_url encoding = locale.getdefaultlocale()[1] File &quot;//anaconda/envs/qiime2/lib/python3.5/locale.py&quot;, line 558, in getdefaultlocale return _parse_localename(localename) File &quot;//anaconda/envs/qiime2/lib/python3.5/locale.py&quot;, line 486, in _parse_localename raise ValueError('unknown locale: %s' % localename) ValueError: unknown locale: UTF-8"><pre class="notranslate">$ <span class="pl-s1">python</span> <span class="pl-v">Python</span> <span class="pl-c1">3.5</span><span class="pl-c1">.2</span> <span class="pl-c1">|</span><span class="pl-v">Continuum</span> <span class="pl-v">Analytics</span>, <span class="pl-v">Inc</span>.<span class="pl-s1"></span><span class="pl-c1">|</span> (<span class="pl-s1">default</span>, <span class="pl-v">Jul</span> <span class="pl-c1">2</span> <span class="pl-c1">2016</span>, <span class="pl-c1">17</span>:<span class="pl-c1">52</span>:<span class="pl-c1">12</span>) [<span class="pl-v">GCC</span> <span class="pl-c1">4.2</span><span class="pl-c1">.1</span> <span class="pl-v">Compatible</span> <span class="pl-v">Apple</span> <span class="pl-v">LLVM</span> <span class="pl-c1">4.2</span> (<span class="pl-s1">clang</span><span class="pl-c1">-</span><span class="pl-c1">425.0</span>.<span class="pl-c1">28</span>)] <span class="pl-s1">on</span> <span class="pl-s1">darwin</span> <span class="pl-v">Type</span> <span class="pl-s">"help"</span>, <span class="pl-s">"copyright"</span>, <span class="pl-s">"credits"</span> <span class="pl-c1">or</span> <span class="pl-s">"license"</span> <span class="pl-k">for</span> <span class="pl-s1">more</span> <span class="pl-s1">information</span>. <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"&lt;stdin&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</span>, <span class="pl-c1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-v">File</span> <span class="pl-s">"//anaconda/envs/qiime2/lib/python3.5/site-packages/matplotlib/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1131</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-s1">rcParams</span> <span class="pl-c1">=</span> <span class="pl-en">rc_params</span>() <span class="pl-v">File</span> <span class="pl-s">"//anaconda/envs/qiime2/lib/python3.5/site-packages/matplotlib/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">975</span>, <span class="pl-s1">in</span> <span class="pl-s1">rc_params</span> <span class="pl-s1">return</span> <span class="pl-en">rc_params_from_file</span>(<span class="pl-s1">fname</span>, <span class="pl-s1">fail_on_error</span>) <span class="pl-v">File</span> <span class="pl-s">"//anaconda/envs/qiime2/lib/python3.5/site-packages/matplotlib/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1100</span>, <span class="pl-s1">in</span> <span class="pl-s1">rc_params_from_file</span> <span class="pl-s1">config_from_file</span> <span class="pl-c1">=</span> <span class="pl-en">_rc_params_in_file</span>(<span class="pl-s1">fname</span>, <span class="pl-s1">fail_on_error</span>) <span class="pl-v">File</span> <span class="pl-s">"//anaconda/envs/qiime2/lib/python3.5/site-packages/matplotlib/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1018</span>, <span class="pl-s1">in</span> <span class="pl-s1">_rc_params_in_file</span> <span class="pl-s1">with</span> <span class="pl-en">_open_file_or_url</span>(<span class="pl-s1">fname</span>) <span class="pl-k">as</span> <span class="pl-s1">fd</span>: <span class="pl-v">File</span> <span class="pl-s">"//anaconda/envs/qiime2/lib/python3.5/contextlib.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">59</span>, <span class="pl-s1">in</span> <span class="pl-s1">__enter__</span> <span class="pl-k">return</span> <span class="pl-en">next</span>(<span class="pl-s1">self</span>.<span class="pl-s1">gen</span>) <span class="pl-v">File</span> <span class="pl-s">"//anaconda/envs/qiime2/lib/python3.5/site-packages/matplotlib/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1000</span>, <span class="pl-s1">in</span> <span class="pl-s1">_open_file_or_url</span> <span class="pl-s1">encoding</span> <span class="pl-c1">=</span> <span class="pl-s1">locale</span>.<span class="pl-en">getdefaultlocale</span>()[<span class="pl-c1">1</span>] <span class="pl-v">File</span> <span class="pl-s">"//anaconda/envs/qiime2/lib/python3.5/locale.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">558</span>, <span class="pl-s1">in</span> <span class="pl-s1">getdefaultlocale</span> <span class="pl-k">return</span> <span class="pl-en">_parse_localename</span>(<span class="pl-s1">localename</span>) <span class="pl-v">File</span> <span class="pl-s">"//anaconda/envs/qiime2/lib/python3.5/locale.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">486</span>, <span class="pl-s1">in</span> <span class="pl-s1">_parse_localename</span> <span class="pl-k">raise</span> <span class="pl-v">ValueError</span>(<span class="pl-s">'unknown locale: %s'</span> <span class="pl-c1">%</span> <span class="pl-s1">localename</span>) <span class="pl-v">ValueError</span>: <span class="pl-s1">unknown</span> <span class="pl-s1">locale</span>: <span class="pl-v">UTF</span><span class="pl-c1">-</span><span class="pl-c1">8</span></pre></div> <p dir="auto"><strong>Expected outcome</strong></p> <ul dir="auto"> <li>A description of the expected outcome from the code snippet</li> </ul> <p dir="auto">A successful import of matplotlib</p> <ul dir="auto"> <li>If this used to work in an earlier version of Matplotlib, please note the version it used to work on</li> </ul> <p dir="auto"><strong>Matplotlib version</strong></p> <p dir="auto">1.5.1</p> <ul dir="auto"> <li>Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)</li> </ul> <p dir="auto">Please see above</p> <ul dir="auto"> <li>How did you install Matplotlib and Python (pip, anaconda, from source ...)</li> </ul> <p dir="auto">Tried conda and pip.</p>
<p dir="auto">Hi guys!<br> I am new to python and matplotlib.<br> I installed everything with macports and when I run the matplotlib test</p> <p dir="auto">python2.7 -c 'import matplotlib; print matplotlib.<strong>version</strong>, matplotlib.<strong>file</strong>'</p> <p dir="auto">I get the following</p> <p dir="auto">Traceback (most recent call last):<br> File "", line 1, in <br> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/<strong>init</strong>.py", line 1131, in <br> rcParams = rc_params()<br> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/<strong>init</strong>.py", line 975, in rc_params<br> return rc_params_from_file(fname, fail_on_error)<br> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/<strong>init</strong>.py", line 1100, in rc_params_from_file<br> config_from_file = _rc_params_in_file(fname, fail_on_error)<br> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/<strong>init</strong>.py", line 1018, in _rc_params_in_file<br> with _open_file_or_url(fname) as fd:<br> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in <strong>enter</strong><br> return self.gen.next()<br> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/<strong>init</strong>.py", line 1000, in _open_file_or_url<br> encoding = locale.getdefaultlocale()[1]<br> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale<br> return _parse_localename(localename)<br> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename<br> raise ValueError, 'unknown locale: %s' % localename<br> ValueError: unknown locale: UTF-8</p> <p dir="auto">Do you guys have any idea what is happening....I have not done enything weards just follow simple steps to install it.</p> <p dir="auto">I want to use QUTIP and the matplotlib is essential for it...please if someone know it would be really nice</p> <p dir="auto">thanks!<br> regards,</p>
1
<h4 dir="auto">FreeCodeCamp Issue template</h4> <p dir="auto">To Use this Template:</p> <ul dir="auto"> <li>Fill out what you can</li> <li>Delete what you do not fill out</li> </ul> <p dir="auto">NOTE: ISSUES ARE NOT FOR CODE HELP - Ask for Help at <a href="https://gitter.im/FreeCodeCamp/Help" rel="nofollow">https://gitter.im/FreeCodeCamp/Help</a></p> <h4 dir="auto">Issue Description</h4> <ul dir="auto"> <li>On page 'Link to External Pages with Anchor Elements' of 'HTML5 and CSS' under 'Front End Development Certification'</li> <li>After creating the link in the solution, click on the link displayed in the preview window, with or without control clicked. The original link won't open. Now, try submitting the solution either with the button or with 'ctrl-enter'. None of them work, until the page is refreshed.</li> </ul> <h4 dir="auto">Browser Information</h4> <ul dir="auto"> <li>Google Chrome, v48.0.2564.116 m</li> <li>Windows 7 Enterprise</li> </ul> <h4 dir="auto">Your Code</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;link href=&quot;http://fonts.googleapis.com/css?family=Lobster&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt; &lt;style&gt; .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; } &lt;/style&gt; &lt;h2 class=&quot;red-text&quot;&gt;CatPhotoApp&lt;/h2&gt; &lt;img class=&quot;smaller-image thick-green-border&quot; src=&quot;https://bit.ly/fcc-relaxing-cat&quot;&gt; &lt;p class=&quot;red-text&quot;&gt;Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.&lt;/p&gt; &lt;p class=&quot;red-text&quot;&gt;Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.&lt;/p&gt; &lt;a href=&quot;http://freecatphotoapp.com&quot;&gt;cat photos&lt;/a&gt;"><pre class="notranslate"><code class="notranslate">&lt;link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"&gt; &lt;style&gt; .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; } &lt;/style&gt; &lt;h2 class="red-text"&gt;CatPhotoApp&lt;/h2&gt; &lt;img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"&gt; &lt;p class="red-text"&gt;Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.&lt;/p&gt; &lt;p class="red-text"&gt;Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.&lt;/p&gt; &lt;a href="http://freecatphotoapp.com"&gt;cat photos&lt;/a&gt; </code></pre></div> <h4 dir="auto">Screenshot</h4> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/850807/13694536/3d929400-e77c-11e5-9bb1-b23f5f54d168.PNG"><img src="https://cloud.githubusercontent.com/assets/850807/13694536/3d929400-e77c-11e5-9bb1-b23f5f54d168.PNG" alt="fcc" style="max-width: 100%;"></a></p>
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/link-to-external-pages-with-anchor-elements" rel="nofollow">Link to External Pages with Anchor Elements</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.</p> <p dir="auto">My code:</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;link href=&quot;https://fonts.googleapis.com/css?family=Lobster&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt; &lt;style&gt; .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; } &lt;/style&gt; &lt;h2 class=&quot;red-text&quot;&gt;CatPhotoApp&lt;/h2&gt; &lt;img class=&quot;smaller-image thick-green-border&quot; src=&quot;https://bit.ly/fcc-relaxing-cat&quot;&gt; &lt;a href=&quot;http://freecatphotoapp.com&quot;&gt;cat photos&lt;/a&gt; &lt;p class=&quot;red-text&quot;&gt;Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.&lt;/p&gt; &lt;p class=&quot;red-text&quot;&gt;Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.&lt;/p&gt; "><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">link</span> <span class="pl-c1">href</span>="<span class="pl-s">https://fonts.googleapis.com/css?family=Lobster</span>" <span class="pl-c1">rel</span>="<span class="pl-s">stylesheet</span>" <span class="pl-c1">type</span>="<span class="pl-s">text/css</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span> .<span class="pl-c1">red-text</span> { <span class="pl-c1">color</span><span class="pl-kos">:</span> red; } <span class="pl-ent">h2</span> { <span class="pl-c1">font-family</span><span class="pl-kos">:</span> Lobster<span class="pl-kos">,</span> Monospace; } <span class="pl-ent">p</span> { <span class="pl-c1">font-size</span><span class="pl-kos">:</span> <span class="pl-c1">16<span class="pl-smi">px</span></span>; <span class="pl-c1">font-family</span><span class="pl-kos">:</span> Monospace; } .<span class="pl-c1">thick-green-border</span> { <span class="pl-c1">border-color</span><span class="pl-kos">:</span> green; <span class="pl-c1">border-width</span><span class="pl-kos">:</span> <span class="pl-c1">10<span class="pl-smi">px</span></span>; <span class="pl-c1">border-style</span><span class="pl-kos">:</span> solid; <span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">50<span class="pl-smi">%</span></span>; } .<span class="pl-c1">smaller-image</span> { <span class="pl-c1">width</span><span class="pl-kos">:</span> <span class="pl-c1">100<span class="pl-smi">px</span></span>; } <span class="pl-kos">&lt;/</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h2</span> <span class="pl-c1">class</span>="<span class="pl-s">red-text</span>"<span class="pl-kos">&gt;</span>CatPhotoApp<span class="pl-kos">&lt;/</span><span class="pl-ent">h2</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">img</span> <span class="pl-c1">class</span>="<span class="pl-s">smaller-image thick-green-border</span>" <span class="pl-c1">src</span>="<span class="pl-s">https://bit.ly/fcc-relaxing-cat</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">a</span> <span class="pl-c1">href</span>="<span class="pl-s">http://freecatphotoapp.com</span>"<span class="pl-kos">&gt;</span>cat photos<span class="pl-kos">&lt;/</span><span class="pl-ent">a</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">p</span> <span class="pl-c1">class</span>="<span class="pl-s">red-text</span>"<span class="pl-kos">&gt;</span>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.<span class="pl-kos">&lt;/</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">p</span> <span class="pl-c1">class</span>="<span class="pl-s">red-text</span>"<span class="pl-kos">&gt;</span>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.<span class="pl-kos">&lt;/</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span></pre></div> <hr> <p dir="auto">Edit by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/raisedadead/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/raisedadead">@raisedadead</a> :</p> <h4 dir="auto">Issue Description:</h4> <p dir="auto">Clicking on the link in the iphone preview area hangs the run test</p>
1
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd df = pd.read_csv(file) df.index = pd.to_datetime(df[['Year','Month','Day','Hour']], unit='s') df[df.index.duplicated()].index"><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-s1">file</span>) <span class="pl-s1">df</span>.<span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">to_datetime</span>(<span class="pl-s1">df</span>[[<span class="pl-s">'Year'</span>,<span class="pl-s">'Month'</span>,<span class="pl-s">'Day'</span>,<span class="pl-s">'Hour'</span>]], <span class="pl-s1">unit</span><span class="pl-c1">=</span><span class="pl-s">'s'</span>) <span class="pl-s1">df</span>[<span class="pl-s1">df</span>.<span class="pl-s1">index</span>.<span class="pl-en">duplicated</span>()].<span class="pl-s1">index</span></pre></div> <blockquote> <p dir="auto">DatetimeIndex(['2009-01-01 00:00:00', '2009-01-01 00:30:00',<br> '2009-01-01 01:00:00', '2009-01-01 01:30:00',<br> '2009-01-01 02:00:00', '2009-01-01 02:30:00',<br> '2009-01-01 03:00:00', '2009-01-01 03:30:00',<br> '2009-01-01 04:00:00', '2009-01-01 04:30:00',<br> ...<br> '2013-12-31 19:00:00', '2013-12-31 19:30:00',<br> '2013-12-31 20:00:00', '2013-12-31 20:30:00',<br> '2013-12-31 21:00:00', '2013-12-31 21:30:00',<br> '2013-12-31 22:00:00', '2013-12-31 22:30:00',<br> '2013-12-31 23:00:00', '2013-12-31 23:30:00'],<br> dtype='datetime64[ns]', length=175296, freq=None)</p> </blockquote> <h4 dir="auto">Problem description</h4> <p dir="auto">The behaviour of <code class="notranslate">duplicated()</code> is returning duplicated days when the <code class="notranslate">datetime</code> values are in fact unique at their native temporal resolution. I would expect this function to return true duplicates.</p>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd, numpy as np idx = pd.MultiIndex.from_tuples([(0, 0), (1, 1), (1, 1), (2, 2)]) a = pd.Series(np.arange(4), index=idx) new_idx = pd.MultiIndex.from_tuples([(0, 0), (1, 1), (2, 2)]) a.reindex(new_idx)"><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">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-s1">idx</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">MultiIndex</span>.<span class="pl-en">from_tuples</span>([(<span class="pl-c1">0</span>, <span class="pl-c1">0</span>), (<span class="pl-c1">1</span>, <span class="pl-c1">1</span>), (<span class="pl-c1">1</span>, <span class="pl-c1">1</span>), (<span class="pl-c1">2</span>, <span class="pl-c1">2</span>)]) <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">4</span>), <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">idx</span>) <span class="pl-s1">new_idx</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">MultiIndex</span>.<span class="pl-en">from_tuples</span>([(<span class="pl-c1">0</span>, <span class="pl-c1">0</span>), (<span class="pl-c1">1</span>, <span class="pl-c1">1</span>), (<span class="pl-c1">2</span>, <span class="pl-c1">2</span>)]) <span class="pl-s1">a</span>.<span class="pl-en">reindex</span>(<span class="pl-s1">new_idx</span>)</pre></div> <div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(...) 2094 else: -&gt; 2095 raise Exception(&quot;cannot handle a non-unique multi-index!&quot;) 2096 2097 if not isinstance(target, MultiIndex): Exception: cannot handle a non-unique multi-index!"><pre class="notranslate">(...) 2094 else: -&gt; 2095 raise Exception("cannot handle a non-unique multi-index!") 2096 2097 if not isinstance(target, MultiIndex): <span class="pl-en">Exception</span>: <span class="pl-s">cannot handle a non-unique multi-index!</span></pre></div> <h4 dir="auto">Problem description</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MultiIndex(Index): (...) def reindex(self, target, method=None, level=None, limit=None, tolerance=None): (...) else: raise Exception(&quot;cannot handle a non-unique multi-index!&quot;)"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">MultiIndex</span>(<span class="pl-v">Index</span>): (...) <span class="pl-k">def</span> <span class="pl-en">reindex</span>(<span class="pl-s1">self</span>, <span class="pl-s1">target</span>, <span class="pl-s1">method</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">level</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">limit</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">tolerance</span><span class="pl-c1">=</span><span class="pl-c1">None</span>): (...) <span class="pl-s1">else</span>: <span class="pl-s1">raise</span> <span class="pl-v">Exception</span>(<span class="pl-s">"cannot handle a non-unique multi-index!"</span>)</pre></div> <p dir="auto">In <a href="https://github.com/pandas-dev/pandas/blob/master/pandas/core/indexes/multi.py#L2026"><code class="notranslate">MultiIndex.reindex</code></a>, this exception is too generic, and thus not easily filtered. I think it should be an <code class="notranslate">IndexError</code></p> <h4 dir="auto">Expected Output</h4> <p dir="auto"><code class="notranslate">raise IndexError("cannot handle a non-unique multi-index!")</code></p> <p dir="auto">I can do a very minimal PR to fix this if needed.</p> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.6.5.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.15.0-24-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: fr_FR.UTF-8<br> LOCALE: fr_FR.UTF-8</p> <p dir="auto">pandas: 0.23.1<br> pytest: 3.6.2<br> pip: 10.0.1<br> setuptools: 39.2.0<br> Cython: 0.28.3<br> numpy: 1.14.5<br> scipy: 1.1.0<br> pyarrow: None<br> xarray: None<br> IPython: 6.4.0<br> sphinx: None<br> patsy: 0.5.0<br> dateutil: 2.7.3<br> pytz: 2018.5<br> blosc: None<br> bottleneck: None<br> tables: 3.4.4<br> numexpr: 2.6.5<br> feather: None<br> matplotlib: 2.2.2<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: 1.0.1<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.10<br> s3fs: None<br> fastparquet: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
0
<ul dir="auto"> <li>Electron version: 1.2.0</li> <li>Operating system: OSX (probably others)</li> </ul> <p dir="auto">Hi, I'm the maintainer of <a href="https://www.npmjs.com/package/serialport" rel="nofollow">serialport</a>. We've been getting a bunch if issues with people not being able to use our latest release or beta release with electron versions 1.2.x, the 1.1.x line seemed to work well enough. I don't have the greatest of bug reports but a few users seem to have narrowed it down to the versions change and I'm suggesting it to the new issues to see if reverting to 1.1 solves their problems.</p> <p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="157731227" data-permission-text="Title is private" data-url="https://github.com/serialport/node-serialport/issues/838" data-hovercard-type="issue" data-hovercard-url="/serialport/node-serialport/issues/838/hovercard?comment_id=223128319&amp;comment_type=issue_comment" href="https://github.com/serialport/node-serialport/issues/838#issuecomment-223128319">serialport/node-serialport#838 (comment)</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="160403546" data-permission-text="Title is private" data-url="https://github.com/serialport/node-serialport/issues/856" data-hovercard-type="issue" data-hovercard-url="/serialport/node-serialport/issues/856/hovercard" href="https://github.com/serialport/node-serialport/issues/856">serialport/node-serialport#856</a></p> <p dir="auto">I'm going to upgrade <code class="notranslate">nan</code> for our next release but nothing in the change log suggests it should effect support.</p> <p dir="auto">Any idea what I can do?</p>
<p dir="auto">This is <code class="notranslate">process.versions</code> in electron 1.2.0:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;http_parser&quot;: &quot;2.7.0&quot;, &quot;node&quot;: &quot;6.1.0&quot;, &quot;v8&quot;: &quot;5.1.281.47&quot;, &quot;uv&quot;: &quot;1.9.0&quot;, &quot;zlib&quot;: &quot;1.2.8&quot;, &quot;ares&quot;: &quot;1.10.1-DEV&quot;, &quot;modules&quot;: &quot;48&quot;, &quot;openssl&quot;: &quot;1.0.2h&quot;, &quot;electron&quot;: &quot;1.2.0&quot;, &quot;atom-shell&quot;: &quot;1.2.0&quot;, &quot;chrome&quot;: &quot;51.0.2704.63&quot; }"><pre class="notranslate">{ <span class="pl-ent">"http_parser"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.7.0<span class="pl-pds">"</span></span>, <span class="pl-ent">"node"</span>: <span class="pl-s"><span class="pl-pds">"</span>6.1.0<span class="pl-pds">"</span></span>, <span class="pl-ent">"v8"</span>: <span class="pl-s"><span class="pl-pds">"</span>5.1.281.47<span class="pl-pds">"</span></span>, <span class="pl-ent">"uv"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.9.0<span class="pl-pds">"</span></span>, <span class="pl-ent">"zlib"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.2.8<span class="pl-pds">"</span></span>, <span class="pl-ent">"ares"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.10.1-DEV<span class="pl-pds">"</span></span>, <span class="pl-ent">"modules"</span>: <span class="pl-s"><span class="pl-pds">"</span>48<span class="pl-pds">"</span></span>, <span class="pl-ent">"openssl"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.0.2h<span class="pl-pds">"</span></span>, <span class="pl-ent">"electron"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.2.0<span class="pl-pds">"</span></span>, <span class="pl-ent">"atom-shell"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.2.0<span class="pl-pds">"</span></span>, <span class="pl-ent">"chrome"</span>: <span class="pl-s"><span class="pl-pds">"</span>51.0.2704.63<span class="pl-pds">"</span></span> }</pre></div> <p dir="auto">v8 5.1 is <em>not</em> abi compatible with 5.0, which node 6 ships with. So, <code class="notranslate">.modules=48</code> is incorrect. The way to fix this (I guess) would be to bundle a chrome version that comes with v8 that is compatible with the bundled node version.</p> <p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="157658324" data-permission-text="Title is private" data-url="https://github.com/nodejs/nan/issues/578" data-hovercard-type="issue" data-hovercard-url="/nodejs/nan/issues/578/hovercard" href="https://github.com/nodejs/nan/issues/578">nodejs/nan#578</a> for answers from node, nan and v8 maintainers.</p>
1
<p dir="auto">I have a bit of code that Babel 5 parses but 6 does not:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" listenerPromise = async () =&gt; { // Wait for the other listeners to throw await Promise.resolve(); expect(errorCount).toBe(2); await Promise.resolve(); return 'success'; }();"><pre class="notranslate"> <span class="pl-s1">listenerPromise</span> <span class="pl-c1">=</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// Wait for the other listeners to throw</span> <span class="pl-k">await</span> <span class="pl-v">Promise</span><span class="pl-kos">.</span><span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">errorCount</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBe</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-v">Promise</span><span class="pl-kos">.</span><span class="pl-en">resolve</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-s">'success'</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">If I put parens around the async function expression (as in <code class="notranslate">listenerPromise = (async () =&gt; {})();</code>), then it successfully parses. I haven't looked at the grammar closely yet... anyone know if my original JS is even valid and Babel 5 was too lenient, or if this is a bug with Babel 6?</p> <p dir="auto">Versions of Babel and plugins I'm using:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;babel-core&quot;: &quot;^6.1.2&quot;, &quot;babel-plugin-syntax-async-functions&quot;: &quot;^6.0.14&quot;, &quot;babel-plugin-syntax-flow&quot;: &quot;^6.0.14&quot;, &quot;babel-plugin-syntax-trailing-function-commas&quot;: &quot;^6.0.14&quot;, &quot;babel-plugin-transform-async-to-generator&quot;: &quot;^6.0.14&quot;, &quot;babel-plugin-transform-es2015-arrow-functions&quot;: &quot;^6.0.14&quot;, &quot;babel-plugin-transform-es2015-classes&quot;: &quot;^6.1.2&quot;, &quot;babel-plugin-transform-es2015-destructuring&quot;: &quot;^6.0.18&quot;, &quot;babel-plugin-transform-es2015-modules-commonjs&quot;: &quot;^6.1.3&quot;, &quot;babel-plugin-transform-es2015-parameters&quot;: &quot;^6.0.18&quot;, &quot;babel-plugin-transform-es2015-shorthand-properties&quot;: &quot;^6.0.14&quot;, &quot;babel-plugin-transform-es2015-spread&quot;: &quot;^6.0.14&quot;, &quot;babel-plugin-transform-flow-strip-types&quot;: &quot;^6.0.14&quot;, &quot;babel-plugin-transform-function-bind&quot;: &quot;^6.0.14&quot;, &quot;babel-plugin-transform-runtime&quot;: &quot;^6.1.2&quot;, &quot;babel-plugin-transform-strict-mode&quot;: &quot;^6.1.2&quot;,"><pre class="notranslate"><code class="notranslate"> "babel-core": "^6.1.2", "babel-plugin-syntax-async-functions": "^6.0.14", "babel-plugin-syntax-flow": "^6.0.14", "babel-plugin-syntax-trailing-function-commas": "^6.0.14", "babel-plugin-transform-async-to-generator": "^6.0.14", "babel-plugin-transform-es2015-arrow-functions": "^6.0.14", "babel-plugin-transform-es2015-classes": "^6.1.2", "babel-plugin-transform-es2015-destructuring": "^6.0.18", "babel-plugin-transform-es2015-modules-commonjs": "^6.1.3", "babel-plugin-transform-es2015-parameters": "^6.0.18", "babel-plugin-transform-es2015-shorthand-properties": "^6.0.14", "babel-plugin-transform-es2015-spread": "^6.0.14", "babel-plugin-transform-flow-strip-types": "^6.0.14", "babel-plugin-transform-function-bind": "^6.0.14", "babel-plugin-transform-runtime": "^6.1.2", "babel-plugin-transform-strict-mode": "^6.1.2", </code></pre></div>
<p dir="auto">In Babel 5, it was possible to do this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="() =&gt; { console.log(&quot;test&quot;); }();"><pre class="notranslate"><code class="notranslate">() =&gt; { console.log("test"); }(); </code></pre></div> <p dir="auto">However, this is no longer possible in Babel 6 - it gives an "unexpected token" error. Instead, I have to wrap the function as an expression:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(() =&gt; { console.log(&quot;test&quot;); })();"><pre class="notranslate"><code class="notranslate">(() =&gt; { console.log("test"); })(); </code></pre></div> <p dir="auto">I'm transpiling with the following Gulp task:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var gulp = require(&quot;gulp&quot;); var browserify = require(&quot;browserify&quot;); var buffer = require(&quot;vinyl-buffer&quot;); var source = require(&quot;vinyl-source-stream&quot;); var sourcemaps = require(&quot;gulp-sourcemaps&quot;); gulp.task(&quot;js&quot;, function() { var bundler = browserify(&quot;src/app.js&quot;) .transform(&quot;babelify&quot;, { presets: [&quot;es2015&quot;] }); return bundler.bundle() .on(&quot;error&quot;, function(err) { console.error(err); this.emit(&quot;end&quot;); }) .pipe(source(&quot;app.js&quot;)) .pipe(buffer()) .pipe(sourcemaps.init({ loadMaps: true })) .pipe(sourcemaps.write(&quot;./&quot;)) .pipe(rename(&quot;dist/app.js&quot;)) .pipe(gulp.dest(&quot;./&quot;)); });"><pre class="notranslate"><code class="notranslate">var gulp = require("gulp"); var browserify = require("browserify"); var buffer = require("vinyl-buffer"); var source = require("vinyl-source-stream"); var sourcemaps = require("gulp-sourcemaps"); gulp.task("js", function() { var bundler = browserify("src/app.js") .transform("babelify", { presets: ["es2015"] }); return bundler.bundle() .on("error", function(err) { console.error(err); this.emit("end"); }) .pipe(source("app.js")) .pipe(buffer()) .pipe(sourcemaps.init({ loadMaps: true })) .pipe(sourcemaps.write("./")) .pipe(rename("dist/app.js")) .pipe(gulp.dest("./")); }); </code></pre></div> <p dir="auto">This script works fine with everything else, as long as I wrap my self-calling arrow functions in brackets. Is this intentional, or is this a regression?</p>
1
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18362.295]"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.295] </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="choco install microsoft-windows-terminal"><pre class="notranslate"><code class="notranslate">choco install microsoft-windows-terminal </code></pre></div> <p dir="auto">Simply Try to Install using choco giving an error</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">It should Install the Terminal instead of giving an error.</p> <h1 dir="auto">Actual behavior</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Chocolatey v0.10.15 Installing the following packages: microsoft-windows-terminal By installing you accept licenses for the packages. Progress: Downloading microsoft-windows-terminal 0.4.2382.0... 100% microsoft-windows-terminal v0.4.2382.0 [Approved] microsoft-windows-terminal package files install completed. Performing other installation steps. The package microsoft-windows-terminal wants to run 'chocolateyinstall.ps1'. Note: If you don't run this script, the installation will fail. Note: To confirm automatically next time, use '-y' or consider: choco feature enable -n allowGlobalConfirmation Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): Y Progress: 0% - Processing ERROR: The running command stopped because the preference variable &quot;ErrorActionPreference&quot; or common parameter is set to Stop: Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation. Windows cannot install package Microsoft.WindowsTerminal_0.4.2382.0_x64__8wekyb3d8bbwe because this package depends on a framework that could not be found. Provide the framework &quot;Microsoft.VCLibs.140.00.UWPDesktop&quot; published by &quot;CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US&quot;, with neutral or x64 processor architecture and minimum version 14.0.27323.0, along with this package to install. The frameworks with name &quot;Microsoft.VCLibs.140.00.UWPDesktop&quot; currently installed are: Windows cannot install package Microsoft.WindowsTerminal_0.4.2382.0_x64__8wekyb3d8bbwe because this package depends on a framework that could not be found. Provide the framework &quot;Microsoft.VCLibs.140.00.UWPDesktop&quot; published by &quot;CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US&quot;, with neutral or x64 processor architecture and minimum version 14.0.27323.0, along with this package to install. The frameworks with name &quot;Microsoft.VCLibs.140.00.UWPDesktop&quot; currently installed are: {Microsoft.VCLibs.140.00.UWPDesktop_14.0.26905.0_x64__8wekyb3d8bbwe} NOTE: For additional information, look for [ActivityId] d18a8233-6f02-0000-e5b4-8ad1026fd501 in the Event Log or use the command line Get-AppPackageLog -ActivityID d18a8233-6f02-0000-e5b4-8ad1026fd501 The install of microsoft-windows-terminal was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\microsoft-windows-terminal\tools\chocolateyinstall.ps1'. See log for details. Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures - microsoft-windows-terminal (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\microsoft-windows-terminal\tools\chocolateyinstall.ps1'. See log for details."><pre class="notranslate"><code class="notranslate">Chocolatey v0.10.15 Installing the following packages: microsoft-windows-terminal By installing you accept licenses for the packages. Progress: Downloading microsoft-windows-terminal 0.4.2382.0... 100% microsoft-windows-terminal v0.4.2382.0 [Approved] microsoft-windows-terminal package files install completed. Performing other installation steps. The package microsoft-windows-terminal wants to run 'chocolateyinstall.ps1'. Note: If you don't run this script, the installation will fail. Note: To confirm automatically next time, use '-y' or consider: choco feature enable -n allowGlobalConfirmation Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): Y Progress: 0% - Processing ERROR: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation. Windows cannot install package Microsoft.WindowsTerminal_0.4.2382.0_x64__8wekyb3d8bbwe because this package depends on a framework that could not be found. Provide the framework "Microsoft.VCLibs.140.00.UWPDesktop" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and minimum version 14.0.27323.0, along with this package to install. The frameworks with name "Microsoft.VCLibs.140.00.UWPDesktop" currently installed are: Windows cannot install package Microsoft.WindowsTerminal_0.4.2382.0_x64__8wekyb3d8bbwe because this package depends on a framework that could not be found. Provide the framework "Microsoft.VCLibs.140.00.UWPDesktop" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and minimum version 14.0.27323.0, along with this package to install. The frameworks with name "Microsoft.VCLibs.140.00.UWPDesktop" currently installed are: {Microsoft.VCLibs.140.00.UWPDesktop_14.0.26905.0_x64__8wekyb3d8bbwe} NOTE: For additional information, look for [ActivityId] d18a8233-6f02-0000-e5b4-8ad1026fd501 in the Event Log or use the command line Get-AppPackageLog -ActivityID d18a8233-6f02-0000-e5b4-8ad1026fd501 The install of microsoft-windows-terminal was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\microsoft-windows-terminal\tools\chocolateyinstall.ps1'. See log for details. Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures - microsoft-windows-terminal (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\microsoft-windows-terminal\tools\chocolateyinstall.ps1'. See log for details. </code></pre></div>
<p dir="auto">There is a feature in Windows called Filtered Task View which, when activated, shows all the windows associated with a given task (ie: a much cleaner view than alt+tab). It would be nice if each tab in the terminal showed up in this view.</p> <p dir="auto">I suspect each tab would have to be classified as a "window" for this to work.<br> The primary problem this would solve is that it would give you a way to switch to the desired tab without having to see literally everything else running on your system.</p>
0
<h1 dir="auto">Environment</h1> <p dir="auto">Microsoft Windows NT 10.0.18362.0</p> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Install app from windows store OR build from source and deploy Cascadia package.</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Terminal runs successfully.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Error "The data area passed to a system call is too small." is shown and terminal does not open.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/48676819/65696894-f225ca80-e071-11e9-8c71-5b6f5f448329.png"><img src="https://user-images.githubusercontent.com/48676819/65696894-f225ca80-e071-11e9-8c71-5b6f5f448329.png" alt="image" style="max-width: 100%;"></a></p>
<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.18999.1] Windows Terminal version (if applicable): 0.5.2762.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number:Microsoft Windows [Version 10.0.18999.1] Windows Terminal version (if applicable): 0.5.2762.0 </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Install Font with glyphsupport like NerdFonts ( I tried DroidSansMono NF and Hack NF) and use a powerline promt for example</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Render the line like this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/10837173/66927173-a42c3300-f02f-11e9-96d2-f7619515e81a.png"><img src="https://user-images.githubusercontent.com/10837173/66927173-a42c3300-f02f-11e9-96d2-f7619515e81a.png" alt="image" style="max-width: 100%;"></a><br> Render the line like this (this is the vscode terminal with the same font selected)</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Looking like this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/10837173/66927265-cb830000-f02f-11e9-9869-ece9dc1ae27c.png"><img src="https://user-images.githubusercontent.com/10837173/66927265-cb830000-f02f-11e9-9869-ece9dc1ae27c.png" alt="image" style="max-width: 100%;"></a></p>
0
<p dir="auto">Currently <code class="notranslate">new Intl.DateTimeFormat('en-US')</code> error.</p> <p dir="auto">Ref: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl</a><br> Related: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="422753685" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1968" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1968/hovercard" href="https://github.com/denoland/deno/issues/1968">#1968</a></p>
<p dir="auto">As seen in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="422116599" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1952" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1952/hovercard" href="https://github.com/denoland/deno/issues/1952">#1952</a> / <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="405562913" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1636" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1636/hovercard" href="https://github.com/denoland/deno/issues/1636">#1636</a> ICU needs to be added in Deno build.</p> <p dir="auto">Switching this flag to true maybe: <a href="https://github.com/denoland/deno/blob/master/.gn#L50">https://github.com/denoland/deno/blob/master/.gn#L50</a> ?</p> <p dir="auto">ref: <a href="https://v8.dev/docs/i18n" rel="nofollow">https://v8.dev/docs/i18n</a></p>
1
<p dir="auto">SimpleImputer assigns all missing values in a column the same value based on training statistics. We should consider adding an alternative imputer (<code class="notranslate">RandomImputer</code>? <code class="notranslate">SamplingImputer</code>?) which samples imputation values from the values seen for the same feature in training.</p>
<p dir="auto">The purpose would be to provide an unbiased, stochastic, univariate imputer. The imputer would replace missing values by values sampled uniformly at random from the non-missing values of the sample column.</p> <p dir="auto">This would require to add additional <code class="notranslate">random_state</code> constructor parameter to the class.</p> <p dir="auto">As for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="329773579" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/11208" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/11208/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/11208">#11208</a> this strategy should work both on numerical and non-numerical dtypes.</p>
1
<p dir="auto">This derives from the browser console, which is the only thing comparable to Deno's terminal repl.</p> <p dir="auto">As of right now, the repl is a normal script, I believe that it would be more helpful to anyone using it If it were a module allowing imports, and with top-level await, as most of Deno is promise focused.</p> <p dir="auto">I believe it to be reasonable to derive from the browser in this case as the repl / console is often used for something simple and short, and having more utility there would be helpful, and it shouldn't break any backward compatibility as scripts aren't intended to be programmatically run there.</p> <p dir="auto">The console is merely a simple tool to help us out, is it not? What could go wrong?</p> <p dir="auto">If anything, having an optional flag wouldn't be that bad,</p> <p dir="auto">Maybe something like so: <code class="notranslate"> deno --repl=module</code></p>
<p dir="auto">When in the Deno REPL and executing:<br> <code class="notranslate">import { env } from "deno";</code></p> <p dir="auto">The output is:<br> <code class="notranslate">SyntaxError: Unexpected token {</code></p> <p dir="auto">Probably related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="377593861" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1158" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1158/hovercard" href="https://github.com/denoland/deno/issues/1158">#1158</a></p> <p dir="auto">Executing: <code class="notranslate">deno -v</code> on the commandline returns:<br> <code class="notranslate">deno: 0.2.1</code><br> <code class="notranslate">v8: 7.1.302.4</code><br> <code class="notranslate">typescript: 3.2.1</code></p>
1
<p dir="auto"><strong>Glide Version</strong>: 4.11.0</p> <p dir="auto"><strong>Integration libraries</strong>: OkHttp3</p> <p dir="auto"><strong>Device/Android Version</strong>: Redmi Note 4 Android 7.0</p> <p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>: don't know how to reproduce this exception, sadly.</p> <p dir="auto"><strong>Stack trace / LogCat</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.util.ConcurrentModificationException: null at java.util.ArrayList$Itr.next(ArrayList.java:831) at com.bumptech.glide.Glide.trimMemory(Glide.java:688) at com.bumptech.glide.Glide.onTrimMemory(Glide.java:900) at android.app.Application.onTrimMemory(Application.java:138) at android.app.ActivityThread.handleTrimMemory(ActivityThread.java:5120) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1741) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:165) at android.app.ActivityThread.main(ActivityThread.java:6375) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)"><pre class="notranslate"><code class="notranslate">java.util.ConcurrentModificationException: null at java.util.ArrayList$Itr.next(ArrayList.java:831) at com.bumptech.glide.Glide.trimMemory(Glide.java:688) at com.bumptech.glide.Glide.onTrimMemory(Glide.java:900) at android.app.Application.onTrimMemory(Application.java:138) at android.app.ActivityThread.handleTrimMemory(ActivityThread.java:5120) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1741) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:165) at android.app.ActivityThread.main(ActivityThread.java:6375) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802) </code></pre></div>
<p dir="auto">java.lang.AssertionError<br> Register too many Broadcast Receivers<br> android.app.LoadedApk.checkRecevierRegisteredLeakLocked(LoadedApk.java:1195)<br> android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:1224)<br> android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1601)<br> android.app.ContextImpl.registerReceiver(ContextImpl.java:1574)<br> android.app.ContextImpl.registerReceiver(ContextImpl.java:1562)<br> android.content.ContextWrapper.registerReceiver(ContextWrapper.java:603)<br> com.bumptech.glide.manager.e.c(DefaultConnectivityMonitor.java:1054)<br> com.bumptech.glide.manager.a.a(ActivityFragmentLifecycle.java:50)<br> com.bumptech.glide.manager.SupportRequestManagerFragment.onStart(SupportRequestManagerFragment.java:175)<br> android.support.v4.app.Fragment.performStart(Fragment.java:2287)<br> android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1458)<br> android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1750)<br> android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1819)<br> android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3227)<br> android.support.v4.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:3186)<br> android.support.v4.app.FragmentController.dispatchStart(FragmentController.java:203)<br> android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:582)</p>
0
<p dir="auto">Julia doesn't honor USE_SYSTEM_LIBSSH2, and I can't keep Julia from trying to download LibSSH2.</p>
<p dir="auto">On v1.0.2 I used a return statement from within a let block that got assigned to a variable. This didn't work as I expected, but it also didn't cause any errors. The surprising side effect was that the variable assigned to was never actually created.</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; x = let # some ugly calc 42 end 42 julia&gt; x 42 julia&gt; y = let # some ugly calc return 42 end 42 julia&gt; y ERROR: UndefVarError: y not defined"><pre class="notranslate">julia<span class="pl-k">&gt;</span> x <span class="pl-k">=</span> <span class="pl-k">let</span> <span class="pl-c"><span class="pl-c">#</span> some ugly calc</span> <span class="pl-c1">42</span> <span class="pl-k">end</span> <span class="pl-c1">42</span> julia<span class="pl-k">&gt;</span> x <span class="pl-c1">42</span> julia<span class="pl-k">&gt;</span> y <span class="pl-k">=</span> <span class="pl-k">let</span> <span class="pl-c"><span class="pl-c">#</span> some ugly calc</span> <span class="pl-k">return</span> <span class="pl-c1">42</span> <span class="pl-k">end</span> <span class="pl-c1">42</span> julia<span class="pl-k">&gt;</span> y ERROR<span class="pl-k">:</span> UndefVarError<span class="pl-k">:</span> y not defined</pre></div>
0
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno run --allow-read --allow-env --allow-write npm:prisma@^4.5 init"><pre class="notranslate">deno run --allow-read --allow-env --allow-write npm:prisma@^4.5 init</pre></div> <p dir="auto"><g-emoji class="g-emoji" alias="white_check_mark" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2705.png">✅</g-emoji>Granted sys access to "uid".</p> <blockquote> <p dir="auto">Downloading Prisma engines for Node-API for darwin-arm64 [ ] 0%┌ <g-emoji class="g-emoji" alias="warning" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a0.png">⚠️</g-emoji> Deno<br> ✅ Granted net access to "binaries.prisma.sh".<br> Downloading Prisma engines for Node-API for darwin-arm64 [======== ] 84%error: Uncaught (in promise) TypeError: context.digest is not a function<br> at Hash.flush [as _flush] (ext:deno_node/internal/crypto/hash.ts:47:35)<br> at Hash.Ot [as _final] (ext:deno_node/_stream.mjs:11:59823)<br> at Fa (ext:deno_node/_stream.mjs:11:51130)<br> at Ua (ext:deno_node/_stream.mjs:11:51274)<br> at mt (ext:deno_node/_stream.mjs:11:51350)<br> at Hash.S.end (ext:deno_node/_stream.mjs:11:50523)<br> at Gunzip.u (ext:deno_node/_stream.mjs:11:36397)<br> at Object.onceWrapper (ext:deno_node/_events.mjs:502:28)<br> at Gunzip.emit (ext:deno_node/_events.mjs:391:35)<br> at Ea (ext:deno_node/_stream.mjs:11:43461)</p> </blockquote> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno 1.32.5 (release, aarch64-apple-darwin) v8 11.2.214.9 typescript 5.0.3"><pre class="notranslate"><code class="notranslate">deno 1.32.5 (release, aarch64-apple-darwin) v8 11.2.214.9 typescript 5.0.3 </code></pre></div>
<p dir="auto">I am following this <a href="https://www.prisma.io/docs/guides/deployment/deployment-guides/deploying-to-deno-deploy" rel="nofollow">document</a>.</p> <p dir="auto">I'm running this command:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno run -A --unstable npm:prisma init"><pre class="notranslate"><code class="notranslate">deno run -A --unstable npm:prisma init </code></pre></div> <p dir="auto">And receiving this error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Downloading Prisma engines for Node-API for darwin-arm64 [...] error: Uncaught (in promise) TypeError: context.digest is not a function"><pre class="notranslate"><code class="notranslate">Downloading Prisma engines for Node-API for darwin-arm64 [...] error: Uncaught (in promise) TypeError: context.digest is not a function </code></pre></div> <p dir="auto">If I try to run prisma init outside of deno:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npx prisma init"><pre class="notranslate"><code class="notranslate">npx prisma init </code></pre></div> <p dir="auto">It succeeds just fine:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12075916/233418148-766af0e8-41e7-473e-ac9e-e70740da23d3.png"><img src="https://user-images.githubusercontent.com/12075916/233418148-766af0e8-41e7-473e-ac9e-e70740da23d3.png" alt="Screenshot 2023-04-20 at 11 41 22" style="max-width: 100%;"></a></p> <p dir="auto">I'm not sure if this is a <code class="notranslate">deno</code> issue, or a <code class="notranslate">prisma</code> issue, however I am able to get this working outside of <code class="notranslate">deno</code>.</p>
1
<p dir="auto">This would improve support for build processes that use <a href="https://www.npmjs.com/package/main-bower-files" rel="nofollow">https://www.npmjs.com/package/main-bower-files</a></p>
<p dir="auto">The title says it all.</p> <p dir="auto">All of my client-side dependencies are currently in bower and it would be nice to have access to the polyfill as well.</p>
1
<hr> <h3 dir="auto">System information</h3> <ul dir="auto"> <li> <p dir="auto"><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>:<br> I used stock example script provided by TensorFlow to write my own custom code.</p> </li> <li> <p dir="auto"><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>:<br> Windows 10 - Colab Notebook</p> </li> <li> <p dir="auto"><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>:<br> N/A</p> </li> <li> <p dir="auto"><strong>TensorFlow installed from (source or binary)</strong>:<br> Not sure</p> </li> <li> <p dir="auto"><strong>TensorFlow version (use command below)</strong>:<br> 1.9</p> </li> <li> <p dir="auto"><strong>Python version</strong>:<br> 3.6 (I think)</p> </li> <li> <p dir="auto"><strong>Bazel version (if compiling from source)</strong>:<br> Unsure</p> </li> <li> <p dir="auto"><strong>GCC/Compiler version (if compiling from source)</strong>:<br> Unsure</p> </li> <li> <p dir="auto"><strong>CUDA/cuDNN version</strong>:<br> N/A</p> </li> <li> <p dir="auto"><strong>GPU model and memory</strong>:<br> N/A</p> </li> <li> <p dir="auto"><strong>Exact command to reproduce</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" # Train the CNN model mnist_classifier.train(input_fn=train_input_fn,steps=train_steps)"><pre class="notranslate"><code class="notranslate"> # Train the CNN model mnist_classifier.train(input_fn=train_input_fn,steps=train_steps) </code></pre></div> </li> </ul> <p dir="auto">You can collect some of this information using our environment capture script:</p> <p dir="auto"><a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh</a></p> <p dir="auto">You can obtain the TensorFlow version with</p> <p dir="auto">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</p> <h3 dir="auto">Describe the problem</h3> <p dir="auto">Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.</p> <p dir="auto">I want to train multiple CNNs of the same structure (lenet) using randomly selected subsets of varying sizes from the MNIST training set. I was able to use the same line of code successfully in an earlier program. This work is contributing towards the development of a computational model for executive function deficits in ADHD as part of a PhD thesis in Pharmaceutical Sciences.</p> <h3 dir="auto">Source code / logs</h3> <p dir="auto">Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.<br> <a href="https://github.com/tensorflow/tensorflow/files/2214655/Quantitative.WM.Model.txt">Quantitative WM Model.txt</a></p>
<h3 dir="auto">System information</h3> <ul dir="auto"> <li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: Yes</li> <li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Debian Jessie</li> <li><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>: n/a</li> <li><strong>TensorFlow installed from (source or binary)</strong>: binary</li> <li><strong>TensorFlow version (use command below)</strong>: ('v1.9.0-0-g25c197e023', '1.9.0')</li> <li><strong>Python version</strong>: 2.7.9</li> <li><strong>Bazel version (if compiling from source)</strong>: n/a</li> <li><strong>GCC/Compiler version (if compiling from source)</strong>: n/a</li> <li><strong>CUDA/cuDNN version</strong>: n/a</li> <li><strong>GPU model and memory</strong>: n/a</li> <li><strong>Exact command to reproduce</strong>: See provided gist</li> </ul> <h3 dir="auto">Describe the problem</h3> <p dir="auto">I've been setting up Estimators by using Keras layers to define tensors and then feeding them into my own <code class="notranslate">model_fn</code>. This was a pain and prevented me from easily doing stuff like adding regularization, but was necessary until recently due to various bugs within <code class="notranslate">model_to_estimator</code>. Luckily those bugs have been fixed, and I can now use the much more canonical and proper <code class="notranslate">model_to_estimator</code>. Unfortunately there are still some holes...</p> <p dir="auto">Anyways, when I did this I would, in defining the model, set various summaries to be collected simply by calling <code class="notranslate">tf.summary.scalar</code> etc. as documented. However, when I take the same tensors and put them through a Keras model and then through <code class="notranslate">model_to_estimator</code>, the summaries I've defined do not get<br> written.</p> <p dir="auto">I've tried a few things here, but largely haven't met with any success. One of the workarounds <a href="https://groups.google.com/forum/#!topic/keras-users/rEJ1xYqD3AM" rel="nofollow">I've seen suggested</a> is to try and shove the result of <code class="notranslate">tf.summary.merge_all</code> into a <code class="notranslate">metric</code>, but this does not work since Keras wants those to be numeric and summaries are strings. This does not work if I put this in as <code class="notranslate">target_tensors</code> either, as commented out in the gist.</p> <p dir="auto">Note: I recognize that this is filed against TF 1.9, but I don't see anything in the 1.10 changelog to indicate that this was noted or fixed. I am in a weird situation where it is best for me to use 1.9, unfortunately.</p> <h3 dir="auto">Source code / logs</h3> <p dir="auto">The <a href="https://gist.github.com/zmjjmz/75ba919d5f2755738252b4d0b0032faa">gist</a> here reproduces this issue by taking a common function to get the tensors for a model, and creating estimators in both scenarios.</p> <p dir="auto">Below is the first event with a summary from each case. It shows that in the 'plain' case, the summary tag <code class="notranslate">class_norm</code> shows up whereas in the <code class="notranslate">keras</code> case it does not. This is the crux of the issue I'm encountering.</p> <p dir="auto">Plain case:<br> <code class="notranslate">{'value': [{'simple_value': 1.0, 'tag': u'enqueue_input/queue/enqueue_input/random_shuffle_queuefraction_over_250_of_750_full'}, {'simple_value': 4.119956016540527, 'tag': u'class_norm'}, {'simple_value': 0.6801050901412964, 'tag': u'loss'}]}</code><br> Keras case:<br> <code class="notranslate">{'value': [{'simple_value': 1.0, 'tag': u'enqueue_input/queue/enqueue_input/random_shuffle_queuefraction_over_250_of_750_full'}, {'simple_value': 0.8805878758430481, 'tag': u'loss_1'}]}</code></p>
0
<h3 dir="auto">Preflight Checklist</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li> </ul> <h3 dir="auto">Issue Details</h3> <ul dir="auto"> <li><strong>Electron Version:</strong> <ul dir="auto"> <li>9.0.0-beta.18 (also reproducible in 8.2.3)</li> </ul> </li> <li><strong>Operating System:</strong> <ul dir="auto"> <li>Windows 10 1909</li> </ul> </li> <li><strong>Last Known Working Electron version:</strong> <ul dir="auto"> <li>Unknown</li> </ul> </li> </ul> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">The web page to behave as expected.</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">Electron crashes:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Received fatal exception EXCEPTION_ACCESS_VIOLATION Backtrace: (No symbol) [0x0000000000000000] std::__1::vector&lt;v8::CpuProfileDeoptInfo,std::__1::allocator&lt;v8::CpuProfileDeoptInfo&gt; &gt;::get_allocator [0x00007FF6BF946448+58424] uv_fs_get_statbuf [0x00007FF6C15FB25C+86348] uv_cond_signal [0x00007FF6C1ADB90E+938254] uv_cond_signal [0x00007FF6C1AE018D+956813] uv_cond_signal [0x00007FF6C1ADFD87+955783] uv_cond_signal [0x00007FF6C1ADA320+932640] uv_cond_signal [0x00007FF6C1ADABE7+934887] uv_cond_signal [0x00007FF6C1AEBCD0+1004752] uv_mutex_unlock [0x00007FF6C19B67B1+2152321] uv_gettimeofday [0x00007FF6C21774A9+225113] uv_gettimeofday [0x00007FF6C2177230+224480] uv_mutex_unlock [0x00007FF6C19F2374+2396996] uv_mutex_unlock [0x00007FF6C19F1ADE+2394798] uv_gettimeofday [0x00007FF6C2177AB8+226664] uv_mutex_unlock [0x00007FF6C19A239A+2069354] v8_inspector::V8StackTraceId::ToString [0x00007FF6C103D772+5951442] v8_inspector::V8StackTraceId::ToString [0x00007FF6C103D643+5951139] v8_inspector::V8StackTraceId::ToString [0x00007FF6C103F2C1+5958433] v8_inspector::V8StackTraceId::ToString [0x00007FF6C103AFED+5941325] v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F4022D+4913805] v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F40DD1+4916785] v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F40A93+4915955] IsSandboxedProcess [0x00007FF6C1EA8BC3+310707] v8::ResourceConstraints::ResourceConstraints [0x00007FF6C0314F3E+1398462] Ordinal0 [0x00007FF6BF87140B+5131] node::AsyncResource::CallbackScope::CallbackScope [0x00007FF6C4CCB982+21725986] BaseThreadInitThunk [0x00007FFF6E917BD4+20] RtlUserThreadStart [0x00007FFF6F2ACE51+33] Electron exited with code 3221225477."><pre class="notranslate"><code class="notranslate">Received fatal exception EXCEPTION_ACCESS_VIOLATION Backtrace: (No symbol) [0x0000000000000000] std::__1::vector&lt;v8::CpuProfileDeoptInfo,std::__1::allocator&lt;v8::CpuProfileDeoptInfo&gt; &gt;::get_allocator [0x00007FF6BF946448+58424] uv_fs_get_statbuf [0x00007FF6C15FB25C+86348] uv_cond_signal [0x00007FF6C1ADB90E+938254] uv_cond_signal [0x00007FF6C1AE018D+956813] uv_cond_signal [0x00007FF6C1ADFD87+955783] uv_cond_signal [0x00007FF6C1ADA320+932640] uv_cond_signal [0x00007FF6C1ADABE7+934887] uv_cond_signal [0x00007FF6C1AEBCD0+1004752] uv_mutex_unlock [0x00007FF6C19B67B1+2152321] uv_gettimeofday [0x00007FF6C21774A9+225113] uv_gettimeofday [0x00007FF6C2177230+224480] uv_mutex_unlock [0x00007FF6C19F2374+2396996] uv_mutex_unlock [0x00007FF6C19F1ADE+2394798] uv_gettimeofday [0x00007FF6C2177AB8+226664] uv_mutex_unlock [0x00007FF6C19A239A+2069354] v8_inspector::V8StackTraceId::ToString [0x00007FF6C103D772+5951442] v8_inspector::V8StackTraceId::ToString [0x00007FF6C103D643+5951139] v8_inspector::V8StackTraceId::ToString [0x00007FF6C103F2C1+5958433] v8_inspector::V8StackTraceId::ToString [0x00007FF6C103AFED+5941325] v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F4022D+4913805] v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F40DD1+4916785] v8_inspector::V8StackTraceId::ToString [0x00007FF6C0F40A93+4915955] IsSandboxedProcess [0x00007FF6C1EA8BC3+310707] v8::ResourceConstraints::ResourceConstraints [0x00007FF6C0314F3E+1398462] Ordinal0 [0x00007FF6BF87140B+5131] node::AsyncResource::CallbackScope::CallbackScope [0x00007FF6C4CCB982+21725986] BaseThreadInitThunk [0x00007FFF6E917BD4+20] RtlUserThreadStart [0x00007FFF6F2ACE51+33] Electron exited with code 3221225477. </code></pre></div> <h3 dir="auto">To Reproduce</h3> <p dir="auto">See electron fiddle at:</p> <p dir="auto"><a href="https://gist.github.com/Niquolas/81cc70179578975651e7efd94d6f9748">https://gist.github.com/Niquolas/81cc70179578975651e7efd94d6f9748</a></p> <p dir="auto">Ensure any adblockers e.g. Pi-hole are disabled.</p> <ol dir="auto"> <li>Launch the application</li> <li>Wait for the page to fully load</li> <li>Interact with the page (clicking on an ad yields the most consistent results)</li> </ol> <h3 dir="auto">Additional Information</h3> <p dir="auto">There seems to be a script on the page (probably an advert, as enabling Pi-hole negates the issue for me) that is causing the native crash.</p> <p dir="auto">Not sure if this is an Electron bug or something further upstream, so I thought it best to check here. Apologies if this is out of scope.</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> <ul dir="auto"> <li>9.0.0-beta.5</li> </ul> </li> <li><strong>Operating System:</strong> <ul dir="auto"> <li>MacOS 10.15.3</li> </ul> </li> <li><strong>Last Known Working Electron version:</strong> <ul dir="auto"> <li>Unknown</li> </ul> </li> </ul> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">Navigating to a page (afaict when it has an iframe) and then navigating away via "Back" should not crash Electron.</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">Electron crashes with the following trace (with debug symbols):</p> <details> ``` Received signal 11 SEGV_MAPERR 058c0000057c 0 Electron Framework 0x0000000117ad7739 base::debug::CollectStackTrace(void**, unsigned long) + 9 1 Electron Framework 0x00000001179a8df3 base::debug::StackTrace::StackTrace() + 19 2 Electron Framework 0x0000000117ad75e1 base::debug::(anonymous namespace)::StackDumpSignalHandler(int, __siginfo*, void*) + 2385 3 libsystem_platform.dylib 0x00007fff652b242d _sigtramp + 29 4 ??? 0x00007f9d56173880 0x0 + 140313730955392 5 Electron Framework 0x0000000117231c1c network_hints::mojom::NetworkHintsHandlerStubDispatch::Accept(network_hints::mojom::NetworkHintsHandler*, mojo::Message*) + 1148 6 Electron Framework 0x0000000117ebc45f mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) + 991 7 Electron Framework 0x0000000117ec09fb mojo::MessageDispatcher::Accept(mojo::Message*) + 283 8 Electron Framework 0x0000000117ebdb08 mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) + 120 9 Electron Framework 0x0000000117ec65cb mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::internal::MultiplexRouter::MessageWrapper*, mojo::internal::MultiplexRouter::ClientCallBehavior, base::SequencedTaskRunner*) + 1451 10 Electron Framework 0x0000000117ec5a7a mojo::internal::MultiplexRouter::Accept(mojo::Message*) + 426 11 Electron Framework 0x0000000117ec09fb mojo::MessageDispatcher::Accept(mojo::Message*) + 283 12 Electron Framework 0x0000000117eb4184 mojo::Connector::DispatchMessage(mojo::Message) + 420 13 Electron Framework 0x0000000117eb5146 mojo::Connector::ReadAllAvailableMessages() + 710 14 Electron Framework 0x0000000117eb4d89 mojo::Connector::OnHandleReadyInternal(unsigned int) + 185 15 Electron Framework 0x0000000112819447 mojo::SimpleWatcher::DiscardReadyState(base::RepeatingCallback const&amp;, unsigned int, mojo::HandleSignalsState const&amp;) + 103 16 Electron Framework 0x0000000117eea8fb mojo::SimpleWatcher::OnHandleReady(int, unsigned int, mojo::HandleSignalsState const&amp;) + 443 17 Electron Framework 0x0000000117eeaea1 void base::internal::Invoker, int, unsigned int, mojo::HandleSignalsState&gt;, void ()&gt;::RunImpl, int, unsigned int, mojo::HandleSignalsState&gt;, 0ul, 1ul, 2ul, 3ul&gt;(void (mojo::SimpleWatcher::*&amp;&amp;)(int, unsigned int, mojo::HandleSignalsState const&amp;), std::__1::tuple, int, unsigned int, mojo::HandleSignalsState&gt;&amp;&amp;, std::__1::integer_sequence) + 193 18 Electron Framework 0x0000000117a3baf4 base::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 404 19 Electron Framework 0x0000000117a5d195 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow*, bool*) + 485 20 Electron Framework 0x0000000117a5ce8e base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork() + 94 21 Electron Framework 0x0000000117af945f base::MessagePumpCFRunLoopBase::RunWork() + 63 22 Electron Framework 0x0000000117aed45a base::mac::CallWithEHFrame(void () block_pointer) + 10 23 Electron Framework 0x0000000117af8c3f base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 63 24 CoreFoundation 0x00007fff2da15b21 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 25 CoreFoundation 0x00007fff2da15ac0 __CFRunLoopDoSource0 + 103 26 CoreFoundation 0x00007fff2da158d4 __CFRunLoopDoSources0 + 209 27 CoreFoundation 0x00007fff2da14740 __CFRunLoopRun + 1272 28 CoreFoundation 0x00007fff2da13bd3 CFRunLoopRunSpecific + 499 29 HIToolbox 0x00007fff2c56965d RunCurrentEventLoopInMode + 292 30 HIToolbox 0x00007fff2c56939d ReceiveNextEventCommon + 600 31 HIToolbox 0x00007fff2c569127 _BlockUntilNextEventMatchingListInModeWithFilter + 64 32 AppKit 0x00007fff2abd9ba4 _DPSNextEvent + 990 33 AppKit 0x00007fff2abd8380 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 34 AppKit 0x00007fff2abca09e -[NSApplication run] + 658 35 Electron Framework 0x0000000117afa5fc base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) + 348 36 Electron Framework 0x0000000117af8592 base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 130 37 Electron Framework 0x0000000117a5db22 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 242 38 Electron Framework 0x0000000117a0f12a base::RunLoop::Run() + 826 39 Electron Framework 0x00000001164296a1 content::BrowserMainLoop::RunMainMessageLoopParts() + 225 40 Electron Framework 0x000000011642bdf6 content::BrowserMainRunnerImpl::Run() + 102 41 Electron Framework 0x000000011642625d content::BrowserMain(content::MainFunctionParams const&amp;) + 269 42 Electron Framework 0x00000001161c7f06 content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&amp;, bool) + 998 43 Electron Framework 0x00000001161c7af3 content::ContentMainRunnerImpl::Run(bool) + 483 44 Electron Framework 0x000000011a1031d9 service_manager::Main(service_manager::MainParams const&amp;) + 3017 45 Electron Framework 0x000000011441da48 content::ContentMain(content::ContentMainParams const&amp;) + 120 46 Electron Framework 0x00000001127d5946 ElectronMain + 134 47 Electron 0x0000000106f22071 main + 289 48 libdyld.dylib 0x00007fff650b97fd start + 1 49 ??? 0x0000000000000002 0x0 + 2 ``` </details> <p dir="auto">Using lldb I was able to trace the crash to </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/electron/electron/blob/efc11563e8562e87ed56e1e961434730334e9826/shell/browser/network_hints_handler_impl.cc#L33">electron/shell/browser/network_hints_handler_impl.cc</a> </p> <p class="mb-0 color-fg-muted"> Line 33 in <a data-pjax="true" class="commit-tease-sha" href="/electron/electron/commit/efc11563e8562e87ed56e1e961434730334e9826">efc1156</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="L33" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="33"></td> <td id="LC33" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> render_frame_host_-&gt;<span class="pl-c1">GetProcess</span>()-&gt;<span class="pl-c1">GetBrowserContext</span>(); </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">I'm unable to get lldb to emit any frame variables, but based on some test accesses I added to the code, it appears that <code class="notranslate">render_frame_host_</code> is no longer valid.</p> <h3 dir="auto">To Reproduce</h3> <p dir="auto">This does not occur frequently, but it seems to happen most when I go "back" from a page with an iframe. I am able to reproduce using the following fiddle:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const {app, BrowserWindow} = require('electron') let mainWindow function createWindow () { mainWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: false, sandbox: true } }) mainWindow.loadURL('https://www.google.com/search?q=js+time+interval+format') mainWindow.on('closed', function () { mainWindow = null }) } app.on('ready', createWindow) app.on('window-all-closed', function () { if (process.platform !== 'darwin') { app.quit() } }) app.on('activate', function () { if (mainWindow === null) createWindow() })"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span>app<span class="pl-kos">,</span> BrowserWindow<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span> <span class="pl-k">let</span> <span class="pl-s1">mainWindow</span> <span class="pl-k">function</span> <span class="pl-en">createWindow</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">width</span>: <span class="pl-c1">800</span><span class="pl-kos">,</span> <span class="pl-c1">height</span>: <span class="pl-c1">600</span><span class="pl-kos">,</span> <span class="pl-c1">webPreferences</span>: <span class="pl-kos">{</span> <span class="pl-c1">nodeIntegration</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span> <span class="pl-c1">sandbox</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s">'https://www.google.com/search?q=js+time+interval+format'</span><span class="pl-kos">)</span> <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'closed'</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-c1">null</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'ready'</span><span class="pl-kos">,</span> <span class="pl-s1">createWindow</span><span class="pl-kos">)</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'window-all-closed'</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">platform</span> <span class="pl-c1">!==</span> <span class="pl-s">'darwin'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">quit</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'activate'</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">mainWindow</span> <span class="pl-c1">===</span> <span class="pl-c1">null</span><span class="pl-kos">)</span> <span class="pl-en">createWindow</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">Steps to recreate:</p> <ul dir="auto"> <li>Wait for the google results</li> <li>Click on the second result (html-goodies.com)</li> <li>Wait for the page to finish loading (some iframes will load on the right side)</li> <li>Go back (use the devtools to enter <code class="notranslate">history.back()</code>)</li> </ul> <p dir="auto">Electron should crash during the "back" navigation.</p>
1
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v1.35.1]</li> <li>Operating System: [Windows 10]</li> <li>Browser: [Chrome]</li> <li>Other info: Windows Terminal</li> </ul> <p dir="auto"><strong>Steps</strong></p> <ul dir="auto"> <li>[Run npm init playwright]</li> <li>[Error]</li> </ul> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">Configuration to initialize Playwright</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">Error:</p> <p dir="auto">npm ERR! code ENOLOCAL<br> npm ERR! Could not install from "Apud\AppData\Roaming\npm-cache_npx\17028" as it does not contain a package.json file.</p> <p dir="auto">npm ERR! A complete log of this run can be found in:<br> npm ERR! C:\Users\Fernando R. Apud\AppData\Roaming\npm-cache_logs\2023-06-20T23_23_00_727Z-debug.log<br> La instalación de [ 'create-playwright@latest' ] fracasó con código 1</p> <p dir="auto">Log:<br> <a href="https://github.com/microsoft/playwright/files/11808972/2023-06-20T23_23_00_727Z-debug.log">2023-06-20T23_23_00_727Z-debug.log</a></p>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v18.17.0]</li> <li>Operating System: [Windows 11]</li> <li>Other info:</li> </ul> <p dir="auto">I have the the command npm init playwright@latest to install playwright but it is not giving success message and failing to install chromium<br> Here is the error belo<br> Failed to install browsers<br> Error: Failed to download Chromium 115.0.5790.75 (playwright build v1071), caused by<br> Error: Download failure, C:\Users\BhagyashriChaudari\AppData\Local\ms-playwright\chromium-1071\INSTALLATION_COMPLETE does not exist<br> at ChildProcess. (C:\PIP\PlayWright\Practice\node_modules\playwright-core\lib\server\registry\browserFetcher.js:93:14)<br> at ChildProcess.emit (node:events:514:28)<br> at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)<br> Error: Command failed: npx playwright install<br> at checkExecSyncError (node:child_process:885:11)<br> at execSync (node:child_process:957:15)<br> at executeCommands (C:\Users\BhagyashriChaudari\AppData\Local\npm-cache_npx\d352e76cc6b4974c\node_modules\create-playwright\lib\index.js:4519:39)<br> at Generator.run (C:\Users\BhagyashriChaudari\AppData\Local\npm-cache_npx\d352e76cc6b4974c\node_modules\create-playwright\lib\index.js:4679:5)<br> at process.processTicksAndRejections (node:internal/process/task_queues:95:5)<br> at async C:\Users\BhagyashriChaudari\AppData\Local\npm-cache_npx\d352e76cc6b4974c\node_modules\create-playwright\lib\index.js:4950:3 {<br> status: 1,<br> signal: null,<br> output: [ null, null, null ],<br> pid: 13084,<br> stdout: null,<br> stderr: null<br> }<br> npm ERR! code 1<br> npm ERR! path C:\PIP\PlayWright\Practice<br> npm ERR! command failed<br> npm ERR! command C:\Windows\system32\cmd.exe /d /s /c create-playwright</p> <p dir="auto">npm ERR! A complete log of this run can be found in:</p>
0
<p dir="auto">As discussed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="181923776" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/14384" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/14384/hovercard?comment_id=82538778&amp;comment_type=review_comment" href="https://github.com/pandas-dev/pandas/pull/14384#discussion_r82538778">#14384 (comment)</a>.</p> <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 df1 = pd.DataFrame({'a': [1, 2, 3]}) df2 = pd.DataFrame({'b': [2,3,4]}) df = pd.concat([df1, df1, df2], axis=1).to_sparse() df.index = [1, 2, 3] df.loc[1, 'a'] = 3"><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">df1</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'a'</span>: [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>]}) <span class="pl-s1">df2</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'b'</span>: [<span class="pl-c1">2</span>,<span class="pl-c1">3</span>,<span class="pl-c1">4</span>]}) <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([<span class="pl-s1">df1</span>, <span class="pl-s1">df1</span>, <span class="pl-s1">df2</span>], <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>).<span class="pl-en">to_sparse</span>() <span class="pl-s1">df</span>.<span class="pl-s1">index</span> <span class="pl-c1">=</span> [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>] <span class="pl-s1">df</span>.<span class="pl-s1">loc</span>[<span class="pl-c1">1</span>, <span class="pl-s">'a'</span>] <span class="pl-c1">=</span> <span class="pl-c1">3</span></pre></div> <p dir="auto">errors with</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="AttributeError Traceback (most recent call last) &lt;ipython-input-6-0a670748626a&gt; in &lt;module&gt;() 4 df = pd.concat([df1, df1, df2], axis=1).to_sparse() 5 df.index = [1, 2, 3] ----&gt; 6 df.loc[1, 'a'] = 3 /Users/bkandel/.virtualenvs/pandas_19/lib/python2.7/site-packages/pandas/core/indexing.pyc in __setitem__(self, key, value) 138 key = com._apply_if_callable(key, self.obj) 139 indexer = self._get_setitem_indexer(key) --&gt; 140 self._setitem_with_indexer(indexer, value) 141 142 def _has_valid_type(self, k, axis): /Users/bkandel/.virtualenvs/pandas_19/lib/python2.7/site-packages/pandas/core/indexing.pyc in _setitem_with_indexer(self, indexer, value) 545 # scalar 546 for item in labels: --&gt; 547 setter(item, value) 548 549 else: /Users/bkandel/.virtualenvs/pandas_19/lib/python2.7/site-packages/pandas/core/indexing.pyc in setter(item, v) 453 454 def setter(item, v): --&gt; 455 s = self.obj[item] 456 pi = plane_indexer[0] if lplane_indexer == 1 else plane_indexer 457 /Users/bkandel/.virtualenvs/pandas_19/lib/python2.7/site-packages/pandas/sparse/frame.pyc in __getitem__(self, key) 345 return self._getitem_array(key) 346 else: --&gt; 347 return self._get_item_cache(key) 348 349 @Appender(DataFrame.get_value.__doc__, indents=0) /Users/bkandel/.virtualenvs/pandas_19/lib/python2.7/site-packages/pandas/core/generic.pyc in _get_item_cache(self, item) 1385 if res is None: 1386 values = self._data.get(item) -&gt; 1387 res = self._box_item_values(item, values) 1388 cache[item] = res 1389 res._set_as_cached(item, self) /Users/bkandel/.virtualenvs/pandas_19/lib/python2.7/site-packages/pandas/core/frame.pyc in _box_item_values(self, key, values) 2392 items = self.columns[self.columns.get_loc(key)] 2393 if values.ndim == 2: -&gt; 2394 return self._constructor(values.T, columns=items, index=self.index) 2395 else: 2396 return self._box_col_values(values, items) AttributeError: 'BlockManager' object has no attribute 'T'"><pre class="notranslate"><span class="pl-v">AttributeError</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>) <span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">6</span><span class="pl-c1">-</span><span class="pl-c1">0</span><span class="pl-s1">a670748626a</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>() <span class="pl-c1">4</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([<span class="pl-s1">df1</span>, <span class="pl-s1">df1</span>, <span class="pl-s1">df2</span>], <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>).<span class="pl-en">to_sparse</span>() <span class="pl-c1">5</span> <span class="pl-s1">df</span>.<span class="pl-s1">index</span> <span class="pl-c1">=</span> [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>] <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">6</span> <span class="pl-s1">df</span>.<span class="pl-s1">loc</span>[<span class="pl-c1">1</span>, <span class="pl-s">'a'</span>] <span class="pl-c1">=</span> <span class="pl-c1">3</span> <span class="pl-c1">/</span><span class="pl-v">Users</span><span class="pl-c1">/</span><span class="pl-s1">bkandel</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">pandas_19</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">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">indexing</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">__setitem__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>, <span class="pl-s1">value</span>) <span class="pl-c1">138</span> <span class="pl-s1">key</span> <span class="pl-c1">=</span> <span class="pl-s1">com</span>.<span class="pl-en">_apply_if_callable</span>(<span class="pl-s1">key</span>, <span class="pl-s1">self</span>.<span class="pl-s1">obj</span>) <span class="pl-c1">139</span> <span class="pl-s1">indexer</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_setitem_indexer</span>(<span class="pl-s1">key</span>) <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">140</span> <span class="pl-s1">self</span>.<span class="pl-en">_setitem_with_indexer</span>(<span class="pl-s1">indexer</span>, <span class="pl-s1">value</span>) <span class="pl-c1">141</span> <span class="pl-c1">142</span> <span class="pl-k">def</span> <span class="pl-en">_has_valid_type</span>(<span class="pl-s1">self</span>, <span class="pl-s1">k</span>, <span class="pl-s1">axis</span>): <span class="pl-c1">/</span><span class="pl-v">Users</span><span class="pl-c1">/</span><span class="pl-s1">bkandel</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">pandas_19</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">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">indexing</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">_setitem_with_indexer</span>(<span class="pl-s1">self</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">value</span>) <span class="pl-c1">545</span> <span class="pl-c"># scalar</span> <span class="pl-c1">546</span> <span class="pl-k">for</span> <span class="pl-s1">item</span> <span class="pl-c1">in</span> <span class="pl-s1">labels</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">547</span> <span class="pl-en">setter</span>(<span class="pl-s1">item</span>, <span class="pl-s1">value</span>) <span class="pl-c1">548</span> <span class="pl-c1">549</span> <span class="pl-s1">else</span>: <span class="pl-c1">/</span><span class="pl-v">Users</span><span class="pl-c1">/</span><span class="pl-s1">bkandel</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">pandas_19</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">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">indexing</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">setter</span>(<span class="pl-s1">item</span>, <span class="pl-s1">v</span>) <span class="pl-c1">453</span> <span class="pl-c1">454</span> <span class="pl-k">def</span> <span class="pl-en">setter</span>(<span class="pl-s1">item</span>, <span class="pl-s1">v</span>): <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">455</span> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">obj</span>[<span class="pl-s1">item</span>] <span class="pl-c1">456</span> <span class="pl-s1">pi</span> <span class="pl-c1">=</span> <span class="pl-s1">plane_indexer</span>[<span class="pl-c1">0</span>] <span class="pl-k">if</span> <span class="pl-s1">lplane_indexer</span> <span class="pl-c1">==</span> <span class="pl-c1">1</span> <span class="pl-k">else</span> <span class="pl-s1">plane_indexer</span> <span class="pl-c1">457</span> <span class="pl-c1">/</span><span class="pl-v">Users</span><span class="pl-c1">/</span><span class="pl-s1">bkandel</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">pandas_19</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">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">sparse</span><span class="pl-c1">/</span><span class="pl-s1">frame</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">__getitem__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>) <span class="pl-c1">345</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_getitem_array</span>(<span class="pl-s1">key</span>) <span class="pl-c1">346</span> <span class="pl-s1">else</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">347</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_item_cache</span>(<span class="pl-s1">key</span>) <span class="pl-c1">348</span> <span class="pl-c1">349</span> @<span class="pl-v">Appender</span>(<span class="pl-v">DataFrame</span>.<span class="pl-s1">get_value</span>.<span class="pl-s1">__doc__</span>, <span class="pl-s1">indents</span><span class="pl-c1">=</span><span class="pl-c1">0</span>) <span class="pl-c1">/</span><span class="pl-v">Users</span><span class="pl-c1">/</span><span class="pl-s1">bkandel</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">pandas_19</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">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">generic</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">_get_item_cache</span>(<span class="pl-s1">self</span>, <span class="pl-s1">item</span>) <span class="pl-c1">1385</span> <span class="pl-k">if</span> <span class="pl-s1">res</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>: <span class="pl-c1">1386</span> <span class="pl-s1">values</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_data</span>.<span class="pl-en">get</span>(<span class="pl-s1">item</span>) <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1387</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_box_item_values</span>(<span class="pl-s1">item</span>, <span class="pl-s1">values</span>) <span class="pl-c1">1388</span> <span class="pl-s1">cache</span>[<span class="pl-s1">item</span>] <span class="pl-c1">=</span> <span class="pl-s1">res</span> <span class="pl-c1">1389</span> <span class="pl-s1">res</span>.<span class="pl-en">_set_as_cached</span>(<span class="pl-s1">item</span>, <span class="pl-s1">self</span>) <span class="pl-c1">/</span><span class="pl-v">Users</span><span class="pl-c1">/</span><span class="pl-s1">bkandel</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">pandas_19</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">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">frame</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">_box_item_values</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>, <span class="pl-s1">values</span>) <span class="pl-c1">2392</span> <span class="pl-s1">items</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">columns</span>[<span class="pl-s1">self</span>.<span class="pl-s1">columns</span>.<span class="pl-en">get_loc</span>(<span class="pl-s1">key</span>)] <span class="pl-c1">2393</span> <span class="pl-k">if</span> <span class="pl-s1">values</span>.<span class="pl-s1">ndim</span> <span class="pl-c1">==</span> <span class="pl-c1">2</span>: <span class="pl-c1">-&gt;</span> <span class="pl-c1">2394</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_constructor</span>(<span class="pl-s1">values</span>.<span class="pl-v">T</span>, <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">items</span>, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">index</span>) <span class="pl-c1">2395</span> <span class="pl-k">else</span>: <span class="pl-c1">2396</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_box_col_values</span>(<span class="pl-s1">values</span>, <span class="pl-s1">items</span>) <span class="pl-v">AttributeError</span>: <span class="pl-s">'BlockManager'</span> <span class="pl-s1">object</span> <span class="pl-s1">has</span> <span class="pl-s1">no</span> <span class="pl-s1">attribute</span> <span class="pl-s">'T'</span></pre></div> <h4 dir="auto">Expected Output</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" a a b 1 3 3 2 2 2 2 3 3 3 3 4"><pre class="notranslate"> <span class="pl-s1">a</span> <span class="pl-s1">a</span> <span class="pl-s1">b</span> <span class="pl-c1">1</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">2</span> <span class="pl-c1">2</span> <span class="pl-c1">2</span> <span class="pl-c1">2</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">4</span></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> ## INSTALLED VERSIONS <p dir="auto">commit: None<br> python: 2.7.10.final.0<br> python-bits: 64<br> OS: Darwin<br> OS-release: 14.5.0<br> machine: x86_64<br> processor: i386<br> byteorder: little<br> LC_ALL: None<br> LANG: None<br> LOCALE: None.None</p> <p dir="auto">pandas: 0.19.0<br> nose: None<br> pip: 8.1.2<br> setuptools: 28.3.0<br> Cython: None<br> numpy: 1.11.2<br> scipy: None<br> statsmodels: None<br> xarray: None<br> IPython: 5.1.0<br> sphinx: None<br> patsy: None<br> dateutil: 2.5.3<br> pytz: 2016.7<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> matplotlib: None<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: None<br> httplib2: None<br> apiclient: None<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: None<br> boto: None<br> pandas_datareader: None</p> </details>
<p dir="auto">The following code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd p1 = {'name': 'willy', 'age': 10} p2 = {'name': 'willy', 'age': 11} p3 = {'name': 'zoe', 'age': 10} df = pd.DataFrame([p1, p2, p3]) df = df[['name','name','age']] df.groupby('name')"><pre class="notranslate"><code class="notranslate">import pandas as pd p1 = {'name': 'willy', 'age': 10} p2 = {'name': 'willy', 'age': 11} p3 = {'name': 'zoe', 'age': 10} df = pd.DataFrame([p1, p2, p3]) df = df[['name','name','age']] df.groupby('name') </code></pre></div> <p dir="auto">gives the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: 'DataFrame' object is not callable"><pre class="notranslate"><code class="notranslate">TypeError: 'DataFrame' object is not callable </code></pre></div> <p dir="auto">Instead, it should say "Cannot groupby a column which exists more than once"</p>
0
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=pmularien" rel="nofollow">Peter Mularien</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3910?redirect=false" rel="nofollow">SPR-3910</a></strong> and commented</p> <p dir="auto">The vanilla Spring framework download (not the -with-dependencies.zip) should at the very least include Javadoc for the Spring API. As of Spring 2.0.6, "spring-framework-2.0.6.zip" does not include API docs, and users are forced to download the unintuivitely-named "-with-dependencies.zip" to get the Javadoc, along with a whole bunch of stuff that they probably <em>didn't</em> want.</p> <p dir="auto">Thanks for listening!</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0.6</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="398073444" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7590" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7590/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7590">#7590</a> Offer basic distribution that includes javadoc (<em><strong>"duplicates"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398081131" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8589" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8589/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8589">#8589</a> Spring web site should document the difference between the 2 downloads (*2.0.6.zip, and -with-dependencies.zip)</li> </ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=rogeriomgatto" rel="nofollow">Rogério Meneguelli Gatto</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2903?redirect=false" rel="nofollow">SPR-2903</a></strong> and commented</p> <p dir="auto">The standard distribution (spring-framework-2.0.1.zip) does not include API javadocs. There are no downloads in the documentation page either.</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0.1</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="398081135" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8590" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8590/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8590">#8590</a> Spring ZIP file should include Javadoc for Spring (<em><strong>"is duplicated by"</strong></em>)</li> </ul>
1
<p dir="auto">I have noticed when editing HTML files that Visual Studio does a very good job with auto complete; however, when I am using HTML within a PHP file, tags and tag attributes don't show up in the intellisense menu. Is this by design or something that was accidentally looked over?</p> <p dir="auto">Thanks,<br> Hunter Mitchell</p>
<p dir="auto">In PHP files there is no html tags auto completion, please add.</p> <hr> <p dir="auto"><strong>EDIT 9/13/2018</strong> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/egamma/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/egamma">@egamma</a>: VS Code provides only basic support for PHP, but there are powerful PHP extensions available in the market place:</p> <ul dir="auto"> <li><a href="https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-intellisense" rel="nofollow">PHP IntelliSense</a></li> <li><a href="https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client" rel="nofollow">PHP Intelephence</a>.</li> </ul> <p dir="auto">This feature should be provided by these extensions (Intelephence actually already does support it). Please give these extensions a try and help to make them better by filing issues and pull requests.</p> <p dir="auto">This issue has lost focus and turned into a discussion whether VS Code should provide PHP support out of box. However, as with many other language like C#, C++, Go, Python, Rust we do not want to bundle PHP with VS Code but rather rely on our great extension ecosystem. I´m therefore closing this issue.</p>
1
<p dir="auto">Found an ICE playing with the experimental associated types:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(associated_types)] impl&lt;'a&gt; IntoBuffer for &amp;'a [u8] { type T = &amp;'a [u8]; fn into_buffer(self) -&gt; &amp;'a [u8] { self } } pub trait IntoBuffer { type T; fn into_buffer(self) -&gt; &lt;Self as IntoBuffer&gt;::T; } fn main() {}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>associated_types<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">impl</span><span class="pl-kos">&lt;</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">&gt;</span> <span class="pl-smi">IntoBuffer</span> <span class="pl-k">for</span> <span class="pl-c1">&amp;</span><span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-kos">[</span><span class="pl-smi">u8</span><span class="pl-kos">]</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">T</span> = <span class="pl-c1">&amp;</span><span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-kos">[</span><span class="pl-smi">u8</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">into_buffer</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -&gt; <span class="pl-c1">&amp;</span><span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-kos">[</span><span class="pl-smi">u8</span><span class="pl-kos">]</span> <span class="pl-kos">{</span> <span class="pl-smi">self</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">IntoBuffer</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">into_buffer</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -&gt; &lt;<span class="pl-smi">Self</span> <span class="pl-k">as</span> <span class="pl-smi">IntoBuffer</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">T</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-kos">}</span></pre></div> <p dir="auto">Errors with:</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: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace task 'rustc' panicked at 'No def'n found for DefId { krate: 0, node: 33 } in tcx.impl_or_trait_items', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/ty.rs:4323 stack backtrace: 1: 0x113062ba2 - rt::backtrace::imp::write::h7579c368c127979b6it 2: 0x113065d3d - failure::on_fail::h8be83c0fdfea739bdBt 3: 0x1132d8f65 - unwind::begin_unwind_inner::h4bdb4ca88294d49812c 4: 0x1132d8baf - unwind::begin_unwind_fmt::hae17deb499932f75c0c 5: 0x110158c84 - middle::ty::impl_or_trait_item::h4faeda649e6a6f19H64 6: 0x1105141d9 - middle::typeck::collect::ImplCtxt&lt;'a, 'tcx&gt;.AstConv&lt;'tcx&gt;::associated_type_binding::h9055dfc46b8c27bakJG 7: 0x110527559 - middle::typeck::astconv::create_substs_for_ast_path::h5023519427691145276 8: 0x110436fcc - middle::typeck::collect::convert::h0d3126dddfce9a9eF3G 9: 0x11042cf73 - middle::typeck::collect::collect_item_types::h2e912e08bc7db61fCYF 10: 0x1106c0f96 - util::common::time::h15512248264236370325 11: 0x1106c02ee - middle::typeck::check_crate::h7708c70a36786f0djVL 12: 0x10fcb1d93 - driver::driver::phase_3_run_analysis_passes::h5c1577ba8747ac80bfS 13: 0x10fca62bc - driver::driver::compile_input::h6cd958c13fa99356VVR 14: 0x10fd24ab5 - driver::run_compiler::h3464f6d73ed1e2efpUT 15: 0x10fd2328e - driver::run::closure.59750 16: 0x10fb3ab9b - task::TaskBuilder&lt;S&gt;::try_future::closure.39054 17: 0x10fb3aa93 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.39025 18: 0x10fafe7bd - task::NativeSpawner.Spawner::spawn::closure.2477 19: 0x11333b82c - rust_try_inner 20: 0x11333b816 - rust_try 21: 0x1132d6707 - unwind::try::h52975ec5962bbd4bmRc 22: 0x1132d659c - task::Task::run::h585d701e145fcc2392b 23: 0x10fafe5e3 - task::NativeSpawner.Spawner::spawn::closure.2401 24: 0x1132d7dd7 - thread::thread_start::hfcf722effb78e787foc 25: 0x7fff88b882fc - _pthread_body 26: 0x7fff88b88279 - _pthread_body"><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: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace task 'rustc' panicked at 'No def'n found for DefId { krate: 0, node: 33 } in tcx.impl_or_trait_items', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/ty.rs:4323 stack backtrace: 1: 0x113062ba2 - rt::backtrace::imp::write::h7579c368c127979b6it 2: 0x113065d3d - failure::on_fail::h8be83c0fdfea739bdBt 3: 0x1132d8f65 - unwind::begin_unwind_inner::h4bdb4ca88294d49812c 4: 0x1132d8baf - unwind::begin_unwind_fmt::hae17deb499932f75c0c 5: 0x110158c84 - middle::ty::impl_or_trait_item::h4faeda649e6a6f19H64 6: 0x1105141d9 - middle::typeck::collect::ImplCtxt&lt;'a, 'tcx&gt;.AstConv&lt;'tcx&gt;::associated_type_binding::h9055dfc46b8c27bakJG 7: 0x110527559 - middle::typeck::astconv::create_substs_for_ast_path::h5023519427691145276 8: 0x110436fcc - middle::typeck::collect::convert::h0d3126dddfce9a9eF3G 9: 0x11042cf73 - middle::typeck::collect::collect_item_types::h2e912e08bc7db61fCYF 10: 0x1106c0f96 - util::common::time::h15512248264236370325 11: 0x1106c02ee - middle::typeck::check_crate::h7708c70a36786f0djVL 12: 0x10fcb1d93 - driver::driver::phase_3_run_analysis_passes::h5c1577ba8747ac80bfS 13: 0x10fca62bc - driver::driver::compile_input::h6cd958c13fa99356VVR 14: 0x10fd24ab5 - driver::run_compiler::h3464f6d73ed1e2efpUT 15: 0x10fd2328e - driver::run::closure.59750 16: 0x10fb3ab9b - task::TaskBuilder&lt;S&gt;::try_future::closure.39054 17: 0x10fb3aa93 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.39025 18: 0x10fafe7bd - task::NativeSpawner.Spawner::spawn::closure.2477 19: 0x11333b82c - rust_try_inner 20: 0x11333b816 - rust_try 21: 0x1132d6707 - unwind::try::h52975ec5962bbd4bmRc 22: 0x1132d659c - task::Task::run::h585d701e145fcc2392b 23: 0x10fafe5e3 - task::NativeSpawner.Spawner::spawn::closure.2401 24: 0x1132d7dd7 - thread::thread_start::hfcf722effb78e787foc 25: 0x7fff88b882fc - _pthread_body 26: 0x7fff88b88279 - _pthread_body </code></pre></div> <p dir="auto">However, if you swap the order of the trait and impl it works.</p>
<p dir="auto">Not sure how to properly describe the bug, but this causes an ICE:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(associated_types)] struct SimulationInfo; impl SimulationInfo { fn add_state&lt;T: HasState&gt;(&amp;mut self, op: || -&gt; &lt;T as HasState&gt;::State) -&gt; Option&lt;&amp;mut &lt;T as HasState&gt;::State&gt; { None } } trait HasState { type State; }"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>associated_types<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">struct</span> <span class="pl-smi">SimulationInfo</span><span class="pl-kos">;</span> <span class="pl-k">impl</span> <span class="pl-smi">SimulationInfo</span> <span class="pl-kos">{</span> <span class="pl-k">fn</span> <span class="pl-en">add_state</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">HasState</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> <span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-s1">op</span><span class="pl-kos">:</span> || -&gt; &lt;<span class="pl-smi">T</span> <span class="pl-k">as</span> <span class="pl-smi">HasState</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">State</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Option</span><span class="pl-kos">&lt;</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> &lt;<span class="pl-smi">T</span> <span class="pl-k">as</span> <span class="pl-smi">HasState</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">State</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-v">None</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">trait</span> <span class="pl-smi">HasState</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">State</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Whereas this compiles:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(associated_types)] struct SimulationInfo; trait HasState { type State; } impl SimulationInfo { fn add_state&lt;T: HasState&gt;(&amp;mut self, op: || -&gt; &lt;T as HasState&gt;::State) -&gt; Option&lt;&amp;mut &lt;T as HasState&gt;::State&gt; { None } }"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>associated_types<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">struct</span> <span class="pl-smi">SimulationInfo</span><span class="pl-kos">;</span> <span class="pl-k">trait</span> <span class="pl-smi">HasState</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">State</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">impl</span> <span class="pl-smi">SimulationInfo</span> <span class="pl-kos">{</span> <span class="pl-k">fn</span> <span class="pl-en">add_state</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">HasState</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> <span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-s1">op</span><span class="pl-kos">:</span> || -&gt; &lt;<span class="pl-smi">T</span> <span class="pl-k">as</span> <span class="pl-smi">HasState</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">State</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Option</span><span class="pl-kos">&lt;</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> &lt;<span class="pl-smi">T</span> <span class="pl-k">as</span> <span class="pl-smi">HasState</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">State</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-v">None</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Failure:</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: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace task 'rustc' panicked at 'No def'n found for DefId { krate: 0, node: 33 } in tcx.impl_or_trait_items', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/ty.rs:4066 stack backtrace: 1: 0x10d45a619 - rt::backtrace::imp::write::h03fee16d4a0b6b41moq 2: 0x10d45d85c - failure::on_fail::h3e0f6b3c6c4bbcc3VEq 3: 0x10d6bcf05 - unwind::begin_unwind_inner::h6c7f4532e72658d7SJd 4: 0x10d6bcb9f - unwind::begin_unwind_fmt::h9863b25c438d6314kHd 5: 0x10a408d50 - middle::ty::impl_or_trait_item::h8676078de6338b03J2J 6: 0x10a7fe51e - middle::typeck::collect::convert_methods::ty_of_method::h1b65fc29f839dd39kEi 7: 0x10a7a4b84 - middle::typeck::collect::convert::hf5d19782a9342fbfL7i 8: 0x10a79c993 - middle::typeck::collect::collect_item_types::h2af040048993f98298h 9: 0x10a1bb556 - util::common::time::h11920059333862041717 10: 0x10a965478 - middle::typeck::check_crate::h50fcc5c8b39993f4LVn 11: 0x10a9cdbcf - driver::driver::phase_3_run_analysis_passes::h1425a4ca465c7b097DA 12: 0x10a9c82b8 - driver::driver::compile_input::h60bc42ef7fabbfd4SkA 13: 0x10aa45ca8 - driver::run_compiler::h4031243f49082a9fw7D 14: 0x10aa43ece - driver::run::closure.145349 15: 0x10a1d381b - task::TaskBuilder&lt;S&gt;::try_future::closure.103709 16: 0x10a1d3713 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.103680 17: 0x10a15398d - task::NativeSpawner.Spawner::spawn::closure.8526 18: 0x10d72320c - rust_try_inner 19: 0x10d7231f6 - rust_try 20: 0x10d6ba677 - unwind::try::hab84862d0081b274cyd 21: 0x10d6ba50c - task::Task::run::h39093ecd59554b49ZJc 22: 0x10a1537b3 - task::NativeSpawner.Spawner::spawn::closure.8463 23: 0x10d6bbd37 - thread::thread_start::h589be8c0a398d299e5c 24: 0x7fff9260c2fc - _pthread_body 25: 0x7fff9260c279 - _pthread_body"><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: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace task 'rustc' panicked at 'No def'n found for DefId { krate: 0, node: 33 } in tcx.impl_or_trait_items', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/ty.rs:4066 stack backtrace: 1: 0x10d45a619 - rt::backtrace::imp::write::h03fee16d4a0b6b41moq 2: 0x10d45d85c - failure::on_fail::h3e0f6b3c6c4bbcc3VEq 3: 0x10d6bcf05 - unwind::begin_unwind_inner::h6c7f4532e72658d7SJd 4: 0x10d6bcb9f - unwind::begin_unwind_fmt::h9863b25c438d6314kHd 5: 0x10a408d50 - middle::ty::impl_or_trait_item::h8676078de6338b03J2J 6: 0x10a7fe51e - middle::typeck::collect::convert_methods::ty_of_method::h1b65fc29f839dd39kEi 7: 0x10a7a4b84 - middle::typeck::collect::convert::hf5d19782a9342fbfL7i 8: 0x10a79c993 - middle::typeck::collect::collect_item_types::h2af040048993f98298h 9: 0x10a1bb556 - util::common::time::h11920059333862041717 10: 0x10a965478 - middle::typeck::check_crate::h50fcc5c8b39993f4LVn 11: 0x10a9cdbcf - driver::driver::phase_3_run_analysis_passes::h1425a4ca465c7b097DA 12: 0x10a9c82b8 - driver::driver::compile_input::h60bc42ef7fabbfd4SkA 13: 0x10aa45ca8 - driver::run_compiler::h4031243f49082a9fw7D 14: 0x10aa43ece - driver::run::closure.145349 15: 0x10a1d381b - task::TaskBuilder&lt;S&gt;::try_future::closure.103709 16: 0x10a1d3713 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.103680 17: 0x10a15398d - task::NativeSpawner.Spawner::spawn::closure.8526 18: 0x10d72320c - rust_try_inner 19: 0x10d7231f6 - rust_try 20: 0x10d6ba677 - unwind::try::hab84862d0081b274cyd 21: 0x10d6ba50c - task::Task::run::h39093ecd59554b49ZJc 22: 0x10a1537b3 - task::NativeSpawner.Spawner::spawn::closure.8463 23: 0x10d6bbd37 - thread::thread_start::h589be8c0a398d299e5c 24: 0x7fff9260c2fc - _pthread_body 25: 0x7fff9260c279 - _pthread_body </code></pre></div>
1
<p dir="auto">It seems that masked_fill_ is more dangerous for zero-strided tensors, because the mask may be different for the elements that refer to the single location in memor</p> <p dir="auto">Probably related issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="365607801" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/12230" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/12230/hovercard" href="https://github.com/pytorch/pytorch/issues/12230">#12230</a></p> <p dir="auto">My Torch version is <code class="notranslate">1.1.0</code>.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import torch a = torch.zeros(2) b = a.expand(2, 2) b *= 2 # breaks # RuntimeError: mul: unsupported operation: more than one element of the written-to tensor refers to a single memory location. Please clone() the tensor before calling mul mask = torch.ByteTensor([[0, 1], [1, 0]]) b.masked_fill_(mask, 0) # works, but semantically unsafe"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">torch</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">2</span>) <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span>.<span class="pl-en">expand</span>(<span class="pl-c1">2</span>, <span class="pl-c1">2</span>) <span class="pl-s1">b</span> <span class="pl-c1">*=</span> <span class="pl-c1">2</span> <span class="pl-c"># breaks</span> <span class="pl-c"># RuntimeError: mul: unsupported operation: more than one element of the written-to tensor refers to a single memory location. Please clone() the tensor before calling mul</span> <span class="pl-s1">mask</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-v">ByteTensor</span>([[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">0</span>]]) <span class="pl-s1">b</span>.<span class="pl-en">masked_fill_</span>(<span class="pl-s1">mask</span>, <span class="pl-c1">0</span>) <span class="pl-c"># works, but semantically unsafe</span></pre></div>
<p dir="auto">I discovered this when writing some masking code, it seems that unexpected behavior can arise when using pointwise operations to write to expanded tensors. The code below reproduces and explains the issue:</p> <p dir="auto">We start off by constructing an example array and constructing a mask from it:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="example_batch = torch.Tensor([ [[1, 2, 0, 0], [2, 1, 3, 0], [2, 1, 3, 0]] ]) mask = (example_batch == 0) &gt;&gt;&gt; mask tensor([[[0, 0, 1, 1], [0, 0, 0, 1], [0, 0, 0, 1]]], dtype=torch.uint8)"><pre class="notranslate"><span class="pl-s1">example_batch</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-v">Tensor</span>([ [[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">3</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">3</span>, <span class="pl-c1">0</span>]] ]) <span class="pl-s1">mask</span> <span class="pl-c1">=</span> (<span class="pl-s1">example_batch</span> <span class="pl-c1">==</span> <span class="pl-c1">0</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">mask</span> <span class="pl-en">tensor</span>([[[<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>]]], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">torch</span>.<span class="pl-s1">uint8</span>)</pre></div> <p dir="auto">We then expand a range into our example batch:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="index_filled = torch.arange(1, example_batch.size(-1) + 1).expand_as(example_batch) &gt;&gt;&gt; index_filled tensor([[[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]])"><pre class="notranslate"><span class="pl-s1">index_filled</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">arange</span>(<span class="pl-c1">1</span>, <span class="pl-s1">example_batch</span>.<span class="pl-en">size</span>(<span class="pl-c1">-</span><span class="pl-c1">1</span>) <span class="pl-c1">+</span> <span class="pl-c1">1</span>).<span class="pl-en">expand_as</span>(<span class="pl-s1">example_batch</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">index_filled</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">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</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>]]])</pre></div> <p dir="auto">So far, so good, yet the problem appears when we try to do a <code class="notranslate">masked_fill</code> on <code class="notranslate">index_filled</code> using our masked array:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="masked = index_filled.masked_fill_(mask, 0) &gt;&gt;&gt; masked tensor([[[1, 2, 0, 0], [1, 2, 0, 0], [1, 2, 0, 0]]])"><pre class="notranslate"><span class="pl-s1">masked</span> <span class="pl-c1">=</span> <span class="pl-s1">index_filled</span>.<span class="pl-en">masked_fill_</span>(<span class="pl-s1">mask</span>, <span class="pl-c1">0</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">masked</span> <span class="pl-en">tensor</span>([[[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>]]])</pre></div> <p dir="auto">This doesn't seem to be what we would expect from our mask operation, what we where expecting was:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="tensor([[[1., 2., 0., 0.], [1., 2., 3., 0.], [1., 2., 3., 0.]]])"><pre class="notranslate"><span class="pl-en">tensor</span>([[[<span class="pl-c1">1.</span>, <span class="pl-c1">2.</span>, <span class="pl-c1">0.</span>, <span class="pl-c1">0.</span>], [<span class="pl-c1">1.</span>, <span class="pl-c1">2.</span>, <span class="pl-c1">3.</span>, <span class="pl-c1">0.</span>], [<span class="pl-c1">1.</span>, <span class="pl-c1">2.</span>, <span class="pl-c1">3.</span>, <span class="pl-c1">0.</span>]]])</pre></div> <p dir="auto">This behavior also happens with <code class="notranslate">.add_</code> (an ATen operation):</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; index_filled.add_(mask.long()) tensor([[[1, 2, 4, 7], [1, 2, 4, 7], [1, 2, 4, 7]]])"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">index_filled</span>.<span class="pl-en">add_</span>(<span class="pl-s1">mask</span>.<span class="pl-en">long</span>()) <span class="pl-en">tensor</span>([[[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">4</span>, <span class="pl-c1">7</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">4</span>, <span class="pl-c1">7</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">4</span>, <span class="pl-c1">7</span>]]])</pre></div> <p dir="auto">Verse if we try with <code class="notranslate">.contiguous()</code>...</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; index_filled.contiguous().add_(mask.long()) tensor([[[1, 2, 4, 5], [1, 2, 3, 5], [1, 2, 3, 5]]])"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">index_filled</span>.<span class="pl-en">contiguous</span>().<span class="pl-en">add_</span>(<span class="pl-s1">mask</span>.<span class="pl-en">long</span>()) <span class="pl-en">tensor</span>([[[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">4</span>, <span class="pl-c1">5</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">5</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">5</span>]]])</pre></div> <p dir="auto">The "quick fix" to this is to call <code class="notranslate">.contiguous()</code> before <code class="notranslate">add_</code> or <code class="notranslate">masked_fill</code>, however I feel that this solution is non-obvious if the user is not aware of strides (and non-obvious even if the user is). Maybe a check for this type of case should exist? Thanks to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jekbradbury/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jekbradbury">@jekbradbury</a> for helping me figure out this issue.</p> <h2 dir="auto">System Info</h2> <ul dir="auto"> <li>Python version: 3.6</li> <li>CUDA available: No</li> <li>PyTorch or Caffe2: PyTorch</li> <li>How you installed PyTorch (conda, pip, source): Conda</li> <li>OS: Mac OSX 10.13.6</li> <li>PyTorch version: 0.4.1</li> <li>Python version: 3.6</li> </ul>
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 checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Enhancement%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical enhancement to an existing feature.</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%22Issue+Type%3A+Enhancement%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed enhancements.</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 if the same enhancement was already implemented in the<br> 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 in this issue<br> (If there are none, check this box anyway).</li> </ul> <h1 dir="auto">Brief Summary</h1> <p dir="auto">I think it would be more convenient to build the documentation using a docker service instead of installing locally the tex* libs. With that the documentation contributors could quickly inspect, build and contribute to the documentation.</p> <h2 dir="auto">Proposed Behavior</h2> <p dir="auto">It can use the <code class="notranslate">sphinx-autobuild</code> lib to build and serve on port <code class="notranslate">:7000</code>. It won't affect any existing features as far as I am familiar.</p> <h2 dir="auto">Proposed UI/UX</h2> <p dir="auto">It can be simply like that:</p> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ docker-compose -f docker/docker-compose.yml run --rm docs make livehtml` "><pre class="notranslate">$ <span class="pl-s1">docker-compose -f docker/docker-compose.yml run --rm docs make livehtml<span class="pl-s"><span class="pl-pds">`</span> </span></span></pre></div> <p dir="auto">Or it can simply be build &amp; run with an entry point.</p> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ docker-compose -f docker/docker-compose.yml up --build docs"><pre class="notranslate">$ <span class="pl-s1">docker-compose -f docker/docker-compose.yml up --build docs</span></pre></div> <p dir="auto">I've created the service as PoC: <a href="https://github.com/syrull/celery/commit/60ae8f1922977c858e9d09ffc6fc6f3dad1c3186">https://github.com/syrull/celery/commit/60ae8f1922977c858e9d09ffc6fc6f3dad1c3186</a></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 checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+label%3A%22Issue+Type%3A+Feature+Request%22+">issues list</a><br> for similar or identical feature requests.</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/pulls?utf8=%E2%9C%93&amp;q=is%3Apr+label%3A%22PR+Type%3A+Feature%22+">pull requests list</a><br> for existing proposed implementations of this feature.</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 if the same feature was already implemented in the<br> master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h1 dir="auto">Brief Summary</h1> <h1 dir="auto">Design</h1> <p dir="auto">A. Implementation</p> <blockquote> </blockquote> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class BeatCallBacl(object): def __init__(self, func, *args, **kwargs): self._func = func self._func_params = { &quot;args&quot;: args, &quot;kwargs&quot;: kwargs } def __call__(self): ret = self._func(*self._func_params[&quot;args&quot;], **self._func_params[&quot;kwargs&quot;]) LOG.info(&quot;beat call: {}, ret:{}&quot;.format(self._func.__name__, ret)) return ret class Scheduler(object): def apply_async(self, entry, producer=None, advance=True, **kwargs): # Update time-stamps and run counts before we actually execute, # so we have that done if an exception is raised (doesn't schedule # forever.) entry = self.reserve(entry) if advance else entry task = self.app.tasks.get(entry.task) try: entry_args = [v() if isinstance(v, BeatCallBacl) else v for v in entry.args] entry_kwargs = {k: v() if isinstance(v, BeatCallBacl) else v for k, v in entry.kwargs.items()} LOG.info(entry_args) LOG.info(entry_kwargs) if task: return task.apply_async(entry_args, entry_kwargs, producer=producer, **entry.options) else: return self.send_task(entry.task, entry_args, entry_kwargs, producer=producer, **entry.options) except Exception as exc: # pylint: disable=broad-except reraise(SchedulingError, SchedulingError( &quot;Couldn't apply scheduled task {0.name}: {exc}&quot;.format( entry, exc=exc)), sys.exc_info()[2]) finally: self._tasks_since_sync += 1 if self.should_sync(): self._do_sync()"><pre class="notranslate"><code class="notranslate">class BeatCallBacl(object): def __init__(self, func, *args, **kwargs): self._func = func self._func_params = { "args": args, "kwargs": kwargs } def __call__(self): ret = self._func(*self._func_params["args"], **self._func_params["kwargs"]) LOG.info("beat call: {}, ret:{}".format(self._func.__name__, ret)) return ret class Scheduler(object): def apply_async(self, entry, producer=None, advance=True, **kwargs): # Update time-stamps and run counts before we actually execute, # so we have that done if an exception is raised (doesn't schedule # forever.) entry = self.reserve(entry) if advance else entry task = self.app.tasks.get(entry.task) try: entry_args = [v() if isinstance(v, BeatCallBacl) else v for v in entry.args] entry_kwargs = {k: v() if isinstance(v, BeatCallBacl) else v for k, v in entry.kwargs.items()} LOG.info(entry_args) LOG.info(entry_kwargs) if task: return task.apply_async(entry_args, entry_kwargs, producer=producer, **entry.options) else: return self.send_task(entry.task, entry_args, entry_kwargs, producer=producer, **entry.options) except Exception as exc: # pylint: disable=broad-except reraise(SchedulingError, SchedulingError( "Couldn't apply scheduled task {0.name}: {exc}".format( entry, exc=exc)), sys.exc_info()[2]) finally: self._tasks_since_sync += 1 if self.should_sync(): self._do_sync() </code></pre></div> <p dir="auto">B. Instructions</p> <blockquote> </blockquote> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="beat_schedule = { 'gen_course_records-every-5-minutes': { 'task': 'test', 'schedule': 300, 'kwargs': { &quot;current&quot;: BeatCallBack(datetime.datetime.now) } } }"><pre class="notranslate"><code class="notranslate">beat_schedule = { 'gen_course_records-every-5-minutes': { 'task': 'test', 'schedule': 300, 'kwargs': { "current": BeatCallBack(datetime.datetime.now) } } } </code></pre></div> <h2 dir="auto">Architectural Considerations</h2> <p dir="auto">None</p> <h2 dir="auto">Proposed Behavior</h2> <h2 dir="auto">Proposed UI/UX</h2> <h2 dir="auto">Diagrams</h2> <p dir="auto">N/A</p> <h2 dir="auto">Alternatives</h2> <p dir="auto">None</p>
0
<h2 dir="auto">Issue description</h2> <p dir="auto"><code class="notranslate">torch.min</code> and <code class="notranslate">torch.max</code> ignores <code class="notranslate">nan</code> in cuda case and crash with pure <code class="notranslate">nan</code> tensor.</p> <h2 dir="auto">Code example</h2> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import torch &gt;&gt;&gt; a = torch.Tensor(4, 3).fill_(1) &gt;&gt;&gt; a = a.cuda() &gt;&gt;&gt; a[1, 2] = float('nan') &gt;&gt;&gt; a tensor([[ 1., 1., 1.], [ 1., 1., nan.], [ 1., 1., 1.], [ 1., 1., 1.]], device='cuda:0') &gt;&gt;&gt; torch.max(a) tensor(1., device='cuda:0') &gt;&gt;&gt; torch.min(a) tensor(1., device='cuda:0') &gt;&gt;&gt; a = torch.Tensor(4, 3).fill_(float('nan')) &gt;&gt;&gt; a = a.cuda() &gt;&gt;&gt; torch.max(a) Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;anaconda3/lib/python3.6/site-packages/torch/tensor.py&quot;, line 57, in __repr__ return torch._tensor_str._str(self) File &quot;anaconda3/lib/python3.6/site-packages/torch/_tensor_str.py&quot;, line 218, in _str fmt, scale, sz = _number_format(self) File &quot;anaconda3/lib/python3.6/site-packages/torch/_tensor_str.py&quot;, line 96, in _number_format if value != math.ceil(value.item()): RuntimeError: Overflow when unpacking long &gt;&gt;&gt; torch.min(a) Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;anaconda3/lib/python3.6/site-packages/torch/tensor.py&quot;, line 57, in __repr__ return torch._tensor_str._str(self) File &quot;anaconda3/lib/python3.6/site-packages/torch/_tensor_str.py&quot;, line 218, in _str fmt, scale, sz = _number_format(self) File &quot;anaconda3/lib/python3.6/site-packages/torch/_tensor_str.py&quot;, line 96, in _number_format if value != math.ceil(value.item()): RuntimeError: Overflow when unpacking long"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">torch</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-v">Tensor</span>(<span class="pl-c1">4</span>, <span class="pl-c1">3</span>).<span class="pl-en">fill_</span>(<span class="pl-c1">1</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span>.<span class="pl-en">cuda</span>() <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a</span>[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>] <span class="pl-c1">=</span> <span class="pl-en">float</span>(<span class="pl-s">'nan'</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a</span> <span class="pl-en">tensor</span>([[ <span class="pl-c1">1.</span>, <span class="pl-c1">1.</span>, <span class="pl-c1">1.</span>], [ <span class="pl-c1">1.</span>, <span class="pl-c1">1.</span>, <span class="pl-s1">nan</span>.<span class="pl-s1"></span>], [ <span class="pl-c1">1.</span>, <span class="pl-c1">1.</span>, <span class="pl-c1">1.</span>], [ <span class="pl-c1">1.</span>, <span class="pl-c1">1.</span>, <span class="pl-c1">1.</span>]], <span class="pl-s1">device</span><span class="pl-c1">=</span><span class="pl-s">'cuda:0'</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">max</span>(<span class="pl-s1">a</span>) <span class="pl-en">tensor</span>(<span class="pl-c1">1.</span>, <span class="pl-s1">device</span><span class="pl-c1">=</span><span class="pl-s">'cuda:0'</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">min</span>(<span class="pl-s1">a</span>) <span class="pl-en">tensor</span>(<span class="pl-c1">1.</span>, <span class="pl-s1">device</span><span class="pl-c1">=</span><span class="pl-s">'cuda:0'</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-v">Tensor</span>(<span class="pl-c1">4</span>, <span class="pl-c1">3</span>).<span class="pl-en">fill_</span>(<span class="pl-en">float</span>(<span class="pl-s">'nan'</span>)) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span>.<span class="pl-en">cuda</span>() <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">max</span>(<span class="pl-s1">a</span>) <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"&lt;stdin&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-v">File</span> <span class="pl-s">"anaconda3/lib/python3.6/site-packages/torch/tensor.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">57</span>, <span class="pl-s1">in</span> <span class="pl-s1">__repr__</span> <span class="pl-k">return</span> <span class="pl-s1">torch</span>.<span class="pl-s1">_tensor_str</span>.<span class="pl-en">_str</span>(<span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-s">"anaconda3/lib/python3.6/site-packages/torch/_tensor_str.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">218</span>, <span class="pl-s1">in</span> <span class="pl-s1">_str</span> <span class="pl-s1">fmt</span>, <span class="pl-s1">scale</span>, <span class="pl-s1">sz</span> <span class="pl-c1">=</span> <span class="pl-en">_number_format</span>(<span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-s">"anaconda3/lib/python3.6/site-packages/torch/_tensor_str.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">96</span>, <span class="pl-s1">in</span> <span class="pl-s1">_number_format</span> <span class="pl-k">if</span> <span class="pl-s1">value</span> <span class="pl-c1">!=</span> <span class="pl-s1">math</span>.<span class="pl-en">ceil</span>(<span class="pl-s1">value</span>.<span class="pl-en">item</span>()): <span class="pl-v">RuntimeError</span>: <span class="pl-v">Overflow</span> <span class="pl-s1">when</span> <span class="pl-s1">unpacking</span> <span class="pl-s1">long</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">min</span>(<span class="pl-s1">a</span>) <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"&lt;stdin&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-v">File</span> <span class="pl-s">"anaconda3/lib/python3.6/site-packages/torch/tensor.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">57</span>, <span class="pl-s1">in</span> <span class="pl-s1">__repr__</span> <span class="pl-k">return</span> <span class="pl-s1">torch</span>.<span class="pl-s1">_tensor_str</span>.<span class="pl-en">_str</span>(<span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-s">"anaconda3/lib/python3.6/site-packages/torch/_tensor_str.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">218</span>, <span class="pl-s1">in</span> <span class="pl-s1">_str</span> <span class="pl-s1">fmt</span>, <span class="pl-s1">scale</span>, <span class="pl-s1">sz</span> <span class="pl-c1">=</span> <span class="pl-en">_number_format</span>(<span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-s">"anaconda3/lib/python3.6/site-packages/torch/_tensor_str.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">96</span>, <span class="pl-s1">in</span> <span class="pl-s1">_number_format</span> <span class="pl-k">if</span> <span class="pl-s1">value</span> <span class="pl-c1">!=</span> <span class="pl-s1">math</span>.<span class="pl-en">ceil</span>(<span class="pl-s1">value</span>.<span class="pl-en">item</span>()): <span class="pl-v">RuntimeError</span>: <span class="pl-v">Overflow</span> <span class="pl-s1">when</span> <span class="pl-s1">unpacking</span> <span class="pl-s1">long</span></pre></div> <h2 dir="auto">System Info</h2> <ul dir="auto"> <li>PyTorch or Caffe2: PyTorch</li> <li>How you installed PyTorch (conda, pip, source): conda</li> <li>Build command you used (if compiling from source):</li> <li>OS: Ubuntu 16.04</li> <li>PyTorch version: 0.4.0</li> <li>Python version: 3.6.3</li> <li>CUDA/cuDNN version: 8 / 5</li> <li>GPU models and configuration: GTX 1050 Ti</li> <li>GCC version (if compiling from source):</li> <li>CMake version:</li> <li>Versions of any other relevant libraries:</li> </ul>
<p dir="auto">On master:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; x.max() Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;/home/ssnl/sftp/pytorch/torch/tensor.py&quot;, line 53, in __repr__ return torch._tensor_str._str(self) File &quot;/home/ssnl/sftp/pytorch/torch/_tensor_str.py&quot;, line 302, in _str strt = _vector_str(self.unsqueeze(0)) File &quot;/home/ssnl/sftp/pytorch/torch/_tensor_str.py&quot;, line 270, in _vector_str fmt, scale, sz = _number_format(self) File &quot;/home/ssnl/sftp/pytorch/torch/_tensor_str.py&quot;, line 95, in _number_format if value != math.ceil(value.item()): RuntimeError: Overflow when unpacking long &gt;&gt;&gt; x Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;/home/ssnl/sftp/pytorch/torch/tensor.py&quot;, line 53, in __repr__ return torch._tensor_str._str(self) File &quot;/home/ssnl/sftp/pytorch/torch/_tensor_str.py&quot;, line 306, in _str strt = _matrix_str(self) File &quot;/home/ssnl/sftp/pytorch/torch/_tensor_str.py&quot;, line 215, in _matrix_str min_sz=5 if not print_full_mat else 0) File &quot;/home/ssnl/sftp/pytorch/torch/_tensor_str.py&quot;, line 95, in _number_format if value != math.ceil(value.item()): RuntimeError: Overflow when unpacking long &gt;&gt;&gt; x.max().item() 1.8446744073709552e+19 &gt;&gt;&gt; x.dtype torch.float32"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">x</span>.<span class="pl-en">max</span>() <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"&lt;stdin&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-v">File</span> <span class="pl-s">"/home/ssnl/sftp/pytorch/torch/tensor.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">53</span>, <span class="pl-s1">in</span> <span class="pl-s1">__repr__</span> <span class="pl-k">return</span> <span class="pl-s1">torch</span>.<span class="pl-s1">_tensor_str</span>.<span class="pl-en">_str</span>(<span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-s">"/home/ssnl/sftp/pytorch/torch/_tensor_str.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">302</span>, <span class="pl-s1">in</span> <span class="pl-s1">_str</span> <span class="pl-s1">strt</span> <span class="pl-c1">=</span> <span class="pl-en">_vector_str</span>(<span class="pl-s1">self</span>.<span class="pl-en">unsqueeze</span>(<span class="pl-c1">0</span>)) <span class="pl-v">File</span> <span class="pl-s">"/home/ssnl/sftp/pytorch/torch/_tensor_str.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">270</span>, <span class="pl-s1">in</span> <span class="pl-s1">_vector_str</span> <span class="pl-s1">fmt</span>, <span class="pl-s1">scale</span>, <span class="pl-s1">sz</span> <span class="pl-c1">=</span> <span class="pl-en">_number_format</span>(<span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-s">"/home/ssnl/sftp/pytorch/torch/_tensor_str.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">95</span>, <span class="pl-s1">in</span> <span class="pl-s1">_number_format</span> <span class="pl-k">if</span> <span class="pl-s1">value</span> <span class="pl-c1">!=</span> <span class="pl-s1">math</span>.<span class="pl-en">ceil</span>(<span class="pl-s1">value</span>.<span class="pl-en">item</span>()): <span class="pl-v">RuntimeError</span>: <span class="pl-v">Overflow</span> <span class="pl-s1">when</span> <span class="pl-s1">unpacking</span> <span class="pl-s1">long</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">x</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"&lt;stdin&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-v">File</span> <span class="pl-s">"/home/ssnl/sftp/pytorch/torch/tensor.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">53</span>, <span class="pl-s1">in</span> <span class="pl-s1">__repr__</span> <span class="pl-k">return</span> <span class="pl-s1">torch</span>.<span class="pl-s1">_tensor_str</span>.<span class="pl-en">_str</span>(<span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-s">"/home/ssnl/sftp/pytorch/torch/_tensor_str.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">306</span>, <span class="pl-s1">in</span> <span class="pl-s1">_str</span> <span class="pl-s1">strt</span> <span class="pl-c1">=</span> <span class="pl-en">_matrix_str</span>(<span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-s">"/home/ssnl/sftp/pytorch/torch/_tensor_str.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">215</span>, <span class="pl-s1">in</span> <span class="pl-s1">_matrix_str</span> <span class="pl-s1">min_sz</span><span class="pl-c1">=</span><span class="pl-c1">5</span> <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">print_full_mat</span> <span class="pl-k">else</span> <span class="pl-c1">0</span>) <span class="pl-v">File</span> <span class="pl-s">"/home/ssnl/sftp/pytorch/torch/_tensor_str.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">95</span>, <span class="pl-s1">in</span> <span class="pl-s1">_number_format</span> <span class="pl-k">if</span> <span class="pl-s1">value</span> <span class="pl-c1">!=</span> <span class="pl-s1">math</span>.<span class="pl-en">ceil</span>(<span class="pl-s1">value</span>.<span class="pl-en">item</span>()): <span class="pl-v">RuntimeError</span>: <span class="pl-v">Overflow</span> <span class="pl-s1">when</span> <span class="pl-s1">unpacking</span> <span class="pl-s1">long</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">x</span>.<span class="pl-en">max</span>().<span class="pl-en">item</span>() <span class="pl-c1">1.8446744073709552e+19</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">x</span>.<span class="pl-s1">dtype</span> <span class="pl-s1">torch</span>.<span class="pl-s1">float32</span></pre></div> <p dir="auto">This is a regression as printing this tensor works in 0.3.1. Assigning to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/li-roy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/li-roy">@li-roy</a> as you are taking care of the printing issue. Reported in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="310102253" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/6136" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/6136/hovercard" href="https://github.com/pytorch/pytorch/pull/6136">#6136</a></p>
1
<p dir="auto">Hello guys, I'm trying to create decorators with the deno, however this is not being possible, the deno console also does not provide me with information.</p> <p dir="auto">See the code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" interface Newable&lt;T&gt; { new(...args: any[]): T; } function Decorate() { return function &lt;T extends Newable&lt;TBaseClass&gt;&gt;(constructor: T): any { // extend constructor console.log(constructor); return class extends constructor { protected _extraField: string = '-' }; } } @Decorate() class ExtTest{} console.log((new ExtTest))"><pre lang="class" class="notranslate"><code class="notranslate"> interface Newable&lt;T&gt; { new(...args: any[]): T; } function Decorate() { return function &lt;T extends Newable&lt;TBaseClass&gt;&gt;(constructor: T): any { // extend constructor console.log(constructor); return class extends constructor { protected _extraField: string = '-' }; } } @Decorate() class ExtTest{} console.log((new ExtTest)) </code></pre></div> <p dir="auto">*OBS: I tried remove the &lt;T extends Newable&gt; and but not working<br> If i comment the "<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/decorate/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/decorate">@decorate</a>" the error fades away.<br> See the console:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/42474938/82621736-57ef3580-9bb2-11ea-9433-453fe7d6fe05.png"><img src="https://user-images.githubusercontent.com/42474938/82621736-57ef3580-9bb2-11ea-9433-453fe7d6fe05.png" alt="image" style="max-width: 100%;"></a><br> and my tsconfig.json:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/42474938/82621767-6ccbc900-9bb2-11ea-88fa-d12c6c04c0af.png"><img src="https://user-images.githubusercontent.com/42474938/82621767-6ccbc900-9bb2-11ea-88fa-d12c6c04c0af.png" alt="image" style="max-width: 100%;"></a><br> am i doing something wrong?</p> <p dir="auto">See you later!</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ deno cache https://gist.githubusercontent.com/lucacasonato/e7d549c5c2d92ed4c10170f0a758b952/raw/a5fc2b7cc8b1952e1718103b496cc9254e2a9ada/decorator.ts --config https://gist.githubusercontent.com/lucacasonato/e7d549c5c2d92ed4c10170f0a758b952/raw/a5fc2b7cc8b1952e1718103b496cc9254e2a9ada/tsconfig.json error:"><pre class="notranslate">$ deno cache https://gist.githubusercontent.com/lucacasonato/e7d549c5c2d92ed4c10170f0a758b952/raw/a5fc2b7cc8b1952e1718103b496cc9254e2a9ada/decorator.ts --config https://gist.githubusercontent.com/lucacasonato/e7d549c5c2d92ed4c10170f0a758b952/raw/a5fc2b7cc8b1952e1718103b496cc9254e2a9ada/tsconfig.json error:</pre></div> <p dir="auto">It just errors with <code class="notranslate">error:</code>. Kinda surprising there is no test for this. I'm on a release build from <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/denoland/deno/commit/f98cc34c405aefd1c46fe5c6b5e0051e1a502f64/hovercard" href="https://github.com/denoland/deno/commit/f98cc34c405aefd1c46fe5c6b5e0051e1a502f64"><tt>f98cc34</tt></a>.</p>
1
<p dir="auto">Frequently, even with all files saved, Atom will cancel logout on OS X. It seems to do this to give itself a moment to close. However,</p> <ul dir="auto"> <li>This behavior is very frustrating</li> <li>This behavior is against OS X guidelines and standard practices</li> <li>This behavior goes against user expectations</li> </ul> <p dir="auto">This should be removed entirely, and Atom should never delay logging out.</p>
<p dir="auto">Halp ticket:</p> <ul dir="auto"> <li>support/5b613158cbd611e38be29976540e6fbc</li> </ul> <blockquote> <p dir="auto">When restarting on OS X Mavericks and choosing the option to reopen windows, Atom crashes and will not let the system reboot.</p> </blockquote> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/38924/2794385/04e3c88e-cbec-11e3-847f-9f0d2e8cf0bd.png"><img src="https://cloud.githubusercontent.com/assets/38924/2794385/04e3c88e-cbec-11e3-847f-9f0d2e8cf0bd.png" alt="screen shot 2014-04-24 at 10 06 37 pm" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/38924/2794387/0964ec4e-cbec-11e3-905d-de8636fb16a1.png"><img src="https://cloud.githubusercontent.com/assets/38924/2794387/0964ec4e-cbec-11e3-905d-de8636fb16a1.png" alt="screen shot 2014-04-24 at 10 04 35 pm" style="max-width: 100%;"></a></p>
1
<p dir="auto"><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/f1c2ab7/hovercard" href="https://github.com/symfony/symfony/commit/f1c2ab7"><tt>f1c2ab7</tt></a>#commitcomment-3341689</p> <p dir="auto"><a href="https://groups.google.com/d/topic/symfony2/F17eK33QY6M/discussion" rel="nofollow">https://groups.google.com/d/topic/symfony2/F17eK33QY6M/discussion</a></p>
<p dir="auto">It`s very simple to reproduce:</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="services: request_scoped_service: class: stdObject scope: request alias_for_service: alias: request_scoped_service"><pre class="notranslate"><span class="pl-ent">services</span>: <span class="pl-ent">request_scoped_service</span>: <span class="pl-ent">class</span>: <span class="pl-s">stdObject</span> <span class="pl-ent">scope</span>: <span class="pl-s">request</span> <span class="pl-ent">alias_for_service</span>: <span class="pl-ent">alias</span>: <span class="pl-s">request_scoped_service</span></pre></div> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/** @var ContainerInterface $container */ $container-&gt;enterScope('request') $byName = $container-&gt;get('request_scoped_service'); $byAlias1 = $container-&gt;get('alias_for_service'); $byAlias2 = $container-&gt;get('alias_for_service'); var_dump( $byName === $byAlias1 ); // false, expected true var_dump( $byName === $byAlias2 ); // false, expected true var_dump( $byAlias1 === $byAlias2 ); // false, expected true"><pre class="notranslate"><span class="pl-c">/** @var ContainerInterface $container */</span> <span class="pl-s1"><span class="pl-c1">$</span>container</span>-&gt;<span class="pl-en">enterScope</span>(<span class="pl-s">'request'</span>) <span class="pl-s1"><span class="pl-c1">$</span>byName</span> = <span class="pl-s1"><span class="pl-c1">$</span>container</span>-&gt;<span class="pl-en">get</span>(<span class="pl-s">'request_scoped_service'</span>); <span class="pl-s1"><span class="pl-c1">$</span>byAlias1</span> = <span class="pl-s1"><span class="pl-c1">$</span>container</span>-&gt;<span class="pl-en">get</span>(<span class="pl-s">'alias_for_service'</span>); <span class="pl-s1"><span class="pl-c1">$</span>byAlias2</span> = <span class="pl-s1"><span class="pl-c1">$</span>container</span>-&gt;<span class="pl-en">get</span>(<span class="pl-s">'alias_for_service'</span>); var_dump( <span class="pl-s1"><span class="pl-c1">$</span>byName</span> === <span class="pl-s1"><span class="pl-c1">$</span>byAlias1</span> ); <span class="pl-c">// false, expected true</span> var_dump( <span class="pl-s1"><span class="pl-c1">$</span>byName</span> === <span class="pl-s1"><span class="pl-c1">$</span>byAlias2</span> ); <span class="pl-c">// false, expected true</span> var_dump( <span class="pl-s1"><span class="pl-c1">$</span>byAlias1</span> === <span class="pl-s1"><span class="pl-c1">$</span>byAlias2</span> ); <span class="pl-c">// false, expected true</span></pre></div> <p dir="auto">Bug may be after this: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/f1c2ab7/hovercard" href="https://github.com/symfony/symfony/commit/f1c2ab7"><tt>f1c2ab7</tt></a></p>
1
<p dir="auto">I think the issue can be traced down to <code class="notranslate">lax.eq(np.inf, np.nan)</code> returning True, for some reason. I am on a recent master commit (7328689).</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import jax.numpy as np &gt;&gt;&gt; from jax.numpy.lax_numpy import isinf &gt;&gt;&gt; from jax import lax &gt;&gt;&gt; nan = np.array([np.nan]) &gt;&gt;&gt; print(nan) array([nan], dtype=float32) &gt;&gt;&gt; np.isnan(nan) # Should be True array([False]) &gt;&gt;&gt; np.isinf(nan) # Should be False array([True]) &gt;&gt;&gt; lax.eq(np.nan, np.inf) # Should be False array(True)"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">from</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span>.<span class="pl-s1">lax_numpy</span> <span class="pl-k">import</span> <span class="pl-s1">isinf</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">from</span> <span class="pl-s1">jax</span> <span class="pl-k">import</span> <span class="pl-s1">lax</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">nan</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">print</span>(<span class="pl-s1">nan</span>) <span class="pl-en">array</span>([<span class="pl-s1">nan</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">float32</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-en">isnan</span>(<span class="pl-s1">nan</span>) <span class="pl-c"># Should be True</span> <span class="pl-en">array</span>([<span class="pl-c1">False</span>]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-en">isinf</span>(<span class="pl-s1">nan</span>) <span class="pl-c"># Should be False</span> <span class="pl-en">array</span>([<span class="pl-c1">True</span>]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">lax</span>.<span class="pl-en">eq</span>(<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">inf</span>) <span class="pl-c"># Should be False</span> <span class="pl-en">array</span>(<span class="pl-c1">True</span>)</pre></div>
<p dir="auto">as a result np.nan_to_num, np.nanmean, etc all don't work</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import jax.numpy as np a = np.zeros(1) / np.zeros(1) print(a.__array__()) print(np.isnan(a).__array__())"><pre class="notranslate"><code class="notranslate">import jax.numpy as np a = np.zeros(1) / np.zeros(1) print(a.__array__()) print(np.isnan(a).__array__()) </code></pre></div> <p dir="auto"><code class="notranslate">[nan]</code><br> <code class="notranslate">[False]</code></p> <p dir="auto">This bug only happens with the CPU-only build of JAX, when I see this warning: "warnings.warn('No GPU found, falling back to CPU.')"</p>
1
<p dir="auto">The cutoff is 5m for the normal gce suite, which times out in 30m inclusive of cluster up and down. So we should factor out the part of <a href="https://github.com/kubernetes/kubernetes/blob/master/test/e2e/service.go#L490">https://github.com/kubernetes/kubernetes/blob/master/test/e2e/service.go#L490</a> that sets up and waits on external loadbalancers into gce-slow.</p> <p dir="auto">@kubernetes/goog-testing <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/fejta/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/fejta">@fejta</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/spiffxp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/spiffxp">@spiffxp</a></p>
<p dir="auto">#</p> <p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p> <p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p> <h2 dir="auto"><strong>Related to or a similar discussion happened</strong> @ <a href="https://github.com/kubernetes/kubernetes/issues/33544" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/33544/hovercard">#33544</a>, <a href="https://github.com/kubernetes/kubernetes/issues/33729" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/33729/hovercard">#33729</a><br> , <a href="https://github.com/kubernetes/kubernetes/issues/35684" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/35684/hovercard">#35684</a></h2> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):<br> This is a BUG REPORT</p> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@kubeMaster:~# kubectl version Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.4&quot;, GitCommit:&quot;3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-10-21T02:48:38Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;} Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.4&quot;, GitCommit:&quot;3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-10-21T02:42:39Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate"><code class="notranslate">root@kubeMaster:~# kubectl version Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.4", GitCommit:"3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56", GitTreeState:"clean", BuildDate:"2016-10-21T02:48:38Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.4", GitCommit:"3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56", GitTreeState:"clean", BuildDate:"2016-10-21T02:42:39Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} </code></pre></div> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>:<br> No cloud provider; 2 GB Memory.100G disk.</li> <li><strong>OS</strong> (e.g. from /etc/os-release): <code class="notranslate">VERSION="16.04 LTS (Xenial Xerus)"</code></li> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):<code class="notranslate">Linux kubeMaster 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</code></li> <li><strong>Install tools</strong>: kubeadm</li> <li><strong>Others</strong>:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@kubeMaster:~# kubeadm version kubeadm version: version.Info{Major:&quot;1&quot;, Minor:&quot;5+&quot;, GitVersion:&quot;v1.5.0-alpha.2.421+a6bea3d79b8bba&quot;, GitCommit:&quot;a6bea3d79b8bbaa5e8b57482c9fff9265d402708&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-11-03T06:54:50Z&quot;, GoVersion:&quot;go1.7.1&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate"><code class="notranslate">root@kubeMaster:~# kubeadm version kubeadm version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-alpha.2.421+a6bea3d79b8bba", GitCommit:"a6bea3d79b8bbaa5e8b57482c9fff9265d402708", GitTreeState:"clean", BuildDate:"2016-11-03T06:54:50Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"linux/amd64"} </code></pre></div> <p dir="auto"><strong>What happened</strong>:<br> <code class="notranslate">kubeadm init</code> on mater blocks at <code class="notranslate">&lt;master/apiclient&gt; created API client, waiting for the control plane to become ready</code>.</p> <p dir="auto"><strong>What you expected to happen</strong>:<br> <code class="notranslate">kubeadm init</code> should finish in several minutes at most, usually less than one minute.</p> <p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):<br> Follow along side the <a href="http://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="nofollow">Installing Kubernetes on Linux with kubeadm</a>:</p> <ol dir="auto"> <li>install docker: <code class="notranslate">curl -sSL https://get.docker.com | sh</code></li> <li>Installing kubelet and kubeadm:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - # cat &lt;&lt;EOF &gt; /etc/apt/sources.list.d/kubernetes.list deb http://apt.kubernetes.io/ kubernetes-xenial main EOF # apt-get update # # Install docker if you don't have it already. # apt-get install -y docker.io # apt-get install -y kubelet kubeadm kubectl kubernetes-cni"><pre class="notranslate"><code class="notranslate"># curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - # cat &lt;&lt;EOF &gt; /etc/apt/sources.list.d/kubernetes.list deb http://apt.kubernetes.io/ kubernetes-xenial main EOF # apt-get update # # Install docker if you don't have it already. # apt-get install -y docker.io # apt-get install -y kubelet kubeadm kubectl kubernetes-cni </code></pre></div> <ol start="3" dir="auto"> <li>Due to GFW, I can not pull images from gcr.io. so I pull images from docker hub and tag them by myself.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="images=(kube-proxy-amd64:v1.4.4 kube-discovery-amd64:1.0 kubedns-amd64:1.7 kube-scheduler-amd64:v1.4.4 kube-controller-manager-amd64:v1.4.4 kube-apiserver-amd64:v1.4.4 etcd-amd64:2.2.5 kube-dnsmasq-amd64:1.3 exechealthz-amd64:1.1 pause-amd64:3.0 kubernetes-dashboard-amd64:v1.4.1) for imageName in ${images[@]} ; do docker pull mritd/$imageName docker tag mritd/$imageName gcr.io/google_containers/$imageName docker rmi mritd/$imageName done"><pre class="notranslate"><code class="notranslate">images=(kube-proxy-amd64:v1.4.4 kube-discovery-amd64:1.0 kubedns-amd64:1.7 kube-scheduler-amd64:v1.4.4 kube-controller-manager-amd64:v1.4.4 kube-apiserver-amd64:v1.4.4 etcd-amd64:2.2.5 kube-dnsmasq-amd64:1.3 exechealthz-amd64:1.1 pause-amd64:3.0 kubernetes-dashboard-amd64:v1.4.1) for imageName in ${images[@]} ; do docker pull mritd/$imageName docker tag mritd/$imageName gcr.io/google_containers/$imageName docker rmi mritd/$imageName done </code></pre></div> <ol start="4" dir="auto"> <li>kubeadm init: <code class="notranslate">kubeadm init --use-kubernetes-version v1.4.4</code></li> </ol> <p dir="auto"><strong>Anything else do we need to know</strong>:<br> While the <code class="notranslate">kubeadm init --use-kubernetes-version v1.4.4</code> hangs on,</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@kubeMaster:~# kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system etcd-kubemaster 1/1 Running 0 21m kube-system kube-apiserver-kubemaster 1/1 Running 0 21m kube-system kube-controller-manager-kubemaster 1/1 Running 0 21m kube-system kube-scheduler-kubemaster 1/1 Running 0 21m"><pre class="notranslate"><code class="notranslate">root@kubeMaster:~# kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system etcd-kubemaster 1/1 Running 0 21m kube-system kube-apiserver-kubemaster 1/1 Running 0 21m kube-system kube-controller-manager-kubemaster 1/1 Running 0 21m kube-system kube-scheduler-kubemaster 1/1 Running 0 21m </code></pre></div> <p dir="auto">the components in <code class="notranslate">control plane</code> seems to started already.<br> Plus:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@kubeMaster:~# kubectl get cs NAME STATUS MESSAGE ERROR scheduler Healthy ok controller-manager Healthy ok etcd-0 Healthy {&quot;health&quot;: &quot;true&quot;} "><pre class="notranslate"><code class="notranslate">root@kubeMaster:~# kubectl get cs NAME STATUS MESSAGE ERROR scheduler Healthy ok controller-manager Healthy ok etcd-0 Healthy {"health": "true"} </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@kubeMaster:~# docker images | grep gcr.io gcr.io/google_containers/pause-amd64 3.0 39a06579e733 3 weeks ago 746.9 kB gcr.io/google_containers/kubedns-amd64 1.7 96fdd723a50d 3 weeks ago 55.06 MB gcr.io/google_containers/kube-dnsmasq-amd64 1.3 2a7c0456186f 3 weeks ago 5.13 MB gcr.io/google_containers/kube-discovery-amd64 1.0 b873a3c6d819 3 weeks ago 134.2 MB gcr.io/google_containers/exechealthz-amd64 1.1 0e2effc928a5 3 weeks ago 8.332 MB gcr.io/google_containers/etcd-amd64 2.2.5 fbabfa0f7ac7 3 weeks ago 30.45 MB gcr.io/google_containers/kube-scheduler-amd64 v1.4.4 ebdf41825f08 5 weeks ago 81.67 MB gcr.io/google_containers/kube-proxy-amd64 v1.4.4 c0fcee70820a 5 weeks ago 202.7 MB gcr.io/google_containers/kube-controller-manager-amd64 v1.4.4 bbb0118acb7c 5 weeks ago 142 MB gcr.io/google_containers/kube-apiserver-amd64 v1.4.4 84998e7ce18f 5 weeks ago 152.1 MB"><pre class="notranslate"><code class="notranslate">root@kubeMaster:~# docker images | grep gcr.io gcr.io/google_containers/pause-amd64 3.0 39a06579e733 3 weeks ago 746.9 kB gcr.io/google_containers/kubedns-amd64 1.7 96fdd723a50d 3 weeks ago 55.06 MB gcr.io/google_containers/kube-dnsmasq-amd64 1.3 2a7c0456186f 3 weeks ago 5.13 MB gcr.io/google_containers/kube-discovery-amd64 1.0 b873a3c6d819 3 weeks ago 134.2 MB gcr.io/google_containers/exechealthz-amd64 1.1 0e2effc928a5 3 weeks ago 8.332 MB gcr.io/google_containers/etcd-amd64 2.2.5 fbabfa0f7ac7 3 weeks ago 30.45 MB gcr.io/google_containers/kube-scheduler-amd64 v1.4.4 ebdf41825f08 5 weeks ago 81.67 MB gcr.io/google_containers/kube-proxy-amd64 v1.4.4 c0fcee70820a 5 weeks ago 202.7 MB gcr.io/google_containers/kube-controller-manager-amd64 v1.4.4 bbb0118acb7c 5 weeks ago 142 MB gcr.io/google_containers/kube-apiserver-amd64 v1.4.4 84998e7ce18f 5 weeks ago 152.1 MB </code></pre></div> <p dir="auto">Docker version:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@kubeMaster:~# docker version Client: Version: 1.12.3 API version: 1.24 Go version: go1.6.3 Git commit: 6b644ec Built: Wed Oct 26 22:01:48 2016 OS/Arch: linux/amd64 Server: Version: 1.12.3 API version: 1.24 Go version: go1.6.3 Git commit: 6b644ec Built: Wed Oct 26 22:01:48 2016 OS/Arch: linux/amd64"><pre class="notranslate"><code class="notranslate">root@kubeMaster:~# docker version Client: Version: 1.12.3 API version: 1.24 Go version: go1.6.3 Git commit: 6b644ec Built: Wed Oct 26 22:01:48 2016 OS/Arch: linux/amd64 Server: Version: 1.12.3 API version: 1.24 Go version: go1.6.3 Git commit: 6b644ec Built: Wed Oct 26 22:01:48 2016 OS/Arch: linux/amd64 </code></pre></div> <p dir="auto">#####Firstly, the <code class="notranslate">kubeadm init </code>blocks due to <code class="notranslate">failed to pull images from gcr.io</code>, so I pull and tag the required images before run <code class="notranslate">kubeadm init</code>. I had successfully setup a cluster in this way several weeks ago. But after some time, I reinstall(on a fresh OS) in the same way but encounter the hangs on problem again. I have tried several times. ##### Any one could help me?</p> <h1 dir="auto"></h1>
0
<ul dir="auto"> <li>[ x] I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">It should not fire the error</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">I'm using custom express server and I'm getting this error page load</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;Home.getInitialProps()&quot; should resolve to an object. But found &quot;undefined&quot; instead."><pre class="notranslate"><code class="notranslate">"Home.getInitialProps()" should resolve to an object. But found "undefined" instead. </code></pre></div> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Use custom express server</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="server.get('/home/:slug', (req, res) =&gt; { const { pathname, query } = parse(req.url, true) return app.render(req, res, '/Faq', { slug: req.params.slug }) })"><pre class="notranslate"><code class="notranslate">server.get('/home/:slug', (req, res) =&gt; { const { pathname, query } = parse(req.url, true) return app.render(req, res, '/Faq', { slug: req.params.slug }) }) </code></pre></div> <ol start="2" dir="auto"> <li>Home component is like this</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default class Faq extends Component { static async getInitialProps ({ req, query }) { console.log(query) } render() { &lt;div&gt; This is home &lt;/div&gt; }"><pre class="notranslate"><code class="notranslate">export default class Faq extends Component { static async getInitialProps ({ req, query }) { console.log(query) } render() { &lt;div&gt; This is home &lt;/div&gt; } </code></pre></div> <ol start="3" dir="auto"> <li>I'm gettting above error</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">I want to render page dynamically as per the slug, without it I'm not able proceed further</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>6.0.2</td> </tr> <tr> <td>node</td> <td>9.2.0</td> </tr> <tr> <td>OS</td> <td>Mac</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/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto"><code class="notranslate">&lt;Link&gt;</code> should produce a working link.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Using <code class="notranslate">&lt;Link&gt;</code> causes an error in console: <code class="notranslate">Did not expect server HTML to contain a &lt;a&gt; in &lt;div&gt;.</code></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li><a href="https://github.com/fschroiff/hello-next">Clone my repo</a>, <code class="notranslate">npm i</code></li> <li>Visit localhost:3000</li> <li>Check console</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">I am using Next.js for the first time. I am actually following the tutorial step for step. I got stuck on <a href="https://nextjs.org/learn/basics/navigate-between-pages/using-link" rel="nofollow">this step</a> ("Using Link").</p> <p dir="auto">(I also noticed that sometimes the environment gets stuck in an infinite reload loop. For example when I added the <code class="notranslate">about.js</code> page. Or when I add and remove the <code class="notranslate">&lt;Link&gt;</code>-tag. That's probably a different issue...)</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>6.0.0</td> </tr> <tr> <td>node</td> <td>v8.9.4</td> </tr> <tr> <td>OS</td> <td>10.13.4</td> </tr> <tr> <td>browser</td> <td>Safari 11.1</td> </tr> <tr> <td>npm</td> <td>5.6.0</td> </tr> <tr> <td>react</td> <td>16.3.2</td> </tr> </tbody> </table>
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/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" checked=""> 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.6</li> <li>Operating System version: win10</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>消费端配置:dubbo.consumer.cluster = failfast</li> <li>启动项目,debug发现使用了failover</li> <li>但是打印出的日志却是failfast</li> <li>换回2.7.5,初始化时用的是 FailfastCluster,调用正常,但是2.7.6,初始化的是FailoverCluster</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">不进行重试</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">重试了2次</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <p dir="auto"><code class="notranslate">[DUBBO] Notify urls for subscribe url consumer://10.1.64.48/com.xxx.remote.crm.service.warn.xxx?application=ai-api-web&amp;category=providers,configurators,routers&amp;check=false&amp;cluster=failfast&amp;dubbo=2.0.2&amp;init=false&amp;interface=com.xxx.remote.crm.service.warn.xxx&amp;metadata-type=remote&amp;methods=xxx&amp;pid=19676&amp;qos.enable=false&amp;release=2.7.6&amp;revision=1.0.0&amp;side=consumer&amp;sticky=false&amp;timeout=1000&amp;timestamp=1588757842211&amp;version=1.0.0, urls: [dubbo://10.1.64.48:20885/com.xxx.remote.crm.service.warn.xxx?anyhost=true&amp;application=service-crm&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;interface=com.xxx.remote.crm.service.warn.xxx&amp;metadata-type=remote&amp;methods=xxx&amp;pid=29572&amp;release=2.7.6&amp;revision=1.0.0&amp;service.filter=remoteServiceExceptionFilter,-exception&amp;side=provider&amp;timeout=10000&amp;timestamp=1588757859274&amp;version=1.0.0], dubbo version: 2.7.6, current host: 10.1.64.48</code></p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.<br> yes</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.<br> yes</li> </ul> <p dir="auto">JMH is a Java harness for building, running, and analysing nano/micro/milli/macro benchmarks written in Java and other languages targetting the JVM.<br> use JMH, some of our code changes will be more convincing</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.18362.175] Any other software? Visual Studio Code Insiders"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.175] Any other software? Visual Studio Code Insiders </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Launch VS Code Insiders.</li> <li>Ensure using conpty with setting: <code class="notranslate">terminal.integrated.windowsEnableConpty</code></li> <li>Open a terminal with Ctrl+`</li> <li>Close the terminal with the trash can icon</li> <li>Repeat 3 and 4 until the window hangs. It takes around 10 retries on my machine.</li> </ol> <h1 dir="auto">Expected behavior</h1> <p dir="auto">No hanging.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">The window hangs. Using windbg, I see the following:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6561887/60627570-4dae2800-9da3-11e9-9ff4-9aefa9ed5b01.png"><img src="https://user-images.githubusercontent.com/6561887/60627570-4dae2800-9da3-11e9-9ff4-9aefa9ed5b01.png" alt="conpty_stack" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6561887/60627571-4dae2800-9da3-11e9-9768-0adfc21f1453.png"><img src="https://user-images.githubusercontent.com/6561887/60627571-4dae2800-9da3-11e9-9768-0adfc21f1453.png" alt="conpty_locals" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6561887/60627572-4dae2800-9da3-11e9-91fd-4279f1d9137d.png"><img src="https://user-images.githubusercontent.com/6561887/60627572-4dae2800-9da3-11e9-91fd-4279f1d9137d.png" alt="conpty_leftovers" style="max-width: 100%;"></a></p> <p dir="auto">Notice the many leftover conhosts in the task manager as well as the hang in ClosePseudoConsole.</p> <p dir="auto">Here is the link to the code in node-pty calling into the PseudoConsole API.<br> <a href="https://github.com/microsoft/node-pty/blob/04445ed76f90b4f56a190982ea2d4fcdd22a0ee7/src/win/conpty.cc#L429">https://github.com/microsoft/node-pty/blob/04445ed76f90b4f56a190982ea2d4fcdd22a0ee7/src/win/conpty.cc#L429</a></p> <p dir="auto">/cc @daimms</p>
<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.18362.10000] Windows Terminal version (if applicable): EARLY PREVIEW BUILD Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.10000] Windows Terminal version (if applicable): EARLY PREVIEW BUILD Any other software? </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Open multiple tabs in the terminal</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">The tabs resize in that way we can see all the tabs o close one</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Many tabs open without been possible closed</p>
0
<p dir="auto">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:127<br> Aug 16 08:11:16.645: Couldn't delete ns "e2e-tests-v1job-gmj3l": namespace e2e-tests-v1job-gmj3l was not deleted within limit: timed out waiting for the condition, pods remaining: []<br> /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:265</p>
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p> <p dir="auto">No</p> <p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p> <h2 dir="auto">kubeadm arm</h2> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p> <p dir="auto">Bug</p> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.3&quot;, GitCommit:&quot;4957b090e9a4f6a68b4a40375408fdc74a212260&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-10-16T06:36:33Z&quot;, GoVersion:&quot;go1.7.1&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/arm&quot;}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.3", GitCommit:"4957b090e9a4f6a68b4a40375408fdc74a212260", GitTreeState:"clean", BuildDate:"2016-10-16T06:36:33Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"linux/arm"} </code></pre></div> <p dir="auto"><strong>Environment</strong>:</p> <p dir="auto">Raspberry Pi 3</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>:</li> <li><strong>OS</strong> (e.g. from /etc/os-release):</li> </ul> <p dir="auto">HypriotOS v 1.0</p> <ul dir="auto"> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li> </ul> <p dir="auto">Linux m10 4.4.15-hypriotos-v7+ <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35192559" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/1" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/1/hovercard" href="https://github.com/kubernetes/kubernetes/issues/1">#1</a> SMP PREEMPT Mon Jul 25 08:46:52 UTC 2016 armv7l GNU/Linux</p> <ul dir="auto"> <li><strong>Install tools</strong>:</li> <li><strong>Others</strong>:</li> </ul> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">Following kubeadm installation docs. I've installed the prereqs and proceeded with the init as follows:</p> <p dir="auto">kubeadm init --use-kubernetes-version v1.4.1 --pod-network-cidr=10.244.0.0/16</p> <p dir="auto">The command is stuck on:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="master/pki&gt; created keys and certificates in &quot;/etc/kubernetes/pki&quot; &lt;util/kubeconfig&gt; created &quot;/etc/kubernetes/kubelet.conf&quot; &lt;util/kubeconfig&gt; created &quot;/etc/kubernetes/admin.conf&quot; &lt;master/apiclient&gt; created API client configuration &lt;master/apiclient&gt; created API client, waiting for the control plane to become ready"><pre class="notranslate"><code class="notranslate">master/pki&gt; created keys and certificates in "/etc/kubernetes/pki" &lt;util/kubeconfig&gt; created "/etc/kubernetes/kubelet.conf" &lt;util/kubeconfig&gt; created "/etc/kubernetes/admin.conf" &lt;master/apiclient&gt; created API client configuration &lt;master/apiclient&gt; created API client, waiting for the control plane to become ready </code></pre></div> <p dir="auto">Looking at docker on this node expecting to see images being installed for etcd, api-server, etc..<br> but docker images reports nothing. Guessing kubeadm is somehow no able to connect with local docker daemon? or the default Hypriot docker configuration is not jiving with kubeadm??</p> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">kubeadm init to complete successfully</p> <p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p> <p dir="auto">o Download Hypriot v1.0 image and flash on SD card<br> o Boot rp with SD card<br> o curl -s <a href="https://packages.cloud.google.com/apt/doc/apt-key.gpg" rel="nofollow">https://packages.cloud.google.com/apt/doc/apt-key.gpg</a> | apt-key add -<br> o cat &lt; /etc/apt/sources.list.d/kubernetes.list<br> deb <a href="http://apt.kubernetes.io/" rel="nofollow">http://apt.kubernetes.io/</a> kubernetes-xenial main<br> EOF<br> o apt-get update<br> o apt-get install -y kubelet kubeadm kubectl kubernetes-cni<br> o kubeadm init --use-kubernetes-version v1.4.1 --pod-network-cidr=10.244.0.0/16</p> <p dir="auto"><strong>Anything else do we need to know</strong>:</p> <p dir="auto">Looking at /etc/kubernetes/manifests shows:</p> <p dir="auto">etcd.json kube-apiserver.json kube-controller-manager.json kube-scheduler.json</p> <p dir="auto">Inspecting journalctl on kubelet shows:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.467776 2787 kubelet_node_status.go:203] Setting node annotation to enable volume controller attach/detach Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.469033 2787 interface.go:248] Default route transits interface &quot;eth0&quot; Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.470261 2787 interface.go:93] Interface eth0 is up Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.471170 2787 interface.go:138] Interface &quot;eth0&quot; has 2 addresses :[192.168.0.92/24 fe80::ba27:ebff:fe24:986f/64]. Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.471484 2787 interface.go:105] Checking addr 192.168.0.92/24. Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.471664 2787 interface.go:114] IP found 192.168.0.92 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.471831 2787 interface.go:144] valid IPv4 address for interface &quot;eth0&quot; found as 192.168.0.92. Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.471960 2787 interface.go:254] Choosing IP 192.168.0.92 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.497415 2787 kubelet_node_status.go:354] Recording NodeHasSufficientDisk event message for node m10 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.497616 2787 kubelet_node_status.go:354] Recording NodeHasSufficientMemory event message for node m10 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.497905 2787 kubelet_node_status.go:354] Recording NodeHasNoDiskPressure event message for node m10 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.498077 2787 kubelet_node_status.go:73] Attempting to register node m10 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.498243 2787 server.go:608] Event(api.ObjectReference{Kind:&quot;Node&quot;, Namespace:&quot;&quot;, Name:&quot;m10&quot;, UID:&quot;m10&quot;, APIVersion:&quot;&quot;, ResourceVersion:&quot;&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'NodeHasSufficientDisk' Node m10 status is now: NodeHasSufficientDisk Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.498554 2787 server.go:608] Event(api.ObjectReference{Kind:&quot;Node&quot;, Namespace:&quot;&quot;, Name:&quot;m10&quot;, UID:&quot;m10&quot;, APIVersion:&quot;&quot;, ResourceVersion:&quot;&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'NodeHasSufficientMemory' Node m10 status is now: NodeHasSufficientMemory Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.498823 2787 server.go:608] Event(api.ObjectReference{Kind:&quot;Node&quot;, Namespace:&quot;&quot;, Name:&quot;m10&quot;, UID:&quot;m10&quot;, APIVersion:&quot;&quot;, ResourceVersion:&quot;&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'NodeHasNoDiskPressure' Node m10 status is now: NodeHasNoDiskPressure Oct 26 17:19:31 m10 kubelet[2787]: E1026 17:19:31.501189 2787 kubelet_node_status.go:97] Unable to register node &quot;m10&quot; with API server: Post https://192.168.0.92:443/api/v1/nodes: dial tcp 192.168.0.92:443: getsockopt: connection refused Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.527656 2787 reflector.go:249] Listing and watching *api.Pod from pkg/kubelet/config/apiserver.go:43 Oct 26 17:19:31 m10 kubelet[2787]: E1026 17:19:31.531088 2787 reflector.go:203] pkg/kubelet/config/apiserver.go:43: Failed to list *api.Pod: Get https://192.168.0.92:443/api/v1/pods?fieldSelector=spec.nodeName%3Dm10&amp;resourceVersion=0: dial tcp 192.168.0.92:443: getsockopt: connection refused Oct 26 17:19:32 m10 kubelet[2787]: I1026 17:19:32.416745 2787 reflector.go:249] Listing and watching *api.Service from pkg/kubelet/kubelet.go:384 Oct 26 17:19:32 m10 kubelet[2787]: E1026 17:19:32.418995 2787 reflector.go:203] pkg/kubelet/kubelet.go:384: Failed to list *api.Service: Get https://192.168.0.92:443/api/v1/services?resourceVersion=0: dial tcp 192.168.0.92:443: getsockopt: connection refused Oct 26 17:19:32 m10 kubelet[2787]: I1026 17:19:32.455119 2787 reflector.go:249] Listing and watching *api.Node from pkg/kubelet/kubelet.go:403 Oct 26 17:19:32 m10 kubelet[2787]: E1026 17:19:32.457560 2787 reflector.go:203] pkg/kubelet/kubelet.go:403: Failed to list *api.Node: Get https://192.168.0.92:443/api/v1/nodes?fieldSelector=metadata.name%3Dm10&amp;resourceVersion=0: dial tcp 192.168.0.92:443: getsockopt: connection refused Oct 26 17:19:32 m10 kubelet[2787]: I1026 17:19:32.531641 2787 reflector.go:249] Listing and watching *api.Pod from pkg/kubelet/config/apiserver.go:43 Oct 26 17:19:32 m10 kubelet[2787]: E1026 17:19:32.534040 2787 reflector.go:203] pkg/kubelet/config/apiserver.go:43: Failed to list *api.Pod: Get https://192.168.0.92:443/api/v1/pods?fieldSelector=spec.nodeName%3Dm10&amp;resourceVersion=0: dial tcp 192.168.0.92:443: getsockopt: connection refused Oct 26 17:19:33 m10 kubelet[2787]: I1026 17:19:33.419424 2787 reflector.go:249] Listing and watching *api.Service from pkg/kubelet/kubelet.go:384 Oct 26 17:19:33 m10 kubelet[2787]: E1026 17:19:33.421922 2787 reflector.go:203] pkg/kubelet/kubelet.go:384: Failed to list *api.Service: Get https://192.168.0.92:443/api/v1/services?resourceVersion=0: dial tcp 192.168.0.92:443: getsockopt: connection refused"><pre class="notranslate"><code class="notranslate">Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.467776 2787 kubelet_node_status.go:203] Setting node annotation to enable volume controller attach/detach Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.469033 2787 interface.go:248] Default route transits interface "eth0" Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.470261 2787 interface.go:93] Interface eth0 is up Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.471170 2787 interface.go:138] Interface "eth0" has 2 addresses :[192.168.0.92/24 fe80::ba27:ebff:fe24:986f/64]. Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.471484 2787 interface.go:105] Checking addr 192.168.0.92/24. Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.471664 2787 interface.go:114] IP found 192.168.0.92 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.471831 2787 interface.go:144] valid IPv4 address for interface "eth0" found as 192.168.0.92. Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.471960 2787 interface.go:254] Choosing IP 192.168.0.92 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.497415 2787 kubelet_node_status.go:354] Recording NodeHasSufficientDisk event message for node m10 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.497616 2787 kubelet_node_status.go:354] Recording NodeHasSufficientMemory event message for node m10 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.497905 2787 kubelet_node_status.go:354] Recording NodeHasNoDiskPressure event message for node m10 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.498077 2787 kubelet_node_status.go:73] Attempting to register node m10 Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.498243 2787 server.go:608] Event(api.ObjectReference{Kind:"Node", Namespace:"", Name:"m10", UID:"m10", APIVersion:"", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'NodeHasSufficientDisk' Node m10 status is now: NodeHasSufficientDisk Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.498554 2787 server.go:608] Event(api.ObjectReference{Kind:"Node", Namespace:"", Name:"m10", UID:"m10", APIVersion:"", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'NodeHasSufficientMemory' Node m10 status is now: NodeHasSufficientMemory Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.498823 2787 server.go:608] Event(api.ObjectReference{Kind:"Node", Namespace:"", Name:"m10", UID:"m10", APIVersion:"", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'NodeHasNoDiskPressure' Node m10 status is now: NodeHasNoDiskPressure Oct 26 17:19:31 m10 kubelet[2787]: E1026 17:19:31.501189 2787 kubelet_node_status.go:97] Unable to register node "m10" with API server: Post https://192.168.0.92:443/api/v1/nodes: dial tcp 192.168.0.92:443: getsockopt: connection refused Oct 26 17:19:31 m10 kubelet[2787]: I1026 17:19:31.527656 2787 reflector.go:249] Listing and watching *api.Pod from pkg/kubelet/config/apiserver.go:43 Oct 26 17:19:31 m10 kubelet[2787]: E1026 17:19:31.531088 2787 reflector.go:203] pkg/kubelet/config/apiserver.go:43: Failed to list *api.Pod: Get https://192.168.0.92:443/api/v1/pods?fieldSelector=spec.nodeName%3Dm10&amp;resourceVersion=0: dial tcp 192.168.0.92:443: getsockopt: connection refused Oct 26 17:19:32 m10 kubelet[2787]: I1026 17:19:32.416745 2787 reflector.go:249] Listing and watching *api.Service from pkg/kubelet/kubelet.go:384 Oct 26 17:19:32 m10 kubelet[2787]: E1026 17:19:32.418995 2787 reflector.go:203] pkg/kubelet/kubelet.go:384: Failed to list *api.Service: Get https://192.168.0.92:443/api/v1/services?resourceVersion=0: dial tcp 192.168.0.92:443: getsockopt: connection refused Oct 26 17:19:32 m10 kubelet[2787]: I1026 17:19:32.455119 2787 reflector.go:249] Listing and watching *api.Node from pkg/kubelet/kubelet.go:403 Oct 26 17:19:32 m10 kubelet[2787]: E1026 17:19:32.457560 2787 reflector.go:203] pkg/kubelet/kubelet.go:403: Failed to list *api.Node: Get https://192.168.0.92:443/api/v1/nodes?fieldSelector=metadata.name%3Dm10&amp;resourceVersion=0: dial tcp 192.168.0.92:443: getsockopt: connection refused Oct 26 17:19:32 m10 kubelet[2787]: I1026 17:19:32.531641 2787 reflector.go:249] Listing and watching *api.Pod from pkg/kubelet/config/apiserver.go:43 Oct 26 17:19:32 m10 kubelet[2787]: E1026 17:19:32.534040 2787 reflector.go:203] pkg/kubelet/config/apiserver.go:43: Failed to list *api.Pod: Get https://192.168.0.92:443/api/v1/pods?fieldSelector=spec.nodeName%3Dm10&amp;resourceVersion=0: dial tcp 192.168.0.92:443: getsockopt: connection refused Oct 26 17:19:33 m10 kubelet[2787]: I1026 17:19:33.419424 2787 reflector.go:249] Listing and watching *api.Service from pkg/kubelet/kubelet.go:384 Oct 26 17:19:33 m10 kubelet[2787]: E1026 17:19:33.421922 2787 reflector.go:203] pkg/kubelet/kubelet.go:384: Failed to list *api.Service: Get https://192.168.0.92:443/api/v1/services?resourceVersion=0: dial tcp 192.168.0.92:443: getsockopt: connection refused </code></pre></div>
0
<p dir="auto">0 info it worked if it ends with ok<br> 1 verbose cli [<br> 1 verbose cli '/usr/local/Cellar/node/13.12.0/bin/node',<br> 1 verbose cli '/usr/local/bin/npm',<br> 1 verbose cli 'i',<br> 1 verbose cli 'react-player'<br> 1 verbose cli ]<br> 2 info using npm@6.14.4<br> 3 info using node@v13.12.0<br> 4 verbose npm-session 7a90fc0402509a7a<br> 5 silly install loadCurrentTree<br> 6 silly install readLocalPackageData<br> 7 warn registry Unexpected warning for <a href="https://registry.npmjs.org/" rel="nofollow">https://registry.npmjs.org/</a>: Miscellaneous Warning undefined: network timeout at: <a href="https://registry.npmjs.org/react-player" rel="nofollow">https://registry.npmjs.org/react-player</a><br> 8 warn registry Using stale data from <a href="https://registry.npmjs.org/" rel="nofollow">https://registry.npmjs.org/</a> due to a request error during revalidation.<br> 9 http fetch GET 200 <a href="https://registry.npmjs.org/react-player" rel="nofollow">https://registry.npmjs.org/react-player</a> 160110ms (from cache)<br> 10 timing npm Completed in 235562ms<br> 11 error cb() never called!<br> 12 error This is an error with npm itself. Please report this error at:<br> 13 error <a href="https://npm.community" rel="nofollow">https://npm.community</a></p>
<h3 dir="auto">*Updated* as of 01/15/2021</h3> <p dir="auto"><strong>Note: Please read <a href="https://github.com/npm/cli/wiki/%22cb()-never-called%3F-Exit-handler-never-called%3F-I'm-having-the-same-problem!%22">this doc</a> before filing a new issue.</strong></p>
1
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-comment-your-javascript-code" rel="nofollow">http://freecodecamp.com/challenges/waypoint-comment-your-javascript-code</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">Can get thru Basic Javascript 1 thru 8 , but the all have these kins of errors under where you reset the code.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/13633227/9424263/1b03315e-489b-11e5-87d7-27c2b3ff767e.png"><img src="https://cloud.githubusercontent.com/assets/13633227/9424263/1b03315e-489b-11e5-87d7-27c2b3ff767e.png" alt="screen shot 2015-08-22 at 6 55 20 am" style="max-width: 100%;"></a></p> <p dir="auto">thanks!</p>
<p dir="auto">Cleared to go to next challenge while teh tasks listed were still showing red X circles instead of check mark of completion.</p>
0
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">Just tested in Atom-Typescript which currently has <code class="notranslate">master</code> as of <code class="notranslate">2016-02-23</code> <a href="https://github.com/TypeStrong/atom-typescript/blob/8d43dd1b930a6df0ce62454a1560acfb7eee24c9/package.json#L64">https://github.com/TypeStrong/atom-typescript/blob/8d43dd1b930a6df0ce62454a1560acfb7eee24c9/package.json#L64</a></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="import * as React from &quot;react&quot;; import * as ReactDOM from &quot;react-dom&quot;; const Hello = (props: { compiler: string, framework: string }) =&gt; { return ( &lt;div&gt; &lt;div&gt;{props.compiler}&lt;/div&gt; &lt;div&gt;{props.framework}&lt;/div&gt; &lt;/div&gt; ); } ReactDOM.render( &lt;Hello compiler=&quot;TypeScript&quot; framework=&quot;React&quot; /&gt;, document.getElementById(&quot;root&quot;) );"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-smi">React</span> <span class="pl-k">from</span> <span class="pl-s">"react"</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-smi">ReactDOM</span> <span class="pl-k">from</span> <span class="pl-s">"react-dom"</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-smi">Hello</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">props</span>: <span class="pl-kos">{</span> <span class="pl-c1">compiler</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-c1">framework</span>: <span class="pl-smi">string</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-kos">&lt;</span><span class="pl-smi">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-smi">div</span><span class="pl-kos">&gt;</span><span class="pl-kos">{</span><span class="pl-s1">props</span><span class="pl-kos">.</span>compiler<span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-pds"><span class="pl-c1">/</span>div&gt;</span><span class="pl-c1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">div</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-s1">props</span><span class="pl-kos">.</span>framework<span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-pds"><span class="pl-c1">/</span>div&gt;</span> <span class="pl-pds"> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span>div</span><span class="pl-c1">&gt;</span><span class="pl-s1"></span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-smi">ReactDOM</span><span class="pl-kos">.</span><span class="pl-c1">render</span><span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-smi">Hello</span> <span class="pl-smi">compiler</span><span class="pl-c1">=</span><span class="pl-s">"TypeScript"</span> <span class="pl-s1">framework</span><span class="pl-c1">=</span><span class="pl-s">"React"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-kos">,</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">"root"</span><span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Expected behavior:</strong><br> Rename <code class="notranslate">Hello</code> in <code class="notranslate">const Hello</code> to <code class="notranslate">Hellos</code> and <code class="notranslate">&lt;Hello</code> should update to <code class="notranslate">&lt;Hellos</code>.</p> <p dir="auto"><strong>Actual behavior:</strong><br> Rename <code class="notranslate">Hello</code> in <code class="notranslate">const Hello</code> to <code class="notranslate">Hellos</code> and <code class="notranslate">&lt;Hello</code> will not update.</p> <h1 dir="auto">More</h1> <p dir="auto">I was using this as a sample for <a href="https://github.com/basarat/react-typescript">https://github.com/basarat/react-typescript</a> <g-emoji class="g-emoji" alias="rose" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f339.png">🌹</g-emoji></p>
<p dir="auto">When adding JSDoc to an overloaded function, It seems that the JSDoc comment must immediately precede the actual function. When preceding the list of overloads, the JSDoc comment is dropped after compilation.</p> <p dir="auto">Example:</p> <p dir="auto">module app {</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/** * Returns &quot;foo&quot; * * this doesn't output. */ export function foo(x: string): string; export function foo(x: number): string; export function foo(x: any): string { return &quot;foo&quot;; } export function bar(x: string): string; export function bar(x: number): string; /** * Returns &quot;bar&quot; * * this will output. but I don't like my overloads detached. */ export function bar(x: any): string { return &quot;bar&quot;; }"><pre class="notranslate"><code class="notranslate">/** * Returns "foo" * * this doesn't output. */ export function foo(x: string): string; export function foo(x: number): string; export function foo(x: any): string { return "foo"; } export function bar(x: string): string; export function bar(x: number): string; /** * Returns "bar" * * this will output. but I don't like my overloads detached. */ export function bar(x: any): string { return "bar"; } </code></pre></div> <p dir="auto">}</p>
0
<p dir="auto">Hi,</p> <p dir="auto">I'm trying out to create a Dropdown nav bar, but the Dropdown menu is not visible. Can anyone help me?</p> <p dir="auto">Here is my code:</p> <p dir="auto"><a href="http://jsfiddle.net/t0m4h4wk/mEevs/" rel="nofollow">http://jsfiddle.net/t0m4h4wk/mEevs/</a></p> <p dir="auto">Thank you very much!</p> <p dir="auto">t0m4h4wk</p> <p dir="auto">PS: Please forgive me my english, I'm german ;)</p>
<p dir="auto">I used to customize button colors using <code class="notranslate">.gradientBar</code> mixin... now it appears that I have to use <code class="notranslate">.buttonBackground</code> mixin to customize my own button types/colors. Could you move it from <code class="notranslate">buttons.less</code> to <code class="notranslate">mixins.less</code> so that I do not have to copy it from <code class="notranslate">buttons.less</code> to my own stylesheet file?</p>
0
<p dir="auto">Would be nice to have a core directive to create generic variable contexts at the template.</p> <p dir="auto">Example of implementation:<br> <a href="https://gist.github.com/willgm/ffe653a49f36997881575df2e93979bc">https://gist.github.com/willgm/ffe653a49f36997881575df2e93979bc</a></p> <p dir="auto">This has some benefits like:</p> <ul dir="auto"> <li>Shortcuts for long data structures and/or constant use of pipes:</li> </ul> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;ul *context=&quot;let user on my?.long?.data?.structure?.with?.user | json&quot;&gt; &lt;li&gt;{{user.name}}&lt;/li&gt; &lt;li&gt;{{user.age}}&lt;/li&gt; &lt;li&gt;{{user.email}}&lt;/li&gt; &lt;/ul&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">ul</span> <span class="pl-c1">*context</span>="<span class="pl-s">let user on my?.long?.data?.structure?.with?.user | json</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>{{user.name}}<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>{{user.age}}<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>{{user.email}}<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">ul</span><span class="pl-kos">&gt;</span></pre></div> <ul dir="auto"> <li>Avoid multiple observer subscriptions at the same template:</li> </ul> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;ul *context=&quot;let user on user$ | async&quot;&gt; &lt;li&gt;{{user.name}}&lt;/li&gt; &lt;li&gt;{{user.age}}&lt;/li&gt; &lt;li&gt;{{user.email}}&lt;/li&gt; &lt;/ul&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">ul</span> <span class="pl-c1">*context</span>="<span class="pl-s">let user on user$ | async</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>{{user.name}}<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>{{user.age}}<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span>{{user.email}}<span class="pl-kos">&lt;/</span><span class="pl-ent">li</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">ul</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong><br> I'm using Angular 4.0.0 with Webpack 2.3.2 and I get some warnings for the angular core:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/23058331/24397663/4818c798-13a7-11e7-8cd9-0250235085d2.png"><img src="https://cloud.githubusercontent.com/assets/23058331/24397663/4818c798-13a7-11e7-8cd9-0250235085d2.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Expected behavior</strong><br> No warnings would be nice :)</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br> I think the warnings appear as soon as you try to use webpack 2 in addition with angular 4. So simply setup a angular project with webpack 2.</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <p dir="auto">I use npm along with the lite server for development on a Windows machine</p> <ul dir="auto"> <li><strong>Angular version:</strong> 4.0.0.</li> </ul> <ul dir="auto"> <li><strong>Language:</strong> [TypeScript 2.2.1]</li> </ul>
0
<p dir="auto"><code class="notranslate">unique()</code> and <code class="notranslate">type()</code> functions are not available in the nodes from <code class="notranslate">graph.nodes()</code> of <code class="notranslate">jit.trace</code>. I used to fetch those before some upgrade I made recently. As <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/apaszke/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/apaszke">@apaszke</a> suggested, It should be present in the internal data structure but the new upgrade just removed it from python scope</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for val in trace.graph().nodes(): print(val.unique()) # doesn't have unique for input_node in val.inputs(): print(input_node.unique()) # has unique"><pre class="notranslate"><code class="notranslate">for val in trace.graph().nodes(): print(val.unique()) # doesn't have unique for input_node in val.inputs(): print(input_node.unique()) # has unique </code></pre></div>
<p dir="auto">It seems PyTorch loads the .so using RTLD_GLOBAL which exports many symbols into shared namespace. This can causes crashes when another library is using different version of the symbol with the same name.</p> <p dir="auto">In particular, doing <code class="notranslate">import torch; import tensorflow</code> will crash because pytorch .so is exposing <code class="notranslate">pthread</code> symbols<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="264379088" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/13615" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/13615/hovercard?comment_id=335641777&amp;comment_type=issue_comment" href="https://github.com/tensorflow/tensorflow/issues/13615#issuecomment-335641777">tensorflow/tensorflow#13615 (comment)</a></p> <p dir="auto">TensorFlow recently switched away from RTLD_GLOBAL in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/5c7f9e31/hovercard" href="https://github.com/tensorflow/tensorflow/commit/5c7f9e31">tensorflow/tensorflow@<tt>5c7f9e31</tt></a></p>
0
<pre class="notranslate">Consider special-casing timer channels created with time.Ticker and time.After. Namely, such chans need to contain next fire time and period. Then receive from such looks like: func chanrecv(c *Hchan) { ... if c.isTimeChan { for { next := c.nextTime if next == -1 { // already fired one-time timer blockForever() } newTime := -1 if c.period != 0 { newTime = next + c.period } if CAS(&amp;c.nextTime, next, newTime) { wait := next - now if wait &gt; 0 { sleepFor(wait) } return } } } ... } This has several advantages: 1. No need to stop timers. If nobody waits on a timers, it's just a normal heap object that can be garbage collected. 2. Faster operation for both blocking and non-blocking case. 3. Faster selects involving time chans. 4. Can combine time.Ticker/After into a single allocation.</pre>
<p dir="auto">After almost a decade, I have <strong><em>finally</em></strong> implemented <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="51288843" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/8898" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/8898/hovercard" href="https://github.com/golang/go/issues/8898">#8898</a>, special-casing the channels used for timers (or maybe the timers used for channels) so that the timers are not in the timer heap when there are no channel operations pending on them. This means that the channels and timers can be GC'ed once they are no longer referenced, without having to wait for a timer to expire or explicitly Stop the timer. (By timer here I mean the data structure used by time.After, time.NewTimer, and time.NewTicker.)</p> <p dir="auto">This raises a question: do we want to guarantee that all future versions of Go will provide this behavior, so that code can rely on not needing to call the Stop methods? I think we probably should make that guarantee.</p> <p dir="auto">I propose we land my CL and document that After can be used without concern for GC and that NewTimer and NewTicker can be used without concern for deferring Stop just for GC. At the moment the doc comment for After describes the problem and basically says "don't use this function a lot". If we accept this proposal, we can remove that text. NewTimer and NewTicker do not mention needing to call Stop, although it is implied by After's doc comment. If we accept this proposal, we can document that Stop is not necessary for GC, so that people can stop calling Stop.</p>
1
<p dir="auto">One of the nice features of the simple query parser is that it is possible to only enable certain operators. It allows to do quite interesting things.</p> <p dir="auto">For example, if you are using the keyword analyzer and disable the whitespace operator, <code class="notranslate">the fox | jumped over</code> would be parsed into <code class="notranslate">the fox</code> OR <code class="notranslate">jumped over</code> (<code class="notranslate">the fox</code> would actually be treated as a single token).</p> <p dir="auto">One could also prevent users from running too expensive queries that could kill the cluster such as prefix queries.</p>
<p dir="auto">The <code class="notranslate">simple_query_string</code> query allows the user to enable/disable parts of the syntax, eg prefixes, phrases etc.</p> <p dir="auto">I think it makes sense to support the full syntax by default, but to allow the user to disable the parts that they don't want, eg:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;simple_query_string&quot;: { &quot;query&quot;: &quot;....&quot;, &quot;disable&quot;: &quot;PREFIX|PHRASE&quot; }"><pre class="notranslate"><code class="notranslate">"simple_query_string": { "query": "....", "disable": "PREFIX|PHRASE" } </code></pre></div> <p dir="auto">... in a similar way that we do with <code class="notranslate">flags</code> in the regexp query/filter</p>
1
<p dir="auto">I wrote some code to index/percolate documents, and I have a unit test that creates an index (with a random name) then runs my indexations / search code, then deletes the index. This means that I have percolators with identical IDs in different indexes.</p> <p dir="auto">When I percolate my documents, I specify a query string for the percolators :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="testindex-2b086e73/doc/a889db29-2409-4174-9425-818eb7293b57?percolate=SourceId:1"><pre class="notranslate"><code class="notranslate">testindex-2b086e73/doc/a889db29-2409-4174-9425-818eb7293b57?percolate=SourceId:1 </code></pre></div> <p dir="auto">And then the result contains duplicate percolator IDs, as if the index name was ignored :</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;ok&quot; : true, &quot;_index&quot; : &quot;testindex-17eecc11&quot;, &quot;_type&quot; : &quot;doc&quot;, &quot;_id&quot; : &quot;824f26e4-76a6-4b66-9cb2-f3adc0103586&quot;, &quot;_version&quot; : 1, &quot;matches&quot; : [&quot;1.789&quot;, &quot;1.789&quot;, &quot;1.789&quot;] }"><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">"_index"</span> : <span class="pl-s">"testindex-17eecc11"</span><span class="pl-kos">,</span> <span class="pl-s">"_type"</span> : <span class="pl-s">"doc"</span><span class="pl-kos">,</span> <span class="pl-s">"_id"</span> : <span class="pl-s">"824f26e4-76a6-4b66-9cb2-f3adc0103586"</span><span class="pl-kos">,</span> <span class="pl-s">"_version"</span> : <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-s">"matches"</span> : <span class="pl-kos">[</span><span class="pl-s">"1.789"</span><span class="pl-kos">,</span> <span class="pl-s">"1.789"</span><span class="pl-kos">,</span> <span class="pl-s">"1.789"</span><span class="pl-kos">]</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">But when I don't specify a query for the percolators (?percolate=*) the result only contains one ID as expected.</p> <p dir="auto"><strong>Edit:</strong><br> I feel like it's an intended behavior in (<a href="https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/percolator/PercolatorExecutor.java#L345">https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/percolator/PercolatorExecutor.java#L345</a>) is it? If yes, how do I filter percolators only on one documenttype/index?</p>
<p dir="auto">The current synonym token filter behaviour of <em>replacing</em> the token with the synonym doesn't work well with the completion suggester.</p> <p dir="auto">An option to keep the original token would be helpful.</p> <p dir="auto">Background:</p> <p dir="auto">For synonyms to work well with the completion suggester it's important to define synonyms that map to longer tokens, i.e. <code class="notranslate">ne =&gt; north east</code>. (If the synonym mapping was an equivalence instead, such as <code class="notranslate">ne, north east</code>, then someone entering 'north east' would get suggestions for all completions that begin with <code class="notranslate">ne</code> such as <code class="notranslate">neck</code>.)</p> <p dir="auto">However, when a user enters "ne" they no longer get suggestions that start with "ne". They only get suggestions that start with "north east".</p> <p dir="auto">A workaround is to explicitly include the short form in the synonym mapping: <code class="notranslate">ne =&gt; north east, ne</code>.</p> <p dir="auto">However, that becomes painful to setup and maintain because a single mapping like <code class="notranslate">exp, expr, express, expw, expy =&gt; expressway</code> now has to be written out as five separate mappings!</p> <p dir="auto">I think a simple fix would be to add an option to make the synonym token filter <em>add</em> synonyms instead of <em>replacing</em> the original. Need only apply to the last token in the stream.</p>
0
<p dir="auto">Hi, I am facing a problem when I want to read the value of an input that have suggestions from datalist, the value that I get from the input is only what I type with the keyboard not the selected value, i’ll give an example to explain better, for the HTML bellow, if I type ‘on’ than I select the suggestion which is ‘111’ when I try to read the value of the input (document.getElementById(“num”).value) I get ‘on’ instead of ‘111’, any suggestions to fix it??<br> <code class="notranslate">&lt;input type="text" list="numbrs" id="num"&gt; &lt;datalist id="numbrs"&gt; &lt;option value="111"&gt;One&lt;/option&gt; &lt;option value="222"&gt;two&lt;/option&gt; &lt;/datalist&gt;</code></p>
<ul dir="auto"> <li>Electron version: 1.6.2</li> <li>Operating system: Windows 10 64Bit</li> </ul> <h3 dir="auto">Expected behavior</h3> <p dir="auto">Finish the process and that all files are installed</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">The Python Script crashes and throws lots of Errors</p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">I have Visual Studio 2017 installed!!! (I can't get 2015 anywhere)<br> I use Python 2.7!!!<br> I tried it with multiple consoles! (Hyper, Git Bash, Bash, Admin Bash, PowerShell)</p> <p dir="auto">$ cd electron<br> $ python script/bootstrap.py</p> <h3 dir="auto">Console Output</h3> <p dir="auto">git submodule status vendor/libchromiumcontent<br> <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/electron/electron/commit/a3cff052273b659702c6a8728e28a3b45659cd76/hovercard" href="https://github.com/electron/electron/commit/a3cff052273b659702c6a8728e28a3b45659cd76"><tt>a3cff05</tt></a> vendor/libchromiumcontent (v51.0.2704.61-323-ga3cff05)</p> <p dir="auto">C:\Python27\python.exe C:\Users\user\Documents\electron\script\update.py<br> Das System kann den angegebenen Pfad nicht finden.<br> Traceback (most recent call last):<br> File "vendor\gyp\gyp_main.py", line 16, in <br> sys.exit(gyp.script_main())<br> File "vendor\gyp\pylib\gyp_<em>init</em>_.py", line 545, in script_main<br> return main(sys.argv[1:])<br> File "vendor\gyp\pylib\gyp_<em>init</em>_.py", line 538, in main<br> return gyp_main(args)<br> File "vendor\gyp\pylib\gyp_<em>init</em>_.py", line 514, in gyp_main<br> options.duplicate_basename_check)<br> File "vendor\gyp\pylib\gyp_<em>init</em>_.py", line 98, in Load<br> generator.CalculateVariables(default_variables, params)<br> File "vendor\gyp\pylib\gyp\generator\ninja.py", line 1685, in CalculateVariables<br> gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)<br> File "vendor\gyp\pylib\gyp\msvs_emulation.py", line 1083, in CalculateCommonVariables<br> msvs_version = gyp.msvs_emulation.GetVSVersion(generator_flags)<br> File "vendor\gyp\pylib\gyp\msvs_emulation.py", line 934, in GetVSVersion<br> allow_fallback=False)<br> File "vendor\gyp\pylib\gyp\MSVSVersion.py", line 447, in SelectVisualStudioVersion<br> raise ValueError('Could not locate Visual Studio installation.')<br> ValueError: Could not locate Visual Studio installation.<br> None<br> Traceback (most recent call last):<br> File "script\bootstrap.py", line 299, in <br> sys.exit(main())<br> File "script\bootstrap.py", line 67, in main<br> run_update(defines, args.msvs)<br> File "script\bootstrap.py", line 270, in run_update<br> execute_stdout(args)<br> File "C:\Users\user\Documents\electron\script\lib\util.py", line 181, in execute_stdout<br> raise e<br> subprocess.CalledProcessError: Command '['C:\Python27\python.exe', 'C:\Users\user\Documents\electron\script\update.py']' returned non-zero exit status 1</p>
0
<p dir="auto">I have a <code class="notranslate">Dialog</code> component being triggered by onClick of a <code class="notranslate">MenuItem</code>. It opens correctly. But when I try to close the dialog (either via click on backdrop or on close button) the dialog is not correctly dismissed.<br> <strong>This only happens if you use a transition (Slide).</strong></p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">I would expect the modal to be closed correctly. <g-emoji class="g-emoji" alias="grin" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f601.png">😁</g-emoji></p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">The CSS classes and the DOM modal element aren't removed, so the rest of the sites UI is not clickable anymore.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8998518/32415129-d9c81f18-c234-11e7-90b5-322524cc96dd.png"><img width="455" alt="bildschirmfoto 2017-11-05 um 14 22 52" src="https://user-images.githubusercontent.com/8998518/32415129-d9c81f18-c234-11e7-90b5-322524cc96dd.png" style="max-width: 100%;"></a></p> Element which is created by the dialog but not removed on its close <h2 dir="auto">Steps to Reproduce</h2> <p dir="auto"><a href="https://codesandbox.io/s/yk4o713j8x" rel="nofollow"><img src="https://camo.githubusercontent.com/90808661433696bc57dce8d4ad732307b5cec6270e6b846f114dcd7ee7f9458a/68747470733a2f2f636f646573616e64626f782e696f2f7374617469632f696d672f706c61792d636f646573616e64626f782e737667" alt="Edit dialog not dismissed bug" data-canonical-src="https://codesandbox.io/static/img/play-codesandbox.svg" style="max-width: 100%;"></a></p> <h2 dir="auto">Context</h2> <p dir="auto">This problem makes the UI not useable anymore. I think it is a mandatory feature to toggle dialogs from menus.</p> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0.0-beta.19</td> </tr> <tr> <td>React</td> <td>16.0.0</td> </tr> <tr> <td>browser</td> <td>Firefox, Chrome, Safari (all most recent releases)</td> </tr> <tr> <td>etc</td> <td>macOS 13.10.31.1, Windows 10</td> </tr> </tbody> </table>
<p dir="auto">My app break after updated to latest beta.</p> <p dir="auto">The dialog always shown. Previous version beta 18 don't have this issue</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" &lt;Drawer open={false} type={window.innerWidth &lt; 768 ? 'responsive' : 'persistent'} anchor=&quot;right&quot; classes={{ paper: classes.paper, docked: classes.docked }} &gt; /// content &lt;/Drawer&gt;"><pre class="notranslate"> <span class="pl-c1">&lt;</span><span class="pl-ent">Drawer</span> <span class="pl-c1">open</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">false</span><span class="pl-kos">}</span> <span class="pl-c1">type</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">innerWidth</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">768</span> ? <span class="pl-s">'responsive'</span> : <span class="pl-s">'persistent'</span><span class="pl-kos">}</span> <span class="pl-c1">anchor</span><span class="pl-c1">=</span><span class="pl-s">"right"</span> <span class="pl-c1">classes</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">{</span> <span class="pl-c1">paper</span>: <span class="pl-s1">classes</span><span class="pl-kos">.</span><span class="pl-c1">paper</span><span class="pl-kos">,</span> <span class="pl-c1">docked</span>: <span class="pl-s1">classes</span><span class="pl-kos">.</span><span class="pl-c1">docked</span> <span class="pl-kos">}</span><span class="pl-kos">}</span> <span class="pl-c1">&gt;</span> /// content <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">Drawer</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">I've tried to set open to false still show the drawer.</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-19 beta</td> </tr> <tr> <td>React</td> <td>16</td> </tr> <tr> <td>browser</td> <td>Chrome</td> </tr> <tr> <td>etc</td> <td>Windows 10</td> </tr> </tbody> </table>
1
<p dir="auto">I'm currently debugging why a particular test suite takes 26s in Deno when it should be faster. Noticed that we spend about 55% of the time on the <code class="notranslate">realpath</code> syscall. The majority of those are coming from <code class="notranslate">ensure_registry_read_permission</code> which tends to trigger two <code class="notranslate">realpath</code> syscalls pretty frequently.</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/denoland/deno/blob/d43e75cbb204e3537bd008e3b2a22d7de89a6f4c/cli/npm/resolvers/common.rs#L93-L120">deno/cli/npm/resolvers/common.rs</a> </p> <p class="mb-0 color-fg-muted"> Lines 93 to 120 in <a data-pjax="true" class="commit-tease-sha" href="/denoland/deno/commit/d43e75cbb204e3537bd008e3b2a22d7de89a6f4c">d43e75c</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="L93" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="93"></td> <td id="LC93" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">ensure_registry_read_permission</span><span class="pl-kos">(</span> </td> </tr> <tr class="border-0"> <td id="L94" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="94"></td> <td id="LC94" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">fs</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Arc</span><span class="pl-kos">&lt;</span><span class="pl-k">dyn</span> <span class="pl-smi">FileSystem</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> </td> </tr> <tr class="border-0"> <td id="L95" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="95"></td> <td id="LC95" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">permissions</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-k">dyn</span> <span class="pl-smi">NodePermissions</span><span class="pl-kos">,</span> </td> </tr> <tr class="border-0"> <td id="L96" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="96"></td> <td id="LC96" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">registry_path</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Path</span><span class="pl-kos">,</span> </td> </tr> <tr class="border-0"> <td id="L97" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="97"></td> <td id="LC97" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">path</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Path</span><span class="pl-kos">,</span> </td> </tr> <tr class="border-0"> <td id="L98" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="98"></td> <td id="LC98" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">)</span> -&gt; <span class="pl-smi">Result</span><span class="pl-kos">&lt;</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-smi">AnyError</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> </td> </tr> <tr class="border-0"> <td id="L99" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="99"></td> <td id="LC99" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// allow reading if it's in the node_modules</span> </td> </tr> <tr class="border-0"> <td id="L100" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="100"></td> <td id="LC100" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> path<span class="pl-kos">.</span><span class="pl-en">starts_with</span><span class="pl-kos">(</span>registry_path<span class="pl-kos">)</span> </td> </tr> <tr class="border-0"> <td id="L101" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="101"></td> <td id="LC101" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> &amp;&amp; path </td> </tr> <tr class="border-0"> <td id="L102" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="102"></td> <td id="LC102" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">.</span><span class="pl-en">components</span><span class="pl-kos">(</span><span class="pl-kos">)</span> </td> </tr> <tr class="border-0"> <td id="L103" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="103"></td> <td id="LC103" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">.</span><span class="pl-en">all</span><span class="pl-kos">(</span>|c| !<span class="pl-en">matches</span><span class="pl-en">!</span><span class="pl-kos">(</span>c, std::path::<span class="pl-v">Component</span>::<span class="pl-v">ParentDir</span><span class="pl-kos">)</span><span class="pl-kos">)</span> </td> </tr> <tr class="border-0"> <td id="L104" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="104"></td> <td id="LC104" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">{</span> </td> </tr> <tr class="border-0"> <td id="L105" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="105"></td> <td id="LC105" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// todo(dsherret): cache this?</span> </td> </tr> <tr class="border-0"> <td id="L106" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="106"></td> <td id="LC106" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-k">let</span> <span class="pl-v">Ok</span><span class="pl-kos">(</span>registry_path<span class="pl-kos">)</span> = fs<span class="pl-kos">.</span><span class="pl-en">realpath_sync</span><span class="pl-kos">(</span>registry_path<span class="pl-kos">)</span> <span class="pl-kos">{</span> </td> </tr> <tr class="border-0"> <td id="L107" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="107"></td> <td id="LC107" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">match</span> fs<span class="pl-kos">.</span><span class="pl-en">realpath_sync</span><span class="pl-kos">(</span>path<span class="pl-kos">)</span> <span class="pl-kos">{</span> </td> </tr> <tr class="border-0"> <td id="L108" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="108"></td> <td id="LC108" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-v">Ok</span><span class="pl-kos">(</span>path<span class="pl-kos">)</span> <span class="pl-k">if</span> path<span class="pl-kos">.</span><span class="pl-en">starts_with</span><span class="pl-kos">(</span>registry_path<span class="pl-kos">)</span> =&gt; <span class="pl-kos">{</span> </td> </tr> <tr class="border-0"> <td id="L109" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="109"></td> <td id="LC109" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-v">Ok</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> </td> </tr> <tr class="border-0"> <td id="L110" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="110"></td> <td id="LC110" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td> </tr> <tr class="border-0"> <td id="L111" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="111"></td> <td id="LC111" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-v">Err</span><span class="pl-kos">(</span>e<span class="pl-kos">)</span> <span class="pl-k">if</span> e<span class="pl-kos">.</span><span class="pl-en">kind</span><span class="pl-kos">(</span><span class="pl-kos">)</span> == <span class="pl-smi">ErrorKind</span><span class="pl-kos">::</span><span class="pl-v">NotFound</span> =&gt; <span class="pl-kos">{</span> </td> </tr> <tr class="border-0"> <td id="L112" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="112"></td> <td id="LC112" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-v">Ok</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> </td> </tr> <tr class="border-0"> <td id="L113" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="113"></td> <td id="LC113" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td> </tr> <tr class="border-0"> <td id="L114" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="114"></td> <td id="LC114" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> _ =&gt; <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-c">// ignore</span> </td> </tr> <tr class="border-0"> <td id="L115" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="115"></td> <td id="LC115" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td> </tr> <tr class="border-0"> <td id="L116" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="116"></td> <td id="LC116" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td> </tr> <tr class="border-0"> <td id="L117" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="117"></td> <td id="LC117" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td> </tr> <tr class="border-0"> <td id="L118" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="118"></td> <td id="LC118" 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="L119" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="119"></td> <td id="LC119" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> permissions<span class="pl-kos">.</span><span class="pl-en">check_read</span><span class="pl-kos">(</span>path<span class="pl-kos">)</span> </td> </tr> <tr class="border-0"> <td id="L120" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="120"></td> <td id="LC120" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">In my case the <code class="notranslate">node_modules</code> branch inside the if-statement is hit about 100k times. The first <code class="notranslate">realpath</code> call checks the registry path which is always the exact same path for me. The second call against <code class="notranslate">path</code> has lots of duplicated checks too. Did a little analysis and here is a list of the top paths which are checked repeatedly.</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="7084 &quot;/project/node_modules/.deno/happy-dom@9.20.3/node_modules/happy-dom/package.json&quot; 4660 &quot;/project/node_modules/.deno/@blueprintjs+icons@4.16.0/node_modules/@blueprintjs/package.json&quot; 2320 &quot;/project/node_modules/.deno/@blueprintjs+icons@4.16.0/node_modules/@blueprintjs/icons/lib/cjs/generated-icons/20px/paths&quot; 2320 &quot;/project/node_modules/.deno/@blueprintjs+icons@4.16.0/node_modules/@blueprintjs/icons/lib/cjs/generated-icons/16px/paths&quot; 1952 &quot;/project/node_modules/.deno/@testing-library+user-event@14.4.3/node_modules/@testing-library/user-event/dist/esm/package.json&quot; 1628 &quot;/project/node_modules/.deno/aria-query@5.1.3/node_modules/aria-query/package.json&quot; 1536 &quot;/project/node_modules/.deno/date-fns@2.30.0/node_modules/date-fns/package.json&quot; 902 &quot;/project/node_modules/.deno/aria-query@5.1.3/node_modules/aria-query/lib/etc/roles/literal&quot; 655 &quot;/project/node_modules/.deno/@testing-library+dom@9.3.0/node_modules/@testing-library/package.json&quot; 491 &quot;/project/node_modules/.deno/date-fns@2.30.0/node_modules/date-fns/node_modules&quot; 491 &quot;/project/node_modules/.deno/date-fns@2.30.0/node_modules/@babel/runtime/package.json&quot; 429 &quot;/project/node_modules/.deno/aria-query@5.1.3/node_modules/aria-query/lib/etc/roles/dpub&quot; 374 &quot;/project/node_modules/.deno/call-bind@1.0.2/node_modules/call-bind/package.json&quot; 352 &quot;/project/node_modules/.deno/react@18.2.0/node_modules/react/package.json&quot;"><pre class="notranslate">7084 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/happy-dom@9.20.3/node_modules/happy-dom/package.json<span class="pl-pds">"</span></span> 4660 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/@blueprintjs+icons@4.16.0/node_modules/@blueprintjs/package.json<span class="pl-pds">"</span></span> 2320 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/@blueprintjs+icons@4.16.0/node_modules/@blueprintjs/icons/lib/cjs/generated-icons/20px/paths<span class="pl-pds">"</span></span> 2320 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/@blueprintjs+icons@4.16.0/node_modules/@blueprintjs/icons/lib/cjs/generated-icons/16px/paths<span class="pl-pds">"</span></span> 1952 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/@testing-library+user-event@14.4.3/node_modules/@testing-library/user-event/dist/esm/package.json<span class="pl-pds">"</span></span> 1628 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/aria-query@5.1.3/node_modules/aria-query/package.json<span class="pl-pds">"</span></span> 1536 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/date-fns@2.30.0/node_modules/date-fns/package.json<span class="pl-pds">"</span></span> 902 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/aria-query@5.1.3/node_modules/aria-query/lib/etc/roles/literal<span class="pl-pds">"</span></span> 655 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/@testing-library+dom@9.3.0/node_modules/@testing-library/package.json<span class="pl-pds">"</span></span> 491 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/date-fns@2.30.0/node_modules/date-fns/node_modules<span class="pl-pds">"</span></span> 491 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/date-fns@2.30.0/node_modules/@babel/runtime/package.json<span class="pl-pds">"</span></span> 429 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/aria-query@5.1.3/node_modules/aria-query/lib/etc/roles/dpub<span class="pl-pds">"</span></span> 374 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/call-bind@1.0.2/node_modules/call-bind/package.json<span class="pl-pds">"</span></span> 352 <span class="pl-s"><span class="pl-pds">"</span>/project/node_modules/.deno/react@18.2.0/node_modules/react/package.json<span class="pl-pds">"</span></span></pre></div> <p dir="auto">Commenting out the <code class="notranslate">realpath</code> calls inside <code class="notranslate">ensure_registry_read_permission</code> brings down the total test time from 26s to 16s. This leads me to conclude that caching that is very much worth it. There is an older comment by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dsherret/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dsherret">@dsherret</a> which hints at potential gains by caching that already.</p> <a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/1062408/241506668-2c42bc53-da97-44d1-b6e3-b4bd4d2161bf.png"><img width="1680" alt="Screenshot 2023-05-28 at 08 27 54" src="https://user-images.githubusercontent.com/1062408/241506668-2c42bc53-da97-44d1-b6e3-b4bd4d2161bf.png" style="max-width: 100%;"></a>
<p dir="auto">Please run the topmost context in async mode, or allow top level await, akin to</p> <p dir="auto"><a href="https://bugs.chromium.org/p/v8/issues/detail?id=9344" rel="nofollow">https://bugs.chromium.org/p/v8/issues/detail?id=9344</a></p>
0
<p dir="auto">Hello!</p> <p dir="auto">Currently when running <code class="notranslate">deno lint --unstable</code> I get some issues with <code class="notranslate">no-inferrable-types</code> on fields that I'm actually <strong>declaring</strong> the type and <strong>then assigning a value</strong>.</p> <p dir="auto">For instance the following snippet causes the output from deno lint:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export function createString( prefix: string = &quot;&quot;, params: GeneratorParameters = defaultParameters, ): string { if (!validateGeneratorParameters(params)) { throw new Error(`The parameters ${params} aren't valid`); } const suffix = generateRandomNumber(params).toString(); return prefix !== &quot;&quot; ? prefix + suffix : suffix; }"><pre class="notranslate"><code class="notranslate">export function createString( prefix: string = "", params: GeneratorParameters = defaultParameters, ): string { if (!validateGeneratorParameters(params)) { throw new Error(`The parameters ${params} aren't valid`); } const suffix = generateRandomNumber(params).toString(); return prefix !== "" ? prefix + suffix : suffix; } </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(no-inferrable-types) inferrable types are not allowed prefix: string = &quot;&quot;, ^^^^^^^^^^^^^^^^^^^ at E:\Src\dixture\src\_simpleGenerator.ts:45:2"><pre class="notranslate"><code class="notranslate">(no-inferrable-types) inferrable types are not allowed prefix: string = "", ^^^^^^^^^^^^^^^^^^^ at E:\Src\dixture\src\_simpleGenerator.ts:45:2 </code></pre></div> <p dir="auto">Even tho the <code class="notranslate">lint</code> option is flagged as <code class="notranslate">unstable</code> I was unable to find this reported elsewhere so hopefully this is just a duplicate and this is a know issue <g-emoji class="g-emoji" alias="sweat_smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f605.png">😅</g-emoji></p> <p dir="auto">You can find the failing snippet on <a href="https://github.com/rodolphocastro/dixture/blob/60ef43d1d98f66d5d95f8411fae6b9284da73936/src/_simpleGenerator.ts#L62">this GitHub repository</a>, just nevermind the <code class="notranslate">no-explicit-any</code> (as those are intended by me right now <g-emoji class="g-emoji" alias="sweat_smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f605.png">😅</g-emoji>)</p>
<p dir="auto">Dunno if this makes sense in a Deno context, but I've seen people do things like</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {version} from '../package.json'"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-s1">version</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'../package.json'</span></pre></div> <p dir="auto">but this fails:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: An unsupported media type was attempted to be imported as a module. Specifier: https://raw.githubusercontent.com/wrnrlr/as-bind/master/package.json MediaType: Json"><pre class="notranslate"><code class="notranslate">error: An unsupported media type was attempted to be imported as a module. Specifier: https://raw.githubusercontent.com/wrnrlr/as-bind/master/package.json MediaType: Json </code></pre></div> <p dir="auto">Same failure when importing local copy of same code.</p>
0
<p dir="auto">test-cmd.sh failed with the following:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="12:01:47 service &quot;cassandra&quot; created 12:01:47 12:01:47 FAIL! 12:01:47 Get all -l'app=cassandra' {{range.items}}{{range .metadata.labels}}{{.}}:{{end}}{{end}} 12:01:47 Expected: cassandra:cassandra:cassandra: 12:01:47 Got: cassandra:cassandra:cassandra:cassandra: 12:01:47 �(B 12:01:47 1535 ./hack/test-cmd.sh"><pre class="notranslate"><code class="notranslate">12:01:47 service "cassandra" created 12:01:47 12:01:47 FAIL! 12:01:47 Get all -l'app=cassandra' {{range.items}}{{range .metadata.labels}}{{.}}:{{end}}{{end}} 12:01:47 Expected: cassandra:cassandra:cassandra: 12:01:47 Got: cassandra:cassandra:cassandra:cassandra: 12:01:47 �(B 12:01:47 1535 ./hack/test-cmd.sh </code></pre></div> <p dir="auto"><a href="https://storage.googleapis.com/kubernetes-jenkins/logs/kubernetes-test-go/8954/build-log.txt" rel="nofollow">https://storage.googleapis.com/kubernetes-jenkins/logs/kubernetes-test-go/8954/build-log.txt</a></p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): kubeadm</p> <hr> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one): FEATURE REQUEST</p> <ul dir="auto"> <li>I would like to specify advertisement ip or hostname for node during the join process. Currently it uses hostname, but kb master could not find the host by it(if it is not in dns or hosts).</li> </ul> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.0&quot;, GitCommit:&quot;a16c0a7f71a6f93c7e0f222d961f4675cd97a46b&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-09-26T18:16:57Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;} Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.0&quot;, GitCommit:&quot;a16c0a7f71a6f93c7e0f222d961f4675cd97a46b&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-09-26T18:10:32Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:16:57Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:10:32Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} </code></pre></div> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">I expect to use IP address instead of hostname to search for kb nodes.</p> <p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ kubeadm join --api-advertise-addresses=10.10.10.2 --token=123123 10.10.10.1 Error: unknown flag: --api-advertise-addresses Usage: kubeadm join [flags] Flags: --token string (required) Shared secret used to secure bootstrap. Must match the output of 'kubeadm init' "><pre class="notranslate"><code class="notranslate">$ kubeadm join --api-advertise-addresses=10.10.10.2 --token=123123 10.10.10.1 Error: unknown flag: --api-advertise-addresses Usage: kubeadm join [flags] Flags: --token string (required) Shared secret used to secure bootstrap. Must match the output of 'kubeadm init' </code></pre></div>
0
<h2 dir="auto"><g-emoji class="g-emoji" alias="information_source" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png">ℹ</g-emoji> Computer information</h2> <ul dir="auto"> <li>PowerToys version: 0.20.1</li> <li>PowerToy Utility: FancyZones</li> <li>Running PowerToys as Admin: No</li> <li>Windows build number: Version 1909 (OS Build 18363.1016)</li> </ul> <h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide detailed reproduction steps (if any)</h2> <ol dir="auto"> <li>Start PowerShell</li> <li>Right click on PowerShell in the taskbar</li> <li>"Run as Administrator"</li> <li>Allow Administrator in UAC check</li> </ol> <h3 dir="auto"><g-emoji class="g-emoji" alias="heavy_check_mark" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2714.png">✔️</g-emoji> Expected result</h3> <p dir="auto">PowerToys gives notive that a privileged program is detected. The new window is not affected by FancyZones.</p> <h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">❌</g-emoji> Actual result</h3> <p dir="auto">The mouse starts lagging, PowerToys gives notice that a privileged program is detected and while still running PowerToys no longer works. The tray icon is also unresponsive.</p>
<h2 dir="auto">ℹ Computer information</h2> <ul dir="auto"> <li>Windows build number: 1909 (Build 18363.997)</li> <li>PowerToys version: 0.20.1</li> <li>PowerToy module: maybe fancy zones?</li> </ul> <h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide detailed reproduction steps (if any)</h2> <ol dir="auto"> <li>Start Powertoys</li> <li>open task manager and move it</li> <li>get the message about a program running with administrator privileges</li> <li>See in task manager that powertoys is now using a full core and it doesn't react to anything any more (settings window can't be opened, fancy zones do nothing, etc...)</li> </ol> <h3 dir="auto"><g-emoji class="g-emoji" alias="heavy_check_mark" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2714.png">✔️</g-emoji> Expected result</h3> <p dir="auto">Powertoys continue working.</p> <h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">❌</g-emoji> Actual result</h3> <p dir="auto">Powertoys hangs in an infinite loop.</p> <p dir="auto">My guess is that it is somehow related to fancy zones, as it only starts hanging as I actually move the task manager.</p>
1
<ul dir="auto"> <li>[x ] I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <p dir="auto">Hello,<br> I have this problem, if I rendered page <em>XX</em> through the server (Express), which uses the alias (as) <em>YY</em>, click on <code class="notranslate">&lt;Link&gt;</code> doesn't work.</p> <h3 dir="auto">Current Behavior</h3> <p dir="auto">We display the XX page, there is a link to the same page, but with extra param - defined in this way <code class="notranslate">&lt;Link href="/XX?id=1" as="/YY/ 1"&gt;</code> then clicking on it do nothing, no errors in the console.<br> I noticed that the link works if I change <code class="notranslate">href="/XX?id=1"</code> to <code class="notranslate">href="_random_string_"</code>.</p> <p dir="auto">Also when I change the subpage to <em>ZZ</em> dynamically and return dynamically to <em>XX</em>, Link works correctly (<strong>expected</strong>).</p> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">Clicking on <code class="notranslate">&lt;Link&gt;</code> changes the parameter in the url without changing the page.</p> <h3 dir="auto">Context</h3> <p dir="auto">Let's say I have a list of recipes in strore and I display them on the page <em>/recipes</em>, when I click on the Link, I do not want to change the page, just add the parameter /recipies/1 and load the selected recipe details.</p> <h2 dir="auto">Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td>5.0</td> </tr> <tr> <td>node</td> <td>9.4.0</td> </tr> </tbody> </table>
<p dir="auto">In the projects not using next.js, we use "pm2 start pm2.json. It never generates duplicate pm2 instances.</p> <p dir="auto">When using PM2 with next.js, we can't use pm2.json configuration file. The code is like the following:</p> <p dir="auto"><code class="notranslate">// package.json</code><br> <code class="notranslate">"start": "node --experimental-modules server.mjs"</code></p> <p dir="auto"><code class="notranslate">// deploy.sh</code><br> <code class="notranslate">pm2 start npm --name "myproj" -- start</code></p> <p dir="auto">When I run deploy.sh without deleting the existing "myproj" pm2 instance, there would be two "myproj" instances. And it disables the auto-deployment script.</p> <p dir="auto">Looking forward to the answer.</p>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def gen(): yield '1','2',1,2 yield '1','2',1,2 yield '1','3',3,2 yield '2','4',1,2 ser = pd.DataFrame(gen(), columns=[&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;,]).set_index([&quot;a&quot;, &quot;b&quot;])[&quot;c&quot;] print ser print ser.loc[('1','3')] print ser.at[('1','3')] # TypeError: _get_value() got multiple values for keyword argument 'takeable'"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">gen</span>(): <span class="pl-k">yield</span> <span class="pl-s">'1'</span>,<span class="pl-s">'2'</span>,<span class="pl-c1">1</span>,<span class="pl-c1">2</span> <span class="pl-k">yield</span> <span class="pl-s">'1'</span>,<span class="pl-s">'2'</span>,<span class="pl-c1">1</span>,<span class="pl-c1">2</span> <span class="pl-k">yield</span> <span class="pl-s">'1'</span>,<span class="pl-s">'3'</span>,<span class="pl-c1">3</span>,<span class="pl-c1">2</span> <span class="pl-k">yield</span> <span class="pl-s">'2'</span>,<span class="pl-s">'4'</span>,<span class="pl-c1">1</span>,<span class="pl-c1">2</span> <span class="pl-s1">ser</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-en">gen</span>(), <span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>, <span class="pl-s">"c"</span>, <span class="pl-s">"d"</span>,]).<span class="pl-en">set_index</span>([<span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>])[<span class="pl-s">"c"</span>] <span class="pl-k">print</span> <span class="pl-s1">ser</span> <span class="pl-k">print</span> <span class="pl-s1">ser</span>.<span class="pl-s1">loc</span>[(<span class="pl-s">'1'</span>,<span class="pl-s">'3'</span>)] <span class="pl-k">print</span> <span class="pl-s1">ser</span>.<span class="pl-s1">at</span>[(<span class="pl-s">'1'</span>,<span class="pl-s">'3'</span>)] <span class="pl-c"># TypeError: _get_value() got multiple values for keyword argument 'takeable'</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">The <code class="notranslate">.at</code> accessor should return the indexed value <code class="notranslate">3</code>.</p> <p dir="auto">There doesn't seem any way reliably look up a single scalar in a multiindex. If this is not supported, a better error would be appreciated.</p> <h4 dir="auto">Expected Output</h4> <p dir="auto"><code class="notranslate">3</code></p> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 2.7.6.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 3.13.0-24-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8<br> LOCALE: None.None</p> <p dir="auto">pandas: 0.22.0<br> pytest: None<br> pip: 9.0.1<br> setuptools: 36.0.1<br> Cython: 0.27.3<br> numpy: 1.14.0<br> scipy: 1.0.0<br> pyarrow: None<br> xarray: None<br> IPython: 5.3.0<br> sphinx: None<br> patsy: 0.2.1<br> dateutil: 2.6.1<br> pytz: 2017.2<br> blosc: None<br> bottleneck: None<br> tables: 3.1.1<br> numexpr: 2.6.2<br> feather: None<br> matplotlib: 2.0.2<br> openpyxl: 1.7.0<br> xlrd: 0.9.2<br> xlwt: 0.7.5<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: 0.999999999<br> sqlalchemy: 1.0.15<br> pymysql: None<br> psycopg2: 2.7.3.2 (dt dec pq3 ext lo64)<br> jinja2: 2.9.6<br> s3fs: None<br> fastparquet: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
<p dir="auto">Split off from: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54338376" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9250" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9250/hovercard" href="https://github.com/pandas-dev/pandas/issues/9250">#9250</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [6]: # Dataframe now: cols = [('a_col', chr(i+65)) for i in range(5)] cols.extend([('b_col', chr(i+65)) for i in range(5, 10)]) idx = [('a_row', chr(i+65)) for i in range(5)] idx.extend([('b_row', chr(i+65)) for i in range(5, 10)]) df = pd.DataFrame(np.linspace(1, 100, 100).reshape(10, 10), index = pd.MultiIndex.from_tuples(idx), columns = pd.MultiIndex.from_tuples(cols)) In [7]: df Out[7]: a_col b_col A B C D E F G H I J a_row A 1 2 3 4 5 6 7 8 9 10 B 11 12 13 14 15 16 17 18 19 20 C 21 22 23 24 25 26 27 28 29 30 D 31 32 33 34 35 36 37 38 39 40 E 41 42 43 44 45 46 47 48 49 50 b_row F 51 52 53 54 55 56 57 58 59 60 G 61 62 63 64 65 66 67 68 69 70 H 71 72 73 74 75 76 77 78 79 80 I 81 82 83 84 85 86 87 88 89 90 J 91 92 93 94 95 96 97 98 99 100 In [8]: df.loc[('a_row', 'A')] # Works df.loc[:, ('a_col', 'A')] # Works df.ix[('a_row', 'B')] # Works Out[8]: a_col A 11 B 12 C 13 D 14 E 15 b_col F 16 G 17 H 18 I 19 J 20 Name: (a_row, B), dtype: float64 In [9]: df.at[('a_row', 'A')] # fails --------------------------------------------------------------------------- KeyError Traceback (most recent call last) &lt;ipython-input-9-6b9462dd2fc9&gt; in &lt;module&gt;() ----&gt; 1 df.at[('a_row', 'A')] # fails /home/federico/Python_Libraries/pandas/pandas/core/indexing.pyc in __getitem__(self, key) 1505 1506 key = self._convert_key(key) -&gt; 1507 return self.obj.get_value(*key, takeable=self._takeable) 1508 1509 def __setitem__(self, key, value): /home/federico/Python_Libraries/pandas/pandas/core/frame.pyc in get_value(self, index, col, takeable) 1640 return _maybe_box_datetimelike(series.values[index]) 1641 -&gt; 1642 series = self._get_item_cache(col) 1643 engine = self.index._engine 1644 return engine.get_value(series.get_values(), index) /home/federico/Python_Libraries/pandas/pandas/core/generic.pyc in _get_item_cache(self, item) 1066 res = cache.get(item) 1067 if res is None: -&gt; 1068 values = self._data.get(item) 1069 res = self._box_item_values(item, values) 1070 cache[item] = res /home/federico/Python_Libraries/pandas/pandas/core/internals.pyc in get(self, item, fastpath) 2847 2848 if not isnull(item): -&gt; 2849 loc = self.items.get_loc(item) 2850 else: 2851 indexer = np.arange(len(self.items))[isnull(self.items)] /home/federico/Python_Libraries/pandas/pandas/core/index.pyc in get_loc(self, key) 4123 4124 if not isinstance(key, tuple): -&gt; 4125 loc = self._get_level_indexer(key, level=0) 4126 return _maybe_to_slice(loc) 4127 /home/federico/Python_Libraries/pandas/pandas/core/index.pyc in _get_level_indexer(self, key, level) 4359 else: 4360 -&gt; 4361 loc = level_index.get_loc(key) 4362 if level &gt; 0 or self.lexsort_depth == 0: 4363 return np.array(labels == loc,dtype=bool) /home/federico/Python_Libraries/pandas/pandas/core/index.pyc in get_loc(self, key) 1405 loc : int if unique index, possibly slice or mask if not 1406 &quot;&quot;&quot; -&gt; 1407 return self._engine.get_loc(_values_from_object(key)) 1408 1409 def get_value(self, series, key): /home/federico/Python_Libraries/pandas/pandas/index.so in pandas.index.IndexEngine.get_loc (pandas/index.c:3812)() /home/federico/Python_Libraries/pandas/pandas/index.so in pandas.index.IndexEngine.get_loc (pandas/index.c:3692)() /home/federico/Python_Libraries/pandas/pandas/hashtable.so in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12318)() /home/federico/Python_Libraries/pandas/pandas/hashtable.so in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12269)() KeyError: 'A'"><pre class="notranslate"><code class="notranslate">In [6]: # Dataframe now: cols = [('a_col', chr(i+65)) for i in range(5)] cols.extend([('b_col', chr(i+65)) for i in range(5, 10)]) idx = [('a_row', chr(i+65)) for i in range(5)] idx.extend([('b_row', chr(i+65)) for i in range(5, 10)]) df = pd.DataFrame(np.linspace(1, 100, 100).reshape(10, 10), index = pd.MultiIndex.from_tuples(idx), columns = pd.MultiIndex.from_tuples(cols)) In [7]: df Out[7]: a_col b_col A B C D E F G H I J a_row A 1 2 3 4 5 6 7 8 9 10 B 11 12 13 14 15 16 17 18 19 20 C 21 22 23 24 25 26 27 28 29 30 D 31 32 33 34 35 36 37 38 39 40 E 41 42 43 44 45 46 47 48 49 50 b_row F 51 52 53 54 55 56 57 58 59 60 G 61 62 63 64 65 66 67 68 69 70 H 71 72 73 74 75 76 77 78 79 80 I 81 82 83 84 85 86 87 88 89 90 J 91 92 93 94 95 96 97 98 99 100 In [8]: df.loc[('a_row', 'A')] # Works df.loc[:, ('a_col', 'A')] # Works df.ix[('a_row', 'B')] # Works Out[8]: a_col A 11 B 12 C 13 D 14 E 15 b_col F 16 G 17 H 18 I 19 J 20 Name: (a_row, B), dtype: float64 In [9]: df.at[('a_row', 'A')] # fails --------------------------------------------------------------------------- KeyError Traceback (most recent call last) &lt;ipython-input-9-6b9462dd2fc9&gt; in &lt;module&gt;() ----&gt; 1 df.at[('a_row', 'A')] # fails /home/federico/Python_Libraries/pandas/pandas/core/indexing.pyc in __getitem__(self, key) 1505 1506 key = self._convert_key(key) -&gt; 1507 return self.obj.get_value(*key, takeable=self._takeable) 1508 1509 def __setitem__(self, key, value): /home/federico/Python_Libraries/pandas/pandas/core/frame.pyc in get_value(self, index, col, takeable) 1640 return _maybe_box_datetimelike(series.values[index]) 1641 -&gt; 1642 series = self._get_item_cache(col) 1643 engine = self.index._engine 1644 return engine.get_value(series.get_values(), index) /home/federico/Python_Libraries/pandas/pandas/core/generic.pyc in _get_item_cache(self, item) 1066 res = cache.get(item) 1067 if res is None: -&gt; 1068 values = self._data.get(item) 1069 res = self._box_item_values(item, values) 1070 cache[item] = res /home/federico/Python_Libraries/pandas/pandas/core/internals.pyc in get(self, item, fastpath) 2847 2848 if not isnull(item): -&gt; 2849 loc = self.items.get_loc(item) 2850 else: 2851 indexer = np.arange(len(self.items))[isnull(self.items)] /home/federico/Python_Libraries/pandas/pandas/core/index.pyc in get_loc(self, key) 4123 4124 if not isinstance(key, tuple): -&gt; 4125 loc = self._get_level_indexer(key, level=0) 4126 return _maybe_to_slice(loc) 4127 /home/federico/Python_Libraries/pandas/pandas/core/index.pyc in _get_level_indexer(self, key, level) 4359 else: 4360 -&gt; 4361 loc = level_index.get_loc(key) 4362 if level &gt; 0 or self.lexsort_depth == 0: 4363 return np.array(labels == loc,dtype=bool) /home/federico/Python_Libraries/pandas/pandas/core/index.pyc in get_loc(self, key) 1405 loc : int if unique index, possibly slice or mask if not 1406 """ -&gt; 1407 return self._engine.get_loc(_values_from_object(key)) 1408 1409 def get_value(self, series, key): /home/federico/Python_Libraries/pandas/pandas/index.so in pandas.index.IndexEngine.get_loc (pandas/index.c:3812)() /home/federico/Python_Libraries/pandas/pandas/index.so in pandas.index.IndexEngine.get_loc (pandas/index.c:3692)() /home/federico/Python_Libraries/pandas/pandas/hashtable.so in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12318)() /home/federico/Python_Libraries/pandas/pandas/hashtable.so in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12269)() KeyError: 'A' </code></pre></div> <p dir="auto">It also fails on Series with multi-indexing.</p>
1
<h2 dir="auto">Environment info</h2> <ul dir="auto"> <li><code class="notranslate">transformers</code> version: 4.11.3</li> <li>Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic</li> <li>Python version: 3.7.12</li> <li>PyTorch version (GPU?): 1.9.0+cu111 (False)</li> <li>Tensorflow version (GPU?): 2.6.0 (False)</li> <li>Flax version (CPU?/GPU?/TPU?): not installed (NA)</li> <li>Jax version: not installed</li> <li>JaxLib version: not installed</li> <li>Using GPU in script?: no</li> <li>Using distributed or parallel set-up in script?: no</li> </ul> <h2 dir="auto">Information</h2> <p dir="auto">I'm using <code class="notranslate">t5-base</code> model (yet my test shows the same result for <code class="notranslate">t5-small</code>).</p> <p dir="auto">To implement some knowledge-distillation task and "classical" sequence-to-sequence tasks - I'm trying to use <code class="notranslate">batch_size x seq_length x vocab_size</code> array as labels for both kinds of tasks (soft labels in KD case, one-hot hard labels I'm seq2seq case).</p> <p dir="auto">So I need to convert tokenizer output from <code class="notranslate">batch_size x seq_length</code> to <code class="notranslate">batch_size x seq_length x vocab_size</code> one-hot array to pass it to my custom loss later.<br> Yet I found out that I can't just use <code class="notranslate">T5Tokenizer(...).vocab_size</code> to build one-hot matrix - <code class="notranslate">T5ForConditionalGeneration(...).config.vocab_size</code> have different value.<br> So when I'm trying to build a one-hot vector based on tokenizer vocab size - I'm getting dimension mismatch errors.</p> <p dir="auto">The next code shows me different vocabulary sizes when I'm trying to access vocab size through <code class="notranslate">T5Tokenizer</code> and related <code class="notranslate">T5ForConditionalGeneration</code> config:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from transformers import T5ForConditionalGeneration, T5Tokenizer T5_MODEL = &quot;t5-base&quot; print(&quot;tokenizer&quot;, T5Tokenizer.from_pretrained(T5_MODEL).vocab_size) print(&quot;model&quot;, T5ForConditionalGeneration.from_pretrained(T5_MODEL).config.vocab_size)"><pre class="notranslate"><code class="notranslate">from transformers import T5ForConditionalGeneration, T5Tokenizer T5_MODEL = "t5-base" print("tokenizer", T5Tokenizer.from_pretrained(T5_MODEL).vocab_size) print("model", T5ForConditionalGeneration.from_pretrained(T5_MODEL).config.vocab_size) </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tokenizer 32100 model 32128"><pre class="notranslate"><code class="notranslate">tokenizer 32100 model 32128 </code></pre></div> <h2 dir="auto">Expected behavior</h2> <p dir="auto">I expected the tokenizer &amp; model to have the same vocabulary size.</p>
<h1 dir="auto"><g-emoji class="g-emoji" alias="question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2753.png">❓</g-emoji> Questions &amp; Help</h1> <p dir="auto">Pretrained <code class="notranslate">T5Tokenizer </code> has vocab size of 32100 (32000 tokens plus 100 extra_ids) but the shared embedding layer of <code class="notranslate">T5ForConditionalGeneration</code> has size of (32128, 768). I checked the google-research implementation of T5 and also found that they have vocab size of 32100 also.</p> <p dir="auto">Where did the extra 28 embeddings come from and how can we map it to the tokenizer?</p> <h2 dir="auto">To reproduce</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from transformers import ( T5Tokenizer, T5ForConditionalGeneration, ) tokenizer_pretrained = T5Tokenizer.from_pretrained('t5-base') model_pretrained = T5ForConditionalGeneration.from_pretrained('t5-base') len(tokenizer_pretrained.get_vocab()), model_pretrained.state_dict()['shared.weight'].shape"><pre class="notranslate"><code class="notranslate">from transformers import ( T5Tokenizer, T5ForConditionalGeneration, ) tokenizer_pretrained = T5Tokenizer.from_pretrained('t5-base') model_pretrained = T5ForConditionalGeneration.from_pretrained('t5-base') len(tokenizer_pretrained.get_vocab()), model_pretrained.state_dict()['shared.weight'].shape </code></pre></div> <p dir="auto">Output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(32100, torch.Size([32128, 768]))"><pre class="notranslate"><code class="notranslate">(32100, torch.Size([32128, 768])) </code></pre></div>
1
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p> <p dir="auto">using 0.6beta1</p> <p dir="auto">this used to work in 0.5</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import create_engine, Table, MetaData, __version__ print __version__ engine = create_engine('oracle://xxx:xxx@XXX', echo=False) metadata = MetaData(engine) engine.execute(&quot;&quot;&quot;create or replace function ADDONE (a number) return number deterministic is begin return a+1; end; &quot;&quot;&quot;) try: engine.execute('drop table BOB') except: pass engine.execute('create table BOB (a number)') engine.execute('create index fn_idx on BOB (ADDONE(a))') bob_table = Table( 'bob', metadata, autoload=True )"><pre class="notranslate"><code class="notranslate">from sqlalchemy import create_engine, Table, MetaData, __version__ print __version__ engine = create_engine('oracle://xxx:xxx@XXX', echo=False) metadata = MetaData(engine) engine.execute("""create or replace function ADDONE (a number) return number deterministic is begin return a+1; end; """) try: engine.execute('drop table BOB') except: pass engine.execute('create table BOB (a number)') engine.execute('create index fn_idx on BOB (ADDONE(a))') bob_table = Table( 'bob', metadata, autoload=True ) </code></pre></div> <p dir="auto">Gives</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;bob.py&quot;, line 28, in &lt;module&gt; autoload=True File &quot;/home/geraint/work/sqlalchemy/lib/sqlalchemy/schema.py&quot;, line 202, in __new__ table._init(name, metadata, *args, **kw) File &quot;/home/geraint/work/sqlalchemy/lib/sqlalchemy/schema.py&quot;, line 250, in _init _bind_or_error(metadata).reflecttable(self, include_columns=include_columns) File &quot;/home/geraint/work/sqlalchemy/lib/sqlalchemy/engine/base.py&quot;, line 1450, in reflecttable self.dialect.reflecttable(conn, table, include_columns) File &quot;/home/geraint/work/sqlalchemy/lib/sqlalchemy/engine/default.py&quot;, line 122, in reflecttable return insp.reflecttable(table, include_columns) File &quot;/home/geraint/work/sqlalchemy/lib/sqlalchemy/engine/reflection.py&quot;, line 362, in reflecttable sa_schema.Index(name, *[table.columns[c](table.columns[c) for c in columns], File &quot;/home/geraint/work/sqlalchemy/lib/sqlalchemy/util.py&quot;, line 666, in __getitem__ return self._data[key](key) KeyError: u'sys_nc00002$'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "bob.py", line 28, in &lt;module&gt; autoload=True File "/home/geraint/work/sqlalchemy/lib/sqlalchemy/schema.py", line 202, in __new__ table._init(name, metadata, *args, **kw) File "/home/geraint/work/sqlalchemy/lib/sqlalchemy/schema.py", line 250, in _init _bind_or_error(metadata).reflecttable(self, include_columns=include_columns) File "/home/geraint/work/sqlalchemy/lib/sqlalchemy/engine/base.py", line 1450, in reflecttable self.dialect.reflecttable(conn, table, include_columns) File "/home/geraint/work/sqlalchemy/lib/sqlalchemy/engine/default.py", line 122, in reflecttable return insp.reflecttable(table, include_columns) File "/home/geraint/work/sqlalchemy/lib/sqlalchemy/engine/reflection.py", line 362, in reflecttable sa_schema.Index(name, *[table.columns[c](table.columns[c) for c in columns], File "/home/geraint/work/sqlalchemy/lib/sqlalchemy/util.py", line 666, in __getitem__ return self._data[key](key) KeyError: u'sys_nc00002$' </code></pre></div>
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p> <p dir="auto">all is in the title ... :)<br> <a href="http://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.3#LATERAL_JOIN" rel="nofollow">http://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.3#LATERAL_JOIN</a></p>
0
<h2 dir="auto">Guidelines</h2> <p dir="auto">Please note that GitHub issues are only meant for bug reports/feature requests.<br> If you have questions on how to use Neo4j, please ask on <a href="https://stackoverflow.com/questions/tagged/neo4j" rel="nofollow">StackOverflow</a> instead of creating an issue here.</p> <p dir="auto">Before creating a new issue, please check whether someone else has raised the same issue. You may be able to add context to that issue instead of duplicating the report. However, each issue should also only be focussed on a <em>single</em> problem, so do not describe new problems within an existing thread - these are very hard to track and manage, and your problem may be ignored. Finally, do not append comments to closed issues; if the same problem re-occurs, open a new issue, and include a link to the old one.</p> <p dir="auto">To help us understand your issue, please specify important details, primarily:</p> <ul dir="auto"> <li>Neo4j version: X.Y.Z</li> <li>Operating system: (for example Windows 95/Ubuntu 16.04)</li> <li>API/Driver: (for example Cypher/Java API/Python driver vX.Y.Z)</li> <li><strong>Steps to reproduce</strong></li> <li>Expected behavior</li> <li>Actual behavior</li> </ul> <p dir="auto">Additionally, include (as appropriate) log-files, stacktraces, and other debug output.</p> <h2 dir="auto">Example bug report</h2> <p dir="auto">I discovered that when I mount <code class="notranslate">data/</code> to a volume on my host, and then stop the container, the <code class="notranslate">write.lock</code> is not removed as well as a number of other files not being cleaned up properly.</p> <p dir="auto"><strong>Neo4j Version:</strong> 3.0M03<br> <strong>Operating System:</strong> Ubuntu 15.10<br> <strong>API:</strong> Docker</p> <h3 dir="auto">Steps to reproduce</h3> <ol dir="auto"> <li>Pull the image: <code class="notranslate">docker pull neo4j/neo4j:3.0.0-M03</code></li> <li>Create a directory on the host that will be a mount for the data: <code class="notranslate">mkdir /home/neo4j-data</code></li> <li>Start a new container that mounts to this directory: <code class="notranslate">docker run -d --name neo4j-test -p 7474:7474 -v /home/neo4j-data:/data neo4j/neo4j:3.0.0-M03</code></li> <li>Navigate to the <code class="notranslate">write.lock</code> file located in the directory: <code class="notranslate">/data/databases/graph.db/schema/label/lucene/labelStore/1/</code></li> <li>Stop the container: <code class="notranslate">docker stop neo4j-test</code></li> </ol> <h3 dir="auto">Expected behavior</h3> <p dir="auto"><code class="notranslate">write.lock</code> should be removed now.</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto"><code class="notranslate">write.lock</code> is still present and preventing access by other programs.</p>
<h3 dir="auto">bug report</h3> <p dir="auto">The neo4j-import tool for version 3.0.4 runs of memory, and is not reading the java max heap settings set at the OS level (i.e., it is identifying a max heap of 20.98 gb when the max heap is set at 72gb)</p> <p dir="auto"><strong>Neo4j Version:</strong> 3.0.4<br> <strong>Operating System:</strong> Ubuntu 14.10<br> <strong>API:</strong> neo4j-import</p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">I am trying to import a set of relatively large csv files related to the Microsoft Academic Graph. When I run the neo4j-import tool, the tool arbitrarily selects a maximum Java Heap size of 20gb, even though I have the max heap size set on my machine to ~72gb. After the import tool runs for some time I get a java.lang.OutOfMemoryError: Java heap space.</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">The import tool should handle large data sets without running out of memory.</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">The import tool aborts when the heap space is used. I've pasted the output of the import below.</p> <blockquote> <p dir="auto">Neo4j version: 3.0.4<br> Importing the contents of these files into graph.db:<br> Nodes:<br> :Conference<br> /usr/share/neo4j/import/conference_header.csv<br> /usr/share/neo4j/import/Conferences.txt</p> <p dir="auto">:Author<br> /usr/share/neo4j/import/author_header.csv<br> /usr/share/neo4j/import/Authors.txt</p> <p dir="auto">:FoS<br> /usr/share/neo4j/import/fos_header.csv<br> /usr/share/neo4j/import/fieldsofstudy.csv</p> <p dir="auto">:Journal<br> /usr/share/neo4j/import/journal_header.csv<br> /usr/share/neo4j/import/Journals.txt</p> <p dir="auto">:Paper<br> /usr/share/neo4j/import/paper_header.csv<br> /usr/share/neo4j/import/Papers.txt</p> <p dir="auto">:Affiliation<br> /usr/share/neo4j/import/affiliation_header.csv<br> /usr/share/neo4j/import/Affiliations.txt</p> <p dir="auto">:AuthorAffiliation<br> /usr/share/neo4j/import/authoraffiliations.csv<br> Relationships:<br> :parent_of<br> /usr/share/neo4j/import/fos_hierarchy_header.csv<br> /usr/share/neo4j/import/foshierarchy.csv</p> <p dir="auto">:about<br> /usr/share/neo4j/import/paper_keyword_header.csv<br> /usr/share/neo4j/import/PaperKeywords.txt</p> <p dir="auto">:cited<br> /usr/share/neo4j/import/paper_references_header.csv<br> /usr/share/neo4j/import/PaperReferences.txt</p> <p dir="auto">:wrote<br> /usr/share/neo4j/import/wrote_header.csv<br> /usr/share/neo4j/import/PaperAuthorAffiliations.txt</p> <p dir="auto">:wrote_while_at<br> /usr/share/neo4j/import/authaffilpaper.csv</p> <p dir="auto">:affiliated_with<br> /usr/share/neo4j/import/affiliatedwith.csv</p> <p dir="auto">:published_in<br> /usr/share/neo4j/import/paperjournal.csv<br> /usr/share/neo4j/import/paperconference.csv</p> <p dir="auto">Available memory:<br> Free machine memory: 65.03 GB<br> Max heap memory : 20.98 GB<br> ....<br> *DEDUPLICATE:10.91 GB------------------------------------------------------------------------] 193M<br> Exception in thread "Thread-581" java.lang.OutOfMemoryError: Java heap space<br> at java.util.Arrays.copyOf(Arrays.java:3308)<br> at org.neo4j.unsafe.impl.batchimport.input.BadCollector.collectDuplicateNode(BadCollector.java:113)<br> at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.detectDuplicateInputIds(EncodingIdMapper.java:589)<br> at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.buildCollisionInfo(EncodingIdMapper.java:493)<br> at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.prepare(EncodingIdMapper.java:281)<br> at org.neo4j.unsafe.impl.batchimport.IdMapperPreparationStep.process(IdMapperPreparationStep.java:54)<br> at org.neo4j.unsafe.impl.batchimport.staging.LonelyProcessingStep$1.run(LonelyProcessingStep.java:56)<br> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space<br> at java.util.Arrays.copyOf(Arrays.java:3308)<br> at org.neo4j.unsafe.impl.batchimport.input.BadCollector.collectDuplicateNode(BadCollector.java:113)<br> at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.detectDuplicateInputIds(EncodingIdMapper.java:589)<br> at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.buildCollisionInfo(EncodingIdMapper.java:493)<br> at org.neo4j.unsafe.impl.batchimport.cache.idmapping.string.EncodingIdMapper.prepare(EncodingIdMapper.java:281)<br> at org.neo4j.unsafe.impl.batchimport.IdMapperPreparationStep.process(IdMapperPreparationStep.java:54)<br> at org.neo4j.unsafe.impl.batchimport.staging.LonelyProcessingStep$1.run(LonelyProcessingStep.java:56)</p> </blockquote>
0
<p dir="auto">There are many methods that expect a list or a tensor specifying a shape as argument. It is often the case that I want to pass an argument such as shape=[t1, v2] where t1 is a tensor with shape = TensorShape([]) and v2 is a value. This is currently not possible in many (maybe all) methods.</p> <p dir="auto">My current work around is the following.<br> 1- convert v2 to a tensor t2 with tf.convert_to_tensor<br> 2- use t1 = tf.expand_dims(0, t1) and t2 = tf.expand_dims(0, t2) to add a dimension of size 1 to the tensors<br> 3- pass the argument as shape=tf.concat(0, [t1, t2])</p> <p dir="auto">Am I missing a simpler way to accomplish that? Is it a good idea to add a feature that allows passing mixture of tensors and values inside a list as argument?</p> <p dir="auto">Edit: I just found out that the method tf.pack allows lists with tensors and values as argument. But the method tf.truncated_normal for instance, doesn't allow.<br> I also realized that I can use tf.pack to replace the steps (1,2,3) above. But it still would be nice if all methods had the same behaviour.</p>
<p dir="auto">I'd like to do things such as the following:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; tf.convert_to_tensor([tf.constant(1), 2]) &gt;&gt;&gt; tf.slice(..., [0, 1, some_tensor], ...)"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tf</span>.<span class="pl-en">convert_to_tensor</span>([<span class="pl-s1">tf</span>.<span class="pl-en">constant</span>(<span class="pl-c1">1</span>), <span class="pl-c1">2</span>]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tf</span>.<span class="pl-en">slice</span>(..., [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-s1">some_tensor</span>], ...)</pre></div> <p dir="auto">Currently both of these raise exceptions. The alternative is to use a combination of <code class="notranslate">tf.expand_dims</code> and <code class="notranslate">tf.concat</code>, which is a bit unwieldy.</p>
1
<ul dir="auto"> <li>Electron version: 1.21</li> <li>Operating system: OS X 10.11.2 (15C50)</li> </ul> <p dir="auto">Electron is called by VMD:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ vmd --versions vmd: 1.26.2 electron: 1.2.1 node: 6.1.0 chrome: 51.0.2704.63 v8: 5.1.281.47 openssl: 1.0.2h zlib: 1.2.8"><pre class="notranslate"><code class="notranslate">$ vmd --versions vmd: 1.26.2 electron: 1.2.1 node: 6.1.0 chrome: 51.0.2704.63 v8: 5.1.281.47 openssl: 1.0.2h zlib: 1.2.8 </code></pre></div> <p dir="auto">I'm having trouble reproducing it outside my environment for you. The short version is, Emacs has a VMD preview mode, which ultimately shells out to VMD, which calls Electron like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/usr/local/lib/node_modules/vmd/node_modules/electron-prebuilt/dist/Electron.app/Contents/MacOS/Electron /usr/local/lib/node_modules/vmd/main/main.js /tmp/vmd-preview"><pre class="notranslate"><code class="notranslate">/usr/local/lib/node_modules/vmd/node_modules/electron-prebuilt/dist/Electron.app/Contents/MacOS/Electron /usr/local/lib/node_modules/vmd/main/main.js /tmp/vmd-preview </code></pre></div> <p dir="auto">I'm hoping the stack trace is enough to identify the issue:</p> <p dir="auto"><a href="https://github.com/electron/electron/files/320799/crash.txt">crash.txt</a></p>
<ul dir="auto"> <li><strong>Version</strong>: v6.0.0</li> <li><strong>Platform</strong>: OSX: <code class="notranslate">Darwin steph-mbp 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64</code></li> <li><strong>Subsystem</strong>: GNU Emacs 25.0.93.1 (might affect other clients?)</li> </ul> <p dir="auto">After upgrading 6.0, I can't run <code class="notranslate">npm</code> in an Emacs subshell because it crashes on any call to <code class="notranslate">fs.access</code>; I'm aware this might be Emacs-specific (works fine in iTerm + ZSH) but in the slim case this is an actual regression I'm attaching the full stacktrace from my system.</p> <p dir="auto"><a href="https://github.com/nodejs/node/files/248513/node_2016-05-04-104139_Stephanes-MacBook-Pro.crash.txt">node_2016-05-04-104139_Stephanes-MacBook-Pro.crash.txt</a></p>
1
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2> <p dir="auto">When <code class="notranslate">torch.Tensor</code> is divided by <strong>zero tensors</strong> with data type as <strong>int</strong>, including <strong>int8</strong>, <strong>int32</strong>, <strong>int64</strong>, the program is terminated forcibly and throw <strong>Floating point exception (core dumped) error</strong>.<br> If run the code in jupyter notebook, the kernel would be killed.</p> <p dir="auto">Based on my experiments, the bug happens both in torch 1.0 and torch 1.4.</p> <p dir="auto">However, the bug would not happen if the dividend is not <code class="notranslate">torch.Tensor</code>.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto"><code class="notranslate">torch.ones(3, dtype=torch.int8) / torch.zeros(3, dtype=torch.int8)</code></p> <h2 dir="auto">Expected behavior</h2> <ol dir="auto"> <li><code class="notranslate">ZeroDivisionError: division by zero</code>, which is the common bahavior in python when the divisor is zero.<br> or</li> <li>get <code class="notranslate">tensor(nan)</code>. (when the data type is float, such as <code class="notranslate">torch.zeros(3, dtype=torch.float64) / torch.zeros(3, dtype=torch.float64)</code>)<br> or</li> <li>get <strong>a tensor with very large value</strong>. (when the dividend is an integer or float, such as <code class="notranslate">1 / torch.zeros(3, dtype=torch.int8))</code>)</li> </ol> <h2 dir="auto">Environment</h2> <p dir="auto">PyTorch version: 1.0.1.post2<br> Is debug build: No<br> CUDA used to build PyTorch: 9.0.176</p> <p dir="auto">OS: Ubuntu 16.04.5 LTS<br> GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609<br> CMake version: version 3.6.3</p> <p dir="auto">Python version: 3.6<br> Is CUDA available: Yes<br> CUDA runtime version: Could not collect<br> GPU models and configuration:<br> GPU 0: TITAN Xp<br> GPU 1: TITAN Xp<br> GPU 2: TITAN Xp<br> GPU 3: TITAN Xp</p> <p dir="auto">Nvidia driver version: 384.145<br> cuDNN version: Could not collect</p> <p dir="auto">Versions of relevant libraries:<br> [pip] numpy==1.16.0<br> [pip] numpydoc==0.6.0<br> [pip] torch==1.0.1.post2<br> [pip] torchsummary==1.5.1<br> [pip] torchvision==0.2.1<br> [conda] blas 1.0 mkl <a href="https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free" rel="nofollow">https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free</a><br> [conda] cuda90 1.0 h6433d27_0 pytorch<br> [conda] mkl 2019.1 144 defaults<br> [conda] mkl-include 2019.1 144 defaults<br> [conda] mkl-service 1.1.2 py36_3 <a href="https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free" rel="nofollow">https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free</a><br> [conda] pytorch 0.4.0 py36_cuda9.0.176_cudnn7.1.2_1 [cuda90] <a href="https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch" rel="nofollow">https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch</a><br> [conda] torch 1.0.1.post2 <br> [conda] torchsummary 1.5.1 <br> [conda] torchvision 0.2.1 <br> [conda] torchvision 0.2.1 py_2 <a href="https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch" rel="nofollow">https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch</a></p> <h2 dir="auto">Additional context</h2> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">@zou3519</a></p>
<p dir="auto">This seems to be an issue with TH and not pytorch, the same thing happens in lua torch.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import torch a = torch.IntTensor([0,1]) b = torch.IntTensor([0,1]) print(a.div(b)) # Floating point exception (core dumped)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">torch</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-v">IntTensor</span>([<span class="pl-c1">0</span>,<span class="pl-c1">1</span>]) <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-v">IntTensor</span>([<span class="pl-c1">0</span>,<span class="pl-c1">1</span>]) <span class="pl-en">print</span>(<span class="pl-s1">a</span>.<span class="pl-en">div</span>(<span class="pl-s1">b</span>)) <span class="pl-c"># Floating point exception (core dumped)</span></pre></div> <p dir="auto">Another unrelated weirdness happens with float tensors when the answer is <code class="notranslate">inf</code></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import torch a = torch.FloatTensor([1,1]) b = torch.FloatTensor([0,0]) a.div(b)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">torch</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-v">FloatTensor</span>([<span class="pl-c1">1</span>,<span class="pl-c1">1</span>]) <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-v">FloatTensor</span>([<span class="pl-c1">0</span>,<span class="pl-c1">0</span>]) <span class="pl-s1">a</span>.<span class="pl-en">div</span>(<span class="pl-s1">b</span>)</pre></div> <p dir="auto">which works on lua torch, but gives</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;repr(&lt;torch.FloatTensor at 0x7f8a012eee18&gt;) failed: RuntimeError: inconsistent tensor size at /tmp/pip-zh0a53-build/torch/lib/TH/generic/THTensorMath.c:90&gt;"><pre class="notranslate"><code class="notranslate">&lt;repr(&lt;torch.FloatTensor at 0x7f8a012eee18&gt;) failed: RuntimeError: inconsistent tensor size at /tmp/pip-zh0a53-build/torch/lib/TH/generic/THTensorMath.c:90&gt; </code></pre></div> <p dir="auto">in pytorch.</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">@zou3519</a></p>
1
<h3 dir="auto"><g-emoji class="g-emoji" alias="computer" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4bb.png">💻</g-emoji></h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Would you like to work on a fix?</li> </ul> <h3 dir="auto">How are you using Babel?</h3> <p dir="auto">@babel/eslint-parser</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="// &quot;babel-eslint&quot;: &quot;^10.0.3&quot;, const asyncFn = () =&gt; { return new Promise((reslove) =&gt; { setTimeout(() =&gt; { reslove({ code: 200, // The data may be null data: { items: [], total: '', } }) }) }) } const getAsyncResult = async () =&gt; { const res = await asyncFn(); if (res.code === 200 &amp;&amp; res.data) { // The data may be null // ?with `${variable}` must error res?.data?.items?.forEach((item) =&gt; { item.name = `${item.otherName || 'test'}` }) } } "><pre class="notranslate"><span class="pl-c">// "babel-eslint": "^10.0.3",</span> <span class="pl-k">const</span> <span class="pl-en">asyncFn</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-v">Promise</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">reslove</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">reslove</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">code</span>: <span class="pl-c1">200</span><span class="pl-kos">,</span> <span class="pl-c">// The data may be null</span> <span class="pl-c1">data</span>: <span class="pl-kos">{</span> <span class="pl-c1">items</span>: <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c1">total</span>: <span class="pl-s">''</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-k">const</span> <span class="pl-en">getAsyncResult</span> <span class="pl-c1">=</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">asyncFn</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">res</span><span class="pl-kos">.</span><span class="pl-c1">code</span> <span class="pl-c1">===</span> <span class="pl-c1">200</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">res</span><span class="pl-kos">.</span><span class="pl-c1">data</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// The data may be null</span> <span class="pl-c">// ?with `${variable}` must error </span> <span class="pl-s1">res</span><span class="pl-kos">?.</span><span class="pl-c1">data</span><span class="pl-kos">?.</span><span class="pl-c1">items</span><span class="pl-kos">?.</span><span class="pl-en">forEach</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">item</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">item</span><span class="pl-kos">.</span><span class="pl-c1">name</span> <span class="pl-c1">=</span> <span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">item</span><span class="pl-kos">.</span><span class="pl-c1">otherName</span> <span class="pl-c1">||</span> <span class="pl-s">'test'</span><span class="pl-kos">}</span></span>`</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">Configuration file name</h3> <p dir="auto">babel.config.js</p> <h3 dir="auto">Configuration</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Current and expected behavior</h3> <p dir="auto">I want to use chain operation to avoid errors</p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Babel version(s): [^10.0.3]</li> <li>Node: [v14.7.0]</li> <li>yarn version: [1.22.15]</li> <li>OS: [macOS 11.6.1]</li> </ul> <h3 dir="auto">Possible solution</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Additional context</h3> <p dir="auto"><em>No response</em></p>
<p dir="auto">It throws error when dynamic import, template literal inline and rule <code class="notranslate">template-curly-spacing</code> as follow:</p> <h4 dir="auto">Tested on:</h4> <p dir="auto"><code class="notranslate">babel-eslint@10.0.3</code> (with <code class="notranslate">@babel/parser@7.7.7</code>)<br> <code class="notranslate">eslint@6.7.2</code></p> <h4 dir="auto">Sample code:</h4> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import(`${'package.json'}`)"><pre class="notranslate"><span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s">'package.json'</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span></pre></div> <h4 dir="auto">.eslintrc.json</h4> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;parser&quot;: &quot;babel-eslint&quot;, &quot;rules&quot;: { &quot;template-curly-spacing&quot;: [&quot;error&quot;, &quot;never&quot;] } }"><pre class="notranslate">{ <span class="pl-ent">"parser"</span>: <span class="pl-s"><span class="pl-pds">"</span>babel-eslint<span class="pl-pds">"</span></span>, <span class="pl-ent">"rules"</span>: { <span class="pl-ent">"template-curly-spacing"</span>: [<span class="pl-s"><span class="pl-pds">"</span>error<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>never<span class="pl-pds">"</span></span>] } }</pre></div> <p dir="auto">The problem is coming from <code class="notranslate">@babel/parser@7.7.7</code>, which added <code class="notranslate">ImportExpression</code>.</p> <p dir="auto"><em>Originally posted by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yitomok/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yitomok">@yitomok</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="492992578" data-permission-text="Title is private" data-url="https://github.com/babel/babel-eslint/issues/799" data-hovercard-type="issue" data-hovercard-url="/babel/babel-eslint/issues/799/hovercard?comment_id=567598343&amp;comment_type=issue_comment" href="https://github.com/babel/babel-eslint/issues/799#issuecomment-567598343">babel/babel-eslint#799 (comment)</a></em></p> <hr> <p dir="auto">Edits by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/JLHwung/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/JLHwung">@JLHwung</a></p> <p dir="auto">If you come across this issue from search engine, see below for the solution:</p> <ol dir="auto"> <li>uninstall <code class="notranslate">babel-eslint</code></li> <li>install <code class="notranslate">@babel/eslint-parser</code></li> <li>replace <code class="notranslate">babel-eslint</code> by <code class="notranslate">@babel/eslint-parser</code> in your ESLint config</li> <li>if you use <code class="notranslate">eslint-plugin-babel</code>, do 4.a - 4.c, otherwise skip it<br> 4.a uninstall <code class="notranslate">eslint-plugin-babel</code><br> 4.b install <code class="notranslate">@babel/eslint-plugin</code><br> 4.c replace <code class="notranslate">"babel"</code> or <code class="notranslate">"eslint-plugin-babel"</code> to <code class="notranslate">"@babel"</code></li> <li>The working ESLint config should look like <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="541313842" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/10904" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/10904/hovercard?comment_id=691827355&amp;comment_type=issue_comment" href="https://github.com/babel/babel/issues/10904#issuecomment-691827355">#10904 (comment)</a></li> </ol>
1
<p dir="auto">Annoying problem where the Pop overs don't detect when they're going to be slightly hidden by the size of the viewport. In Tooltipsy and stuff, it detects the edges and moves the wrapper accordingly.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/8d16529db9111212d7ded67ff2fa3822de20c3dcbbaf972533f4f6ec657df257/68747470733a2f2f646c2e64726f70626f782e636f6d2f752f373332333039362f706f706f766572732e504e47"><img src="https://camo.githubusercontent.com/8d16529db9111212d7ded67ff2fa3822de20c3dcbbaf972533f4f6ec657df257/68747470733a2f2f646c2e64726f70626f782e636f6d2f752f373332333039362f706f706f766572732e504e47" alt="Popovers" data-canonical-src="https://dl.dropbox.com/u/7323096/popovers.PNG" style="max-width: 100%;"></a></p>
<p dir="auto">I've just seen that since the version 2.1.X typeahead comes with an AJAX option which it actually comes in handy on many projects since I always had to implement my own autocomplete due to the fact that I would need the data to be fetched as typed.</p> <p dir="auto">The only thing that I think it would be nice to have is a debounce method on the keyup event. As with each letter typed there will be a query, imagine how much payload that means on the server ( the one that takes the query ), and if I type really fast about 3 to 6 letters, that means 6 queries.</p> <p dir="auto">Sometimes you get the second last query result and sometimes ( if you use an external API ) the server might block your API key because of to many queries / second.</p> <p dir="auto">I hope that a debounce method with an option to set the interval would be taken into consideration. I could just due it to my local file, but I think that a lot of devs would appreciate this option :)</p>
0
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>Current Behavior</strong></p> <h3 dir="auto">Mixin method declaration becomes <code class="notranslate">undefined</code></h3> <p dir="auto"><strong>Input Code</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Activatable Mixin class Activatable { isActive: boolean; activate() { this.isActive = true; } deactivate() { this.isActive = false; } } class SmartObject implements Activatable { constructor() { } interact() { this.activate(); } // Activatable isActive: boolean = false; activate: () =&gt; void; deactivate: () =&gt; void; } applyMixins(SmartObject, [Activatable]); let smartObj = new SmartObject(); setTimeout(() =&gt; smartObj.interact(), 1000); // Error: activate is not a method //////////////////////////////////////// // In your runtime library somewhere //////////////////////////////////////// function applyMixins(derivedCtor: any, baseCtors: any[]) { baseCtors.forEach(baseCtor =&gt; { Object.getOwnPropertyNames(baseCtor.prototype).forEach(name =&gt; { Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name)); }); }); } "><pre class="notranslate"><span class="pl-c">// Activatable Mixin</span> <span class="pl-k">class</span> <span class="pl-v">Activatable</span> <span class="pl-kos">{</span> <span class="pl-c1">isActive</span>: <span class="pl-c1">boolean</span><span class="pl-kos">;</span> <span class="pl-en">activate</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">isActive</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">deactivate</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">isActive</span> <span class="pl-c1">=</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-k">class</span> <span class="pl-v">SmartObject</span> <span class="pl-s1">implements</span> <span class="pl-v">Activatable</span> <span class="pl-kos">{</span> <span class="pl-en">constructor</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">interact</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">activate</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c">// Activatable</span> <span class="pl-c1">isActive</span>: <span class="pl-c1">boolean</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-c1">activate</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">void</span><span class="pl-kos">;</span> <span class="pl-c1">deactivate</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">void</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">applyMixins</span><span class="pl-kos">(</span><span class="pl-v">SmartObject</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-v">Activatable</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">let</span> <span class="pl-s1">smartObj</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">SmartObject</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">smartObj</span><span class="pl-kos">.</span><span class="pl-en">interact</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">1000</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Error: activate is not a method</span> <span class="pl-c">////////////////////////////////////////</span> <span class="pl-c">// In your runtime library somewhere</span> <span class="pl-c">////////////////////////////////////////</span> <span class="pl-k">function</span> <span class="pl-en">applyMixins</span><span class="pl-kos">(</span><span class="pl-s1">derivedCtor</span>: <span class="pl-s1">any</span><span class="pl-kos">,</span> <span class="pl-s1">baseCtors</span>: <span class="pl-s1">any</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">baseCtors</span><span class="pl-kos">.</span><span class="pl-en">forEach</span><span class="pl-kos">(</span><span class="pl-s1">baseCtor</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">getOwnPropertyNames</span><span class="pl-kos">(</span><span class="pl-s1">baseCtor</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">forEach</span><span class="pl-kos">(</span><span class="pl-s1">name</span> <span class="pl-c1">=&gt;</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">derivedCtor</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-s1">name</span><span class="pl-kos">,</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">getOwnPropertyDescriptor</span><span class="pl-kos">(</span><span class="pl-s1">baseCtor</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-s1">name</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>Expected behavior/code</strong><br> A clear and concise description of what you expected to happen (or code).</p> <p dir="auto"><strong>Babel Configuration (.babelrc)</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;presets&quot;: [ &quot;@babel/preset-typescript&quot;, [ &quot;@babel/preset-env&quot;, { &quot;modules&quot;: false, &quot;targets&quot;: { &quot;browsers&quot;: [ &quot;&gt; 1%&quot;, &quot;last 2 versions&quot;, &quot;ie &gt;= 10&quot; ] } } ], &quot;@babel/preset-react&quot;, ], &quot;plugins&quot;: [ &quot;react-hot-loader/babel&quot;, &quot;react-require&quot;, &quot;@babel/plugin-proposal-object-rest-spread&quot;, [ &quot;@babel/plugin-proposal-decorators&quot;, { &quot;legacy&quot;: true } ], [ &quot;@babel/plugin-proposal-class-properties&quot;, { &quot;loose&quot;: true } ], &quot;react-html-attrs&quot;, &quot;jsx-control-statements&quot;, [ &quot;@babel/plugin-transform-runtime&quot;, { &quot;corejs&quot;: 2 } ], &quot;@babel/plugin-syntax-dynamic-import&quot;, &quot;@babel/plugin-syntax-import-meta&quot;, &quot;@babel/plugin-proposal-json-strings&quot;, &quot;@babel/plugin-proposal-function-sent&quot;, &quot;@babel/plugin-proposal-export-namespace-from&quot;, &quot;@babel/plugin-proposal-numeric-separator&quot;, &quot;@babel/plugin-proposal-throw-expressions&quot;, &quot;@babel/plugin-proposal-export-default-from&quot;, &quot;@babel/plugin-proposal-logical-assignment-operators&quot;, &quot;@babel/plugin-proposal-optional-chaining&quot;, [ &quot;@babel/plugin-proposal-pipeline-operator&quot;, { &quot;proposal&quot;: &quot;minimal&quot; } ], &quot;@babel/plugin-proposal-nullish-coalescing-operator&quot;, &quot;@babel/plugin-proposal-do-expressions&quot;, &quot;@babel/plugin-proposal-function-bind&quot; ] }"><pre class="notranslate"><span class="pl-kos">{</span> <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span> <span class="pl-s">"@babel/preset-typescript"</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-s">"modules"</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span> <span class="pl-s">"targets"</span>: <span class="pl-kos">{</span> <span class="pl-s">"browsers"</span>: <span class="pl-kos">[</span> <span class="pl-s">"&gt; 1%"</span><span class="pl-kos">,</span> <span class="pl-s">"last 2 versions"</span><span class="pl-kos">,</span> <span class="pl-s">"ie &gt;= 10"</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-s">"@babel/preset-react"</span><span class="pl-kos">,</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">"react-hot-loader/babel"</span><span class="pl-kos">,</span> <span class="pl-s">"react-require"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-object-rest-spread"</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-s">"@babel/plugin-proposal-decorators"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"legacy"</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">"@babel/plugin-proposal-class-properties"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"loose"</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">"react-html-attrs"</span><span class="pl-kos">,</span> <span class="pl-s">"jsx-control-statements"</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-s">"@babel/plugin-transform-runtime"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"corejs"</span>: <span class="pl-c1">2</span> <span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-syntax-dynamic-import"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-syntax-import-meta"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-json-strings"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-function-sent"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-export-namespace-from"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-numeric-separator"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-throw-expressions"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-export-default-from"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-logical-assignment-operators"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-optional-chaining"</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-s">"@babel/plugin-proposal-pipeline-operator"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"proposal"</span>: <span class="pl-s">"minimal"</span> <span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-nullish-coalescing-operator"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-do-expressions"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/plugin-proposal-function-bind"</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):</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;@babel/core&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-class-properties&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-decorators&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-do-expressions&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-export-default-from&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-export-namespace-from&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-function-bind&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-function-sent&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-json-strings&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-logical-assignment-operators&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-nullish-coalescing-operator&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-numeric-separator&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-object-rest-spread&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-optional-chaining&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-pipeline-operator&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-proposal-throw-expressions&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-syntax-dynamic-import&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-syntax-import-meta&quot;: &quot;^7.0.0&quot;, &quot;@babel/plugin-transform-runtime&quot;: &quot;^7.0.0&quot;, &quot;@babel/preset-env&quot;: &quot;^7.0.0&quot;, &quot;@babel/preset-react&quot;: &quot;^7.0.0&quot;, &quot;@babel/preset-typescript&quot;: &quot;^7.3.3&quot;,"><pre class="notranslate"><code class="notranslate"> "@babel/core": "^7.0.0", "@babel/plugin-proposal-class-properties": "^7.0.0", "@babel/plugin-proposal-decorators": "^7.0.0", "@babel/plugin-proposal-do-expressions": "^7.0.0", "@babel/plugin-proposal-export-default-from": "^7.0.0", "@babel/plugin-proposal-export-namespace-from": "^7.0.0", "@babel/plugin-proposal-function-bind": "^7.0.0", "@babel/plugin-proposal-function-sent": "^7.0.0", "@babel/plugin-proposal-json-strings": "^7.0.0", "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", "@babel/plugin-proposal-numeric-separator": "^7.0.0", "@babel/plugin-proposal-object-rest-spread": "^7.0.0", "@babel/plugin-proposal-optional-chaining": "^7.0.0", "@babel/plugin-proposal-pipeline-operator": "^7.0.0", "@babel/plugin-proposal-throw-expressions": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-syntax-import-meta": "^7.0.0", "@babel/plugin-transform-runtime": "^7.0.0", "@babel/preset-env": "^7.0.0", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.3.3", </code></pre></div> <ul dir="auto"> <li>Node/npm version: [Node 10.14.1/npm 6.4.1]</li> <li>OS: OSX 10.12.5</li> <li>Monorepo: no</li> <li>How you are using Babel: <code class="notranslate">loader</code></li> </ul> <p dir="auto"><strong>Possible Solution</strong></p> <p dir="auto">remove all the declaration, not only the types</p> <p dir="auto"><strong>Additional context/Screenshots</strong></p> <p dir="auto">compile typescript using babel-loader :</p> <p dir="auto">SmartObject</p> <ul dir="auto"> <li>activate: undefind</li> <li>deactivate: undefind</li> <li><strong>proto</strong> <ul dir="auto"> <li>activate()</li> <li>deactivate()</li> </ul> </li> </ul> <p dir="auto">compile typescript using ts-loader :</p> <p dir="auto">SmartObject</p> <ul dir="auto"> <li><strong>proto</strong> <ul dir="auto"> <li>activate()</li> <li>deactivate()</li> </ul> </li> </ul>
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>Current Behavior</strong><br> When a class (B) extends another class (A) and includes a type definition to narrow the type of something specified in class A, it will set the narrowed property's value to undefined. This diverges from the TSC behavior.<br> The output from the below code under babel is <code class="notranslate">a, undefined</code>.<br> <strong>Input Code</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" class A { value: any constructor(value: any) { this.value = value } } class B extends A { value: string } document.write(`${new A('a').value}, ${new B('b').value}`)"><pre class="notranslate"> <span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span> <span class="pl-c1">value</span>: <span class="pl-smi">any</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">B</span> <span class="pl-k">extends</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span> <span class="pl-c1">value</span>: <span class="pl-smi">string</span> <span class="pl-kos">}</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">write</span><span class="pl-kos">(</span><span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-k">new</span> <span class="pl-smi">A</span><span class="pl-kos">(</span><span class="pl-s">'a'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-k">new</span> <span class="pl-smi">B</span><span class="pl-kos">(</span><span class="pl-s">'b'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span></pre></div> <p dir="auto"><strong>Expected behavior/code</strong><br> The output from the code should be <code class="notranslate">a, b</code>.</p> <p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p> <p dir="auto">.babelrc:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;presets&quot;: [ &quot;@babel/env&quot;, &quot;@babel/typescript&quot; ], &quot;plugins&quot;: [ &quot;@babel/proposal-class-properties&quot;, &quot;@babel/proposal-object-rest-spread&quot; ] }"><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): 7.1.6</li> <li>Node/npm version: Node 10 / NPM 6</li> <li>OS: Any OS</li> <li>Monorepo: doesn't matter</li> <li>How you are using Babel: loader</li> </ul> <p dir="auto"><strong>Possible Solution</strong><br> It seems like babel is setting <code class="notranslate">value = undefined</code> in the class property - it needs to check if that value is defined in the parent before overwriting it.</p>
1