text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<p dir="auto">The only thing std::time contains is <a href="http://doc.rust-lang.org/std/time/duration/struct.Duration.html" rel="nofollow"><code class="notranslate">Duration</code></a>, which isn't too useful on its own. The real meat of it is in <a href="http://doc.rust-lang.org/time/index.html" rel="nofollow"><code class="notranslate">::time</code></a>.</p> <p dir="auto">Perhaps one should be moved into the other?</p> <p dir="auto">Alternatively, we can add some docs to <code class="notranslate">Duration</code> that explain how to work with it. One common way of getting a <code class="notranslate">Duration</code> is to subtract two instances of <code class="notranslate">time::now().to_timespec()</code>s, however this is completely not obvious on <code class="notranslate">std::time</code>. I don't mind adding these docs.</p>
<p dir="auto"><a href="https://github.com/brson"><img src="https://avatars.githubusercontent.com/u/147214?v=3" align="left" width="96" height="96" hspace="10" style="max-width: 100%;"></a> <strong>Issue by <a href="https://github.com/brson">brson</a></strong><br> <em>Wednesday Jun 04, 2014 at 22:11 GMT</em></p> <p dir="auto"><em>For earlier discussion, see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35009402" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/14657" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/14657/hovercard" href="https://github.com/rust-lang/rust/issues/14657">rust-lang/rust#14657</a></em></p> <p dir="auto"><em>This issue was labelled with: A-libs, I-enhancement in the Rust repository</em></p> <hr> <p dir="auto">Just clone <a href="http://www.joda.org/joda-time/" rel="nofollow">JodaTime</a>. Start out of tree.</p>
1
<h3 dir="auto">Problem description</h3> <p dir="auto">Example: <code class="notranslate">Hidden</code> API docs <code class="notranslate">import type {HiddenProps} from './types'</code>. This is done to prevent a cyclic dependency problem, as the <code class="notranslate">HiddenProps</code> are imported by three (to be four) files:</p> <ol dir="auto"> <li><code class="notranslate">Hidden</code></li> <li><code class="notranslate">HiddenJs</code></li> <li><code class="notranslate">HiddenCss</code> (TBD)</li> <li><code class="notranslate">Grid</code> (tight integration with <code class="notranslate">Hidden</code>)</li> </ol> <p dir="auto">I am very strongly against duplicating props just so we have documentation. In this case, we have two public components so we would probably have three copies of a reasonably extensive set of properties.</p> <p dir="auto">This is not the lone case, as our responsive components reference <code class="notranslate">type Breakpoint</code> as well, though this one seems easier as it is a bit simpler.</p> <p dir="auto">I <a href="https://github.com/reactjs/react-docgen/issues/180" data-hovercard-type="issue" data-hovercard-url="/reactjs/react-docgen/issues/180/hovercard">raised an issue and learned that react-docgen doesn't resolve imported types</a>. I have been thinking about the solution. Duplication is a last resort and I don't think we are there yet.</p> <p dir="auto">Note that this is <a href="https://github.com/reactjs/react-docgen/issues/33" data-hovercard-type="issue" data-hovercard-url="/reactjs/react-docgen/issues/33/hovercard"><em>not specific to use of flow</em>, it is also a problem importing reusable prop-types</a>.</p> <p dir="auto">I am open to ideas on solutions. It is something that must be addressed before <code class="notranslate">next</code> is generally available.</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <p dir="auto">I'm trying to differentiate the icon class style of a switch between checked and unchecked, but it doesn't seem to work</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const styles = { icon: { borderWidth: 0, borderColor: b3, borderStyle: 'solid' }, checked: { '&amp; + $icon': { borderWidth: 1, borderColor: b4, borderStyle: 'solid' }, '&amp; &gt; $icon': { borderWidth: 1, borderColor: b4, borderStyle: 'solid' } }"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">styles</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">icon</span>: <span class="pl-kos">{</span> <span class="pl-c1">borderWidth</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">borderColor</span>: <span class="pl-s1">b3</span><span class="pl-kos">,</span> <span class="pl-c1">borderStyle</span>: <span class="pl-s">'solid'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">checked</span>: <span class="pl-kos">{</span> <span class="pl-s">'&amp; + $icon'</span>: <span class="pl-kos">{</span> <span class="pl-c1">borderWidth</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">borderColor</span>: <span class="pl-s1">b4</span><span class="pl-kos">,</span> <span class="pl-c1">borderStyle</span>: <span class="pl-s">'solid'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">'&amp; &gt; $icon'</span>: <span class="pl-kos">{</span> <span class="pl-c1">borderWidth</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">borderColor</span>: <span class="pl-s1">b4</span><span class="pl-kos">,</span> <span class="pl-c1">borderStyle</span>: <span class="pl-s">'solid'</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <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.27</td> </tr> <tr> <td>React</td> <td>16.2.0</td> </tr> </tbody> </table>
0
<h3 dir="auto">Description</h3> <p dir="auto">When integer inputs are passed in to <code class="notranslate">jax.numpy.divmod</code>, a division/modulo by zero results in inconsistent results when compared with <code class="notranslate">numpy.divmod</code> or the Python operators <code class="notranslate">// and %</code> as shown below:</p> <p dir="auto"><strong><code class="notranslate">jax.numpy.divmod</code></strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import jax.numpy as jnp x1 = jnp.array(3, dtype=&quot;int32&quot;) x2 = jnp.array(0, dtype=&quot;int32&quot;) print(x1) print(x2) print(jnp.divmod(x1, x2))"><pre class="notranslate"><code class="notranslate">import jax.numpy as jnp x1 = jnp.array(3, dtype="int32") x2 = jnp.array(0, dtype="int32") print(x1) print(x2) print(jnp.divmod(x1, x2)) </code></pre></div> <p dir="auto"><em>Captured Output:</em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="3 0 (DeviceArray(-2, dtype=int32), DeviceArray(3, dtype=int32))"><pre class="notranslate"><code class="notranslate">3 0 (DeviceArray(-2, dtype=int32), DeviceArray(3, dtype=int32)) </code></pre></div> <p dir="auto">whereas with <code class="notranslate">numpy.divmod</code>, the output comes out to be:</p> <p dir="auto"><strong><code class="notranslate">numpy.divmod</code></strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np x1 = np.array(3, dtype=&quot;int32&quot;) x2 = np.array(0, dtype=&quot;int32&quot;) print(x1) print(x2) print(np.divmod(x1, x2))"><pre class="notranslate"><code class="notranslate">import numpy as np x1 = np.array(3, dtype="int32") x2 = np.array(0, dtype="int32") print(x1) print(x2) print(np.divmod(x1, x2)) </code></pre></div> <p dir="auto"><em>Captured Output:</em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="3 0 (0, 0)"><pre class="notranslate"><code class="notranslate">3 0 (0, 0) </code></pre></div> <p dir="auto">and with Python's divmod operators:</p> <p dir="auto"><strong><code class="notranslate">//</code> and <code class="notranslate">%</code></strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="x1 = np.array(3, dtype=&quot;int32&quot;) x2 = np.array(0, dtype=&quot;int32&quot;) print(x1) print(x2) print((x1//x2, x1%x2))"><pre class="notranslate"><code class="notranslate">x1 = np.array(3, dtype="int32") x2 = np.array(0, dtype="int32") print(x1) print(x2) print((x1//x2, x1%x2)) </code></pre></div> <p dir="auto"><em>Captured Output:</em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="3 0 (0, 0)"><pre class="notranslate"><code class="notranslate">3 0 (0, 0) </code></pre></div> <p dir="auto">This behaviour does not follow numpy's or python's functional equivalents, even though the same has been claimed in the documentation. This behaviour is also reproducible when the above code is ran with <code class="notranslate">jax.numpy.floor_divide</code>, <code class="notranslate">jax.numpy.divide</code> or <code class="notranslate">jax.numpy.mod</code> methods as those methods probably delegate to the same API in the backend implementation.</p> <h3 dir="auto">What jax/jaxlib version are you using?</h3> <p dir="auto">jax v0.3.14</p> <h3 dir="auto">Which accelerator(s) are you using?</h3> <p dir="auto">CPU</p> <h3 dir="auto">Additional system info</h3> <p dir="auto">Python (v3.8.10), OS (Linux WSL2 Ubuntu 20.04 LTS)</p> <h3 dir="auto">NVIDIA GPU info</h3> <p dir="auto"><em>No response</em></p>
<h3 dir="auto">Description</h3> <p dir="auto">Jax and numpy differ in their behavior with regards to computing a modulus by zero. Jax treats it as a no-op, and numpy treats it as the zero function.</p> <h2 dir="auto">Numpy</h2> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Python 3.10.5 (main, Jul 15 2022, 03:56:49) [GCC 11.3.0] on linux &gt;&gt;&gt; import numpy as np &gt;&gt;&gt; a = np.array([1,2,3], dtype=np.uint32) &gt;&gt;&gt; np.mod(a, 0) &lt;stdin&gt;:1: RuntimeWarning: divide by zero encountered in remainder array([0, 0, 0], dtype=uint32)"><pre class="notranslate"><span class="pl-v">Python</span> <span class="pl-c1">3.10</span><span class="pl-c1">.5</span> (<span class="pl-s1">main</span>, <span class="pl-v">Jul</span> <span class="pl-c1">15</span> <span class="pl-c1">2022</span>, <span class="pl-c1">03</span>:<span class="pl-c1">56</span>:<span class="pl-c1">49</span>) [<span class="pl-v">GCC</span> <span class="pl-c1">11.3</span><span class="pl-c1">.0</span>] <span class="pl-s1">on</span> <span class="pl-s1">linux</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-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">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">uint32</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-en">mod</span>(<span class="pl-s1">a</span>, <span class="pl-c1">0</span>) <span class="pl-c1">&lt;</span><span class="pl-s1">stdin</span><span class="pl-c1">&gt;</span>:<span class="pl-c1">1</span>: <span class="pl-v">RuntimeWarning</span>: <span class="pl-s1">divide</span> <span class="pl-s1">by</span> <span class="pl-s1">zero</span> <span class="pl-s1">encountered</span> <span class="pl-c1">in</span> <span class="pl-s1">remainder</span> <span class="pl-en">array</span>([<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">uint32</span>)</pre></div> <h2 dir="auto">JAX</h2> <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 jnp &gt;&gt;&gt; a = jnp.array([1,2,3], dtype=jnp.uint32) &gt;&gt;&gt; jnp.mod(a, 0) DeviceArray([1, 2, 3], dtype=uint32)"><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">jnp</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">jnp</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">jnp</span>.<span class="pl-s1">uint32</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">jnp</span>.<span class="pl-en">mod</span>(<span class="pl-s1">a</span>, <span class="pl-c1">0</span>) <span class="pl-v">DeviceArray</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">uint32</span>)</pre></div> <h3 dir="auto">What jax/jaxlib version are you using?</h3> <p dir="auto">HEAD</p> <h3 dir="auto">Which accelerator(s) are you using?</h3> <p dir="auto">CPU</p> <h3 dir="auto">Additional System Info</h3> <p dir="auto">Python 3.9, 3.10.5</p>
1
<h2 dir="auto">Steps to Reproduce</h2> <p dir="auto">Install according to directions on <a href="https://flutter.io/docs/get-started/install/linux" rel="nofollow">https://flutter.io/docs/get-started/install/linux</a></p> <p dir="auto">Note the owner and group are unknown (id is 1024). Changed them to root as they are in the standard android-studio install to attempt to fix.</p> <p dir="auto">Problem still is there. Note the bin folder is not available to anyone but owner 1024 (or root if you attempt to fix install).</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bessermt@bessermt-Latitude-E6440 /opt/flutter/bin/cache/dart-sdk $ ls -al total 40 drwxr-xr-x 5 root root 4096 Dec 4 09:32 . drwxr-xr-x 6 root root 4096 Dec 4 09:33 .. drwx------ 3 root root 4096 Nov 29 14:16 bin -rw-r--r-- 1 root root 47 Nov 19 21:36 dartdoc_options.yaml drwxr-xr-x 2 root root 4096 Nov 19 21:42 include drwxr-xr-x 26 root root 4096 Nov 19 21:42 lib -rw-r--r-- 1 root root 2500 Nov 19 21:36 LICENSE -rw-r--r-- 1 root root 936 Nov 19 21:36 README -rw-r--r-- 1 root root 41 Nov 19 21:42 revision -rw-r--r-- 1 root root 14 Nov 19 21:42 version bessermt@bessermt-Latitude-E6440 /opt/flutter/bin/cache/dart-sdk $"><pre class="notranslate"><code class="notranslate">bessermt@bessermt-Latitude-E6440 /opt/flutter/bin/cache/dart-sdk $ ls -al total 40 drwxr-xr-x 5 root root 4096 Dec 4 09:32 . drwxr-xr-x 6 root root 4096 Dec 4 09:33 .. drwx------ 3 root root 4096 Nov 29 14:16 bin -rw-r--r-- 1 root root 47 Nov 19 21:36 dartdoc_options.yaml drwxr-xr-x 2 root root 4096 Nov 19 21:42 include drwxr-xr-x 26 root root 4096 Nov 19 21:42 lib -rw-r--r-- 1 root root 2500 Nov 19 21:36 LICENSE -rw-r--r-- 1 root root 936 Nov 19 21:36 README -rw-r--r-- 1 root root 41 Nov 19 21:42 revision -rw-r--r-- 1 root root 14 Nov 19 21:42 version bessermt@bessermt-Latitude-E6440 /opt/flutter/bin/cache/dart-sdk $ </code></pre></div> <h2 dir="auto">Logs</h2> <p dir="auto">bessermt@bessermt-Latitude-E6440 /opt/flutter $ flutter doctor -v<br> /opt/flutter/bin/flutter: line 177: /opt/flutter/bin/cache/dart-sdk/bin/dart: Permission denied<br> bessermt@bessermt-Latitude-E6440 /opt/flutter $</p>
<p dir="auto">Launching lib/main.dart on iPhone 8 Plus in debug mode...<br> No application found for TargetPlatform.ios.<br> Is your project missing an ios/Runner/Info.plist?<br> Consider running "flutter create ." to create one.<br> Exited (sigterm)</p> <p dir="auto">I want debug with VSCode whih existing project ,But It get this error,<br> but ,I use XCODE is is work</p>
0
<p dir="auto"><strong>I'm submitting a feature request</strong></p> <p dir="auto">Please consider adding <a href="http://usejsdoc.org/" rel="nofollow">JSDoc</a> documentation to Webpack 2. This will allow code completion/inspection of webpack config files for IDE that supports it, such as WebStorm.</p> <p dir="auto"><strong>Webpack version:</strong><br> 2.x</p>
<p dir="auto">npm install is throwing a ton of errors from what looks like webpack. Not sure how to debug;</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kevs-mbp:site kevzettler$ npm -v 2.1.8 kevs-mbp:site kevzettler$ node -v v0.10.33"><pre class="notranslate"><code class="notranslate">kevs-mbp:site kevzettler$ npm -v 2.1.8 kevs-mbp:site kevzettler$ node -v v0.10.33 </code></pre></div> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="npm ERR! install trying to install 1.4.13 to /Users/kevzettler/ct/site/node_modules/webpack npm ERR! install but already installed versions [ '1.4.12' ] npm ERR! install trying to install 0.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/memory-fs npm ERR! install but already installed versions [ '0.1.0' ] npm ERR! install trying to install 0.1.18 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/clone npm ERR! install but already installed versions [ '0.1.18' ] npm ERR! install trying to install 0.1.8 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/tapable npm ERR! install but already installed versions [ '0.1.8' ] npm ERR! install trying to install 0.4.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser npm ERR! install but already installed versions [ '0.4.0' ] npm ERR! install trying to install 0.1.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack npm ERR! install but already installed versions [ '0.1.1' ] npm ERR! install trying to install 0.5.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/mkdirp npm ERR! install but already installed versions [ '0.5.0' ] npm ERR! install trying to install 0.4.8 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/webpack-core npm ERR! install but already installed versions [ '0.4.8' ] npm ERR! install trying to install 0.9.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/async npm ERR! install but already installed versions [ '0.9.0' ] npm ERR! install trying to install 0.7.6 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/enhanced-resolve npm ERR! install but already installed versions [ '0.7.6' ] npm ERR! install trying to install 1.2.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/esprima npm ERR! install but already installed versions [ '1.2.2' ] npm ERR! install trying to install 2.4.15 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js npm ERR! install but already installed versions [ '2.4.15' ] npm ERR! install trying to install 3.0.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs npm ERR! install but already installed versions [ '3.0.4' ] npm ERR! install trying to install 0.10.6 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar npm ERR! install but already installed versions [ '0.10.4' ] npm ERR! install trying to install 0.0.8 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/mkdirp/node_modules/minimist npm ERR! install but already installed versions [ '0.0.8' ] npm ERR! install trying to install 0.1.6 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/async-each npm ERR! install but already installed versions [ '0.1.6' ] npm ERR! install trying to install 1.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp npm ERR! install but already installed versions [ '1.1.0' ] npm ERR! install trying to install 0.3.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents npm ERR! install but already installed versions [ '0.3.1' ] npm ERR! install trying to install 2.0.3 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/enhanced-resolve/node_modules/graceful-fs npm ERR! install but already installed versions [ '2.0.3' ] npm ERR! install trying to install 0.1.40 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/webpack-core/node_modules/source-map npm ERR! install but already installed versions [ '0.1.40' ] npm ERR! install trying to install 2.0.3 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/graceful-fs npm ERR! install but already installed versions [ '2.0.3' ] npm ERR! install trying to install 0.2.14 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/minimatch npm ERR! install but already installed versions [ '0.2.14' ] npm ERR! install trying to install 1.0.33 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream npm ERR! install but already installed versions [ '1.0.33' ] npm ERR! install trying to install 1.3.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents/node_modules/nan npm ERR! install but already installed versions [ '1.3.0' ] npm ERR! install trying to install 0.1.34 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/source-map npm ERR! install but already installed versions [ '0.1.34' ] npm ERR! install trying to install 1.0.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/uglify-to-browserify npm ERR! install but already installed versions [ '1.0.2' ] npm ERR! install trying to install 0.2.10 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/async npm ERR! install but already installed versions [ '0.2.10' ] npm ERR! install trying to install 0.3.7 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/optimist npm ERR! install but already installed versions [ '0.3.7' ] &gt; [email protected] install /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents &gt; node-gyp rebuild SOLINK_MODULE(target) Release/.node SOLINK_MODULE(target) Release/.node: Finished CXX(target) Release/obj.target/fse/fsevents.o SOLINK_MODULE(target) Release/fse.node SOLINK_MODULE(target) Release/fse.node: Finished npm ERR! install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits npm ERR! install but already installed versions [ '2.0.1' ] npm ERR! install trying to install 0.10.31 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/string_decoder npm ERR! install but already installed versions [ '0.10.31' ] npm ERR! install trying to install 0.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/isarray npm ERR! install but already installed versions [ '0.0.1' ] npm ERR! install trying to install 1.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is npm ERR! install but already installed versions [ '1.0.1' ] npm ERR! install trying to install 2.5.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/minimatch/node_modules/lru-cache npm ERR! install but already installed versions [ '2.5.0' ] npm ERR! install trying to install 1.0.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/minimatch/node_modules/sigmund npm ERR! install but already installed versions [ '1.0.0' ] npm ERR! install trying to install 0.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/webpack-core/node_modules/source-map/node_modules/amdefine npm ERR! install but already installed versions [ '0.1.0' ] npm ERR! install trying to install 0.0.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap npm ERR! install but already installed versions [ '0.0.2' ] npm ERR! install trying to install 0.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine npm ERR! install but already installed versions [ '0.1.0' ] npm ERR! install trying to install 0.0.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/https-browserify npm ERR! install but already installed versions [ '0.0.0' ] npm ERR! install trying to install 0.0.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/tty-browserify npm ERR! install but already installed versions [ '0.0.0' ] npm ERR! install trying to install 0.0.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/path-browserify npm ERR! install but already installed versions [ '0.0.0' ] npm ERR! install trying to install 0.0.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/vm-browserify npm ERR! install but already installed versions [ '0.0.4' ] npm ERR! install trying to install 0.1.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/os-browserify npm ERR! install but already installed versions [ '0.1.2' ] npm ERR! install trying to install 0.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/constants-browserify npm ERR! install but already installed versions [ '0.0.1' ] npm ERR! install trying to install 1.1.3 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/domain-browser npm ERR! install but already installed versions [ '1.1.3' ] npm ERR! install trying to install 1.0.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/stream-browserify npm ERR! install but already installed versions [ '1.0.0' ] npm ERR! install trying to install 0.10.31 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/string_decoder npm ERR! install but already installed versions [ '0.10.31' ] npm ERR! install trying to install 0.7.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/process npm ERR! install but already installed versions [ '0.7.0' ] npm ERR! install trying to install 1.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/console-browserify npm ERR! install but already installed versions [ '1.1.0' ] npm ERR! install trying to install 1.3.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/punycode npm ERR! install but already installed versions [ '1.3.2' ] npm ERR! install trying to install 1.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/timers-browserify npm ERR! install but already installed versions [ '1.1.0' ] npm ERR! install trying to install 1.1.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/assert npm ERR! install but already installed versions [ '1.1.2' ] npm ERR! install trying to install 1.7.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify npm ERR! install but already installed versions [ '1.7.0' ] npm ERR! install trying to install 0.10.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/url npm ERR! install but already installed versions [ '0.10.1' ] npm ERR! install trying to install 0.2.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/querystring-es3 npm ERR! install but already installed versions [ '0.2.1' ] npm ERR! install trying to install 0.10.3 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/util npm ERR! install but already installed versions [ '0.10.3' ] npm ERR! install trying to install 1.0.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/events npm ERR! install but already installed versions [ '1.0.2' ] npm ERR! install trying to install 0.1.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/browserify-zlib npm ERR! install but already installed versions [ '0.1.4' ] npm ERR! install trying to install 1.1.13 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/readable-stream npm ERR! install but already installed versions [ '1.1.13' ] npm ERR! install trying to install 2.8.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/buffer npm ERR! install but already installed versions [ '2.8.1' ] npm ERR! install trying to install 3.3.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify npm ERR! install but already installed versions [ '3.3.0' ] npm ERR! install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/stream-browserify/node_modules/inherits npm ERR! install but already installed versions [ '2.0.1' ] npm ERR! install trying to install 0.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/vm-browserify/node_modules/indexof npm ERR! install but already installed versions [ '0.0.1' ] npm ERR! install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/util/node_modules/inherits npm ERR! install but already installed versions [ '2.0.1' ] npm ERR! install trying to install 0.5.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/timers-browserify/node_modules/process npm ERR! install but already installed versions [ '0.5.2' ] npm ERR! install trying to install 1.2.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/url/node_modules/punycode npm ERR! install but already installed versions [ '1.2.4' ] npm ERR! install trying to install 0.1.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/console-browserify/node_modules/date-now npm ERR! install but already installed versions [ '0.1.4' ] npm ERR! install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/node_modules/inherits npm ERR! install but already installed versions [ '2.0.1' ] npm ERR! install trying to install 0.2.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/node_modules/Base64 npm ERR! install but already installed versions [ '0.2.1' ] npm ERR! install trying to install 0.0.7 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/buffer/node_modules/base64-js npm ERR! install but already installed versions [ '0.0.7' ] npm ERR! install trying to install 1.1.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/buffer/node_modules/ieee754 npm ERR! install but already installed versions [ '1.1.4' ] npm ERR! install trying to install 1.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/buffer/node_modules/is-array npm ERR! install but already installed versions [ '1.0.1' ] npm ERR! install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/readable-stream/node_modules/inherits npm ERR! install but already installed versions [ '2.0.1' ] npm ERR! install trying to install 0.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/readable-stream/node_modules/isarray npm ERR! install but already installed versions [ '0.0.1' ] npm ERR! install trying to install 1.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/readable-stream/node_modules/core-util-is npm ERR! install but already installed versions [ '1.0.1' ] npm ERR! install trying to install 0.2.5 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/browserify-zlib/node_modules/pako npm ERR! install but already installed versions [ '0.2.5' ] npm ERR! install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/pbkdf2-compat npm ERR! install but already installed versions [ '2.0.1' ] npm ERR! install trying to install 0.2.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/ripemd160 npm ERR! install but already installed versions [ '0.2.0' ] npm ERR! install trying to install 0.4.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/browserify-aes npm ERR! install but already installed versions [ '0.4.0' ] npm ERR! install trying to install 2.2.6 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js npm ERR! install but already installed versions [ '2.2.6' ] npm ERR! install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/browserify-aes/node_modules/inherits npm ERR! install but already installed versions [ '2.0.1' ]"><pre class="notranslate">npm ERR<span class="pl-k">!</span> install trying to install 1.4.13 to /Users/kevzettler/ct/site/node_modules/webpack npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.4.12<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/memory-fs npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.18 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/clone npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.18<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.8 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/tapable npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.8<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.4.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.4.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.5.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/mkdirp npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.5.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.4.8 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/webpack-core npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.4.8<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.9.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/async npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.9.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.7.6 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/enhanced-resolve npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.7.6<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.2.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/esprima npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.2.2<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.4.15 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.4.15<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 3.0.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>3.0.4<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.10.6 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.10.4<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.8 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/mkdirp/node_modules/minimist npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.8<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.6 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/async-each npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.6<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.1.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.3.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.3.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.0.3 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/enhanced-resolve/node_modules/graceful-fs npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.0.3<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.40 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/webpack-core/node_modules/source-map npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.40<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.0.3 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/graceful-fs npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.0.3<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.2.14 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/minimatch npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.2.14<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.0.33 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.0.33<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.3.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents/node_modules/nan npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.3.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.34 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/source-map npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.34<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.0.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/uglify-to-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.0.2<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.2.10 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/async npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.2.10<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.3.7 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/optimist npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.3.7<span class="pl-pds">'</span></span> ] <span class="pl-k">&gt;</span> [email protected] install /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents <span class="pl-k">&gt;</span> node-gyp rebuild SOLINK_MODULE(target) Release/.node SOLINK_MODULE(target) Release/.node: Finished CXX(target) Release/obj.target/fse/fsevents.o SOLINK_MODULE(target) Release/fse.node SOLINK_MODULE(target) Release/fse.node: Finished npm ERR<span class="pl-k">!</span> install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.10.31 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/string_decoder npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.10.31<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/isarray npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/core-util-is npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.5.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/minimatch/node_modules/lru-cache npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.5.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.0.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/minimatch/node_modules/sigmund npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.0.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/webpack-core/node_modules/source-map/node_modules/amdefine npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.2<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/https-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/tty-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/path-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/vm-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.4<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/os-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.2<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/constants-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.1.3 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/domain-browser npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.1.3<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.0.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/stream-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.0.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.10.31 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/string_decoder npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.10.31<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.7.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/process npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.7.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/console-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.1.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.3.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/punycode npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.3.2<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.1.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/timers-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.1.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.1.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/assert npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.1.2<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.7.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.7.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.10.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/url npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.10.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.2.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/querystring-es3 npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.2.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.10.3 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/util npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.10.3<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.0.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/events npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.0.2<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/browserify-zlib npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.4<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.1.13 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/readable-stream npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.1.13<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.8.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/buffer npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.8.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 3.3.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>3.3.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/stream-browserify/node_modules/inherits npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/vm-browserify/node_modules/indexof npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/util/node_modules/inherits npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.5.2 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/timers-browserify/node_modules/process npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.5.2<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.2.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/url/node_modules/punycode npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.2.4<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.1.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/console-browserify/node_modules/date-now npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.1.4<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/node_modules/inherits npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.2.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/node_modules/Base64 npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.2.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.7 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/buffer/node_modules/base64-js npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.7<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.1.4 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/buffer/node_modules/ieee754 npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.1.4<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/buffer/node_modules/is-array npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/readable-stream/node_modules/inherits npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/readable-stream/node_modules/isarray npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 1.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/readable-stream/node_modules/core-util-is npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>1.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.2.5 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/browserify-zlib/node_modules/pako npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.2.5<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/pbkdf2-compat npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.0.1<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.2.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/ripemd160 npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.2.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 0.4.0 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/browserify-aes npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>0.4.0<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.2.6 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/sha.js npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.2.6<span class="pl-pds">'</span></span> ] npm ERR<span class="pl-k">!</span> install trying to install 2.0.1 to /Users/kevzettler/ct/site/node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/browserify-aes/node_modules/inherits npm ERR<span class="pl-k">!</span> install but already installed versions [ <span class="pl-s"><span class="pl-pds">'</span>2.0.1<span class="pl-pds">'</span></span> ]</pre></div>
0
<p dir="auto">Compiling a custom Bootstrap via the <a href="http://getbootstrap.com/customize/" rel="nofollow">http://getbootstrap.com/customize/</a> website feature generates boostrap.css with selectors in an incorrect order.</p> <p dir="auto">I found this out when trying to figure out why the DIV modal-backdrop was appearing black instead of transparent.<br> As we know.. the order matters!<br> Custom*:<br> .modal-backdrop.in line:5094<br> .fade.in line:5894<br> <a href="http://getbootstrap.com/javascript/#modals" rel="nofollow">http://getbootstrap.com/javascript/#modals</a><br> .modal-backdrop.in line:5665<br> .fade.in line:2366<br> *the only setting I changed for 'custom' was setting @grid-float-breakpoint to 920px</p>
<p dir="auto">I noticed that if you use customizer, this block of css is compiled to the end of bootstrap.css instead of normally around line 2800:</p> <p dir="auto">.fade {<br> opacity: 0;<br> -webkit-transition: opacity 0.15s linear;<br> transition: opacity 0.15s linear;<br> }<br> .fade.in {<br> opacity: 1;<br> }<br> .collapse {<br> display: none;<br> }<br> .collapse.in {<br> display: block;<br> }<br> .collapsing {<br> position: relative;<br> height: 0;<br> overflow: hidden;<br> -webkit-transition: height 0.35s ease;<br> transition: height 0.35s ease;<br> }</p> <p dir="auto">This causes issues such as modals with fade to have a completely black background (as ,fade.in is after .modal-backdrop.in)</p> <p dir="auto">I am not sure if this is an issue with other css blocks as well but so far I haven't noticed any other effects except for this one.</p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=hc" rel="nofollow">HC</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7728?redirect=false" rel="nofollow">SPR-7728</a></strong> and commented</p> <p dir="auto">CollectionToCollectionConverter returns the original source object if the collection is empty. Relevant source code is attached (see convertEmptyVector_shouldReturnEmptyArrayList unit test)</p> <p dir="auto">Best Regards</p> <p dir="auto">Horatiu</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.4</p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/17343/CollectionToCollectionConverterTest.java" rel="nofollow">CollectionToCollectionConverterTest.java</a> (<em>1.44 kB</em>)</li> </ul> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398113677" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13198" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13198/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13198">#13198</a> MapToMapConverter invalidly returns source map for empty maps (<em><strong>"is duplicated by"</strong></em>)</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/58d68cef986aaaf4b6a296b234f8ca4744d357e3/hovercard" href="https://github.com/spring-projects/spring-framework/commit/58d68cef986aaaf4b6a296b234f8ca4744d357e3"><tt>58d68ce</tt></a></p> <p dir="auto"><strong>Backported to:</strong> <a href="https://github.com/spring-projects/spring-framework/milestone/74?closed=1">3.0.7</a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=djpotter77" rel="nofollow">Daniel Potter</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2483?redirect=false" rel="nofollow">SPR-2483</a></strong> and commented</p> <p dir="auto">When DEBUG logging level is turned on the toString() method of RegexpMethodPointcutAdvisor is invoked prior to the setPatterns() method being called to populate the patterns property of the advisor. The toString() method invokes getPointcut() which creates the pointcut and attempts to set the patterns used on the pointcut. The setPatterns() method includes an Assert.notEmpty() on the patterns argument. When this assertion is fired (again, this only happens with a DEBUG log level), the patterns property has not yet been set, which causes the assertion (and therefore the bean creation) to fail. A workaround for this is to use constructor-arg injection to set the patterns and advice.</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0 RC3</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="398069511" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7130" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7130/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7130">#7130</a> Simple RegexpMethodPointcutAdvisor configuration failing in 2.0-rc3 (<em><strong>"duplicates"</strong></em>)</li> </ul>
0
<p dir="auto">This is partly inspired by the discussions in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="96957776" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/12292" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/12292/hovercard" href="https://github.com/JuliaLang/julia/pull/12292">#12292</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="97404453" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/12322" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/12322/hovercard" href="https://github.com/JuliaLang/julia/pull/12322">#12322</a>.</p> <p dir="auto">The <code class="notranslate">@generated</code> macro makes it much easier to generate specialized functions. Hence, I think it might be time for us to upgrade our functor system. So I wrote a small program for concept proof:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# functors specialized based on symbol immutable SFunc{N,Sym} &lt;: Base.Func{N} end @generated function call{S}(f::SFunc{1,S}, x) :($(S)(x)) end # a map function that takes advantage of specialized fun function mymap(f::Function, x) if isgeneric(f) &amp;&amp; is(f.env.module, Base) map(SFunc{1,f.env.name}(), x) else map(f, x) end end # Benchmark function benchmark(X::Array, ntimes::Int) # warming map(abs2, X) mymap(abs2, X) abs2(X) # measuring gc() gc_enable(false) @time for i = 1:ntimes map(abs2, X) end @time for i = 1:ntimes mymap(abs2, X) end @time for i = 1:ntimes abs2(X) end gc_enable(true) end benchmark(randn(1_000_000), 10)"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> functors specialized based on symbol</span> immutable SFunc{N,Sym} <span class="pl-k">&lt;:</span> <span class="pl-c1">Base.Func{N}</span> <span class="pl-k">end</span> <span class="pl-c1">@generated</span> <span class="pl-k">function</span> <span class="pl-en">call</span><span class="pl-c1">{S}</span>(f<span class="pl-k">::</span><span class="pl-c1">SFunc{1,S}</span>, x) :(<span class="pl-k">$</span>(S)(x)) <span class="pl-k">end</span> <span class="pl-c"><span class="pl-c">#</span> a map function that takes advantage of specialized fun</span> <span class="pl-k">function</span> <span class="pl-en">mymap</span>(f<span class="pl-k">::</span><span class="pl-c1">Function</span>, x) <span class="pl-k">if</span> <span class="pl-c1">isgeneric</span>(f) <span class="pl-k">&amp;&amp;</span> <span class="pl-c1">is</span>(f<span class="pl-k">.</span>env<span class="pl-k">.</span>module, Base) <span class="pl-c1">map</span>(<span class="pl-c1">SFunc</span><span class="pl-c1">{1,f.env.name}</span>(), x) <span class="pl-k">else</span> <span class="pl-c1">map</span>(f, x) <span class="pl-k">end</span> <span class="pl-k">end</span> <span class="pl-c"><span class="pl-c">#</span> Benchmark</span> <span class="pl-k">function</span> <span class="pl-en">benchmark</span>(X<span class="pl-k">::</span><span class="pl-c1">Array</span>, ntimes<span class="pl-k">::</span><span class="pl-c1">Int</span>) <span class="pl-c"><span class="pl-c">#</span> warming</span> <span class="pl-c1">map</span>(abs2, X) <span class="pl-c1">mymap</span>(abs2, X) <span class="pl-c1">abs2</span>(X) <span class="pl-c"><span class="pl-c">#</span> measuring</span> <span class="pl-c1">gc</span>() <span class="pl-c1">gc_enable</span>(<span class="pl-c1">false</span>) <span class="pl-c1">@time</span> <span class="pl-k">for</span> i <span class="pl-k">=</span> <span class="pl-c1">1</span><span class="pl-k">:</span>ntimes <span class="pl-c1">map</span>(abs2, X) <span class="pl-k">end</span> <span class="pl-c1">@time</span> <span class="pl-k">for</span> i <span class="pl-k">=</span> <span class="pl-c1">1</span><span class="pl-k">:</span>ntimes <span class="pl-c1">mymap</span>(abs2, X) <span class="pl-k">end</span> <span class="pl-c1">@time</span> <span class="pl-k">for</span> i <span class="pl-k">=</span> <span class="pl-c1">1</span><span class="pl-k">:</span>ntimes <span class="pl-c1">abs2</span>(X) <span class="pl-k">end</span> <span class="pl-c1">gc_enable</span>(<span class="pl-c1">true</span>) <span class="pl-k">end</span> <span class="pl-c1">benchmark</span>(<span class="pl-c1">randn</span>(<span class="pl-c1">1_000_000</span>), <span class="pl-c1">10</span>)</pre></div> <p dir="auto">Result:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 444.635 milliseconds (20000 k allocations: 381 MB) 46.907 milliseconds (20 allocations: 78126 KB) 49.847 milliseconds (20 allocations: 78126 KB)"><pre class="notranslate"><code class="notranslate"> 444.635 milliseconds (20000 k allocations: 381 MB) 46.907 milliseconds (20 allocations: 78126 KB) 49.847 milliseconds (20 allocations: 78126 KB) </code></pre></div> <p dir="auto">So, it looks like it can dramatically improve the performance of many higher-level functions (e.g. <code class="notranslate">map</code>, <code class="notranslate">reduce</code>, <code class="notranslate">broadcast</code>, etc), making their performance on par with manually specialized ones, without even changing the external interface. Also, a big advantage of this as opposed to the current system is that it allows arbitrary named function to be used (instead of just a prescribed list of functions).</p> <p dir="auto">I am proposing:</p> <ul dir="auto"> <li>Introduce the new functor system with a PR (I can do this).</li> <li>Have the operation-dependent promotion (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="96957776" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/12292" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/12292/hovercard" href="https://github.com/JuliaLang/julia/pull/12292">#12292</a>) depend on the new functor.</li> </ul> <p dir="auto">I think the utility of this specialized functor system is far beyond better type promotion.</p> <p dir="auto">By keeping <code class="notranslate">Func{N}</code> as an abstract type, and define a bunch of type alias like below, most of the client codes that depend on old functors would still be working as expected.</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="typealias AddFun SFunc{2, :+} typealias AbsFun SFunc{1, :abs} # ..."><pre class="notranslate">typealias AddFun SFunc{<span class="pl-c1">2</span>, :<span class="pl-k">+</span>} typealias AbsFun SFunc{<span class="pl-c1">1</span>, <span class="pl-c1">:abs</span>} <span class="pl-c"><span class="pl-c">#</span> ...</span></pre></div> <p dir="auto">cc: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timholy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timholy">@timholy</a></p>
<p dir="auto"><code class="notranslate">make testall</code> after latest <code class="notranslate">git pull</code> results in a process that stops at testing <code class="notranslate">cmdlineargs</code> as in</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="... error (2) | 1.12 | 0.00 | 0.0 | 11.33 | 1103.82 cartesian (2) | 0.11 | 0.02 | 17.8 | 1.14 | 1103.82 asmvariant (2) | 0.14 | 0.00 | 0.0 | 2.30 | 1103.82 osutils (2) | 0.02 | 0.00 | 0.0 | 0.23 | 1103.82 channels (2) | 10.55 | 0.70 | 6.6 | 428.04 | 1114.27 iostream (2) | 0.14 | 0.00 | 0.0 | 2.80 | 1114.27 fft (2) | 19.29 | 0.87 | 4.5 | 723.95 | 1118.11 dsp (2) | 6.26 | 0.24 | 3.8 | 266.36 | 1118.11 examples (2) | 13.79 | 0.47 | 3.4 | 648.76 | 1118.11 distributed (4) | 85.59 | 0.00 | 0.0 | 5.12 | 1003.38 cmdlineargs (5) | 111.27 | 0.07 | 0.1 | 65.80 | 952.91 "><pre class="notranslate"><code class="notranslate">... error (2) | 1.12 | 0.00 | 0.0 | 11.33 | 1103.82 cartesian (2) | 0.11 | 0.02 | 17.8 | 1.14 | 1103.82 asmvariant (2) | 0.14 | 0.00 | 0.0 | 2.30 | 1103.82 osutils (2) | 0.02 | 0.00 | 0.0 | 0.23 | 1103.82 channels (2) | 10.55 | 0.70 | 6.6 | 428.04 | 1114.27 iostream (2) | 0.14 | 0.00 | 0.0 | 2.80 | 1114.27 fft (2) | 19.29 | 0.87 | 4.5 | 723.95 | 1118.11 dsp (2) | 6.26 | 0.24 | 3.8 | 266.36 | 1118.11 examples (2) | 13.79 | 0.47 | 3.4 | 648.76 | 1118.11 distributed (4) | 85.59 | 0.00 | 0.0 | 5.12 | 1003.38 cmdlineargs (5) | 111.27 | 0.07 | 0.1 | 65.80 | 952.91 </code></pre></div> <p dir="auto">The system monitor shows there is no activity on any CPU apart from baseline. I force a halt with ctrl+c. Same thing repeated twice in a row reliably. and in each case cmdlineargs was running on a different worker.</p> <p dir="auto">In</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 0.6.0-pre.alpha.250 Commit 43fb9f0* (2017-03-25 05:22 UTC) Platform Info: OS: Linux (x86_64-suse-linux) CPU: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell) LAPACK: libopenblas64_ LIBM: libopenlibm LLVM: libLLVM-3.9.1 (ORCJIT, haswell)"><pre class="notranslate"><code class="notranslate">Julia Version 0.6.0-pre.alpha.250 Commit 43fb9f0* (2017-03-25 05:22 UTC) Platform Info: OS: Linux (x86_64-suse-linux) CPU: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell) LAPACK: libopenblas64_ LIBM: libopenlibm LLVM: libLLVM-3.9.1 (ORCJIT, haswell) </code></pre></div>
0
<p dir="auto">Hi,</p> <p dir="auto">Love the framework. Using it for my company's developer website.</p> <p dir="auto">The Bootstrap documentation has this nice element for creating callouts, e.g. "Alternate elements" in the <a href="http://getbootstrap.com/css/#type-emphasis" rel="nofollow">Italics section of the CSS page</a>.</p> <p dir="auto">It doesn't look like this is part of the framework. It's a very useful feature and I would love to see it officially incorporated and expanded upon.</p>
<p dir="auto">I really like the new callouts in the docs, but ask myself why they are reserved for the docs?<br> They look way better than the default alerts, imo they can be replaced by callouts.</p>
1
<p dir="auto">After running <code class="notranslate">make.bash</code> standard packages are not installed, I need to run <code class="notranslate">go install std</code> to install them:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~/src/go/src$ git status # On branch master # Your branch is up-to-date with 'origin/master'. # nothing to commit, working directory clean ~/src/go/src$ env | grep GO GOROOT=/usr/local/google/home/dvyukov/src/go/src/.. GOPATH=/usr/local/google/home/dvyukov/src/gopath ~/src/go/src$ ./make.bash ##### Building Go bootstrap tool. cmd/dist ##### Building Go toolchain using /usr/local/google/home/dvyukov/go1.4. bootstrap/internal/obj bootstrap/asm/internal/flags bootstrap/compile/internal/big bootstrap/internal/gcprog bootstrap/internal/obj/arm bootstrap/internal/obj/arm64 bootstrap/internal/obj/ppc64 bootstrap/internal/obj/x86 bootstrap/asm/internal/lex bootstrap/link/internal/ld bootstrap/compile/internal/gc bootstrap/asm/internal/arch bootstrap/asm/internal/asm bootstrap/asm bootstrap/link/internal/amd64 bootstrap/link/internal/arm bootstrap/link/internal/arm64 bootstrap/link/internal/ppc64 bootstrap/link/internal/x86 bootstrap/link bootstrap/compile/internal/amd64 bootstrap/compile/internal/arm bootstrap/compile/internal/arm64 bootstrap/compile/internal/ppc64 bootstrap/compile/internal/x86 bootstrap/compile ##### Building go_bootstrap for host, linux/amd64. runtime errors sync/atomic sync internal/singleflight io unicode unicode/utf8 unicode/utf16 bytes math strings strconv bufio sort container/heap encoding/base64 syscall internal/syscall/windows/registry time internal/syscall/windows os reflect fmt encoding encoding/binary encoding/json flag path/filepath path io/ioutil log regexp/syntax regexp go/token go/scanner go/ast go/parser os/exec os/signal net/url text/template/parse text/template go/doc go/build hash crypto crypto/sha1 debug/dwarf debug/elf cmd/go ##### Building packages and commands for linux/amd64. runtime sync/atomic unicode errors unicode/utf8 math sort container/list container/ring crypto/subtle encoding image/color unicode/utf16 runtime/race cmd/vet/whitelist sync container/heap image/color/palette io internal/singleflight syscall hash crypto/cipher runtime/trace hash/crc32 hash/adler32 crypto/hmac hash/crc64 hash/fnv bytes strings bufio text/tabwriter path html strconv math/rand math/cmplx time internal/syscall/unix compress/bzip2 reflect regexp/syntax crypto crypto/aes crypto/rc4 encoding/base64 encoding/ascii85 encoding/base32 image crypto/sha512 crypto/md5 crypto/sha1 crypto/sha256 encoding/pem os image/internal/imageutil image/draw image/jpeg regexp os/signal path/filepath io/ioutil os/exec encoding/binary fmt cmd/pprof/internal/svg crypto/des index/suffixarray cmd/internal/rsc.io/x86/x86asm log cmd/internal/rsc.io/arm/armasm debug/gosym flag debug/dwarf debug/plan9obj archive/tar compress/flate compress/lzw math/big encoding/hex go/token database/sql/driver encoding/csv encoding/gob encoding/json mime encoding/xml mime/quotedprintable net/http/internal net/url text/template/parse text/scanner runtime/pprof internal/trace net/internal/socktest runtime/debug cmd/compile/internal/big cmd/internal/gcprog cmd/pprof/internal/tempfile testing/iotest cmd/pack go/scanner image/gif database/sql cmd/internal/obj testing/quick cmd/asm/internal/flags cmd/dist go/ast testing archive/zip compress/gzip compress/zlib image/png text/template cmd/pprof/internal/profile internal/testenv crypto/elliptic encoding/asn1 crypto/dsa crypto/rand go/constant debug/elf debug/macho debug/pe cmd/internal/obj/ppc64 cmd/internal/obj/arm64 cmd/internal/obj/arm cmd/internal/goobj cmd/internal/obj/x86 cmd/asm/internal/lex cmd/compile/internal/gc go/parser go/printer crypto/rsa crypto/x509/pkix crypto/ecdsa html/template go/doc cmd/internal/objfile cmd/link/internal/ld cmd/pprof/internal/plugin cmd/pprof/internal/symbolz cmd/pprof/internal/symbolizer go/types cmd/cgo internal/format cmd/addr2line cmd/nm cmd/objdump cmd/asm/internal/arch go/build go/format cmd/gofmt cmd/fix cmd/yacc cmd/pprof/internal/report cmd/asm/internal/asm cmd/cover cmd/doc cmd/newlink cmd/asm cmd/pprof/internal/commands cmd/pprof/internal/driver go/internal/gccgoimporter go/internal/gcimporter cmd/api cmd/link/internal/amd64 cmd/link/internal/arm cmd/link/internal/arm64 cmd/link/internal/ppc64 cmd/link/internal/x86 runtime/cgo go/importer cmd/vet cmd/link net os/user crypto/x509 net/textproto log/syslog mime/multipart net/mail crypto/tls cmd/compile/internal/amd64 cmd/compile/internal/arm cmd/compile/internal/arm64 cmd/compile/internal/ppc64 cmd/compile/internal/x86 net/http net/smtp cmd/compile net/http/cgi expvar net/http/cookiejar net/http/httptest net/http/httputil net/http/pprof net/rpc cmd/go cmd/pprof/internal/fetch cmd/trace cmd/pprof net/http/fcgi net/rpc/jsonrpc --- Installed Go for linux/amd64 in /usr/local/google/home/dvyukov/src/go Installed commands in /usr/local/google/home/dvyukov/src/go/bin ~/src/go/src$ go install -v std runtime sync/atomic unicode errors unicode/utf8 math sort container/list container/ring crypto/subtle encoding unicode/utf16 image/color runtime/race sync container/heap image/color/palette io syscall internal/singleflight crypto/cipher hash runtime/trace hash/crc32 hash/adler32 crypto/hmac hash/crc64 hash/fnv bytes strings strconv math/rand math/cmplx bufio text/tabwriter path html time internal/syscall/unix compress/bzip2 reflect crypto crypto/aes crypto/rc4 encoding/base64 encoding/ascii85 encoding/base32 regexp/syntax image crypto/md5 crypto/sha512 crypto/sha1 crypto/sha256 encoding/pem os image/internal/imageutil image/draw image/jpeg regexp path/filepath os/signal fmt encoding/binary io/ioutil os/exec crypto/des index/suffixarray compress/flate compress/lzw archive/tar math/big encoding/hex debug/dwarf flag go/token database/sql/driver debug/gosym debug/plan9obj encoding/csv encoding/gob encoding/json encoding/xml log mime mime/quotedprintable net/http/internal net/url text/template/parse text/scanner runtime/pprof internal/trace net/internal/socktest runtime/debug image/gif go/scanner database/sql testing/iotest testing/quick testing go/ast archive/zip compress/gzip compress/zlib image/png text/template internal/testenv debug/elf debug/pe debug/macho crypto/dsa encoding/asn1 crypto/elliptic crypto/rand go/constant go/parser go/printer crypto/rsa crypto/ecdsa crypto/x509/pkix go/doc html/template go/types runtime/cgo internal/format go/format go/build net os/user go/internal/gccgoimporter go/internal/gcimporter go/importer crypto/x509 net/textproto log/syslog mime/multipart net/mail crypto/tls net/http net/smtp expvar net/http/cgi net/http/cookiejar net/http/httptest net/http/httputil net/http/pprof net/rpc net/http/fcgi net/rpc/jsonrpc ~/src/go/src$ go install -v std ~/src/go/src$ go version go version devel +e3c26b2 Mon Aug 3 16:06:52 2015 +0000 linux/amd64"><pre class="notranslate"><code class="notranslate">~/src/go/src$ git status # On branch master # Your branch is up-to-date with 'origin/master'. # nothing to commit, working directory clean ~/src/go/src$ env | grep GO GOROOT=/usr/local/google/home/dvyukov/src/go/src/.. GOPATH=/usr/local/google/home/dvyukov/src/gopath ~/src/go/src$ ./make.bash ##### Building Go bootstrap tool. cmd/dist ##### Building Go toolchain using /usr/local/google/home/dvyukov/go1.4. bootstrap/internal/obj bootstrap/asm/internal/flags bootstrap/compile/internal/big bootstrap/internal/gcprog bootstrap/internal/obj/arm bootstrap/internal/obj/arm64 bootstrap/internal/obj/ppc64 bootstrap/internal/obj/x86 bootstrap/asm/internal/lex bootstrap/link/internal/ld bootstrap/compile/internal/gc bootstrap/asm/internal/arch bootstrap/asm/internal/asm bootstrap/asm bootstrap/link/internal/amd64 bootstrap/link/internal/arm bootstrap/link/internal/arm64 bootstrap/link/internal/ppc64 bootstrap/link/internal/x86 bootstrap/link bootstrap/compile/internal/amd64 bootstrap/compile/internal/arm bootstrap/compile/internal/arm64 bootstrap/compile/internal/ppc64 bootstrap/compile/internal/x86 bootstrap/compile ##### Building go_bootstrap for host, linux/amd64. runtime errors sync/atomic sync internal/singleflight io unicode unicode/utf8 unicode/utf16 bytes math strings strconv bufio sort container/heap encoding/base64 syscall internal/syscall/windows/registry time internal/syscall/windows os reflect fmt encoding encoding/binary encoding/json flag path/filepath path io/ioutil log regexp/syntax regexp go/token go/scanner go/ast go/parser os/exec os/signal net/url text/template/parse text/template go/doc go/build hash crypto crypto/sha1 debug/dwarf debug/elf cmd/go ##### Building packages and commands for linux/amd64. runtime sync/atomic unicode errors unicode/utf8 math sort container/list container/ring crypto/subtle encoding image/color unicode/utf16 runtime/race cmd/vet/whitelist sync container/heap image/color/palette io internal/singleflight syscall hash crypto/cipher runtime/trace hash/crc32 hash/adler32 crypto/hmac hash/crc64 hash/fnv bytes strings bufio text/tabwriter path html strconv math/rand math/cmplx time internal/syscall/unix compress/bzip2 reflect regexp/syntax crypto crypto/aes crypto/rc4 encoding/base64 encoding/ascii85 encoding/base32 image crypto/sha512 crypto/md5 crypto/sha1 crypto/sha256 encoding/pem os image/internal/imageutil image/draw image/jpeg regexp os/signal path/filepath io/ioutil os/exec encoding/binary fmt cmd/pprof/internal/svg crypto/des index/suffixarray cmd/internal/rsc.io/x86/x86asm log cmd/internal/rsc.io/arm/armasm debug/gosym flag debug/dwarf debug/plan9obj archive/tar compress/flate compress/lzw math/big encoding/hex go/token database/sql/driver encoding/csv encoding/gob encoding/json mime encoding/xml mime/quotedprintable net/http/internal net/url text/template/parse text/scanner runtime/pprof internal/trace net/internal/socktest runtime/debug cmd/compile/internal/big cmd/internal/gcprog cmd/pprof/internal/tempfile testing/iotest cmd/pack go/scanner image/gif database/sql cmd/internal/obj testing/quick cmd/asm/internal/flags cmd/dist go/ast testing archive/zip compress/gzip compress/zlib image/png text/template cmd/pprof/internal/profile internal/testenv crypto/elliptic encoding/asn1 crypto/dsa crypto/rand go/constant debug/elf debug/macho debug/pe cmd/internal/obj/ppc64 cmd/internal/obj/arm64 cmd/internal/obj/arm cmd/internal/goobj cmd/internal/obj/x86 cmd/asm/internal/lex cmd/compile/internal/gc go/parser go/printer crypto/rsa crypto/x509/pkix crypto/ecdsa html/template go/doc cmd/internal/objfile cmd/link/internal/ld cmd/pprof/internal/plugin cmd/pprof/internal/symbolz cmd/pprof/internal/symbolizer go/types cmd/cgo internal/format cmd/addr2line cmd/nm cmd/objdump cmd/asm/internal/arch go/build go/format cmd/gofmt cmd/fix cmd/yacc cmd/pprof/internal/report cmd/asm/internal/asm cmd/cover cmd/doc cmd/newlink cmd/asm cmd/pprof/internal/commands cmd/pprof/internal/driver go/internal/gccgoimporter go/internal/gcimporter cmd/api cmd/link/internal/amd64 cmd/link/internal/arm cmd/link/internal/arm64 cmd/link/internal/ppc64 cmd/link/internal/x86 runtime/cgo go/importer cmd/vet cmd/link net os/user crypto/x509 net/textproto log/syslog mime/multipart net/mail crypto/tls cmd/compile/internal/amd64 cmd/compile/internal/arm cmd/compile/internal/arm64 cmd/compile/internal/ppc64 cmd/compile/internal/x86 net/http net/smtp cmd/compile net/http/cgi expvar net/http/cookiejar net/http/httptest net/http/httputil net/http/pprof net/rpc cmd/go cmd/pprof/internal/fetch cmd/trace cmd/pprof net/http/fcgi net/rpc/jsonrpc --- Installed Go for linux/amd64 in /usr/local/google/home/dvyukov/src/go Installed commands in /usr/local/google/home/dvyukov/src/go/bin ~/src/go/src$ go install -v std runtime sync/atomic unicode errors unicode/utf8 math sort container/list container/ring crypto/subtle encoding unicode/utf16 image/color runtime/race sync container/heap image/color/palette io syscall internal/singleflight crypto/cipher hash runtime/trace hash/crc32 hash/adler32 crypto/hmac hash/crc64 hash/fnv bytes strings strconv math/rand math/cmplx bufio text/tabwriter path html time internal/syscall/unix compress/bzip2 reflect crypto crypto/aes crypto/rc4 encoding/base64 encoding/ascii85 encoding/base32 regexp/syntax image crypto/md5 crypto/sha512 crypto/sha1 crypto/sha256 encoding/pem os image/internal/imageutil image/draw image/jpeg regexp path/filepath os/signal fmt encoding/binary io/ioutil os/exec crypto/des index/suffixarray compress/flate compress/lzw archive/tar math/big encoding/hex debug/dwarf flag go/token database/sql/driver debug/gosym debug/plan9obj encoding/csv encoding/gob encoding/json encoding/xml log mime mime/quotedprintable net/http/internal net/url text/template/parse text/scanner runtime/pprof internal/trace net/internal/socktest runtime/debug image/gif go/scanner database/sql testing/iotest testing/quick testing go/ast archive/zip compress/gzip compress/zlib image/png text/template internal/testenv debug/elf debug/pe debug/macho crypto/dsa encoding/asn1 crypto/elliptic crypto/rand go/constant go/parser go/printer crypto/rsa crypto/ecdsa crypto/x509/pkix go/doc html/template go/types runtime/cgo internal/format go/format go/build net os/user go/internal/gccgoimporter go/internal/gcimporter go/importer crypto/x509 net/textproto log/syslog mime/multipart net/mail crypto/tls net/http net/smtp expvar net/http/cgi net/http/cookiejar net/http/httptest net/http/httputil net/http/pprof net/rpc net/http/fcgi net/rpc/jsonrpc ~/src/go/src$ go install -v std ~/src/go/src$ go version go version devel +e3c26b2 Mon Aug 3 16:06:52 2015 +0000 linux/amd64 </code></pre></div>
<p dir="auto">One symptom:<br> The behavior of <code class="notranslate">GOROOT_BOOTSTRAP=$HOME/go1.5-bootstrap ./make.bash</code> and<br> <code class="notranslate">GOROOT_BOOTSTRAP=$HOME/go1.5-bootstrap/ ./make.bash</code> are vastly different<br> even though the only difference is just a trailing slash added to GOROOT.<br> ($HOME/go1.5-bootstrap is a Go 1.5 installation)</p> <p dir="auto">The first will not rebuild std in $GOROOT_BOOTSTRAP, however, the later will.</p> <p dir="auto">An easier repro:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ goroot=`go env GOROOT` $ cd $goroot/src; ./make.bash # a fresh build $ GOROOT=$goroot go build -v ../test/helloworld.go # it only build helloworld.go $ GOROOT=$goroot/ go build -v ../test/helloworld.go # it will recompile runtime"><pre class="notranslate"><code class="notranslate">$ goroot=`go env GOROOT` $ cd $goroot/src; ./make.bash # a fresh build $ GOROOT=$goroot go build -v ../test/helloworld.go # it only build helloworld.go $ GOROOT=$goroot/ go build -v ../test/helloworld.go # it will recompile runtime </code></pre></div> <p dir="auto">This behavior suggests that some paths that get included in the buildid hash<br> are not properly Cleaned.</p>
1
<p dir="auto">After a recent upgrade to the latest version of tensorflow in github, several things stop working. I found out that all the optimizers, such as Adam or Adagrad are now producing an error related to variable scope that I have not managed to solve yet. However, GradientDescentOptimizer works fine.</p> <p dir="auto">It may be related to the issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="189883954" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/5652" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/5652/hovercard" href="https://github.com/tensorflow/tensorflow/issues/5652">#5652</a></p> <p dir="auto">The error looks like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py&quot;, line 651, in _get_single_variable &quot;VarScope?&quot; % name) ValueError: Variable filter/Adadelta/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope? "><pre class="notranslate"><code class="notranslate">File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 651, in _get_single_variable "VarScope?" % name) ValueError: Variable filter/Adadelta/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope? </code></pre></div> <p dir="auto">It works fine with tensorflow r11</p> <p dir="auto">Operating System: Ubuntu 16 and Ubuntu 14<br> Installed version of CUDA and cuDNN: cuda 8.0, cuda 5.1<br> <a href="https://github.com/tensorflow/tensorflow/files/642888/cuda.txt">cuda.txt</a><br> The commit hash <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/6dc8deaed8d8bd9cc6d52a03474d0b82891c8b86/hovercard" href="https://github.com/tensorflow/tensorflow/commit/6dc8deaed8d8bd9cc6d52a03474d0b82891c8b86"><tt>6dc8dea</tt></a><br> Build time: Wed Nov 2 17:54:14 2016 (1478109254)<br> Build timestamp: 1478109254<br> Build timestamp as int: 1478109254</p> <p dir="auto">Find below a minimal version that causes the error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import tensorflow as tf import pdb def main(): ## !!! change this to test the different behaviors !!! #optimizer = tf.train.GradientDescentOptimizer(1e-3) # This one is working optimizer = tf.train.AdamOptimizer(1e-3, beta1=0.9, beta2=0.999999) # This one is not working #optimizer = tf.train.AdagradOptimizer(1e-3) # This one is not working #optimizer = tf.train.AdadeltaOptimizer(1e-3) # This one is not working list_grads = [] for i in xrange(2): with tf.device('/gpu:%d' % i): with tf.name_scope('%d' % i) as scope: W = tf.get_variable(name=&quot;filter&quot;, initializer=tf.random_uniform_initializer(dtype=tf.float32), shape=[5, 1]) X = tf.get_variable(name=&quot;data&quot;, initializer=tf.random_uniform_initializer(dtype=tf.float32), shape=[5, 1]) Y_ = tf.get_variable(name=&quot;out&quot;, initializer=tf.random_uniform_initializer(dtype=tf.float32), shape=[5, 1]) Y = W+X loss =tf.reduce_mean(Y-Y_) grad = optimizer.compute_gradients(loss) list_grads.append(grad) tf.get_variable_scope().reuse_variables() grads = list_grads[0] + list_grads[1] #pdb.set_trace() op_train = optimizer.apply_gradients(grads) init_global = tf.global_variables_initializer() init_local = tf.local_variables_initializer() sess = tf.Session() sess.run([init_global, init_local]) _, sol = sess.run([op_train, loss]) print(str(sol)) if (__name__ == '__main__'): main()"><pre class="notranslate"><code class="notranslate">import tensorflow as tf import pdb def main(): ## !!! change this to test the different behaviors !!! #optimizer = tf.train.GradientDescentOptimizer(1e-3) # This one is working optimizer = tf.train.AdamOptimizer(1e-3, beta1=0.9, beta2=0.999999) # This one is not working #optimizer = tf.train.AdagradOptimizer(1e-3) # This one is not working #optimizer = tf.train.AdadeltaOptimizer(1e-3) # This one is not working list_grads = [] for i in xrange(2): with tf.device('/gpu:%d' % i): with tf.name_scope('%d' % i) as scope: W = tf.get_variable(name="filter", initializer=tf.random_uniform_initializer(dtype=tf.float32), shape=[5, 1]) X = tf.get_variable(name="data", initializer=tf.random_uniform_initializer(dtype=tf.float32), shape=[5, 1]) Y_ = tf.get_variable(name="out", initializer=tf.random_uniform_initializer(dtype=tf.float32), shape=[5, 1]) Y = W+X loss =tf.reduce_mean(Y-Y_) grad = optimizer.compute_gradients(loss) list_grads.append(grad) tf.get_variable_scope().reuse_variables() grads = list_grads[0] + list_grads[1] #pdb.set_trace() op_train = optimizer.apply_gradients(grads) init_global = tf.global_variables_initializer() init_local = tf.local_variables_initializer() sess = tf.Session() sess.run([init_global, init_local]) _, sol = sess.run([op_train, loss]) print(str(sol)) if (__name__ == '__main__'): main() </code></pre></div>
<p dir="auto">Hello,</p> <p dir="auto">I have the following error when I try to compile the pip package from the source code.</p> <h3 dir="auto">Environment info</h3> <p dir="auto">Operating System: Ubuntu 14.04</p> <p dir="auto">Installed version of CUDA and cuDNN:<br> (please attach the output of <code class="notranslate">ls -l /path/to/cuda/lib/libcud*</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ls -l /usr/local/cuda/lib64/libcud* -rw-r--r-- 1 root root 322936 Aug 15 2015 /usr/local/cuda/lib64/libcudadevrt.a lrwxrwxrwx 1 root root 16 Aug 15 2015 /usr/local/cuda/lib64/libcudart.so -&gt; libcudart.so.7.5 lrwxrwxrwx 1 root root 19 Aug 15 2015 /usr/local/cuda/lib64/libcudart.so.7.5 -&gt; libcudart.so.7.5.18 -rwxr-xr-x 1 root root 383336 Aug 15 2015 /usr/local/cuda/lib64/libcudart.so.7.5.18 -rw-r--r-- 1 root root 720192 Aug 15 2015 /usr/local/cuda/lib64/libcudart_static.a lrwxrwxrwx 1 root root 13 Feb 9 18:48 /usr/local/cuda/lib64/libcudnn.so -&gt; libcudnn.so.4 lrwxrwxrwx 1 root root 17 Feb 9 18:48 /usr/local/cuda/lib64/libcudnn.so.4 -&gt; libcudnn.so.4.0.7 -rwxrwxr-x 1 root root 61453024 Feb 8 23:12 /usr/local/cuda/lib64/libcudnn.so.4.0.7 -rw-rw-r-- 1 root root 62025862 Feb 8 23:12 /usr/local/cuda/lib64/libcudnn_static.a"><pre class="notranslate"><code class="notranslate">ls -l /usr/local/cuda/lib64/libcud* -rw-r--r-- 1 root root 322936 Aug 15 2015 /usr/local/cuda/lib64/libcudadevrt.a lrwxrwxrwx 1 root root 16 Aug 15 2015 /usr/local/cuda/lib64/libcudart.so -&gt; libcudart.so.7.5 lrwxrwxrwx 1 root root 19 Aug 15 2015 /usr/local/cuda/lib64/libcudart.so.7.5 -&gt; libcudart.so.7.5.18 -rwxr-xr-x 1 root root 383336 Aug 15 2015 /usr/local/cuda/lib64/libcudart.so.7.5.18 -rw-r--r-- 1 root root 720192 Aug 15 2015 /usr/local/cuda/lib64/libcudart_static.a lrwxrwxrwx 1 root root 13 Feb 9 18:48 /usr/local/cuda/lib64/libcudnn.so -&gt; libcudnn.so.4 lrwxrwxrwx 1 root root 17 Feb 9 18:48 /usr/local/cuda/lib64/libcudnn.so.4 -&gt; libcudnn.so.4.0.7 -rwxrwxr-x 1 root root 61453024 Feb 8 23:12 /usr/local/cuda/lib64/libcudnn.so.4.0.7 -rw-rw-r-- 1 root root 62025862 Feb 8 23:12 /usr/local/cuda/lib64/libcudnn_static.a </code></pre></div> <p dir="auto">If installed from sources, provide the commit hash: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/5c44302d778f43a13bf1b97bffd0b2b6be46ae2f/hovercard" href="https://github.com/tensorflow/tensorflow/commit/5c44302d778f43a13bf1b97bffd0b2b6be46ae2f"><tt>5c44302</tt></a></p> <h3 dir="auto">Steps to reproduce</h3> <ol dir="auto"> <li>git clone <a href="https://github.com/tensorflow/tensorflow">https://github.com/tensorflow/tensorflow</a></li> <li>cd tensorflow</li> <li>./configure</li> <li>bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer</li> <li>bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package</li> <li>bazel test -c opt --config=cuda //tensorflow/python:graph_util_test</li> </ol> <h3 dir="auto">Logs or other output that would be helpful</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bazel test -c opt --config=cuda //tensorflow/python:graph_util_test WARNING: Output base '/homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7' is on NFS. This may lead to surprising failures and undetermined behavior. WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/protobuf/WORKSPACE:1: Workspace name in /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/protobuf/WORKSPACE (@__main__) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions. WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/re2/WORKSPACE:1: Workspace name in /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/re2/WORKSPACE (@__main__) does not match the name given in the repository's definition (@re2); this will cause a build error in future versions. WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/highwayhash/WORKSPACE:1: Workspace name in /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/highwayhash/WORKSPACE (@__main__) does not match the name given in the repository's definition (@highwayhash); this will cause a build error in future versions. WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/WORKSPACE:1: Workspace name in /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/WORKSPACE (@__main__) does not match the name given in the repository's definition (@gemmlowp); this will cause a build error in future versions. WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/public/bit_depth.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/public/gemmlowp.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/public/map.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/public/output_stages.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/profiling/instrumentation.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/profiling/profiler.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /home/plu/git/tensorflow/util/python/BUILD:11:16: in includes attribute of cc_library rule //util/python:python_headers: 'python_include' resolves to 'util/python/python_include' not in 'third_party'. This will be an error in the future. INFO: Found 1 test target... Slow read: a 160721045-byte read from /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/bin/tensorflow/python/_pywrap_tensorflow.so took 13761ms. FAIL: //tensorflow/python:graph_util_test (see /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/testlogs/tensorflow/python/graph_util_test/test.log). Target //tensorflow/python:graph_util_test up-to-date: bazel-bin/tensorflow/python/graph_util_test INFO: Elapsed time: 57.357s, Critical Path: 44.71s //tensorflow/python:graph_util_test FAILED in 0.5s /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/testlogs/tensorflow/python/graph_util_test/test.log"><pre class="notranslate"><code class="notranslate">bazel test -c opt --config=cuda //tensorflow/python:graph_util_test WARNING: Output base '/homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7' is on NFS. This may lead to surprising failures and undetermined behavior. WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/protobuf/WORKSPACE:1: Workspace name in /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/protobuf/WORKSPACE (@__main__) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions. WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/re2/WORKSPACE:1: Workspace name in /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/re2/WORKSPACE (@__main__) does not match the name given in the repository's definition (@re2); this will cause a build error in future versions. WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/highwayhash/WORKSPACE:1: Workspace name in /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/highwayhash/WORKSPACE (@__main__) does not match the name given in the repository's definition (@highwayhash); this will cause a build error in future versions. WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/WORKSPACE:1: Workspace name in /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/WORKSPACE (@__main__) does not match the name given in the repository's definition (@gemmlowp); this will cause a build error in future versions. WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/public/bit_depth.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/public/gemmlowp.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/public/map.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/public/output_stages.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/profiling/instrumentation.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/external/gemmlowp/BUILD:102:12: in hdrs attribute of cc_library rule @gemmlowp//:eight_bit_int_gemm: Artifact 'external/gemmlowp/profiling/profiler.h' is duplicated (through '@gemmlowp//:eight_bit_int_gemm_public_headers' and '@gemmlowp//:gemmlowp_headers'). WARNING: /home/plu/git/tensorflow/util/python/BUILD:11:16: in includes attribute of cc_library rule //util/python:python_headers: 'python_include' resolves to 'util/python/python_include' not in 'third_party'. This will be an error in the future. INFO: Found 1 test target... Slow read: a 160721045-byte read from /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/bin/tensorflow/python/_pywrap_tensorflow.so took 13761ms. FAIL: //tensorflow/python:graph_util_test (see /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/testlogs/tensorflow/python/graph_util_test/test.log). Target //tensorflow/python:graph_util_test up-to-date: bazel-bin/tensorflow/python/graph_util_test INFO: Elapsed time: 57.357s, Critical Path: 44.71s //tensorflow/python:graph_util_test FAILED in 0.5s /homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/testlogs/tensorflow/python/graph_util_test/test.log </code></pre></div> <p dir="auto">And here the content of the <code class="notranslate">test.log</code> file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="exec ${PAGER:-/usr/bin/less} &quot;$0&quot; || exit 1 ----------------------------------------------------------------------------- Traceback (most recent call last): File &quot;/homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/bin/tensorflow/python/graph_util_test.runfiles/org_tensorflow/tensorflow/python/framework/graph_util_test.py&quot;, line 21, in &lt;module&gt; import tensorflow as tf File &quot;/homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/bin/tensorflow/python/graph_util_test.runfiles/org_tensorflow/tensorflow/__init__.py&quot;, line 23, in &lt;module&gt; from tensorflow.python import * File &quot;/homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/bin/tensorflow/python/graph_util_test.runfiles/org_tensorflow/tensorflow/python/__init__.py&quot;, line 45, in &lt;module&gt; import numpy as np ImportError: No module named numpy"><pre class="notranslate"><code class="notranslate">exec ${PAGER:-/usr/bin/less} "$0" || exit 1 ----------------------------------------------------------------------------- Traceback (most recent call last): File "/homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/bin/tensorflow/python/graph_util_test.runfiles/org_tensorflow/tensorflow/python/framework/graph_util_test.py", line 21, in &lt;module&gt; import tensorflow as tf File "/homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/bin/tensorflow/python/graph_util_test.runfiles/org_tensorflow/tensorflow/__init__.py", line 23, in &lt;module&gt; from tensorflow.python import * File "/homes/plu/.cache/bazel/_bazel_plu/5fecb6612d2e95475ff53a54e377c3f7/tensorflow/bazel-out/local_linux-opt/bin/tensorflow/python/graph_util_test.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 45, in &lt;module&gt; import numpy as np ImportError: No module named numpy </code></pre></div> <p dir="auto">But, I do have numpy installed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. &gt;&gt;&gt; import numpy;numpy.version.version '1.11.1' &gt;&gt;&gt;"><pre class="notranslate"><code class="notranslate">python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; import numpy;numpy.version.version '1.11.1' &gt;&gt;&gt; </code></pre></div> <p dir="auto">I do not understand why I get this Python error. Any idea of what is going wrong?</p> <p dir="auto">Thanks in advance for any help!</p>
0
<p dir="auto">I noticed that we may be using <code class="notranslate">memcpy</code> unsafely in some places. e.g. <code class="notranslate">unsafe_copy!</code> in <code class="notranslate">array.jl</code> uses <code class="notranslate">memcpy</code>, but if you do e.g. <code class="notranslate">copy!(A,A)</code> then the source and destination data overlap. (This is unlikely to fail in practice, but strictly speaking violates the <code class="notranslate">memcpy</code> spec.)</p> <p dir="auto">Would be good to do an audit of all <code class="notranslate">memcpy</code> uses in Julia and replace them with <code class="notranslate">memmove</code> if there is any chance of overlapping data. The performance impact should be negligible.</p>
<p dir="auto">The following code flip-flop between the two indentations when indenting the whole file. Note that the second screenshot has a leading space while the first one doesn't.</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(1)"><pre class="notranslate">(<span class="pl-c1">1</span>)</pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/712232/9156618/68cca358-3eae-11e5-98af-1321dc754eb0.png"><img src="https://cloud.githubusercontent.com/assets/712232/9156618/68cca358-3eae-11e5-98af-1321dc754eb0.png" alt="no space" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/712232/9156620/73ee8396-3eae-11e5-93e0-d2deb36541e6.png"><img src="https://cloud.githubusercontent.com/assets/712232/9156620/73ee8396-3eae-11e5-93e0-d2deb36541e6.png" alt="with space" style="max-width: 100%;"></a></p>
0
<p dir="auto">rustc 1.0.0 (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/a59de37e99060162a2674e3ff45409ac73595c0e/hovercard" href="https://github.com/rust-lang/rust/commit/a59de37e99060162a2674e3ff45409ac73595c0e"><tt>a59de37</tt></a> 2015-05-13) (built 2015-05-14)<br> binary: rustc<br> commit-hash: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/a59de37e99060162a2674e3ff45409ac73595c0e/hovercard" href="https://github.com/rust-lang/rust/commit/a59de37e99060162a2674e3ff45409ac73595c0e"><tt>a59de37</tt></a><br> commit-date: 2015-05-13<br> build-date: 2015-05-14<br> host: x86_64-unknown-linux-gnu<br> release: 1.0.0</p> <p dir="auto">I wanted to check this code successfully compiles. Gave a "cargo test" instead of "build", and kaboom.</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#[test] fn yerler() { fn utule(arr: &amp;[[u8]]) -&gt; [u8; 81] { let mut newarr = [0_u8; 81]; for i in 0..10 { for j in 0..10 { newarr[i*9+j] = arr[i][j]; } } newarr } }"><pre class="notranslate"><span class="pl-c1">#<span class="pl-kos">[</span>test<span class="pl-kos">]</span></span> <span class="pl-k">fn</span> <span class="pl-en">yerler</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">fn</span> <span class="pl-en">utule</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-kos">[</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-kos">)</span> -&gt; <span class="pl-kos">[</span><span class="pl-smi">u8</span><span class="pl-kos">;</span> <span class="pl-c1">81</span><span class="pl-kos">]</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> <span class="pl-k">mut</span> newarr = <span class="pl-kos">[</span><span class="pl-c1">0_u8</span><span class="pl-kos">;</span> <span class="pl-c1">81</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">for</span> i <span class="pl-k">in</span> <span class="pl-c1">0</span>..<span class="pl-c1">10</span> <span class="pl-kos">{</span> <span class="pl-k">for</span> j <span class="pl-k">in</span> <span class="pl-c1">0</span>..<span class="pl-c1">10</span> <span class="pl-kos">{</span> newarr<span class="pl-kos">[</span>i<span class="pl-c1">*</span><span class="pl-c1">9</span>+j<span class="pl-kos">]</span> = arr<span class="pl-kos">[</span>i<span class="pl-kos">]</span><span class="pl-kos">[</span>j<span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> newarr <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'rustc' panicked at 'assertion failed: slice_layout_is_correct(cx, &amp;member_llvm_types[..], element_type)', /home/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-linux/build/src/librustc_trans/trans/debuginfo.rs:2810 stack backtrace: 1: 0x7f4abb29e449 - sys::backtrace::write::hbc46dc0cfb3b9537d4r 2: 0x7f4abb2a6156 - panicking::on_panic::h74d3c14d86c58ac8jrw 3: 0x7f4abb269462 - rt::unwind::begin_unwind_inner::h382cea404b11eb00t6v 4: 0x7f4aba96437e - rt::unwind::begin_unwind::h11527883117899559464 5: 0x7f4abaa65f33 - trans::debuginfo::vec_slice_metadata::hf94e0b5f0c2f2a50cgy 6: 0x7f4abaa517fc - trans::debuginfo::type_metadata::h61fa8cb587a59ac0Ioy 7: 0x7f4abaa664c0 - trans::debuginfo::subroutine_type_metadata::h0a8adba26e117853iky 8: 0x7f4abaa511d4 - trans::debuginfo::type_metadata::h61fa8cb587a59ac0Ioy 9: 0x7f4aba9bd8b6 - trans::debuginfo::create_function_debug_context::hce33e3e89c0b549eG0w 10: 0x7f4aba9bbd16 - trans::base::new_fn_ctxt::hc47263521fb5ebc7Djh 11: 0x7f4aba9c4f10 - trans::base::trans_closure::h8e5687f4ccb96c5eLCh 12: 0x7f4aba9c90ea - trans::base::trans_fn::h0bc8fb6dbe17d6adtNh 13: 0x7f4aba9cc177 - trans::base::trans_item::h4f9c99b1e4474396Fbi 14: 0x7f4aba9d2ed5 - visit::walk_block::h14547825370956947583 15: 0x7f4aba9cca16 - trans::base::trans_item::h4f9c99b1e4474396Fbi 16: 0x7f4aba9da56d - trans::base::trans_crate::haa02506df24d5efcF0i 17: 0x7f4abb7ec0fa - driver::phase_4_translate_to_llvm::h86d6fb84c5c936d5hOa 18: 0x7f4abb7c3faa - driver::compile_input::hb78754f2f33c01efQba 19: 0x7f4abb8854d1 - run_compiler::h258d36d5501c1cdfz4b 20: 0x7f4abb883122 - boxed::F.FnBox&lt;A&gt;::call_box::h7239693171334256553 21: 0x7f4abb882659 - rt::unwind::try::try_fn::h14329119008520845439 22: 0x7f4abb318ac8 - rust_try_inner 23: 0x7f4abb318ab5 - rust_try 24: 0x7f4abb882908 - boxed::F.FnBox&lt;A&gt;::call_box::h17332056298259451807 25: 0x7f4abb2a5041 - sys::thread::create::thread_start::h490278b5c3c0b49faqv 26: 0x7f4ab5b2cdf4 - start_thread 27: 0x7f4abaeef1ac - __clone 28: 0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">thread 'rustc' panicked at 'assertion failed: slice_layout_is_correct(cx, &amp;member_llvm_types[..], element_type)', /home/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-linux/build/src/librustc_trans/trans/debuginfo.rs:2810 stack backtrace: 1: 0x7f4abb29e449 - sys::backtrace::write::hbc46dc0cfb3b9537d4r 2: 0x7f4abb2a6156 - panicking::on_panic::h74d3c14d86c58ac8jrw 3: 0x7f4abb269462 - rt::unwind::begin_unwind_inner::h382cea404b11eb00t6v 4: 0x7f4aba96437e - rt::unwind::begin_unwind::h11527883117899559464 5: 0x7f4abaa65f33 - trans::debuginfo::vec_slice_metadata::hf94e0b5f0c2f2a50cgy 6: 0x7f4abaa517fc - trans::debuginfo::type_metadata::h61fa8cb587a59ac0Ioy 7: 0x7f4abaa664c0 - trans::debuginfo::subroutine_type_metadata::h0a8adba26e117853iky 8: 0x7f4abaa511d4 - trans::debuginfo::type_metadata::h61fa8cb587a59ac0Ioy 9: 0x7f4aba9bd8b6 - trans::debuginfo::create_function_debug_context::hce33e3e89c0b549eG0w 10: 0x7f4aba9bbd16 - trans::base::new_fn_ctxt::hc47263521fb5ebc7Djh 11: 0x7f4aba9c4f10 - trans::base::trans_closure::h8e5687f4ccb96c5eLCh 12: 0x7f4aba9c90ea - trans::base::trans_fn::h0bc8fb6dbe17d6adtNh 13: 0x7f4aba9cc177 - trans::base::trans_item::h4f9c99b1e4474396Fbi 14: 0x7f4aba9d2ed5 - visit::walk_block::h14547825370956947583 15: 0x7f4aba9cca16 - trans::base::trans_item::h4f9c99b1e4474396Fbi 16: 0x7f4aba9da56d - trans::base::trans_crate::haa02506df24d5efcF0i 17: 0x7f4abb7ec0fa - driver::phase_4_translate_to_llvm::h86d6fb84c5c936d5hOa 18: 0x7f4abb7c3faa - driver::compile_input::hb78754f2f33c01efQba 19: 0x7f4abb8854d1 - run_compiler::h258d36d5501c1cdfz4b 20: 0x7f4abb883122 - boxed::F.FnBox&lt;A&gt;::call_box::h7239693171334256553 21: 0x7f4abb882659 - rt::unwind::try::try_fn::h14329119008520845439 22: 0x7f4abb318ac8 - rust_try_inner 23: 0x7f4abb318ab5 - rust_try 24: 0x7f4abb882908 - boxed::F.FnBox&lt;A&gt;::call_box::h17332056298259451807 25: 0x7f4abb2a5041 - sys::thread::create::thread_start::h490278b5c3c0b49faqv 26: 0x7f4ab5b2cdf4 - start_thread 27: 0x7f4abaeef1ac - __clone 28: 0x0 - &lt;unknown&gt; </code></pre></div>
<p dir="auto">Hi Folks,</p> <p dir="auto">Just ran into a compiler panic. I'm still learning rust, so it's probably related to a stupid syntax error on my part, but rustc suggested I file a bug report, so here I am...</p> <p dir="auto">Here's the error:</p> <p dir="auto">thread 'rustc' panicked at 'assertion failed: slice_layout_is_correct(cx, &amp;member_llvm_types[..], element_type)', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_trans/trans/debuginfo.rs:2810</p> <p dir="auto">Here's the code I was writing:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" pub fn aggregate(&amp;self, group_column: &amp;str, sum_columns: &amp;[str]) { }"><pre class="notranslate"><code class="notranslate"> pub fn aggregate(&amp;self, group_column: &amp;str, sum_columns: &amp;[str]) { } </code></pre></div> <p dir="auto">Here's the backtrace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 1: 0x7f2103105f39 - sys::backtrace::write::h7638fca3b07af337rVs 2: 0x7f210310dbb6 - panicking::on_panic::h64a1f0366c6b8a23mkx 3: 0x7f21030ca912 - rt::unwind::begin_unwind_inner::hcaa5609c9e3078adwZw 4: 0x7f2101e5b28e - rt::unwind::begin_unwind::h15509594317540694492 5: 0x7f2101f5a843 - trans::debuginfo::vec_slice_metadata::hfcdfde7a231fb874ehy 6: 0x7f2101f460bc - trans::debuginfo::type_metadata::hadf1ae524fc7b529Kpy 7: 0x7f2101f5add0 - trans::debuginfo::subroutine_type_metadata::hd6ba8b12e5430450kly 8: 0x7f2101f45a94 - trans::debuginfo::type_metadata::hadf1ae524fc7b529Kpy 9: 0x7f2101eb39a6 - trans::debuginfo::create_function_debug_context::h4a389096a1ba01b1I1w 10: 0x7f2101eb1f7f - trans::base::new_fn_ctxt::h5648354326e8de67tkh 11: 0x7f2101ebaf72 - trans::base::trans_closure::h0dc61076718b152eBDh 12: 0x7f2101ebef8a - trans::base::trans_fn::h017a63e4b4f1d383jOh 13: 0x7f2101ec2ad4 - trans::base::trans_item::h694a5c0c3e92277bvci 14: 0x7f2101ec2948 - trans::base::trans_item::h694a5c0c3e92277bvci 15: 0x7f2101ec2948 - trans::base::trans_item::h694a5c0c3e92277bvci 16: 0x7f2101ed03bd - trans::base::trans_crate::h93b35940c9d58579v1i 17: 0x7f2103675d5a - driver::phase_4_translate_to_llvm::h0cea9caf6133630enOa 18: 0x7f210364e05b - driver::compile_input::h4642f691e22278cbQba 19: 0x7f210370e331 - run_compiler::he528ba831532b90aF4b 20: 0x7f210370bf82 - boxed::F.FnBox&lt;A&gt;::call_box::h13568337174014462877 21: 0x7f210370b4b9 - rt::unwind::try::try_fn::h15381261312250239500 22: 0x7f2103185528 - rust_try_inner 23: 0x7f2103185515 - rust_try 24: 0x7f210370b768 - boxed::F.FnBox&lt;A&gt;::call_box::h6713016946069099629 25: 0x7f210310cac1 - sys::thread::create::thread_start::hbe89fbdfc755452dxjw 26: 0x7f20fd1b7181 - start_thread 27: 0x7f2102d4347c - __clone 28: 0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate"> 1: 0x7f2103105f39 - sys::backtrace::write::h7638fca3b07af337rVs 2: 0x7f210310dbb6 - panicking::on_panic::h64a1f0366c6b8a23mkx 3: 0x7f21030ca912 - rt::unwind::begin_unwind_inner::hcaa5609c9e3078adwZw 4: 0x7f2101e5b28e - rt::unwind::begin_unwind::h15509594317540694492 5: 0x7f2101f5a843 - trans::debuginfo::vec_slice_metadata::hfcdfde7a231fb874ehy 6: 0x7f2101f460bc - trans::debuginfo::type_metadata::hadf1ae524fc7b529Kpy 7: 0x7f2101f5add0 - trans::debuginfo::subroutine_type_metadata::hd6ba8b12e5430450kly 8: 0x7f2101f45a94 - trans::debuginfo::type_metadata::hadf1ae524fc7b529Kpy 9: 0x7f2101eb39a6 - trans::debuginfo::create_function_debug_context::h4a389096a1ba01b1I1w 10: 0x7f2101eb1f7f - trans::base::new_fn_ctxt::h5648354326e8de67tkh 11: 0x7f2101ebaf72 - trans::base::trans_closure::h0dc61076718b152eBDh 12: 0x7f2101ebef8a - trans::base::trans_fn::h017a63e4b4f1d383jOh 13: 0x7f2101ec2ad4 - trans::base::trans_item::h694a5c0c3e92277bvci 14: 0x7f2101ec2948 - trans::base::trans_item::h694a5c0c3e92277bvci 15: 0x7f2101ec2948 - trans::base::trans_item::h694a5c0c3e92277bvci 16: 0x7f2101ed03bd - trans::base::trans_crate::h93b35940c9d58579v1i 17: 0x7f2103675d5a - driver::phase_4_translate_to_llvm::h0cea9caf6133630enOa 18: 0x7f210364e05b - driver::compile_input::h4642f691e22278cbQba 19: 0x7f210370e331 - run_compiler::he528ba831532b90aF4b 20: 0x7f210370bf82 - boxed::F.FnBox&lt;A&gt;::call_box::h13568337174014462877 21: 0x7f210370b4b9 - rt::unwind::try::try_fn::h15381261312250239500 22: 0x7f2103185528 - rust_try_inner 23: 0x7f2103185515 - rust_try 24: 0x7f210370b768 - boxed::F.FnBox&lt;A&gt;::call_box::h6713016946069099629 25: 0x7f210310cac1 - sys::thread::create::thread_start::hbe89fbdfc755452dxjw 26: 0x7f20fd1b7181 - start_thread 27: 0x7f2102d4347c - __clone 28: 0x0 - &lt;unknown&gt; </code></pre></div> <p dir="auto">Other Details:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc --version --verbose rustc 1.0.0-nightly (2baf34825 2015-04-21) (built 2015-04-22) binary: rustc commit-hash: 2baf3482537f5a245a9c17ca730398f1a8b001d7 commit-date: 2015-04-21 build-date: 2015-04-22 host: x86_64-unknown-linux-gnu release: 1.0.0-nightly"><pre class="notranslate"><code class="notranslate">rustc --version --verbose rustc 1.0.0-nightly (2baf34825 2015-04-21) (built 2015-04-22) binary: rustc commit-hash: 2baf3482537f5a245a9c17ca730398f1a8b001d7 commit-date: 2015-04-21 build-date: 2015-04-22 host: x86_64-unknown-linux-gnu release: 1.0.0-nightly </code></pre></div>
1
<p dir="auto">It is often the case that multiple CSS classes are used for an element, and sometimes they are dynamically generated. In such situations the client code needs to concatenate them into a string</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const classes = getCSSClasses(); return ( &lt;div className={classes.class1 + &quot; &quot; + classes.class2}&gt; foo &lt;/div&gt; );"><pre class="notranslate"><code class="notranslate">const classes = getCSSClasses(); return ( &lt;div className={classes.class1 + " " + classes.class2}&gt; foo &lt;/div&gt; ); </code></pre></div> <p dir="auto">I always felt the need to be able to pass the classes as an array:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const classes = getCSSClasses(); return ( &lt;div classes={[classes.class1, classes.class2]}&gt; foo &lt;/div&gt; );"><pre class="notranslate"><code class="notranslate">const classes = getCSSClasses(); return ( &lt;div classes={[classes.class1, classes.class2]}&gt; foo &lt;/div&gt; ); </code></pre></div> <p dir="auto">In addition to the convenience of such a property, maybe it could help with performance, in the sense that equality could be checked before string concatenation, and only do the concatenation if the element needs to be rendered.</p> <p dir="auto">The drawback here is of course the mutable nature of an array. I imagine performance would be better if the array would be immutable. So maybe this new property could work only with some immutable array implementation. Or frozen arrays.</p> <p dir="auto">In short, I want such a property for convenience, but maybe it also has potential for some performance improvements.</p>
<p dir="auto">Hi!</p> <p dir="auto">I usually am in the situation where I have to write code like this:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="return ( &lt;div className={classnames(['...', '...'])}&gt; Children &lt;/div&gt; );"><pre class="notranslate"><span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-en">classnames</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-s">'...'</span><span class="pl-kos">,</span> <span class="pl-s">'...'</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span> Children <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">This seems simple, but when you have more elements that need dynamic classes, it gets tedious and pretty hard to read. I propose the following thing:</p> <p dir="auto">When <code class="notranslate">className</code> attribute is evaluated, how about running it through <a href="https://www.npmjs.com/package/classnames" rel="nofollow"><code class="notranslate">classnames</code></a> before rendering the HTML?</p> <p dir="auto">This means that the <code class="notranslate">className</code> attribute should allow <code class="notranslate">Array&lt;string&gt;</code>, <code class="notranslate">{[string]: boolean}</code> and <code class="notranslate">string</code> types and would become much simpler to write code.</p> <p dir="auto">What do you guys think?</p>
1
<h3 dir="auto">Description</h3> <p dir="auto">The output of compute_pg is a vector . If I just evaluate f_x below at the desired input it works but the jacobian doesnt seem to work. I am not sure what is happening here.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@partial(jit, static_argnums=(0,)) def proj(self,p,C): return projection_polyhedron(p,C,check_feasible = False) @partial(jit, static_argnums=(0,)) def compute_pg(self,p,cx,cy,x_obs_inp,y_obs_inp,vx_obs_inp, vy_obs_inp): p = jnp.reshape(p,(jnp.shape(p)[0],1)) b_obs = jnp.hstack((x_obs_inp+self.p_obs_x_ub,-(x_obs_inp-self.p_obs_x_lb), y_obs_inp+self.p_obs_y_ub,-(y_obs_inp-self.p_obs_y_lb))) b_obs = jnp.reshape(b_obs,(jnp.shape(self.C_obs)[0],1)) pg = ProjectedGradient(fun=self.compute_obstacle_penalty_temp,projection=self.proj,jit=True) pg_sol = pg.run(p,hyperparams_proj=(self.A_obs,self.a_obstacle,self.C_obs,b_obs),c_x=cx,c_y=cy,vx_obs_inp=vx_obs_inp,vy_obs_inp=vy_obs_inp).params return pg_sol f_x = lambda cx: self.compute_pg(p[0,:],cx,best_cy.T,x_obs_inp[0,:],y_obs_inp[0,:],vx_obs_inp[0,:], vy_obs_inp[0,:]) dp_dcx = jax.jacobian(f_x)(best_cx.T) "><pre class="notranslate"><code class="notranslate">@partial(jit, static_argnums=(0,)) def proj(self,p,C): return projection_polyhedron(p,C,check_feasible = False) @partial(jit, static_argnums=(0,)) def compute_pg(self,p,cx,cy,x_obs_inp,y_obs_inp,vx_obs_inp, vy_obs_inp): p = jnp.reshape(p,(jnp.shape(p)[0],1)) b_obs = jnp.hstack((x_obs_inp+self.p_obs_x_ub,-(x_obs_inp-self.p_obs_x_lb), y_obs_inp+self.p_obs_y_ub,-(y_obs_inp-self.p_obs_y_lb))) b_obs = jnp.reshape(b_obs,(jnp.shape(self.C_obs)[0],1)) pg = ProjectedGradient(fun=self.compute_obstacle_penalty_temp,projection=self.proj,jit=True) pg_sol = pg.run(p,hyperparams_proj=(self.A_obs,self.a_obstacle,self.C_obs,b_obs),c_x=cx,c_y=cy,vx_obs_inp=vx_obs_inp,vy_obs_inp=vy_obs_inp).params return pg_sol f_x = lambda cx: self.compute_pg(p[0,:],cx,best_cy.T,x_obs_inp[0,:],y_obs_inp[0,:],vx_obs_inp[0,:], vy_obs_inp[0,:]) dp_dcx = jax.jacobian(f_x)(best_cx.T) </code></pre></div> <p dir="auto">This is the error I get:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="File &quot;/home/ims/ros2_ws/install/mpc_python/lib/python3.8/site-packages/mpc_python/mpc_expert_bilevel.py&quot;, line 592, in compute_bilevel dp_dcx = jax.jacobian(f_x)(best_cx.T) File &quot;/home/ims/.local/lib/python3.8/site-packages/jaxopt/_src/implicit_diff.py&quot;, line 236, in solver_fun_bwd vjps = root_vjp(optimality_fun=optimality_fun, sol=sol, File &quot;/home/ims/.local/lib/python3.8/site-packages/jaxopt/_src/implicit_diff.py&quot;, line 69, in root_vjp u = solve(matvec, v) File &quot;/home/ims/.local/lib/python3.8/site-packages/jaxopt/_src/linear_solve.py&quot;, line 193, in solve_normal_cg Ab = rmatvec(b) # A.T b File &quot;/home/ims/.local/lib/python3.8/site-packages/jaxopt/_src/linear_solve.py&quot;, line 145, in &lt;lambda&gt; return lambda y: transpose(y)[0] AssertionError"><pre class="notranslate"><code class="notranslate">File "/home/ims/ros2_ws/install/mpc_python/lib/python3.8/site-packages/mpc_python/mpc_expert_bilevel.py", line 592, in compute_bilevel dp_dcx = jax.jacobian(f_x)(best_cx.T) File "/home/ims/.local/lib/python3.8/site-packages/jaxopt/_src/implicit_diff.py", line 236, in solver_fun_bwd vjps = root_vjp(optimality_fun=optimality_fun, sol=sol, File "/home/ims/.local/lib/python3.8/site-packages/jaxopt/_src/implicit_diff.py", line 69, in root_vjp u = solve(matvec, v) File "/home/ims/.local/lib/python3.8/site-packages/jaxopt/_src/linear_solve.py", line 193, in solve_normal_cg Ab = rmatvec(b) # A.T b File "/home/ims/.local/lib/python3.8/site-packages/jaxopt/_src/linear_solve.py", line 145, in &lt;lambda&gt; return lambda y: transpose(y)[0] AssertionError </code></pre></div> <p dir="auto">What I observed was that if I set implicit_diff=False in the ProjectedGradient then it works but is super slow.Kindly advice.</p> <h3 dir="auto">What jax/jaxlib version are you using?</h3> <p dir="auto">0.3.22</p> <h3 dir="auto">Which accelerator(s) are you using?</h3> <p dir="auto">GPU</p> <h3 dir="auto">Additional system info</h3> <p dir="auto">3.8.10,Ubuntu 20.04.4 LTS,1th Gen Intel® Core™ i9-11980HK @ 2.60GHz × 16,NVIDIA Corporation / NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2</p> <h3 dir="auto">NVIDIA GPU info</h3> <p dir="auto">-----------------------------------------------------------------------------+<br> | NVIDIA-SMI 510.85.02 Driver Version: 510.85.02 CUDA Version: 11.6 |<br> |-------------------------------+----------------------+----------------------+<br> | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |<br> | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |<br> | | | MIG M. |<br> |===============================+======================+======================|<br> | 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |<br> | N/A 56C P5 21W / N/A | 1335MiB / 16384MiB | 5% Default |<br> | | | N/A |<br> +-------------------------------+----------------------+----------------------+</p> <p dir="auto">+-----------------------------------------------------------------------------+<br> | Processes: |<br> | GPU GI CI PID Type Process name GPU Memory |<br> | ID ID Usage |<br> |=============================================================================|<br> | 0 N/A N/A 1203 G /usr/lib/xorg/Xorg 134MiB |<br> | 0 N/A N/A 1845 G /usr/lib/xorg/Xorg 723MiB |<br> | 0 N/A N/A 2168 G /usr/bin/gnome-shell 101MiB |<br> | 0 N/A N/A 3875 G /usr/lib/firefox/firefox 356MiB |<br> | 0 N/A N/A 221513 G gnome-control-center 3MiB |<br> +-----------------------------------------------------------------------------+</p>
<p dir="auto">Please:</p> <ul dir="auto"> <li>[x ] Check for duplicate issues.</li> <li>[ x] Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:</li> </ul> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# clone jkonet from github # follow jkonet setup instructions $ python main.py --out_dir results --config_folder configs --task semicircle"><pre class="notranslate"><span class="pl-c"># clone jkonet from github</span> <span class="pl-c"># follow jkonet setup instructions</span> $ <span class="pl-s1">python</span> <span class="pl-s1">main</span>.<span class="pl-s1">py</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">out_dir</span> <span class="pl-s1">results</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">config_folder</span> <span class="pl-s1">configs</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">task</span> <span class="pl-s1">semicircle</span></pre></div> <ul dir="auto"> <li>[x ] If applicable, include full error messages/tracebacks.</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python main.py --out_dir results --config_folder configs --task semicircle /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/chex/_src/pytypes.py:37: FutureWarning: jax.tree_structure is deprecated, and will be removed in a future release. Use jax.tree_util.tree_structure instead. PyTreeDef = type(jax.tree_structure(None)) Started run. /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:319: FutureWarning: jax.tree_map is deprecated, and will be removed in a future release. Use jax.tree_util.tree_map instead. mu = jax.tree_map( # First moment /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:321: FutureWarning: jax.tree_map is deprecated, and will be removed in a future release. Use jax.tree_util.tree_map instead. nu = jax.tree_map(jnp.zeros_like, params) # Second moment 0%| | 0/1001 [00:00&lt;?, ?it/s]/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:82: FutureWarning: jax.tree_multimap is deprecated, and will be removed in a future release. Use jax.tree_util.tree_multimap instead. return jax.tree_multimap( /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/tree_util.py:205: FutureWarning: jax.tree_util.tree_multimap() is deprecated. Please use jax.tree_util.tree_map() instead as a drop-in replacement. warnings.warn('jax.tree_util.tree_multimap() is deprecated. Please use jax.tree_util.tree_map() ' /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:99: FutureWarning: jax.tree_multimap is deprecated, and will be removed in a future release. Use jax.tree_util.tree_multimap instead. return jax.tree_multimap( /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:106: FutureWarning: jax.tree_map is deprecated, and will be removed in a future release. Use jax.tree_util.tree_map instead. return jax.tree_map(lambda t: t / bias_correction.astype(t.dtype), moment) /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:331: FutureWarning: jax.tree_multimap is deprecated, and will be removed in a future release. Use jax.tree_util.tree_multimap instead. updates = jax.tree_multimap( /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:359: FutureWarning: jax.tree_map is deprecated, and will be removed in a future release. Use jax.tree_util.tree_map instead. updates = jax.tree_map(lambda g: step_size * g, updates) /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/update.py:42: FutureWarning: jax.tree_multimap is deprecated, and will be removed in a future release. Use jax.tree_util.tree_multimap instead. return jax.tree_multimap( /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/linear_algebra.py:29: FutureWarning: jax.tree_leaves is deprecated, and will be removed in a future release. Use jax.tree_util.tree_leaves instead. sum([jnp.sum(numerics.abs_sq(x)) for x in jax.tree_leaves(updates)])) /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/clipping.py:117: FutureWarning: jax.tree_map is deprecated, and will be removed in a future release. Use jax.tree_util.tree_map instead. updates = jax.tree_map( /home/USER/projects/jkonet/jkonet/utils/optim.py:43: FutureWarning: jax.tree_leaves is deprecated, and will be removed in a future release. Use jax.tree_util.tree_leaves instead. sum([jnp.sum(jnp.square(x)) for x in jax.tree_leaves(updates)])) 0%| | 0/1001 [00:00&lt;?, ?it/s] Traceback (most recent call last): File &quot;/home/USER/projects/jkonet/main.py&quot;, line 292, in &lt;module&gt; main(args) File &quot;/home/USER/projects/jkonet/main.py&quot;, line 266, in main run_jko(config, task_dir=task_dir, logging=args.wandb) File &quot;/home/USER/projects/jkonet/main.py&quot;, line 130, in run_jko ) = train_step_fn((rng_i, state_energy), batch) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/traceback_util.py&quot;, line 162, in reraise_with_filtered_traceback return fun(*args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/api.py&quot;, line 526, in cache_miss out_flat = xla.xla_call( File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/core.py&quot;, line 1919, in bind return call_bind(self, fun, *args, **params) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/core.py&quot;, line 1935, in call_bind outs = top_trace.process_call(primitive, fun_, tracers, params) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/core.py&quot;, line 687, in process_call return primitive.impl(f, *tracers, **params) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/dispatch.py&quot;, line 199, in _xla_call_impl compiled_fun = xla_callable(fun, device, backend, name, donated_invars, File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/linear_util.py&quot;, line 295, in memoized_fun ans = call(fun, *args) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/dispatch.py&quot;, line 248, in _xla_callable_uncached return lower_xla_callable(fun, device, backend, name, donated_invars, False, File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/profiler.py&quot;, line 294, in wrapper return func(*args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/dispatch.py&quot;, line 293, in lower_xla_callable jaxpr, out_type, consts = pe.trace_to_jaxpr_final2( File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/profiler.py&quot;, line 294, in wrapper return func(*args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py&quot;, line 2167, in trace_to_jaxpr_final2 jaxpr, out_type, consts = trace_to_subjaxpr_dynamic2(fun, main) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py&quot;, line 2117, in trace_to_subjaxpr_dynamic2 ans = fun.call_wrapped(*in_tracers_) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/linear_util.py&quot;, line 168, in call_wrapped ans = self.f(*args, **dict(self.params, **kwargs)) File &quot;/home/USER/projects/jkonet/jkonet/models/model_jko.py&quot;, line 153, in step_fn loss_energy, loss_psi, grad_norm) = jax.lax.scan( File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/traceback_util.py&quot;, line 162, in reraise_with_filtered_traceback return fun(*args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/loops.py&quot;, line 259, in scan init_flat, carry_avals, carry_avals_out, init_tree, *rest = _create_jaxpr(init) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/loops.py&quot;, line 245, in _create_jaxpr jaxpr, consts, out_tree = _initial_style_jaxpr( File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py&quot;, line 273, in wrapped result = call(weak_arg, *args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/common.py&quot;, line 57, in _initial_style_jaxpr jaxpr, consts, out_tree = _initial_style_open_jaxpr( File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py&quot;, line 273, in wrapped result = call(weak_arg, *args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/common.py&quot;, line 51, in _initial_style_open_jaxpr jaxpr, _, consts = pe.trace_to_jaxpr_dynamic(wrapped_fun, in_avals, debug) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/profiler.py&quot;, line 294, in wrapper return func(*args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py&quot;, line 2074, in trace_to_jaxpr_dynamic jaxpr, out_avals, consts = trace_to_subjaxpr_dynamic( File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py&quot;, line 2089, in trace_to_subjaxpr_dynamic ans = fun.call_wrapped(*in_tracers_) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/linear_util.py&quot;, line 168, in call_wrapped ans = self.f(*args, **dict(self.params, **kwargs)) File &quot;/home/USER/projects/jkonet/jkonet/models/model_jko.py&quot;, line 144, in _through_time batch = jax.lax.cond( File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/traceback_util.py&quot;, line 162, in reraise_with_filtered_traceback return fun(*args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/conditionals.py&quot;, line 254, in cond return _cond(*args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/conditionals.py&quot;, line 218, in _cond jaxprs, consts, out_trees = _initial_style_jaxprs_with_common_consts( File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py&quot;, line 220, in wrapper return cached(config._trace_context(), *args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py&quot;, line 213, in cached return f(*args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/common.py&quot;, line 73, in _initial_style_jaxprs_with_common_consts unzip3(_initial_style_open_jaxpr(fun, in_tree, in_avals, primitive_name) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py&quot;, line 67, in unzip3 for x, y, z in xyzs: File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/common.py&quot;, line 73, in &lt;genexpr&gt; unzip3(_initial_style_open_jaxpr(fun, in_tree, in_avals, primitive_name) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py&quot;, line 273, in wrapped result = call(weak_arg, *args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/common.py&quot;, line 51, in _initial_style_open_jaxpr jaxpr, _, consts = pe.trace_to_jaxpr_dynamic(wrapped_fun, in_avals, debug) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/profiler.py&quot;, line 294, in wrapper return func(*args, **kwargs) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py&quot;, line 2074, in trace_to_jaxpr_dynamic jaxpr, out_avals, consts = trace_to_subjaxpr_dynamic( File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py&quot;, line 2089, in trace_to_subjaxpr_dynamic ans = fun.call_wrapped(*in_tracers_) File &quot;/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/linear_util.py&quot;, line 168, in call_wrapped ans = self.f(*args, **dict(self.params, **kwargs)) File &quot;/home/USER/projects/jkonet/jkonet/models/model_jko.py&quot;, line 146, in &lt;lambda&gt; lambda x: jax.ops.index_update(x, t + 1, predicted), batch) jax._src.traceback_util.UnfilteredStackTrace: AttributeError: module 'jax.ops' has no attribute 'index_update' The stack trace below excludes JAX-internal frames. The preceding is the original exception that occurred, unmodified. -------------------- The above exception was the direct cause of the following exception: Traceback (most recent call last): File &quot;/home/USER/projects/jkonet/main.py&quot;, line 292, in &lt;module&gt; main(args) File &quot;/home/USER/projects/jkonet/main.py&quot;, line 266, in main run_jko(config, task_dir=task_dir, logging=args.wandb) File &quot;/home/USER/projects/jkonet/main.py&quot;, line 130, in run_jko ) = train_step_fn((rng_i, state_energy), batch) File &quot;/home/USER/projects/jkonet/jkonet/models/model_jko.py&quot;, line 153, in step_fn loss_energy, loss_psi, grad_norm) = jax.lax.scan( File &quot;/home/USER/projects/jkonet/jkonet/models/model_jko.py&quot;, line 144, in _through_time batch = jax.lax.cond( File &quot;/home/USER/projects/jkonet/jkonet/models/model_jko.py&quot;, line 146, in &lt;lambda&gt; lambda x: jax.ops.index_update(x, t + 1, predicted), batch) AttributeError: module 'jax.ops' has no attribute 'index_update' "><pre class="notranslate"><code class="notranslate">$ python main.py --out_dir results --config_folder configs --task semicircle /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/chex/_src/pytypes.py:37: FutureWarning: jax.tree_structure is deprecated, and will be removed in a future release. Use jax.tree_util.tree_structure instead. PyTreeDef = type(jax.tree_structure(None)) Started run. /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:319: FutureWarning: jax.tree_map is deprecated, and will be removed in a future release. Use jax.tree_util.tree_map instead. mu = jax.tree_map( # First moment /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:321: FutureWarning: jax.tree_map is deprecated, and will be removed in a future release. Use jax.tree_util.tree_map instead. nu = jax.tree_map(jnp.zeros_like, params) # Second moment 0%| | 0/1001 [00:00&lt;?, ?it/s]/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:82: FutureWarning: jax.tree_multimap is deprecated, and will be removed in a future release. Use jax.tree_util.tree_multimap instead. return jax.tree_multimap( /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/tree_util.py:205: FutureWarning: jax.tree_util.tree_multimap() is deprecated. Please use jax.tree_util.tree_map() instead as a drop-in replacement. warnings.warn('jax.tree_util.tree_multimap() is deprecated. Please use jax.tree_util.tree_map() ' /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:99: FutureWarning: jax.tree_multimap is deprecated, and will be removed in a future release. Use jax.tree_util.tree_multimap instead. return jax.tree_multimap( /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:106: FutureWarning: jax.tree_map is deprecated, and will be removed in a future release. Use jax.tree_util.tree_map instead. return jax.tree_map(lambda t: t / bias_correction.astype(t.dtype), moment) /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:331: FutureWarning: jax.tree_multimap is deprecated, and will be removed in a future release. Use jax.tree_util.tree_multimap instead. updates = jax.tree_multimap( /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/transform.py:359: FutureWarning: jax.tree_map is deprecated, and will be removed in a future release. Use jax.tree_util.tree_map instead. updates = jax.tree_map(lambda g: step_size * g, updates) /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/update.py:42: FutureWarning: jax.tree_multimap is deprecated, and will be removed in a future release. Use jax.tree_util.tree_multimap instead. return jax.tree_multimap( /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/linear_algebra.py:29: FutureWarning: jax.tree_leaves is deprecated, and will be removed in a future release. Use jax.tree_util.tree_leaves instead. sum([jnp.sum(numerics.abs_sq(x)) for x in jax.tree_leaves(updates)])) /home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/optax/_src/clipping.py:117: FutureWarning: jax.tree_map is deprecated, and will be removed in a future release. Use jax.tree_util.tree_map instead. updates = jax.tree_map( /home/USER/projects/jkonet/jkonet/utils/optim.py:43: FutureWarning: jax.tree_leaves is deprecated, and will be removed in a future release. Use jax.tree_util.tree_leaves instead. sum([jnp.sum(jnp.square(x)) for x in jax.tree_leaves(updates)])) 0%| | 0/1001 [00:00&lt;?, ?it/s] Traceback (most recent call last): File "/home/USER/projects/jkonet/main.py", line 292, in &lt;module&gt; main(args) File "/home/USER/projects/jkonet/main.py", line 266, in main run_jko(config, task_dir=task_dir, logging=args.wandb) File "/home/USER/projects/jkonet/main.py", line 130, in run_jko ) = train_step_fn((rng_i, state_energy), batch) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/traceback_util.py", line 162, in reraise_with_filtered_traceback return fun(*args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/api.py", line 526, in cache_miss out_flat = xla.xla_call( File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/core.py", line 1919, in bind return call_bind(self, fun, *args, **params) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/core.py", line 1935, in call_bind outs = top_trace.process_call(primitive, fun_, tracers, params) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/core.py", line 687, in process_call return primitive.impl(f, *tracers, **params) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/dispatch.py", line 199, in _xla_call_impl compiled_fun = xla_callable(fun, device, backend, name, donated_invars, File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/linear_util.py", line 295, in memoized_fun ans = call(fun, *args) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/dispatch.py", line 248, in _xla_callable_uncached return lower_xla_callable(fun, device, backend, name, donated_invars, False, File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/profiler.py", line 294, in wrapper return func(*args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/dispatch.py", line 293, in lower_xla_callable jaxpr, out_type, consts = pe.trace_to_jaxpr_final2( File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/profiler.py", line 294, in wrapper return func(*args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py", line 2167, in trace_to_jaxpr_final2 jaxpr, out_type, consts = trace_to_subjaxpr_dynamic2(fun, main) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py", line 2117, in trace_to_subjaxpr_dynamic2 ans = fun.call_wrapped(*in_tracers_) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/linear_util.py", line 168, in call_wrapped ans = self.f(*args, **dict(self.params, **kwargs)) File "/home/USER/projects/jkonet/jkonet/models/model_jko.py", line 153, in step_fn loss_energy, loss_psi, grad_norm) = jax.lax.scan( File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/traceback_util.py", line 162, in reraise_with_filtered_traceback return fun(*args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/loops.py", line 259, in scan init_flat, carry_avals, carry_avals_out, init_tree, *rest = _create_jaxpr(init) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/loops.py", line 245, in _create_jaxpr jaxpr, consts, out_tree = _initial_style_jaxpr( File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py", line 273, in wrapped result = call(weak_arg, *args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/common.py", line 57, in _initial_style_jaxpr jaxpr, consts, out_tree = _initial_style_open_jaxpr( File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py", line 273, in wrapped result = call(weak_arg, *args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/common.py", line 51, in _initial_style_open_jaxpr jaxpr, _, consts = pe.trace_to_jaxpr_dynamic(wrapped_fun, in_avals, debug) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/profiler.py", line 294, in wrapper return func(*args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py", line 2074, in trace_to_jaxpr_dynamic jaxpr, out_avals, consts = trace_to_subjaxpr_dynamic( File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py", line 2089, in trace_to_subjaxpr_dynamic ans = fun.call_wrapped(*in_tracers_) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/linear_util.py", line 168, in call_wrapped ans = self.f(*args, **dict(self.params, **kwargs)) File "/home/USER/projects/jkonet/jkonet/models/model_jko.py", line 144, in _through_time batch = jax.lax.cond( File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/traceback_util.py", line 162, in reraise_with_filtered_traceback return fun(*args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/conditionals.py", line 254, in cond return _cond(*args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/conditionals.py", line 218, in _cond jaxprs, consts, out_trees = _initial_style_jaxprs_with_common_consts( File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py", line 220, in wrapper return cached(config._trace_context(), *args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py", line 213, in cached return f(*args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/common.py", line 73, in _initial_style_jaxprs_with_common_consts unzip3(_initial_style_open_jaxpr(fun, in_tree, in_avals, primitive_name) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py", line 67, in unzip3 for x, y, z in xyzs: File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/common.py", line 73, in &lt;genexpr&gt; unzip3(_initial_style_open_jaxpr(fun, in_tree, in_avals, primitive_name) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/util.py", line 273, in wrapped result = call(weak_arg, *args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/lax/control_flow/common.py", line 51, in _initial_style_open_jaxpr jaxpr, _, consts = pe.trace_to_jaxpr_dynamic(wrapped_fun, in_avals, debug) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/_src/profiler.py", line 294, in wrapper return func(*args, **kwargs) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py", line 2074, in trace_to_jaxpr_dynamic jaxpr, out_avals, consts = trace_to_subjaxpr_dynamic( File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/interpreters/partial_eval.py", line 2089, in trace_to_subjaxpr_dynamic ans = fun.call_wrapped(*in_tracers_) File "/home/USER/anaconda3/envs/jko/lib/python3.9/site-packages/jax/linear_util.py", line 168, in call_wrapped ans = self.f(*args, **dict(self.params, **kwargs)) File "/home/USER/projects/jkonet/jkonet/models/model_jko.py", line 146, in &lt;lambda&gt; lambda x: jax.ops.index_update(x, t + 1, predicted), batch) jax._src.traceback_util.UnfilteredStackTrace: AttributeError: module 'jax.ops' has no attribute 'index_update' The stack trace below excludes JAX-internal frames. The preceding is the original exception that occurred, unmodified. -------------------- The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/USER/projects/jkonet/main.py", line 292, in &lt;module&gt; main(args) File "/home/USER/projects/jkonet/main.py", line 266, in main run_jko(config, task_dir=task_dir, logging=args.wandb) File "/home/USER/projects/jkonet/main.py", line 130, in run_jko ) = train_step_fn((rng_i, state_energy), batch) File "/home/USER/projects/jkonet/jkonet/models/model_jko.py", line 153, in step_fn loss_energy, loss_psi, grad_norm) = jax.lax.scan( File "/home/USER/projects/jkonet/jkonet/models/model_jko.py", line 144, in _through_time batch = jax.lax.cond( File "/home/USER/projects/jkonet/jkonet/models/model_jko.py", line 146, in &lt;lambda&gt; lambda x: jax.ops.index_update(x, t + 1, predicted), batch) AttributeError: module 'jax.ops' has no attribute 'index_update' </code></pre></div>
0
<h3 dir="auto">Expected Behavior</h3> <p dir="auto">App run with debug mode raise OSError</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="app = make_app() celery = make_celery(app) KafkaProducerExt(app) if __name__ == &quot;__main__&quot;: app.run(debug=True) "><pre class="notranslate"><span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-en">make_app</span>() <span class="pl-s1">celery</span> <span class="pl-c1">=</span> <span class="pl-en">make_celery</span>(<span class="pl-s1">app</span>) <span class="pl-v">KafkaProducerExt</span>(<span class="pl-s1">app</span>) <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>: <span class="pl-s1">app</span>.<span class="pl-en">run</span>(<span class="pl-s1">debug</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</pre></div> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">App run with debug mode raise OSError, when i change debug to False, everything ok</p> <div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: on * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) * Restarting with stat Traceback (most recent call last): File &quot;app/app.py&quot;, line 8, in &lt;module&gt; app.run(debug=True) File &quot;/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/flask/app.py&quot;, line 943, in run run_simple(host, port, self, **options) File &quot;/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/werkzeug/serving.py&quot;, line 988, in run_simple run_with_reloader(inner, extra_files, reloader_interval, reloader_type) File &quot;/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/werkzeug/_reloader.py&quot;, line 332, in run_with_reloader sys.exit(reloader.restart_with_reloader()) File &quot;/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/werkzeug/_reloader.py&quot;, line 176, in restart_with_reloader exit_code = subprocess.call(args, env=new_environ, close_fds=False) File &quot;/usr/lib/python3.5/subprocess.py&quot;, line 557, in call with Popen(*popenargs, **kwargs) as p: File &quot;/usr/lib/python3.5/subprocess.py&quot;, line 947, in __init__ restore_signals, start_new_session) File &quot;/usr/lib/python3.5/subprocess.py&quot;, line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) OSError: [Errno 8] Exec format error "><pre class="notranslate"> * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: on * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) * Restarting with stat Traceback (most recent call last): File <span class="pl-s">"app/app.py"</span>, line <span class="pl-c1">8</span>, in <span class="pl-en">&lt;module&gt;</span> app.run(<span class="pl-v">debug</span><span class="pl-k">=</span><span class="pl-c1">True</span>) File <span class="pl-s">"/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/flask/app.py"</span>, line <span class="pl-c1">943</span>, in <span class="pl-en">run</span> run_simple(host, port, <span class="pl-c1">self</span>, <span class="pl-k">**</span>options) File <span class="pl-s">"/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/werkzeug/serving.py"</span>, line <span class="pl-c1">988</span>, in <span class="pl-en">run_simple</span> run_with_reloader(inner, extra_files, reloader_interval, reloader_type) File <span class="pl-s">"/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/werkzeug/_reloader.py"</span>, line <span class="pl-c1">332</span>, in <span class="pl-en">run_with_reloader</span> sys.exit(reloader.restart_with_reloader()) File <span class="pl-s">"/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/werkzeug/_reloader.py"</span>, line <span class="pl-c1">176</span>, in <span class="pl-en">restart_with_reloader</span> exit_code <span class="pl-k">=</span> subprocess.call(args, <span class="pl-v">env</span><span class="pl-k">=</span>new_environ, <span class="pl-v">close_fds</span><span class="pl-k">=</span><span class="pl-c1">False</span>) File <span class="pl-s">"/usr/lib/python3.5/subprocess.py"</span>, line <span class="pl-c1">557</span>, in <span class="pl-en">call</span> <span class="pl-k">with</span> Popen(<span class="pl-k">*</span>popenargs, <span class="pl-k">**</span>kwargs) <span class="pl-k">as</span> p: File <span class="pl-s">"/usr/lib/python3.5/subprocess.py"</span>, line <span class="pl-c1">947</span>, in <span class="pl-en">__init__</span> restore_signals, start_new_session) File <span class="pl-s">"/usr/lib/python3.5/subprocess.py"</span>, line <span class="pl-c1">1551</span>, in <span class="pl-en">_execute_child</span> <span class="pl-k">raise</span> child_exception_type(errno_num, err_msg) <span class="pl-en">OSError</span>: <span class="pl-s">[Errno 8] Exec format error</span> </pre></div> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Python version: Python 3.5.2</li> <li>Flask version:1.0.2</li> <li>Werkzeug version:0.15.1</li> </ul>
<p dir="auto">The new 0.15.0 does not run in Docker for Windows. Have not tried Docker on other platforms.</p> <p dir="auto">Minimal example with Flask.</p> <p dir="auto">app.py</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, world!' if __name__ == '__main__': app.run(debug=True, host='0.0.0.0')"><pre class="notranslate"><code class="notranslate">from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, world!' if __name__ == '__main__': app.run(debug=True, host='0.0.0.0') </code></pre></div> <p dir="auto">Dockerfile</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="FROM python:3-onbuild COPY . /usr/src/app CMD [&quot;python&quot;, &quot;app.py&quot;]"><pre class="notranslate"><code class="notranslate">FROM python:3-onbuild COPY . /usr/src/app CMD ["python", "app.py"] </code></pre></div> <p dir="auto">requirements.txt</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Werkzeug==0.14.1 Flask"><pre class="notranslate"><code class="notranslate"># Werkzeug==0.14.1 Flask </code></pre></div> <p dir="auto">Run <code class="notranslate">docker build -t flask_test .</code> and then <code class="notranslate">docker run flask_test</code>.<br> Error in container:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="λ docker run flask_test * Serving Flask app &quot;app&quot; (lazy loading) * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: on * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) * Restarting with stat Traceback (most recent call last): File &quot;app.py&quot;, line 11, in &lt;module&gt; app.run(debug=True, host='0.0.0.0') File &quot;/usr/local/lib/python3.6/site-packages/flask/app.py&quot;, line 943, in run run_simple(host, port, self, **options) File &quot;/usr/local/lib/python3.6/site-packages/werkzeug/serving.py&quot;, line 988, in run_simple run_with_reloader(inner, extra_files, reloader_interval, reloader_type) File &quot;/usr/local/lib/python3.6/site-packages/werkzeug/_reloader.py&quot;, line 332, in run_with_reloader sys.exit(reloader.restart_with_reloader()) File &quot;/usr/local/lib/python3.6/site-packages/werkzeug/_reloader.py&quot;, line 176, in restart_with_reloader exit_code = subprocess.call(args, env=new_environ, close_fds=False) File &quot;/usr/local/lib/python3.6/subprocess.py&quot;, line 267, in call with Popen(*popenargs, **kwargs) as p: File &quot;/usr/local/lib/python3.6/subprocess.py&quot;, line 709, in __init__ restore_signals, start_new_session) File &quot;/usr/local/lib/python3.6/subprocess.py&quot;, line 1344, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: '/usr/src/app/app.py"><pre class="notranslate"><code class="notranslate">λ docker run flask_test * Serving Flask app "app" (lazy loading) * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: on * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) * Restarting with stat Traceback (most recent call last): File "app.py", line 11, in &lt;module&gt; app.run(debug=True, host='0.0.0.0') File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 943, in run run_simple(host, port, self, **options) File "/usr/local/lib/python3.6/site-packages/werkzeug/serving.py", line 988, in run_simple run_with_reloader(inner, extra_files, reloader_interval, reloader_type) File "/usr/local/lib/python3.6/site-packages/werkzeug/_reloader.py", line 332, in run_with_reloader sys.exit(reloader.restart_with_reloader()) File "/usr/local/lib/python3.6/site-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader exit_code = subprocess.call(args, env=new_environ, close_fds=False) File "/usr/local/lib/python3.6/subprocess.py", line 267, in call with Popen(*popenargs, **kwargs) as p: File "/usr/local/lib/python3.6/subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "/usr/local/lib/python3.6/subprocess.py", line 1344, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: '/usr/src/app/app.py </code></pre></div> <p dir="auto">Uncomment the first line in <code class="notranslate">requirements.txt</code> and it runs properly after rebuild.</p>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="W0613 14:15:54.827171 9637 reflector.go:334] k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory.go:393: watch of *api.Node ended with: too old resource version: 724 (731) --- FAIL: TestUnschedulableNodes (0.15s) panic: interface conversion: interface {} is nil, not *api.Node [recovered] panic: interface conversion: interface {} is nil, not *api.Node goroutine 12895 [running]: panic(0x239e4c0, 0xc827e8c680) /usr/local/go/src/runtime/panic.go:464 +0x3e6 testing.tRunner.func1(0xc8285e46c0) /usr/local/go/src/testing/testing.go:467 +0x192 panic(0x239e4c0, 0xc827e8c680) /usr/local/go/src/runtime/panic.go:426 +0x4e9 k8s.io/kubernetes/test/integration.waitForReflection.func1(0x1d66b20, 0x0, 0x0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:112 +0x222 k8s.io/kubernetes/pkg/util/wait.WaitFor(0xc826e77dc0, 0xc828bd33b8, 0xc827faef00, 0x0, 0x0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:210 +0x77 k8s.io/kubernetes/pkg/util/wait.pollInternal(0xc826e77dc0, 0xc828bd33b8, 0x0, 0x0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:170 +0x8a k8s.io/kubernetes/pkg/util/wait.Poll(0x5f5e100, 0x6fc23ac00, 0xc828bd33b8, 0x0, 0x0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:164 +0x4f k8s.io/kubernetes/test/integration.waitForReflection(0xc8285e46c0, 0x7f24991d6498, 0xc827043840, 0x297dee0, 0x19, 0x2d27730, 0x0, 0x0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:108 +0xd7 k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes.func1(0xc8285e46c0, 0xc827225900, 0x7f24991d6498, 0xc827043840, 0xc8286f7740) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:178 +0x249 k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes(0xc8285e46c0, 0xc8286f7740, 0x7f24991d6498, 0xc827043840) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:242 +0xaf9 k8s.io/kubernetes/test/integration.TestUnschedulableNodes(0xc8285e46c0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:84 +0x73e testing.tRunner(0xc8285e46c0, 0x3a6baa8) /usr/local/go/src/testing/testing.go:473 +0x98 created by testing.RunTests /usr/local/go/src/testing/testing.go:582 +0x892 FAIL k8s.io/kubernetes/test/integration 218.503s"><pre class="notranslate"><code class="notranslate">W0613 14:15:54.827171 9637 reflector.go:334] k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory.go:393: watch of *api.Node ended with: too old resource version: 724 (731) --- FAIL: TestUnschedulableNodes (0.15s) panic: interface conversion: interface {} is nil, not *api.Node [recovered] panic: interface conversion: interface {} is nil, not *api.Node goroutine 12895 [running]: panic(0x239e4c0, 0xc827e8c680) /usr/local/go/src/runtime/panic.go:464 +0x3e6 testing.tRunner.func1(0xc8285e46c0) /usr/local/go/src/testing/testing.go:467 +0x192 panic(0x239e4c0, 0xc827e8c680) /usr/local/go/src/runtime/panic.go:426 +0x4e9 k8s.io/kubernetes/test/integration.waitForReflection.func1(0x1d66b20, 0x0, 0x0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:112 +0x222 k8s.io/kubernetes/pkg/util/wait.WaitFor(0xc826e77dc0, 0xc828bd33b8, 0xc827faef00, 0x0, 0x0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:210 +0x77 k8s.io/kubernetes/pkg/util/wait.pollInternal(0xc826e77dc0, 0xc828bd33b8, 0x0, 0x0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:170 +0x8a k8s.io/kubernetes/pkg/util/wait.Poll(0x5f5e100, 0x6fc23ac00, 0xc828bd33b8, 0x0, 0x0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:164 +0x4f k8s.io/kubernetes/test/integration.waitForReflection(0xc8285e46c0, 0x7f24991d6498, 0xc827043840, 0x297dee0, 0x19, 0x2d27730, 0x0, 0x0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:108 +0xd7 k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes.func1(0xc8285e46c0, 0xc827225900, 0x7f24991d6498, 0xc827043840, 0xc8286f7740) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:178 +0x249 k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes(0xc8285e46c0, 0xc8286f7740, 0x7f24991d6498, 0xc827043840) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:242 +0xaf9 k8s.io/kubernetes/test/integration.TestUnschedulableNodes(0xc8285e46c0) /home/decarr/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:84 +0x73e testing.tRunner(0xc8285e46c0, 0x3a6baa8) /usr/local/go/src/testing/testing.go:473 +0x98 created by testing.RunTests /usr/local/go/src/testing/testing.go:582 +0x892 FAIL k8s.io/kubernetes/test/integration 218.503s </code></pre></div> <p dir="auto">seen on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="158445710" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/26806" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/26806/hovercard" href="https://github.com/kubernetes/kubernetes/pull/26806">#26806</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="panic: interface conversion: interface {} is nil, not *api.Node [recovered] panic: interface conversion: interface {} is nil, not *api.Node goroutine 42845 [running]: panic(0x24413e0, 0xc8383133c0) /usr/local/go/src/runtime/panic.go:481 +0x3e6 testing.tRunner.func1(0xc83bebbc20) /usr/local/go/src/testing/testing.go:467 +0x192 panic(0x24413e0, 0xc8383133c0) /usr/local/go/src/runtime/panic.go:443 +0x4e9 k8s.io/kubernetes/test/integration.waitForReflection.func1(0x1deefa0, 0x0, 0x0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:112 +0x222 k8s.io/kubernetes/pkg/util/wait.WaitFor(0xc837aa12a0, 0xc838313300, 0xc838175320, 0x0, 0x0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:210 +0x77 k8s.io/kubernetes/pkg/util/wait.pollInternal(0xc837aa12a0, 0xc838313300, 0x0, 0x0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:170 +0x8a k8s.io/kubernetes/pkg/util/wait.Poll(0x5f5e100, 0x6fc23ac00, 0xc838313300, 0x0, 0x0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:164 +0x4f k8s.io/kubernetes/test/integration.waitForReflection(0xc83bebbc20, 0x7f210f5a71e8, 0xc837c740a0, 0x2a3dce0, 0x19, 0x2e00598, 0x0, 0x0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:108 +0x172 k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes.func1(0xc83bebbc20, 0xc831b12500, 0x7f210f5a71e8, 0xc837c740a0, 0xc838c9ae80) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:178 +0x249 k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes(0xc83bebbc20, 0xc838c9ae80, 0x7f210f5a71e8, 0xc837c740a0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:242 +0xaf9 k8s.io/kubernetes/test/integration.TestUnschedulableNodes(0xc83bebbc20) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:84 +0x73e testing.tRunner(0xc83bebbc20, 0x3b6ee50) /usr/local/go/src/testing/testing.go:473 +0x98 created by testing.RunTests /usr/local/go/src/testing/testing.go:582 +0x892"><pre class="notranslate"><code class="notranslate">panic: interface conversion: interface {} is nil, not *api.Node [recovered] panic: interface conversion: interface {} is nil, not *api.Node goroutine 42845 [running]: panic(0x24413e0, 0xc8383133c0) /usr/local/go/src/runtime/panic.go:481 +0x3e6 testing.tRunner.func1(0xc83bebbc20) /usr/local/go/src/testing/testing.go:467 +0x192 panic(0x24413e0, 0xc8383133c0) /usr/local/go/src/runtime/panic.go:443 +0x4e9 k8s.io/kubernetes/test/integration.waitForReflection.func1(0x1deefa0, 0x0, 0x0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:112 +0x222 k8s.io/kubernetes/pkg/util/wait.WaitFor(0xc837aa12a0, 0xc838313300, 0xc838175320, 0x0, 0x0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:210 +0x77 k8s.io/kubernetes/pkg/util/wait.pollInternal(0xc837aa12a0, 0xc838313300, 0x0, 0x0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:170 +0x8a k8s.io/kubernetes/pkg/util/wait.Poll(0x5f5e100, 0x6fc23ac00, 0xc838313300, 0x0, 0x0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:164 +0x4f k8s.io/kubernetes/test/integration.waitForReflection(0xc83bebbc20, 0x7f210f5a71e8, 0xc837c740a0, 0x2a3dce0, 0x19, 0x2e00598, 0x0, 0x0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:108 +0x172 k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes.func1(0xc83bebbc20, 0xc831b12500, 0x7f210f5a71e8, 0xc837c740a0, 0xc838c9ae80) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:178 +0x249 k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes(0xc83bebbc20, 0xc838c9ae80, 0x7f210f5a71e8, 0xc837c740a0) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:242 +0xaf9 k8s.io/kubernetes/test/integration.TestUnschedulableNodes(0xc83bebbc20) /go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:84 +0x73e testing.tRunner(0xc83bebbc20, 0x3b6ee50) /usr/local/go/src/testing/testing.go:473 +0x98 created by testing.RunTests /usr/local/go/src/testing/testing.go:582 +0x892 </code></pre></div> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/davidopp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/davidopp">@davidopp</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mml/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mml">@mml</a></p>
1
<p dir="auto">As mentioned in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7725438" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/1177" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/1177/hovercard" href="https://github.com/numpy/numpy/issues/1177">numpy/numpy/issues/1177</a>, Chirp Z-transform and special cases of it have been submitted to SciPy under public domain by Paul Kienzle and Nadav Horesh: <a href="https://mail.python.org/pipermail/scipy-user/2009-January/019530.html" rel="nofollow">[SciPy-user] Chirp Z transform</a></p> <p dir="auto">The special cases of CZT are zoom FFT and "scaled FFT" (not sure what that does). DFT is also a special case of CZT, so if you call <code class="notranslate">czt(data)</code> with the default options, it's an FFT, but faster for prime sizes because of Bluestein's algorithm, useful in <code class="notranslate">resample</code> for instance? (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="41809016" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/3956" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/3956/hovercard" href="https://github.com/scipy/scipy/pull/3956">#3956</a>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="x = rand(42073) # prime length allclose(czt(x), fft(x)) Out[37]: True timeit czt(x) 10 loops, best of 3: 53.9 ms per loop timeit fft(x) 1 loops, best of 3: 2.35 s per loop 2.35 / 53.9e-3 # speedup factor Out[40]: 43.59925788497217"><pre class="notranslate"><code class="notranslate">x = rand(42073) # prime length allclose(czt(x), fft(x)) Out[37]: True timeit czt(x) 10 loops, best of 3: 53.9 ms per loop timeit fft(x) 1 loops, best of 3: 2.35 s per loop 2.35 / 53.9e-3 # speedup factor Out[40]: 43.59925788497217 </code></pre></div> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/stefanv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/stefanv">@stefanv</a> said:</p> <blockquote> <p dir="auto">Thank you both for the contribution! I've reviewed the code and think<br> it should be included in SciPy. Would someone else like to have a<br> look before I commit it?</p> <p dir="auto">Where would the best place for this be? scipy.fftpack?</p> </blockquote> <p dir="auto">I think it makes sense to put it in scipy.fftpack, too, though that doesn't have any classes, just functions. (Unless it should all be put in numpy, but I'm guessing zoom FFT is too specialized for that?)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import numpy as np &gt;&gt;&gt; from scipy import sparse &gt;&gt;&gt; sparse.hstack( (sparse.csr_matrix([[1,2]]), np.array([[]])) ) Traceback (most recent call last): File &quot;&lt;ipython-input-27-f65b402ca75d&gt;&quot;, line 1, in &lt;module&gt; hstack( (csr_matrix([[1,2]]), np.array([[]])) ) File &quot;C:\Python27\lib\site-packages\scipy\sparse\construct.py&quot;, line 423, in hstack return bmat([blocks], format=format, dtype=dtype) File &quot;C:\Python27\lib\site-packages\scipy\sparse\construct.py&quot;, line 535, in bmat raise ValueError('blocks[:,%d] is all None' % bcol_lengths.argmin()) ValueError: blocks[:,1] is all None"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; import numpy as np &gt;&gt;&gt; from scipy import sparse &gt;&gt;&gt; sparse.hstack( (sparse.csr_matrix([[1,2]]), np.array([[]])) ) Traceback (most recent call last): File "&lt;ipython-input-27-f65b402ca75d&gt;", line 1, in &lt;module&gt; hstack( (csr_matrix([[1,2]]), np.array([[]])) ) File "C:\Python27\lib\site-packages\scipy\sparse\construct.py", line 423, in hstack return bmat([blocks], format=format, dtype=dtype) File "C:\Python27\lib\site-packages\scipy\sparse\construct.py", line 535, in bmat raise ValueError('blocks[:,%d] is all None' % bcol_lengths.argmin()) ValueError: blocks[:,1] is all None </code></pre></div> <p dir="auto">The same error occurs with all sparse matrix formats and with vstack.</p>
0
<h2 dir="auto">Steps to Reproduce</h2> <p dir="auto">Create simple Scaffold with AppBar and endDrawer. Make drawer visible. See that under transparent part of the view, in appBar, back button shows up. It might be related with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="268139019" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/12691" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/12691/hovercard" href="https://github.com/flutter/flutter/issues/12691">#12691</a> issue.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16545480/34540904-9589b0e8-f0d6-11e7-9178-79874cba3bc7.jpg"><img src="https://user-images.githubusercontent.com/16545480/34540904-9589b0e8-f0d6-11e7-9178-79874cba3bc7.jpg" alt="back_button_issue" style="max-width: 100%;"></a></p> <h2 dir="auto">Logs</h2> <h2 dir="auto">Flutter Doctor</h2> <p dir="auto">[✓] Flutter (on Linux, locale en_US.UTF-8, channel alpha)<br> • Flutter at /home/kamil/Flutter<br> • Framework revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/8f65fec5f5f7d7afbb0965f4a44bdb330a28fb19/hovercard" href="https://github.com/flutter/flutter/commit/8f65fec5f5f7d7afbb0965f4a44bdb330a28fb19"><tt>8f65fec</tt></a> (3 weeks ago), 2017-12-12 09:50:14 -0800<br> • Engine revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/edaecdc8b8098f20512c23745b9d0b135a8ee56d/hovercard" href="https://github.com/flutter/flutter/commit/edaecdc8b8098f20512c23745b9d0b135a8ee56d"><tt>edaecdc</tt></a><br> • Tools Dart version 1.25.0-dev.11.0<br> • Engine Dart version 2.0.0-edge.d8ae797298c3a6cf8dc9f4558707bd2672224d3e</p> <p dir="auto">[✓] Android toolchain - develop for Android devices (Android SDK 26.0.2)<br> • Android SDK at /home/kamil/Programs/Android/<br> • Android NDK at /home/kamil/Programs/Android/ndk-bundle<br> • Platform android-26, build-tools 26.0.2<br> • ANDROID_HOME = /home/kamil/Programs/Android/<br> • Java binary at: /home/kamil/Programs/android-studio/jre/bin/java<br> • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)</p> <p dir="auto">[✓] Android Studio (version 3.0)<br> • Android Studio at /home/kamil/Programs/android-studio<br> • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)</p> <p dir="auto">[✓] Connected devices<br> • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)</p>
<h2 dir="auto">Steps to Reproduce</h2> <ol dir="auto"> <li>Add an <code class="notranslate">appBar</code> with a <code class="notranslate">title</code> and <code class="notranslate">endDrawer</code> to a <code class="notranslate">Scaffold</code> in a LTR language (English in my case).</li> <li>Observe the <code class="notranslate">AppBar</code>. No back button.</li> <li>Open the <code class="notranslate">endDrawer</code></li> <li>Observe the <code class="notranslate">AppBar</code>. Back Button appears.</li> </ol> <p dir="auto">Not an end of the world bug by any means, but overall it looks a bit weird / causes a visual flash in the UI as the Drawer animates in smoothly and then the back button pops in all of a sudden. In addition, it can't be tapped because it's underneath the Drawer layer, so it appears to lack functional value for being there.</p> <p dir="auto">Might make sense to simply not show the back button in response to a Drawer being opened? Not sure what other ramifications that would have...</p> <p dir="auto">Thanks for your time :)</p> <h2 dir="auto">Screenshot</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/126604/34038468-bb376c08-e18c-11e7-9886-b08b6089e209.png"><img src="https://user-images.githubusercontent.com/126604/34038468-bb376c08-e18c-11e7-9886-b08b6089e209.png" alt="screenshot_1513334416" style="max-width: 100%;"></a></p> <h2 dir="auto">Flutter Doctor</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (on Mac OS X 10.13.2 17C88, locale en-US, channel alpha) • Flutter at /Users/phillywiggins/lab/flutter • Framework revision 8f65fec5f5 (3 days ago), 2017-12-12 09:50:14 -0800 • Engine revision edaecdc8b8 • Tools Dart version 1.25.0-dev.11.0 • Engine Dart version 2.0.0-edge.d8ae797298c3a6cf8dc9f4558707bd2672224d3e [✓] Android toolchain - develop for Android devices (Android SDK 26.0.2) • Android SDK at /Users/phillywiggins/Library/Android/sdk • Android NDK at /Users/phillywiggins/Library/Android/sdk/ndk-bundle • Platform android-26, build-tools 26.0.2 • ANDROID_HOME = /Users/phillywiggins/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] iOS toolchain - develop for iOS devices (Xcode 9.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.2, Build version 9C40b • ios-deploy 1.9.2 • CocoaPods version 1.3.1 [✓] Android Studio (version 3.0) • Android Studio at /Applications/Android Studio.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] IntelliJ IDEA Community Edition (version 2017.3.1) • Flutter plugin version 20.0.3 • Dart plugin version 173.3942.31 [✓] Connected devices • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)"><pre class="notranslate"><code class="notranslate">[✓] Flutter (on Mac OS X 10.13.2 17C88, locale en-US, channel alpha) • Flutter at /Users/phillywiggins/lab/flutter • Framework revision 8f65fec5f5 (3 days ago), 2017-12-12 09:50:14 -0800 • Engine revision edaecdc8b8 • Tools Dart version 1.25.0-dev.11.0 • Engine Dart version 2.0.0-edge.d8ae797298c3a6cf8dc9f4558707bd2672224d3e [✓] Android toolchain - develop for Android devices (Android SDK 26.0.2) • Android SDK at /Users/phillywiggins/Library/Android/sdk • Android NDK at /Users/phillywiggins/Library/Android/sdk/ndk-bundle • Platform android-26, build-tools 26.0.2 • ANDROID_HOME = /Users/phillywiggins/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] iOS toolchain - develop for iOS devices (Xcode 9.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.2, Build version 9C40b • ios-deploy 1.9.2 • CocoaPods version 1.3.1 [✓] Android Studio (version 3.0) • Android Studio at /Applications/Android Studio.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] IntelliJ IDEA Community Edition (version 2017.3.1) • Flutter plugin version 20.0.3 • Dart plugin version 173.3942.31 [✓] Connected devices • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator) </code></pre></div>
1
<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> Angular (and all its dependencies) are compiled down to ES5</p> <p dir="auto"><strong>Expected behavior</strong><br> Compile everything down to ES2015. I (and more and more Angular users) am only supporting evergreen browsers. Those all have 95%+ support of es6, heck most have even es2016, and es2017 features are getting close too!</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> Using ES6 over es5 has the following:</p> <ol dir="auto"> <li>smaller runtime</li> <li>less (to none) polyfills</li> <li>faster execution. (I know not everything is faster now, actually for a lot of features it's actually opposite, but browsers are improving really fast, an ES6 support is getting faster and faster. This is high on the agenda of browser vendors)</li> <li>did I mention SMALLER runtime yet?</li> <li>easier to shake (I'm not too sure on this though.)</li> <li>the happy feeling of using modern, up to date stuff</li> <li>much smaller source maps, so faster for development too.</li> <li>more readable code in the runtime</li> </ol> <p dir="auto">To be clear, what I want is an Angular runtime that targets ES2015+ instead of ES5. I know I can do this for my portion of a project, but what I want is to ship an entire ES6 app to the browser. When your target is modern browsers, you should ship modern JS.</p>
<p dir="auto">With v4, angular starts to ship ES6 code as part of its npm packages. However, Angular's compiler has no option to output ES6 code, only TypeScript code (for AOT) or ES5 code (for JIT).</p> <p dir="auto">Also, our metadata collection is broken for JIT and native ES6 mode (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="215593558" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/15325" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/15325/hovercard" href="https://github.com/angular/angular/issues/15325">#15325</a>).</p> <p dir="auto">Add an option to allow to use ES6 in both cases.</p>
1
<p dir="auto">I use Ctrl+Enter and Ctrl+Shift+Enter to insert lines above and below respectively in Visual Studio <strong>all the time</strong>. It drives me a bit bonkers that the shortcuts are swapped in VSCode.</p> <p dir="auto">Given the name "Visual Studio Code" implies somewhat of a derivative of "Visual Studio", could you please change the keyboard shortcuts for these two commands to be consistent with Visual Studio?</p>
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alefragnani/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alefragnani">@alefragnani</a> on October 24, 2015 0:31</em></p> <p dir="auto">How could I get some language/colorizer settings?</p> <p dir="auto">I'm creating an extension to add personalized comments, and would like to get the <em>line comment</em> language/colorizer setting (<code class="notranslate">//</code>, <code class="notranslate">#</code>, etc) from the current language.</p> <p dir="auto">I did take a look at <a href="https://github.com/Microsoft/vscode-comment">vscode-comment</a> demo and <code class="notranslate">export interface ILanguage</code>, but didn't find how to <em>read</em> the setting.</p> <p dir="auto">Thanks in advance</p> <p dir="auto"><em>Copied from original issue: Microsoft/vscode-extensionbuilders#57</em></p>
0
<p dir="auto">Summary:<br> Some code which installs and runs successfully actually fails with an error when used with <code class="notranslate">deno compile</code>.</p> <p dir="auto">Details:<br> Trying out <code class="notranslate">deno compile</code> for task running tool project: <a href="https://deno.land/x/dnit" rel="nofollow">https://deno.land/x/dnit</a><br> Using current deno version 1.7.5</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ deno compile --allow-read --allow-write --allow-run --unstable https://deno.land/x/[email protected]/main.ts Check https://deno.land/x/[email protected]/main.ts Bundle https://deno.land/x/[email protected]/main.ts Compile https://deno.land/x/[email protected]/main.ts Emit dnit $ ./dnit error: ReferenceError: normalize is not defined at file://$deno$/bundle.js:3749:20"><pre class="notranslate"><code class="notranslate">$ deno compile --allow-read --allow-write --allow-run --unstable https://deno.land/x/[email protected]/main.ts Check https://deno.land/x/[email protected]/main.ts Bundle https://deno.land/x/[email protected]/main.ts Compile https://deno.land/x/[email protected]/main.ts Emit dnit $ ./dnit error: ReferenceError: normalize is not defined at file://$deno$/bundle.js:3749:20 </code></pre></div> <p dir="auto">The same code runs ok when used with <code class="notranslate">deno install</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ deno install --allow-read --allow-write --allow-run --unstable -f --name dnit https://deno.land/x/[email protected]/main.ts ✅ Successfully installed dnit /home/pault/.deno/bin/dnit $ dnit --version dnit 1.11.0"><pre class="notranslate"><code class="notranslate">$ deno install --allow-read --allow-write --allow-run --unstable -f --name dnit https://deno.land/x/[email protected]/main.ts ✅ Successfully installed dnit /home/pault/.deno/bin/dnit $ dnit --version dnit 1.11.0 </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno 1.7.5 (release, x86_64-unknown-linux-gnu) v8 9.0.123 typescript 4.1.4"><pre lang="$" class="notranslate"><code class="notranslate">deno 1.7.5 (release, x86_64-unknown-linux-gnu) v8 9.0.123 typescript 4.1.4 </code></pre></div> <p dir="auto">By the looks of it it's a duplicate of keywords/issues:<br> <code class="notranslate">String.prototype.normalize()</code><br> <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>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'worker-0' panicked at 'not yet implemented: Worker are currently not supported in standalone binaries', /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.15.3/standalone.rs:208:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace"><pre class="notranslate"><code class="notranslate">thread 'worker-0' panicked at 'not yet implemented: Worker are currently not supported in standalone binaries', /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.15.3/standalone.rs:208:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace </code></pre></div> <p dir="auto">deno v1.15.3</p>
0
<p dir="auto">Travis use <code class="notranslate">pip 6.0.7</code><br> Today we had the following error:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pip install -U requests==2.14.0 Using cached requests-2.14.0-py2.py3-none-any.whl Exception: Traceback (most recent call last): File &quot;/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/basecommand.py&quot;, line 232, in main status = self.run(options, args) File &quot;/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/commands/install.py&quot;, line 339, in run requirement_set.prepare_files(finder) File &quot;/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/req/req_set.py&quot;, line 436, in prepare_files req_to_install.extras): File &quot;/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py&quot;, line 2496, in requires dm = self._dep_map File &quot;/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py&quot;, line 2697, in _dep_map self.__dep_map = self._compute_dependencies() File &quot;/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py&quot;, line 2730, in _compute_dependencies common = frozenset(reqs_for_extra(None)) File &quot;/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py&quot;, line 2727, in reqs_for_extra if req.marker_fn(override={'extra':extra}): File &quot;/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/_vendor/_markerlib/markers.py&quot;, line 113, in marker_fn return eval(compiled_marker, environment) File &quot;&lt;environment marker&gt;&quot;, line 1, in &lt;module&gt; NameError: name 'platform_system' is not defined"><pre class="notranslate"><span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-c1">-</span><span class="pl-v">U</span> <span class="pl-s1">requests</span><span class="pl-c1">==</span><span class="pl-c1">2.14</span>.<span class="pl-c1">0</span> <span class="pl-v">Using</span> <span class="pl-s1">cached</span> <span class="pl-s1">requests</span><span class="pl-c1">-</span><span class="pl-c1">2.14</span>.<span class="pl-c1">0</span><span class="pl-c1">-</span><span class="pl-s1">py2</span>.<span class="pl-s1">py3</span><span class="pl-c1">-</span><span class="pl-s1">none</span><span class="pl-c1">-</span><span class="pl-s1">any</span>.<span class="pl-s1">whl</span> <span class="pl-v">Exception</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">"/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/basecommand.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">232</span>, <span class="pl-c1">in</span> <span class="pl-s1">main</span> <span class="pl-s1">status</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">run</span>(<span class="pl-s1">options</span>, <span class="pl-s1">args</span>) <span class="pl-v">File</span> <span class="pl-s">"/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/commands/install.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">339</span>, <span class="pl-s1">in</span> <span class="pl-s1">run</span> <span class="pl-s1">requirement_set</span>.<span class="pl-en">prepare_files</span>(<span class="pl-s1">finder</span>) <span class="pl-v">File</span> <span class="pl-s">"/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/req/req_set.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">436</span>, <span class="pl-s1">in</span> <span class="pl-s1">prepare_files</span> <span class="pl-s1">req_to_install</span>.<span class="pl-s1">extras</span>): <span class="pl-v">File</span> <span class="pl-s">"/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">2496</span>, <span class="pl-c1">in</span> <span class="pl-s1">requires</span> <span class="pl-s1">dm</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_dep_map</span> <span class="pl-v">File</span> <span class="pl-s">"/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">2697</span>, <span class="pl-s1">in</span> <span class="pl-s1">_dep_map</span> <span class="pl-s1">self</span>.<span class="pl-s1">__dep_map</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_compute_dependencies</span>() <span class="pl-v">File</span> <span class="pl-s">"/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">2730</span>, <span class="pl-s1">in</span> <span class="pl-s1">_compute_dependencies</span> <span class="pl-s1">common</span> <span class="pl-c1">=</span> <span class="pl-en">frozenset</span>(<span class="pl-en">reqs_for_extra</span>(<span class="pl-c1">None</span>)) <span class="pl-v">File</span> <span class="pl-s">"/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">2727</span>, <span class="pl-s1">in</span> <span class="pl-s1">reqs_for_extra</span> <span class="pl-k">if</span> <span class="pl-s1">req</span>.<span class="pl-en">marker_fn</span>(<span class="pl-s1">override</span><span class="pl-c1">=</span>{<span class="pl-s">'extra'</span>:<span class="pl-s1">extra</span>}): <span class="pl-v">File</span> <span class="pl-s">"/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pip/_vendor/_markerlib/markers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">113</span>, <span class="pl-s1">in</span> <span class="pl-s1">marker_fn</span> <span class="pl-k">return</span> <span class="pl-en">eval</span>(<span class="pl-s1">compiled_marker</span>, <span class="pl-s1">environment</span>) <span class="pl-v">File</span> <span class="pl-s">"&lt;environment marker&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">NameError</span>: <span class="pl-s1">name</span> <span class="pl-s">'platform_system'</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-s1">defined</span></pre></div> <p dir="auto">We can fix it using:<br> <code class="notranslate">pip install -U pip</code><br> <code class="notranslate"># Successfully installed pip-9.0.1</code></p> <p dir="auto">But maybe too much travis build use default pip version<br> Could be dual compatibility this requests package?</p> <p dir="auto">We had a similar fix for pylint: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="172792410" data-permission-text="Title is private" data-url="https://github.com/pylint-dev/astroid/issues/360" data-hovercard-type="pull_request" data-hovercard-url="/pylint-dev/astroid/pull/360/hovercard" href="https://github.com/pylint-dev/astroid/pull/360">pylint-dev/astroid#360</a> based on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="150585499" data-permission-text="Title is private" data-url="https://github.com/pypa/packaging/issues/72" data-hovercard-type="issue" data-hovercard-url="/pypa/packaging/issues/72/hovercard" href="https://github.com/pypa/packaging/issues/72">pypa/packaging#72</a></p>
<p dir="auto">Example with pip 6.1.1 (but same with pip 8.1.1):</p> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt; pip install requests You are using pip version 6.1.1, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting requests Using cached requests-2.14.0-py2.py3-none-any.whl Exception: Traceback (most recent call last): File &quot;D:\VEnvs\testpip\lib\site-packages\pip\basecommand.py&quot;, line 246, in main status = self.run(options, args) File &quot;D:\VEnvs\testpip\lib\site-packages\pip\commands\install.py&quot;, line 342, in run requirement_set.prepare_files(finder) File &quot;D:\VEnvs\testpip\lib\site-packages\pip\req\req_set.py&quot;, line 345, in prepare_files functools.partial(self._prepare_file, finder)) File &quot;D:\VEnvs\testpip\lib\site-packages\pip\req\req_set.py&quot;, line 290, in _walk_req_to_install more_reqs = handler(req_to_install) File &quot;D:\VEnvs\testpip\lib\site-packages\pip\req\req_set.py&quot;, line 557, in _prepare_file set(req_to_install.extras) - set(dist.extras) File &quot;D:\VEnvs\testpip\lib\site-packages\pip\_vendor\pkg_resources\__init__.py&quot;, line 2758, in extras return [dep for dep in self._dep_map if dep] File &quot;D:\VEnvs\testpip\lib\site-packages\pip\_vendor\pkg_resources\__init__.py&quot;, line 2781, in _dep_map self.__dep_map = self._compute_dependencies() File &quot;D:\VEnvs\testpip\lib\site-packages\pip\_vendor\pkg_resources\__init__.py&quot;, line 2814, in _compute_dependencies common = frozenset(reqs_for_extra(None)) File &quot;D:\VEnvs\testpip\lib\site-packages\pip\_vendor\pkg_resources\__init__.py&quot;, line 2811, in reqs_for_extra if req.marker_fn(override={'extra':extra}): File &quot;D:\VEnvs\testpip\lib\site-packages\pip\_vendor\_markerlib\markers.py&quot;, line 113, in marker_fn return eval(compiled_marker, environment) File &quot;&lt;environment marker&gt;&quot;, line 1, in &lt;module&gt; NameError: name 'platform_system' is not defined"><pre class="notranslate">&gt; <span class="pl-s1">pip install requests</span> <span class="pl-c1">You are using pip version 6.1.1, however version 9.0.1 is available.</span> <span class="pl-c1">You should consider upgrading via the 'pip install --upgrade pip' command.</span> <span class="pl-c1">Collecting requests</span> <span class="pl-c1"> Using cached requests-2.14.0-py2.py3-none-any.whl</span> <span class="pl-c1"> Exception:</span> <span class="pl-c1"> Traceback (most recent call last):</span> <span class="pl-c1"> File "D:\VEnvs\testpip\lib\site-packages\pip\basecommand.py", line 246, in main</span> <span class="pl-c1"> status = self.run(options, args)</span> <span class="pl-c1"> File "D:\VEnvs\testpip\lib\site-packages\pip\commands\install.py", line 342, in run</span> <span class="pl-c1"> requirement_set.prepare_files(finder)</span> <span class="pl-c1"> File "D:\VEnvs\testpip\lib\site-packages\pip\req\req_set.py", line 345, in prepare_files</span> <span class="pl-c1"> functools.partial(self._prepare_file, finder))</span> <span class="pl-c1"> File "D:\VEnvs\testpip\lib\site-packages\pip\req\req_set.py", line 290, in _walk_req_to_install</span> <span class="pl-c1"> more_reqs = handler(req_to_install)</span> <span class="pl-c1"> File "D:\VEnvs\testpip\lib\site-packages\pip\req\req_set.py", line 557, in _prepare_file</span> <span class="pl-c1"> set(req_to_install.extras) - set(dist.extras)</span> <span class="pl-c1"> File "D:\VEnvs\testpip\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2758, in extras</span> <span class="pl-c1"> return [dep for dep in self._dep_map if dep]</span> <span class="pl-c1"> File "D:\VEnvs\testpip\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2781, in _dep_map</span> <span class="pl-c1"> self.__dep_map = self._compute_dependencies()</span> <span class="pl-c1"> File "D:\VEnvs\testpip\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2814, in _compute_dependencies</span> <span class="pl-c1"> common = frozenset(reqs_for_extra(None))</span> <span class="pl-c1"> File "D:\VEnvs\testpip\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2811, in reqs_for_extra</span> <span class="pl-c1"> if req.marker_fn(override={'extra':extra}):</span> <span class="pl-c1"> File "D:\VEnvs\testpip\lib\site-packages\pip\_vendor\_markerlib\markers.py", line 113, in marker_fn</span> <span class="pl-c1"> return eval(compiled_marker, environment)</span> <span class="pl-c1"> File "&lt;environment marker&gt;", line 1, in &lt;module&gt;</span> <span class="pl-c1"> NameError: name 'platform_system' is not defined</span></pre></div> <p dir="auto">So, installing requests 2.14.0 implicitly requires pip &gt;= 9.x. Should be at least in the release note as a disclaimer, or be fixed if it's not on purpose.</p>
1
<h3 dir="auto">💻</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/cli</p> <h3 dir="auto">Input code</h3> <p dir="auto">I tried to reproduce this in the REPL, but 7.17.10 isn't an option there and that's the only version where I've seen this happen.</p> <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 have this simple method that produces a <code class="notranslate">get</code> function that will be used to build an accessor. It' simple enough that up through 7.17.8 it came out of the transpiler with only whitespace changes:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="makeGetter() { const wrapper = this; return function get() { return wrapper.getInfo( this ); }; }"><pre class="notranslate"><span class="pl-en">makeGetter</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-s1">wrapper</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-k">function</span> <span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">wrapper</span><span class="pl-kos">.</span><span class="pl-en">getInfo</span><span class="pl-kos">(</span> <span class="pl-smi">this</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">After updating <code class="notranslate">@babel/core</code> from <code class="notranslate">7.17.8</code> to <code class="notranslate">7.17.10</code> it's getting transpiled to this:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" makeGetter() { return function get() { return this.getInfo(this); }; }"><pre class="notranslate"> <span class="pl-en">makeGetter</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-k">function</span> <span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">getInfo</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <h3 dir="auto">Environment</h3> <p dir="auto"><code class="notranslate">@babel/core</code> - <code class="notranslate">7.17.10</code><br> <code class="notranslate">node v16.14.0</code></p> <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>
<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/cli</p> <h3 dir="auto">Input code</h3> <p dir="auto">Reproduced in <a href="https://babel.dev/repl#?browsers=defaults%2C%20not%20ie%2011%2C%20not%20ie_mob%2011&amp;build=&amp;builtIns=false&amp;corejs=3.21&amp;spec=false&amp;loose=false&amp;code_lz=MYGwhgzhAEBiD28BGYBO0DeAoa1jwDsIAXVAV2GPlQAoBKTHXaYgCwEsIA6AM0RXQBeaABYATAG4muGvWiCAfI2bN2PaDTade_NNACEg4eIbYVKtqngB3aAQCmtgKKortAORaYfZGnsATdzopc2gAX2lwunoQ8KwI_CJiaB95O0c4XVpgrCA&amp;debug=false&amp;forceAllTransforms=true&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=false&amp;fileSize=false&amp;timeTravel=false&amp;sourceType=module&amp;lineWrap=false&amp;presets=env&amp;prettier=false&amp;targets=&amp;version=7.17.11&amp;externalPlugins=babel-plugin-minify-dead-code-elimination%400.5.1&amp;assumptions=%7B%7D" rel="nofollow">Babel REPL</a>.</p> <h3 dir="auto">Configuration file name</h3> <p dir="auto"><em>No response</em></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">Enabling <code class="notranslate">babel-plugin-minify-dead-code-elimination</code> plugin destroys <code class="notranslate">this</code> scope for arrow functions inside classes.</p> <p dir="auto">The <code class="notranslate">var _this = this</code> workaround should not be eliminated as it is absolutely necessary for the <code class="notranslate">this</code> scope to work in locally defined arrow functions.</p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Babel version v7.17.11</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">I narrowed the problem down locally to <code class="notranslate">@babel/traverse</code> v7.17.10. By reverting that package to v7.17.9 this problem does not occur.</p>
1
<p dir="auto">The Glyphicons font files that come in with the Bootstrap 3.0.0 archive don't work at all, no matter the browser. As far as I could tell those files are corrupted. I downloaded the files you are using on <a href="http://getbootstrap.com/" rel="nofollow">http://getbootstrap.com/</a> for example and they worked ok.</p>
<p dir="auto">When using a customized version of Bootstrap 3.0 the Glyph icons don't work. The font file sizes differ from the "normal" version.</p>
1
<p dir="auto">Here is a simple example:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function f(s: &quot;foo&quot; | &quot;bar&quot;) { if (s == &quot;baz&quot;) { ... } }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-s1">s</span>: <span class="pl-s">"foo"</span> <span class="pl-c1">|</span> <span class="pl-s">"bar"</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">s</span> <span class="pl-c1">==</span> <span class="pl-s">"baz"</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">As you see, there is a typo in "baz", but tsc doesn't catch that. On the other hand, if you try to <code class="notranslate">s == 123</code>, tsc will say that a string cannot be compared with a number.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type foo = 'hey' | 'nay'; switch (&lt;foo&gt;undefined) { case 'boom': console.log('never the case'); break; // expected unreachable code, actual no problem }"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">foo</span> <span class="pl-c1">=</span> <span class="pl-s">'hey'</span> <span class="pl-c1">|</span> <span class="pl-s">'nay'</span><span class="pl-kos">;</span> <span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-kos">&lt;</span><span class="pl-smi">foo</span><span class="pl-kos">&gt;</span><span class="pl-c1">undefined</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">case</span> <span class="pl-s">'boom'</span>: <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'never the case'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">break</span><span class="pl-kos">;</span> <span class="pl-c">// expected unreachable code, actual no problem</span> <span class="pl-kos">}</span></pre></div>
1
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">1.8.2</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="interface Foo { property: (boolean | { bar: number }) } var foo: Foo = { property: { bar: 123 } }; var p = foo.property; if (typeof p === 'object') { // This works fine! console.log(p.bar); // Prints &quot;123&quot; } if (typeof foo.property === 'object') { // This line produces the following compilation error: // &quot;Property 'bar' does not exist on type 'boolean | { bar: number; }'&quot; console.log(foo.property.bar); }"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-c1">property</span>: <span class="pl-kos">(</span><span class="pl-smi">boolean</span> <span class="pl-c1">|</span> <span class="pl-kos">{</span> <span class="pl-c1">bar</span>: <span class="pl-smi">number</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-k">var</span> <span class="pl-s1">foo</span>: <span class="pl-smi">Foo</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">property</span>: <span class="pl-kos">{</span> <span class="pl-c1">bar</span>: <span class="pl-c1">123</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">p</span> <span class="pl-c1">=</span> <span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-c1">property</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">p</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// This works fine!</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">p</span><span class="pl-kos">.</span><span class="pl-c1">bar</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Prints "123"</span> <span class="pl-kos">}</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-c1">property</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// This line produces the following compilation error:</span> <span class="pl-c">// "Property 'bar' does not exist on type 'boolean | { bar: number; }'"</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-c1">property</span><span class="pl-kos">.</span><span class="pl-c1">bar</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></p> <p dir="auto">I expected <code class="notranslate">if (typeof foo.property === 'object') {</code> to be a valid type guard.</p> <p dir="auto"><strong>Actual behavior:</strong></p> <p dir="auto">It's not.</p>
<p dir="auto">I just found out that property access expressions doesn't work on type predicate functions and <code class="notranslate">instanceof</code> type guards.</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" class A { propA: number; } class B { propB: number; } class C { propC: A; } declare function isA(p1: any): p1 is D; interface D { a: A | B b: A | C; } let d: D; if (isA(d.b)) { d.b.propA; //error } function foo(d: D) { if (d.b instanceof A) { d.b.propA // error } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span> <span class="pl-c1">propA</span>: <span class="pl-smi">number</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-kos">{</span> <span class="pl-c1">propB</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">C</span> <span class="pl-kos">{</span> <span class="pl-c1">propC</span>: <span class="pl-smi">A</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">declare</span> <span class="pl-k">function</span> <span class="pl-s1">isA</span><span class="pl-kos">(</span><span class="pl-s1">p1</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span>: <span class="pl-s1">p1</span> is <span class="pl-smi">D</span><span class="pl-kos">;</span> <span class="pl-k">interface</span> <span class="pl-smi">D</span> <span class="pl-kos">{</span> <span class="pl-c1">a</span>: <span class="pl-smi">A</span> <span class="pl-c1">|</span> <span class="pl-smi">B</span> <span class="pl-c1">b</span>: <span class="pl-smi">A</span> <span class="pl-c1">|</span> <span class="pl-smi">C</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">let</span> <span class="pl-s1">d</span>: <span class="pl-smi">D</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-en">isA</span><span class="pl-kos">(</span><span class="pl-s1">d</span><span class="pl-kos">.</span><span class="pl-c1">b</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">d</span><span class="pl-kos">.</span><span class="pl-c1">b</span><span class="pl-kos">.</span><span class="pl-c1">propA</span><span class="pl-kos">;</span> <span class="pl-c">//error</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-s1">d</span>: <span class="pl-smi">D</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">d</span><span class="pl-kos">.</span><span class="pl-c1">b</span> <span class="pl-k">instanceof</span> <span class="pl-smi">A</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">d</span><span class="pl-kos">.</span><span class="pl-c1">b</span><span class="pl-kos">.</span><span class="pl-c1">propA</span> <span class="pl-c">// error</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">I'm not sure if there is an easy fix on this problem. We are provided just a symbol when narrowing. That symbol represent the left most expression and then we walk up the if statement. There is no easy way of controlling symbol by symbol on each namespace in a property access expression in the if-statement-body. Because there is no info about the property access expression provided in <code class="notranslate">getTypeOfSymbolAtLocation(symbol: Symbol, node: Node)</code>.</p> <p dir="auto">I also found that type assertion expressions are also not working in type predicate functions. But I will land a fix on that.</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if (isA(&lt;A&gt;union)) { a = union; } if (isA(union as A)) { a = union; }"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-en">isA</span><span class="pl-kos">(</span><span class="pl-kos">&lt;</span><span class="pl-smi">A</span><span class="pl-kos">&gt;</span><span class="pl-s1">union</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">union</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-en">isA</span><span class="pl-kos">(</span><span class="pl-s1">union</span> <span class="pl-k">as</span> <span class="pl-smi">A</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">union</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
1
<p dir="auto">Test Case:</p> <p dir="auto">interface Overload {</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="foo(id:&quot;special&quot;, value:number):void; foo(id:string, value:any):void;"><pre class="notranslate"><code class="notranslate">foo(id:"special", value:number):void; foo(id:string, value:any):void; </code></pre></div> <p dir="auto">}</p> <p dir="auto">class Bug {</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="private overload:Overload; public call():void { this.overload.foo(&quot;special&quot;, &quot;&quot;); }"><pre class="notranslate"><code class="notranslate">private overload:Overload; public call():void { this.overload.foo("special", ""); } </code></pre></div> <p dir="auto">}</p> <p dir="auto">Compile with tsc. Observe that there is no error message. Shouldn't the compiler complain about the fact that this.overload.foo("special", "") is an incompatible call. E.g. "" is not assignment compatible to number.</p>
<p dir="auto">Hi, consider this bit of code:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Bar { public bar: string; } interface IFoo { doFoo(type: any, bar: any): void; doFoo(type: &quot;Quux&quot;, bar: Bar): string; }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">bar</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">IFoo</span> <span class="pl-kos">{</span> <span class="pl-c1">doFoo</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-smi">any</span><span class="pl-kos">,</span> <span class="pl-s1">bar</span>: <span class="pl-smi">any</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">doFoo</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-s">"Quux"</span><span class="pl-kos">,</span> <span class="pl-s1">bar</span>: <span class="pl-smi">Bar</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">We use it like this:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var foo: IFoo; var result:string = foo.doFoo(&quot;Quux&quot;, new Bar()); // fine"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">foo</span>: <span class="pl-smi">IFoo</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">result</span>:<span class="pl-smi">string</span> <span class="pl-c1">=</span> <span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-en">doFoo</span><span class="pl-kos">(</span><span class="pl-s">"Quux"</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-smi">Bar</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">// fine</span></pre></div> <p dir="auto">However, while still specifying "Quux", if we pass any type other than new Bar() for the second argument, the compiler falls back to the non-overloaded method:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Error TS2011: Cannot convert 'void' to 'string'. var result2: string = foo.doFoo(&quot;Quux&quot;, &quot;bar&quot;);"><pre class="notranslate"><span class="pl-c">// Error TS2011: Cannot convert 'void' to 'string'.</span> <span class="pl-k">var</span> <span class="pl-s1">result2</span>: <span class="pl-smi">string</span> <span class="pl-c1">=</span> <span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-en">doFoo</span><span class="pl-kos">(</span><span class="pl-s">"Quux"</span><span class="pl-kos">,</span> <span class="pl-s">"bar"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">I think this is a bit unfortunate. We are missing an opportunity to verify that the additional arguments also match the overloaded signature.</p> <p dir="auto">Ideally the following</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="foo.doFoo(&quot;Quux&quot;, &quot;bar&quot;);"><pre class="notranslate"><span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-en">doFoo</span><span class="pl-kos">(</span><span class="pl-s">"Quux"</span><span class="pl-kos">,</span> <span class="pl-s">"bar"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">should generate error TS2082: Supplied parameters do not match any signature of call target</p> <p dir="auto">See further discussion on the old <a href="https://typescript.codeplex.com/workitem/993" rel="nofollow">codeplex site</a>.</p>
1
<p dir="auto">My superset is installed on my AWS EC2 instance in:<br> /home/ec2-user/.pyenv/versions/2.7.12/lib/python2.7/site-packages</p> <p dir="auto">And my SSL is serving my /var/www/ securely on this same server. I created a webpage to display the dashboard in an iframe but, cannot get it to appear because of a mixed-content warning - not being able to display insecure content on a secure page.</p> <p dir="auto">How would I display my dashboards on a such a secure page when my python is in the server user account but, my website is in a SSL-enabled web area?</p> <p dir="auto">Thanks for any help!</p>
<p dir="auto">Hello I am trying to add HTTPS to Caravel... I made a hack:<br> /usr/local/bin/caravel (VPS, Debian 8 64bits)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" cmd = ( &quot;gunicorn &quot; &quot;-w {workers} &quot; &quot;--timeout {timeout} &quot; &quot;--certfile=/etc/ssl/certs/7524b7242d4e83b4.crt &quot; &quot;--keyfile=/etc/ssl/private/server.key &quot; &quot;-b 0.0.0.0:{port} &quot;"><pre class="notranslate"><code class="notranslate"> cmd = ( "gunicorn " "-w {workers} " "--timeout {timeout} " "--certfile=/etc/ssl/certs/7524b7242d4e83b4.crt " "--keyfile=/etc/ssl/private/server.key " "-b 0.0.0.0:{port} " </code></pre></div> <p dir="auto">It works. But I want to pass with arguments the values... in future updates I don't want to repeat the task.</p> <p dir="auto">I modify the caravel binary, I add to options:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@manager.option( '-t', '--timeout', default=config.get(&quot;CARAVEL_WEBSERVER_TIMEOUT&quot;), help=&quot;Specify the timeout (seconds) for the gunicorn web server&quot;) @manager.option( '-c', '--certfile', default=&quot;&quot;, help=&quot;Specify certificate path of https for the gunicorn web server&quot;) @manager.option( '-k', '--keyfile', default=&quot;&quot;, help=&quot;Specify key path of https for the gunicorn web server&quot;)"><pre class="notranslate"><code class="notranslate">@manager.option( '-t', '--timeout', default=config.get("CARAVEL_WEBSERVER_TIMEOUT"), help="Specify the timeout (seconds) for the gunicorn web server") @manager.option( '-c', '--certfile', default="", help="Specify certificate path of https for the gunicorn web server") @manager.option( '-k', '--keyfile', default="", help="Specify key path of https for the gunicorn web server") </code></pre></div> <p dir="auto">And:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" else: cmd = ( &quot;gunicorn &quot; &quot;-w {workers} &quot; &quot;--timeout {timeout} &quot; &quot;--certfile={certfile} &quot; &quot;--keyfile={keyfile} &quot; # &quot;--certfile=/etc/ssl/certs/7524b7242d4e83b4.crt &quot; # &quot;--keyfile=/etc/ssl/private/server.key &quot; &quot;-b 0.0.0.0:{port} &quot; #``` But didn't works. The idea to post this issues is share the hack and if someone wants to able https in a better way help me to make a better hack and pass arguments from command line."><pre class="notranslate"><code class="notranslate"> else: cmd = ( "gunicorn " "-w {workers} " "--timeout {timeout} " "--certfile={certfile} " "--keyfile={keyfile} " # "--certfile=/etc/ssl/certs/7524b7242d4e83b4.crt " # "--keyfile=/etc/ssl/private/server.key " "-b 0.0.0.0:{port} " #``` But didn't works. The idea to post this issues is share the hack and if someone wants to able https in a better way help me to make a better hack and pass arguments from command line. </code></pre></div>
1
<p dir="auto">The following program crashes with a panic:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package main import ( &quot;archive/tar&quot; &quot;bytes&quot; &quot;io&quot; &quot;io/ioutil&quot; ) func main() { data := []byte(&quot;\x13\x0300\x13\x03-821950296t\x13\x13\x83&quot; + &quot;s|\x83s\x1300qw\xe1f\xbb\x03000\x00\x00\x00\x10&quot; + &quot;011\x13s\xf410100t\x13\x13\x83s|\x83ss&quot; + &quot;\x000\x13s|\x83ss\xf4xS\x13s\xf410100t&quot; + &quot;\x13\x13\x83s|\x83ss\xf40\x13s|\x83ss\xf4qS0&quot; + &quot;\xd4t0\x1300q0\xf40\x00\x00\x00\x1001\x80\x00\x100&quot; + &quot;11\x13s\xf4101\xf40t\x1300q\xd4\xe1f\xbb\x03&quot; + &quot;\x00\x00\x00\xff\x80\x80\x80\x00\x80\x00\x00\x00\x00\x00\x9b\x92x\x13\xff\xff&quot; + &quot;\xff\x80100txS00t0\x1300qw010&quot; + &quot;100t\x13\x13\x83s|\x83ss\xf4xS00t0\x13&quot; + &quot;00qw\xe1f\xbb\x03000\x00\x00\x00\x10011\x13s&quot; + &quot;\xf410100t\x13\x13\x83s|\x83ss\xf40\x13s|&quot; + &quot;\x83ss\xf4xS\x13s\xf410100t\x13\x13\x83s|&quot; + &quot;\x83ss00\x13s|\x83ss\xf4xS00t0\x130&quot; + &quot;0q00\x00\x80\x00\x00\x1001s\xf410100t\x13&quot; + &quot;\x00\x00\x00 \xe1f\xbb\x0304\x00\x00\x00\x10011\x13\xff\xff&quot; + &quot;\xff\x80100txS00t0\x1300qw\xe1f\xbb&quot; + &quot;\x03000\x00\x00\x00\x10011\x13s\x83ss\xf4xS\x13&quot; + &quot;s\xf410100t\x13\x13\x83s|\x83ss\xf4311&quot; + &quot;033624846128380s|\x83ss&quot; + &quot;\xf41S00t0\x1300q000\x00\x00\x00\x1001&quot; + &quot;\x00\x00\x10011\x13s\xf410100t\x1300q\xd4&quot; + &quot;\xe1f\xbb\x0304\x00\x00\x00\x10\x83s|\x83ss\xf40\x13s&quot; + &quot;|\x83ss0xS00t0\x1300q000\x00\x00&quot; + &quot;\x00\x1001\x00\x00\x10011\x13s\xf410100t\x13&quot; + &quot;00x0\xe1f\xbb\x03\x00\x00\x100&quot;) t := tar.NewReader(bytes.NewReader(data)) for { _, err := t.Next() if err != nil { return } io.Copy(ioutil.Discard, t) } }"><pre class="notranslate"><span class="pl-k">package</span> main <span class="pl-k">import</span> ( <span class="pl-s">"archive/tar"</span> <span class="pl-s">"bytes"</span> <span class="pl-s">"io"</span> <span class="pl-s">"io/ioutil"</span> ) <span class="pl-k">func</span> <span class="pl-en">main</span>() { <span class="pl-s1">data</span> <span class="pl-c1">:=</span> []<span class="pl-smi">byte</span>(<span class="pl-s">"<span class="pl-cce">\x13</span><span class="pl-cce">\x03</span>00<span class="pl-cce">\x13</span><span class="pl-cce">\x03</span>-821950296t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"s|<span class="pl-cce">\x83</span>s<span class="pl-cce">\x13</span>00qw<span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span>000<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"011<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x00</span>0<span class="pl-cce">\x13</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>xS<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>10100t"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>0<span class="pl-cce">\x13</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>qS0"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xd4</span>t0<span class="pl-cce">\x13</span>00q0<span class="pl-cce">\xf4</span>0<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>01<span class="pl-cce">\x80</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>0"</span> <span class="pl-c1">+</span> <span class="pl-s">"11<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>101<span class="pl-cce">\xf4</span>0t<span class="pl-cce">\x13</span>00q<span class="pl-cce">\xd4</span><span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\xff</span><span class="pl-cce">\x80</span><span class="pl-cce">\x80</span><span class="pl-cce">\x80</span><span class="pl-cce">\x00</span><span class="pl-cce">\x80</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x9b</span><span class="pl-cce">\x92</span>x<span class="pl-cce">\x13</span><span class="pl-cce">\xff</span><span class="pl-cce">\xff</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xff</span><span class="pl-cce">\x80</span>100txS00t0<span class="pl-cce">\x13</span>00qw010"</span> <span class="pl-c1">+</span> <span class="pl-s">"100t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>xS00t0<span class="pl-cce">\x13</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"00qw<span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span>000<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>011<span class="pl-cce">\x13</span>s"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>0<span class="pl-cce">\x13</span>s|"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>xS<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x83</span>ss00<span class="pl-cce">\x13</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>xS00t0<span class="pl-cce">\x13</span>0"</span> <span class="pl-c1">+</span> <span class="pl-s">"0q00<span class="pl-cce">\x00</span><span class="pl-cce">\x80</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>01s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span> <span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span>04<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>011<span class="pl-cce">\x13</span><span class="pl-cce">\xff</span><span class="pl-cce">\xff</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xff</span><span class="pl-cce">\x80</span>100txS00t0<span class="pl-cce">\x13</span>00qw<span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x03</span>000<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>011<span class="pl-cce">\x13</span>s<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>xS<span class="pl-cce">\x13</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>311"</span> <span class="pl-c1">+</span> <span class="pl-s">"033624846128380s|<span class="pl-cce">\x83</span>ss"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xf4</span>1S00t0<span class="pl-cce">\x13</span>00q000<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>01"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>011<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span>00q<span class="pl-cce">\xd4</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span>04<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>0<span class="pl-cce">\x13</span>s"</span> <span class="pl-c1">+</span> <span class="pl-s">"|<span class="pl-cce">\x83</span>ss0xS00t0<span class="pl-cce">\x13</span>00q000<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>01<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>011<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"00x0<span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>0"</span>) <span class="pl-s1">t</span> <span class="pl-c1">:=</span> <span class="pl-s1">tar</span>.<span class="pl-en">NewReader</span>(<span class="pl-s1">bytes</span>.<span class="pl-en">NewReader</span>(<span class="pl-s1">data</span>)) <span class="pl-k">for</span> { <span class="pl-s1">_</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">t</span>.<span class="pl-en">Next</span>() <span class="pl-k">if</span> <span class="pl-s1">err</span> <span class="pl-c1">!=</span> <span class="pl-c1">nil</span> { <span class="pl-k">return</span> } <span class="pl-s1">io</span>.<span class="pl-en">Copy</span>(<span class="pl-s1">ioutil</span>.<span class="pl-c1">Discard</span>, <span class="pl-s1">t</span>) } }</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="panic: runtime error: slice bounds out of range [recovered] panic: runtime error: slice bounds out of range goroutine 1 [running]: io/ioutil.readAll.func1(0xc208041c58) src/io/ioutil/ioutil.go:30 +0x121 archive/tar.(*regFileReader).Read(0xc20800e420, 0xc20806e400, 0x200, 0x200, 0xc208070139, 0x0, 0x0) src/archive/tar/reader.go:748 +0x170 archive/tar.(*Reader).Read(0xc208070000, 0xc20806e400, 0x200, 0x200, 0x200, 0x0, 0x0) src/archive/tar/reader.go:735 +0x9d bytes.(*Buffer).ReadFrom(0xc208041bb0, 0x7f7a1683f268, 0xc208070000, 0x0, 0x0, 0x0) src/bytes/buffer.go:173 +0x242 io/ioutil.readAll(0x7f7a1683f268, 0xc208070000, 0x200, 0x0, 0x0, 0x0, 0x0, 0x0) src/io/ioutil/ioutil.go:33 +0x157 io/ioutil.ReadAll(0x7f7a1683f268, 0xc208070000, 0x0, 0x0, 0x0, 0x0, 0x0) src/io/ioutil/ioutil.go:42 +0x58 archive/tar.parsePAX(0x7f7a1683f268, 0xc208070000, 0x5edc78, 0x0, 0x0) src/archive/tar/reader.go:314 +0x55 archive/tar.(*Reader).Next(0xc208070000, 0xc208070000, 0x0, 0x0) src/archive/tar/reader.go:106 +0x4a2 main.main() tar.go:39 +0x170"><pre class="notranslate"><code class="notranslate">panic: runtime error: slice bounds out of range [recovered] panic: runtime error: slice bounds out of range goroutine 1 [running]: io/ioutil.readAll.func1(0xc208041c58) src/io/ioutil/ioutil.go:30 +0x121 archive/tar.(*regFileReader).Read(0xc20800e420, 0xc20806e400, 0x200, 0x200, 0xc208070139, 0x0, 0x0) src/archive/tar/reader.go:748 +0x170 archive/tar.(*Reader).Read(0xc208070000, 0xc20806e400, 0x200, 0x200, 0x200, 0x0, 0x0) src/archive/tar/reader.go:735 +0x9d bytes.(*Buffer).ReadFrom(0xc208041bb0, 0x7f7a1683f268, 0xc208070000, 0x0, 0x0, 0x0) src/bytes/buffer.go:173 +0x242 io/ioutil.readAll(0x7f7a1683f268, 0xc208070000, 0x200, 0x0, 0x0, 0x0, 0x0, 0x0) src/io/ioutil/ioutil.go:33 +0x157 io/ioutil.ReadAll(0x7f7a1683f268, 0xc208070000, 0x0, 0x0, 0x0, 0x0, 0x0) src/io/ioutil/ioutil.go:42 +0x58 archive/tar.parsePAX(0x7f7a1683f268, 0xc208070000, 0x5edc78, 0x0, 0x0) src/archive/tar/reader.go:314 +0x55 archive/tar.(*Reader).Next(0xc208070000, 0xc208070000, 0x0, 0x0) src/archive/tar/reader.go:106 +0x4a2 main.main() tar.go:39 +0x170 </code></pre></div> <p dir="auto">on commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/golang/go/commit/8017ace496f5a21bcd55377e250e325f8ba11d45/hovercard" href="https://github.com/golang/go/commit/8017ace496f5a21bcd55377e250e325f8ba11d45"><tt>8017ace</tt></a></p>
<p dir="auto">The following program crashes with a panic:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package main import ( &quot;archive/tar&quot; &quot;bytes&quot; &quot;io&quot; &quot;io/ioutil&quot; ) func main() { data := []byte(&quot;\x13\x0300\x13\x03-821950296t\x13\x13\x83&quot; + &quot;s|\x83s\x1300qw\xe1f\xbb\x03000\x00\x00\x00\x10&quot; + &quot;011\x13s\xf410100t\x13\x13\x83s|\x83ss&quot; + &quot;\x000\x13s|\x83ss\xf4xS\x13s\xf410100t&quot; + &quot;\x13\x13\x83s|\x83ss\xf40\x13s|\x83ss\xf4qS0&quot; + &quot;\xd4t0\x1300q0\xf40\x00\x00\x00\x1001\x80\x00\x100&quot; + &quot;11\x13s\xf4101\xf40t\x1300q\xd4\xe1f\xbb\x03&quot; + &quot;\x00\x00\x00\xff\x80\x80\x80\x00\x80\x00\x00\x00\x00\x00\x9b\x921\x13\xff\xff&quot; + &quot;\xff\x80100txS00t0\x1300qw010&quot; + &quot;100t\x13\x13\x83s|\x83ss\xf4xS00t0\x13&quot; + &quot;00qw\xe1f\xbb\x03000\x00\x00\x00\x10011\x13s&quot; + &quot;\xf410100t\x13\x13\x83s|\x83ss\xf40\x13s|&quot; + &quot;\x83ss\xf4xS\x13s\xf410100t\x13\x13\x83s|&quot; + &quot;\x83ss00\x13s|\x83ss0xS00t0\x130&quot; + &quot;0q00\x00\x80\x00\x00\x1001s\xf410100t\x13&quot; + &quot;\x00\x00\x00 \xe1f\xbb\x0304\x00\x00\x00\x10011\x13\xff\xff&quot; + &quot;\xff\x80100txS00t0\x1300qw\xe1f\xbb&quot; + &quot;\x03000\x00\x00\x00\x10011\x13s\x83ss\xf4xS\x13&quot; + &quot;s\xf410100t\x13\x13\x83s|\x83ss\xf4311&quot; + &quot;033624846128380s|\x83ss&quot; + &quot;\xf4xS00t0\x1300q000\x00\x00\x00\x1001&quot; + &quot;\x00\x00\x10011\x13s\xf410100t\x1300q\xd4&quot; + &quot;\xe1f\xbb\x0304\x00\x00\x00\x10\x83s|\x83ss\xf40\x13s&quot; + &quot;|\x83ss\xf4xS00t0\x1300q000\x00\x00&quot; + &quot;\x00\x1001\x00\x00\x10011\x13s\xf410100t\x13&quot; + &quot;00x0\xe1f\xbb\x03\x00\x00\x100&quot;) t := tar.NewReader(bytes.NewReader(data)) for { _, err := t.Next() if err != nil { return } io.Copy(ioutil.Discard, t) } }"><pre class="notranslate"><span class="pl-k">package</span> main <span class="pl-k">import</span> ( <span class="pl-s">"archive/tar"</span> <span class="pl-s">"bytes"</span> <span class="pl-s">"io"</span> <span class="pl-s">"io/ioutil"</span> ) <span class="pl-k">func</span> <span class="pl-en">main</span>() { <span class="pl-s1">data</span> <span class="pl-c1">:=</span> []<span class="pl-smi">byte</span>(<span class="pl-s">"<span class="pl-cce">\x13</span><span class="pl-cce">\x03</span>00<span class="pl-cce">\x13</span><span class="pl-cce">\x03</span>-821950296t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"s|<span class="pl-cce">\x83</span>s<span class="pl-cce">\x13</span>00qw<span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span>000<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"011<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x00</span>0<span class="pl-cce">\x13</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>xS<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>10100t"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>0<span class="pl-cce">\x13</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>qS0"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xd4</span>t0<span class="pl-cce">\x13</span>00q0<span class="pl-cce">\xf4</span>0<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>01<span class="pl-cce">\x80</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>0"</span> <span class="pl-c1">+</span> <span class="pl-s">"11<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>101<span class="pl-cce">\xf4</span>0t<span class="pl-cce">\x13</span>00q<span class="pl-cce">\xd4</span><span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\xff</span><span class="pl-cce">\x80</span><span class="pl-cce">\x80</span><span class="pl-cce">\x80</span><span class="pl-cce">\x00</span><span class="pl-cce">\x80</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x9b</span><span class="pl-cce">\x92</span>1<span class="pl-cce">\x13</span><span class="pl-cce">\xff</span><span class="pl-cce">\xff</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xff</span><span class="pl-cce">\x80</span>100txS00t0<span class="pl-cce">\x13</span>00qw010"</span> <span class="pl-c1">+</span> <span class="pl-s">"100t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>xS00t0<span class="pl-cce">\x13</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"00qw<span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span>000<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>011<span class="pl-cce">\x13</span>s"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>0<span class="pl-cce">\x13</span>s|"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>xS<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x83</span>ss00<span class="pl-cce">\x13</span>s|<span class="pl-cce">\x83</span>ss0xS00t0<span class="pl-cce">\x13</span>0"</span> <span class="pl-c1">+</span> <span class="pl-s">"0q00<span class="pl-cce">\x00</span><span class="pl-cce">\x80</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>01s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span> <span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span>04<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>011<span class="pl-cce">\x13</span><span class="pl-cce">\xff</span><span class="pl-cce">\xff</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xff</span><span class="pl-cce">\x80</span>100txS00t0<span class="pl-cce">\x13</span>00qw<span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x03</span>000<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>011<span class="pl-cce">\x13</span>s<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>xS<span class="pl-cce">\x13</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span><span class="pl-cce">\x13</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>311"</span> <span class="pl-c1">+</span> <span class="pl-s">"033624846128380s|<span class="pl-cce">\x83</span>ss"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xf4</span>xS00t0<span class="pl-cce">\x13</span>00q000<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>01"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>011<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span>00q<span class="pl-cce">\xd4</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span>04<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span><span class="pl-cce">\x83</span>s|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>0<span class="pl-cce">\x13</span>s"</span> <span class="pl-c1">+</span> <span class="pl-s">"|<span class="pl-cce">\x83</span>ss<span class="pl-cce">\xf4</span>xS00t0<span class="pl-cce">\x13</span>00q000<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>01<span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>011<span class="pl-cce">\x13</span>s<span class="pl-cce">\xf4</span>10100t<span class="pl-cce">\x13</span>"</span> <span class="pl-c1">+</span> <span class="pl-s">"00x0<span class="pl-cce">\xe1</span>f<span class="pl-cce">\xbb</span><span class="pl-cce">\x03</span><span class="pl-cce">\x00</span><span class="pl-cce">\x00</span><span class="pl-cce">\x10</span>0"</span>) <span class="pl-s1">t</span> <span class="pl-c1">:=</span> <span class="pl-s1">tar</span>.<span class="pl-en">NewReader</span>(<span class="pl-s1">bytes</span>.<span class="pl-en">NewReader</span>(<span class="pl-s1">data</span>)) <span class="pl-k">for</span> { <span class="pl-s1">_</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">t</span>.<span class="pl-en">Next</span>() <span class="pl-k">if</span> <span class="pl-s1">err</span> <span class="pl-c1">!=</span> <span class="pl-c1">nil</span> { <span class="pl-k">return</span> } <span class="pl-s1">io</span>.<span class="pl-en">Copy</span>(<span class="pl-s1">ioutil</span>.<span class="pl-c1">Discard</span>, <span class="pl-s1">t</span>) } }</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="panic: runtime error: slice bounds out of range goroutine 1 [running]: archive/tar.(*regFileReader).Read(0xc20800e420, 0xc208074000, 0x2000, 0x2000, 0x0, 0x0, 0x0) src/archive/tar/reader.go:748 +0x170 archive/tar.(*Reader).Read(0xc208070000, 0xc208074000, 0x2000, 0x2000, 0x4feab0, 0x0, 0x0) src/archive/tar/reader.go:735 +0x9d io/ioutil.devNull.ReadFrom(0x0, 0x7feaee410268, 0xc208070000, 0x0, 0x0, 0x0) src/io/ioutil/ioutil.go:151 +0xa1 io/ioutil.(*devNull).ReadFrom(0xc20800a4a0, 0x7feaee410268, 0xc208070000, 0xc208041e40, 0x0, 0x0) &lt;autogenerated&gt;:9 +0xb4 io.copyBuffer(0x7feaee4101c0, 0xc20800a4a0, 0x7feaee410268, 0xc208070000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) src/io/io.go:375 +0x183 io.Copy(0x7feaee4101c0, 0xc20800a4a0, 0x7feaee410268, 0xc208070000, 0x200, 0x0, 0x0) src/io/io.go:351 +0x6b main.main() tar.go:43 +0x1df"><pre class="notranslate"><code class="notranslate">panic: runtime error: slice bounds out of range goroutine 1 [running]: archive/tar.(*regFileReader).Read(0xc20800e420, 0xc208074000, 0x2000, 0x2000, 0x0, 0x0, 0x0) src/archive/tar/reader.go:748 +0x170 archive/tar.(*Reader).Read(0xc208070000, 0xc208074000, 0x2000, 0x2000, 0x4feab0, 0x0, 0x0) src/archive/tar/reader.go:735 +0x9d io/ioutil.devNull.ReadFrom(0x0, 0x7feaee410268, 0xc208070000, 0x0, 0x0, 0x0) src/io/ioutil/ioutil.go:151 +0xa1 io/ioutil.(*devNull).ReadFrom(0xc20800a4a0, 0x7feaee410268, 0xc208070000, 0xc208041e40, 0x0, 0x0) &lt;autogenerated&gt;:9 +0xb4 io.copyBuffer(0x7feaee4101c0, 0xc20800a4a0, 0x7feaee410268, 0xc208070000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) src/io/io.go:375 +0x183 io.Copy(0x7feaee4101c0, 0xc20800a4a0, 0x7feaee410268, 0xc208070000, 0x200, 0x0, 0x0) src/io/io.go:351 +0x6b main.main() tar.go:43 +0x1df </code></pre></div> <p dir="auto">on commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/golang/go/commit/8017ace496f5a21bcd55377e250e325f8ba11d45/hovercard" href="https://github.com/golang/go/commit/8017ace496f5a21bcd55377e250e325f8ba11d45"><tt>8017ace</tt></a></p>
1
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-learn-how-script-tags-and-document-ready-work#?solution=fccss%0A%24%28document%29.ready%28function%28%29%20%7B%7D%29%3B%0Afcces%0A%3C!--%20Only%20change%20code%20above%20this%20line.%20--%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch3%20class%3D%22text-primary%20text-center%22%3EjQuery%20Playground%3C%2Fh3%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23left-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22left-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target1%22%3E%23target1%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target2%22%3E%23target2%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target3%22%3E%23target3%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23right-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22right-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target4%22%3E%23target4%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target5%22%3E%23target5%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target6%22%3E%23target6%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A" rel="nofollow">Waypoint: Learn how Script Tags and Document Ready Work</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 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;script&gt; $(document).ready(function() {}); &lt;/script&gt; &lt;!-- Only change code above this line. --&gt; &lt;div class=&quot;container-fluid&quot;&gt; &lt;h3 class=&quot;text-primary text-center&quot;&gt;jQuery Playground&lt;/h3&gt; &lt;div class=&quot;row&quot;&gt; &lt;div class=&quot;col-xs-6&quot;&gt; &lt;h4&gt;#left-well&lt;/h4&gt; &lt;div class=&quot;well&quot; id=&quot;left-well&quot;&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target1&quot;&gt;#target1&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target2&quot;&gt;#target2&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target3&quot;&gt;#target3&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;col-xs-6&quot;&gt; &lt;h4&gt;#right-well&lt;/h4&gt; &lt;div class=&quot;well&quot; id=&quot;right-well&quot;&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target4&quot;&gt;#target4&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target5&quot;&gt;#target5&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target6&quot;&gt;#target6&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; "><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">ready</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-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-c">&lt;!-- Only change code above this line. --&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">container-fluid</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h3</span> <span class="pl-c1">class</span>="<span class="pl-s">text-primary text-center</span>"<span class="pl-kos">&gt;</span>jQuery Playground<span class="pl-kos">&lt;/</span><span class="pl-ent">h3</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">row</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span>#left-well<span class="pl-kos">&lt;/</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">left-well</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target1</span>"<span class="pl-kos">&gt;</span>#target1<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target2</span>"<span class="pl-kos">&gt;</span>#target2<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target3</span>"<span class="pl-kos">&gt;</span>#target3<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span>#right-well<span class="pl-kos">&lt;/</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">right-well</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target4</span>"<span class="pl-kos">&gt;</span>#target4<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target5</span>"<span class="pl-kos">&gt;</span>#target5<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target6</span>"<span class="pl-kos">&gt;</span>#target6<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">Image on the side is not showing. All I see is a "?" in a blue box. I am using a Mac computer. Should this be an issue?</p> <p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/size-your-images" rel="nofollow">Size your Images</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8</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; .smaller-image { width: 100px; } .red-text { color: red; } h2 { font-family: Lobster, Monospace; } p { font-size: 16px; font-family: Monospace; } &lt;/style&gt; &lt;h2 class=&quot;red-text&quot;&gt;CatPhotoApp&lt;/h2&gt; &lt;img class=&quot;smaller-image&quot; src=&quot;https://bit.ly/fcc-relaxing-cat&quot; alt=&quot;A cute orange cat lying on its back. &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-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">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-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-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</span>" <span class="pl-c1">src</span>="<span class="pl-s">https://bit.ly/fcc-relaxing-cat</span>" <span class="pl-c1">alt</span>="<span class="pl-s">A cute orange cat lying on its back. </span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">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>
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.23.0</li> <li>PowerToy Utility: FancyZones</li> <li>Running PowerToys as Admin: No</li> <li>Windows build number: 1909 (18363.1082)</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>Open the FZ editor with Win+`</li> <li>Set the number of zones to 7</li> <li>Select the Priority Grid layout</li> <li>Select "Edit selected layout"</li> <li>Drag the slider between zone 3 and zone 5 up and down repeatedly.</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">Zones 3/5 resize.</p> <h3 dir="auto">❌ Actual result</h3> <p dir="auto"><em>What is the actual result of the above steps?</em><br> Zone 4,5 continually increases in size, and zones 1,6,7 decrease to accomodate. See screenshot</p> <h2 dir="auto"><g-emoji class="g-emoji" alias="camera" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png">📷</g-emoji> Screenshots</h2> <p dir="auto"><em>Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form</em><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/43283738/94722765-96d58a80-030c-11eb-8312-e3b1257080f7.png"><img src="https://user-images.githubusercontent.com/43283738/94722765-96d58a80-030c-11eb-8312-e3b1257080f7.png" alt="image" style="max-width: 100%;"></a></p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">Improve current implementation of the FancyZones Editor that is complicated and hard to maintain.<br> Proposal created in cooperation with <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ivan100sic/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ivan100sic">@ivan100sic</a>.</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1> <h3 dir="auto">Data structures:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Zone: { int index; double width; double height; double x; double y; } Splitter: { Orientation orientation; //Horizontal or Vertical double position; List&lt;int&gt; negativeSideIndexes; //left/top zone indexes List&lt;int&gt; positiveSideIndexes; //right/bottom zone indexes }"><pre class="notranslate"><code class="notranslate">Zone: { int index; double width; double height; double x; double y; } Splitter: { Orientation orientation; //Horizontal or Vertical double position; List&lt;int&gt; negativeSideIndexes; //left/top zone indexes List&lt;int&gt; positiveSideIndexes; //right/bottom zone indexes } </code></pre></div> <h2 dir="auto">Use cases</h2> <h3 dir="auto">Drag splitter:</h3> <ul dir="auto"> <li>Move left: reduce width/height for each grid zone that has index contained in <code class="notranslate">negativeSideIndexes</code> and increase those parameters for <code class="notranslate">positiveSideIndexes</code>.</li> <li>Move right: similarly</li> </ul> <p dir="auto"><strong>Move is possible until every zone width/height is bigger than some small constant, ideally so that zone index numbers are not clipped.</strong></p> <h3 dir="auto">Split zone:</h3> <ul dir="auto"> <li> <p dir="auto">Non-snapped, snapped non-adjacent: update indexes in <code class="notranslate">zones</code> and in <code class="notranslate">splitters</code></p> <p dir="auto"><em>Rule for updating splitters:</em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="index &gt; splittedIndex -&gt; index++ index == splittedIndex &amp;&amp; orientation != newSplitterOrientation -&gt; insert(index + 1) index == splittedIndex &amp;&amp; orientation == newSplitterOrientation &amp;&amp; list == negativeSideIndexes -&gt; index++"><pre class="notranslate"><code class="notranslate">index &gt; splittedIndex -&gt; index++ index == splittedIndex &amp;&amp; orientation != newSplitterOrientation -&gt; insert(index + 1) index == splittedIndex &amp;&amp; orientation == newSplitterOrientation &amp;&amp; list == negativeSideIndexes -&gt; index++ </code></pre></div> </li> </ul> <p dir="auto"><em>Examples:</em></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8949536/87671359-e975c080-c779-11ea-8317-abefe5162cd4.png"><img src="https://user-images.githubusercontent.com/8949536/87671359-e975c080-c779-11ea-8317-abefe5162cd4.png" alt="image" style="max-width: 100%;"></a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="splittedIndex == 0 newSplitterOrientation == Horizontal Splitters update: { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 3 ] } -&gt; { orientation: Horizontal, negativeSideIndexes: [ 1, 2 ], positiveSideIndexes: [ 3, 4 ] } { orientation: Vertical, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 1, 3 ] } -&gt; { orientation: Vertical, negativeSideIndexes: [ 0, 1, 3 ], positiveSideIndexes: [ 2, 4 ] } "><pre class="notranslate"><code class="notranslate">splittedIndex == 0 newSplitterOrientation == Horizontal Splitters update: { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 3 ] } -&gt; { orientation: Horizontal, negativeSideIndexes: [ 1, 2 ], positiveSideIndexes: [ 3, 4 ] } { orientation: Vertical, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 1, 3 ] } -&gt; { orientation: Vertical, negativeSideIndexes: [ 0, 1, 3 ], positiveSideIndexes: [ 2, 4 ] } </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8949536/87671507-20e46d00-c77a-11ea-8ab2-c1cc6361651f.png"><img src="https://user-images.githubusercontent.com/8949536/87671507-20e46d00-c77a-11ea-8ab2-c1cc6361651f.png" alt="image" style="max-width: 100%;"></a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="splittedIndex == 1 newSplitterOrientation == Horizontal Splitters update: { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 3 ] } -&gt; { orientation: Horizontal, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 3, 4 ] } { orientation: Vertical, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 1, 3 ] } -&gt; { orientation: Vertical, negativeSideIndexes: [ 0, 3 ], positiveSideIndexes: [ 1, 2, 4 ] } "><pre class="notranslate"><code class="notranslate">splittedIndex == 1 newSplitterOrientation == Horizontal Splitters update: { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 3 ] } -&gt; { orientation: Horizontal, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 3, 4 ] } { orientation: Vertical, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 1, 3 ] } -&gt; { orientation: Vertical, negativeSideIndexes: [ 0, 3 ], positiveSideIndexes: [ 1, 2, 4 ] } </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8949536/87671514-2477f400-c77a-11ea-940e-3fec89b2fd79.png"><img src="https://user-images.githubusercontent.com/8949536/87671514-2477f400-c77a-11ea-940e-3fec89b2fd79.png" alt="image" style="max-width: 100%;"></a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="splittedIndex == 2 newSplitterOrientation == Horizontal Splitters update: { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 3 ] } -&gt; { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 4 ] } { orientation: Vertical, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 1, 3 ] } -&gt; { orientation: Vertical, negativeSideIndexes: [ 0, 2, 3 ], positiveSideIndexes: [ 1, 4 ] } "><pre class="notranslate"><code class="notranslate">splittedIndex == 2 newSplitterOrientation == Horizontal Splitters update: { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 3 ] } -&gt; { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 4 ] } { orientation: Vertical, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 1, 3 ] } -&gt; { orientation: Vertical, negativeSideIndexes: [ 0, 2, 3 ], positiveSideIndexes: [ 1, 4 ] } </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8949536/87671525-26da4e00-c77a-11ea-8ede-f9a479d8e8b4.png"><img src="https://user-images.githubusercontent.com/8949536/87671525-26da4e00-c77a-11ea-8ede-f9a479d8e8b4.png" alt="image" style="max-width: 100%;"></a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="splittedIndex == 3 newSplitterOrientation == Horizontal Splitters update: { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 3 ] } -&gt; { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 3 ] } { orientation: Vertical, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 1, 3 ] } -&gt; { orientation: Vertical, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 1, 3, 4 ] } "><pre class="notranslate"><code class="notranslate">splittedIndex == 3 newSplitterOrientation == Horizontal Splitters update: { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 3 ] } -&gt; { orientation: Horizontal, negativeSideIndexes: [ 0, 1 ], positiveSideIndexes: [ 2, 3 ] } { orientation: Vertical, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 1, 3 ] } -&gt; { orientation: Vertical, negativeSideIndexes: [ 0, 2 ], positiveSideIndexes: [ 1, 3, 4 ] } </code></pre></div> <ul dir="auto"> <li> <p dir="auto">Snapped adjacent:<br> Update existing splitter if</p> <ul dir="auto"> <li>orientation same</li> <li>position same</li> <li>one of the zones from negativeSideIndexes has bottom/right side == splitted zone top/left</li> <li>one of the zones from positiveSideIndexes has top/left side == splitted zone bottom/right</li> </ul> <p dir="auto">Otherwise add new splitter</p> </li> </ul> <p dir="auto"><strong>Don't to show splitter if it splits the zone into two pieces which are too small (less than Minimum Bounding Rectangle).</strong></p> <h3 dir="auto">Merge zones</h3> <ul dir="auto"> <li>Remove merged zones and add a new zone corresponding to Minimum Bounding Rectangle (use the closure algorithm <code class="notranslate">ExtendRangeToHaveEvenCellEdges</code> that should be reimplemented to work with a list of rectangles instead of cell child map).</li> <li>Update zone indexes</li> <li>Update splitters <ul dir="auto"> <li>Replace merged zones indexes with first merged zone index</li> <li>Update other indexes</li> <li>if <code class="notranslate">negativeSideIndexes</code> and <code class="notranslate">positiveSideIndexes</code> both contain same index after previous steps, remove that index from both lists</li> <li>if <code class="notranslate">negativeSideIndexes</code> or <code class="notranslate">positiveSideIndexes</code> contain only merged indexes, remove splitter</li> </ul> </li> </ul> <p dir="auto"><em>Example:</em><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8949536/87672511-c21ff300-c77b-11ea-95fc-2449973a796a.png"><img src="https://user-images.githubusercontent.com/8949536/87672511-c21ff300-c77b-11ea-95fc-2449973a796a.png" alt="image" style="max-width: 100%;"></a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="merged: [ 2, 3, 7, 8, 9 ] Splitters { Horizontal, negativeSideIndexes: [ 3 ], positiveSideIndexes: [ 8, 9 ] } -&gt; removed { Horizontal, negativeSideIndexes: [ 1, 2 ], positiveSideIndexes: [ 5, 6, 7 ] } -&gt; { Horizontal, negativeSideIndexes: [ 1 ], positiveSideIndexes: [ 5, 6 ] } { Horizontal, negativeSideIndexes: [ 7, 8, 9 ], positiveSideIndexes: [ 10, 11 ] } -&gt; { Horizontal, negativeSideIndexes: [ 2 ], positiveSideIndexes: [ 10, 11 ] } { Vertical, negativeSideIndexes: [ 5 ], positiveSideIndexes: [ 6 ] } -&gt; { Vertical, negativeSideIndexes: [ 5 ], positiveSideIndexes: [ 6 ] } { Vertical, negativeSideIndexes: [ 1, 6 ], positiveSideIndexes: [ 2, 7, 10 ] } -&gt; { Vertical, negativeSideIndexes: [ 1, 6 ], positiveSideIndexes: [ 2, 10 ] } { Vertical, negativeSideIndexes: [ 2, 7, 10 ], positiveSideIndexes: [ 3, 8, 11 ] } -&gt; { Vertical, negativeSideIndexes: [ 2, 6 ], positiveSideIndexes: [ 2, 7 ] } -&gt; { Vertical, negativeSideIndexes: [ 6 ], positiveSideIndexes: [ 7 ] } { Vertical, negativeSideIndexes: [ 8 ], positiveSideIndexes: [ 9 ] } -&gt; removed { Vertical, negativeSideIndexes: [ 3, 9, 11 ], positiveSideIndexes: [ 4, 12 ] } -&gt; { Vertical, negativeSideIndexes: [ 2, 7 ], positiveSideIndexes: [ 3, 8 ] }"><pre class="notranslate"><code class="notranslate">merged: [ 2, 3, 7, 8, 9 ] Splitters { Horizontal, negativeSideIndexes: [ 3 ], positiveSideIndexes: [ 8, 9 ] } -&gt; removed { Horizontal, negativeSideIndexes: [ 1, 2 ], positiveSideIndexes: [ 5, 6, 7 ] } -&gt; { Horizontal, negativeSideIndexes: [ 1 ], positiveSideIndexes: [ 5, 6 ] } { Horizontal, negativeSideIndexes: [ 7, 8, 9 ], positiveSideIndexes: [ 10, 11 ] } -&gt; { Horizontal, negativeSideIndexes: [ 2 ], positiveSideIndexes: [ 10, 11 ] } { Vertical, negativeSideIndexes: [ 5 ], positiveSideIndexes: [ 6 ] } -&gt; { Vertical, negativeSideIndexes: [ 5 ], positiveSideIndexes: [ 6 ] } { Vertical, negativeSideIndexes: [ 1, 6 ], positiveSideIndexes: [ 2, 7, 10 ] } -&gt; { Vertical, negativeSideIndexes: [ 1, 6 ], positiveSideIndexes: [ 2, 10 ] } { Vertical, negativeSideIndexes: [ 2, 7, 10 ], positiveSideIndexes: [ 3, 8, 11 ] } -&gt; { Vertical, negativeSideIndexes: [ 2, 6 ], positiveSideIndexes: [ 2, 7 ] } -&gt; { Vertical, negativeSideIndexes: [ 6 ], positiveSideIndexes: [ 7 ] } { Vertical, negativeSideIndexes: [ 8 ], positiveSideIndexes: [ 9 ] } -&gt; removed { Vertical, negativeSideIndexes: [ 3, 9, 11 ], positiveSideIndexes: [ 4, 12 ] } -&gt; { Vertical, negativeSideIndexes: [ 2, 7 ], positiveSideIndexes: [ 3, 8 ] } </code></pre></div>
1
<ol dir="auto"> <li>Terminal gets automatically <code class="notranslate">closed</code> when I try to <code class="notranslate">maximize</code> the screen on <code class="notranslate">extended</code> screen.</li> </ol>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">Windows Terminal should support automatic scrolling when user is selecting text with the mouse, as the mouse approaches the first or last lines. This is supported in the current conhost and it is missing in Windows Terminal.</p> <p dir="auto">If the feature is already planned or tracked by another bug, feel free to close it.</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1>
0
<h3 dir="auto">What problem does this feature solve?</h3> <p dir="auto">The 'Vue server renderer' package should pass in a URL object when creating a sandbox</p> <h3 dir="auto">What does the proposed API look like?</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="createBundleRenderer(bundle, { ...renderOptions, runInNewContext: 'once', sandbox: { URL: URL } });"><pre class="notranslate"><span class="pl-en">createBundleRenderer</span><span class="pl-kos">(</span><span class="pl-s1">bundle</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> ...<span class="pl-s1">renderOptions</span><span class="pl-kos">,</span> <span class="pl-c1">runInNewContext</span>: <span class="pl-s">'once'</span><span class="pl-kos">,</span> <span class="pl-c1">sandbox</span>: <span class="pl-kos">{</span> <span class="pl-c1">URL</span>: <span class="pl-c1">URL</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">Version</h3> <p dir="auto">2.6.11</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://jsfiddle.net/shengslogar/f4kc5vq2/32/" rel="nofollow">https://jsfiddle.net/shengslogar/f4kc5vq2/32/</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Create a watcher with an async handler. Make it throw an error.</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">It's captured by Vue error handler</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">Not being captured by vue error handler</p> <hr> <p dir="auto">Shows an uncaught promise error</p>
0
<p dir="auto">Currently the nightly build versions are 0.6</p> <p dir="auto">Nightly build checks at appveyor and travis are done against 0.6, but at <a href="http://pkg.julialang.org/" rel="nofollow">http://pkg.julialang.org/</a> all packages are shown to pass/fail 0.5 although they are not checked against 0.5 anymore.<br> Or does <a href="http://pkg.julialang.org/" rel="nofollow">http://pkg.julialang.org/</a> just need some time to proceed to 0.6?</p> <p dir="auto">Download of version 0.5 (rc1) seems also not possible anymore from <a href="http://julialang.org/downloads/" rel="nofollow">http://julialang.org/downloads/</a> as no link is provided (at least I can't find it).</p> <p dir="auto">This is not a major problem for me but maybe its confusing for some people.</p>
<p dir="auto">There seems to be now way to download a Julia 0.5 binary at the moment. The stable releaser binary is Julia 0.4.6, while the nightly build binary is Julia 0.6.</p>
1
<p dir="auto">I have this String literal type example</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type TStyles = 'x' | 'y' | 'z';"><pre class="notranslate"><span class="pl-s1">type</span> <span class="pl-v">TStyles</span> <span class="pl-c1">=</span> <span class="pl-s">'x'</span> <span class="pl-c1">|</span> <span class="pl-s">'y'</span> <span class="pl-c1">|</span> <span class="pl-s">'z'</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Using IntelliSense for completion this code will be awesome:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var style:TStyles = '&gt;&gt;&gt; I want to use [CTRL+J] here to offer only valid TStyles values &lt;&lt;&lt;';"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">style</span>:<span class="pl-v">TStyles</span> <span class="pl-c1">=</span> <span class="pl-s">'&gt;&gt;&gt; I want to use [CTRL+J] here to offer only valid TStyles values &lt;&lt;&lt;'</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Many JavaScript frameworks are heavily based on using string values to do many things, from getting and setting attributes via the property name in string form, to defining event handlers to handle browsing to particular URLs. TypeScript added specialized signatures in overloads as one means to help mitigate the pain associated with these types of APIs. Unfortunately for a number of patterns this is insufficient and not general enough. Rather than try to design a specific type system enhancement that could handle some or all of the many ways these frameworks use string literals we could try some simple tricks in Visual Studio to help out. Namely, when typing a string literal the editor should provide a completion list based on other string literals already used in your program. Some other tools already provide similar capabilities (ex Sublime Text).</p> <p dir="auto">Consider something like this in a Backbone View class:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class TodoView extends Backbone.View&lt;TodoModel&gt; { initialize() { this.listenTo(this.model, 'change', () =&gt; this.render()); this.listenTo(this.model, 'todoDescriptionChanged', () =&gt; this.render()); this.listenTo(this.model, 'destory', () =&gt; this.remove()); }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">TodoView</span> <span class="pl-k">extends</span> <span class="pl-smi">Backbone</span><span class="pl-kos">.</span><span class="pl-c1">View</span><span class="pl-c1">&lt;</span><span class="pl-smi">TodoModel</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">initialize</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">listenTo</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">model</span><span class="pl-kos">,</span> <span class="pl-s">'change'</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-smi">this</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">listenTo</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">model</span><span class="pl-kos">,</span> <span class="pl-s">'todoDescriptionChanged'</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-smi">this</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">listenTo</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">model</span><span class="pl-kos">,</span> <span class="pl-s">'destory'</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-smi">this</span><span class="pl-kos">.</span><span class="pl-en">remove</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">At another point I may attempt to manually trigger one of these events:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" updateTodo() { var desc = this.$input.val().trim(); var todo = this.model; if (desc) { todo.save({ title: desc }); // provide completion list inside this string literal showing // todoDescriptionChanged to avoid hard to debug typos // and speed up development todo.trigger('todoDescriptionChanged'); } }"><pre class="notranslate"> <span class="pl-en">updateTodo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">desc</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">$input</span><span class="pl-kos">.</span><span class="pl-en">val</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">trim</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">todo</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">model</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">desc</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">todo</span><span class="pl-kos">.</span><span class="pl-en">save</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">title</span>: <span class="pl-s1">desc</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// provide completion list inside this string literal showing </span> <span class="pl-c">// todoDescriptionChanged to avoid hard to debug typos </span> <span class="pl-c">// and speed up development</span> <span class="pl-s1">todo</span><span class="pl-kos">.</span><span class="pl-en">trigger</span><span class="pl-kos">(</span><span class="pl-s">'todoDescriptionChanged'</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">This should be a relatively cheap solution to a common set of problems that we've always hoped TypeScript can improve on over JavaScript. If you did accidentally make a typo in one use of the literal this could also help you discover that when seeing 2 completion list items that are similar but slightly different.</p>
1
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">I met huge build time degradation in new beta release. For example, node target in prod mode took</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Version: webpack 5.0.0-beta.0 Time: 231016ms"><pre class="notranslate"><code class="notranslate">Version: webpack 5.0.0-beta.0 Time: 231016ms </code></pre></div> <p dir="auto">instead of</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Version: webpack 4.40.2 Time: 147028ms"><pre class="notranslate"><code class="notranslate">Version: webpack 4.40.2 Time: 147028ms </code></pre></div> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <p dir="auto">I recorded graphs via <code class="notranslate">webpack.debug.ProfilingPlugin</code> for browser and node targets in both modes (dev and prod). I tried to open it but chrome stucks in the processing phase and closes devtool after that. Could you try to open it?</p> <p dir="auto"><a href="https://drive.google.com/file/d/13HA58298lrtX6FjJ833YuHkPqhYSU8Fj/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/13HA58298lrtX6FjJ833YuHkPqhYSU8Fj/view?usp=sharing</a></p> <p dir="auto">Link to config: <a href="https://github.com/7rulnik/webpack-config-v5-beta-built-time-issue/pull/1/files">https://github.com/7rulnik/webpack-config-v5-beta-built-time-issue/pull/1/files</a></p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">Seems that it should take same or less time</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: v5.0.0-beta.0<br> Node.js version: v12.10.0<br> Operating System: macOS 10.15</p>
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong><br> webpack 5.45.0 (latest) doesn't work with jQuery 3.6.0 (latest):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in ./node_modules/jquery/dist/jquery.js 936:9 Module parse failed: Unexpected token (936:9) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | * @param {Function} fn Passed the created element and returns a boolean result | */ &gt; function assert( fn ) { | var el = document.createElement( &quot;fieldset&quot; ); | @ ./assets/js/index.js 1:0-23 65:21-22 73:23-24 webpack 5.45.0 compiled with 1 error in 3015 ms"><pre class="notranslate"><code class="notranslate">ERROR in ./node_modules/jquery/dist/jquery.js 936:9 Module parse failed: Unexpected token (936:9) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | * @param {Function} fn Passed the created element and returns a boolean result | */ &gt; function assert( fn ) { | var el = document.createElement( "fieldset" ); | @ ./assets/js/index.js 1:0-23 65:21-22 73:23-24 webpack 5.45.0 compiled with 1 error in 3015 ms </code></pre></div> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <ol dir="auto"> <li>Install <code class="notranslate">webpack</code>, <code class="notranslate">webpack-cli</code> and <code class="notranslate">jquery</code>.</li> <li>Create 1 entrypoint which should be a file that imports jQuery.</li> <li>Run webpack in production mode.</li> </ol> <p dir="auto"><strong>What is the expected behavior?</strong><br> Successful compilation (downgrade only the <code class="notranslate">webpack</code> package to 5.44.0 solves the problem).</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 5.45.0<br> Node.js version: 16.5.0<br> Operating System: Debian GNU/Linux 10.10 x64<br> Additional tools: -</p>
0
<p dir="auto"><strong>Elasticsearch version</strong>:<br> <code class="notranslate">version[2.3.5]</code></p> <p dir="auto"><strong>Plugins installed</strong>:<br> <code class="notranslate">[kopf, HQ]</code></p> <p dir="auto"><strong>JVM version</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ java -version java version &quot;1.7.0_80&quot; Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)"><pre class="notranslate"><code class="notranslate">$ java -version java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode) </code></pre></div> <p dir="auto"><strong>OS version</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ uname -a Linux &lt;xxx&gt; 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux"><pre class="notranslate"><code class="notranslate">$ uname -a Linux &lt;xxx&gt; 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux </code></pre></div> <p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:</p> <p dir="auto">According to the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping.html#mapping-type" rel="nofollow">reference mapping-type index page</a> and to the associated <a href="https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping-fields.html" rel="nofollow">reference meta-fields index page</a> as well as the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping-meta-field.html" rel="nofollow">reference _meta field page</a>, this was supposed to run successfully on a 2.3.x cluster:</p> <p dir="auto"><strong>Steps to reproduce</strong>:</p> <p dir="auto">DELETE /tweet<br> PUT /tweet</p> <p dir="auto">PUT /tweet/tweet/_mapping</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;properties&quot;: { &quot;tweet&quot;: { &quot;type&quot;: &quot;string&quot;, &quot;analyzer&quot;: &quot;english&quot;, &quot;_meta&quot;: { &quot;label&quot;: &quot;This is a tweet body.&quot; } }, &quot;date&quot;: { &quot;type&quot;: &quot;date&quot; }, &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;user_id&quot;: { &quot;type&quot;: &quot;long&quot; }, &quot;_meta&quot;: { &quot;label&quot;: &quot;This is a tweet object.&quot; } }, &quot;_meta&quot;: { &quot;label&quot;: &quot;This is a tweet database.&quot; } }"><pre class="notranslate">{ <span class="pl-ent">"properties"</span>: { <span class="pl-ent">"tweet"</span>: { <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>string<span class="pl-pds">"</span></span>, <span class="pl-ent">"analyzer"</span>: <span class="pl-s"><span class="pl-pds">"</span>english<span class="pl-pds">"</span></span>, <span class="pl-ent">"_meta"</span>: { <span class="pl-ent">"label"</span>: <span class="pl-s"><span class="pl-pds">"</span>This is a tweet body.<span class="pl-pds">"</span></span> } }, <span class="pl-ent">"date"</span>: { <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>date<span class="pl-pds">"</span></span> }, <span class="pl-ent">"name"</span>: { <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>string<span class="pl-pds">"</span></span> }, <span class="pl-ent">"user_id"</span>: { <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>long<span class="pl-pds">"</span></span> }, <span class="pl-ent">"_meta"</span>: { <span class="pl-ent">"label"</span>: <span class="pl-s"><span class="pl-pds">"</span>This is a tweet object.<span class="pl-pds">"</span></span> } }, <span class="pl-ent">"_meta"</span>: { <span class="pl-ent">"label"</span>: <span class="pl-s"><span class="pl-pds">"</span>This is a tweet database.<span class="pl-pds">"</span></span> } }</pre></div> <p dir="auto"><strong>Answer</strong>:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;error&quot;: { &quot;root_cause&quot;: [ { &quot;type&quot;: &quot;mapper_parsing_exception&quot;, &quot;reason&quot;: &quot;Mapping definition for [tweet] has unsupported parameters: [_meta : {label=This is a tweet body.}]&quot; } ], &quot;type&quot;: &quot;mapper_parsing_exception&quot;, &quot;reason&quot;: &quot;Mapping definition for [tweet] has unsupported parameters: [_meta : {label=This is a tweet body.}]&quot; }, &quot;status&quot;: 400 }"><pre class="notranslate">{ <span class="pl-ent">"error"</span>: { <span class="pl-ent">"root_cause"</span>: [ { <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>mapper_parsing_exception<span class="pl-pds">"</span></span>, <span class="pl-ent">"reason"</span>: <span class="pl-s"><span class="pl-pds">"</span>Mapping definition for [tweet] has unsupported parameters: [_meta : {label=This is a tweet body.}]<span class="pl-pds">"</span></span> } ], <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>mapper_parsing_exception<span class="pl-pds">"</span></span>, <span class="pl-ent">"reason"</span>: <span class="pl-s"><span class="pl-pds">"</span>Mapping definition for [tweet] has unsupported parameters: [_meta : {label=This is a tweet body.}]<span class="pl-pds">"</span></span> }, <span class="pl-ent">"status"</span>: <span class="pl-c1">400</span> }</pre></div> <p dir="auto">Issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="57304339" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/9649" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/9649/hovercard" href="https://github.com/elastic/elasticsearch/issues/9649">#9649</a> mentioned it, and at the end it was commented that this was implemented and available. So I'm assuming it was either removed without a doc sync or it was broken recently. However, a quick lookup at the code searching for "_meta" got me to no place where MapperRegistry was ever used to register a Mapper for "_meta" attribute. I'm looking forward to being proven wrong though.</p>
<p dir="auto">Currently, when invoking <code class="notranslate">GET indexname/_mapping</code> one gets a long list of the fields that can be expected in the index. All these have the form:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;feed&quot;: { &quot;type&quot;: &quot;string&quot;, &quot;index&quot;: &quot;not_analyzed&quot; }"><pre class="notranslate"><code class="notranslate">"feed": { "type": "string", "index": "not_analyzed" } </code></pre></div> <p dir="auto">For an end user, who normally cannot see the configuration, the name of the field and its properties might not be enough to understand what the field actually holds. Therefore, it would be very helpful to allow a comment field inside the object above. Here is an example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;feed&quot;: { &quot;type&quot;: &quot;string&quot;, &quot;index&quot;: &quot;not_analyzed&quot; &quot;comment&quot;: &quot;feed holds the name of the feed as provided by the client side&quot; }"><pre class="notranslate"><code class="notranslate">"feed": { "type": "string", "index": "not_analyzed" "comment": "feed holds the name of the feed as provided by the client side" } </code></pre></div>
1
<p dir="auto">I'm not sure how much of an issue it is, but when upgrading from an older version of seaborn a new error was introduced in code that used to work in <code class="notranslate">0.11.1</code>, but is now broken in <code class="notranslate">0.11.2</code>.</p> <p dir="auto">Code to reproduce is as follows:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" import pandas as pd import seaborn as sns sns.set() import matplotlib.pyplot as plt # NOQA n = 10 to_stack = [] for group_idx in range(3): part_data = pd.DataFrame({ 'bin': np.arange(n), 'value': np.random.randint(0, 100, size=n), 'group': [f'group_{group_idx}'] * n, }) to_stack.append(part_data) data = pd.concat(to_stack) ax = plt.figure().gca() sns.histplot(ax=ax, data=data, bins=10, x='bin', weights='value', hue='group')"><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-k">import</span> <span class="pl-s1">seaborn</span> <span class="pl-k">as</span> <span class="pl-s1">sns</span> <span class="pl-s1">sns</span>.<span class="pl-en">set</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-c"># NOQA</span> <span class="pl-s1">n</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span> <span class="pl-s1">to_stack</span> <span class="pl-c1">=</span> [] <span class="pl-k">for</span> <span class="pl-s1">group_idx</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">3</span>): <span class="pl-s1">part_data</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({ <span class="pl-s">'bin'</span>: <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-s1">n</span>), <span class="pl-s">'value'</span>: <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">0</span>, <span class="pl-c1">100</span>, <span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-s1">n</span>), <span class="pl-s">'group'</span>: [<span class="pl-s">f'group_<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">group_idx</span><span class="pl-kos">}</span></span>'</span>] <span class="pl-c1">*</span> <span class="pl-s1">n</span>, }) <span class="pl-s1">to_stack</span>.<span class="pl-en">append</span>(<span class="pl-s1">part_data</span>) <span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">concat</span>(<span class="pl-s1">to_stack</span>) <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>().<span class="pl-en">gca</span>() <span class="pl-s1">sns</span>.<span class="pl-en">histplot</span>(<span class="pl-s1">ax</span><span class="pl-c1">=</span><span class="pl-s1">ax</span>, <span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">data</span>, <span class="pl-s1">bins</span><span class="pl-c1">=</span><span class="pl-c1">10</span>, <span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s">'bin'</span>, <span class="pl-s1">weights</span><span class="pl-c1">=</span><span class="pl-s">'value'</span>, <span class="pl-s1">hue</span><span class="pl-c1">=</span><span class="pl-s">'group'</span>)</pre></div> <p dir="auto">The idea is we are displaying a histogram (where bins were already computed) for multiple groups.</p> <p dir="auto">The resulting plot (from the working version) looks like this:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3186211/145621956-da07f200-e4c3-41f7-a1c1-9816f9dfcb5c.png"><img src="https://user-images.githubusercontent.com/3186211/145621956-da07f200-e4c3-41f7-a1c1-9816f9dfcb5c.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">But in <code class="notranslate">0.11.2</code> I got a new error: <code class="notranslate">ValueError: cannot reindex from a duplicate axis</code></p> <p dir="auto">The traceback is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-3-e7c80e367597&gt; in &lt;module&gt; 16 17 ax = plt.figure().gca() ---&gt; 18 sns.histplot(ax=ax, data=data, bins=10, x='bin', weights='value', hue='group') ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/seaborn/distributions.py in histplot(data, x, y, hue, weights, stat, bins, binwidth, binrange, discrete, cumulative, common_bins, common_norm, multiple, element, fill, shrink, kde, kde_kws, line_kws, thresh, pthresh, pmax, cbar, cbar_ax, cbar_kws, palette, hue_order, hue_norm, color, log_scale, legend, ax, **kwargs) 1460 if p.univariate: 1461 -&gt; 1462 p.plot_univariate_histogram( 1463 multiple=multiple, 1464 element=element, ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/seaborn/distributions.py in plot_univariate_histogram(self, multiple, element, fill, common_norm, common_bins, shrink, kde, kde_kws, color, legend, line_kws, estimate_kws, **plot_kws) 398 if set(self.variables) - {&quot;x&quot;, &quot;y&quot;}: 399 --&gt; 400 all_data = self.comp_data.dropna() 401 402 if common_bins: ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/seaborn/_core.py in comp_data(self) 1055 orig = self.plot_data[var].dropna() 1056 comp_col = pd.Series(index=orig.index, dtype=float, name=var) -&gt; 1057 comp_col.loc[orig.index] = pd.to_numeric(axis.convert_units(orig)) 1058 1059 if axis.get_scale() == &quot;log&quot;: ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/indexing.py in __setitem__(self, key, value) 721 722 iloc = self if self.name == &quot;iloc&quot; else self.obj.iloc --&gt; 723 iloc._setitem_with_indexer(indexer, value, self.name) 724 725 def _validate_key(self, key, axis: int): ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/indexing.py in _setitem_with_indexer(self, indexer, value, name) 1730 self._setitem_with_indexer_split_path(indexer, value, name) 1731 else: -&gt; 1732 self._setitem_single_block(indexer, value, name) 1733 1734 def _setitem_with_indexer_split_path(self, indexer, value, name: str): ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/indexing.py in _setitem_single_block(self, indexer, value, name) 1957 # setting for extensionarrays that store dicts. Need to decide 1958 # if it's worth supporting that. -&gt; 1959 value = self._align_series(indexer, Series(value)) 1960 1961 elif isinstance(value, ABCDataFrame) and name != &quot;iloc&quot;: ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/indexing.py in _align_series(self, indexer, ser, multiindex_indexer) 2094 # series, so need to broadcast (see GH5206) 2095 if sum_aligners == self.ndim and all(is_sequence(_) for _ in indexer): -&gt; 2096 ser = ser.reindex(obj.axes[0][indexer[0]], copy=True)._values 2097 2098 # single indexer ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/series.py in reindex(self, index, **kwargs) 4578 ) 4579 def reindex(self, index=None, **kwargs): -&gt; 4580 return super().reindex(index=index, **kwargs) 4581 4582 @deprecate_nonkeyword_arguments(version=None, allowed_args=[&quot;self&quot;, &quot;labels&quot;]) ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/generic.py in reindex(self, *args, **kwargs) 4816 4817 # perform the reindex on the axes -&gt; 4818 return self._reindex_axes( 4819 axes, level, limit, tolerance, method, fill_value, copy 4820 ).__finalize__(self, method=&quot;reindex&quot;) ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/generic.py in _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, copy) 4837 4838 axis = self._get_axis_number(a) -&gt; 4839 obj = obj._reindex_with_indexers( 4840 {axis: [new_index, indexer]}, 4841 fill_value=fill_value, ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/generic.py in _reindex_with_indexers(self, reindexers, fill_value, copy, allow_dups) 4881 4882 # TODO: speed up on homogeneous DataFrame objects -&gt; 4883 new_data = new_data.reindex_indexer( 4884 index, 4885 indexer, ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/internals/managers.py in reindex_indexer(self, new_axis, indexer, axis, fill_value, allow_dups, copy, consolidate, only_slice) 668 # some axes don't allow reindexing with dups 669 if not allow_dups: --&gt; 670 self.axes[axis]._validate_can_reindex(indexer) 671 672 if axis &gt;= self.ndim: ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/indexes/base.py in _validate_can_reindex(self, indexer) 3783 # trying to reindex on an axis with duplicates 3784 if not self._index_as_unique and len(indexer): -&gt; 3785 raise ValueError(&quot;cannot reindex from a duplicate axis&quot;) 3786 3787 def reindex( ValueError: cannot reindex from a duplicate axis"><pre class="notranslate"><code class="notranslate">--------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-3-e7c80e367597&gt; in &lt;module&gt; 16 17 ax = plt.figure().gca() ---&gt; 18 sns.histplot(ax=ax, data=data, bins=10, x='bin', weights='value', hue='group') ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/seaborn/distributions.py in histplot(data, x, y, hue, weights, stat, bins, binwidth, binrange, discrete, cumulative, common_bins, common_norm, multiple, element, fill, shrink, kde, kde_kws, line_kws, thresh, pthresh, pmax, cbar, cbar_ax, cbar_kws, palette, hue_order, hue_norm, color, log_scale, legend, ax, **kwargs) 1460 if p.univariate: 1461 -&gt; 1462 p.plot_univariate_histogram( 1463 multiple=multiple, 1464 element=element, ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/seaborn/distributions.py in plot_univariate_histogram(self, multiple, element, fill, common_norm, common_bins, shrink, kde, kde_kws, color, legend, line_kws, estimate_kws, **plot_kws) 398 if set(self.variables) - {"x", "y"}: 399 --&gt; 400 all_data = self.comp_data.dropna() 401 402 if common_bins: ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/seaborn/_core.py in comp_data(self) 1055 orig = self.plot_data[var].dropna() 1056 comp_col = pd.Series(index=orig.index, dtype=float, name=var) -&gt; 1057 comp_col.loc[orig.index] = pd.to_numeric(axis.convert_units(orig)) 1058 1059 if axis.get_scale() == "log": ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/indexing.py in __setitem__(self, key, value) 721 722 iloc = self if self.name == "iloc" else self.obj.iloc --&gt; 723 iloc._setitem_with_indexer(indexer, value, self.name) 724 725 def _validate_key(self, key, axis: int): ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/indexing.py in _setitem_with_indexer(self, indexer, value, name) 1730 self._setitem_with_indexer_split_path(indexer, value, name) 1731 else: -&gt; 1732 self._setitem_single_block(indexer, value, name) 1733 1734 def _setitem_with_indexer_split_path(self, indexer, value, name: str): ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/indexing.py in _setitem_single_block(self, indexer, value, name) 1957 # setting for extensionarrays that store dicts. Need to decide 1958 # if it's worth supporting that. -&gt; 1959 value = self._align_series(indexer, Series(value)) 1960 1961 elif isinstance(value, ABCDataFrame) and name != "iloc": ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/indexing.py in _align_series(self, indexer, ser, multiindex_indexer) 2094 # series, so need to broadcast (see GH5206) 2095 if sum_aligners == self.ndim and all(is_sequence(_) for _ in indexer): -&gt; 2096 ser = ser.reindex(obj.axes[0][indexer[0]], copy=True)._values 2097 2098 # single indexer ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/series.py in reindex(self, index, **kwargs) 4578 ) 4579 def reindex(self, index=None, **kwargs): -&gt; 4580 return super().reindex(index=index, **kwargs) 4581 4582 @deprecate_nonkeyword_arguments(version=None, allowed_args=["self", "labels"]) ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/generic.py in reindex(self, *args, **kwargs) 4816 4817 # perform the reindex on the axes -&gt; 4818 return self._reindex_axes( 4819 axes, level, limit, tolerance, method, fill_value, copy 4820 ).__finalize__(self, method="reindex") ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/generic.py in _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, copy) 4837 4838 axis = self._get_axis_number(a) -&gt; 4839 obj = obj._reindex_with_indexers( 4840 {axis: [new_index, indexer]}, 4841 fill_value=fill_value, ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/generic.py in _reindex_with_indexers(self, reindexers, fill_value, copy, allow_dups) 4881 4882 # TODO: speed up on homogeneous DataFrame objects -&gt; 4883 new_data = new_data.reindex_indexer( 4884 index, 4885 indexer, ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/internals/managers.py in reindex_indexer(self, new_axis, indexer, axis, fill_value, allow_dups, copy, consolidate, only_slice) 668 # some axes don't allow reindexing with dups 669 if not allow_dups: --&gt; 670 self.axes[axis]._validate_can_reindex(indexer) 671 672 if axis &gt;= self.ndim: ~/.pyenv/versions/3.8.6/envs/pyenv3.8.6/lib/python3.8/site-packages/pandas/core/indexes/base.py in _validate_can_reindex(self, indexer) 3783 # trying to reindex on an axis with duplicates 3784 if not self._index_as_unique and len(indexer): -&gt; 3785 raise ValueError("cannot reindex from a duplicate axis") 3786 3787 def reindex( ValueError: cannot reindex from a duplicate axis </code></pre></div> <p dir="auto">Now, I can work around this. By adding a <code class="notranslate">.reset_index()</code> call after I do a <code class="notranslate">pd.concat</code> on the data frames of the groups, that removes the duplicate indexes, and then seaborn is perfectly happy to make my plot.</p> <p dir="auto">However, I'm not sure if the maintainers of this library are aware of this breakage or think that this is desirable behavior or not.</p>
<p dir="auto">See <a href="https://discourse.matplotlib.org/t/public-api-for-resolving-artist-property-aliases/21230" rel="nofollow">https://discourse.matplotlib.org/t/public-api-for-resolving-artist-property-aliases/21230</a></p> <p dir="auto">This is done in an ad hoc way in various <code class="notranslate">.plot</code> methods but it would be good to avoid duplicating code.</p>
0
<h3 dir="auto">Problem description</h3> <p dir="auto">A new line is added when the value prop is set in TextField (with multiline true), and enter is pressed.</p> <h3 dir="auto">Link to minimal working code that reproduces the issue</h3> <p dir="auto"><a href="https://www.webpackbin.com/bins/-KlGfX7Kl4Q4uqZ7MITB" rel="nofollow">https://www.webpackbin.com/bins/-KlGfX7Kl4Q4uqZ7MITB</a></p> <p dir="auto">Go to the textfield and press enter.</p> <h3 dir="auto">Versions</h3> <ul dir="auto"> <li>Material-UI: 0.18.1</li> <li>React: 15.2</li> <li>Browser: Chrome</li> </ul>
<p dir="auto">I am using a TextField for sending messages in a chat application. My implementation requires that the TextField expand, can accept newlines via shift+enter, and send a message (empty the textfield) upon hitting enter.</p> <p dir="auto">I am using React 15.6 and MaterialUI v0.20.1 (I'd rather use the latest version, but its not up to me unfortunately)</p> <p dir="auto">I have everything working as it should, with one exception. In IE11 and Edge, if the textfield is empty and I add newlines (either with the defualt behavior of the enter key, or by adding the newline to the endof the controlled value, the TextField refuses to expand until other text is entered.</p> <p dir="auto">This error can be replicated in the MaterialUI demo in IE and Edge, even in the current version of Material UI. It works properly in Chrome and Firefox. Is there any way to work around this? Is the issue known already?</p> <p dir="auto">Thanks!</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/39498573/42840154-e9c0b828-89d3-11e8-98a9-6a0f790493c6.gif"><img src="https://user-images.githubusercontent.com/39498573/42840154-e9c0b828-89d3-11e8-98a9-6a0f790493c6.gif" alt="multiline2" data-animated-image="" style="max-width: 100%;"></a></p>
1
<p dir="auto">I'm deploying an PyQt(5.3.2) application using py2app. Everything works fine with 0.14.1, 0.15.0 fails at importing. As an example one can take the following <code class="notranslate">main.py</code>:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas def main(): x = pandas.Series([0, 1, 2]) print(x) if __name__ == &quot;__main__&quot;: main()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">def</span> <span class="pl-en">main</span>(): <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-v">Series</span>([<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]) <span class="pl-en">print</span>(<span class="pl-s1">x</span>) <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>: <span class="pl-en">main</span>()</pre></div> <p dir="auto">and use the default <code class="notranslate">setup.py</code>:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from setuptools import setup import py2app setup( app=['main.py'], options={'py2app': {'argv_emulation': True}}, setup_requires=['py2app'], )"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">setuptools</span> <span class="pl-k">import</span> <span class="pl-s1">setup</span> <span class="pl-k">import</span> <span class="pl-s1">py2app</span> <span class="pl-en">setup</span>( <span class="pl-s1">app</span><span class="pl-c1">=</span>[<span class="pl-s">'main.py'</span>], <span class="pl-s1">options</span><span class="pl-c1">=</span>{<span class="pl-s">'py2app'</span>: {<span class="pl-s">'argv_emulation'</span>: <span class="pl-c1">True</span>}}, <span class="pl-s1">setup_requires</span><span class="pl-c1">=</span>[<span class="pl-s">'py2app'</span>], )</pre></div> <p dir="auto">and run <code class="notranslate">python3 setup.py py2app</code> to build the .app and then start the application (Please note the example can only be runned via Terminal, since it lacks a GUI)</p> <p dir="auto">In both Python 2.7.8 and 3.4.2 the .app builds fine but fails on 3.4.2 to start and dumps (stripped to the helpful parts):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'module' object has no attribute '__pyx_capi__' 2014-10-22 19:36:32.784 main[26763:321107] main Error Traceback (most recent call last): File &quot;.../dist/main.app/Contents/Resources/__ _run() File &quot;.../dist/main.app/Contents/Resources/__ exec(compile(source, path, 'exec'), globals(), globals()) File &quot;.../dist/main.app/Contents/Resources/main. import pandas File &quot;pandas/__init__.pyc&quot;, line 7, in &lt;module&gt; File &quot;pandas/tslib.pyc&quot;, line 14, in &lt;module&gt; File &quot;pandas/tslib.pyc&quot;, line 10, in __load File &quot;pandas/tslib.pyx&quot;, line 2839, in init pandas.tslib (pandas/tslib.c:80041) File &quot;pandas/algos.pyc&quot;, line 14, in &lt;module&gt; File &quot;pandas/algos.pyc&quot;, line 10, in __load File &quot;pandas/algos.pyx&quot;, line 64, in init pandas.algos (pandas/algos.c:180213) File &quot;pandas/lib.pyc&quot;, line 14, in &lt;module&gt; File &quot;pandas/lib.pyc&quot;, line 10, in __load File &quot;pandas/lib.pyx&quot;, line 1, in init pandas.lib (pandas/lib.c:78098) AttributeError: 'module' object has no attribute '__pyx_capi__'"><pre class="notranslate"><code class="notranslate">'module' object has no attribute '__pyx_capi__' 2014-10-22 19:36:32.784 main[26763:321107] main Error Traceback (most recent call last): File ".../dist/main.app/Contents/Resources/__ _run() File ".../dist/main.app/Contents/Resources/__ exec(compile(source, path, 'exec'), globals(), globals()) File ".../dist/main.app/Contents/Resources/main. import pandas File "pandas/__init__.pyc", line 7, in &lt;module&gt; File "pandas/tslib.pyc", line 14, in &lt;module&gt; File "pandas/tslib.pyc", line 10, in __load File "pandas/tslib.pyx", line 2839, in init pandas.tslib (pandas/tslib.c:80041) File "pandas/algos.pyc", line 14, in &lt;module&gt; File "pandas/algos.pyc", line 10, in __load File "pandas/algos.pyx", line 64, in init pandas.algos (pandas/algos.c:180213) File "pandas/lib.pyc", line 14, in &lt;module&gt; File "pandas/lib.pyc", line 10, in __load File "pandas/lib.pyx", line 1, in init pandas.lib (pandas/lib.c:78098) AttributeError: 'module' object has no attribute '__pyx_capi__' </code></pre></div> <p dir="auto">If the example would run as expected it would print (again stripped):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 0 1 1 2 2 dtype: int64"><pre class="notranslate"><code class="notranslate">0 0 1 1 2 2 dtype: int64 </code></pre></div>
<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.DataFrame([['2018-01-01','MSFT','short'], ['2018-01-01','MSFT','long'], ['2018-01-01','MSFT',pd.np.NaN], ['2018-01-01','AAPL','short'], ['2018-01-01','AAPL',pd.np.NaN], ['2018-01-02','AAPL','short'], ['2018-01-01','TSLA','neutral'], ['2018-01-02','TSLA',pd.np.NaN]], columns=['date','symbol','status']) df['date'] = pd.to_datetime(df['date']) df = df.set_index(['date','symbol']) df.groupby('symbol')['status'].ffill()"><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-v">DataFrame</span>([[<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'MSFT'</span>,<span class="pl-s">'short'</span>], [<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'MSFT'</span>,<span class="pl-s">'long'</span>], [<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'MSFT'</span>,<span class="pl-s1">pd</span>.<span class="pl-s1">np</span>.<span class="pl-v">NaN</span>], [<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'AAPL'</span>,<span class="pl-s">'short'</span>], [<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'AAPL'</span>,<span class="pl-s1">pd</span>.<span class="pl-s1">np</span>.<span class="pl-v">NaN</span>], [<span class="pl-s">'2018-01-02'</span>,<span class="pl-s">'AAPL'</span>,<span class="pl-s">'short'</span>], [<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'TSLA'</span>,<span class="pl-s">'neutral'</span>], [<span class="pl-s">'2018-01-02'</span>,<span class="pl-s">'TSLA'</span>,<span class="pl-s1">pd</span>.<span class="pl-s1">np</span>.<span class="pl-v">NaN</span>]], <span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">'date'</span>,<span class="pl-s">'symbol'</span>,<span class="pl-s">'status'</span>]) <span class="pl-s1">df</span>[<span class="pl-s">'date'</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">'date'</span>]) <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-en">set_index</span>([<span class="pl-s">'date'</span>,<span class="pl-s">'symbol'</span>]) <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>(<span class="pl-s">'symbol'</span>)[<span class="pl-s">'status'</span>].<span class="pl-en">ffill</span>()</pre></div> <h4 dir="auto">Raised exception</h4> <details> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- Exception Traceback (most recent call last) &lt;ipython-input-58-2fe0989150cf&gt; in &lt;module&gt;() 13 df['date'] = pd.to_datetime(df['date']) 14 df = df.set_index(['date','symbol']) ---&gt; 15 df.groupby('symbol')['status'].ffill() /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in pad(self, limit) 1362 DataFrame.fillna 1363 &quot;&quot;&quot; -&gt; 1364 return self.apply(lambda x: x.ffill(limit=limit)) 1365 ffill = pad 1366 /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in apply(self, func, *args, **kwargs) 3110 examples=_apply_docs['series_examples'])) 3111 def apply(self, func, *args, **kwargs): -&gt; 3112 return super(SeriesGroupBy, self).apply(func, *args, **kwargs) 3113 3114 @Appender(_agg_doc) /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in apply(self, func, *args, **kwargs) 803 # ignore SettingWithCopy here in case the user mutates 804 with option_context('mode.chained_assignment', None): --&gt; 805 return self._python_apply_general(f) 806 807 def _python_apply_general(self, f): /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in _python_apply_general(self, f) 812 keys, 813 values, --&gt; 814 not_indexed_same=mutated or self.mutated) 815 816 def _iterate_slices(self): /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in _wrap_applied_output(self, keys, values, not_indexed_same) 3250 if isinstance(values[0], (Series, dict)): 3251 return self._concat_objects(keys, values, -&gt; 3252 not_indexed_same=not_indexed_same) 3253 elif isinstance(values[0], DataFrame): 3254 # possible that Series -&gt; DataFrame by applied function /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in _concat_objects(self, keys, values, not_indexed_same) 978 979 if isinstance(result, Series): --&gt; 980 result = result.reindex(ax) 981 else: 982 /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/series.pyc in reindex(self, index, **kwargs) 2679 @Appender(generic._shared_docs['reindex'] % _shared_doc_kwargs) 2680 def reindex(self, index=None, **kwargs): -&gt; 2681 return super(Series, self).reindex(index=index, **kwargs) 2682 2683 @Appender(generic._shared_docs['fillna'] % _shared_doc_kwargs) /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/generic.pyc in reindex(self, *args, **kwargs) 3021 # perform the reindex on the axes 3022 return self._reindex_axes(axes, level, limit, tolerance, method, -&gt; 3023 fill_value, copy).__finalize__(self) 3024 3025 def _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/generic.pyc in _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, copy) 3034 ax = self._get_axis(a) 3035 new_index, indexer = ax.reindex(labels, level=level, limit=limit, -&gt; 3036 tolerance=tolerance, method=method) 3037 3038 axis = self._get_axis_number(a) /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/indexes/multi.pyc in reindex(self, target, method, level, limit, tolerance) 1901 tolerance=tolerance) 1902 else: -&gt; 1903 raise Exception(&quot;cannot handle a non-unique multi-index!&quot;) 1904 1905 if not isinstance(target, MultiIndex): Exception: cannot handle a non-unique multi-index!"><pre class="notranslate"><code class="notranslate">--------------------------------------------------------------------------- Exception Traceback (most recent call last) &lt;ipython-input-58-2fe0989150cf&gt; in &lt;module&gt;() 13 df['date'] = pd.to_datetime(df['date']) 14 df = df.set_index(['date','symbol']) ---&gt; 15 df.groupby('symbol')['status'].ffill() /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in pad(self, limit) 1362 DataFrame.fillna 1363 """ -&gt; 1364 return self.apply(lambda x: x.ffill(limit=limit)) 1365 ffill = pad 1366 /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in apply(self, func, *args, **kwargs) 3110 examples=_apply_docs['series_examples'])) 3111 def apply(self, func, *args, **kwargs): -&gt; 3112 return super(SeriesGroupBy, self).apply(func, *args, **kwargs) 3113 3114 @Appender(_agg_doc) /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in apply(self, func, *args, **kwargs) 803 # ignore SettingWithCopy here in case the user mutates 804 with option_context('mode.chained_assignment', None): --&gt; 805 return self._python_apply_general(f) 806 807 def _python_apply_general(self, f): /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in _python_apply_general(self, f) 812 keys, 813 values, --&gt; 814 not_indexed_same=mutated or self.mutated) 815 816 def _iterate_slices(self): /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in _wrap_applied_output(self, keys, values, not_indexed_same) 3250 if isinstance(values[0], (Series, dict)): 3251 return self._concat_objects(keys, values, -&gt; 3252 not_indexed_same=not_indexed_same) 3253 elif isinstance(values[0], DataFrame): 3254 # possible that Series -&gt; DataFrame by applied function /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/groupby.pyc in _concat_objects(self, keys, values, not_indexed_same) 978 979 if isinstance(result, Series): --&gt; 980 result = result.reindex(ax) 981 else: 982 /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/series.pyc in reindex(self, index, **kwargs) 2679 @Appender(generic._shared_docs['reindex'] % _shared_doc_kwargs) 2680 def reindex(self, index=None, **kwargs): -&gt; 2681 return super(Series, self).reindex(index=index, **kwargs) 2682 2683 @Appender(generic._shared_docs['fillna'] % _shared_doc_kwargs) /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/generic.pyc in reindex(self, *args, **kwargs) 3021 # perform the reindex on the axes 3022 return self._reindex_axes(axes, level, limit, tolerance, method, -&gt; 3023 fill_value, copy).__finalize__(self) 3024 3025 def _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/generic.pyc in _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, copy) 3034 ax = self._get_axis(a) 3035 new_index, indexer = ax.reindex(labels, level=level, limit=limit, -&gt; 3036 tolerance=tolerance, method=method) 3037 3038 axis = self._get_axis_number(a) /home/greg/anaconda2/lib/python2.7/site-packages/pandas/core/indexes/multi.pyc in reindex(self, target, method, level, limit, tolerance) 1901 tolerance=tolerance) 1902 else: -&gt; 1903 raise Exception("cannot handle a non-unique multi-index!") 1904 1905 if not isinstance(target, MultiIndex): Exception: cannot handle a non-unique multi-index! </code></pre></div> </details> <h4 dir="auto">Problem description</h4> <p dir="auto">Performing <code class="notranslate">ffill()</code> does not forward fill values as intended. The index has duplicate values, the expectation is that the values will be filled according to the order the rows are in already.</p> <p dir="auto">Duplicate index values are possible when using high frequency time intervals.</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="df = pd.DataFrame([['2018-01-01','MSFT','short'], ['2018-01-01','MSFT','long'], ['2018-01-01','MSFT','long'], ['2018-01-01','AAPL','short'], ['2018-01-01','AAPL','short'], ['2018-01-02','AAPL','short'], ['2018-01-01','TSLA','neutral'], ['2018-01-02','TSLA','neutral']], columns=['date','symbol','status']) df['date'] = pd.to_datetime(df['date'])"><pre class="notranslate"><span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>([[<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'MSFT'</span>,<span class="pl-s">'short'</span>], [<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'MSFT'</span>,<span class="pl-s">'long'</span>], [<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'MSFT'</span>,<span class="pl-s">'long'</span>], [<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'AAPL'</span>,<span class="pl-s">'short'</span>], [<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'AAPL'</span>,<span class="pl-s">'short'</span>], [<span class="pl-s">'2018-01-02'</span>,<span class="pl-s">'AAPL'</span>,<span class="pl-s">'short'</span>], [<span class="pl-s">'2018-01-01'</span>,<span class="pl-s">'TSLA'</span>,<span class="pl-s">'neutral'</span>], [<span class="pl-s">'2018-01-02'</span>,<span class="pl-s">'TSLA'</span>,<span class="pl-s">'neutral'</span>]], <span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">'date'</span>,<span class="pl-s">'symbol'</span>,<span class="pl-s">'status'</span>]) <span class="pl-s1">df</span>[<span class="pl-s">'date'</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">'date'</span>])</pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 2.7.14.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.13.0-31-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: en_AU.UTF-8<br> LOCALE: None.None</p> <p dir="auto">pandas: 0.22.0<br> pytest: 3.2.1<br> pip: 9.0.1<br> setuptools: 36.5.0.post20170921<br> Cython: 0.26.1<br> numpy: 1.14.0<br> scipy: 0.19.1<br> pyarrow: None<br> xarray: None<br> IPython: 5.4.1<br> sphinx: 1.6.3<br> patsy: 0.4.1<br> dateutil: 2.6.1<br> pytz: 2017.3<br> blosc: None<br> bottleneck: 1.2.1<br> tables: 3.4.2<br> numexpr: 2.6.2<br> feather: None<br> matplotlib: 2.1.0<br> openpyxl: 2.4.8<br> xlrd: 1.1.0<br> xlwt: 1.3.0<br> xlsxwriter: 1.0.2<br> lxml: 4.1.0<br> bs4: 4.6.0<br> html5lib: 0.999999999<br> sqlalchemy: 1.1.13<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">This also happens with <code class="notranslate">axis=1</code>.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd import numpy as np df = pd.DataFrame( np.ones([6, 4], dtype=int), columns=pd.MultiIndex.from_product([['A', 'B'], [1, 2]]) ) ( df .groupby(level=0, axis=1) .apply( lambda df: 2*df.xs(df.name, axis=1) ) )"><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-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>( <span class="pl-s1">np</span>.<span class="pl-en">ones</span>([<span class="pl-c1">6</span>, <span class="pl-c1">4</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">int</span>), <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">MultiIndex</span>.<span class="pl-en">from_product</span>([[<span class="pl-s">'A'</span>, <span class="pl-s">'B'</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>]]) ) ( <span class="pl-s1">df</span> .<span class="pl-en">groupby</span>(<span class="pl-s1">level</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>) .<span class="pl-en">apply</span>( <span class="pl-k">lambda</span> <span class="pl-s1">df</span>: <span class="pl-c1">2</span><span class="pl-c1">*</span><span class="pl-s1">df</span>.<span class="pl-en">xs</span>(<span class="pl-s1">df</span>.<span class="pl-s1">name</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>) ) )</pre></div> <details> <div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-12-e7c022399f89&gt; in &lt;module&gt;() 3 .groupby(level=0, axis=1) 4 .apply( ----&gt; 5 lambda df: 2*df.xs(df.name, axis=1) 6 ) 7 ) ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/groupby.py in apply(self, func, *args, **kwargs) 882 # ignore SettingWithCopy here in case the user mutates 883 with option_context('mode.chained_assignment', None): --&gt; 884 return self._python_apply_general(f) 885 886 def _python_apply_general(self, f): ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/groupby.py in _python_apply_general(self, f) 891 keys, 892 values, --&gt; 893 not_indexed_same=mutated or self.mutated) 894 895 def _iterate_slices(self): ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/groupby.py in _wrap_applied_output(self, keys, values, not_indexed_same) 3920 elif isinstance(v, DataFrame): 3921 return self._concat_objects(keys, values, -&gt; 3922 not_indexed_same=not_indexed_same) 3923 elif self.grouper.groupings is not None: 3924 if len(self.grouper.groupings) &gt; 1: ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/groupby.py in _concat_objects(self, keys, values, not_indexed_same) 1085 result = result.take(indexer, axis=self.axis) 1086 else: -&gt; 1087 result = result.reindex(ax, axis=self.axis) 1088 1089 elif self.group_keys: ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/util/_decorators.py in wrapper(*args, **kwargs) 145 @wraps(func) 146 def wrapper(*args, **kwargs): --&gt; 147 return func(*args, **kwargs) 148 149 if not PY2: ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/frame.py in reindex(self, *args, **kwargs) 2979 kwargs.pop('axis', None) 2980 kwargs.pop('labels', None) -&gt; 2981 return super(DataFrame, self).reindex(**kwargs) 2982 2983 @Appender(_shared_docs['reindex_axis'] % _shared_doc_kwargs) ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/generic.py in reindex(self, *args, **kwargs) 3356 # perform the reindex on the axes 3357 return self._reindex_axes(axes, level, limit, tolerance, method, -&gt; 3358 fill_value, copy).__finalize__(self) 3359 3360 def _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/frame.py in _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, copy) 2909 if columns is not None: 2910 frame = frame._reindex_columns(columns, method, copy, level, -&gt; 2911 fill_value, limit, tolerance) 2912 2913 index = axes['index'] ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/frame.py in _reindex_columns(self, new_columns, method, copy, level, fill_value, limit, tolerance) 2934 return self._reindex_with_indexers({1: [new_columns, indexer]}, 2935 copy=copy, fill_value=fill_value, -&gt; 2936 allow_dups=False) 2937 2938 def _reindex_multi(self, axes, copy, fill_value): ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/generic.py in _reindex_with_indexers(self, reindexers, fill_value, copy, allow_dups) 3477 fill_value=fill_value, 3478 allow_dups=allow_dups, -&gt; 3479 copy=copy) 3480 3481 if copy and new_data is self._data: ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/internals.py in reindex_indexer(self, new_axis, indexer, axis, fill_value, allow_dups, copy) 4125 # some axes don't allow reindexing with dups 4126 if not allow_dups: -&gt; 4127 self.axes[axis]._can_reindex(indexer) 4128 4129 if axis &gt;= self.ndim: ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/indexes/base.py in _can_reindex(self, indexer) 2940 # trying to reindex on an axis with duplicates 2941 if not self.is_unique and len(indexer): -&gt; 2942 raise ValueError(&quot;cannot reindex from a duplicate axis&quot;) 2943 2944 def reindex(self, target, method=None, level=None, limit=None, ValueError: cannot reindex from a duplicate axis"><pre class="notranslate">--------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-12-e7c022399f89&gt; in &lt;module&gt;() <span class="pl-c1">3</span> .groupby(<span class="pl-v">level</span><span class="pl-k">=</span><span class="pl-c1">0</span>, <span class="pl-v">axis</span><span class="pl-k">=</span><span class="pl-c1">1</span>) <span class="pl-c1">4</span> .apply( ----&gt; 5 lambda df: 2*df.xs(df.name, axis=1) <span class="pl-c1">6</span> ) <span class="pl-c1">7</span> ) ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/groupby.py in apply(self, func, *args, **kwargs) <span class="pl-c1">882</span> <span class="pl-c"><span class="pl-c">#</span> ignore SettingWithCopy here in case the user mutates</span> <span class="pl-c1">883</span> <span class="pl-k">with</span> option_context(<span class="pl-s"><span class="pl-pds">'</span>mode.chained_assignment<span class="pl-pds">'</span></span>, <span class="pl-c1">None</span>): --&gt; 884 return self._python_apply_general(f) <span class="pl-c1">885</span> <span class="pl-c1">886</span> <span class="pl-k">def</span> <span class="pl-en">_python_apply_general</span>(<span class="pl-smi"><span class="pl-smi">self</span></span>, <span class="pl-smi">f</span>): ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/groupby.py in _python_apply_general(self, f) <span class="pl-c1">891</span> keys, <span class="pl-c1">892</span> values, --&gt; 893 not_indexed_same=mutated or self.mutated) <span class="pl-c1">894</span> <span class="pl-c1">895</span> <span class="pl-k">def</span> <span class="pl-en">_iterate_slices</span>(<span class="pl-smi"><span class="pl-smi">self</span></span>): ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/groupby.py in _wrap_applied_output(self, keys, values, not_indexed_same) 3920 elif isinstance(v, DataFrame): 3921 return self._concat_objects(keys, values, -&gt; 3922 not_indexed_same=not_indexed_same) 3923 elif self.grouper.groupings is not None: 3924 if len(self.grouper.groupings) &gt; 1: ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/groupby.py in _concat_objects(self, keys, values, not_indexed_same) 1085 result = result.take(indexer, axis=self.axis) 1086 else: -&gt; 1087 result = result.reindex(ax, axis=self.axis) 1088 1089 elif self.group_keys: ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/util/_decorators.py in wrapper(*args, **kwargs) <span class="pl-c1">145</span> <span class="pl-k">@</span>wraps(func) <span class="pl-c1">146</span> <span class="pl-k">def</span> <span class="pl-en">wrapper</span>(<span class="pl-k">*</span><span class="pl-smi">args</span>, <span class="pl-k">**</span><span class="pl-smi">kwargs</span>): --&gt; 147 return func(*args, **kwargs) <span class="pl-c1">148</span> <span class="pl-c1">149</span> <span class="pl-k">if</span> <span class="pl-k">not</span> <span class="pl-c1">PY2</span>: ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/frame.py in reindex(self, *args, **kwargs) 2979 kwargs.pop('axis', None) 2980 kwargs.pop('labels', None) -&gt; 2981 return super(DataFrame, self).reindex(**kwargs) 2982 2983 @Appender(_shared_docs['reindex_axis'] % _shared_doc_kwargs) ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/generic.py in reindex(self, *args, **kwargs) 3356 # perform the reindex on the axes 3357 return self._reindex_axes(axes, level, limit, tolerance, method, -&gt; 3358 fill_value, copy).__finalize__(self) 3359 3360 def _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/frame.py in _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, copy) 2909 if columns is not None: 2910 frame = frame._reindex_columns(columns, method, copy, level, -&gt; 2911 fill_value, limit, tolerance) 2912 2913 index = axes['index'] ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/frame.py in _reindex_columns(self, new_columns, method, copy, level, fill_value, limit, tolerance) 2934 return self._reindex_with_indexers({1: [new_columns, indexer]}, 2935 copy=copy, fill_value=fill_value, -&gt; 2936 allow_dups=False) 2937 2938 def _reindex_multi(self, axes, copy, fill_value): ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/generic.py in _reindex_with_indexers(self, reindexers, fill_value, copy, allow_dups) 3477 fill_value=fill_value, 3478 allow_dups=allow_dups, -&gt; 3479 copy=copy) 3480 3481 if copy and new_data is self._data: ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/internals.py in reindex_indexer(self, new_axis, indexer, axis, fill_value, allow_dups, copy) 4125 # some axes don't allow reindexing with dups 4126 if not allow_dups: -&gt; 4127 self.axes[axis]._can_reindex(indexer) 4128 4129 if axis &gt;= self.ndim: ~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/indexes/base.py in _can_reindex(self, indexer) 2940 # trying to reindex on an axis with duplicates 2941 if not self.is_unique and len(indexer): -&gt; 2942 raise ValueError("cannot reindex from a duplicate axis") 2943 2944 def reindex(self, target, method=None, level=None, limit=None, <span class="pl-en">ValueError</span>: <span class="pl-s">cannot reindex from a duplicate axis</span></pre></div> </details>
0
<h2 dir="auto">Bug Report</h2> <p dir="auto">Connecting to mysql using sharding-jdbc 4.0.0-rc3 always fails to start.</p> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">ShardingSphere 4.0.0-RC1 4.0.0-RC2 4.0.0-RC3</p> <h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3> <p dir="auto">Sharding-JDBC</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">Properly configured environment, the project can not start properly, the following error:<br> Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingDataSource' threw exception; nested exception is java.lang.NumberFormatException: For input string: "YES"</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">At project startup</p> <h3 dir="auto">Reason analyze (If you can)</h3> <p dir="auto">In org.apache.shardingsphere.core.execute.metadata.TableMetaDataLoader#getColumnMetaDataList method and in<br> boolean isAutoIncrement = resultSet.getBoolean("IS_AUTOINCREMENT");<br> line,attempt to convert the string 'NO' or 'YES' to a Boolean</p> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> <p dir="auto">Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingDataSource' defined in class path resource [org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingDataSource' threw exception; nested exception is java.lang.NumberFormatException: For input string: "YES"</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">we find java version: java8, full_version=1.8.0_342, full_path=/home/peilq_sharding/bisheng-jdk1.8.0_342//bin/java<br> ShardingSphere-5.2.2-SNAPSHOT<br> Commit ID: dirty-753c0cee8ee6fd3db00536da55b64bc5198a3758<br> Commit Message: Optimize sqlFederationExecutor init logic when sqlFederationType modify dynamically (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1451253225" data-permission-text="Title is private" data-url="https://github.com/apache/shardingsphere/issues/22209" data-hovercard-type="pull_request" data-hovercard-url="/apache/shardingsphere/pull/22209/hovercard" href="https://github.com/apache/shardingsphere/pull/22209">#22209</a>)<br> Branch: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/apache/shardingsphere/commit/753c0cee8ee6fd3db00536da55b64bc5198a3758/hovercard" href="https://github.com/apache/shardingsphere/commit/753c0cee8ee6fd3db00536da55b64bc5198a3758"><tt>753c0ce</tt></a><br> Build time: 2022-11-19T10:18:41+0800</p> <h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3> <p dir="auto">ShardingSphere-Proxy</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">The select result of ‘join with USING(column)’ is correct;</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">The select result of ‘join with USING(column)’ exists problem;The column name and value doesn't match.</p> <h3 dir="auto">Reason analyze (If you can)</h3> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DROP TABLE IF EXISTS t_order; DROP TABLE IF EXISTS t_order_item; CREATE TABLE t_order (order_id INT PRIMARY KEY, user_id INT NOT NULL, status VARCHAR(50) NOT NULL, merchant_id INT NOT NULL, remark VARCHAR(50) NOT NULL, creation_date DATE NOT NULL); CREATE TABLE t_order_item (item_id INT PRIMARY KEY, order_id INT NOT NULL, user_id INT NOT NULL, product_id INT NOT NULL, quantity INT NOT NULL, creation_date DATE NOT NULL); INSERT INTO t_order VALUES(1000, 10, 'init', 1, 'test', '2017-07-08'); INSERT INTO t_order VALUES(1001, 10, 'init', 2, 'test', '2017-07-08'); INSERT INTO t_order VALUES(2000, 20, 'init', 3, 'test', '2017-08-08'); INSERT INTO t_order VALUES(2001, 20, 'init', 4, 'test', '2017-08-08'); INSERT INTO t_order_item VALUES(100001, 1000, 10, 1, 1, '2017-07-08'); INSERT INTO t_order_item VALUES(100002, 1000, 10, 1, 1, '2017-07-08'); INSERT INTO t_order_item VALUES(100101, 1001, 10, 2, 1, '2017-07-08'); INSERT INTO t_order_item VALUES(100102, 1001, 10, 2, 1, '2017-07-08'); SELECT * FROM t_order o RIGHT JOIN t_order_item i using(order_id) WHERE o.user_id = 10 ORDER BY o.order_id, 7;"><pre class="notranslate"><code class="notranslate">DROP TABLE IF EXISTS t_order; DROP TABLE IF EXISTS t_order_item; CREATE TABLE t_order (order_id INT PRIMARY KEY, user_id INT NOT NULL, status VARCHAR(50) NOT NULL, merchant_id INT NOT NULL, remark VARCHAR(50) NOT NULL, creation_date DATE NOT NULL); CREATE TABLE t_order_item (item_id INT PRIMARY KEY, order_id INT NOT NULL, user_id INT NOT NULL, product_id INT NOT NULL, quantity INT NOT NULL, creation_date DATE NOT NULL); INSERT INTO t_order VALUES(1000, 10, 'init', 1, 'test', '2017-07-08'); INSERT INTO t_order VALUES(1001, 10, 'init', 2, 'test', '2017-07-08'); INSERT INTO t_order VALUES(2000, 20, 'init', 3, 'test', '2017-08-08'); INSERT INTO t_order VALUES(2001, 20, 'init', 4, 'test', '2017-08-08'); INSERT INTO t_order_item VALUES(100001, 1000, 10, 1, 1, '2017-07-08'); INSERT INTO t_order_item VALUES(100002, 1000, 10, 1, 1, '2017-07-08'); INSERT INTO t_order_item VALUES(100101, 1001, 10, 2, 1, '2017-07-08'); INSERT INTO t_order_item VALUES(100102, 1001, 10, 2, 1, '2017-07-08'); SELECT * FROM t_order o RIGHT JOIN t_order_item i using(order_id) WHERE o.user_id = 10 ORDER BY o.order_id, 7; </code></pre></div> <p dir="auto"><strong>The result of sharding-proxy</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_db=&gt; SELECT * FROM t_order o RIGHT JOIN t_order_item i using(order_id) WHERE o.user_id = 10 ORDER BY o.order_id, 7; order_id | user_id | status | merchant_id | remark | creation_date | item_id | order_id | user_id | product_id | quantity ----------+---------+--------+-------------+--------+-----------------------+---------+----------+---------+------------+----------------------- 1000 | 10 | init | 1 | test | 2017-07-08 00:00:00.0 | 100001 | 10 | 1 | 1 | 2017-07-08 00:00:00.0 1000 | 10 | init | 1 | test | 2017-07-08 00:00:00.0 | 100002 | 10 | 1 | 1 | 2017-07-08 00:00:00.0 1001 | 10 | init | 2 | test | 2017-07-08 00:00:00.0 | 100101 | 10 | 2 | 1 | 2017-07-08 00:00:00.0 1001 | 10 | init | 2 | test | 2017-07-08 00:00:00.0 | 100102 | 10 | 2 | 1 | 2017-07-08 00:00:00.0 (4 rows)"><pre class="notranslate"><code class="notranslate">test_db=&gt; SELECT * FROM t_order o RIGHT JOIN t_order_item i using(order_id) WHERE o.user_id = 10 ORDER BY o.order_id, 7; order_id | user_id | status | merchant_id | remark | creation_date | item_id | order_id | user_id | product_id | quantity ----------+---------+--------+-------------+--------+-----------------------+---------+----------+---------+------------+----------------------- 1000 | 10 | init | 1 | test | 2017-07-08 00:00:00.0 | 100001 | 10 | 1 | 1 | 2017-07-08 00:00:00.0 1000 | 10 | init | 1 | test | 2017-07-08 00:00:00.0 | 100002 | 10 | 1 | 1 | 2017-07-08 00:00:00.0 1001 | 10 | init | 2 | test | 2017-07-08 00:00:00.0 | 100101 | 10 | 2 | 1 | 2017-07-08 00:00:00.0 1001 | 10 | init | 2 | test | 2017-07-08 00:00:00.0 | 100102 | 10 | 2 | 1 | 2017-07-08 00:00:00.0 (4 rows) </code></pre></div> <p dir="auto"><strong>The result of opengauss</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tpccdb=# SELECT * FROM t_order o RIGHT JOIN t_order_item i using(order_id) WHERE o.user_id = 10 ORDER BY o.order_id, 7; order_id | user_id | status | merchant_id | remark | creation_date | item_id | user_id | product_id | quantity | creation_date ----------+---------+--------+-------------+--------+---------------------+---------+---------+------------+----------+--------------------- 1000 | 10 | init | 1 | test | 2017-07-08 00:00:00 | 100001 | 10 | 1 | 1 | 2017-07-08 00:00:00 1000 | 10 | init | 1 | test | 2017-07-08 00:00:00 | 100002 | 10 | 1 | 1 | 2017-07-08 00:00:00 1001 | 10 | init | 2 | test | 2017-07-08 00:00:00 | 100101 | 10 | 2 | 1 | 2017-07-08 00:00:00 1001 | 10 | init | 2 | test | 2017-07-08 00:00:00 | 100102 | 10 | 2 | 1 | 2017-07-08 00:00:00 (4 rows)"><pre class="notranslate"><code class="notranslate">tpccdb=# SELECT * FROM t_order o RIGHT JOIN t_order_item i using(order_id) WHERE o.user_id = 10 ORDER BY o.order_id, 7; order_id | user_id | status | merchant_id | remark | creation_date | item_id | user_id | product_id | quantity | creation_date ----------+---------+--------+-------------+--------+---------------------+---------+---------+------------+----------+--------------------- 1000 | 10 | init | 1 | test | 2017-07-08 00:00:00 | 100001 | 10 | 1 | 1 | 2017-07-08 00:00:00 1000 | 10 | init | 1 | test | 2017-07-08 00:00:00 | 100002 | 10 | 1 | 1 | 2017-07-08 00:00:00 1001 | 10 | init | 2 | test | 2017-07-08 00:00:00 | 100101 | 10 | 2 | 1 | 2017-07-08 00:00:00 1001 | 10 | init | 2 | test | 2017-07-08 00:00:00 | 100102 | 10 | 2 | 1 | 2017-07-08 00:00:00 (4 rows) </code></pre></div> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="schemaName: test_db dataSources: ds_0: connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 260 minPoolSize: 10 password: Test@123 url: jdbc:opengauss://90.90.44.171:14000/test_db?batchMode=on username: tpccuser ds_1: connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 260 minPoolSize: 10 password: Test@123 url: jdbc:opengauss://90.90.44.171:15000/test_db?batchMode=on username: tpccuser rules: - !SHARDING tables: t_user: actualDataNodes: ds_0.t_user t_product: actualDataNodes: ds_0.t_product t_merchant: actualDataNodes: ds_1.t_merchant t_product_detail: actualDataNodes: ds_1.t_product_detail t_order: actualDataNodes: ds_${0..1}.t_order databaseStrategy: standard: shardingColumn: user_id shardingAlgorithmName: database_inline t_order_item: actualDataNodes: ds_${0..1}.t_order_item databaseStrategy: standard: shardingColumn: user_id shardingAlgorithmName: database_inline t_order_item1: actualDataNodes: ds_${0..1}.t_order_item1 databaseStrategy: standard: shardingColumn: user_id shardingAlgorithmName: database_inline t_new_order: actualDataNodes: ds_${0..1}.t_new_order_${0..1} databaseStrategy: standard: shardingAlgorithmName: database_inline shardingColumn: user_id tableStrategy: standard: shardingColumn: order_id shardingAlgorithmName: table_inline bindingTables: - t_order,t_order_item broadcastTables: - t_product_category - t_country shardingAlgorithms: database_inline: type: INLINE props: algorithm-expression: ds_${user_id % 2} allow-range-query-with-inline-sharding: true table_inline: type: INLINE props: algorithm-expression: t_new_order_${order_id % 2} allow-range-query-with-inline-sharding: true "><pre class="notranslate"><code class="notranslate">schemaName: test_db dataSources: ds_0: connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 260 minPoolSize: 10 password: Test@123 url: jdbc:opengauss://90.90.44.171:14000/test_db?batchMode=on username: tpccuser ds_1: connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 260 minPoolSize: 10 password: Test@123 url: jdbc:opengauss://90.90.44.171:15000/test_db?batchMode=on username: tpccuser rules: - !SHARDING tables: t_user: actualDataNodes: ds_0.t_user t_product: actualDataNodes: ds_0.t_product t_merchant: actualDataNodes: ds_1.t_merchant t_product_detail: actualDataNodes: ds_1.t_product_detail t_order: actualDataNodes: ds_${0..1}.t_order databaseStrategy: standard: shardingColumn: user_id shardingAlgorithmName: database_inline t_order_item: actualDataNodes: ds_${0..1}.t_order_item databaseStrategy: standard: shardingColumn: user_id shardingAlgorithmName: database_inline t_order_item1: actualDataNodes: ds_${0..1}.t_order_item1 databaseStrategy: standard: shardingColumn: user_id shardingAlgorithmName: database_inline t_new_order: actualDataNodes: ds_${0..1}.t_new_order_${0..1} databaseStrategy: standard: shardingAlgorithmName: database_inline shardingColumn: user_id tableStrategy: standard: shardingColumn: order_id shardingAlgorithmName: table_inline bindingTables: - t_order,t_order_item broadcastTables: - t_product_category - t_country shardingAlgorithms: database_inline: type: INLINE props: algorithm-expression: ds_${user_id % 2} allow-range-query-with-inline-sharding: true table_inline: type: INLINE props: algorithm-expression: t_new_order_${order_id % 2} allow-range-query-with-inline-sharding: true </code></pre></div>
0
<p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="37622512" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/2921" data-hovercard-type="issue" data-hovercard-url="/atom/atom/issues/2921/hovercard" href="https://github.com/atom/atom/issues/2921">#2921</a></p> <p dir="auto">Windows 7, Atom version 0.113.0</p>
1
<h3 dir="auto">Bug summary</h3> <p dir="auto">When calling <code class="notranslate">plt.gca().set_aspect(-1)</code> it leads to a infinite loop, where <code class="notranslate">ValueError: 'box_aspect' and 'fig_aspect' must be positive</code> repeatedly, until I terminate python.</p> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt plt.plot() plt.gca().set_aspect(-1)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">plt</span>.<span class="pl-en">plot</span>() <span class="pl-s1">plt</span>.<span class="pl-en">gca</span>().<span class="pl-en">set_aspect</span>(<span class="pl-c1">-</span><span class="pl-c1">1</span>)</pre></div> <h3 dir="auto">Actual outcome</h3> <p dir="auto"><code class="notranslate">ValueError: 'box_aspect' and 'fig_aspect' must be positive</code> is thrown repeatedly</p> <h3 dir="auto">Expected outcome</h3> <p dir="auto">either a single Value Error, or that you get the same as if you would invert the y-axis, but with a 1:1 aspect ratio.</p> <h3 dir="auto">Additional information</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Operating system</h3> <p dir="auto">iOS</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">3.5.3</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto">MacOSX</p> <h3 dir="auto">Python version</h3> <p dir="auto">3.10</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">pip</p>
<blockquote> <p dir="auto"><a href="https://github.com/matplotlib/matplotlib/runs/5781197219?check_suite_focus=true">Duplicate uploads</a> also fail.</p> </blockquote> <blockquote> <p dir="auto">I think that is OK though?</p> <p dir="auto">We have at least one build on main per day most days and I am not sure it is worth the logic to not get rejected on the days we do not (or on days when someone has pushed the button to run it early).</p> </blockquote> <p dir="auto">If no one minds I don't mind throwing in some additional logic to check just before the upload stage. This is pretty easy with <code class="notranslate">pip index versions</code> and some <code class="notranslate">sed</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -m pip index \ --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple \ --pre \ versions matplotlib | \ grep matplotlib | \ sed 's/.*(\(.*\))/\1/' WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning. 3.6.0.dev1948+gd8ede1a710"><pre class="notranslate"><code class="notranslate">$ python -m pip index \ --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple \ --pre \ versions matplotlib | \ grep matplotlib | \ sed 's/.*(\(.*\))/\1/' WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning. 3.6.0.dev1948+gd8ede1a710 </code></pre></div> <p dir="auto">So all you'd need to do would be something like</p> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ LAST_NIGHTLY_VERSION=&quot;$(python -m pip index \ --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple \ --pre \ versions matplotlib | \ grep matplotlib | \ sed 's/.*(\(.*\))/\1/')&quot; WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning. $ echo &quot;${LAST_NIGHTLY_VERSION}&quot; 3.6.0.dev1948+gd8ede1a710"><pre class="notranslate">$ <span class="pl-s1">LAST_NIGHTLY_VERSION=<span class="pl-s"><span class="pl-pds">"</span><span class="pl-s"><span class="pl-pds">$(</span>python -m pip index \</span></span></span> <span class="pl-c1"> --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple \</span> <span class="pl-c1"> --pre \</span> <span class="pl-c1"> versions matplotlib | \</span> <span class="pl-c1"> grep matplotlib | \</span> <span class="pl-c1"> sed 's/.*(\(.*\))/\1/')"</span> <span class="pl-c1">WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.</span> $ <span class="pl-s1"><span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">${LAST_NIGHTLY_VERSION}</span><span class="pl-pds">"</span></span></span> <span class="pl-c1">3.6.0.dev1948+gd8ede1a710</span></pre></div> <p dir="auto">and then just check if that shows up as version of the wheels that just got downloaded from the GitHub Actions workflow artifact</p> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ [ &quot;$(find dist -type f -iname &quot;matplotlib-${LAST_NIGHTLY_VERSION}*.whl&quot; | wc --lines)&quot; -gt &quot;0&quot; ] $ echo $? 0"><pre class="notranslate">$ <span class="pl-s1">[ <span class="pl-s"><span class="pl-pds">"</span><span class="pl-s"><span class="pl-pds">$(</span>find dist -type f -iname <span class="pl-s"><span class="pl-pds">"</span>matplotlib-<span class="pl-smi">${LAST_NIGHTLY_VERSION}</span>*.whl<span class="pl-pds">"</span></span> <span class="pl-k">|</span> wc --lines<span class="pl-pds">)</span></span><span class="pl-pds">"</span></span> <span class="pl-k">-gt</span> <span class="pl-s"><span class="pl-pds">"</span>0<span class="pl-pds">"</span></span> ]</span> $ <span class="pl-s1"><span class="pl-c1">echo</span> <span class="pl-smi">$?</span></span> <span class="pl-c1">0</span></pre></div> <p dir="auto">(maybe a more elegant way to do that but that's not the worst)</p> <p dir="auto">I'll make an Issue from this and I'm happy to PR it, unless you would prefer to avoid touching it as much as possible.</p> <p dir="auto"><em>Originally posted by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/matthewfeickert/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/matthewfeickert">@matthewfeickert</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1186771419" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/22733" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/22733/hovercard?comment_id=1085384157&amp;comment_type=issue_comment" href="https://github.com/matplotlib/matplotlib/pull/22733#issuecomment-1085384157">#22733 (comment)</a></em></p>
0
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-target-the-children-of-an-element-using-jquery" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-target-the-children-of-an-element-using-jquery</a> has an issue. The first sentence of the text is incorrect. <code class="notranslate">Many HTML elements have children elements from which they inherit properties</code> should read <code class="notranslate">Many HTML elements have children elements which inherit their properties</code>. Children inherit from parents, not the other way around.</p>
<p dir="auto">I'm being allowed to go to the next challenge even though I am not entering the semi colons.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9852102/9330588/efbf6542-45c2-11e5-82db-aa038dd52e74.jpg"><img src="https://cloud.githubusercontent.com/assets/9852102/9330588/efbf6542-45c2-11e5-82db-aa038dd52e74.jpg" alt="untitled-1" style="max-width: 100%;"></a></p>
1
<p dir="auto">In the bootstrap.css file there are few properties which are are repeated twice, starting at line no 719:</p> <p dir="auto">This is repeated [appears in line 719 &amp; again in 729]:</p> <p dir="auto">.container:before,<br> .container:after {<br> display: table;<br> content: " ";<br> }</p> <p dir="auto">.container:after {<br> clear: both;<br> }</p> <p dir="auto">And this is repeated [appears in line 739 &amp; again in 749]:</p> <p dir="auto">.row:before,<br> .row:after {<br> display: table;<br> content: " ";<br> }</p> <p dir="auto">.row:after {<br> clear: both;<br> }</p> <p dir="auto">The same duplication has found its way into bootstrap.min.css as well.</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
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Feature Idea</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">unarchive module</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.3.1"><pre class="notranslate"><code class="notranslate">ansible 2.3.1 </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <h5 dir="auto">OS / ENVIRONMENT</h5> <h5 dir="auto">SUMMARY</h5> <p dir="auto">need a feature to extract single/multiple files from .zip file . current unarchive module will unzip all the files to the destination folder</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"> </code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5> <p dir="auto">Feature Idea</p> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">unarchive module</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides This feature idea is really more geared towards Ansible &gt; 2.1"><pre class="notranslate"><code class="notranslate">ansible 2.1.0.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides This feature idea is really more geared towards Ansible &gt; 2.1 </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">export ANSIBLE_NOCOWS=1</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <h5 dir="auto">SUMMARY</h5> <p dir="auto">A Java JAR file is a ZIP file with a manifest and can be extracted using unarchive. A Java JAR file can also be executed in place. It's pretty common to extract specific files from a Java JAR file (such as properties files) so that you can alter the execution environment. In the case below, I simply want to extract the icon file to add a launcher for Burp Suite to the menu.<br> In any case, there are many other instances when it would be convenient to unarchive a limited set of files from an archive. The "exclude" parameter provides a similar function, but wouldn't be convenient in this case as there are thousands of files and a complex directory hierarchy in this archive. Since I'm not on 2.1 yet (Xubuntu), I don't have the exclude feature yet but used the command module to run unzip instead. The only annoying aspect to this technique is that Ansible tells me I should be using the unarchive module.<br> Low priority but potentially very useful ... and thanks for hard work you all put in!</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">The following play extracts a single file as needed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: extract the application's icon from the archive command: unzip {{ burp_installation_directory }}/{{ burp_file }} {{ burp_icon_path }}/{{ burp_icon_file }} chdir={{ burp_installation_directory }} creates={{ burp_installation_directory }}/{{ burp_icon_path }}/{{ burp_icon_file }} tags: - burp_suite - security"><pre class="notranslate"><code class="notranslate">- name: extract the application's icon from the archive command: unzip {{ burp_installation_directory }}/{{ burp_file }} {{ burp_icon_path }}/{{ burp_icon_file }} chdir={{ burp_installation_directory }} creates={{ burp_installation_directory }}/{{ burp_icon_path }}/{{ burp_icon_file }} tags: - burp_suite - security </code></pre></div> <p dir="auto">But also generates a warning that I'm using the wrong module for the job.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [burp_suite : extract the application's icon from the archive] ************ changed: [localhost] [WARNING]: Consider using unarchive module rather than running unzip"><pre class="notranslate"><code class="notranslate">TASK [burp_suite : extract the application's icon from the archive] ************ changed: [localhost] [WARNING]: Consider using unarchive module rather than running unzip </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <h5 dir="auto">ACTUAL RESULTS</h5>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_LOG=rustc=1,::rt::backtrace rustc link_header.rs rust: task failed at 'assertion failed: rp.is_none()', /Users/shout/Projects/rust/src/librustc/middle/typeck/collect.rs:1044 error: internal compiler error: unexpected failure note: the compiler hit an unexpected failure path. this is a bug note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues rust: task failed at 'explicit failure', /Users/shout/Projects/rust/src/librustc/rustc.rs:358 rust: domain main @0x7f86ba819810 root task failed"><pre class="notranslate"><code class="notranslate">$ RUST_LOG=rustc=1,::rt::backtrace rustc link_header.rs rust: task failed at 'assertion failed: rp.is_none()', /Users/shout/Projects/rust/src/librustc/middle/typeck/collect.rs:1044 error: internal compiler error: unexpected failure note: the compiler hit an unexpected failure path. this is a bug note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues rust: task failed at 'explicit failure', /Users/shout/Projects/rust/src/librustc/rustc.rs:358 rust: domain main @0x7f86ba819810 root task failed </code></pre></div> <p dir="auto">Complete contents of <code class="notranslate">link_header.rs</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#[ crate_type = &quot;lib&quot; ]; // Given a Link header, parse out the next url // &lt;https://api.github.com/repositories?since=364&gt;; rel=&quot;next&quot;, &lt;https://api.github.com/repositories{?since}&gt;; rel=&quot;first&quot; fn parse(header: ~str) -&gt; &amp;'self str { match header.find('&lt;') { Some(start) =&gt; { match header.find('&gt;') { Some(end) =&gt; { return header.slice(start + 1, end); }, _ =&gt; { fail!(&quot;Missing &gt;&quot;) } } }, _ =&gt; {fail!(&quot;Missing &lt;&quot;) } } }"><pre class="notranslate"><code class="notranslate">#[ crate_type = "lib" ]; // Given a Link header, parse out the next url // &lt;https://api.github.com/repositories?since=364&gt;; rel="next", &lt;https://api.github.com/repositories{?since}&gt;; rel="first" fn parse(header: ~str) -&gt; &amp;'self str { match header.find('&lt;') { Some(start) =&gt; { match header.find('&gt;') { Some(end) =&gt; { return header.slice(start + 1, end); }, _ =&gt; { fail!("Missing &gt;") } } }, _ =&gt; {fail!("Missing &lt;") } } } </code></pre></div>
<p dir="auto">Followup to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11612802" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/5219" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/5219/hovercard" href="https://github.com/rust-lang/rust/issues/5219">#5219</a>. Per that issue rpaths are frowned on by linux distros. Absolute rpaths are supposed to be worse than relative rpaths (I'm not clear on why at the moment), and they are probably relatively easy to get rid of. Nominating.</p>
0
<h5 dir="auto">Description of the problem</h5> <p dir="auto">The fiddle is <a href="https://jsfiddle.net/dcromley/g791otyp/" rel="nofollow">https://jsfiddle.net/dcromley/g791otyp/</a><br> This draws a line using bufferGeometry with<br> <code class="notranslate"> LineBasicMaterial( { vertexColors:THREE.VertexColors, lights:false }</code><br> As it is, it gives a correct red to blue line.<br> By changing "lights:false" to "lights:true", it gives the error:</p> <blockquote> <p dir="auto">Uncaught TypeError: Cannot set property 'value' of undefined</p> </blockquote> <p dir="auto">It does not give this error using Revision 73.<br> Maybe, "Who would want to do this"? But I stumbled across this error.<br> My thanks to all. Let me know how I can conform better to the threejs society.</p> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r95</li> </ul> <h5 dir="auto">Browser</h5> <ul dir="auto"> <li>[x ] Chrome Version 68.0.3440.106 (Official Build) (64-bit)</li> </ul> <h5 dir="auto">OS</h5> <ul dir="auto"> <li>[x ] Windows</li> </ul> <h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>
<p dir="auto">(*** This section is for bug reports and feature requests only. This is NOT a help site. Do not ask help questions here. If you need help, please use stackoverflow. ***)</p> <h5 dir="auto">Description of the problem</h5> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var starsMaterialx = new THREE.PointsMaterial( { color: 0xFFFFFF, size: 5, lights: true } ); returns Uncaught TypeError: Cannot set property 'value' of undefined at t (three.min.js:136) while var starsMaterialx = new THREE.PointsMaterial( { color: 0xFFFFFF, size: 5 } ); and var starsMaterialx = new THREE.PointsMaterial( { color: 0xFFFFFF, size: 5, lights: false } ); works fine."><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">starsMaterialx</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">PointsMaterial</span><span class="pl-kos">(</span> <span class="pl-kos">{</span> <span class="pl-c1">color</span>: <span class="pl-c1">0xFFFFFF</span><span class="pl-kos">,</span> <span class="pl-c1">size</span>: <span class="pl-c1">5</span><span class="pl-kos">,</span> <span class="pl-c1">lights</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">returns</span> Uncaught <span class="pl-v">TypeError</span>: <span class="pl-v">Cannot</span> <span class="pl-s1">set</span> <span class="pl-s1">property</span> <span class="pl-s">'value'</span> <span class="pl-s1">of</span> <span class="pl-c1">undefined</span> <span class="pl-en">at</span> <span class="pl-s1">t</span> <span class="pl-kos">(</span><span class="pl-s1">three</span><span class="pl-kos">.</span><span class="pl-c1">min</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">136</span><span class="pl-kos">)</span> <span class="pl-k">while</span> <span class="pl-k">var</span> <span class="pl-s1">starsMaterialx</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">PointsMaterial</span><span class="pl-kos">(</span> <span class="pl-kos">{</span> <span class="pl-c1">color</span>: <span class="pl-c1">0xFFFFFF</span><span class="pl-kos">,</span> <span class="pl-c1">size</span>: <span class="pl-c1">5</span> <span class="pl-kos">}</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">and</span> <span class="pl-k">var</span> <span class="pl-s1">starsMaterialx</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">PointsMaterial</span><span class="pl-kos">(</span> <span class="pl-kos">{</span> <span class="pl-c1">color</span>: <span class="pl-c1">0xFFFFFF</span><span class="pl-kos">,</span> <span class="pl-c1">size</span>: <span class="pl-c1">5</span><span class="pl-kos">,</span> <span class="pl-c1">lights</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-s1">works</span> <span class="pl-s1">fine</span><span class="pl-kos">.</span></pre></div> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r82</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> IOS</li> </ul> <h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> <p dir="auto">iMac (Retina 5K, 27-inch, Late 2014)<br> AMD Radeon R9 M295X 4096 MB</p>
1
<p dir="auto">I came around this and this seemed related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="59948062" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9595" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9595/hovercard" href="https://github.com/pandas-dev/pandas/issues/9595">#9595</a> but could also be a bug in the above interacting with the CategoricalIndex. Using the same example as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="209270351" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/15470" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/15470/hovercard" href="https://github.com/pandas-dev/pandas/issues/15470">#15470</a> with pandas 0.20.3:</p> <h4 dir="auto">Code Sample</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" s = pd.Series([2, 1, 0], index=pd.CategoricalIndex([2, 1, 0])) s[2] # works (interpreting as label) s.loc[2] # fails with TypeError: cannot do label indexing on &lt;class 'pandas.core.indexes.category.CategoricalIndex'&gt; with these indexers [2] of &lt;class 'int'&gt; # of course the below works! s = pd.Series([2, 1, 0], index=[2, 1, 0]) s[2] # works (interpreting as label) s.loc[2] # works (interpreting as label)"><pre class="notranslate"> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">CategoricalIndex</span>([<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>])) <span class="pl-s1">s</span>[<span class="pl-c1">2</span>] <span class="pl-c"># works (interpreting as label)</span> <span class="pl-s1">s</span>.<span class="pl-s1">loc</span>[<span class="pl-c1">2</span>] <span class="pl-c"># fails with TypeError: cannot do label indexing on &lt;class 'pandas.core.indexes.category.CategoricalIndex'&gt; with these indexers [2] of &lt;class 'int'&gt;</span> <span class="pl-c"># of course the below works!</span> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>]) <span class="pl-s1">s</span>[<span class="pl-c1">2</span>] <span class="pl-c"># works (interpreting as label)</span> <span class="pl-s1">s</span>.<span class="pl-s1">loc</span>[<span class="pl-c1">2</span>] <span class="pl-c"># works (interpreting as label)</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto"><code class="notranslate">s.loc[2]</code> shouldn't fail and should select the label '2'.<br> Note this happens also with a pd.DataFrame.</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="&gt;&gt;&gt; s = pd.Series([2, 1, 0], index=pd.CategoricalIndex([2, 1, 0])) &gt;&gt;&gt; s.index CategoricalIndex([2, 1, 0], categories=[0, 1, 2], ordered=False, dtype='category') &gt;&gt;&gt; s[[0, 1, 2]].equals(s.loc[[0, 1, 2]]) # Should be True False &gt;&gt;&gt; s[[0, 1, 2]].equals(s.iloc[[0, 1, 2]]) # Should be False True"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">CategoricalIndex</span>([<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>])) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span>.<span class="pl-s1">index</span> <span class="pl-v">CategoricalIndex</span>([<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>], <span class="pl-s1">categories</span><span class="pl-c1">=</span>[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>], <span class="pl-s1">ordered</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'category'</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]].<span class="pl-en">equals</span>(<span class="pl-s1">s</span>.<span class="pl-s1">loc</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]]) <span class="pl-c"># Should be True</span> <span class="pl-c1">False</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]].<span class="pl-en">equals</span>(<span class="pl-s1">s</span>.<span class="pl-s1">iloc</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]]) <span class="pl-c"># Should be False</span> <span class="pl-c1">True</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">For Series with CategoricalIndex, <code class="notranslate">__getitem__</code> indexing behaves differently than <code class="notranslate">.loc</code>. On other-indexed series, these accessors return the same result:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; s = pd.Series([2, 1, 0], index=[2, 1, 0]) &gt;&gt;&gt; s[[0, 1, 2]].equals(s.loc[[0, 1, 2]]) # Should be True True &gt;&gt;&gt; s[[0, 1, 2]].equals(s.iloc[[0, 1, 2]]) # Should be True False"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]].<span class="pl-en">equals</span>(<span class="pl-s1">s</span>.<span class="pl-s1">loc</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]]) <span class="pl-c"># Should be True</span> <span class="pl-c1">True</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]].<span class="pl-en">equals</span>(<span class="pl-s1">s</span>.<span class="pl-s1">iloc</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]]) <span class="pl-c"># Should be True</span> <span class="pl-c1">False</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="&gt;&gt;&gt; s = pd.Series([2, 1, 0], index=pd.CategoricalIndex([2, 1, 0])) &gt;&gt;&gt; s[[0, 1, 2]].equals(s.loc[[0, 1, 2]]) True"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">CategoricalIndex</span>([<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>])) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">s</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]].<span class="pl-en">equals</span>(<span class="pl-s1">s</span>.<span class="pl-s1">loc</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]]) <span class="pl-c1">True</span></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <p dir="auto">0.19.0+479.git</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.18941.1001] Windows Terminal version (if applicable): commit id c97cccb "><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18941.1001] Windows Terminal version (if applicable): commit id c97cccb </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Open tab too fast and many of them.<br> Using shortcut key(default ctrl+shift+number) makes easy to open lots of tab at once</p> <p dir="auto">Which I was doing was holding shortcut key(crtl+shift+2 to open cmd) for few seconds.</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Only one tab open or Lots of tabs opens without any problem.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Terminal crashes (without any error message)</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.418] Windows Terminal version (if applicable): 0.6.2951.0 Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.418] Windows Terminal version (if applicable): 0.6.2951.0 Any other software? </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Open up Windows Terminal. Open up any other window. Make sure windows terminal has the useAcrylic set to tru and the opacity set to something like .5. Snap the two windows to either side. When Terminal is in focus the acrylic will work. When it's not it will not.</li> </ol> <h1 dir="auto">Expected behavior</h1> <p dir="auto">The acrylic effect to stay whether or not terminal is in focus.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">The acrylic effect only appears when terminal is in focus</p>
0
<p dir="auto">This seems like something the compiler could merge, <a href="http://www.typescriptlang.org/Playground#src=interface%20A%20%7B%0A%09foo%28name%3A%20'foo'%29%3A%20string%3B%0A%09foo%28name%3A%20string%29%3A%20any%3B%0A%7D%0A%0Ainterface%20B%20%7B%0A%09foo%28name%3A%20'bar'%29%3A%20number%3B%0A%09foo%28name%3A%20string%29%3A%20any%3B%0A%7D%0A%0Ainterface%20C%20extends%20A%2C%20B%20%7B%7D%0A" rel="nofollow">but currently it complains</a> that property of foo in types A and B are not identical:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface A { foo(name: 'foo'): string; foo(name: string): any; } interface B { foo(name: 'bar'): number; foo(name: string): any; } interface C extends A, B {}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span> <span class="pl-c1">foo</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-s">'foo'</span><span class="pl-kos">)</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-c1">foo</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">B</span> <span class="pl-kos">{</span> <span class="pl-c1">foo</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-s">'bar'</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-c1">foo</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">C</span> <span class="pl-k">extends</span> <span class="pl-smi">A</span><span class="pl-kos">,</span> <span class="pl-smi">B</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <p dir="auto">I have some real world code I am trying to type and essentially I have to redeclare all the "inherited" string literal types like this in the final class, which is sort of unmaintainable.</p>
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">1.8.10</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="interface Foo { on(type: 'foo', listener: (event: MouseEvent) =&gt; boolean): boolean; on(type: string, listener: (event: Event) =&gt; boolean): boolean; } interface Bar { on(type: 'bar', listener: (event: MSGestureEvent) =&gt; boolean): boolean; on(type: string, listener: (event: Event) =&gt; boolean): boolean; } interface FooBarA extends Foo, Bar {} // Error: not correctly extended interface FooBarB extends Foo, Bar { on(type: 'foo', listener: (event: MouseEvent) =&gt; boolean): boolean; on(type: 'bar', listener: (event: MSGestureEvent) =&gt; boolean): boolean; on(type: string, listener: (event: Event) =&gt; boolean): boolean; } type FooBarC = Foo &amp; Bar; let foobar: FooBarC; foobar.on('foo', (event) =&gt; { return false; });"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">MouseEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span> <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span> <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">MSGestureEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span> <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">FooBarA</span> <span class="pl-k">extends</span> <span class="pl-smi">Foo</span><span class="pl-kos">,</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-c">// Error: not correctly extended</span> <span class="pl-k">interface</span> <span class="pl-smi">FooBarB</span> <span class="pl-k">extends</span> <span class="pl-smi">Foo</span><span class="pl-kos">,</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span> <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">MouseEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span> <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">MSGestureEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span> <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">type</span> <span class="pl-smi">FooBarC</span> <span class="pl-c1">=</span> <span class="pl-smi">Foo</span> <span class="pl-c1">&amp;</span> <span class="pl-smi">Bar</span><span class="pl-kos">;</span> <span class="pl-k">let</span> <span class="pl-s1">foobar</span>: <span class="pl-smi">FooBarC</span><span class="pl-kos">;</span> <span class="pl-s1">foobar</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Expected behavior:</strong></p> <p dir="auto">That <code class="notranslate">FooBarA</code> would work instead of throwing an error.</p> <p dir="auto"><strong>Actual behavior:</strong></p> <p dir="auto"><code class="notranslate">FooBarA</code> complains <code class="notranslate">Interface 'FooBarA' cannot simultaneously extend types 'Foo' and 'Bar'. Named property 'on' of types 'Foo' and 'Bar' are not identical.</code></p> <p dir="auto">While that is true in the strictest sense, the "base" override matches, which means in theory the string literal types could be merged and the error should only occur if there is a conflict between a specific string literal type.</p> <p dir="auto">Using the intersection type works perfectly fine and the resulting type mirrors the runtime behaviour. Using the "reimplement all methods" (<code class="notranslate">FooBarB</code>) gets really tedious really quickly when you are trying to do something like model event listeners like the above.</p>
1
<p dir="auto"><strong>Migrated issue, originally created by chrismacklin (<a href="https://github.com/chrismacklin">@chrismacklin</a>)</strong></p> <p dir="auto">When using the association object pattern with a table with columns besides the two bridging foreign keys, the docs only gently state that association_proxy is needed. I think this needs to be called out much more loudly and clearly in the docs, as using the secondary kwarg with an association table with extra mapped columns can cause silent corruption of the result set. As it stands, there's just one sentence in the docs that mentions in an almost offhand fashion that if there are extra columns, you need to use association_proxy:</p> <p dir="auto"><a href="http://docs.sqlalchemy.org/en/latest/orm/basic_relationships.html#association-object" rel="nofollow">http://docs.sqlalchemy.org/en/latest/orm/basic_relationships.html#association-object</a><br> "The association object pattern is a variant on many-to-many: it’s used when your association table contains additional columns beyond those which are foreign keys to the left and right tables."</p> <p dir="auto">This makes it sounds like it provides something like a nice convenience, rather than being strictly required.</p> <p dir="auto">It would be even better if the secondary kwarg could perform some validation and refuse to map an association table that doesn't meet the requirement that the only columns on the table should be the FKs participating in the association.</p> <p dir="auto">In my case, I had an association table with an integer primary key ID and a pair of FKs forming the association (I'll call them foo_id and bar_id), associating zero-to-many instances of Bar with a single Foo, allowing duplicate association of the same Bar multiple times to a single Foo. Suppose I have a single instance of Foo (my_foo), with two rows in the association table to a single instance of Bar (my_bar).</p> <p dir="auto">If my_foo.bars is declared with association_proxy, this holds:</p> <p dir="auto">assert my_foo.bars == [my_bar, my_bar]</p> <p dir="auto">If my_foo.bars is declared using relationship with secondary, I end up with the corrupt result set:</p> <p dir="auto">assert my_foo.bars == [my_bar]</p> <p dir="auto">No warning or error is emitted when creating this mapping.</p> <p dir="auto">This seems like a pretty big footgun to me, and I think the docs need to be MUCH more clear on this.</p> <p dir="auto">This was tested on Postgres 9.3</p> <p dir="auto">I can produce a minimal example of this issue if it is needed.</p>
<h3 dir="auto">Describe the bug</h3> <p dir="auto">Hello,<br> By following the tutorial, when I execute<br> <a href="https://docs.sqlalchemy.org/en/14/tutorial/data_select.html#:~:text=row%20%3D%20session.execute(select(User)).first()" rel="nofollow">https://docs.sqlalchemy.org/en/14/tutorial/data_select.html#:~:text=row%20%3D%20session.execute(select(User)).first()</a>,<br> I got the following error:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- InvalidRequestError Traceback (most recent call last) (see details below) InvalidRequestError: Multiple classes found for path &quot;Address&quot; in the registry of this declarative base. Please use a fully module-qualified path."><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">InvalidRequestError</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-s1">see</span> <span class="pl-s1">details</span> <span class="pl-s1">below</span>) <span class="pl-v">InvalidRequestError</span>: <span class="pl-v">Multiple</span> <span class="pl-s1">classes</span> <span class="pl-s1">found</span> <span class="pl-k">for</span> <span class="pl-s1">path</span> <span class="pl-s">"Address"</span> <span class="pl-c1">in</span> <span class="pl-s1">the</span> <span class="pl-s1">registry</span> <span class="pl-s1">of</span> <span class="pl-s1">this</span> <span class="pl-s1">declarative</span> <span class="pl-s1">base</span>. <span class="pl-v">Please</span> <span class="pl-s1">use</span> <span class="pl-s1">a</span> <span class="pl-s1">fully</span> <span class="pl-s1">module</span><span class="pl-c1">-</span><span class="pl-s1">qualified</span> <span class="pl-s1">path</span>.</pre></div> <p dir="auto">and I found that the reason is in<br> <a href="https://docs.sqlalchemy.org/en/14/tutorial/metadata.html#combining-core-table-declarations-with-orm-declarative" rel="nofollow">https://docs.sqlalchemy.org/en/14/tutorial/metadata.html#combining-core-table-declarations-with-orm-declarative</a><br> was duplicate with the code in<br> <a href="https://docs.sqlalchemy.org/en/14/tutorial/metadata.html#:~:text=self.fullname!r%7D)%22%0A%0A%3E%3E%3E-,class%20Address(Base)%3A,-...%20%20%20%20%20__tablename__%20%3D%20%27address%27%0A...%0A...%20%20%20%20%20id" rel="nofollow">https://docs.sqlalchemy.org/en/14/tutorial/metadata.html#:~:text=self.fullname!r%7D)%22%0A%0A%3E%3E%3E-,class%20Address(Base)%3A,-...%20%20%20%20%20__tablename__%20%3D%20%27address%27%0A...%0A...%20%20%20%20%20id</a><br> how do I fix this? should the tutorial be modified too? (e.g. add a warning)</p> <h3 dir="auto">To Reproduce</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# %% from sqlalchemy.orm import registry mapper_registry = registry() Base = mapper_registry.generate_base() from sqlalchemy import select from sqlalchemy import Table, Column, Integer, String from sqlalchemy import ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.orm import Session from sqlalchemy import create_engine engine = create_engine(&quot;sqlite+pysqlite:///:memory:&quot;, echo=True, future=True) class User(Base): __tablename__ = &quot;user_account&quot; id = Column(Integer, primary_key=True) name = Column(String(30)) fullname = Column(String) addresses = relationship(&quot;Address&quot;, back_populates=&quot;user&quot;) def __repr__(self): return ( f&quot;User(id={self.id!r},&quot; f&quot; name={self.name!r},&quot; f&quot; fullname={self.fullname!r})&quot; ) class Address(Base): __tablename__ = &quot;address&quot; id = Column(Integer, primary_key=True) email_address = Column(String, nullable=False) user_id = Column(Integer, ForeignKey(&quot;user_account.id&quot;)) user = relationship(&quot;User&quot;, back_populates=&quot;addresses&quot;) def __repr__(self): return f&quot;Address(id={self.id!r},&quot; f&quot; email_address=&quot; f&quot;{self.email_address!r})&quot; # %% mapper_registry.metadata.create_all(engine) # %% from sqlalchemy import MetaData metadata_obj = MetaData() user_table = Table( &quot;user_account&quot;, metadata_obj, Column(&quot;id&quot;, Integer, primary_key=True), Column(&quot;name&quot;, String(30)), Column(&quot;fullname&quot;, String), ) address_table = Table( &quot;address&quot;, metadata_obj, Column(&quot;id&quot;, Integer, primary_key=True), Column(&quot;user_id&quot;, ForeignKey(&quot;user_account.id&quot;), nullable=False), Column(&quot;email_address&quot;, String, nullable=False), ) metadata_obj.create_all(engine) # %% from sqlalchemy import insert stmt = insert(user_table).\ values(name='spongebob', fullname=&quot;Spongebob Squarepants&quot;) # %% from sqlalchemy import select, bindparam scalar_subq = ( select(user_table.c.id) .where(user_table.c.name == bindparam(&quot;username&quot;)) .scalar_subquery() ) with engine.connect() as conn: result = conn.execute( insert(address_table).values(user_id=scalar_subq), [ {&quot;username&quot;: &quot;spongebob&quot;, &quot;email_address&quot;: &quot;[email protected]&quot;}, {&quot;username&quot;: &quot;sandy&quot;, &quot;email_address&quot;: &quot;[email protected]&quot;}, {&quot;username&quot;: &quot;sandy&quot;, &quot;email_address&quot;: &quot;[email protected]&quot;}, ], ) conn.commit() # %% stmt = select(User).where(User.name == 'spongebob') with Session(engine) as session: for row in session.execute(stmt): print(row) # %% class User(Base): __table__ = user_table addresses = relationship(&quot;Address&quot;, back_populates=&quot;user&quot;) def __repr__(self): return f&quot;User({self.name!r}, {self.fullname!r})&quot; class Address(Base): __table__ = address_table user = relationship(&quot;User&quot;, back_populates=&quot;addresses&quot;) def __repr__(self): return f&quot;Address({self.email_address!r})&quot; # %% stmt = select(User).where(User.name == 'spongebob') with Session(engine) as session: for row in session.execute(stmt): print(row)"><pre class="notranslate"><span class="pl-c"># %%</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">registry</span> <span class="pl-s1">mapper_registry</span> <span class="pl-c1">=</span> <span class="pl-en">registry</span>() <span class="pl-v">Base</span> <span class="pl-c1">=</span> <span class="pl-s1">mapper_registry</span>.<span class="pl-en">generate_base</span>() <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">select</span> <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-v">Table</span>, <span class="pl-v">Column</span>, <span class="pl-v">Integer</span>, <span class="pl-v">String</span> <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-v">ForeignKey</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">relationship</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-v">Session</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-s1">engine</span> <span class="pl-c1">=</span> <span class="pl-en">create_engine</span>(<span class="pl-s">"sqlite+pysqlite:///:memory:"</span>, <span class="pl-s1">echo</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">future</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-k">class</span> <span class="pl-v">User</span>(<span class="pl-v">Base</span>): <span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">"user_account"</span> <span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">String</span>(<span class="pl-c1">30</span>)) <span class="pl-s1">fullname</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">String</span>) <span class="pl-s1">addresses</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(<span class="pl-s">"Address"</span>, <span class="pl-s1">back_populates</span><span class="pl-c1">=</span><span class="pl-s">"user"</span>) <span class="pl-k">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>): <span class="pl-k">return</span> ( <span class="pl-s">f"User(id=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">id</span>!r<span class="pl-kos">}</span></span>,"</span> <span class="pl-s">f" name=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">name</span>!r<span class="pl-kos">}</span></span>,"</span> <span class="pl-s">f" fullname=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">fullname</span>!r<span class="pl-kos">}</span></span>)"</span> ) <span class="pl-k">class</span> <span class="pl-v">Address</span>(<span class="pl-v">Base</span>): <span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">"address"</span> <span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-s1">email_address</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">String</span>, <span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-s1">user_id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-v">ForeignKey</span>(<span class="pl-s">"user_account.id"</span>)) <span class="pl-s1">user</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(<span class="pl-s">"User"</span>, <span class="pl-s1">back_populates</span><span class="pl-c1">=</span><span class="pl-s">"addresses"</span>) <span class="pl-k">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>): <span class="pl-k">return</span> <span class="pl-s">f"Address(id=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">id</span>!r<span class="pl-kos">}</span></span>,"</span> <span class="pl-s">f" email_address="</span> <span class="pl-s">f"<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">email_address</span>!r<span class="pl-kos">}</span></span>)"</span> <span class="pl-c"># %%</span> <span class="pl-s1">mapper_registry</span>.<span class="pl-s1">metadata</span>.<span class="pl-en">create_all</span>(<span class="pl-s1">engine</span>) <span class="pl-c"># %%</span> <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-v">MetaData</span> <span class="pl-s1">metadata_obj</span> <span class="pl-c1">=</span> <span class="pl-v">MetaData</span>() <span class="pl-s1">user_table</span> <span class="pl-c1">=</span> <span class="pl-v">Table</span>( <span class="pl-s">"user_account"</span>, <span class="pl-s1">metadata_obj</span>, <span class="pl-v">Column</span>(<span class="pl-s">"id"</span>, <span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>), <span class="pl-v">Column</span>(<span class="pl-s">"name"</span>, <span class="pl-v">String</span>(<span class="pl-c1">30</span>)), <span class="pl-v">Column</span>(<span class="pl-s">"fullname"</span>, <span class="pl-v">String</span>), ) <span class="pl-s1">address_table</span> <span class="pl-c1">=</span> <span class="pl-v">Table</span>( <span class="pl-s">"address"</span>, <span class="pl-s1">metadata_obj</span>, <span class="pl-v">Column</span>(<span class="pl-s">"id"</span>, <span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>), <span class="pl-v">Column</span>(<span class="pl-s">"user_id"</span>, <span class="pl-v">ForeignKey</span>(<span class="pl-s">"user_account.id"</span>), <span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">False</span>), <span class="pl-v">Column</span>(<span class="pl-s">"email_address"</span>, <span class="pl-v">String</span>, <span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">False</span>), ) <span class="pl-s1">metadata_obj</span>.<span class="pl-en">create_all</span>(<span class="pl-s1">engine</span>) <span class="pl-c"># %%</span> <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">insert</span> <span class="pl-s1">stmt</span> <span class="pl-c1">=</span> <span class="pl-en">insert</span>(<span class="pl-s1">user_table</span>).\ <span class="pl-en">values</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'spongebob'</span>, <span class="pl-s1">fullname</span><span class="pl-c1">=</span><span class="pl-s">"Spongebob Squarepants"</span>) <span class="pl-c"># %%</span> <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">select</span>, <span class="pl-s1">bindparam</span> <span class="pl-s1">scalar_subq</span> <span class="pl-c1">=</span> ( <span class="pl-en">select</span>(<span class="pl-s1">user_table</span>.<span class="pl-s1">c</span>.<span class="pl-s1">id</span>) .<span class="pl-en">where</span>(<span class="pl-s1">user_table</span>.<span class="pl-s1">c</span>.<span class="pl-s1">name</span> <span class="pl-c1">==</span> <span class="pl-en">bindparam</span>(<span class="pl-s">"username"</span>)) .<span class="pl-en">scalar_subquery</span>() ) <span class="pl-k">with</span> <span class="pl-s1">engine</span>.<span class="pl-en">connect</span>() <span class="pl-k">as</span> <span class="pl-s1">conn</span>: <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">conn</span>.<span class="pl-en">execute</span>( <span class="pl-en">insert</span>(<span class="pl-s1">address_table</span>).<span class="pl-en">values</span>(<span class="pl-s1">user_id</span><span class="pl-c1">=</span><span class="pl-s1">scalar_subq</span>), [ {<span class="pl-s">"username"</span>: <span class="pl-s">"spongebob"</span>, <span class="pl-s">"email_address"</span>: <span class="pl-s">"[email protected]"</span>}, {<span class="pl-s">"username"</span>: <span class="pl-s">"sandy"</span>, <span class="pl-s">"email_address"</span>: <span class="pl-s">"[email protected]"</span>}, {<span class="pl-s">"username"</span>: <span class="pl-s">"sandy"</span>, <span class="pl-s">"email_address"</span>: <span class="pl-s">"[email protected]"</span>}, ], ) <span class="pl-s1">conn</span>.<span class="pl-en">commit</span>() <span class="pl-c"># %%</span> <span class="pl-s1">stmt</span> <span class="pl-c1">=</span> <span class="pl-en">select</span>(<span class="pl-v">User</span>).<span class="pl-en">where</span>(<span class="pl-v">User</span>.<span class="pl-s1">name</span> <span class="pl-c1">==</span> <span class="pl-s">'spongebob'</span>) <span class="pl-k">with</span> <span class="pl-v">Session</span>(<span class="pl-s1">engine</span>) <span class="pl-k">as</span> <span class="pl-s1">session</span>: <span class="pl-k">for</span> <span class="pl-s1">row</span> <span class="pl-c1">in</span> <span class="pl-s1">session</span>.<span class="pl-en">execute</span>(<span class="pl-s1">stmt</span>): <span class="pl-en">print</span>(<span class="pl-s1">row</span>) <span class="pl-c"># %%</span> <span class="pl-k">class</span> <span class="pl-v">User</span>(<span class="pl-v">Base</span>): <span class="pl-s1">__table__</span> <span class="pl-c1">=</span> <span class="pl-s1">user_table</span> <span class="pl-s1">addresses</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(<span class="pl-s">"Address"</span>, <span class="pl-s1">back_populates</span><span class="pl-c1">=</span><span class="pl-s">"user"</span>) <span class="pl-k">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>): <span class="pl-k">return</span> <span class="pl-s">f"User(<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">name</span>!r<span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">fullname</span>!r<span class="pl-kos">}</span></span>)"</span> <span class="pl-k">class</span> <span class="pl-v">Address</span>(<span class="pl-v">Base</span>): <span class="pl-s1">__table__</span> <span class="pl-c1">=</span> <span class="pl-s1">address_table</span> <span class="pl-s1">user</span> <span class="pl-c1">=</span> <span class="pl-en">relationship</span>(<span class="pl-s">"User"</span>, <span class="pl-s1">back_populates</span><span class="pl-c1">=</span><span class="pl-s">"addresses"</span>) <span class="pl-k">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>): <span class="pl-k">return</span> <span class="pl-s">f"Address(<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">email_address</span>!r<span class="pl-kos">}</span></span>)"</span> <span class="pl-c"># %%</span> <span class="pl-s1">stmt</span> <span class="pl-c1">=</span> <span class="pl-en">select</span>(<span class="pl-v">User</span>).<span class="pl-en">where</span>(<span class="pl-v">User</span>.<span class="pl-s1">name</span> <span class="pl-c1">==</span> <span class="pl-s">'spongebob'</span>) <span class="pl-k">with</span> <span class="pl-v">Session</span>(<span class="pl-s1">engine</span>) <span class="pl-k">as</span> <span class="pl-s1">session</span>: <span class="pl-k">for</span> <span class="pl-s1">row</span> <span class="pl-c1">in</span> <span class="pl-s1">session</span>.<span class="pl-en">execute</span>(<span class="pl-s1">stmt</span>): <span class="pl-en">print</span>(<span class="pl-s1">row</span>)</pre></div> <h3 dir="auto">Error</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- InvalidRequestError Traceback (most recent call last) c:\Users\18463\Documents\GitHub\learn-orm\bug-report.ipynb Cell 9' in &lt;cell line: 2&gt;() 1 stmt = select(User).where(User.name == 'spongebob') 2 with Session(engine) as session: ----&gt; 3 for row in session.execute(stmt): 4 print(row) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\session.py:1692, in Session.execute(self, statement, params, execution_options, bind_arguments, _parent_execute_state, _add_event, **kw) 1690 else: 1691 conn = self._connection_for_bind(bind) -&gt; 1692 result = conn._execute_20(statement, params or {}, execution_options) 1694 if compile_state_cls: 1695 result = compile_state_cls.orm_setup_cursor_result( 1696 self, 1697 statement, (...) 1701 result, 1702 ) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\engine\base.py:1620, in Connection._execute_20(self, statement, parameters, execution_options) 1616 util.raise_( 1617 exc.ObjectNotExecutableError(statement), replace_context=err 1618 ) 1619 else: -&gt; 1620 return meth(self, args_10style, kwargs_10style, execution_options) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\elements.py:325, in ClauseElement._execute_on_connection(self, connection, multiparams, params, execution_options, _force) 321 def _execute_on_connection( 322 self, connection, multiparams, params, execution_options, _force=False 323 ): 324 if _force or self.supports_execution: --&gt; 325 return connection._execute_clauseelement( 326 self, multiparams, params, execution_options 327 ) 328 else: 329 raise exc.ObjectNotExecutableError(self) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\engine\base.py:1479, in Connection._execute_clauseelement(self, elem, multiparams, params, execution_options) 1471 schema_translate_map = execution_options.get( 1472 &quot;schema_translate_map&quot;, None 1473 ) 1475 compiled_cache = execution_options.get( 1476 &quot;compiled_cache&quot;, self.engine._compiled_cache 1477 ) -&gt; 1479 compiled_sql, extracted_params, cache_hit = elem._compile_w_cache( 1480 dialect=dialect, 1481 compiled_cache=compiled_cache, 1482 column_keys=keys, 1483 for_executemany=for_executemany, 1484 schema_translate_map=schema_translate_map, 1485 linting=self.dialect.compiler_linting | compiler.WARN_LINTING, 1486 ) 1487 ret = self._execute_context( 1488 dialect, 1489 dialect.execution_ctx_cls._init_compiled, (...) 1497 cache_hit=cache_hit, 1498 ) 1499 if has_events: File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\elements.py:523, in ClauseElement._compile_w_cache(self, dialect, compiled_cache, column_keys, for_executemany, schema_translate_map, **kw) 521 if compiled_sql is None: 522 cache_hit = dialect.CACHE_MISS --&gt; 523 compiled_sql = self._compiler( 524 dialect, 525 cache_key=elem_cache_key, 526 column_keys=column_keys, 527 for_executemany=for_executemany, 528 schema_translate_map=schema_translate_map, 529 **kw 530 ) 531 compiled_cache[key] = compiled_sql 532 else: File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\elements.py:558, in ClauseElement._compiler(self, dialect, **kw) 554 def _compiler(self, dialect, **kw): 555 &quot;&quot;&quot;Return a compiler appropriate for this ClauseElement, given a 556 Dialect.&quot;&quot;&quot; --&gt; 558 return dialect.statement_compiler(dialect, self, **kw) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\compiler.py:776, in SQLCompiler.__init__(self, dialect, statement, cache_key, column_keys, for_executemany, linting, **kwargs) 772 # a map which tracks &quot;truncated&quot; names based on 773 # dialect.label_length or dialect.max_identifier_length 774 self.truncated_names = {} --&gt; 776 Compiled.__init__(self, dialect, statement, **kwargs) 778 if self.isinsert or self.isupdate or self.isdelete: 779 if statement._returning: File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\compiler.py:451, in Compiled.__init__(self, dialect, statement, schema_translate_map, render_schema_translate, compile_kwargs) 449 if self.can_execute: 450 self.execution_options = statement._execution_options --&gt; 451 self.string = self.process(self.statement, **compile_kwargs) 453 if render_schema_translate: 454 self.string = self.preparer._render_schema_translates( 455 self.string, schema_translate_map 456 ) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\compiler.py:486, in Compiled.process(self, obj, **kwargs) 485 def process(self, obj, **kwargs): --&gt; 486 return obj._compiler_dispatch(self, **kwargs) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\visitors.py:82, in _generate_compiler_dispatch.&lt;locals&gt;._compiler_dispatch(self, visitor, **kw) 79 return visitor.visit_unsupported_compilation(self, err, **kw) 81 else: ---&gt; 82 return meth(self, **kw) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\compiler.py:3261, in SQLCompiler.visit_select(self, select_stmt, asfrom, insert_into, fromhints, compound_index, select_wraps_for, lateral, from_linter, **kwargs) 3253 # initial setup of SELECT. the compile_state_factory may now 3254 # be creating a totally different SELECT from the one that was 3255 # passed in. for ORM use this will convert from an ORM-state 3256 # SELECT to a regular &quot;Core&quot; SELECT. other composed operations 3257 # such as computation of joins will be performed. 3259 kwargs[&quot;within_columns_clause&quot;] = False -&gt; 3261 compile_state = select_stmt._compile_state_factory( 3262 select_stmt, self, **kwargs 3263 ) 3264 select_stmt = compile_state.statement 3266 toplevel = not self.stack File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\sql\base.py:510, in CompileState.create_for_statement(cls, statement, compiler, **kw) 508 return cls(statement, compiler, **kw) 509 else: --&gt; 510 return klass.create_for_statement(statement, compiler, **kw) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\context.py:696, in ORMSelectCompileState.create_for_statement(cls, statement, compiler, **kw) 683 if select_statement._memoized_select_entities: 684 self._memoized_entities = { 685 memoized_entities: _QueryEntity.to_compile_state( 686 self, (...) 693 ) 694 } --&gt; 696 _QueryEntity.to_compile_state( 697 self, 698 select_statement._raw_columns, 699 self._entities, 700 is_current_entities=True, 701 ) 703 self.current_path = select_statement._compile_options._current_path 705 self.eager_order_by = () File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\context.py:2432, in _QueryEntity.to_compile_state(cls, compile_state, entities, entities_collection, is_current_entities) 2430 if entity.is_selectable: 2431 if &quot;parententity&quot; in entity._annotations: -&gt; 2432 _MapperEntity( 2433 compile_state, 2434 entity, 2435 entities_collection, 2436 is_current_entities, 2437 ) 2438 else: 2439 _ColumnEntity._for_columns( 2440 compile_state, 2441 entity._select_iterable, 2442 entities_collection, 2443 idx, 2444 ) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\context.py:2496, in _MapperEntity.__init__(self, compile_state, entity, entities_collection, is_current_entities) 2493 compile_state._has_orm_entities = True 2495 entity = entity._annotations[&quot;parententity&quot;] -&gt; 2496 entity._post_inspect 2497 ext_info = self.entity_zero = entity 2498 entity = ext_info.entity File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\util\langhelpers.py:1180, in HasMemoized.memoized_attribute.__get__(self, obj, cls) 1178 if obj is None: 1179 return self -&gt; 1180 obj.__dict__[self.__name__] = result = self.fget(obj) 1181 obj._memoized_keys |= {self.__name__} 1182 return result File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\mapper.py:2123, in Mapper._post_inspect(self) 2112 @HasMemoized.memoized_attribute 2113 def _post_inspect(self): 2114 &quot;&quot;&quot;This hook is invoked by attribute inspection. 2115 2116 E.g. when Query calls: (...) 2121 2122 &quot;&quot;&quot; -&gt; 2123 self._check_configure() File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\mapper.py:1900, in Mapper._check_configure(self) 1898 def _check_configure(self): 1899 if self.registry._new_mappers: -&gt; 1900 _configure_registries({self.registry}, cascade=True) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\mapper.py:3418, in _configure_registries(registries, cascade) 3412 Mapper.dispatch._for_class(Mapper).before_configured() 3413 # initialize properties on all mappers 3414 # note that _mapper_registry is unordered, which 3415 # may randomly conceal/reveal issues related to 3416 # the order of mapper compilation -&gt; 3418 _do_configure_registries(registries, cascade) 3419 finally: 3420 _already_compiling = False File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\mapper.py:3457, in _do_configure_registries(registries, cascade) 3455 if not mapper.configured: 3456 try: -&gt; 3457 mapper._post_configure_properties() 3458 mapper._expire_memoizations() 3459 mapper.dispatch.mapper_configured(mapper, mapper.class_) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\mapper.py:1917, in Mapper._post_configure_properties(self) 1914 self._log(&quot;initialize prop %s&quot;, key) 1916 if prop.parent is self and not prop._configure_started: -&gt; 1917 prop.init() 1919 if prop._configure_finished: 1920 prop.post_instrument_class(self) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\interfaces.py:231, in MapperProperty.init(self) 224 &quot;&quot;&quot;Called after all mappers are created to assemble 225 relationships between mappers and perform other post-mapper-creation 226 initialization steps. 227 228 229 &quot;&quot;&quot; 230 self._configure_started = True --&gt; 231 self.do_init() 232 self._configure_finished = True File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\relationships.py:2150, in RelationshipProperty.do_init(self) 2148 def do_init(self): 2149 self._check_conflicts() -&gt; 2150 self._process_dependent_arguments() 2151 self._setup_registry_dependencies() 2152 self._setup_join_conditions() File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\relationships.py:2245, in RelationshipProperty._process_dependent_arguments(self) 2231 self._user_defined_foreign_keys = util.column_set( 2232 coercions.expect( 2233 roles.ColumnArgumentRole, x, argname=&quot;foreign_keys&quot; 2234 ) 2235 for x in util.to_column_set(self._user_defined_foreign_keys) 2236 ) 2238 self.remote_side = util.column_set( 2239 coercions.expect( 2240 roles.ColumnArgumentRole, x, argname=&quot;remote_side&quot; 2241 ) 2242 for x in util.to_column_set(self.remote_side) 2243 ) -&gt; 2245 self.target = self.entity.persist_selectable File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\util\langhelpers.py:1113, in memoized_property.__get__(self, obj, cls) 1111 if obj is None: 1112 return self -&gt; 1113 obj.__dict__[self.__name__] = result = self.fget(obj) 1114 return result File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\relationships.py:2112, in RelationshipProperty.entity(self) 2109 mapperlib = util.preloaded.orm_mapper 2111 if isinstance(self.argument, util.string_types): -&gt; 2112 argument = self._clsregistry_resolve_name(self.argument)() 2114 elif callable(self.argument) and not isinstance( 2115 self.argument, (type, mapperlib.Mapper) 2116 ): 2117 argument = self.argument() File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\clsregistry.py:393, in _class_resolver._resolve_name(self) 391 for token in name.split(&quot;.&quot;): 392 if rval is None: --&gt; 393 rval = d[token] 394 else: 395 rval = getattr(rval, token) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\util\_collections.py:746, in PopulateDict.__missing__(self, key) 745 def __missing__(self, key): --&gt; 746 self[key] = val = self.creator(key) 747 return val File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\clsregistry.py:352, in _class_resolver._access_cls(self, key) 349 return _GetTable(key, cls.metadata) 351 if key in decl_class_registry: --&gt; 352 return _determine_container(key, decl_class_registry[key]) 354 if not self.favor_tables: 355 if key in metadata.tables: File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\clsregistry.py:313, in _determine_container(key, value) 311 def _determine_container(key, value): 312 if isinstance(value, _MultipleClassMarker): --&gt; 313 value = value.attempt_get([], key) 314 return _GetColumns(value) File C:\ProgramData\scoop\apps\python\3.10.4\lib\site-packages\sqlalchemy\orm\clsregistry.py:144, in _MultipleClassMarker.attempt_get(self, path, key) 142 def attempt_get(self, path, key): 143 if len(self.contents) &gt; 1: --&gt; 144 raise exc.InvalidRequestError( 145 'Multiple classes found for path &quot;%s&quot; ' 146 &quot;in the registry of this declarative &quot; 147 &quot;base. Please use a fully module-qualified path.&quot; 148 % (&quot;.&quot;.join(path + [key])) 149 ) 150 else: 151 ref = list(self.contents)[0] InvalidRequestError: Multiple classes found for path &quot;Address&quot; in the registry of this declarative base. Please use a fully module-qualified path."><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">InvalidRequestError</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-s1">c</span>:\U<span class="pl-s1">sers</span>\1<span class="pl-c1">8463</span>\D<span class="pl-s1">ocuments</span>\G<span class="pl-s1">itHub</span>\l<span class="pl-s1">earn</span><span class="pl-c1">-</span><span class="pl-s1">orm</span>\b<span class="pl-s1">ug</span><span class="pl-c1">-</span><span class="pl-s1">report</span>.<span class="pl-s1">ipynb</span> <span class="pl-v">Cell</span> <span class="pl-c1">9</span>' <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">cell</span> <span class="pl-s1">line</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>() <span class="pl-c1">1</span> <span class="pl-s1">stmt</span> <span class="pl-c1">=</span> <span class="pl-en">select</span>(<span class="pl-v">User</span>).<span class="pl-en">where</span>(<span class="pl-v">User</span>.<span class="pl-s1">name</span> <span class="pl-c1">==</span> <span class="pl-s">'spongebob'</span>) <span class="pl-c1">2</span> <span class="pl-k">with</span> <span class="pl-v">Session</span>(<span class="pl-s1">engine</span>) <span class="pl-k">as</span> <span class="pl-s1">session</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">3</span> <span class="pl-s1">for</span> <span class="pl-s1">row</span> <span class="pl-c1">in</span> <span class="pl-s1">session</span>.<span class="pl-en">execute</span>(<span class="pl-s1">stmt</span>): <span class="pl-c1">4</span> <span class="pl-en">print</span>(<span class="pl-s1">row</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\s<span class="pl-s1">ession</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1692</span>, <span class="pl-c1">in</span> <span class="pl-v">Session</span>.<span class="pl-en">execute</span>(<span class="pl-s1">self</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">params</span>, <span class="pl-s1">execution_options</span>, <span class="pl-s1">bind_arguments</span>, <span class="pl-s1">_parent_execute_state</span>, <span class="pl-s1">_add_event</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-c1">1690</span> <span class="pl-s1">else</span>: <span class="pl-c1">1691</span> <span class="pl-s1">conn</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_connection_for_bind</span>(<span class="pl-s1">bind</span>) <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1692</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">conn</span>.<span class="pl-en">_execute_20</span>(<span class="pl-s1">statement</span>, <span class="pl-s1">params</span> <span class="pl-c1">or</span> {}, <span class="pl-s1">execution_options</span>) <span class="pl-c1">1694</span> <span class="pl-k">if</span> <span class="pl-s1">compile_state_cls</span>: <span class="pl-c1">1695</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">compile_state_cls</span>.<span class="pl-en">orm_setup_cursor_result</span>( <span class="pl-c1">1696</span> <span class="pl-s1">self</span>, <span class="pl-c1">1697</span> <span class="pl-s1">statement</span>, (...) <span class="pl-c1">1701</span> <span class="pl-s1">result</span>, <span class="pl-c1">1702</span> ) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\e<span class="pl-s1">ngine</span>\b<span class="pl-s1">ase</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1620</span>, <span class="pl-c1">in</span> <span class="pl-v">Connection</span>.<span class="pl-en">_execute_20</span>(<span class="pl-s1">self</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">parameters</span>, <span class="pl-s1">execution_options</span>) <span class="pl-c1">1616</span> <span class="pl-s1">util</span>.<span class="pl-en">raise_</span>( <span class="pl-c1">1617</span> <span class="pl-s1">exc</span>.<span class="pl-v">ObjectNotExecutableError</span>(<span class="pl-s1">statement</span>), <span class="pl-s1">replace_context</span><span class="pl-c1">=</span><span class="pl-s1">err</span> <span class="pl-c1">1618</span> ) <span class="pl-c1">1619</span> <span class="pl-k">else</span>: <span class="pl-c1">-&gt;</span> <span class="pl-c1">1620</span> <span class="pl-s1">return</span> <span class="pl-en">meth</span>(<span class="pl-s1">self</span>, <span class="pl-s1">args_10style</span>, <span class="pl-s1">kwargs_10style</span>, <span class="pl-s1">execution_options</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\e<span class="pl-s1">lements</span>.<span class="pl-s1">py</span>:<span class="pl-c1">325</span>, <span class="pl-c1">in</span> <span class="pl-v">ClauseElement</span>.<span class="pl-en">_execute_on_connection</span>(<span class="pl-s1">self</span>, <span class="pl-s1">connection</span>, <span class="pl-s1">multiparams</span>, <span class="pl-s1">params</span>, <span class="pl-s1">execution_options</span>, <span class="pl-s1">_force</span>) <span class="pl-c1">321</span> <span class="pl-s1">def</span> <span class="pl-en">_execute_on_connection</span>( <span class="pl-c1">322</span> <span class="pl-s1">self</span>, <span class="pl-s1">connection</span>, <span class="pl-s1">multiparams</span>, <span class="pl-s1">params</span>, <span class="pl-s1">execution_options</span>, <span class="pl-s1">_force</span><span class="pl-c1">=</span><span class="pl-c1">False</span> <span class="pl-c1">323</span> ): <span class="pl-c1">324</span> <span class="pl-k">if</span> <span class="pl-s1">_force</span> <span class="pl-c1">or</span> <span class="pl-s1">self</span>.<span class="pl-s1">supports_execution</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">325</span> <span class="pl-s1">return</span> <span class="pl-s1">connection</span>.<span class="pl-en">_execute_clauseelement</span>( <span class="pl-c1">326</span> <span class="pl-s1">self</span>, <span class="pl-s1">multiparams</span>, <span class="pl-s1">params</span>, <span class="pl-s1">execution_options</span> <span class="pl-c1">327</span> ) <span class="pl-c1">328</span> <span class="pl-k">else</span>: <span class="pl-c1">329</span> <span class="pl-s1">raise</span> <span class="pl-s1">exc</span>.<span class="pl-v">ObjectNotExecutableError</span>(<span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\e<span class="pl-s1">ngine</span>\b<span class="pl-s1">ase</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1479</span>, <span class="pl-c1">in</span> <span class="pl-v">Connection</span>.<span class="pl-en">_execute_clauseelement</span>(<span class="pl-s1">self</span>, <span class="pl-s1">elem</span>, <span class="pl-s1">multiparams</span>, <span class="pl-s1">params</span>, <span class="pl-s1">execution_options</span>) <span class="pl-c1">1471</span> <span class="pl-s1">schema_translate_map</span> <span class="pl-c1">=</span> <span class="pl-s1">execution_options</span>.<span class="pl-en">get</span>( <span class="pl-c1">1472</span> <span class="pl-s">"schema_translate_map"</span>, <span class="pl-c1">None</span> <span class="pl-c1">1473</span> ) <span class="pl-c1">1475</span> <span class="pl-s1">compiled_cache</span> <span class="pl-c1">=</span> <span class="pl-s1">execution_options</span>.<span class="pl-en">get</span>( <span class="pl-c1">1476</span> <span class="pl-s">"compiled_cache"</span>, <span class="pl-s1">self</span>.<span class="pl-s1">engine</span>.<span class="pl-s1">_compiled_cache</span> <span class="pl-c1">1477</span> ) <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1479</span> <span class="pl-s1">compiled_sql</span>, <span class="pl-s1">extracted_params</span>, <span class="pl-s1">cache_hit</span> <span class="pl-c1">=</span> <span class="pl-s1">elem</span>.<span class="pl-en">_compile_w_cache</span>( <span class="pl-c1">1480</span> <span class="pl-s1">dialect</span><span class="pl-c1">=</span><span class="pl-s1">dialect</span>, <span class="pl-c1">1481</span> <span class="pl-s1">compiled_cache</span><span class="pl-c1">=</span><span class="pl-s1">compiled_cache</span>, <span class="pl-c1">1482</span> <span class="pl-s1">column_keys</span><span class="pl-c1">=</span><span class="pl-s1">keys</span>, <span class="pl-c1">1483</span> <span class="pl-s1">for_executemany</span><span class="pl-c1">=</span><span class="pl-s1">for_executemany</span>, <span class="pl-c1">1484</span> <span class="pl-s1">schema_translate_map</span><span class="pl-c1">=</span><span class="pl-s1">schema_translate_map</span>, <span class="pl-c1">1485</span> <span class="pl-s1">linting</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">dialect</span>.<span class="pl-s1">compiler_linting</span> <span class="pl-c1">|</span> <span class="pl-s1">compiler</span>.<span class="pl-v">WARN_LINTING</span>, <span class="pl-c1">1486</span> ) <span class="pl-c1">1487</span> <span class="pl-s1">ret</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_execute_context</span>( <span class="pl-c1">1488</span> <span class="pl-s1">dialect</span>, <span class="pl-c1">1489</span> <span class="pl-s1">dialect</span>.<span class="pl-s1">execution_ctx_cls</span>.<span class="pl-s1">_init_compiled</span>, (...) <span class="pl-c1">1497</span> <span class="pl-s1">cache_hit</span><span class="pl-c1">=</span><span class="pl-s1">cache_hit</span>, <span class="pl-c1">1498</span> ) <span class="pl-c1">1499</span> <span class="pl-k">if</span> <span class="pl-s1">has_events</span>: <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\e<span class="pl-s1">lements</span>.<span class="pl-s1">py</span>:<span class="pl-c1">523</span>, <span class="pl-c1">in</span> <span class="pl-v">ClauseElement</span>.<span class="pl-en">_compile_w_cache</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-s1">compiled_cache</span>, <span class="pl-s1">column_keys</span>, <span class="pl-s1">for_executemany</span>, <span class="pl-s1">schema_translate_map</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-c1">521</span> <span class="pl-k">if</span> <span class="pl-s1">compiled_sql</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>: <span class="pl-c1">522</span> <span class="pl-s1">cache_hit</span> <span class="pl-c1">=</span> <span class="pl-s1">dialect</span>.<span class="pl-v">CACHE_MISS</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">523</span> <span class="pl-s1">compiled_sql</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_compiler</span>( <span class="pl-c1">524</span> <span class="pl-s1">dialect</span>, <span class="pl-c1">525</span> <span class="pl-s1">cache_key</span><span class="pl-c1">=</span><span class="pl-s1">elem_cache_key</span>, <span class="pl-c1">526</span> <span class="pl-s1">column_keys</span><span class="pl-c1">=</span><span class="pl-s1">column_keys</span>, <span class="pl-c1">527</span> <span class="pl-s1">for_executemany</span><span class="pl-c1">=</span><span class="pl-s1">for_executemany</span>, <span class="pl-c1">528</span> <span class="pl-s1">schema_translate_map</span><span class="pl-c1">=</span><span class="pl-s1">schema_translate_map</span>, <span class="pl-c1">529</span> <span class="pl-c1">**</span><span class="pl-s1">kw</span> <span class="pl-c1">530</span> ) <span class="pl-c1">531</span> <span class="pl-s1">compiled_cache</span>[<span class="pl-s1">key</span>] <span class="pl-c1">=</span> <span class="pl-s1">compiled_sql</span> <span class="pl-c1">532</span> <span class="pl-k">else</span>: <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\e<span class="pl-s1">lements</span>.<span class="pl-s1">py</span>:<span class="pl-c1">558</span>, <span class="pl-c1">in</span> <span class="pl-v">ClauseElement</span>.<span class="pl-en">_compiler</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-c1">554</span> <span class="pl-s1">def</span> <span class="pl-en">_compiler</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>): <span class="pl-c1">555</span> <span class="pl-s">"""Return a compiler appropriate for this ClauseElement, given a</span> <span class="pl-s"> 556 Dialect."""</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">558</span> <span class="pl-s1">return</span> <span class="pl-s1">dialect</span>.<span class="pl-en">statement_compiler</span>(<span class="pl-s1">dialect</span>, <span class="pl-s1">self</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\c<span class="pl-s1">ompiler</span>.<span class="pl-s1">py</span>:<span class="pl-c1">776</span>, <span class="pl-c1">in</span> <span class="pl-v">SQLCompiler</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">cache_key</span>, <span class="pl-s1">column_keys</span>, <span class="pl-s1">for_executemany</span>, <span class="pl-s1">linting</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">772</span> <span class="pl-c"># a map which tracks "truncated" names based on</span> <span class="pl-c1">773</span> <span class="pl-c"># dialect.label_length or dialect.max_identifier_length</span> <span class="pl-c1">774</span> <span class="pl-s1">self</span>.<span class="pl-s1">truncated_names</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">776</span> <span class="pl-v">Compiled</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-s1">statement</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">778</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">isinsert</span> <span class="pl-c1">or</span> <span class="pl-s1">self</span>.<span class="pl-s1">isupdate</span> <span class="pl-c1">or</span> <span class="pl-s1">self</span>.<span class="pl-s1">isdelete</span>: <span class="pl-c1">779</span> <span class="pl-k">if</span> <span class="pl-s1">statement</span>.<span class="pl-s1">_returning</span>: <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\c<span class="pl-s1">ompiler</span>.<span class="pl-s1">py</span>:<span class="pl-c1">451</span>, <span class="pl-c1">in</span> <span class="pl-v">Compiled</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">dialect</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">schema_translate_map</span>, <span class="pl-s1">render_schema_translate</span>, <span class="pl-s1">compile_kwargs</span>) <span class="pl-c1">449</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">can_execute</span>: <span class="pl-c1">450</span> <span class="pl-s1">self</span>.<span class="pl-s1">execution_options</span> <span class="pl-c1">=</span> <span class="pl-s1">statement</span>.<span class="pl-s1">_execution_options</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">451</span> <span class="pl-s1">self</span>.<span class="pl-s1">string</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">process</span>(<span class="pl-s1">self</span>.<span class="pl-s1">statement</span>, <span class="pl-c1">**</span><span class="pl-s1">compile_kwargs</span>) <span class="pl-c1">453</span> <span class="pl-k">if</span> <span class="pl-s1">render_schema_translate</span>: <span class="pl-c1">454</span> <span class="pl-s1">self</span>.<span class="pl-s1">string</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">preparer</span>.<span class="pl-en">_render_schema_translates</span>( <span class="pl-c1">455</span> <span class="pl-s1">self</span>.<span class="pl-s1">string</span>, <span class="pl-s1">schema_translate_map</span> <span class="pl-c1">456</span> ) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\c<span class="pl-s1">ompiler</span>.<span class="pl-s1">py</span>:<span class="pl-c1">486</span>, <span class="pl-c1">in</span> <span class="pl-v">Compiled</span>.<span class="pl-en">process</span>(<span class="pl-s1">self</span>, <span class="pl-s1">obj</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">485</span> <span class="pl-k">def</span> <span class="pl-en">process</span>(<span class="pl-s1">self</span>, <span class="pl-s1">obj</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>): <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">486</span> <span class="pl-s1">return</span> <span class="pl-s1">obj</span>.<span class="pl-en">_compiler_dispatch</span>(<span class="pl-s1">self</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\v<span class="pl-s1">isitors</span>.<span class="pl-s1">py</span>:<span class="pl-c1">82</span>, <span class="pl-c1">in</span> <span class="pl-s1">_generate_compiler_dispatch</span>.<span class="pl-c1">&lt;</span><span class="pl-s1">locals</span><span class="pl-c1">&gt;</span>.<span class="pl-en">_compiler_dispatch</span>(<span class="pl-s1">self</span>, <span class="pl-s1">visitor</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-c1">79</span> <span class="pl-s1">return</span> <span class="pl-s1">visitor</span>.<span class="pl-en">visit_unsupported_compilation</span>(<span class="pl-s1">self</span>, <span class="pl-s1">err</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-c1">81</span> <span class="pl-k">else</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">82</span> <span class="pl-s1">return</span> <span class="pl-en">meth</span>(<span class="pl-s1">self</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span><span class="pl-c1">.4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\c<span class="pl-s1">ompiler</span>.<span class="pl-s1">py</span>:<span class="pl-c1">3261</span>, <span class="pl-c1">in</span> <span class="pl-v">SQLCompiler</span>.<span class="pl-en">visit_select</span>(<span class="pl-s1">self</span>, <span class="pl-s1">select_stmt</span>, <span class="pl-s1">asfrom</span>, <span class="pl-s1">insert_into</span>, <span class="pl-s1">fromhints</span>, <span class="pl-s1">compound_index</span>, <span class="pl-s1">select_wraps_for</span>, <span class="pl-s1">lateral</span>, <span class="pl-s1">from_linter</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">3253</span> <span class="pl-c"># initial setup of SELECT. the compile_state_factory may now</span> <span class="pl-c1">3254</span> <span class="pl-c"># be creating a totally different SELECT from the one that was</span> <span class="pl-c1">3255</span> <span class="pl-c"># passed in. for ORM use this will convert from an ORM-state</span> <span class="pl-c1">3256</span> <span class="pl-c"># SELECT to a regular "Core" SELECT. other composed operations</span> <span class="pl-c1">3257</span> <span class="pl-c"># such as computation of joins will be performed.</span> <span class="pl-c1">3259</span> <span class="pl-s1">kwargs</span>[<span class="pl-s">"within_columns_clause"</span>] <span class="pl-c1">=</span> <span class="pl-c1">False</span> <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">3261</span> <span class="pl-s1">compile_state</span> <span class="pl-c1">=</span> <span class="pl-s1">select_stmt</span>.<span class="pl-en">_compile_state_factory</span>( <span class="pl-c1">3262</span> <span class="pl-s1">select_stmt</span>, <span class="pl-s1">self</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span> <span class="pl-c1">3263</span> ) <span class="pl-c1">3264</span> <span class="pl-s1">select_stmt</span> <span class="pl-c1">=</span> <span class="pl-s1">compile_state</span>.<span class="pl-s1">statement</span> <span class="pl-c1">3266</span> <span class="pl-s1">toplevel</span> <span class="pl-c1">=</span> <span class="pl-c1">not</span> <span class="pl-s1">self</span>.<span class="pl-s1">stack</span> <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\s<span class="pl-s1">ql</span>\b<span class="pl-s1">ase</span>.<span class="pl-s1">py</span>:<span class="pl-c1">510</span>, <span class="pl-c1">in</span> <span class="pl-v">CompileState</span>.<span class="pl-en">create_for_statement</span>(<span class="pl-s1">cls</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">compiler</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-c1">508</span> <span class="pl-s1">return</span> <span class="pl-en">cls</span>(<span class="pl-s1">statement</span>, <span class="pl-s1">compiler</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-c1">509</span> <span class="pl-k">else</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">510</span> <span class="pl-s1">return</span> <span class="pl-s1">klass</span>.<span class="pl-en">create_for_statement</span>(<span class="pl-s1">statement</span>, <span class="pl-s1">compiler</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span><span class="pl-c1">.4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">ontext</span>.<span class="pl-s1">py</span>:<span class="pl-c1">696</span>, <span class="pl-c1">in</span> <span class="pl-v">ORMSelectCompileState</span>.<span class="pl-s1">create_for_statement</span>(<span class="pl-s1">cls</span>, <span class="pl-s1">statement</span>, <span class="pl-s1">compiler</span>, <span class="pl-c1">**</span><span class="pl-s1">kw</span>) <span class="pl-c1">683</span> <span class="pl-k">if</span> <span class="pl-s1">select_statement</span>.<span class="pl-s1">_memoized_select_entities</span>: <span class="pl-c1">684</span> <span class="pl-s1">self</span>.<span class="pl-s1">_memoized_entities</span> <span class="pl-c1">=</span> { <span class="pl-c1">685</span> <span class="pl-s1">memoized_entities</span>: <span class="pl-s1">_QueryEntity</span>.<span class="pl-en">to_compile_state</span>( <span class="pl-c1">686</span> <span class="pl-s1">self</span>, (...) <span class="pl-c1">693</span> ) <span class="pl-c1">694</span> } <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">696</span> <span class="pl-s1">_QueryEntity</span>.<span class="pl-en">to_compile_state</span>( <span class="pl-c1">697</span> <span class="pl-s1">self</span>, <span class="pl-c1">698</span> <span class="pl-s1">select_statement</span>.<span class="pl-s1">_raw_columns</span>, <span class="pl-c1">699</span> <span class="pl-s1">self</span>.<span class="pl-s1">_entities</span>, <span class="pl-c1">700</span> <span class="pl-s1">is_current_entities</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-c1">701</span> ) <span class="pl-c1">703</span> <span class="pl-s1">self</span>.<span class="pl-s1">current_path</span> <span class="pl-c1">=</span> <span class="pl-s1">select_statement</span>.<span class="pl-s1">_compile_options</span>.<span class="pl-s1">_current_path</span> <span class="pl-c1">705</span> <span class="pl-s1">self</span>.<span class="pl-s1">eager_order_by</span> <span class="pl-c1">=</span> () <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">ontext</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2432</span>, <span class="pl-c1">in</span> <span class="pl-s1">_QueryEntity</span>.<span class="pl-en">to_compile_state</span>(<span class="pl-s1">cls</span>, <span class="pl-s1">compile_state</span>, <span class="pl-s1">entities</span>, <span class="pl-s1">entities_collection</span>, <span class="pl-s1">is_current_entities</span>) <span class="pl-c1">2430</span> <span class="pl-k">if</span> <span class="pl-s1">entity</span>.<span class="pl-s1">is_selectable</span>: <span class="pl-c1">2431</span> <span class="pl-k">if</span> <span class="pl-s">"parententity"</span> <span class="pl-c1">in</span> <span class="pl-s1">entity</span>.<span class="pl-s1">_annotations</span>: <span class="pl-c1">-&gt;</span> <span class="pl-c1">2432</span> <span class="pl-en">_MapperEntity</span>( <span class="pl-c1">2433</span> <span class="pl-s1">compile_state</span>, <span class="pl-c1">2434</span> <span class="pl-s1">entity</span>, <span class="pl-c1">2435</span> <span class="pl-s1">entities_collection</span>, <span class="pl-c1">2436</span> <span class="pl-s1">is_current_entities</span>, <span class="pl-c1">2437</span> ) <span class="pl-c1">2438</span> <span class="pl-k">else</span>: <span class="pl-c1">2439</span> <span class="pl-s1">_ColumnEntity</span>.<span class="pl-en">_for_columns</span>( <span class="pl-c1">2440</span> <span class="pl-s1">compile_state</span>, <span class="pl-c1">2441</span> <span class="pl-s1">entity</span>.<span class="pl-s1">_select_iterable</span>, <span class="pl-c1">2442</span> <span class="pl-s1">entities_collection</span>, <span class="pl-c1">2443</span> <span class="pl-s1">idx</span>, <span class="pl-c1">2444</span> ) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span><span class="pl-c1">.4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">ontext</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2496</span>, <span class="pl-c1">in</span> <span class="pl-s1">_MapperEntity</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">compile_state</span>, <span class="pl-s1">entity</span>, <span class="pl-s1">entities_collection</span>, <span class="pl-s1">is_current_entities</span>) <span class="pl-c1">2493</span> <span class="pl-s1">compile_state</span>.<span class="pl-s1">_has_orm_entities</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span> <span class="pl-c1">2495</span> <span class="pl-s1">entity</span> <span class="pl-c1">=</span> <span class="pl-s1">entity</span>.<span class="pl-s1">_annotations</span>[<span class="pl-s">"parententity"</span>] <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2496</span> <span class="pl-s1">entity</span>.<span class="pl-s1">_post_inspect</span> <span class="pl-c1">2497</span> <span class="pl-s1">ext_info</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">entity_zero</span> <span class="pl-c1">=</span> <span class="pl-s1">entity</span> <span class="pl-c1">2498</span> <span class="pl-s1">entity</span> <span class="pl-c1">=</span> <span class="pl-s1">ext_info</span>.<span class="pl-s1">entity</span> <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\u<span class="pl-s1">til</span>\l<span class="pl-s1">anghelpers</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1180</span>, <span class="pl-c1">in</span> <span class="pl-v">HasMemoized</span>.<span class="pl-s1">memoized_attribute</span>.<span class="pl-en">__get__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">obj</span>, <span class="pl-s1">cls</span>) <span class="pl-c1">1178</span> <span class="pl-k">if</span> <span class="pl-s1">obj</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>: <span class="pl-c1">1179</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span> <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1180</span> <span class="pl-s1">obj</span>.<span class="pl-s1">__dict__</span>[<span class="pl-s1">self</span>.<span class="pl-s1">__name__</span>] <span class="pl-c1">=</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">fget</span>(<span class="pl-s1">obj</span>) <span class="pl-c1">1181</span> <span class="pl-s1">obj</span>.<span class="pl-s1">_memoized_keys</span> |= {<span class="pl-s1">self</span>.<span class="pl-s1">__name__</span>} <span class="pl-c1">1182</span> <span class="pl-k">return</span> <span class="pl-s1">result</span> <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\m<span class="pl-s1">apper</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2123</span>, <span class="pl-c1">in</span> <span class="pl-v">Mapper</span>.<span class="pl-en">_post_inspect</span>(<span class="pl-s1">self</span>) <span class="pl-c1">2112</span> @<span class="pl-v">HasMemoized</span>.<span class="pl-en">memoized_attribute</span> <span class="pl-c1">2113</span> <span class="pl-k">def</span> <span class="pl-s1">_post_inspect</span>(<span class="pl-s1">self</span>): <span class="pl-c1">2114</span> <span class="pl-s">"""This hook is invoked by attribute inspection.</span> <span class="pl-s"> 2115 </span> <span class="pl-s"> 2116 E.g. when Query calls:</span> <span class="pl-s"> (...)</span> <span class="pl-s"> 2121 </span> <span class="pl-s"> 2122 """</span> <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2123</span> <span class="pl-s1">self</span>.<span class="pl-en">_check_configure</span>() <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\m<span class="pl-s1">apper</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1900</span>, <span class="pl-c1">in</span> <span class="pl-v">Mapper</span>.<span class="pl-en">_check_configure</span>(<span class="pl-s1">self</span>) <span class="pl-c1">1898</span> <span class="pl-k">def</span> <span class="pl-en">_check_configure</span>(<span class="pl-s1">self</span>): <span class="pl-c1">1899</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">registry</span>.<span class="pl-s1">_new_mappers</span>: <span class="pl-c1">-&gt;</span> <span class="pl-c1">1900</span> <span class="pl-en">_configure_registries</span>({<span class="pl-s1">self</span>.<span class="pl-s1">registry</span>}, <span class="pl-s1">cascade</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\m<span class="pl-s1">apper</span>.<span class="pl-s1">py</span>:<span class="pl-c1">3418</span>, <span class="pl-c1">in</span> <span class="pl-en">_configure_registries</span>(<span class="pl-s1">registries</span>, <span class="pl-s1">cascade</span>) <span class="pl-c1">3412</span> <span class="pl-v">Mapper</span>.<span class="pl-s1">dispatch</span>.<span class="pl-en">_for_class</span>(<span class="pl-v">Mapper</span>).<span class="pl-en">before_configured</span>() <span class="pl-c1">3413</span> <span class="pl-c"># initialize properties on all mappers</span> <span class="pl-c1">3414</span> <span class="pl-c"># note that _mapper_registry is unordered, which</span> <span class="pl-c1">3415</span> <span class="pl-c"># may randomly conceal/reveal issues related to</span> <span class="pl-c1">3416</span> <span class="pl-c"># the order of mapper compilation</span> <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">3418</span> <span class="pl-en">_do_configure_registries</span>(<span class="pl-s1">registries</span>, <span class="pl-s1">cascade</span>) <span class="pl-c1">3419</span> <span class="pl-k">finally</span>: <span class="pl-c1">3420</span> <span class="pl-s1">_already_compiling</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span> <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span><span class="pl-c1">.4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\m<span class="pl-s1">apper</span>.<span class="pl-s1">py</span>:<span class="pl-c1">3457</span>, <span class="pl-c1">in</span> <span class="pl-en">_do_configure_registries</span>(<span class="pl-s1">registries</span>, <span class="pl-s1">cascade</span>) <span class="pl-c1">3455</span> <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">mapper</span>.<span class="pl-s1">configured</span>: <span class="pl-c1">3456</span> <span class="pl-s1">try</span>: <span class="pl-c1">-&gt;</span> <span class="pl-c1">3457</span> <span class="pl-s1">mapper</span>.<span class="pl-en">_post_configure_properties</span>() <span class="pl-c1">3458</span> <span class="pl-s1">mapper</span>.<span class="pl-en">_expire_memoizations</span>() <span class="pl-c1">3459</span> <span class="pl-s1">mapper</span>.<span class="pl-s1">dispatch</span>.<span class="pl-en">mapper_configured</span>(<span class="pl-s1">mapper</span>, <span class="pl-s1">mapper</span>.<span class="pl-s1">class_</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\m<span class="pl-s1">apper</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1917</span>, <span class="pl-c1">in</span> <span class="pl-v">Mapper</span>.<span class="pl-en">_post_configure_properties</span>(<span class="pl-s1">self</span>) <span class="pl-c1">1914</span> <span class="pl-s1">self</span>.<span class="pl-en">_log</span>(<span class="pl-s">"initialize prop %s"</span>, <span class="pl-s1">key</span>) <span class="pl-c1">1916</span> <span class="pl-k">if</span> <span class="pl-s1">prop</span>.<span class="pl-s1">parent</span> <span class="pl-c1">is</span> <span class="pl-s1">self</span> <span class="pl-c1">and</span> <span class="pl-c1">not</span> <span class="pl-s1">prop</span>.<span class="pl-s1">_configure_started</span>: <span class="pl-c1">-&gt;</span> <span class="pl-c1">1917</span> <span class="pl-s1">prop</span>.<span class="pl-en">init</span>() <span class="pl-c1">1919</span> <span class="pl-k">if</span> <span class="pl-s1">prop</span>.<span class="pl-s1">_configure_finished</span>: <span class="pl-c1">1920</span> <span class="pl-s1">prop</span>.<span class="pl-en">post_instrument_class</span>(<span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\i<span class="pl-s1">nterfaces</span>.<span class="pl-s1">py</span>:<span class="pl-c1">231</span>, <span class="pl-c1">in</span> <span class="pl-v">MapperProperty</span>.<span class="pl-en">init</span>(<span class="pl-s1">self</span>) <span class="pl-c1">224</span> <span class="pl-s">"""Called after all mappers are created to assemble</span> <span class="pl-s"> 225 relationships between mappers and perform other post-mapper-creation</span> <span class="pl-s"> 226 initialization steps.</span> <span class="pl-s"> 227 </span> <span class="pl-s"> 228 </span> <span class="pl-s"> 229 """</span> <span class="pl-c1">230</span> <span class="pl-s1">self</span>.<span class="pl-s1">_configure_started</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">231</span> <span class="pl-s1">self</span>.<span class="pl-en">do_init</span>() <span class="pl-c1">232</span> <span class="pl-s1">self</span>.<span class="pl-s1">_configure_finished</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span> <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\r<span class="pl-s1">elationships</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2150</span>, <span class="pl-c1">in</span> <span class="pl-v">RelationshipProperty</span>.<span class="pl-en">do_init</span>(<span class="pl-s1">self</span>) <span class="pl-c1">2148</span> <span class="pl-s1">def</span> <span class="pl-en">do_init</span>(<span class="pl-s1">self</span>): <span class="pl-c1">2149</span> <span class="pl-s1">self</span>.<span class="pl-en">_check_conflicts</span>() <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2150</span> <span class="pl-s1">self</span>.<span class="pl-en">_process_dependent_arguments</span>() <span class="pl-c1">2151</span> <span class="pl-s1">self</span>.<span class="pl-en">_setup_registry_dependencies</span>() <span class="pl-c1">2152</span> <span class="pl-s1">self</span>.<span class="pl-en">_setup_join_conditions</span>() <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\r<span class="pl-s1">elationships</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2245</span>, <span class="pl-c1">in</span> <span class="pl-v">RelationshipProperty</span>.<span class="pl-en">_process_dependent_arguments</span>(<span class="pl-s1">self</span>) <span class="pl-c1">2231</span> <span class="pl-s1">self</span>.<span class="pl-s1">_user_defined_foreign_keys</span> <span class="pl-c1">=</span> <span class="pl-s1">util</span>.<span class="pl-en">column_set</span>( <span class="pl-c1">2232</span> <span class="pl-s1">coercions</span>.<span class="pl-en">expect</span>( <span class="pl-c1">2233</span> <span class="pl-s1">roles</span>.<span class="pl-v">ColumnArgumentRole</span>, <span class="pl-s1">x</span>, <span class="pl-s1">argname</span><span class="pl-c1">=</span><span class="pl-s">"foreign_keys"</span> <span class="pl-c1">2234</span> ) <span class="pl-c1">2235</span> <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-s1">util</span>.<span class="pl-en">to_column_set</span>(<span class="pl-s1">self</span>.<span class="pl-s1">_user_defined_foreign_keys</span>) <span class="pl-c1">2236</span> ) <span class="pl-c1">2238</span> <span class="pl-s1">self</span>.<span class="pl-s1">remote_side</span> <span class="pl-c1">=</span> <span class="pl-s1">util</span>.<span class="pl-en">column_set</span>( <span class="pl-c1">2239</span> <span class="pl-s1">coercions</span>.<span class="pl-en">expect</span>( <span class="pl-c1">2240</span> <span class="pl-s1">roles</span>.<span class="pl-v">ColumnArgumentRole</span>, <span class="pl-s1">x</span>, <span class="pl-s1">argname</span><span class="pl-c1">=</span><span class="pl-s">"remote_side"</span> <span class="pl-c1">2241</span> ) <span class="pl-c1">2242</span> <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-s1">util</span>.<span class="pl-en">to_column_set</span>(<span class="pl-s1">self</span>.<span class="pl-s1">remote_side</span>) <span class="pl-c1">2243</span> ) <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2245</span> <span class="pl-s1">self</span>.<span class="pl-s1">target</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">entity</span>.<span class="pl-s1">persist_selectable</span> <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\u<span class="pl-s1">til</span>\l<span class="pl-s1">anghelpers</span>.<span class="pl-s1">py</span>:<span class="pl-c1">1113</span>, <span class="pl-c1">in</span> <span class="pl-s1">memoized_property</span>.<span class="pl-en">__get__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">obj</span>, <span class="pl-s1">cls</span>) <span class="pl-c1">1111</span> <span class="pl-k">if</span> <span class="pl-s1">obj</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>: <span class="pl-c1">1112</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span> <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1113</span> <span class="pl-s1">obj</span>.<span class="pl-s1">__dict__</span>[<span class="pl-s1">self</span>.<span class="pl-s1">__name__</span>] <span class="pl-c1">=</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">fget</span>(<span class="pl-s1">obj</span>) <span class="pl-c1">1114</span> <span class="pl-k">return</span> <span class="pl-s1">result</span> <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\r<span class="pl-s1">elationships</span>.<span class="pl-s1">py</span>:<span class="pl-c1">2112</span>, <span class="pl-c1">in</span> <span class="pl-v">RelationshipProperty</span>.<span class="pl-en">entity</span>(<span class="pl-s1">self</span>) <span class="pl-c1">2109</span> <span class="pl-s1">mapperlib</span> <span class="pl-c1">=</span> <span class="pl-s1">util</span>.<span class="pl-s1">preloaded</span>.<span class="pl-s1">orm_mapper</span> <span class="pl-c1">2111</span> <span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">self</span>.<span class="pl-s1">argument</span>, <span class="pl-s1">util</span>.<span class="pl-s1">string_types</span>): <span class="pl-c1">-&gt;</span> <span class="pl-c1">2112</span> <span class="pl-s1">argument</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_clsregistry_resolve_name</span>(<span class="pl-s1">self</span>.<span class="pl-s1">argument</span>)() <span class="pl-c1">2114</span> <span class="pl-s1">elif</span> <span class="pl-en">callable</span>(<span class="pl-s1">self</span>.<span class="pl-s1">argument</span>) <span class="pl-c1">and</span> <span class="pl-c1">not</span> <span class="pl-en">isinstance</span>( <span class="pl-c1">2115</span> <span class="pl-s1">self</span>.<span class="pl-s1">argument</span>, (<span class="pl-s1">type</span>, <span class="pl-s1">mapperlib</span>.<span class="pl-v">Mapper</span>) <span class="pl-c1">2116</span> ): <span class="pl-c1">2117</span> <span class="pl-s1">argument</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">argument</span>() <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">lsregistry</span>.<span class="pl-s1">py</span>:<span class="pl-c1">393</span>, <span class="pl-c1">in</span> <span class="pl-s1">_class_resolver</span>.<span class="pl-en">_resolve_name</span>(<span class="pl-s1">self</span>) <span class="pl-c1">391</span> <span class="pl-s1">for</span> <span class="pl-s1">token</span> <span class="pl-c1">in</span> <span class="pl-s1">name</span>.<span class="pl-en">split</span>(<span class="pl-s">"."</span>): <span class="pl-c1">392</span> <span class="pl-k">if</span> <span class="pl-s1">rval</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">393</span> <span class="pl-s1">rval</span> <span class="pl-c1">=</span> <span class="pl-s1">d</span>[<span class="pl-s1">token</span>] <span class="pl-c1">394</span> <span class="pl-k">else</span>: <span class="pl-c1">395</span> <span class="pl-s1">rval</span> <span class="pl-c1">=</span> <span class="pl-en">getattr</span>(<span class="pl-s1">rval</span>, <span class="pl-s1">token</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\u<span class="pl-s1">til</span>\_<span class="pl-s1">collections</span>.<span class="pl-s1">py</span>:<span class="pl-c1">746</span>, <span class="pl-c1">in</span> <span class="pl-v">PopulateDict</span>.<span class="pl-en">__missing__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>) <span class="pl-c1">745</span> <span class="pl-k">def</span> <span class="pl-en">__missing__</span>(<span class="pl-s1">self</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">746</span> <span class="pl-s1">self</span>[<span class="pl-s1">key</span>] <span class="pl-c1">=</span> <span class="pl-s1">val</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">creator</span>(<span class="pl-s1">key</span>) <span class="pl-c1">747</span> <span class="pl-s1">return</span> <span class="pl-s1">val</span> <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">lsregistry</span>.<span class="pl-s1">py</span>:<span class="pl-c1">352</span>, <span class="pl-c1">in</span> <span class="pl-s1">_class_resolver</span>.<span class="pl-en">_access_cls</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>) <span class="pl-c1">349</span> <span class="pl-k">return</span> <span class="pl-en">_GetTable</span>(<span class="pl-s1">key</span>, <span class="pl-s1">cls</span>.<span class="pl-s1">metadata</span>) <span class="pl-c1">351</span> <span class="pl-k">if</span> <span class="pl-s1">key</span> <span class="pl-c1">in</span> <span class="pl-s1">decl_class_registry</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">352</span> <span class="pl-s1">return</span> <span class="pl-en">_determine_container</span>(<span class="pl-s1">key</span>, <span class="pl-s1">decl_class_registry</span>[<span class="pl-s1">key</span>]) <span class="pl-c1">354</span> <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">self</span>.<span class="pl-s1">favor_tables</span>: <span class="pl-c1">355</span> <span class="pl-k">if</span> <span class="pl-s1">key</span> <span class="pl-c1">in</span> <span class="pl-s1">metadata</span>.<span class="pl-s1">tables</span>: <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">lsregistry</span>.<span class="pl-s1">py</span>:<span class="pl-c1">313</span>, <span class="pl-c1">in</span> <span class="pl-en">_determine_container</span>(<span class="pl-s1">key</span>, <span class="pl-s1">value</span>) <span class="pl-c1">311</span> <span class="pl-s1">def</span> <span class="pl-en">_determine_container</span>(<span class="pl-s1">key</span>, <span class="pl-s1">value</span>): <span class="pl-c1">312</span> <span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">value</span>, <span class="pl-s1">_MultipleClassMarker</span>): <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">313</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span>.<span class="pl-en">attempt_get</span>([], <span class="pl-s1">key</span>) <span class="pl-c1">314</span> <span class="pl-s1">return</span> <span class="pl-en">_GetColumns</span>(<span class="pl-s1">value</span>) <span class="pl-v">File</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\s<span class="pl-s1">coop</span>\a<span class="pl-s1">pps</span>\p<span class="pl-s1">ython</span>\3<span class="pl-c1">.10</span>.<span class="pl-c1">4</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">qlalchemy</span>\o<span class="pl-s1">rm</span>\c<span class="pl-s1">lsregistry</span>.<span class="pl-s1">py</span>:<span class="pl-c1">144</span>, <span class="pl-c1">in</span> <span class="pl-s1">_MultipleClassMarker</span>.<span class="pl-en">attempt_get</span>(<span class="pl-s1">self</span>, <span class="pl-s1">path</span>, <span class="pl-s1">key</span>) <span class="pl-c1">142</span> <span class="pl-k">def</span> <span class="pl-en">attempt_get</span>(<span class="pl-s1">self</span>, <span class="pl-s1">path</span>, <span class="pl-s1">key</span>): <span class="pl-c1">143</span> <span class="pl-k">if</span> <span class="pl-en">len</span>(<span class="pl-s1">self</span>.<span class="pl-s1">contents</span>) <span class="pl-c1">&gt;</span> <span class="pl-c1">1</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">144</span> <span class="pl-s1">raise</span> <span class="pl-s1">exc</span>.<span class="pl-v">InvalidRequestError</span>( <span class="pl-c1">145</span> <span class="pl-s">'Multiple classes found for path "%s" '</span> <span class="pl-c1">146</span> <span class="pl-s">"in the registry of this declarative "</span> <span class="pl-c1">147</span> <span class="pl-s">"base. Please use a fully module-qualified path."</span> <span class="pl-c1">148</span> <span class="pl-c1">%</span> (<span class="pl-s">"."</span>.<span class="pl-en">join</span>(<span class="pl-s1">path</span> <span class="pl-c1">+</span> [<span class="pl-s1">key</span>])) <span class="pl-c1">149</span> ) <span class="pl-c1">150</span> <span class="pl-k">else</span>: <span class="pl-c1">151</span> <span class="pl-s1">ref</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s1">self</span>.<span class="pl-s1">contents</span>)[<span class="pl-c1">0</span>] <span class="pl-v">InvalidRequestError</span>: <span class="pl-v">Multiple</span> <span class="pl-s1">classes</span> <span class="pl-s1">found</span> <span class="pl-s1">for</span> <span class="pl-s1">path</span> <span class="pl-s">"Address"</span> <span class="pl-c1">in</span> <span class="pl-s1">the</span> <span class="pl-s1">registry</span> <span class="pl-s1">of</span> <span class="pl-s1">this</span> <span class="pl-s1">declarative</span> <span class="pl-s1">base</span>. <span class="pl-v">Please</span> <span class="pl-s1">use</span> <span class="pl-s1">a</span> <span class="pl-s1">fully</span> <span class="pl-s1">module</span><span class="pl-c1">-</span><span class="pl-s1">qualified</span> <span class="pl-s1">path</span>.</pre></div> <h3 dir="auto">Versions</h3> <ul dir="auto"> <li>OS: Windows 11</li> <li>Python: 3.10.4</li> <li>SQLAlchemy: 1.4.32</li> <li>Database: sqlite3 (memory)</li> <li>DBAPI (eg: psycopg, cx_oracle, mysqlclient): pysqlite</li> </ul> <h3 dir="auto">Additional context</h3> <p dir="auto"><em>No response</em></p>
0
<h3 dir="auto">Is there an existing issue for this?</h3> <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 existing issues</li> </ul> <h3 dir="auto">Current Behavior</h3> <p dir="auto">Using <code class="notranslate">vsce</code> in vscode extension workspace throws errors for missing dependencies.</p> <p dir="auto">I have several VSCode extensions that am moving together in monorepo with npm workspace.<br> All the dependencies for the extensions are hoisted at the root node_modules.<br> To prepare the vscode extension packages I use the <code class="notranslate">vsce</code> tool, that internally uses:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm list --production --depth=99999 --loglevel=error"><pre class="notranslate"><code class="notranslate">npm list --production --depth=99999 --loglevel=error </code></pre></div> <p dir="auto">to collect all npm modules that need to be backed in the VSCode extension.<br> The command is executed in the directory of each workspace, and fails with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm ERR! missing: @aspnet/signalr@^1.1.4, required by [email protected] npm ERR! missing: @types/app-root-path@^1.2.4, required by [email protected] npm ERR! missing: @types/archiver@^2.1.3, required by [email protected]"><pre class="notranslate"><code class="notranslate">npm ERR! missing: @aspnet/signalr@^1.1.4, required by [email protected] npm ERR! missing: @types/app-root-path@^1.2.4, required by [email protected] npm ERR! missing: @types/archiver@^2.1.3, required by [email protected] </code></pre></div> <p dir="auto">however these are already installed in node_modules a few folders up.</p> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">Using <code class="notranslate">vsce</code> in vscode extension workspace to pack correctly.</p> <p dir="auto">From what I understand it may need changes in that external <code class="notranslate">vsce</code> tool as well, but first the <code class="notranslate">npm ls --production</code> will need to either change behaviour to look in node_modules outside the current folder, or perhaps a new switch like <code class="notranslate">--include-workspace-deps</code> to look modules up. I hope I am missing something that could get this running.</p> <h3 dir="auto">Steps To Reproduce</h3> <p dir="auto">Create a project with few workspaces.<br> Install the dependencies in at the root.<br> cd into one of the workspaces.<br> run <code class="notranslate">npm list</code></p> <p dir="auto">It will generate errors for missing dependencies, that had been installed at the root level.</p> <p dir="auto">I've prepared a small repo that shows the list failing if the deps are installed at the root level, and how it works when the deps are installed locally in each dependency:</p> <p dir="auto"><a href="https://github.com/panayot-cankov/npm-list-repro">https://github.com/panayot-cankov/npm-list-repro</a></p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>OS: Windows</li> <li>Node: 14.16.0</li> <li>npm: 1.16.0</li> </ul>
<p dir="auto">Hooks for scopes get a double prefix, ie <code class="notranslate">@@scope</code>, when shown with the <code class="notranslate">npm hook ls</code> command. This is due to the response from the web request already including the prefix in the <code class="notranslate">name</code> field, and the <a href="https://github.com/npm/cli/blob/d8aac8448e983692cacb427e03f4688cd1b62e30/lib/commands/hook.js#L123-L132">following lines</a> of code then locally adding the prefix again, duplicating it.</p>
0
<p dir="auto">Getting multiple reports on access violation causing crashes on Windows 32 machines using 0.35.0. Pasting in the crashdump. The crash dump doesn't seem to contain very much, is this enough info to be able to take this error further?</p> <p dir="auto">Operating system: Windows NT<br> 6.1.7601 Service Pack 1<br> CPU: amd64<br> family 6 model 58 stepping 9<br> 4 CPUs</p> <p dir="auto">Crash reason: EXCEPTION_ACCESS_VIOLATION<br> Crash address: 0xffffffffffffffff</p> <p dir="auto">Thread 0 (crashed)<br> 0 ntdll.dll + 0x4df6a<br> rip = 0x7748df6a rsp = 0x0018cb48 rbp = 0x00000002</p> <p dir="auto">Thread 1<br> 0 ntdll.dll + 0x4df6a<br> rip = 0x7748df6a rsp = 0x046bfa78 rbp = 0x00000000</p> <p dir="auto">Thread 2<br> 0 ntdll.dll + 0x4f2ba<br> rip = 0x7748f2ba rsp = 0x0512fb88 rbp = 0x00000000</p> <p dir="auto">Thread 3<br> 0 ntdll.dll + 0x4da4a<br> rip = 0x7748da4a rsp = 0x0548f728 rbp = 0x0548f8d0<br> 1 0x1fcd5f<br> rip = 0x001fcd60 rsp = 0x0548f8e0 rbp = 0xffffffff</p> <p dir="auto">Thread 4<br> 0 ntdll.dll + 0x4d9fa<br> rip = 0x7748d9fa rsp = 0x052af998 rbp = 0x00000000</p> <p dir="auto">Thread 5<br> 0 ntdll.dll + 0x4df6a<br> rip = 0x7748df6a rsp = 0x057cf028 rbp = 0x00000001</p> <p dir="auto">Thread 6<br> 0 ntdll.dll + 0x4d9fa<br> rip = 0x7748d9fa rsp = 0x059af7e8 rbp = 0x00000000</p> <p dir="auto">Thread 7<br> 0 ntdll.dll + 0x4d9fa<br> rip = 0x7748d9fa rsp = 0x05aaf638 rbp = 0x00000000</p> <p dir="auto">Thread 8<br> 0 ntdll.dll + 0x4da4a<br> rip = 0x7748da4a rsp = 0x05c0ef28 rbp = 0x05c0f0d0</p> <p dir="auto">Thread 9<br> 0 ntdll.dll + 0x4da4a<br> rip = 0x7748da4a rsp = 0x055aef58 rbp = 0x055af100</p> <p dir="auto">Thread 10<br> 0 ntdll.dll + 0x4d9fa<br> rip = 0x7748d9fa rsp = 0x05ecf838 rbp = 0x00000000</p> <p dir="auto">Thread 11<br> 0 ntdll.dll + 0x4f2aa<br> rip = 0x7748f2aa rsp = 0x05dafd78 rbp = 0x001f0e38</p> <p dir="auto">Thread 12<br> 0 ntdll.dll + 0x4d9fa<br> rip = 0x7748d9fa rsp = 0x060ff8f8 rbp = 0x00000000</p> <p dir="auto">Thread 13<br> 0 ntdll.dll + 0x4df6a<br> rip = 0x7748df6a rsp = 0x0620f548 rbp = 0x00000001</p> <p dir="auto">Thread 14<br> 0 ntdll.dll + 0x4df6a<br> rip = 0x7748df6a rsp = 0x0648f438 rbp = 0x00000001</p> <p dir="auto">Thread 15<br> 0 ntdll.dll + 0x4d9fa<br> rip = 0x7748d9fa rsp = 0x0633fd58 rbp = 0x00000000</p> <p dir="auto">Thread 16<br> 0 ntdll.dll + 0x4f2aa<br> rip = 0x7748f2aa rsp = 0x05fcf298 rbp = 0x001e8298</p> <p dir="auto">Thread 17<br> 0 ntdll.dll + 0x4f2aa<br> rip = 0x7748f2aa rsp = 0x0667f2b8 rbp = 0x0667f420<br> 1 0xfffffffe<br> rip = 0xffffffff rsp = 0x0667f430 rbp = 0x04c16990</p> <p dir="auto">Thread 18<br> 0 ntdll.dll + 0x4f2aa<br> rip = 0x7748f2aa rsp = 0x0944f3f8 rbp = 0x001e8298</p> <p dir="auto">Thread 19<br> 0 ntdll.dll + 0x4f2aa<br> rip = 0x7748f2aa rsp = 0x095ff3c8 rbp = 0x001e8298</p> <p dir="auto">Thread 20<br> 0 ntdll.dll + 0x4dcfa<br> rip = 0x7748dcfa rsp = 0x0b16c4d8 rbp = 0x0b16c680</p> <p dir="auto">Thread 21<br> 0 ntdll.dll + 0x4dcfa<br> rip = 0x7748dcfa rsp = 0x0b00f7f8 rbp = 0x00000000</p> <p dir="auto">Thread 22<br> 0 user32.dll + 0x19e6a<br> rip = 0x76ed9e6a rsp = 0x0b2cfa78 rbp = 0x00000000</p> <p dir="auto">Thread 23<br> 0 ntdll.dll + 0x4f2ba<br> rip = 0x7748f2ba rsp = 0x0c53f978 rbp = 0x00000000</p> <p dir="auto">Thread 24<br> 0 ntdll.dll + 0x4f2ba<br> rip = 0x7748f2ba rsp = 0x0ca5f668 rbp = 0x00000000</p> <p dir="auto">Thread 25<br> 0 ntdll.dll + 0x4f2ba<br> rip = 0x7748f2ba rsp = 0x0cbbf918 rbp = 0x00000000</p> <p dir="auto">Thread 26<br> 0 ntdll.dll + 0x4d9fa<br> rip = 0x7748d9fa rsp = 0x092ef748 rbp = 0x0000000d</p> <p dir="auto">Thread 27<br> 0 ntdll.dll + 0x4da4a<br> rip = 0x7748da4a rsp = 0x0c76fc38 rbp = 0x00000000</p> <p dir="auto">Loaded modules:<br> 0x503a0000 - 0x513f5fff mshtml.dll 9.0.8112.16717 (main)<br> 0x710d0000 - 0x710fefff ATL90.dll 9.0.30729.6161<br> 0x71100000 - 0x711d2fff msvcp90.dll 9.0.30729.6161<br> 0x711e0000 - 0x71282fff msvcr90.dll 9.0.30729.6161<br> 0x76d70000 - 0x76ebafff urlmon.dll 9.0.8112.16717<br> 0x76ec0000 - 0x76fb9fff user32.dll 6.1.7601.17514<br> 0x76fc0000 - 0x770dffff kernel32.dll 6.1.7601.19045<br> 0x770e0000 - 0x772ebfff iertutil.dll 9.0.8112.16717<br> 0x772f0000 - 0x77435fff wininet.dll 9.0.8112.16717<br> 0x77440000 - 0x775e8fff ntdll.dll 6.1.7601.19045<br> 0x77600000 - 0x77606fff psapi.dll 6.1.7600.16385<br> 0x77610000 - 0x77612fff normaliz.dll 6.1.7600.16385<br> 0x13fbd0000 - 0x144110fff FlexPaper_Desktop_Publisher.exe 0.35.0.0<br> 0x7feebee0000 - 0x7feec25cfff OverlayIcon64.dll 1.0.0.1<br> 0x7feec260000 - 0x7feecdeffff node.dll 4.1.1.0<br> 0x7feee590000 - 0x7feee635fff msvcp120.dll 12.0.21005.1<br> 0x7feef8a0000 - 0x7feef98efff msvcr120.dll 12.0.21005.1<br> 0x7feefbb0000 - 0x7feefd46fff DWrite.dll 6.2.9200.17461<br> 0x7fef0560000 - 0x7fef058ffff PeerDist.dll 6.1.7600.16385<br> 0x7fef0670000 - 0x7fef06eafff StructuredQuery.dll 7.0.7601.17514<br> 0x7fef0ab0000 - 0x7fef0bbdfff QvodWebBase64.dll 1.0.0.47<br> 0x7fef1990000 - 0x7fef1a2bfff mscms.dll 6.1.7601.17514<br> 0x7fef1ca0000 - 0x7fef1d26fff ieproxy.dll 9.0.8112.16717<br> 0x7fef2890000 - 0x7fef28a0fff rtutils.dll 6.1.7601.17514<br> 0x7fef28b0000 - 0x7fef28cbfff rasman.dll 6.1.7600.16385<br> 0x7fef28d0000 - 0x7fef2931fff rasapi32.dll 6.1.7600.16385<br> 0x7fef2b50000 - 0x7fef2ba3fff oleacc.dll 7.0.0.0<br> 0x7fef2bb0000 - 0x7fef3619fff ieframe.dll 9.0.8112.16717<br> 0x7fef3d20000 - 0x7fef3d28fff SensApi.dll 6.1.7600.16385<br> 0x7fef4840000 - 0x7fef49dbfff NetworkExplorer.dll 6.1.7601.17514<br> 0x7fef4e70000 - 0x7fef4f5dfff actxprxy.dll 6.1.7601.17514<br> 0x7fef5140000 - 0x7fef51bffff ntshrui.dll 6.1.7601.17755<br> 0x7fef51c0000 - 0x7fef59cffff GrooveIntlResource.dll 14.0.7007.1000<br> 0x7fef59d0000 - 0x7fef5de9fff OFFICE.ODF 14.0.7109.5000<br> 0x7fef5df0000 - 0x7fef645efff GROOVEEX.DLL 14.0.7113.5005<br> 0x7fef6e70000 - 0x7fef6ea3fff shdocvw.dll 6.1.7601.18222<br> 0x7fef6f40000 - 0x7fef6f74fff EhStorShell.dll 6.1.7600.16385<br> 0x7fef6f80000 - 0x7fef7154fff d3d11.dll 6.2.9200.16570<br> 0x7fef73e0000 - 0x7fef73ebfff linkinfo.dll 6.1.7600.16385<br> 0x7fef73f0000 - 0x7fef7429fff msls31.dll 3.10.349.0<br> 0x7fef75c0000 - 0x7fef75fafff winmm.dll 6.1.7600.16385<br> 0x7fef77b0000 - 0x7fef780cfff dxgi.dll 6.2.9200.16492<br> 0x7fef7b00000 - 0x7fef7b1cfff mssprxy.dll 7.0.7600.16385<br> 0x7fef7b30000 - 0x7fef7b48fff pnrpnsp.dll 6.1.7600.16385<br> 0x7fef7b50000 - 0x7fef7b5afff winrnr.dll 6.1.7600.16385<br> 0x7fef7b60000 - 0x7fef7b74fff NapiNSP.dll 6.1.7600.16385<br> 0x7fef7b80000 - 0x7fef7b8efff cscapi.dll 6.1.7601.17514<br> 0x7fef7ca0000 - 0x7fef7d5cfff PortableDeviceApi.dll 6.1.7601.17514<br> 0x7fef7f40000 - 0x7fef7f66fff EhStorAPI.dll 6.1.7601.17514<br> 0x7fef8a30000 - 0x7fef8a37fff rasadhlp.dll 6.1.7600.16385<br> 0x7fef8a40000 - 0x7fef8ab0fff winspool.drv 6.1.7601.17514<br> 0x7fef9b60000 - 0x7fef9bc3fff webio.dll 6.1.7601.17725<br> 0x7fef9bd0000 - 0x7fef9c40fff winhttp.dll 6.1.7601.17514<br> 0x7fefa790000 - 0x7fefa7a7fff dhcpcsvc.dll 6.1.7600.16385<br> 0x7fefa7b0000 - 0x7fefa7c0fff dhcpcsvc6.DLL 6.1.7601.17970<br> 0x7fefa950000 - 0x7fefa9a2fff FWPUCLNT.DLL 6.1.7601.18283<br> 0x7fefab10000 - 0x7fefab1afff winnsi.dll 6.1.7600.16385<br> 0x7fefab30000 - 0x7fefab56fff IPHLPAPI.DLL 6.1.7601.17514<br> 0x7fefae20000 - 0x7fefae37fff mpr.dll 6.1.7600.16385<br> 0x7fefb230000 - 0x7fefb239fff davhlpr.dll 6.1.7600.16385<br> 0x7fefb240000 - 0x7fefb25cfff davclnt.dll 6.1.7601.18912<br> 0x7fefb260000 - 0x7fefb281fff ntlanman.dll 6.1.7601.17514<br> 0x7fefb2b0000 - 0x7fefb3d4fff dbghelp.dll 6.1.7601.17514<br> 0x7fefb400000 - 0x7fefb409fff drprov.dll 6.1.7600.16385<br> 0x7fefb4d0000 - 0x7fefb4dafff slc.dll 6.1.7600.16385<br> 0x7fefb780000 - 0x7fefb794fff nlaapi.dll 6.1.7601.17964<br> 0x7fefb8c0000 - 0x7fefb8ecfff ntmarta.dll 6.1.7600.16385<br> 0x7fefbb50000 - 0x7fefbb56fff msimg32.dll 6.1.7600.16385<br> 0x7fefbb90000 - 0x7fefbba4fff wkscli.dll 6.1.7601.17514<br> 0x7fefbbb0000 - 0x7fefbbbbfff netutils.dll 6.1.7601.17514<br> 0x7fefbbc0000 - 0x7fefbbd5fff netapi32.dll 6.1.7601.17887<br> 0x7fefbc70000 - 0x7fefbcbefff AudioSes.dll 6.1.7601.18741<br> 0x7fefbd00000 - 0x7fefbe60fff WindowsCodecs.dll 6.2.9200.17251<br> 0x7fefbe70000 - 0x7fefbea4fff xmllite.dll 1.3.1001.0<br> 0x7fefbeb0000 - 0x7fefbec7fff dwmapi.dll 6.1.7600.16385<br> 0x7fefbed0000 - 0x7fefbf1afff MMDevAPI.dll 6.1.7600.16385<br> 0x7fefbf70000 - 0x7fefbfb2fff duser.dll 6.1.7600.16385<br> 0x7fefbfc0000 - 0x7fefc0b1fff dui70.dll 6.1.7600.16385<br> 0x7fefc0c0000 - 0x7fefc2d5fff GdiPlus.dll 6.1.7601.19054<br> 0x7fefc2e0000 - 0x7fefc335fff uxtheme.dll 6.1.7600.16385<br> 0x7fefc340000 - 0x7fefc46bfff propsys.dll 7.0.7601.17514<br> 0x7fefc4a0000 - 0x7fefc693fff comctl32.dll 6.10.7601.18837<br> 0x7fefc990000 - 0x7fefc9bbfff powrprof.dll 6.1.7600.16385<br> 0x7fefc9c0000 - 0x7fefc9d0fff wtsapi32.dll 6.1.7600.16385<br> 0x7fefcac0000 - 0x7fefcac6fff WSHTCPIP.DLL 6.1.7600.16385<br> 0x7fefcbe0000 - 0x7fefcbfdfff userenv.dll 6.1.7601.17514<br> 0x7fefccd0000 - 0x7fefccf2fff srvcli.dll 6.1.7601.17514<br> 0x7fefce20000 - 0x7fefce2bfff version.dll 6.1.7600.16385<br> 0x7fefced0000 - 0x7fefcf16fff rsaenh.dll 6.1.7600.16385<br> 0x7fefcfe0000 - 0x7fefd03afff dnsapi.dll 6.1.7601.17570<br> 0x7fefd240000 - 0x7fefd246fff wship6.dll 6.1.7600.16385<br> 0x7fefd250000 - 0x7fefd2a4fff mswsock.dll 6.1.7601.18254<br> 0x7fefd2b0000 - 0x7fefd2c7fff cryptsp.dll 6.1.7601.18741<br> 0x7fefd310000 - 0x7fefd31afff secur32.dll 6.1.7601.19045<br> 0x7fefd3a0000 - 0x7fefd3cefff authz.dll 6.1.7600.16385<br> 0x7fefd550000 - 0x7fefd574fff sspicli.dll 6.1.7601.19045<br> 0x7fefd730000 - 0x7fefd786fff apphelp.dll 6.1.7601.17514<br> 0x7fefd790000 - 0x7fefd79efff CRYPTBASE.dll 6.1.7601.19045<br> 0x7fefd7a0000 - 0x7fefd830fff sxs.dll 6.1.7601.17514<br> 0x7fefd840000 - 0x7fefd87cfff winsta.dll 6.1.7601.18540<br> 0x7fefd880000 - 0x7fefd893fff RpcRtRemote.dll 6.1.7601.17514<br> 0x7fefd8a0000 - 0x7fefd8aefff profapi.dll 6.1.7600.16385<br> 0x7fefd940000 - 0x7fefd94efff msasn1.dll 6.1.7601.17514<br> 0x7fefd950000 - 0x7fefd985fff cfgmgr32.dll 6.1.7601.17514<br> 0x7fefda30000 - 0x7fefda49fff devobj.dll 6.1.7600.16385<br> 0x7fefda50000 - 0x7fefdbbcfff crypt32.dll 6.1.7601.18741<br> 0x7fefdbc0000 - 0x7fefdbfafff wintrust.dll 6.1.7601.18741<br> 0x7fefdc00000 - 0x7fefdc6bfff KERNELBASE.dll 6.1.7601.19045<br> 0x7fefdc70000 - 0x7fefdd06fff comdlg32.dll 6.1.7601.17514<br> 0x7fefdd10000 - 0x7fefde18fff msctf.dll 6.1.7601.18731<br> 0x7fefde20000 - 0x7fefdef6fff oleaut32.dll 6.1.7601.18679<br> 0x7fefdf00000 - 0x7fefdf98fff clbcatq.dll 2001.12.8530.16385<br> 0x7fefe020000 - 0x7fefe086fff gdi32.dll 6.1.7601.18898<br> 0x7fefe090000 - 0x7fefe0dcfff ws2_32.dll 6.1.7601.17514<br> 0x7fefe0e0000 - 0x7fefe20cfff rpcrt4.dll 6.1.7601.19045<br> 0x7fefe210000 - 0x7fefe2d8fff usp10.dll 1.626.7601.18454<br> 0x7fefe2e0000 - 0x7fefe350fff shlwapi.dll 6.1.7601.17514<br> 0x7fefe360000 - 0x7fefe3fefff msvcrt.dll 7.0.7601.17744<br> 0x7fefe400000 - 0x7fefe407fff nsi.dll 6.1.7600.16385<br> 0x7fefe410000 - 0x7fefe612fff ole32.dll 6.1.7601.18915<br> 0x7fefe620000 - 0x7fefe671fff Wldap32.dll 6.1.7601.17514<br> 0x7fefe6a0000 - 0x7feff428fff shell32.dll 6.1.7601.18952<br> 0x7feff430000 - 0x7feff606fff setupapi.dll 6.1.7601.17514<br> 0x7feff610000 - 0x7feff61dfff lpk.dll 6.1.7601.18985<br> 0x7feff620000 - 0x7feff6fafff advapi32.dll 6.1.7601.18247<br> 0x7feff700000 - 0x7feff71efff sechost.dll 6.1.7600.16385<br> 0x7feff720000 - 0x7feff74dfff imm32.dll 6.1.7600.16385</p>
<p dir="auto">In VS Code when I call process.exit() from the main side I get the following trace. I have not been able to reproduce on a bare Electron 0.34.1 though. Any ideas what I could look for to nail this down?</p> <p dir="auto">C:\GitDevelopment\monaco&gt; (No symbol) [0x0046D436](No symbol) [0x0036B0FF](No symbol) [0x0036AC8A]<br> uv_async_send [0x6403A4FD+1003]<br> _get_flsindex [0x63A3C01D+111]<br> _get_flsindex [0x63A3C001+83]<br> BaseThreadInitThunk [0x756E7C04+36]<br> RtlInitializeExceptionChain [0x7706AD1F+143]<br> RtlInitializeExceptionChain [0x7706ACEA+90]</p>
1
<p dir="auto">When I run a command</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&quot;node_modules/.bin/ngc&quot; -p ./"><pre class="notranslate"><code class="notranslate">&gt;"node_modules/.bin/ngc" -p ./ </code></pre></div> <p dir="auto">I get the error:</p> <blockquote> <p dir="auto">Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 65:17 in the original .ts file), resolving symbol COMPILER_PROVIDERS in .../node_modules/@angular/compiler/src/compiler.d.ts,</p> </blockquote> <p dir="auto">That all is related to this piece of code</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@NgModule({ ... providers: [ COMPILER_PROVIDERS ], }) export class AppModule {}"><pre class="notranslate"><code class="notranslate">@NgModule({ ... providers: [ COMPILER_PROVIDERS ], }) export class AppModule {} </code></pre></div> <p dir="auto">Once COMPILER_PROVIDERS are not declared</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" providers: [ // COMPILER_PROVIDERS"><pre class="notranslate"><code class="notranslate"> providers: [ // COMPILER_PROVIDERS </code></pre></div> <p dir="auto">then <strong>AOT works</strong> as expected... just ... <strong>as also expected, the app is not</strong> working <em>(simply, COMPILER_PROVIDERS are needed for it)</em></p> <p dir="auto">I did see this "encouraging disclaimer"</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/** * @module * @description * Entry point for all APIs of the compiler package. * * &lt;div class=&quot;callout is-critical&quot;&gt; * &lt;header&gt;Unstable APIs&lt;/header&gt; * &lt;p&gt; * All compiler apis are currently considered experimental and private! * &lt;/p&gt; * &lt;p&gt; * We expect the APIs in this package to keep on changing. Do not rely on them. * &lt;/p&gt; * &lt;/div&gt;"><pre class="notranslate"><code class="notranslate">/** * @module * @description * Entry point for all APIs of the compiler package. * * &lt;div class="callout is-critical"&gt; * &lt;header&gt;Unstable APIs&lt;/header&gt; * &lt;p&gt; * All compiler apis are currently considered experimental and private! * &lt;/p&gt; * &lt;p&gt; * We expect the APIs in this package to keep on changing. Do not rely on them. * &lt;/p&gt; * &lt;/div&gt; </code></pre></div> <p dir="auto">So - it is <strong>experimental</strong>, <strong>private</strong>, <strong>"I cannot rely on it"</strong> ... but I need it.</p> <p dir="auto">Please, am I doing something wrong? or is intended ... <strong>COMPILER_PROVIDERS will never be supported by AOT</strong>?</p>
<p dir="auto">This sentence in the Javacript Quick start:<br> <em>Most application files export one thing into our faux-pas 'namespace</em><br> should read<br> <em>Most application files export one thing into our faux 'namespace'</em><br> (The namespace is not an " an embarrassing social mistake", it is simply "fake".</p>
0
<p dir="auto">Sorry about the long title. I couldn't find a better way to express the issue :)</p> <p dir="auto">Given the following syntax extension:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![crate_type = &quot;dylib&quot;] #![allow(unstable)] #![feature(plugin_registrar, quote)] extern crate syntax; extern crate rustc; use syntax::ast::TokenTree; use syntax::codemap::Span; use syntax::ext::base::{DummyResult, ExtCtxt, MacExpr, MacResult}; use rustc::plugin::Registry; fn expand&lt;'cx&gt;(cx: &amp;'cx mut ExtCtxt, sp: Span, args: &amp;[TokenTree]) -&gt; Box&lt;MacResult + 'cx&gt; { match args { [ref tt, ..] =&gt; { let e = quote_expr!(cx, println!(&quot;{}&quot;, $tt)); MacExpr::new(quote_expr!(cx, $e)) }, _ =&gt; DummyResult::any(sp), } } #[plugin_registrar] pub fn plugin_registrar(reg: &amp;mut Registry) { reg.register_macro(&quot;macro_test&quot;, expand); }"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>crate_type = <span class="pl-s">"dylib"</span><span class="pl-kos">]</span></span> <span class="pl-c1">#!<span class="pl-kos">[</span>allow<span class="pl-kos">(</span>unstable<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>plugin_registrar<span class="pl-kos">,</span> quote<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">extern</span> <span class="pl-k">crate</span> syntax<span class="pl-kos">;</span> <span class="pl-k">extern</span> <span class="pl-k">crate</span> rustc<span class="pl-kos">;</span> <span class="pl-k">use</span> syntax<span class="pl-kos">::</span>ast<span class="pl-kos">::</span><span class="pl-v">TokenTree</span><span class="pl-kos">;</span> <span class="pl-k">use</span> syntax<span class="pl-kos">::</span>codemap<span class="pl-kos">::</span><span class="pl-v">Span</span><span class="pl-kos">;</span> <span class="pl-k">use</span> syntax<span class="pl-kos">::</span>ext<span class="pl-kos">::</span>base<span class="pl-kos">::</span><span class="pl-kos">{</span><span class="pl-v">DummyResult</span><span class="pl-kos">,</span> <span class="pl-v">ExtCtxt</span><span class="pl-kos">,</span> <span class="pl-v">MacExpr</span><span class="pl-kos">,</span> <span class="pl-v">MacResult</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">use</span> rustc<span class="pl-kos">::</span>plugin<span class="pl-kos">::</span><span class="pl-v">Registry</span><span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">expand</span><span class="pl-kos">&lt;</span><span class="pl-c1">'</span><span class="pl-ent">cx</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">cx</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-c1">'</span><span class="pl-ent">cx</span> <span class="pl-k">mut</span> <span class="pl-smi">ExtCtxt</span><span class="pl-kos">,</span> <span class="pl-s1">sp</span><span class="pl-kos">:</span> <span class="pl-smi">Span</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-kos">[</span><span class="pl-smi">TokenTree</span><span class="pl-kos">]</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Box</span><span class="pl-kos">&lt;</span><span class="pl-smi">MacResult</span> + <span class="pl-c1">'</span><span class="pl-ent">cx</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">match</span> args <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-k">ref</span> tt<span class="pl-kos">,</span> ..<span class="pl-kos">]</span> =&gt; <span class="pl-kos">{</span> <span class="pl-k">let</span> e = <span class="pl-en">quote_expr</span><span class="pl-en">!</span><span class="pl-kos">(</span>cx, println!<span class="pl-kos">(</span><span class="pl-s">"{}"</span>, $tt<span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">MacExpr</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-en">quote_expr</span><span class="pl-en">!</span><span class="pl-kos">(</span>cx, $e<span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> _ =&gt; <span class="pl-smi">DummyResult</span><span class="pl-kos">::</span><span class="pl-en">any</span><span class="pl-kos">(</span>sp<span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-c1">#<span class="pl-kos">[</span>plugin_registrar<span class="pl-kos">]</span></span> <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">plugin_registrar</span><span class="pl-kos">(</span><span class="pl-s1">reg</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-k">mut</span> <span class="pl-smi">Registry</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> reg<span class="pl-kos">.</span><span class="pl-en">register_macro</span><span class="pl-kos">(</span><span class="pl-s">"macro_test"</span><span class="pl-kos">,</span> expand<span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">and this test file:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(plugin)] #[plugin] #[no_link] extern crate quote_fail; #[test] fn it_works() { let a = &quot;hello&quot;; macro_test!(a); }"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>plugin<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-c1">#<span class="pl-kos">[</span>plugin<span class="pl-kos">]</span></span> <span class="pl-c1">#<span class="pl-kos">[</span>no_link<span class="pl-kos">]</span></span> <span class="pl-k">extern</span> <span class="pl-k">crate</span> quote_fail<span class="pl-kos">;</span> <span class="pl-c1">#<span class="pl-kos">[</span>test<span class="pl-kos">]</span></span> <span class="pl-k">fn</span> <span class="pl-en">it_works</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> a = <span class="pl-s">"hello"</span><span class="pl-kos">;</span> <span class="pl-en">macro_test</span><span class="pl-en">!</span><span class="pl-kos">(</span>a<span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">The latter fails to compile with the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;quote expansion&gt;:1:27: 1:28 error: unresolved name `a` &lt;quote expansion&gt;:1 name_228,ctxt_0!(&quot;{}&quot; , a) ^ note: in expansion of format_args! &lt;std macros&gt;:2:42: 2:75 note: expansion site &lt;std macros&gt;:1:1: 2:77 note: in expansion of println! &lt;quote expansion&gt;:1:1: 1:29 note: expansion site /home/chris/dev/quote_fail/tests/tests.rs:1:1: 9:1 note: in expansion of macro_test! /home/chris/dev/quote_fail/tests/tests.rs:8:5: 8:20 note: expansion site error: aborting due to previous error Could not compile `quote_fail`."><pre class="notranslate"><code class="notranslate">&lt;quote expansion&gt;:1:27: 1:28 error: unresolved name `a` &lt;quote expansion&gt;:1 name_228,ctxt_0!("{}" , a) ^ note: in expansion of format_args! &lt;std macros&gt;:2:42: 2:75 note: expansion site &lt;std macros&gt;:1:1: 2:77 note: in expansion of println! &lt;quote expansion&gt;:1:1: 1:29 note: expansion site /home/chris/dev/quote_fail/tests/tests.rs:1:1: 9:1 note: in expansion of macro_test! /home/chris/dev/quote_fail/tests/tests.rs:8:5: 8:20 note: expansion site error: aborting due to previous error Could not compile `quote_fail`. </code></pre></div> <p dir="auto">This error goes away if I do either of these things:</p> <ul dir="auto"> <li>Remove the <code class="notranslate">println!</code> call, i.e. replace <code class="notranslate">println!("{}", $tt)</code> with <code class="notranslate">$tt</code></li> <li>Call <code class="notranslate">quote_expr!</code> only once instead of twice, i.e. <code class="notranslate">MacExpr::new(e)</code></li> </ul> <p dir="auto">I'm using <code class="notranslate">rustc</code> commit <code class="notranslate">8903c21</code> built <code class="notranslate">2015-01-16</code> on Ubuntu 14.10 x86_64.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="38120612" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/15750" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/15750/hovercard" href="https://github.com/rust-lang/rust/issues/15750">#15750</a> is fixed now, but a variant of the same issue occurs when quoting a macro invocation.</p> <p dir="auto">Using <code class="notranslate">plugin.rs</code> from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="38120612" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/15750" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/15750/hovercard" href="https://github.com/rust-lang/rust/issues/15750">#15750</a> and this <code class="notranslate">test.rs</code>:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(phase)] #[phase(plugin)] extern crate plugin; fn main() { let x = true; println!(&quot;{}&quot;, mymacro!(assert!(x))); }"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>phase<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-c1">#<span class="pl-kos">[</span>phase<span class="pl-kos">(</span>plugin<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">extern</span> <span class="pl-k">crate</span> plugin<span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> x = <span class="pl-c1">true</span><span class="pl-kos">;</span> <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, mymacro!<span class="pl-kos">(</span>assert!<span class="pl-kos">(</span>x<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">I get this result:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc -v rustc 0.12.0-pre (3f5d0b5b6 2014-08-19 16:35:51 +0000) $ rustc plugin.rs $ rustc -L. test.rs &lt;quote expansion&gt;:1:20: 1:21 error: unresolved name `x`. &lt;quote expansion&gt;:1 name_64,ctxt_11!(x) ^ &lt;std macros&gt;:1:1: 12:2 note: in expansion of assert! &lt;quote expansion&gt;:1:1: 1:22 note: expansion site test.rs:1:1: 9:1 note: in expansion of mymacro! test.rs:8:20: 8:40 note: expansion site note: in expansion of format_args! &lt;std macros&gt;:2:23: 2:77 note: expansion site &lt;std macros&gt;:1:1: 3:2 note: in expansion of println! test.rs:8:5: 8:42 note: expansion site error: aborting due to previous error"><pre class="notranslate"><code class="notranslate">$ rustc -v rustc 0.12.0-pre (3f5d0b5b6 2014-08-19 16:35:51 +0000) $ rustc plugin.rs $ rustc -L. test.rs &lt;quote expansion&gt;:1:20: 1:21 error: unresolved name `x`. &lt;quote expansion&gt;:1 name_64,ctxt_11!(x) ^ &lt;std macros&gt;:1:1: 12:2 note: in expansion of assert! &lt;quote expansion&gt;:1:1: 1:22 note: expansion site test.rs:1:1: 9:1 note: in expansion of mymacro! test.rs:8:20: 8:40 note: expansion site note: in expansion of format_args! &lt;std macros&gt;:2:23: 2:77 note: expansion site &lt;std macros&gt;:1:1: 3:2 note: in expansion of println! test.rs:8:5: 8:42 note: expansion site error: aborting due to previous error </code></pre></div> <p dir="auto">Also the NULL characters used to delimit the magic identifier string appear in the error output, which causes the error caret to appear in the wrong place.</p> <p dir="auto">See also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="38682589" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/15962" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/15962/hovercard" href="https://github.com/rust-lang/rust/issues/15962">#15962</a>.</p> <p dir="auto">CC <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pnkfelix/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pnkfelix">@pnkfelix</a>. This is still a huge improvement from before and I think I can work around the remaining issues in <code class="notranslate">html5ever</code>. Thank you for fixing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="38120612" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/15750" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/15750/hovercard" href="https://github.com/rust-lang/rust/issues/15750">#15750</a> :)</p>
1
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/fchollet/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/fchollet">@fchollet</a><br> We know that ImageDataGenerator provides a way for image data augmentation: <code class="notranslate">ImageDataGenerator.flow(X, Y)</code>. Now consider the image segmentation task where <code class="notranslate">Y</code> is not a categorical label but a image mask which is the same size as input <code class="notranslate">X</code>, e.g. 256x256 pixels. If we would like to use data augmentation, the same transformation should also be adopted to <code class="notranslate">Y</code>. Is there any simple way to handle this?</p>
<p dir="auto">Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on <a href="http://stackoverflow.com/questions/tagged/keras" rel="nofollow">StackOverflow</a> or <a href="https://keras-slack-autojoin.herokuapp.com/" rel="nofollow">join the Keras Slack channel</a> and ask there instead of filing a GitHub issue.</p> <p dir="auto">Thank you!</p> <ul class="contains-task-list"> <li> <p dir="auto">[ x] Check that you are up-to-date with the master branch of Keras. You can update with:<br> pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps</p> </li> <li> <p dir="auto">[x ] If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found <a href="https://www.tensorflow.org/get_started/os_setup" rel="nofollow">here</a>.</p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:<br> pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps</p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short)</p> </li> </ul> <p dir="auto">Below is my simple code to use ImageDataGenerator to do some data augmentation. Let's say I have 1000 input cat images, I want to use ImageDataGenerator to augment each image 20 times, so totally I should get 1000*20 = 20,000 augmented images. However, the following code only produces &lt; 10,000 files. The output files have a 'cat_0_xxxx.jpeg' pattern in filenames where xxxx goes from 0 to 9999, does that mean ImageDataGenerator won't go beyond 10,000 files? I would expect it will save 'cat_1_xxxx.jpeg" after saving cat_0_9999.jpeg but that did not happen. Is this a bug?</p> <p dir="auto">BTW, I installed Keras using pip: pip install keras, the installed version is keras-2.0.6.tar.gz.</p> <p dir="auto">from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img<br> import glob<br> import os, sys</p> <p dir="auto">datagen = ImageDataGenerator(<br> rotation_range=40,<br> width_shift_range=0.2,<br> height_shift_range=0.2,<br> shear_range=0.2,<br> zoom_range=0.2,<br> horizontal_flip=True,<br> fill_mode='nearest')</p> <p dir="auto">path = 'test20170721/train/cats'<br> outPath = 'test20170721/augmentation/cats'<br> files = glob.glob(path + '/*.jpg')</p> <p dir="auto">for file in files:<br> print file<br> img = load_img(file)<br> x = img_to_array(img)<br> x = x.reshape((1,) + x.shape)</p> <p dir="auto">i = 0<br> for batch in datagen.flow(x, save_to_dir=outPath, save_prefix='cat', save_format='jpeg'):<br> i += 1<br> if i &gt; 20:<br> break</p>
0
<p dir="auto"><strong>System information</strong></p> <ul dir="auto"> <li>Have I written custom code:No</li> <li>OS Platform and Distribution:Ubuntu 18.04.2</li> <li>TensorFlow installed from:binary</li> <li>TensorFlow version:tf-nightly-gpu 1.14.1.dev20190617</li> <li>Python version:3.7</li> <li>CUDA/cuDNN version:10.0</li> <li>GPU model and memory:rtx 2070 8gb</li> </ul> <p dir="auto"><strong>Describe the current behavior</strong><br> cannot import anything from tensorflow.python.<br> <strong>Describe the expected behavior</strong><br> In tensorflow version 1.13 it works<br> <strong>Code to reproduce the issue</strong><br> from tensorflow.python import tf2 and i get Unresolved reference</p>
<p dir="auto">PyCharms doesn't provide suggestions for some of the TensorFlow imports. For example:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from tensorflow.nn import rnn_cell from tensorflow.keras import losses"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">tensorflow</span>.<span class="pl-s1">nn</span> <span class="pl-k">import</span> <span class="pl-s1">rnn_cell</span> <span class="pl-k">from</span> <span class="pl-s1">tensorflow</span>.<span class="pl-s1">keras</span> <span class="pl-k">import</span> <span class="pl-s1">losses</span></pre></div> <p dir="auto">In these cases, PyCharms doesn't provide suggestions for <code class="notranslate">rnn_cell</code> or <code class="notranslate">losses</code> members.</p> <p dir="auto">A potential solution for the <code class="notranslate">rnn_cell</code> import is to put API tree under root of TensorFlow pip package instead of under <code class="notranslate">_api/v1</code> or <code class="notranslate">_api/v2</code>. However, this won't fix suggestions for <code class="notranslate">keras</code> import since <code class="notranslate">keras</code> API is in a different directory and we create an alias for it under <code class="notranslate">tensorflow</code>.</p> <p dir="auto">This issue is a follow up from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="419031456" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/26502" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/26502/hovercard" href="https://github.com/tensorflow/tensorflow/issues/26502">#26502</a>.</p>
1
<p dir="auto">Nice to have feature "Remap key to Shortcut" but what about "Shortcut with no Action key"?</p> <p dir="auto">Please add the feature so we can remap some key to "Alt + Shift" to switch language.</p> <p dir="auto">Thank you.</p>
<p dir="auto">Allow for users to create a shortcut with only modifiers (Alt+Ctrl).</p>
1
<p dir="auto">The <code class="notranslate">dart2js</code> build step for apps with large numbers of components (&gt;500) is running out of memory.</p> <p dir="auto">Abstracting duplicated and boilerplate code out of generated change detectors and into utilities and/or <code class="notranslate">AbstractChangeDetector</code> will give <code class="notranslate">dart2js</code> less code to process and should help with memory pressure.</p>
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ x ] bug report [ ] feature request [ ] support request =&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 [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">I am currently trying async load some components as is done in <a href="https://github.com/AngularClass/angular2-webpack-starter">angular2-webpack-starter</a>. These components are using <code class="notranslate">guards</code> similar to the examples in the <code class="notranslate">router</code> <code class="notranslate">3.0.0-alpha.7</code> docs, and upon attempting to navigate to the async component, I get the error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="EXCEPTION: Error: Uncaught (in promise): TypeError: Cannot read property 'annotations' of undefined"><pre class="notranslate"><code class="notranslate">EXCEPTION: Error: Uncaught (in promise): TypeError: Cannot read property 'annotations' of undefined </code></pre></div> <p dir="auto"><strong>Expected/desired behavior</strong></p> <p dir="auto">To be able to load guarded components asynchronously.</p> <p dir="auto"><strong>Reproduction of the problem</strong><br> If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via <a href="https://plnkr.co" rel="nofollow">https://plnkr.co</a> or similar (you can use this template as a starting point: <a href="http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5" rel="nofollow">http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5</a>).</p> <p dir="auto">I have provided some examples and insight as to the setup that is causing this issue here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="161576834" data-permission-text="Title is private" data-url="https://github.com/AngularClass/webpack-toolkit/issues/1" data-hovercard-type="issue" data-hovercard-url="/AngularClass/webpack-toolkit/issues/1/hovercard" href="https://github.com/AngularClass/webpack-toolkit/issues/1">AngularClass/webpack-toolkit#1</a></p> <p dir="auto">Basically, I followed the example for creating a canDeactivate guard following the docs for the <code class="notranslate">3.0.0-alpha.7</code> router, and it works fine when loaded normally, but errors when loaded asynchronously.</p> <p dir="auto">To demonstrate this problem you could create a guard for preventing the user from leaving the view with something along these lines:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { CanDeactivate } from '@angular/router'; import { Observable } from 'rxjs/Observable'; export interface CanComponentDeactivate { canDeactivate: () =&gt; boolean | Observable&lt;boolean&gt;; } export class CanDeactivateGuard implements CanDeactivate&lt;CanComponentDeactivate&gt; { canDeactivate(component: CanComponentDeactivate): Observable&lt;boolean&gt; | boolean { return component.canDeactivate ? component.canDeactivate() : true; }"><pre class="notranslate"><code class="notranslate">import { CanDeactivate } from '@angular/router'; import { Observable } from 'rxjs/Observable'; export interface CanComponentDeactivate { canDeactivate: () =&gt; boolean | Observable&lt;boolean&gt;; } export class CanDeactivateGuard implements CanDeactivate&lt;CanComponentDeactivate&gt; { canDeactivate(component: CanComponentDeactivate): Observable&lt;boolean&gt; | boolean { return component.canDeactivate ? component.canDeactivate() : true; } </code></pre></div> <p dir="auto">You might then implement that guard like so on a <code class="notranslate">component</code> to prevent the user from navigating away from a form before submitting it, for example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="canDeactivate(): Observable&lt;boolean&gt; | boolean { // Ask the user with a confirmation dialog service if(!this.userForm.pristine &amp;&amp; !this.accepted) { return confirm('You haven\'t submitted your registration. Are you sure ' + 'you want to navigate away from this page?'); } else { return true; } }"><pre class="notranslate"><code class="notranslate">canDeactivate(): Observable&lt;boolean&gt; | boolean { // Ask the user with a confirmation dialog service if(!this.userForm.pristine &amp;&amp; !this.accepted) { return confirm('You haven\'t submitted your registration. Are you sure ' + 'you want to navigate away from this page?'); } else { return true; } } </code></pre></div> <p dir="auto">I have my routes configured as so:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { RouterConfig } from '@angular/router'; import { Home } from './home'; import { CanDeactivateGuard } from './shared/interfaces/can-deactivate.interface'; export const routes: RouterConfig = [ { path: '', component: Home }, { path: 'home', component: Home }, { path: 'about', component: 'About' }, { path: 'register', component: 'Register', canDeactivate: [CanDeactivateGuard] } ]; export const asyncRoutes = { 'About': require('es6-promise-loader!./about'), 'Register': require('es6-promise-loader!./register/register.component') };"><pre class="notranslate"><code class="notranslate">import { RouterConfig } from '@angular/router'; import { Home } from './home'; import { CanDeactivateGuard } from './shared/interfaces/can-deactivate.interface'; export const routes: RouterConfig = [ { path: '', component: Home }, { path: 'home', component: Home }, { path: 'about', component: 'About' }, { path: 'register', component: 'Register', canDeactivate: [CanDeactivateGuard] } ]; export const asyncRoutes = { 'About': require('es6-promise-loader!./about'), 'Register': require('es6-promise-loader!./register/register.component') }; </code></pre></div> <p dir="auto">Attempting to navigate to the <code class="notranslate">Register</code> component in this case produces the error above.</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.0.0-rc.3</li> <li><strong>Browser:</strong> [ Chrome 51 ]</li> <li><strong>Language:</strong> [ TypeScript 1.8.10 ]</li> </ul>
0
<p dir="auto"><strong>Apache Airflow version</strong>: 1.10.12</p> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>: Amazon EC2 instance, 4 CPU cores, 8GB RAM</li> <li><strong>OS</strong> (e.g. from /etc/os-release): Ubuntu 18.04.5 LTS (Bionic Beaver)</li> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): Linux ip-XX-XX-XX-XX.ec2.internal 5.4.0-1025-aws <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="88074834" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/25" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/25/hovercard" href="https://github.com/apache/airflow/pull/25">#25</a>~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux</li> <li><strong>Install tools</strong>: Ansible Airflow role (<a href="https://github.com/idealista/airflow-role">https://github.com/idealista/airflow-role</a>)</li> </ul> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">I've made a combination of example DAGs from Airflow documentation (Branching section and Trigger Rules section):</p> <details><summary>branching_dag.py</summary> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from airflow.models import DAG from airflow.operators.dummy_operator import DummyOperator from airflow.operators.bash_operator import BashOperator from airflow.operators.python_operator import BranchPythonOperator from airflow.utils.dates import days_ago from airflow.utils.trigger_rule import TriggerRule dag = DAG( dag_id='branching_dag', schedule_interval=None, start_date=days_ago(1) ) run_this_first = DummyOperator(task_id='run_this_first', dag=dag) branching = BranchPythonOperator( task_id='branching', dag=dag, python_callable=lambda: 'branch_a' ) branch_a = DummyOperator(task_id='branch_a', dag=dag) follow_branch_a = BashOperator(task_id='follow_branch_a', dag=dag, bash_command='sleep 30s') branch_b = DummyOperator(task_id='branch_b', dag=dag) join = DummyOperator(task_id='join', dag=dag, trigger_rule=TriggerRule.NONE_FAILED_OR_SKIPPED) run_this_first &gt;&gt; branching branching &gt;&gt; branch_a &gt;&gt; follow_branch_a &gt;&gt; join branching &gt;&gt; join branching &gt;&gt; branch_b &gt;&gt; join"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">models</span> <span class="pl-k">import</span> <span class="pl-v">DAG</span> <span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">dummy_operator</span> <span class="pl-k">import</span> <span class="pl-v">DummyOperator</span> <span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">bash_operator</span> <span class="pl-k">import</span> <span class="pl-v">BashOperator</span> <span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">python_operator</span> <span class="pl-k">import</span> <span class="pl-v">BranchPythonOperator</span> <span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">utils</span>.<span class="pl-s1">dates</span> <span class="pl-k">import</span> <span class="pl-s1">days_ago</span> <span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">utils</span>.<span class="pl-s1">trigger_rule</span> <span class="pl-k">import</span> <span class="pl-v">TriggerRule</span> <span class="pl-s1">dag</span> <span class="pl-c1">=</span> <span class="pl-v">DAG</span>( <span class="pl-s1">dag_id</span><span class="pl-c1">=</span><span class="pl-s">'branching_dag'</span>, <span class="pl-s1">schedule_interval</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">start_date</span><span class="pl-c1">=</span><span class="pl-en">days_ago</span>(<span class="pl-c1">1</span>) ) <span class="pl-s1">run_this_first</span> <span class="pl-c1">=</span> <span class="pl-v">DummyOperator</span>(<span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">'run_this_first'</span>, <span class="pl-s1">dag</span><span class="pl-c1">=</span><span class="pl-s1">dag</span>) <span class="pl-s1">branching</span> <span class="pl-c1">=</span> <span class="pl-v">BranchPythonOperator</span>( <span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">'branching'</span>, <span class="pl-s1">dag</span><span class="pl-c1">=</span><span class="pl-s1">dag</span>, <span class="pl-s1">python_callable</span><span class="pl-c1">=</span><span class="pl-k">lambda</span>: <span class="pl-s">'branch_a'</span> ) <span class="pl-s1">branch_a</span> <span class="pl-c1">=</span> <span class="pl-v">DummyOperator</span>(<span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">'branch_a'</span>, <span class="pl-s1">dag</span><span class="pl-c1">=</span><span class="pl-s1">dag</span>) <span class="pl-s1">follow_branch_a</span> <span class="pl-c1">=</span> <span class="pl-v">BashOperator</span>(<span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">'follow_branch_a'</span>, <span class="pl-s1">dag</span><span class="pl-c1">=</span><span class="pl-s1">dag</span>, <span class="pl-s1">bash_command</span><span class="pl-c1">=</span><span class="pl-s">'sleep 30s'</span>) <span class="pl-s1">branch_b</span> <span class="pl-c1">=</span> <span class="pl-v">DummyOperator</span>(<span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">'branch_b'</span>, <span class="pl-s1">dag</span><span class="pl-c1">=</span><span class="pl-s1">dag</span>) <span class="pl-s1">join</span> <span class="pl-c1">=</span> <span class="pl-v">DummyOperator</span>(<span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">'join'</span>, <span class="pl-s1">dag</span><span class="pl-c1">=</span><span class="pl-s1">dag</span>, <span class="pl-s1">trigger_rule</span><span class="pl-c1">=</span><span class="pl-v">TriggerRule</span>.<span class="pl-v">NONE_FAILED_OR_SKIPPED</span>) <span class="pl-s1">run_this_first</span> <span class="pl-c1">&gt;&gt;</span> <span class="pl-s1">branching</span> <span class="pl-s1">branching</span> <span class="pl-c1">&gt;&gt;</span> <span class="pl-s1">branch_a</span> <span class="pl-c1">&gt;&gt;</span> <span class="pl-s1">follow_branch_a</span> <span class="pl-c1">&gt;&gt;</span> <span class="pl-s1">join</span> <span class="pl-s1">branching</span> <span class="pl-c1">&gt;&gt;</span> <span class="pl-s1">join</span> <span class="pl-s1">branching</span> <span class="pl-c1">&gt;&gt;</span> <span class="pl-s1">branch_b</span> <span class="pl-c1">&gt;&gt;</span> <span class="pl-s1">join</span></pre></div> </details> <p dir="auto">Here is original image from Branching section of documentation:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/095598f70c036506ec251c55d76a2dc190855c811b0c9dc452e407a062b98a42/68747470733a2f2f616972666c6f772e6170616368652e6f72672f646f63732f737461626c652f5f696d616765732f6272616e63685f6e6f74652e706e67"><img src="https://camo.githubusercontent.com/095598f70c036506ec251c55d76a2dc190855c811b0c9dc452e407a062b98a42/68747470733a2f2f616972666c6f772e6170616368652e6f72672f646f63732f737461626c652f5f696d616765732f6272616e63685f6e6f74652e706e67" alt="original branching" data-canonical-src="https://airflow.apache.org/docs/stable/_images/branch_note.png" style="max-width: 100%;"></a><br> and here is image from Trigger Rules section:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/fa3259be524e748330c543918bc4884b11edcda33d39ebbd66ef4fefeb4825d9/68747470733a2f2f616972666c6f772e6170616368652e6f72672f646f63732f737461626c652f5f696d616765732f6272616e63685f776974685f747269676765722e706e67"><img src="https://camo.githubusercontent.com/fa3259be524e748330c543918bc4884b11edcda33d39ebbd66ef4fefeb4825d9/68747470733a2f2f616972666c6f772e6170616368652e6f72672f646f63732f737461626c652f5f696d616765732f6272616e63685f776974685f747269676765722e706e67" alt="original trigger rules" data-canonical-src="https://airflow.apache.org/docs/stable/_images/branch_with_trigger.png" style="max-width: 100%;"></a></p> <p dir="auto">According to DAG graph whichever branch would be selected, <code class="notranslate">join</code> task should be executed anyway. But I'm getting this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2358132/95450254-b2750c80-096e-11eb-9e97-32131bad7d9c.png"><img src="https://user-images.githubusercontent.com/2358132/95450254-b2750c80-096e-11eb-9e97-32131bad7d9c.png" alt="airflow-branching-problem" style="max-width: 100%;"></a></p> <p dir="auto">So, <code class="notranslate">join</code> task is skipped right after <code class="notranslate">branch_a</code> is selected.</p> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">According to documentation (Branching section):</p> <blockquote> <p dir="auto">Paths of the branching task are branch_a, join and branch_b. Since join is a downstream task of branch_a, it will be excluded from the skipped tasks when branch_a is returned by the Python callable.</p> </blockquote> <p dir="auto">and from Trigger rules section:</p> <blockquote> <p dir="auto">The join task will be triggered as soon as branch_false has been skipped (a valid completion state) and follow_branch_a has succeeded. Because skipped tasks will not cascade through none_failed_or_skipped.</p> </blockquote> <p dir="auto">But it's not fulfilled in practice.</p>
<p dir="auto"><strong>Apache Airflow version</strong>:</p> <p dir="auto">1.10.12</p> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">Seems that from 1.10.12 the behavior from BranchPythonOperator was reversed. A task after all branches would be excluded from the skipped tasks before but now it is skipped. This prevents empty branches.</p> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">Tasks after all branches should respect the trigger_rule and not be automatically skipped by the branch operator</p> <p dir="auto"><strong>How to reproduce it</strong>:</p> <p dir="auto">Run following code in a dag:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" def needs_some_extra_task(some_bool_field, **kwargs): if some_bool_field: return f&quot;extra_task&quot; else: return f&quot;final_task&quot; branch_op = BranchPythonOperator( dag=dag, task_id=f&quot;branch_task&quot;, provide_context=True, python_callable=needs_some_extra_task, op_kwargs={&quot;some_bool_field&quot;: True}, # For purposes of showing the problem ) # will be always ran in this example extra_op = DummyOperator( dag=dag, task_id=f&quot;extra_task&quot;, ) extra_op.set_upstream(branch_op) # will be skipped final_op = DummyOperator( dag=dag, task_id=&quot;final_task&quot;, trigger_rule=&quot;none_failed_or_skipped&quot;, ) final_op.set_upstream([extra_op, branch_op]) "><pre class="notranslate"> <span class="pl-k">def</span> <span class="pl-en">needs_some_extra_task</span>(<span class="pl-s1">some_bool_field</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>): <span class="pl-k">if</span> <span class="pl-s1">some_bool_field</span>: <span class="pl-k">return</span> <span class="pl-s">f"extra_task"</span> <span class="pl-k">else</span>: <span class="pl-k">return</span> <span class="pl-s">f"final_task"</span> <span class="pl-s1">branch_op</span> <span class="pl-c1">=</span> <span class="pl-v">BranchPythonOperator</span>( <span class="pl-s1">dag</span><span class="pl-c1">=</span><span class="pl-s1">dag</span>, <span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">f"branch_task"</span>, <span class="pl-s1">provide_context</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">python_callable</span><span class="pl-c1">=</span><span class="pl-s1">needs_some_extra_task</span>, <span class="pl-s1">op_kwargs</span><span class="pl-c1">=</span>{<span class="pl-s">"some_bool_field"</span>: <span class="pl-c1">True</span>}, <span class="pl-c"># For purposes of showing the problem</span> ) <span class="pl-c"># will be always ran in this example</span> <span class="pl-s1">extra_op</span> <span class="pl-c1">=</span> <span class="pl-v">DummyOperator</span>( <span class="pl-s1">dag</span><span class="pl-c1">=</span><span class="pl-s1">dag</span>, <span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">f"extra_task"</span>, ) <span class="pl-s1">extra_op</span>.<span class="pl-en">set_upstream</span>(<span class="pl-s1">branch_op</span>) <span class="pl-c"># will be skipped</span> <span class="pl-s1">final_op</span> <span class="pl-c1">=</span> <span class="pl-v">DummyOperator</span>( <span class="pl-s1">dag</span><span class="pl-c1">=</span><span class="pl-s1">dag</span>, <span class="pl-s1">task_id</span><span class="pl-c1">=</span><span class="pl-s">"final_task"</span>, <span class="pl-s1">trigger_rule</span><span class="pl-c1">=</span><span class="pl-s">"none_failed_or_skipped"</span>, ) <span class="pl-s1">final_op</span>.<span class="pl-en">set_upstream</span>([<span class="pl-s1">extra_op</span>, <span class="pl-s1">branch_op</span>])</pre></div> <p dir="auto"><strong>Temporary workaround</strong>:</p> <p dir="auto">Add dummy operators to any branch with no tasks</p>
1
<p dir="auto">Setting the collection of labels on a node can duplicate labels</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; curl -i -H &quot;Content-Type:application/json&quot; -H &quot;Accept:application/json&quot; -X POST 'http://localhost:7474/db/data/node/'"><pre class="notranslate"><code class="notranslate">&gt; curl -i -H "Content-Type:application/json" -H "Accept:application/json" -X POST 'http://localhost:7474/db/data/node/' </code></pre></div> <p dir="auto">Creates a new node with id 7</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; curl -i -H &quot;Content-Type:application/json&quot; -H &quot;Accept:application/json&quot; -X POST 'http://localhost:7474/db/data/node/7/labels' -d '&quot;FOOBAR&quot;'"><pre class="notranslate"><code class="notranslate">&gt; curl -i -H "Content-Type:application/json" -H "Accept:application/json" -X POST 'http://localhost:7474/db/data/node/7/labels' -d '"FOOBAR"' </code></pre></div> <p dir="auto">Adds a new label "FOOBAR", which succeeds and can be verified by GETting the labels for node 7</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; curl -i -H &quot;Content-Type:application/json&quot; -H &quot;Accept:application/json&quot; -X POST 'http://localhost:7474/db/data/node/7/labels' -d '[&quot;BAZQUX&quot;]'"><pre class="notranslate"><code class="notranslate">&gt; curl -i -H "Content-Type:application/json" -H "Accept:application/json" -X POST 'http://localhost:7474/db/data/node/7/labels' -d '["BAZQUX"]' </code></pre></div> <p dir="auto">Adds a new label "BAZQUX", which succeeds. GETting the labels for node 7 shows '[ "FOOBAR", "BAZQUX" ]'</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; curl -i -H &quot;Content-Type:application/json&quot; -H &quot;Accept:application/json&quot; -X PUT 'http://localhost:7474/db/data/node/7/labels' -d '[&quot;BAZQUX&quot;]'"><pre class="notranslate"><code class="notranslate">&gt; curl -i -H "Content-Type:application/json" -H "Accept:application/json" -X PUT 'http://localhost:7474/db/data/node/7/labels' -d '["BAZQUX"]' </code></pre></div> <p dir="auto">Also succeeds, but GETting the labels shows a duplicate label:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; curl -i -H &quot;Content-Type:application/json&quot; -H &quot;Accept:application/json&quot; -X GET 'http://localhost:7474/db/data/node/7/labels'"><pre class="notranslate"><code class="notranslate">&gt; curl -i -H "Content-Type:application/json" -H "Accept:application/json" -X GET 'http://localhost:7474/db/data/node/7/labels' </code></pre></div> <p dir="auto">'[ "BAZQUX", "BAZQUX" ]'</p> <p dir="auto">Deleting the label only deletes one copy of it</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; curl -i -H &quot;Content-Type:application/json&quot; -H &quot;Accept:application/json&quot; -X DELETE 'http://localhost:7474/db/data/node/7/labels/BAZQUX' &gt; curl -i -H &quot;Content-Type:application/json&quot; -H &quot;Accept:application/json&quot; -X GET 'http://localhost:7474/db/data/node/7/labels'"><pre class="notranslate"><code class="notranslate">&gt; curl -i -H "Content-Type:application/json" -H "Accept:application/json" -X DELETE 'http://localhost:7474/db/data/node/7/labels/BAZQUX' &gt; curl -i -H "Content-Type:application/json" -H "Accept:application/json" -X GET 'http://localhost:7474/db/data/node/7/labels' </code></pre></div> <p dir="auto">'[ "BAZQUX" ]'</p> <p dir="auto">Attempting to delete the label gives a 500 server error and leaves the following stack trace in the log:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="==&gt; data/log/neo4j.0.0.log &lt;== Oct 03, 2013 12:57:00 AM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container java.lang.IllegalStateException: Label 0 not found. at org.neo4j.kernel.impl.nioneo.store.labels.LabelIdArray.filter(LabelIdArray.java:60) at org.neo4j.kernel.impl.nioneo.store.labels.InlineNodeLabels.remove(InlineNodeLabels.java:82) at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.removeLabelFromNode(WriteTransaction.java:2165) at org.neo4j.kernel.impl.persistence.PersistenceManager.removeLabelFromNode(PersistenceManager.java:411) at org.neo4j.kernel.impl.api.state.TxStateImpl.nodeDoRemoveLabel(TxStateImpl.java:378) at org.neo4j.kernel.impl.api.StateHandlingStatementOperations.nodeRemoveLabel(StateHandlingStatementOperations.java:168) at org.neo4j.kernel.api.operations.ConstraintEnforcingEntityOperations.nodeRemoveLabel(ConstraintEnforcingEntityOperations.java:144) at org.neo4j.kernel.impl.api.LockingStatementOperations.nodeRemoveLabel(LockingStatementOperations.java:82) at org.neo4j.kernel.api.OperationsFacade.nodeRemoveLabel(OperationsFacade.java:454) at org.neo4j.kernel.impl.core.NodeProxy.removeLabel(NodeProxy.java:531) at org.neo4j.server.rest.web.DatabaseActions.removeLabelFromNode(DatabaseActions.java:369) at org.neo4j.server.rest.web.RestfulGraphDatabase.removeNodeLabel(RestfulGraphDatabase.java:510) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:132) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1506) at org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1477) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:211) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1096) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:432) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1030) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:445) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:268) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532) at java.lang.Thread.run(Thread.java:724)"><pre class="notranslate"><code class="notranslate">==&gt; data/log/neo4j.0.0.log &lt;== Oct 03, 2013 12:57:00 AM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container java.lang.IllegalStateException: Label 0 not found. at org.neo4j.kernel.impl.nioneo.store.labels.LabelIdArray.filter(LabelIdArray.java:60) at org.neo4j.kernel.impl.nioneo.store.labels.InlineNodeLabels.remove(InlineNodeLabels.java:82) at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.removeLabelFromNode(WriteTransaction.java:2165) at org.neo4j.kernel.impl.persistence.PersistenceManager.removeLabelFromNode(PersistenceManager.java:411) at org.neo4j.kernel.impl.api.state.TxStateImpl.nodeDoRemoveLabel(TxStateImpl.java:378) at org.neo4j.kernel.impl.api.StateHandlingStatementOperations.nodeRemoveLabel(StateHandlingStatementOperations.java:168) at org.neo4j.kernel.api.operations.ConstraintEnforcingEntityOperations.nodeRemoveLabel(ConstraintEnforcingEntityOperations.java:144) at org.neo4j.kernel.impl.api.LockingStatementOperations.nodeRemoveLabel(LockingStatementOperations.java:82) at org.neo4j.kernel.api.OperationsFacade.nodeRemoveLabel(OperationsFacade.java:454) at org.neo4j.kernel.impl.core.NodeProxy.removeLabel(NodeProxy.java:531) at org.neo4j.server.rest.web.DatabaseActions.removeLabelFromNode(DatabaseActions.java:369) at org.neo4j.server.rest.web.RestfulGraphDatabase.removeNodeLabel(RestfulGraphDatabase.java:510) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:132) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1506) at org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1477) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:211) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1096) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:432) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1030) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:445) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:268) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532) at java.lang.Thread.run(Thread.java:724) </code></pre></div>
<p dir="auto">I have a single tuple / triple, say nodes A and B with a relationship R.</p> <p dir="auto">If I return the triple by specifying the Ids for A and B:=</p> <div class="highlight highlight-source-cypher notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="MATCH (a)-[conn]-&gt;(b) WHERE a.`object ID`=1660 AND b.`object ID`=1659 RETURN a As startSt,b As endSt,conn As relationship"><pre class="notranslate"><span class="pl-k">MATCH</span> (<span class="pl-smi">a</span>)<span class="pl-c1">-</span><span class="pl-k">[</span><span class="pl-smi">conn</span><span class="pl-k">]</span><span class="pl-c1">-&gt;</span>(<span class="pl-smi">b</span>) <span class="pl-k">WHERE</span> <span class="pl-smi">a</span>.<span class="pl-smi">`object ID`</span><span class="pl-k">=</span><span class="pl-c1">1660</span> <span class="pl-k">AND</span> <span class="pl-smi">b</span>.<span class="pl-smi">`object ID`</span><span class="pl-k">=</span><span class="pl-c1">1659</span> <span class="pl-k">RETURN</span> <span class="pl-smi">a</span> <span class="pl-k">As</span> <span class="pl-smi">startSt</span>,<span class="pl-smi">b</span> <span class="pl-k">As</span> <span class="pl-smi">endSt</span>,<span class="pl-smi">conn</span> <span class="pl-k">As</span> <span class="pl-smi">relationship</span></pre></div> <p dir="auto">and export as JSON I get the 2 nodes (A and B) under 'nodes' followed by the connector under 'relationships'.</p> <p dir="auto">If, however, I just match the connector to return the triple:-</p> <div class="highlight highlight-source-cypher notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="MATCH (a)-[conn {`connector ID`: 1048}]-(b) RETURN a As startSt,b As endSt,conn As relationship"><pre class="notranslate"><span class="pl-k">MATCH</span> (<span class="pl-smi">a</span>)<span class="pl-c1">-</span><span class="pl-k">[</span><span class="pl-smi">conn</span> <span class="pl-s1"><span class="pl-k">{</span><span class="pl-smi">`connector ID`</span><span class="pl-k">:</span> <span class="pl-c1">1048</span><span class="pl-k">}</span></span><span class="pl-k">]</span><span class="pl-c1">-</span>(<span class="pl-smi">b</span>) <span class="pl-k">RETURN</span> <span class="pl-smi">a</span> <span class="pl-k">As</span> <span class="pl-smi">startSt</span>,<span class="pl-smi">b</span> <span class="pl-k">As</span> <span class="pl-smi">endSt</span>,<span class="pl-smi">conn</span> <span class="pl-k">As</span> <span class="pl-smi">relationship</span></pre></div> <p dir="auto">I get a different result in the JSON - I get two identical rows, each consisting of the nodes A, B followed by the relationship R.</p> <p dir="auto">In both cases the display of the single triple is identical as you'd expect. This appears to be a bug since in the second case the single triple displayed is described twice in the JSON output.</p>
0
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">tower_job_list module but I believe that also the other tower_* module have the same error</p> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">$ ./build/scripts-2.7/ansible --version<br> ansible 2.4.0<br> config file = /etc/ansible/ansible.cfg<br> configured module search path = [u'/home/gsciorti/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']<br> ansible python module location = /home/gsciorti/PycharmProjects/ansible/build/lib/ansible<br> executable location = ./build/scripts-2.7/ansible<br> python version = 2.7.13 (default, May 10 2017, 20:04:28) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]</p> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">No ansible.cfg configuration</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">$ cat /etc/redhat-release<br> Fedora release 25 (Twenty Five)</p> <p dir="auto">$ pip freeze|grep ansible-tower-cli<br> ansible-tower-cli==3.1.6</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">If you run the tower_job_list module with or without argument it fails with the error "NameError: global name 'tower_argument_spec' is not defined". Also the other tower_* module have the same part of code</p> <p dir="auto">Note: you don't need any Ansible Tower to reproduce this issue</p> <p dir="auto">I'm interested to know if other people can reproduce the same problem because I'm interested to fix it if it's a bug</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ./build/scripts-2.7/ansible localhost -m tower_job_list An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: global name 'tower_argument_spec' is not defined localhost | FAILED! =&gt; { &quot;changed&quot;: false, &quot;failed&quot;: true, &quot;module_stderr&quot;: &quot;Traceback (most recent call last):\n File \&quot;/tmp/ansible_oP4Pvj/ansible_module_tower_job_list.py\&quot;, line 141, in &lt;module&gt;\n main()\n File \&quot;/tmp/ansible_oP4Pvj/ansible_module_tower_job_list.py\&quot;, line 102, in main\n argument_spec = tower_argument_spec()\nNameError: global name 'tower_argument_spec' is not defined\n&quot;, &quot;module_stdout&quot;: &quot;&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot;, &quot;rc&quot;: 0 }"><pre class="notranslate"><code class="notranslate">$ ./build/scripts-2.7/ansible localhost -m tower_job_list An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: global name 'tower_argument_spec' is not defined localhost | FAILED! =&gt; { "changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_oP4Pvj/ansible_module_tower_job_list.py\", line 141, in &lt;module&gt;\n main()\n File \"/tmp/ansible_oP4Pvj/ansible_module_tower_job_list.py\", line 102, in main\n argument_spec = tower_argument_spec()\nNameError: global name 'tower_argument_spec' is not defined\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0 } </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">The execution of the module or an error message about the missing Tower connection information</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ./build/scripts-2.7/ansible localhost -m tower_job_list An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: global name 'tower_argument_spec' is not defined localhost | FAILED! =&gt; { &quot;changed&quot;: false, &quot;failed&quot;: true, &quot;module_stderr&quot;: &quot;Traceback (most recent call last):\n File \&quot;/tmp/ansible_oP4Pvj/ansible_module_tower_job_list.py\&quot;, line 141, in &lt;module&gt;\n main()\n File \&quot;/tmp/ansible_oP4Pvj/ansible_module_tower_job_list.py\&quot;, line 102, in main\n argument_spec = tower_argument_spec()\nNameError: global name 'tower_argument_spec' is not defined\n&quot;, &quot;module_stdout&quot;: &quot;&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot;, &quot;rc&quot;: 0 }"><pre class="notranslate"><code class="notranslate">$ ./build/scripts-2.7/ansible localhost -m tower_job_list An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: global name 'tower_argument_spec' is not defined localhost | FAILED! =&gt; { "changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_oP4Pvj/ansible_module_tower_job_list.py\", line 141, in &lt;module&gt;\n main()\n File \"/tmp/ansible_oP4Pvj/ansible_module_tower_job_list.py\", line 102, in main\n argument_spec = tower_argument_spec()\nNameError: global name 'tower_argument_spec' is not defined\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0 } </code></pre></div>
<h5 dir="auto">Issue Type: Feature Idea</h5> <h5 dir="auto">Ansible Version: ansible 1.7.1</h5> <h5 dir="auto">Environment: Ubuntu 14.04</h5> <h5 dir="auto">Summary:</h5> <p dir="auto">I request a feature to allow me to specify what filename the apt_repository creates</p> <p dir="auto">apt_repository: repo='deb <a href="http://archive.canonical.com/ubuntu" rel="nofollow">http://archive.canonical.com/ubuntu</a> hardy partner' state=present filename=hardy-partner.list</p> <h5 dir="auto">Steps To Reproduce:</h5> <p dir="auto">When I add a repo such as:<br> deb <a href="http://dl.google.com/linux/talkplugin/deb/" rel="nofollow">http://dl.google.com/linux/talkplugin/deb/</a> stable main</p> <p dir="auto">A file is created named:<br> dl_google_com_linux_chrome_deb.list</p> <p dir="auto">When I install the package google-chrome-stable, which comes from this repo, it creates:<br> google-chrome.list</p> <p dir="auto">With the same repo content, so apt-get complains about duplicate entries</p> <h5 dir="auto">Expected Results:</h5> <p dir="auto">Clean repository</p> <h5 dir="auto">Actual Results:</h5> <p dir="auto">Duplicated repo entries</p>
0
<p dir="auto">Add a <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/var/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/var">@var</a> for inputs border color on focus :</p> <p dir="auto">&amp;:focus {<br> border-color: rgba(82,168,236,.8);<br> outline: 0;<br> .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");<br> }</p>
<p dir="auto">I would like to reopen the issue 517. Thx</p> <p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2102106" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/517" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/517/hovercard" href="https://github.com/twbs/bootstrap/issues/517">#517</a></p>
1
<h3 dir="auto">Preflight Checklist</h3> <p dir="auto">I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.<br> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.<br> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</p> <h3 dir="auto">Electron Version</h3> <p dir="auto">9.4.4, 10.4.2, 11.4.2, 12.0.2</p> <h3 dir="auto">What operating system are you using?</h3> <p dir="auto">macOS</p> <h3 dir="auto">Operating System Version</h3> <p dir="auto">11.2.2</p> <h3 dir="auto">What arch are you using?</h3> <p dir="auto">x64</p> <h3 dir="auto">Last Known Working Electron version</h3> <ul dir="auto"> <li></li> </ul> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">App works</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">App crashes</p> <h3 dir="auto">Testcase Gist URL</h3> <p dir="auto"><a href="https://gist.github.com/mahnunchik/aaef0dffd6c03020b80c58925f31d2af">https://gist.github.com/mahnunchik/aaef0dffd6c03020b80c58925f31d2af</a></p> <p dir="auto">But removing callback call from the <code class="notranslate">registerStringProtocol</code> handler keeps app working.</p>
<ul dir="auto"> <li>Electron version: 1.3.4</li> <li>Operating system: OS X</li> </ul> <p dir="auto">I'd be great to be able to access the history inside a webview, across multiple pages. Basically, it'd help us tremendously if we didn't have to duplicate the <code class="notranslate">history</code> store from <a href="https://github.com/electron/electron/blob/df3f0a45164ff990e7b94bc7aa485b4659280755/lib/browser/api/navigation-controller.js">https://github.com/electron/electron/blob/df3f0a45164ff990e7b94bc7aa485b4659280755/lib/browser/api/navigation-controller.js</a></p>
0
<p dir="auto">Syntaxnet package was built, tf package ver 1.01 was installed from repo by pip as dependency. Fortunately tf installed following these instructions <a href="https://www.tensorflow.org/versions/r0.10/get_started/os_setup#create_the_pip_package_and_install" rel="nofollow">https://www.tensorflow.org/versions/r0.10/get_started/os_setup#create_the_pip_package_and_install</a> works fine.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[New LWP 31764] [Thread debugging using libthread_db enabled] Using host libthread_db library &quot;/lib/x86_64-linux-gnu/libthread_db.so.1&quot;. Core was generated by `python2 -c from syntaxnet import load_parser_ops'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f3303cf0d47 in std::_Hash_bytes(void const*, unsigned long, unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (gdb) bt #0 0x00007f3303cf0d47 in std::_Hash_bytes(void const*, unsigned long, unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x00007f33065f509c in tensorflow::FileSystemRegistryImpl::Register(std::string const&amp;, std::function&lt;tensorflow::FileSystem* ()&gt;) () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #2 0x00007f33065f26b3 in tensorflow::Env::RegisterFileSystem(std::string const&amp;, std::function&lt;tensorflow::FileSystem* ()&gt;) () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #3 0x00007f3328d327b5 in _GLOBAL__sub_I_env.cc () from /usr/local/lib/python2.7/dist-packages/syntaxnet/parser_ops.so #4 0x00007f3332df04ea in call_init (l=&lt;optimized out&gt;, argc=argc@entry=3, argv=argv@entry=0x7ffe61a27428, env=env@entry=0x265a8b0) at dl-init.c:72 #5 0x00007f3332df05fb in call_init (env=0x265a8b0, argv=0x7ffe61a27428, argc=3, l=&lt;optimized out&gt;) at dl-init.c:30 #6 _dl_init (main_map=main_map@entry=0x2a41360, argc=3, argv=0x7ffe61a27428, env=0x265a8b0) at dl-init.c:120 #7 0x00007f3332df5712 in dl_open_worker (a=a@entry=0x7ffe61a263e0) at dl-open.c:575 #8 0x00007f3332df0394 in _dl_catch_error (objname=objname@entry=0x7ffe61a263d0, errstring=errstring@entry=0x7ffe61a263d8, mallocedp=mallocedp@entry=0x7ffe61a263cf, operate=operate@entry=0x7f3332df5300 &lt;dl_open_worker&gt;, args=args@entry=0x7ffe61a263e0) at dl-error.c:187 #9 0x00007f3332df4bd9 in _dl_open (file=0x7f332e1634cc &quot;/usr/local/lib/python2.7/dist-packages/syntaxnet/parser_ops.so&quot;, mode=-2147483646, caller_dlopen=0x7f33065fa9ea &lt;tensorflow::internal::LoadLibrary(char const*, void**)+26&gt;, nsid=-2, argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;, env=0x265a8b0) at dl-open.c:660 #10 0x00007f33325f6f09 in dlopen_doit (a=a@entry=0x7ffe61a26610) at dlopen.c:66 #11 0x00007f3332df0394 in _dl_catch_error (objname=0x252e0d0, errstring=0x252e0d8, mallocedp=0x252e0c8, operate=0x7f33325f6eb0 &lt;dlopen_doit&gt;, args=0x7ffe61a26610) at dl-error.c:187 #12 0x00007f33325f7571 in _dlerror_run (operate=operate@entry=0x7f33325f6eb0 &lt;dlopen_doit&gt;, args=args@entry=0x7ffe61a26610) at dlerror.c:163 #13 0x00007f33325f6fa1 in __dlopen (file=&lt;optimized out&gt;, mode=&lt;optimized out&gt;) at dlopen.c:87 #14 0x00007f33065fa9ea in tensorflow::internal::LoadLibrary(char const*, void**) () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #15 0x00007f33065f9b97 in tensorflow::(anonymous namespace)::PosixEnv::LoadLibrary(char const*, void**) () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #16 0x00007f33064f6f93 in tensorflow::LoadLibrary(char const*, void**, void const**, unsigned long*) () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #17 0x00007f3304e11e67 in TF_LoadLibrary () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #18 0x00007f3304d1206a in _wrap_TF_LoadLibrary () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #19 0x00000000004c468a in PyEval_EvalFrameEx () #20 0x00000000004c2765 in PyEval_EvalCodeEx () #21 0x00000000004ca8d1 in PyEval_EvalFrameEx () #22 0x00000000004c2765 in PyEval_EvalCodeEx () #23 0x00000000004c2509 in PyEval_EvalCode () #24 0x00000000004c061b in PyImport_ExecCodeModuleEx () #25 0x00000000004bd6ee in ?? () #26 0x00000000004afbad in ?? () #27 0x00000000004af7e9 in PyImport_ImportModuleLevel () #28 0x00000000004b0f78 in ?? () #29 0x00000000004b0cb3 in PyObject_Call () #30 0x00000000004ce5d0 in PyEval_CallObjectWithKeywords () #31 0x00000000004c6ed6 in PyEval_EvalFrameEx () #32 0x00000000004c2765 in PyEval_EvalCodeEx () #33 0x00000000004c2509 in PyEval_EvalCode () #34 0x0000000000521186 in PyRun_StringFlags () #35 0x0000000000521dfc in PyRun_SimpleStringFlags () #36 0x000000000049de94 in Py_Main () #37 0x00007f333281a830 in __libc_start_main (main=0x49dab0 &lt;main&gt;, argc=3, argv=0x7ffe61a27428, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7ffe61a27418) at ../csu/libc-start.c:291 #38 0x000000000049d9d9 in _start ()"><pre class="notranslate"><code class="notranslate">[New LWP 31764] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `python2 -c from syntaxnet import load_parser_ops'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f3303cf0d47 in std::_Hash_bytes(void const*, unsigned long, unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (gdb) bt #0 0x00007f3303cf0d47 in std::_Hash_bytes(void const*, unsigned long, unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x00007f33065f509c in tensorflow::FileSystemRegistryImpl::Register(std::string const&amp;, std::function&lt;tensorflow::FileSystem* ()&gt;) () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #2 0x00007f33065f26b3 in tensorflow::Env::RegisterFileSystem(std::string const&amp;, std::function&lt;tensorflow::FileSystem* ()&gt;) () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #3 0x00007f3328d327b5 in _GLOBAL__sub_I_env.cc () from /usr/local/lib/python2.7/dist-packages/syntaxnet/parser_ops.so #4 0x00007f3332df04ea in call_init (l=&lt;optimized out&gt;, argc=argc@entry=3, argv=argv@entry=0x7ffe61a27428, env=env@entry=0x265a8b0) at dl-init.c:72 #5 0x00007f3332df05fb in call_init (env=0x265a8b0, argv=0x7ffe61a27428, argc=3, l=&lt;optimized out&gt;) at dl-init.c:30 #6 _dl_init (main_map=main_map@entry=0x2a41360, argc=3, argv=0x7ffe61a27428, env=0x265a8b0) at dl-init.c:120 #7 0x00007f3332df5712 in dl_open_worker (a=a@entry=0x7ffe61a263e0) at dl-open.c:575 #8 0x00007f3332df0394 in _dl_catch_error (objname=objname@entry=0x7ffe61a263d0, errstring=errstring@entry=0x7ffe61a263d8, mallocedp=mallocedp@entry=0x7ffe61a263cf, operate=operate@entry=0x7f3332df5300 &lt;dl_open_worker&gt;, args=args@entry=0x7ffe61a263e0) at dl-error.c:187 #9 0x00007f3332df4bd9 in _dl_open (file=0x7f332e1634cc "/usr/local/lib/python2.7/dist-packages/syntaxnet/parser_ops.so", mode=-2147483646, caller_dlopen=0x7f33065fa9ea &lt;tensorflow::internal::LoadLibrary(char const*, void**)+26&gt;, nsid=-2, argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;, env=0x265a8b0) at dl-open.c:660 #10 0x00007f33325f6f09 in dlopen_doit (a=a@entry=0x7ffe61a26610) at dlopen.c:66 #11 0x00007f3332df0394 in _dl_catch_error (objname=0x252e0d0, errstring=0x252e0d8, mallocedp=0x252e0c8, operate=0x7f33325f6eb0 &lt;dlopen_doit&gt;, args=0x7ffe61a26610) at dl-error.c:187 #12 0x00007f33325f7571 in _dlerror_run (operate=operate@entry=0x7f33325f6eb0 &lt;dlopen_doit&gt;, args=args@entry=0x7ffe61a26610) at dlerror.c:163 #13 0x00007f33325f6fa1 in __dlopen (file=&lt;optimized out&gt;, mode=&lt;optimized out&gt;) at dlopen.c:87 #14 0x00007f33065fa9ea in tensorflow::internal::LoadLibrary(char const*, void**) () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #15 0x00007f33065f9b97 in tensorflow::(anonymous namespace)::PosixEnv::LoadLibrary(char const*, void**) () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #16 0x00007f33064f6f93 in tensorflow::LoadLibrary(char const*, void**, void const**, unsigned long*) () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #17 0x00007f3304e11e67 in TF_LoadLibrary () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #18 0x00007f3304d1206a in _wrap_TF_LoadLibrary () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so #19 0x00000000004c468a in PyEval_EvalFrameEx () #20 0x00000000004c2765 in PyEval_EvalCodeEx () #21 0x00000000004ca8d1 in PyEval_EvalFrameEx () #22 0x00000000004c2765 in PyEval_EvalCodeEx () #23 0x00000000004c2509 in PyEval_EvalCode () #24 0x00000000004c061b in PyImport_ExecCodeModuleEx () #25 0x00000000004bd6ee in ?? () #26 0x00000000004afbad in ?? () #27 0x00000000004af7e9 in PyImport_ImportModuleLevel () #28 0x00000000004b0f78 in ?? () #29 0x00000000004b0cb3 in PyObject_Call () #30 0x00000000004ce5d0 in PyEval_CallObjectWithKeywords () #31 0x00000000004c6ed6 in PyEval_EvalFrameEx () #32 0x00000000004c2765 in PyEval_EvalCodeEx () #33 0x00000000004c2509 in PyEval_EvalCode () #34 0x0000000000521186 in PyRun_StringFlags () #35 0x0000000000521dfc in PyRun_SimpleStringFlags () #36 0x000000000049de94 in Py_Main () #37 0x00007f333281a830 in __libc_start_main (main=0x49dab0 &lt;main&gt;, argc=3, argv=0x7ffe61a27428, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7ffe61a27418) at ../csu/libc-start.c:291 #38 0x000000000049d9d9 in _start () </code></pre></div>
<p dir="auto">TensorFlow currently statically links all dependencies. This sometimes causes hard-to-diagnose crashes (e.g. segfaults) when another version of a dependency is loaded into the process. This can even happen within TensorFlow if separate TensorFlow .so's are loaded into the same Python process.</p> <p dir="auto">Possible solutions would be to reduce the visibility of these symbols, dynamically link common libraries, or run TF in a separate process.</p> <p dir="auto">Known problematic libraries:</p> <ul dir="auto"> <li>protobuf (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="214164470" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/8403" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/8403/hovercard" href="https://github.com/tensorflow/tensorflow/issues/8403">#8403</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="214044373" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/8394" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/8394/hovercard" href="https://github.com/tensorflow/tensorflow/issues/8394">#8394</a>)</li> <li>OpenCL, OpenCV (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="206420215" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/7378" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/7378/hovercard" href="https://github.com/tensorflow/tensorflow/issues/7378">#7378</a>)</li> </ul> <p dir="auto">Other related issues:</p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="207378417" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/7480" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/7480/hovercard" href="https://github.com/tensorflow/tensorflow/issues/7480">#7480</a></li> </ul>
1
<h3 dir="auto">Bug report</h3> <p dir="auto">Markers disappear if I use markerfacecolor='None', when saving as eps file. if I save as png file, they are correctly displayed.<br> Note that markeredgewidth is correctly set to a non zero value and markeredgecolor is correctly set to a color. As I said, the figure is correctly produced when saved as png, so it should really work similarly for eps figure, but it doesn't.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <p dir="auto">I'm too lazy for a complete reproducible example. But here are the relevant lines.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="axe.plot(x, y, linestyle = '-', linewidth=0.5, marker = 's', markeredgewidth = 0.5, label='something', c lip_on= False, markersize = '3',markerfacecolor='None', markeredgecolor='green', color='green') plt.savefig('another_name_come_on_not_this_again.png', format='png', dpi=400) plt.savefig('another_name_come_on_not_this_again.eps', format='eps', dpi=400)"><pre class="notranslate"><span class="pl-s1">axe</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>, <span class="pl-s1">linestyle</span> <span class="pl-c1">=</span> <span class="pl-s">'-'</span>, <span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>, <span class="pl-s1">marker</span> <span class="pl-c1">=</span> <span class="pl-s">'s'</span>, <span class="pl-s1">markeredgewidth</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">'something'</span>, <span class="pl-s1">c</span> <span class="pl-s1">lip_on</span><span class="pl-c1">=</span> <span class="pl-c1">False</span>, <span class="pl-s1">markersize</span> <span class="pl-c1">=</span> <span class="pl-s">'3'</span>,<span class="pl-s1">markerfacecolor</span><span class="pl-c1">=</span><span class="pl-s">'None'</span>, <span class="pl-s1">markeredgecolor</span><span class="pl-c1">=</span><span class="pl-s">'green'</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'green'</span>) <span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'another_name_come_on_not_this_again.png'</span>, <span class="pl-s1">format</span><span class="pl-c1">=</span><span class="pl-s">'png'</span>, <span class="pl-s1">dpi</span><span class="pl-c1">=</span><span class="pl-c1">400</span>) <span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'another_name_come_on_not_this_again.eps'</span>, <span class="pl-s1">format</span><span class="pl-c1">=</span><span class="pl-s">'eps'</span>, <span class="pl-s1">dpi</span><span class="pl-c1">=</span><span class="pl-c1">400</span>)</pre></div> <p dir="auto">Only the line is displayed. No marker.</p> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">As said above, the edges of the makers should be displayed, as in the case when the picture is saved as png. But they aren't.</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: GNU/Arch Linux.</li> <li>Matplotlib version: 2.2.2.</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): Qt5Agg</li> <li>Python version: 3.7.0.</li> </ul>
<h3 dir="auto">Symbols are missing from eps format</h3> <p dir="auto"><strong>When I save a figure in eps format, the symbols that have no facecolor are not showing. This happened after I updated to the latest version.</strong></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 matplotlib.pyplot as plt plt.plot([1,2,3],[2,1,3],'ko',markerfacecolor='None') plt.plot([1,2,3],[2,1,3],'k') plt.savefig('not_working.eps') plt.savefig('working.eps')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">plt</span>.<span class="pl-en">plot</span>([<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>],[<span class="pl-c1">2</span>,<span class="pl-c1">1</span>,<span class="pl-c1">3</span>],<span class="pl-s">'ko'</span>,<span class="pl-s1">markerfacecolor</span><span class="pl-c1">=</span><span class="pl-s">'None'</span>) <span class="pl-s1">plt</span>.<span class="pl-en">plot</span>([<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>],[<span class="pl-c1">2</span>,<span class="pl-c1">1</span>,<span class="pl-c1">3</span>],<span class="pl-s">'k'</span>) <span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'not_working.eps'</span>) <span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'working.eps'</span>)</pre></div> <p dir="auto">I would expect empty circles (as will show if you save it as png), but they are missing when saved as eps.</p> <p dir="auto">Unfortunately I don't remember the last version I was using and was working before updating.</p> <ul dir="auto"> <li>Operating system: Windows 7</li> <li>Matplotlib version: 2.2.2</li> <li>Matplotlib backend: Qt5Agg</li> <li>Python version: 3.6.5</li> <li>Spyder version: 3.2.8</li> </ul> <p dir="auto">I did a batch update and didn't notice this only a week after.</p>
1
<h2 dir="auto">Bug Report</h2> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">4.0.1</p> <h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3> <p dir="auto">Sharding-JDBC</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">I modify the Data ID of nacos: .shardingDataSource.config.schema.logic_db.rule content<br> For example: actualDataNodes hope to change the configuration of the shard table</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">nothing happened</p> <h3 dir="auto">Reason analyze (If you can)</h3> <p dir="auto">not watch the key .shardingDataSource.config.schema.logic_db.rule</p> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <p dir="auto">modify the Data ID of nacos: .shardingDataSource.config.schema.logic_db.rule content</p> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> <p dir="auto">the spring xml</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;orchestraion:registry-center id=&quot;regCenter&quot; type=&quot;nacos&quot; server-lists=&quot;localhost:8848&quot; namespace=&quot;728acf9f-34fb-42fd-af25-984de5686535&quot; operation-timeout-milliseconds=&quot;3000&quot; max-retries=&quot;3&quot;/&gt; &lt;orchestraion:sharding-data-source id=&quot;shardingDataSource&quot; registry-center-ref=&quot;regCenter&quot; overwrite=&quot;false&quot;/&gt;"><pre class="notranslate"><code class="notranslate">&lt;orchestraion:registry-center id="regCenter" type="nacos" server-lists="localhost:8848" namespace="728acf9f-34fb-42fd-af25-984de5686535" operation-timeout-milliseconds="3000" max-retries="3"/&gt; &lt;orchestraion:sharding-data-source id="shardingDataSource" registry-center-ref="regCenter" overwrite="false"/&gt; </code></pre></div> <p dir="auto">the nacos dataId:.shardingDataSource.config.schema.logic_db.rule content:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tables: log_process: actualDataNodes: dataSource.log_process,dataSource.log_process_2020_$-&gt;{4..12} keyGenerator: column: id props: worker.id: '421' type: SNOWFLAKE logicTable: log_process tableStrategy: standard: preciseAlgorithmClassName: com.xxx.base.shardingjdbc.shardingAlgorithm.IDPrecise shardingColumn: id "><pre class="notranslate"><code class="notranslate">tables: log_process: actualDataNodes: dataSource.log_process,dataSource.log_process_2020_$-&gt;{4..12} keyGenerator: column: id props: worker.id: '421' type: SNOWFLAKE logicTable: log_process tableStrategy: standard: preciseAlgorithmClassName: com.xxx.base.shardingjdbc.shardingAlgorithm.IDPrecise shardingColumn: id </code></pre></div> <p dir="auto">I found that modifying .shardingDataSource.config.props is effective,but shardingDataSource.config.schema.logic_db.rule</p>
<h2 dir="auto">Bug Report</h2> <p dir="auto">when execute sql that likes follow<br> insert into product_source_list (product_code,store_code,primary_supplier,condition_no,supplier_code,return_mark,purchase_price,price_unit,order_unit,article_no,begin_time,expiration_time,type,creation_date,issued_time,external_id,archived,version) values (?, ?,?, ?,?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,0) on duplicate key update product_code = if(@update_condition :=(issued_time &lt; values(issued_time)),values(product_code),product_code),store_code = if(@update_condition,values(store_code),store_code),supplier_code = if(@update_condition,values(supplier_code),supplier_code),return_mark = if(@update_condition,values(return_mark),return_mark),purchase_price = if(@update_condition,values(purchase_price),purchase_price),price_unit = if(@update_condition,values(price_unit),price_unit),order_unit = if(@update_condition,values(order_unit),order_unit),primary_supplier = if(@update_condition,values(primary_supplier),primary_supplier),article_no = if(@update_condition,values(article_no),article_no),begin_time = if(@update_condition,values(begin_time),begin_time),expiration_time = if(@update_condition,values(expiration_time),expiration_time),type = if(@update_condition,values(type),type),archived = if(@update_condition,values(archived),archived),external_id = if(@update_condition,values(external_id),external_id),version = if(@update_condition,version +1,version),issued_time = if(@update_condition,values(issued_time),issued_time)<br> occurs IllegaStateException<br> details:<br> java.lang.IllegalStateException<br> at com.google.common.base.Preconditions.checkState(Preconditions.java:158)<br> at org.apache.shardingsphere.core.parse.core.extractor.util.ExtractorUtils.getFirstChildNode(ExtractorUtils.java:48)<br> at org.apache.shardingsphere.core.parse.core.extractor.impl.common.column.ColumnExtractor.getColumnSegment(ColumnExtractor.java:45)<br> at org.apache.shardingsphere.core.parse.core.extractor.impl.common.column.ColumnExtractor.extract(ColumnExtractor.java:41)<br> at org.apache.shardingsphere.core.parse.core.extractor.impl.common.column.ColumnsExtractor.extract(ColumnsExtractor.java:44)<br> at org.apache.shardingsphere.core.parse.core.extractor.SQLSegmentsExtractorEngine.extract(SQLSegmentsExtractorEngine.java:52)<br> at org.apache.shardingsphere.core.parse.core.SQLParseKernel.parse(SQLParseKernel.java:62)<br> at org.apache.shardingsphere.core.parse.SQLParseEngine.parse0(SQLParseEngine.java:71)<br> at org.apache.shardingsphere.core.parse.SQLParseEngine.parse(SQLParseEngine.java:53)<br> at org.apache.shardingsphere.core.route.router.masterslave.MasterSlaveRouter.route(MasterSlaveRouter.java:56)<br> at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.MasterSlavePreparedStatement.(MasterSlavePreparedStatement.java:63)<br> at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.MasterSlavePreparedStatement.(MasterSlavePreparedStatement.java:51)<br> at org.apache.shardingsphere.shardingjdbc.jdbc.core.connection.MasterSlaveConnection.prepareStatement(MasterSlaveConnection.java:76)<br> at org.springframework.jdbc.core.JdbcTemplate$SimplePreparedStatementCreator.createPreparedStatement(JdbcTemplate.java:1555)<br> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:614)<br> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:646)<br> at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.java:935)<br> at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.batchUpdate(NamedParameterJdbcTemplate.java:365)<br> at com.cbest.platform.product.core.service.impl.ProductSourceListServiceImpl.saveOrUpdateIfNecessary(ProductSourceListServiceImpl.java:127)<br> at com.cbest.platform.product.core.service.impl.ProductSourceListServiceImpl$$FastClassBySpringCGLIB$$78117739.invoke()<br> at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)<br> at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)<br> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)<br> at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)<br> at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)<br> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)<br> at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)<br> at com.cbest.platform.product.core.service.impl.ProductSourceListServiceImpl$$EnhancerBySpringCGLIB$$d043c704.saveOrUpdateIfNecessary()<br> at com.cbest.platform.product.job.SyncSourceListJob.execute(SyncSourceListJob.java:88)<br> at com.xxl.job.core.thread.JobThread.run(JobThread.java:152)</p> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">4.0.0-RC3</p> <h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3> <p dir="auto">Sharding-JDBC</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">insert into product_source_list (product_code,store_code,primary_supplier,condition_no,supplier_code,return_mark,purchase_price,price_unit,order_unit,article_no,begin_time,expiration_time,type,creation_date,issued_time,external_id,archived,version) values (?, ?,?, ?,?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,0) on duplicate key update product_code = if(@update_condition :=(issued_time &lt; values(issued_time)),values(product_code),product_code),store_code = if(@update_condition,values(store_code),store_code),supplier_code = if(@update_condition,values(supplier_code),supplier_code),return_mark = if(@update_condition,values(return_mark),return_mark),purchase_price = if(@update_condition,values(purchase_price),purchase_price),price_unit = if(@update_condition,values(price_unit),price_unit),order_unit = if(@update_condition,values(order_unit),order_unit),primary_supplier = if(@update_condition,values(primary_supplier),primary_supplier),article_no = if(@update_condition,values(article_no),article_no),begin_time = if(@update_condition,values(begin_time),begin_time),expiration_time = if(@update_condition,values(expiration_time),expiration_time),type = if(@update_condition,values(type),type),archived = if(@update_condition,values(archived),archived),external_id = if(@update_condition,values(external_id),external_id),version = if(@update_condition,version +1,version),issued_time = if(@update_condition,values(issued_time),issued_time)<br> should execute successfully</p> <h3 dir="auto">Actual behavior</h3> <h3 dir="auto">Reason analyze (If you can)</h3> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
0
<p dir="auto">I apologize if this is the wrong place to report this, but I don't know where else to do this.</p> <p dir="auto">Clicking on the link labeled "var" on this page: <a href="http://docs.scipy.org/doc/numpy/reference/routines.statistics.html" rel="nofollow">http://docs.scipy.org/doc/numpy/reference/routines.statistics.html</a><br> takes you to the page: <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html#numpy.var" rel="nofollow">http://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html#numpy.var</a><br> However, that page says "Internal Server Error". Clearly the link is broken and needs to be fixed.</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1353" rel="nofollow">http://projects.scipy.org/numpy/ticket/1353</a> on 2010-01-08 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timmie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timmie">@timmie</a>, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pv">@pv</a>.</em></p> <p dir="auto">The following URL shows an 500 internal server error:<br> <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html" rel="nofollow">http://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html</a></p>
1
<p dir="auto">Hi,<br> I've actually posted an issue <a href="https://github.com/scikit-learn/scikit-learn/issues/7753" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/7753/hovercard">7753</a><br> In a word, I tried same sample_weight in SVC (linear kernel) and LinearSVC and got different results. I got feedback that the LinearSVC is "less sensitive" to sample_weight, but I still wonder how are they different? I want to know mathematically what they means. Currently the API documentation (and user guide) does not contain such description, so could we possibly add them?<br> Thank you very much!</p> <p dir="auto">Also asked <a href="http://stackoverflow.com/questions/40265075/what-does-sample-weight-mean-in-linearsvc-in-scikit-learn?noredirect=1#comment67826945_40265075" rel="nofollow">here</a></p>
<p dir="auto">I think these should be documented in the quick start guide: <a href="http://scikit-learn.org/dev/tutorial/basic/tutorial.html" rel="nofollow">http://scikit-learn.org/dev/tutorial/basic/tutorial.html</a></p>
1
<p dir="auto">no-undef error after today's babel update</p>
<blockquote> <p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jrwebdev/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jrwebdev">@jrwebdev</a></p> </blockquote> <h3 dir="auto">Bug information</h3> <ul dir="auto"> <li><strong>Babel version:</strong> 6.6.0</li> <li><strong>Node version:</strong> 4.2.4</li> <li><strong>npm version:</strong> 3.6.0</li> </ul> <h3 dir="auto">Options</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Appears to be an issue with [email protected] babel input.js --presets es2015 -o output.js"><pre class="notranslate"><code class="notranslate">Appears to be an issue with [email protected] babel input.js --presets es2015 -o output.js </code></pre></div> <h3 dir="auto">Input code</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const values = {}; const obj = { set a (a) { values.a = a; }, get a () { return values.a; }, set b (b) { values.b = b; }, get b () { return values.b; } };"><pre class="notranslate"><code class="notranslate">const values = {}; const obj = { set a (a) { values.a = a; }, get a () { return values.a; }, set b (b) { values.b = b; }, get b () { return values.b; } }; </code></pre></div> <h3 dir="auto">Description</h3> <p dir="auto">Transpiled code differs between [email protected] and [email protected]</p> <p dir="auto">[email protected]</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'use strict'; var values = {}; var obj = { set a(a) { values.a = a; }, get a() { return values.a; }, set b(b) { values.b = b; }, get b() { return values.b; } };"><pre class="notranslate"><code class="notranslate">'use strict'; var values = {}; var obj = { set a(a) { values.a = a; }, get a() { return values.a; }, set b(b) { values.b = b; }, get b() { return values.b; } }; </code></pre></div> <p dir="auto">[email protected]</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'use strict'; var _a, _b, _b2, _obj, _mutatorMap; function _defineEnumerableProperties(obj, descs) { for (var key in descs) { var desc = descs[key]; desc.configurable = desc.enumerable = true; if (&quot;value&quot; in desc) desc.writable = true; Object.defineProperty(obj, key, desc); } return obj; } var values = {}; var obj = (_obj = { set a(a) { values.a = a; } }, _a = 'a', _mutatorMap = {}, _mutatorMap[_a] = _mutatorMap[_a] || {}, _mutatorMap[_a].get = function () { return values.a; }, _b = b, _mutatorMap[_b] = _mutatorMap[_b] || {}, _mutatorMap[_b].set = function (b) { values.b = b; }, _b2 = 'b', _mutatorMap[_b2] = _mutatorMap[_b2] || {}, _mutatorMap[_b2].get = function () { return values.b; }, _defineEnumerableProperties(_obj, _mutatorMap), _obj);"><pre class="notranslate"><code class="notranslate">'use strict'; var _a, _b, _b2, _obj, _mutatorMap; function _defineEnumerableProperties(obj, descs) { for (var key in descs) { var desc = descs[key]; desc.configurable = desc.enumerable = true; if ("value" in desc) desc.writable = true; Object.defineProperty(obj, key, desc); } return obj; } var values = {}; var obj = (_obj = { set a(a) { values.a = a; } }, _a = 'a', _mutatorMap = {}, _mutatorMap[_a] = _mutatorMap[_a] || {}, _mutatorMap[_a].get = function () { return values.a; }, _b = b, _mutatorMap[_b] = _mutatorMap[_b] || {}, _mutatorMap[_b].set = function (b) { values.b = b; }, _b2 = 'b', _mutatorMap[_b2] = _mutatorMap[_b2] || {}, _mutatorMap[_b2].get = function () { return values.b; }, _defineEnumerableProperties(_obj, _mutatorMap), _obj); </code></pre></div> <p dir="auto">Error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="node output.js /output.js:14 }, _b = b, _mutatorMap[_b] = _mutatorMap[_b] || {}, _mutatorMap[_b].set = function (b) { ^ ReferenceError: b is not defined"><pre class="notranslate"><code class="notranslate">node output.js /output.js:14 }, _b = b, _mutatorMap[_b] = _mutatorMap[_b] || {}, _mutatorMap[_b].set = function (b) { ^ ReferenceError: b is not defined </code></pre></div> <p dir="auto">Only seems to occur if the object has more than one getter/setter. I'm guessing it's related to this PR - <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="127357151" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/3280" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/3280/hovercard" href="https://github.com/babel/babel/pull/3280">#3280</a></p>
0
<p dir="auto">People NEED a DETAILED (maybe indexed, too) API documentation, like <a href="https://docs.python.org/3/" rel="nofollow">python documentation</a>. But it seems we only get a tutorial.</p>
<h3 dir="auto">First check</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li> </ul> <h3 dir="auto">Description</h3> <p dir="auto">What I mean by api developer docs are basically something like sphinx docs for function definitions. This is usually generated from function docstrings (which I didn't see any in my small amount of browsing the FastAPI codebase). For example, here are the docs for github3 <a href="https://github3py.readthedocs.io/en/master/api-reference/index.html" rel="nofollow">https://github3py.readthedocs.io/en/master/api-reference/index.html</a>. It is an easy way to click through the entire package and see class and function definitions.</p> <p dir="auto">Does FastAPI have these? The tutorial docs look pretty good, but sometimes I just want to know what all the function parameters are independent of the context in a tutorial.</p>
1
<p dir="auto">My issue is about zpk2sos conversion I presume.<br> The power of the numerators of second order sections are evaluated not correctly</p> <h4 dir="auto">Reproducing code example:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Sample code to reproduce the problem Jupyter QtConsole 5.0.3 Python 3.9.5 (default, May 9 2021, 14:00:28) Type 'copyright', 'credits' or 'license' for more information IPython 7.23.1 -- An enhanced Interactive Python. Type '?' for help. import math from scipy import signal import sympy s = sympy.Symbol('s') filterOrder = 3 passBand = list(map(lambda x: x*2*math.pi, [1000, 7000])) filterType = 'bandpass' z,p,k = signal.butter( filterOrder, passBand, filterType, analog=True, output='zpk') b,a = signal.zpk2tf(z,p,k) sos = signal.zpk2sos(z,p,k) print(&quot;Transfer Function from z,p,k&quot;) n,d = signal.zpk2tf(z,p,k) print(&quot;H(s) =&quot;, sympy.Poly(n,s)/sympy.Poly(d,s)) print() print(&quot;Transfer Function from sos&quot;) n1,d1 = signal.sos2tf(sos) print(&quot;H(s) =&quot;, sympy.Poly(n1,s)/sympy.Poly(d1,s)) Transfer Function from z,p,k H(s) = 53578846103558.1*s**3/(1.0*s**6 + 75398.223686155*s**5 + 3671492837.20524*s**4 + 95251281961881.0*s**3 + 1.01461309221017e+18*s**2 + 5.75806638891985e+21*s + 2.11044155773651e+25) Transfer Function from sos H(s) = 53578846103558.1*s**6/(1.0*s**6 + 75398.223686155*s**5 + 3671492837.20524*s**4 + 95251281961881.0*s**3 + 1.01461309221017e+18*s**2 + 5.75806638891985e+21*s + 2.11044155773651e+25)"><pre class="notranslate"><code class="notranslate">Sample code to reproduce the problem Jupyter QtConsole 5.0.3 Python 3.9.5 (default, May 9 2021, 14:00:28) Type 'copyright', 'credits' or 'license' for more information IPython 7.23.1 -- An enhanced Interactive Python. Type '?' for help. import math from scipy import signal import sympy s = sympy.Symbol('s') filterOrder = 3 passBand = list(map(lambda x: x*2*math.pi, [1000, 7000])) filterType = 'bandpass' z,p,k = signal.butter( filterOrder, passBand, filterType, analog=True, output='zpk') b,a = signal.zpk2tf(z,p,k) sos = signal.zpk2sos(z,p,k) print("Transfer Function from z,p,k") n,d = signal.zpk2tf(z,p,k) print("H(s) =", sympy.Poly(n,s)/sympy.Poly(d,s)) print() print("Transfer Function from sos") n1,d1 = signal.sos2tf(sos) print("H(s) =", sympy.Poly(n1,s)/sympy.Poly(d1,s)) Transfer Function from z,p,k H(s) = 53578846103558.1*s**3/(1.0*s**6 + 75398.223686155*s**5 + 3671492837.20524*s**4 + 95251281961881.0*s**3 + 1.01461309221017e+18*s**2 + 5.75806638891985e+21*s + 2.11044155773651e+25) Transfer Function from sos H(s) = 53578846103558.1*s**6/(1.0*s**6 + 75398.223686155*s**5 + 3671492837.20524*s**4 + 95251281961881.0*s**3 + 1.01461309221017e+18*s**2 + 5.75806638891985e+21*s + 2.11044155773651e+25) </code></pre></div> <p dir="auto">It can be seen that the numerators are different in the power of s.</p> <h4 dir="auto">Scipy/Numpy/Python version information:</h4> <p dir="auto">1.6.3 1.20.3 sys.version_info(major=3, minor=9, micro=5, releaselevel='final', serial=0)</p>
<p dir="auto">As described in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35173341" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/3717" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/3717/hovercard?comment_id=142460019&amp;comment_type=issue_comment" href="https://github.com/scipy/scipy/pull/3717#issuecomment-142460019">#3717 (comment)</a>, zpk2sos does not work for analog filters since the coefficients of each stage are different.</p> <p dir="auto"><code class="notranslate">b, a = butter(1, 1, analog=True)</code> produces b = [1], a = [1, 1] → H(s) = 1/(s+1)</p> <p dir="auto"><code class="notranslate">sos = tf2sos(b, a)</code> produces <code class="notranslate">[1, 0, 0, 1, 1, 0]</code></p> <p dir="auto">this stage is b = [1, 0, 0], a = [1, 1, 0] → H(s) = s^2/(s^2+s) = s/(s+1) which is not the same as above. For digital filters, trailing zeros don't matter, but for analog filters, they do, and <em>leading</em> zeros don't matter. The correct result should be <code class="notranslate">[0, 0, 1, 0, 1, 1]</code></p> <p dir="auto">So docstring should probably say it's not meant for analog at all for now?</p> <p dir="auto">and add analog=True to zpk2sos?</p>
1
<p dir="auto">Hello to all,</p> <p dir="auto">I facing a problem using the bootstrap affix. It is working fine in desktop and mobile version, but in mobile version affix is not responding correctly.<br> i.e. when you scroll to specific height it is not fixed to the top, after some time it becomes fixed to top. clearly in mobile or ipad the container is jumping while scrolling.It is not able to fix to top smoothly.</p>
<p dir="auto">Using Bootstrap 3+</p> <p dir="auto">I have a registration / login form in a modal. When you open a modal in the stock android browser the user can't touch a form or anything because it automatically closes like it would if you clicked outside of the modal area.</p> <p dir="auto">I have a lot of users using the default android browser for some strange reason so this is causing major issues on my website.</p> <p dir="auto">If anyone knows of a fix for this issue it would be much appreciated</p>
0
<p dir="auto">Hi, we are glad you can fix this issue to become a contributor to Apache Sharding Sphere.<br> Welcome! <g-emoji class="g-emoji" alias="smiley" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f603.png">😃</g-emoji></p> <p dir="auto">By doing this assignment, you can learn more about how a query SQL is parsed and how to verify the parsing result of a SQL in Apache ShardingSphere.</p> <p dir="auto">This issue is to add the parsing assertion for <code class="notranslate">ParameterMarkerExpression</code> by adding the start-index and stop-index attributes in parsing-result.xml.</p> <p dir="auto">It is not difficult, and the following comment also gives you the detailed instruction. BTW, if you need any help, please be free to reply to this one.</p>
<h2 dir="auto">Bug Report</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT region, SUM(population), SUM(area) FROM bbc GROUP BY region HAVING SUM(area)&gt;1000000. "><pre class="notranslate"><code class="notranslate">SELECT region, SUM(population), SUM(area) FROM bbc GROUP BY region HAVING SUM(area)&gt;1000000. </code></pre></div> <p dir="auto">Parse the sql to get statement, there is not info about <code class="notranslate">having</code>.</p> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">5.0.0-alpha</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">we can get info about <code class="notranslate">having</code> in the statement.</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">there is no info about <code class="notranslate">having</code> in the statement.</p>
0
<p dir="auto">Filter Assetic 'closure' is broken in Symfony version 2.3.12.<br> In Symfony version 2.3.11 works correctly.</p> <p dir="auto">When you run the command 'php.exe app/console assetic:dump --env=prod --no-debug --verbose -vvv', the following error message appear:</p> <p dir="auto">[Assetic\Exception\FilterException]<br> An error occurred while running:<br> "D:/symfony/app/Resources/jre/bin/java.exe" "-jar" "D:/symfony/app/Resources/java/compiler.jar" "--compilation_level" "WHITESPACE_ONLY" "--js" "C:\Documents and Settings\felix\Configuración local\Temp\assAC0.tmp"</p> <p dir="auto">The command line actually running:<br> cmd /V:ON /E:ON /C "("D:/symfony/app/Resources/jre/bin/java.exe" "-jar" "D:/symfony/app/Resources/java/compiler.jar" "--compilation_level" "WHITESPACE_ONLY" "--js" "C:\Documents and Settings\felix\Configuración local\Temp\assAC0.tmp")" 1&gt;C:\Documents and Settings\felix\Configuración local\Temp\sf_AC1.tmp 2&gt;C:\Documents and Settings\felix\Configuración local\Temp\sf_AC2.tmp</p> <p dir="auto">In the file 'D:\symfony\vendor\symfony\symfony\src\Symfony\Component\Process\Process.php' missing double quotes:<br> public function start<br> ...<br> foreach ($this-&gt;processPipes-&gt;getFiles() as $offset =&gt; $filename) {<br> //Without the double quotes fails.<br> $commandline .= ' '.$offset.'&gt;"'.$filename.'"';<br> //$commandline .= ' '.$offset.'&gt;'.$filename.'';<br> }<br> if (!isset($this-&gt;options['bypass_shell'])) {<br> $this-&gt;options['bypass_shell'] = false;<br> //$this-&gt;options['bypass_shell'] = true;<br> }<br> Also does not work if 'bypass_shell' is true.</p> <p dir="auto">Excuse my English.</p>
<p dir="auto">After updating Symfony 2.3.11 to 2.3.12 , no more process using the Process component object Symfony works!</p> <p dir="auto">an error code 1 is always returned !</p> <p dir="auto">It works if I comment line 238 of src/Symfony/Component/Process/process.php file.</p> <p dir="auto">Command executed from the command line :<br> <code class="notranslate">php app/console assetic:dump --env=prod</code></p> <p dir="auto">result:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Dumping all prod assets. Debug mode is off. 10:29:18 [file+] D:/wwwroot/project/app/../web/bundles/project/min/g lobal.css [Assetic\Exception\FilterException] An error occurred while running: &quot;C:\Program Files\Java\jre7\bin\java.exe&quot; &quot;-jar&quot; &quot;D:/wwwroot/project/app/Re sources/java/yuicompressor-2.4.7.jar&quot; &quot;--charset&quot; &quot;UTF-8&quot; &quot;-o&quot; &quot;C:\Document s and Settings\adm\Local Settings\Temp\1\YUI36F.tmp&quot; &quot;--type&quot; &quot;css&quot; &quot;C: \Documents and Settings\adm\Local Settings\Temp\1\YUI36E.tmp&quot; Input: [...] assetic:dump [--watch] [--force] [--period=&quot;...&quot;] [write_to]"><pre class="notranslate"><code class="notranslate">Dumping all prod assets. Debug mode is off. 10:29:18 [file+] D:/wwwroot/project/app/../web/bundles/project/min/g lobal.css [Assetic\Exception\FilterException] An error occurred while running: "C:\Program Files\Java\jre7\bin\java.exe" "-jar" "D:/wwwroot/project/app/Re sources/java/yuicompressor-2.4.7.jar" "--charset" "UTF-8" "-o" "C:\Document s and Settings\adm\Local Settings\Temp\1\YUI36F.tmp" "--type" "css" "C: \Documents and Settings\adm\Local Settings\Temp\1\YUI36E.tmp" Input: [...] assetic:dump [--watch] [--force] [--period="..."] [write_to] </code></pre></div>
1
<p dir="auto">Play rust link: <a href="http://is.gd/DVjBtk" rel="nofollow">http://is.gd/DVjBtk</a></p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="macro_rules! a {(&lt;$($($d:expr),*$($c:ident),*)*&gt;) =&gt; (B&lt;$($d,)*$($c,)*&gt;);}a! (&lt;&gt;);"><pre class="notranslate"><span class="pl-k">macro_rules!</span> a <span class="pl-kos">{</span><span class="pl-kos">(</span>&lt;$<span class="pl-kos">(</span>$<span class="pl-kos">(</span>$d<span class="pl-kos">:</span>expr<span class="pl-kos">)</span>,<span class="pl-c1">*</span>$<span class="pl-kos">(</span>$c<span class="pl-kos">:</span>ident<span class="pl-kos">)</span>,<span class="pl-c1">*</span><span class="pl-kos">)</span><span class="pl-c1">*</span>&gt;<span class="pl-kos">)</span> =&gt; <span class="pl-kos">(</span><span class="pl-v">B</span>&lt;$<span class="pl-kos">(</span>$d,<span class="pl-kos">)</span><span class="pl-c1">*</span>$<span class="pl-kos">(</span>$c,<span class="pl-kos">)</span><span class="pl-c1">*</span>&gt;<span class="pl-kos">)</span><span class="pl-kos">;</span><span class="pl-kos">}</span><span class="pl-en">a</span><span class="pl-en">!</span> <span class="pl-kos">(</span>&lt;&gt;<span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Trying to compile this code containing an ambiguous macro causes the compiler to hang forever and max out memory:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="macro_rules! make_vec( (a $e1:expr $($(, a $e2:expr)*)*) =&gt; ([$e1 $($(, $e2)*)*]); ) fn main() { let _ = make_vec!(a 1, a 2, a 3); }"><pre class="notranslate"><code class="notranslate">macro_rules! make_vec( (a $e1:expr $($(, a $e2:expr)*)*) =&gt; ([$e1 $($(, $e2)*)*]); ) fn main() { let _ = make_vec!(a 1, a 2, a 3); } </code></pre></div> <p dir="auto">rustc 0.5<br> host: x86_64-apple-darwin</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">While convert an RNN to onnx, it report this error.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/37336300/97544558-c14a5e80-1a04-11eb-81f3-cf6fbac242c6.png"><img src="https://user-images.githubusercontent.com/37336300/97544558-c14a5e80-1a04-11eb-81f3-cf6fbac242c6.png" alt="屏幕截图(4)" style="max-width: 100%;"></a></p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior:<br> 1.While run this code on GPU this error will be reported.<br> 2.But if i run this code on CPU there is no error reported<br> `<br> import torch<br> import torch.nn as nn</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class StackedLSTM(nn.Module): def __init__(self, num_layers, input_size, rnn_size, dropout): super(StackedLSTM, self).__init__() self.dropout = nn.Dropout(dropout) self.num_layers = num_layers self.layers = nn.ModuleList() for _ in range(num_layers): self.layers.append(nn.LSTMCell(input_size, rnn_size)) input_size = rnn_size def forward(self, input_feed, hidden): h_0, c_0 = hidden h_1, c_1 = [], [] for i, layer in enumerate(self.layers): h_1_i, c_1_i = layer(input_feed, (h_0[i], c_0[i])) input_feed = h_1_i if i + 1 != self.num_layers: input_feed = self.dropout(input_feed) h_1 += [h_1_i] c_1 += [c_1_i] h_1 = torch.stack(h_1) c_1 = torch.stack(c_1) return input_feed, (h_1, c_1) lstm = StackedLSTM(2, 580, 500, 0.3).cuda() h_t = torch.randn(2, 10, 500).cuda() h_c = torch.randn(2, 10, 500).cuda() a = torch.randn(10, 580).cuda() torch.onnx.export(lstm, (a, (h_t, h_c)), f='LSTM.onnx', opset_version=12, input_names=['input', 'h_t', 'h_c'], output_names= ['output', 'hidden_t', 'hidden_c'])"><pre class="notranslate"><code class="notranslate">class StackedLSTM(nn.Module): def __init__(self, num_layers, input_size, rnn_size, dropout): super(StackedLSTM, self).__init__() self.dropout = nn.Dropout(dropout) self.num_layers = num_layers self.layers = nn.ModuleList() for _ in range(num_layers): self.layers.append(nn.LSTMCell(input_size, rnn_size)) input_size = rnn_size def forward(self, input_feed, hidden): h_0, c_0 = hidden h_1, c_1 = [], [] for i, layer in enumerate(self.layers): h_1_i, c_1_i = layer(input_feed, (h_0[i], c_0[i])) input_feed = h_1_i if i + 1 != self.num_layers: input_feed = self.dropout(input_feed) h_1 += [h_1_i] c_1 += [c_1_i] h_1 = torch.stack(h_1) c_1 = torch.stack(c_1) return input_feed, (h_1, c_1) lstm = StackedLSTM(2, 580, 500, 0.3).cuda() h_t = torch.randn(2, 10, 500).cuda() h_c = torch.randn(2, 10, 500).cuda() a = torch.randn(10, 580).cuda() torch.onnx.export(lstm, (a, (h_t, h_c)), f='LSTM.onnx', opset_version=12, input_names=['input', 'h_t', 'h_c'], output_names= ['output', 'hidden_t', 'hidden_c']) </code></pre></div> <p dir="auto">`</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Convert this RNN to onnx while runing on GPU.</p> <h2 dir="auto">Environment</h2> <p dir="auto">PyTorch version: 1.7.0<br> Is debug build: True<br> CUDA used to build PyTorch: 10.2<br> ROCM used to build PyTorch: N/A</p> <p dir="auto">OS: Microsoft Windows 10 专业版<br> GCC version: (GCC) 9.2.0<br> Clang version: Could not collect<br> CMake version: version 3.16.2</p> <p dir="auto">Python version: 3.6 (64-bit runtime)<br> Is CUDA available: True<br> CUDA runtime version: 10.2.89<br> GPU models and configuration: GPU 0: GeForce GTX 860M<br> Nvidia driver version: 441.22<br> cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\cudnn64_7.dll<br> HIP runtime version: N/A<br> MIOpen runtime version: N/A</p> <p dir="auto">Versions of relevant libraries:<br> [pip3] numpy==1.19.2<br> [pip3] numpydoc==0.8.0<br> [pip3] torch==1.7.0<br> [pip3] torchaudio==0.7.0<br> [pip3] torchtext==0.6.0<br> [pip3] torchvision==0.8.1<br> [conda] blas 1.0 mkl<br> [conda] cpuonly 1.0 0 pytorch<br> [conda] mkl 2018.0.2 1<br> [conda] mkl-service 1.1.2 py36h57e144c_4<br> [conda] mkl_fft 1.0.1 py36h452e1ab_0<br> [conda] mkl_random 1.0.1 py36h9258bd6_0<br> [conda] numpy 1.19.2 pypi_0 pypi<br> [conda] numpydoc 0.8.0 py36_0<br> [conda] torch 1.7.0 pypi_0 pypi<br> [conda] torchaudio 0.7.0 pypi_0 pypi<br> [conda] torchtext 0.6.0 pypi_0 pypi<br> [conda] torchvision 0.8.1 pypi_0 pypi</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/houseroad/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/houseroad">@houseroad</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/spandantiwari/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/spandantiwari">@spandantiwari</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lara-hdr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lara-hdr">@lara-hdr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/BowenBao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/BowenBao">@BowenBao</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/neginraoof/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/neginraoof">@neginraoof</a></p>
<p dir="auto">Hi guys:<br> I have build a seq2seq model using nn.LSTMCELL in it. And I want to export a trained one to onnx form. However, when I do this, I have an error says:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="UserWarning: ONNX export failed on ATen operator _thnn_fused_lstm_cell because torch.onnx.symbolic_opset9._thnn_fused_lstm_cell does not exist .format(op_name, opset_version, op_name))"><pre class="notranslate"><code class="notranslate">UserWarning: ONNX export failed on ATen operator _thnn_fused_lstm_cell because torch.onnx.symbolic_opset9._thnn_fused_lstm_cell does not exist .format(op_name, opset_version, op_name)) </code></pre></div> <p dir="auto">I think this maybe due to the opset nort supporting nn.LSTMCELL.<br> Any one could help and share some advice?<br> Thank you!</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/albanD/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/albanD">@albanD</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mruberry/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mruberry">@mruberry</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/houseroad/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/houseroad">@houseroad</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/spandantiwari/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/spandantiwari">@spandantiwari</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lara-hdr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lara-hdr">@lara-hdr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/BowenBao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/BowenBao">@BowenBao</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/neginraoof/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/neginraoof">@neginraoof</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
<p dir="auto">Over at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="133037270" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/15030" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/15030/hovercard" href="https://github.com/JuliaLang/julia/pull/15030">#15030</a>, I'm trying to rewrite <code class="notranslate">ntuple(f, Val{N})</code> so that we don't need <code class="notranslate">@generated</code> functions. It's not yet viable because, for this particular problem, codegen quality is poor. I think I've narrowed it down to a failure to substitute integer-valued <code class="notranslate">GenSym</code>s during codegen. Here's a lispy rewrite of that code that produces very simple lowered &amp; typed code:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="using Base: @_inline_meta # The &quot;reference implementation&quot; myntuple1(f, ::Type{Val{3}}) = (f(1), f(2), f(3)) # The implementation I want function myntuple2{N}(f, ::Type{Val{N}}) @_inline_meta # this doesn't seem to affect anything _ntuple((), f, Val{N}) end # Build up the output until it has length N _ntuple{N}(out::NTuple{N}, f, ::Type{Val{N}}) = out function _ntuple{N}(out, f, ::Type{Val{N}}) @_inline_meta _ntuple(out, (out..., 0), f, Val{N}) # compile-time evaluation of length(out)+1 end function _ntuple{N,M}(out, ::NTuple{M}, f, ::Type{Val{N}}) @_inline_meta _ntuple((out..., f(M)), f, Val{N}) end"><pre class="notranslate"><span class="pl-k">using</span> Base<span class="pl-k">:</span> <span class="pl-c1">@_inline_meta</span> <span class="pl-c"><span class="pl-c">#</span> The "reference implementation"</span> <span class="pl-en">myntuple1</span>(f, <span class="pl-k">::</span><span class="pl-c1">Type{Val{3}}</span>) <span class="pl-k">=</span> (<span class="pl-c1">f</span>(<span class="pl-c1">1</span>), <span class="pl-c1">f</span>(<span class="pl-c1">2</span>), <span class="pl-c1">f</span>(<span class="pl-c1">3</span>)) <span class="pl-c"><span class="pl-c">#</span> The implementation I want</span> <span class="pl-k">function</span> <span class="pl-en">myntuple2</span><span class="pl-c1">{N}</span>(f, <span class="pl-k">::</span><span class="pl-c1">Type{Val{N}}</span>) <span class="pl-c1">@_inline_meta</span> <span class="pl-c"><span class="pl-c">#</span> this doesn't seem to affect anything</span> <span class="pl-c1">_ntuple</span>((), f, Val{N}) <span class="pl-k">end</span> <span class="pl-c"><span class="pl-c">#</span> Build up the output until it has length N</span> <span class="pl-en">_ntuple</span><span class="pl-c1">{N}</span>(out<span class="pl-k">::</span><span class="pl-c1">NTuple{N}</span>, f, <span class="pl-k">::</span><span class="pl-c1">Type{Val{N}}</span>) <span class="pl-k">=</span> out <span class="pl-k">function</span> <span class="pl-en">_ntuple</span><span class="pl-c1">{N}</span>(out, f, <span class="pl-k">::</span><span class="pl-c1">Type{Val{N}}</span>) <span class="pl-c1">@_inline_meta</span> <span class="pl-c1">_ntuple</span>(out, (out<span class="pl-k">...</span>, <span class="pl-c1">0</span>), f, Val{N}) <span class="pl-c"><span class="pl-c">#</span> compile-time evaluation of length(out)+1</span> <span class="pl-k">end</span> <span class="pl-k">function</span> <span class="pl-en">_ntuple</span><span class="pl-c1">{N,M}</span>(out, <span class="pl-k">::</span><span class="pl-c1">NTuple{M}</span>, f, <span class="pl-k">::</span><span class="pl-c1">Type{Val{N}}</span>) <span class="pl-c1">@_inline_meta</span> <span class="pl-c1">_ntuple</span>((out<span class="pl-k">...</span>, <span class="pl-c1">f</span>(M)), f, Val{N}) <span class="pl-k">end</span></pre></div> <p dir="auto">Results:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; @code_typed myntuple1(identity, Val{3}) 1-element Array{Any,1}: :($(Expr(:lambda, Any[symbol(&quot;#self#&quot;),:f,symbol(&quot;#unused#&quot;)], Any[Any[Any[symbol(&quot;#self#&quot;),#myntuple1,0],Any[:f,Base.#identity,64]],Any[],Any[]], :(begin # /tmp/ntuple2.jl, line 4: return (top(tuple))(1,2,3)::Tuple{Int64,Int64,Int64} end::Tuple{Int64,Int64,Int64})))) julia&gt; @code_typed myntuple2(identity, Val{3}) 1-element Array{Any,1}: :($(Expr(:lambda, Any[symbol(&quot;#self#&quot;),:f,symbol(&quot;#unused#&quot;)], Any[Any[Any[symbol(&quot;#self#&quot;),#myntuple2,0],Any[:f,Base.#identity,0]],Any[],Any[Tuple{Int64,Int64},Int64,Int64]], :(begin # /tmp/ntuple2.jl, line 8: $(Expr(:meta, :inline)) # /tmp/ntuple2.jl, line 9: # /tmp/ntuple2.jl, line 14: # /tmp/ntuple2.jl, line 15: # /tmp/ntuple2.jl, line 18: # /tmp/ntuple2.jl, line 19: # /tmp/ntuple2.jl, line 14: # /tmp/ntuple2.jl, line 15: # /tmp/ntuple2.jl, line 18: # /tmp/ntuple2.jl, line 19: GenSym(1) = 1 GenSym(2) = 2 # /tmp/ntuple2.jl, line 14: # /tmp/ntuple2.jl, line 15: # /tmp/ntuple2.jl, line 18: # /tmp/ntuple2.jl, line 19: return (top(tuple))(GenSym(1),GenSym(2),3)::Tuple{Int64,Int64,Int64} end::Tuple{Int64,Int64,Int64})))) julia&gt; @code_native myntuple1(identity, Val{3}) .text Filename: ntuple2.jl Source line: 0 pushq %rbp movq %rsp, %rbp Source line: 4 movq $3, 16(%rdi) movq $2, 8(%rdi) movq $1, (%rdi) movq %rdi, %rax popq %rbp retq julia&gt; @code_native myntuple2(identity, Val{3}) .text Filename: ntuple2.jl Source line: 0 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $104, %rsp movq %rdi, %rbx leaq -56(%rbp), %r12 leaq -88(%rbp), %rdi movq $0, -120(%rbp) movq $0, -112(%rbp) movq $0, -104(%rbp) movq $0, -96(%rbp) movq $0, -72(%rbp) movq $0, -64(%rbp) movq $0, -56(%rbp) movq $0, -48(%rbp) movq $20, -136(%rbp) movabsq $jl_tls_states, %r13 movq (%r13), %rax movq %rax, -128(%rbp) leaq -136(%rbp), %rax movq %rax, (%r13) Source line: 19 movq %rbx, -88(%rbp) movabsq $140407980499072, %r14 # imm = 0x7FB347CD2080 movq %r14, -80(%rbp) movabsq $jl_apply_generic, %r15 movl $2, %esi callq *%r15 movq %rax, -112(%rbp) movq %rbx, -56(%rbp) leaq 48(%r14), %rax movq %rax, -48(%rbp) movl $2, %esi movq %r12, %rdi callq *%r15 movq %rax, -104(%rbp) movq %rbx, -72(%rbp) orq $96, %r14 movq %r14, -64(%rbp) movl $2, %esi leaq -72(%rbp), %rdi callq *%r15 movq %rax, -96(%rbp) movabsq $jl_f_tuple, %rax xorl %edi, %edi movl $3, %edx leaq -112(%rbp), %rsi callq *%rax movq %rax, -120(%rbp) Source line: 12 movq -128(%rbp), %rcx movq %rcx, (%r13) addq $104, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">@code_typed</span> <span class="pl-c1">myntuple1</span>(identity, Val{<span class="pl-c1">3</span>}) <span class="pl-c1">1</span><span class="pl-k">-</span>element Array{Any,<span class="pl-c1">1</span>}<span class="pl-k">:</span> :(<span class="pl-k">$</span>(<span class="pl-c1">Expr</span>(<span class="pl-c1">:lambda</span>, Any[<span class="pl-c1">symbol</span>(<span class="pl-s"><span class="pl-pds">"</span>#self#<span class="pl-pds">"</span></span>),<span class="pl-c1">:f</span>,<span class="pl-c1">symbol</span>(<span class="pl-s"><span class="pl-pds">"</span>#unused#<span class="pl-pds">"</span></span>)], Any[Any[Any[<span class="pl-c1">symbol</span>(<span class="pl-s"><span class="pl-pds">"</span>#self#<span class="pl-pds">"</span></span>),<span class="pl-c"><span class="pl-c">#</span>myntuple1,0],Any[:f,Base.#identity,64]],Any[],Any[]], :(begin # /tmp/ntuple2.jl, line 4:</span> <span class="pl-k">return</span> (<span class="pl-c1">top</span>(tuple))(<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>)<span class="pl-k">::</span><span class="pl-c1">Tuple{Int64,Int64,Int64}</span> <span class="pl-c1">end</span><span class="pl-k">::</span><span class="pl-c1">Tuple{Int64,Int64,Int64}</span>)))) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@code_typed</span> <span class="pl-c1">myntuple2</span>(identity, Val{<span class="pl-c1">3</span>}) <span class="pl-c1">1</span><span class="pl-k">-</span>element Array{Any,<span class="pl-c1">1</span>}<span class="pl-k">:</span> :(<span class="pl-k">$</span>(<span class="pl-c1">Expr</span>(<span class="pl-c1">:lambda</span>, Any[<span class="pl-c1">symbol</span>(<span class="pl-s"><span class="pl-pds">"</span>#self#<span class="pl-pds">"</span></span>),<span class="pl-c1">:f</span>,<span class="pl-c1">symbol</span>(<span class="pl-s"><span class="pl-pds">"</span>#unused#<span class="pl-pds">"</span></span>)], Any[Any[Any[<span class="pl-c1">symbol</span>(<span class="pl-s"><span class="pl-pds">"</span>#self#<span class="pl-pds">"</span></span>),<span class="pl-c"><span class="pl-c">#</span>myntuple2,0],Any[:f,Base.#identity,0]],Any[],Any[Tuple{Int64,Int64},Int64,Int64]], :(begin # /tmp/ntuple2.jl, line 8:</span> <span class="pl-k">$</span>(<span class="pl-c1">Expr</span>(<span class="pl-c1">:meta</span>, <span class="pl-c1">:inline</span>)) <span class="pl-c"><span class="pl-c">#</span> /tmp/ntuple2.jl, line 9: # /tmp/ntuple2.jl, line 14: # /tmp/ntuple2.jl, line 15: # /tmp/ntuple2.jl, line 18: # /tmp/ntuple2.jl, line 19: # /tmp/ntuple2.jl, line 14: # /tmp/ntuple2.jl, line 15: # /tmp/ntuple2.jl, line 18: # /tmp/ntuple2.jl, line 19:</span> <span class="pl-en">GenSym</span>(<span class="pl-c1">1</span>) <span class="pl-k">=</span> <span class="pl-c1">1</span> <span class="pl-en">GenSym</span>(<span class="pl-c1">2</span>) <span class="pl-k">=</span> <span class="pl-c1">2</span> <span class="pl-c"><span class="pl-c">#</span> /tmp/ntuple2.jl, line 14: # /tmp/ntuple2.jl, line 15: # /tmp/ntuple2.jl, line 18: # /tmp/ntuple2.jl, line 19:</span> <span class="pl-k">return</span> (<span class="pl-c1">top</span>(tuple))(<span class="pl-c1">GenSym</span>(<span class="pl-c1">1</span>),<span class="pl-c1">GenSym</span>(<span class="pl-c1">2</span>),<span class="pl-c1">3</span>)<span class="pl-k">::</span><span class="pl-c1">Tuple{Int64,Int64,Int64}</span> <span class="pl-c1">end</span><span class="pl-k">::</span><span class="pl-c1">Tuple{Int64,Int64,Int64}</span>)))) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@code_native</span> <span class="pl-c1">myntuple1</span>(identity, Val{<span class="pl-c1">3</span>}) <span class="pl-k">.</span>text Filename<span class="pl-k">:</span> ntuple2<span class="pl-k">.</span>jl Source line<span class="pl-k">:</span> <span class="pl-c1">0</span> pushq <span class="pl-k">%</span>rbp movq <span class="pl-k">%</span>rsp, <span class="pl-k">%</span>rbp Source line<span class="pl-k">:</span> <span class="pl-c1">4</span> movq <span class="pl-k">$</span>3, <span class="pl-c1">16</span>(<span class="pl-k">%</span>rdi) movq <span class="pl-k">$</span>2, <span class="pl-c1">8</span>(<span class="pl-k">%</span>rdi) movq <span class="pl-k">$</span>1, (<span class="pl-k">%</span>rdi) movq <span class="pl-k">%</span>rdi, <span class="pl-k">%</span>rax popq <span class="pl-k">%</span>rbp retq julia<span class="pl-k">&gt;</span> <span class="pl-c1">@code_native</span> <span class="pl-c1">myntuple2</span>(identity, Val{<span class="pl-c1">3</span>}) <span class="pl-k">.</span>text Filename<span class="pl-k">:</span> ntuple2<span class="pl-k">.</span>jl Source line<span class="pl-k">:</span> <span class="pl-c1">0</span> pushq <span class="pl-k">%</span>rbp movq <span class="pl-k">%</span>rsp, <span class="pl-k">%</span>rbp pushq <span class="pl-k">%</span>r15 pushq <span class="pl-k">%</span>r14 pushq <span class="pl-k">%</span>r13 pushq <span class="pl-k">%</span>r12 pushq <span class="pl-k">%</span>rbx subq <span class="pl-k">$</span>104, <span class="pl-k">%</span>rsp movq <span class="pl-k">%</span>rdi, <span class="pl-k">%</span>rbx leaq <span class="pl-k">-</span><span class="pl-c1">56</span>(<span class="pl-k">%</span>rbp), <span class="pl-k">%</span>r12 leaq <span class="pl-k">-</span><span class="pl-c1">88</span>(<span class="pl-k">%</span>rbp), <span class="pl-k">%</span>rdi movq <span class="pl-k">$</span>0, <span class="pl-k">-</span><span class="pl-c1">120</span>(<span class="pl-k">%</span>rbp) movq <span class="pl-k">$</span>0, <span class="pl-k">-</span><span class="pl-c1">112</span>(<span class="pl-k">%</span>rbp) movq <span class="pl-k">$</span>0, <span class="pl-k">-</span><span class="pl-c1">104</span>(<span class="pl-k">%</span>rbp) movq <span class="pl-k">$</span>0, <span class="pl-k">-</span><span class="pl-c1">96</span>(<span class="pl-k">%</span>rbp) movq <span class="pl-k">$</span>0, <span class="pl-k">-</span><span class="pl-c1">72</span>(<span class="pl-k">%</span>rbp) movq <span class="pl-k">$</span>0, <span class="pl-k">-</span><span class="pl-c1">64</span>(<span class="pl-k">%</span>rbp) movq <span class="pl-k">$</span>0, <span class="pl-k">-</span><span class="pl-c1">56</span>(<span class="pl-k">%</span>rbp) movq <span class="pl-k">$</span>0, <span class="pl-k">-</span><span class="pl-c1">48</span>(<span class="pl-k">%</span>rbp) movq <span class="pl-k">$</span>20, <span class="pl-k">-</span><span class="pl-c1">136</span>(<span class="pl-k">%</span>rbp) movabsq <span class="pl-k">$</span>jl_tls_states, <span class="pl-k">%</span>r13 movq (<span class="pl-k">%</span>r13), <span class="pl-k">%</span>rax movq <span class="pl-k">%</span>rax, <span class="pl-k">-</span><span class="pl-c1">128</span>(<span class="pl-k">%</span>rbp) leaq <span class="pl-k">-</span><span class="pl-c1">136</span>(<span class="pl-k">%</span>rbp), <span class="pl-k">%</span>rax movq <span class="pl-k">%</span>rax, (<span class="pl-k">%</span>r13) Source line<span class="pl-k">:</span> <span class="pl-c1">19</span> movq <span class="pl-k">%</span>rbx, <span class="pl-k">-</span><span class="pl-c1">88</span>(<span class="pl-k">%</span>rbp) movabsq <span class="pl-k">$</span>140407980499072, <span class="pl-k">%</span>r14 <span class="pl-c"><span class="pl-c">#</span> imm = 0x7FB347CD2080</span> movq <span class="pl-k">%</span>r14, <span class="pl-k">-</span><span class="pl-c1">80</span>(<span class="pl-k">%</span>rbp) movabsq <span class="pl-k">$</span>jl_apply_generic, <span class="pl-k">%</span>r15 movl <span class="pl-k">$</span>2, <span class="pl-k">%</span>esi callq <span class="pl-k">*%</span>r15 movq <span class="pl-k">%</span>rax, <span class="pl-k">-</span><span class="pl-c1">112</span>(<span class="pl-k">%</span>rbp) movq <span class="pl-k">%</span>rbx, <span class="pl-k">-</span><span class="pl-c1">56</span>(<span class="pl-k">%</span>rbp) leaq <span class="pl-c1">48</span>(<span class="pl-k">%</span>r14), <span class="pl-k">%</span>rax movq <span class="pl-k">%</span>rax, <span class="pl-k">-</span><span class="pl-c1">48</span>(<span class="pl-k">%</span>rbp) movl <span class="pl-k">$</span>2, <span class="pl-k">%</span>esi movq <span class="pl-k">%</span>r12, <span class="pl-k">%</span>rdi callq <span class="pl-k">*%</span>r15 movq <span class="pl-k">%</span>rax, <span class="pl-k">-</span><span class="pl-c1">104</span>(<span class="pl-k">%</span>rbp) movq <span class="pl-k">%</span>rbx, <span class="pl-k">-</span><span class="pl-c1">72</span>(<span class="pl-k">%</span>rbp) orq <span class="pl-k">$</span>96, <span class="pl-k">%</span>r14 movq <span class="pl-k">%</span>r14, <span class="pl-k">-</span><span class="pl-c1">64</span>(<span class="pl-k">%</span>rbp) movl <span class="pl-k">$</span>2, <span class="pl-k">%</span>esi leaq <span class="pl-k">-</span><span class="pl-c1">72</span>(<span class="pl-k">%</span>rbp), <span class="pl-k">%</span>rdi callq <span class="pl-k">*%</span>r15 movq <span class="pl-k">%</span>rax, <span class="pl-k">-</span><span class="pl-c1">96</span>(<span class="pl-k">%</span>rbp) movabsq <span class="pl-k">$</span>jl_f_tuple, <span class="pl-k">%</span>rax xorl <span class="pl-k">%</span>edi, <span class="pl-k">%</span>edi movl <span class="pl-k">$</span>3, <span class="pl-k">%</span>edx leaq <span class="pl-k">-</span><span class="pl-c1">112</span>(<span class="pl-k">%</span>rbp), <span class="pl-k">%</span>rsi callq <span class="pl-k">*%</span>rax movq <span class="pl-k">%</span>rax, <span class="pl-k">-</span><span class="pl-c1">120</span>(<span class="pl-k">%</span>rbp) Source line<span class="pl-k">:</span> <span class="pl-c1">12</span> movq <span class="pl-k">-</span><span class="pl-c1">128</span>(<span class="pl-k">%</span>rbp), <span class="pl-k">%</span>rcx movq <span class="pl-k">%</span>rcx, (<span class="pl-k">%</span>r13) addq <span class="pl-k">$</span>104, <span class="pl-k">%</span>rsp popq <span class="pl-k">%</span>rbx popq <span class="pl-k">%</span>r12 popq <span class="pl-k">%</span>r13 popq <span class="pl-k">%</span>r14 popq <span class="pl-k">%</span>r15 popq <span class="pl-k">%</span>rbp retq</pre></div> <p dir="auto">Is there any chance this has an easy fix? Like, add a "substitute constant-valued GenSyms" pass during codegen?</p>
<p dir="auto">In <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="70459793" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/10961" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/10961/hovercard" href="https://github.com/JuliaLang/julia/pull/10961">#10961</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/swt30/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/swt30">@swt30</a> found and fixed a performance problem with <code class="notranslate">collect</code>. It was type-unstable because it had been defined as <code class="notranslate">collect(T::Type, itr)</code> instead of <code class="notranslate">collect{T}(::Type{T}, itr)</code>. But <code class="notranslate">@code_warntype</code> gave it a pass:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; @code_warntype collect([1,2,3]) Variables: itr::Array{Int64,1} Body: begin # array.jl, line 273: return collect(Int64,itr::Array{Int64,1})::Array{Int64,1} end::Array{Int64,1} julia&gt; @code_warntype collect(Int, [1,2,3]) T::Type{Int64} itr::Array{Int64,1} i::Int64 a::Array{Int64,1} … # Long, but no red flags"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">@code_warntype</span> <span class="pl-c1">collect</span>([<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>]) Variables<span class="pl-k">:</span> itr<span class="pl-k">::</span><span class="pl-c1">Array{Int64,1}</span> Body<span class="pl-k">:</span> <span class="pl-k">begin</span> <span class="pl-c"><span class="pl-c">#</span> array.jl, line 273:</span> <span class="pl-k">return</span> <span class="pl-c1">collect</span>(Int64,itr<span class="pl-k">::</span><span class="pl-c1">Array{Int64,1}</span>)<span class="pl-k">::</span><span class="pl-c1">Array{Int64,1}</span> <span class="pl-k">end</span><span class="pl-k">::</span><span class="pl-c1">Array{Int64,1}</span> julia<span class="pl-k">&gt;</span> <span class="pl-c1">@code_warntype</span> <span class="pl-c1">collect</span>(Int, [<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>]) T<span class="pl-k">::</span><span class="pl-c1">Type{Int64}</span> itr<span class="pl-k">::</span><span class="pl-c1">Array{Int64,1}</span> i<span class="pl-k">::</span><span class="pl-c1">Int64</span> a<span class="pl-k">::</span><span class="pl-c1">Array{Int64,1}</span> … <span class="pl-c"><span class="pl-c">#</span> Long, but no red flags</span></pre></div> <p dir="auto">It's particularly tricky in this case because inference gets it right <em>outside</em> the function, and then when you look inside with <code class="notranslate">@code_warntype</code> the macro automatically considers the type of its type arguments to be <code class="notranslate">Type{T}</code> and not <code class="notranslate">DataType</code>. Often this is what you want (in fact, I did this in one of my first PRs), but it isn't correct in this case.</p> <p dir="auto">This is what we should have seen:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; code_warntype(collect, Tuple{DataType, Array{Int,1}}) Variables: T::DataType itr::Array{Int64,1} i::Int64 a::Array{T,N} ..."><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">code_warntype</span>(collect, Tuple{DataType, Array{Int,<span class="pl-c1">1</span>}}) Variables<span class="pl-k">:</span> T<span class="pl-k">::</span><span class="pl-c1">DataType</span> itr<span class="pl-k">::</span><span class="pl-c1">Array{Int64,1}</span> i<span class="pl-k">::</span><span class="pl-c1">Int64</span> a<span class="pl-k">::</span><span class="pl-c1">Array{T,N}</span> <span class="pl-k">...</span></pre></div> <p dir="auto">I'm not sure how to fix this — we want the <code class="notranslate">Type{T}</code> definition while looking up the method, but then we don't want to pass inference more information than it'll normally get when running the code.</p>
0
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.2.3 (latest released)</p> <h3 dir="auto">What happened</h3> <h2 dir="auto">Setup</h2> <p dir="auto">Have 3 DAGs:</p> <ol dir="auto"> <li>~240 Tasks, executes every hour, runs for about 45-50 minutes total</li> <li>~600 Tasks, executes every 5 days, runs for days</li> <li>~10 Tasks, executes on trigger, runs for 10-50 minutes</li> </ol> <p dir="auto">DAGs run on the <code class="notranslate">default_pool</code> with <code class="notranslate">max_active_tasks</code> set to 2.</p> <p dir="auto">My AirFlow config file has the following:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="parallelism = 32 default_pool_task_slot_count = 6 executor = LocalExecutor default_task_weight_rule = absolute"><pre class="notranslate"><code class="notranslate">parallelism = 32 default_pool_task_slot_count = 6 executor = LocalExecutor default_task_weight_rule = absolute </code></pre></div> <p dir="auto"><code class="notranslate">parallelism</code> was set initially like that.<br> <code class="notranslate">default_pool_task_slot_count</code> was set to 6, because it seemed rational that if all of my 3 dags are executing at the same time, the maximum amount of tasks that can be executed is 3*2=6.</p> <h2 dir="auto">The problem:</h2> <p dir="auto">Almost every time any one of the DAGs is executed, no tasks from other DAGs will start until all the tasks from the first one finish. That is, if slow DAG_2 with 600 tasks starts, DAG_1 will have to wait for days to start even a single Task.</p> <p dir="auto">The Logs for the Scheduler look like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="scheduler_1 | scheduler_1 | [2022-02-09 10:02:27,116] {scheduler_job.py:288} INFO - 4 tasks up for execution: scheduler_1 | &lt;TaskInstance: Slow_DAG.files_processing.group_7.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; scheduler_1 | &lt;TaskInstance: Slow_DAG.files_processing.group_119.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; scheduler_1 | &lt;TaskInstance: Slow_DAG.files_processing.group_118.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; scheduler_1 | &lt;TaskInstance: Slow_DAG.files_processing.group_117.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:322} INFO - Figuring out tasks to run in Pool(name=default_pool) with 4 open slots and 4 task instances ready to be queued scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:349} INFO - DAG Slow_DAG has 2/2 running and queued tasks scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:357} INFO - Not executing &lt;TaskInstance: Slow_DAG.files_processing.group_7.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; since the number of tasks running or queued from DAG Slow_DAG is &gt;= to the DAG's max_active_tasks limit of 2 scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:349} INFO - DAG Slow_DAG has 2/2 running and queued tasks scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:357} INFO - Not executing &lt;TaskInstance: Slow_DAG.files_processing.group_119.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; since the number of tasks running or queued from DAG Slow_DAG is &gt;= to the DAG's max_active_tasks limit of 2 scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:349} INFO - DAG Slow_DAG has 2/2 running and queued tasks scheduler_1 | [2022-02-09 10:02:27,120] {scheduler_job.py:357} INFO - Not executing &lt;TaskInstance: Slow_DAG.files_processing.group_118.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; since the number of tasks running or queued from DAG Slow_DAG is &gt;= to the DAG's max_active_tasks limit of 2 scheduler_1 | [2022-02-09 10:02:27,120] {scheduler_job.py:349} INFO - DAG Slow_DAG has 2/2 running and queued tasks scheduler_1 | [2022-02-09 10:02:27,120] {scheduler_job.py:357} INFO - Not executing &lt;TaskInstance: Slow_DAG.files_processing.group_117.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; since the number of tasks running or queued from DAG Slow_DAG is &gt;= to the DAG's max_active_tasks limit of 2 scheduler_1 | [2022-02-09 10:02:27,120] {scheduler_job.py:410} INFO - Setting the following tasks to queued state: scheduler_1 | "><pre class="notranslate"><code class="notranslate">scheduler_1 | scheduler_1 | [2022-02-09 10:02:27,116] {scheduler_job.py:288} INFO - 4 tasks up for execution: scheduler_1 | &lt;TaskInstance: Slow_DAG.files_processing.group_7.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; scheduler_1 | &lt;TaskInstance: Slow_DAG.files_processing.group_119.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; scheduler_1 | &lt;TaskInstance: Slow_DAG.files_processing.group_118.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; scheduler_1 | &lt;TaskInstance: Slow_DAG.files_processing.group_117.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:322} INFO - Figuring out tasks to run in Pool(name=default_pool) with 4 open slots and 4 task instances ready to be queued scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:349} INFO - DAG Slow_DAG has 2/2 running and queued tasks scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:357} INFO - Not executing &lt;TaskInstance: Slow_DAG.files_processing.group_7.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; since the number of tasks running or queued from DAG Slow_DAG is &gt;= to the DAG's max_active_tasks limit of 2 scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:349} INFO - DAG Slow_DAG has 2/2 running and queued tasks scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:357} INFO - Not executing &lt;TaskInstance: Slow_DAG.files_processing.group_119.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; since the number of tasks running or queued from DAG Slow_DAG is &gt;= to the DAG's max_active_tasks limit of 2 scheduler_1 | [2022-02-09 10:02:27,119] {scheduler_job.py:349} INFO - DAG Slow_DAG has 2/2 running and queued tasks scheduler_1 | [2022-02-09 10:02:27,120] {scheduler_job.py:357} INFO - Not executing &lt;TaskInstance: Slow_DAG.files_processing.group_118.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; since the number of tasks running or queued from DAG Slow_DAG is &gt;= to the DAG's max_active_tasks limit of 2 scheduler_1 | [2022-02-09 10:02:27,120] {scheduler_job.py:349} INFO - DAG Slow_DAG has 2/2 running and queued tasks scheduler_1 | [2022-02-09 10:02:27,120] {scheduler_job.py:357} INFO - Not executing &lt;TaskInstance: Slow_DAG.files_processing.group_117.command_0 scheduled__2022-02-04T09:57:13.142966+00:00 [scheduled]&gt; since the number of tasks running or queued from DAG Slow_DAG is &gt;= to the DAG's max_active_tasks limit of 2 scheduler_1 | [2022-02-09 10:02:27,120] {scheduler_job.py:410} INFO - Setting the following tasks to queued state: scheduler_1 | </code></pre></div> <p dir="auto">I have fixed this by setting</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="parallelism = 1000 default_pool_task_slot_count = 999"><pre class="notranslate"><code class="notranslate">parallelism = 1000 default_pool_task_slot_count = 999 </code></pre></div> <h2 dir="auto">The reason why this occurs and why the solution works</h2> <p dir="auto">We need to look at this method of the Scheduler:<br> <a href="https://github.com/apache/airflow/blob/2.2.3/airflow/jobs/scheduler_job.py#L229">https://github.com/apache/airflow/blob/2.2.3/airflow/jobs/scheduler_job.py#L229</a><br> In it, the overall logic is the following:</p> <ol dir="auto"> <li>Receive <code class="notranslate">max_tis</code>(== <code class="notranslate">parallelism - active running tasks</code> from the config) in the arguments. In my case that would be 30</li> <li>Calculate how many free slots in <strong>all</strong> all Pools we have. In my case that would be 4.</li> <li>Select the minimum and update the <code class="notranslate">max_tis</code> variable: <code class="notranslate">max_tis = min(4, 30) = 4</code></li> <li>Query the DB for tasks that are Scheduled in an unpaused DAGs that are running normally and order them by DAG execution date.</li> <li>Limit the query by <code class="notranslate">max_tis</code>.</li> <li>Loop over each returned task and check if we can run it. Run, if possible.</li> </ol> <p dir="auto">Now, since the tasks are ordered by <code class="notranslate">execution date</code>, this will return us tasks for a DAG that started first, which lets say was DAG_2.<br> It has over 600 tasks. The LIMIT operation will return 4 of them.<br> Each off these tasks cannot be run since there are already 2 tasks running and the <code class="notranslate">max_active_tasks</code> of the DAG is 2.<br> Thus, we just wait till one of these tasks finish and start another task from the same DAG.</p> <h3 dir="auto">What you expected to happen</h3> <p dir="auto">All DAGs are executed in parallel, up to 6 tasks in total.</p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">Take a look at <a href="https://github.com/EvGe22/airflow_bug_reproduce">https://github.com/EvGe22/airflow_bug_reproduce</a></p> <h3 dir="auto">Operating System</h3> <p dir="auto">Ubuntu 18.04.5 LTS</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Deployment</h3> <p dir="auto">Docker-Compose</p> <h3 dir="auto">Deployment details</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Anything else</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Are you willing to submit PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.3.3 (latest released)</p> <h3 dir="auto">What happened</h3> <p dir="auto">As the title states, if you have dynamically mapped tasks inside of a <code class="notranslate">TaskGroup</code>, those tasks do not get the <code class="notranslate">group_id</code> prepended to their respective <code class="notranslate">task_id</code>s. This causes at least a couple of undesirable side effects:</p> <ol dir="auto"> <li>Task names are truncated in Grid/Graph* View. The tasks below are named <code class="notranslate">plus_one</code> and <code class="notranslate">plus_two</code>:</li> </ol> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7269927/179826453-a4293c14-2a83-4739-acf2-8b378e4e85e9.png"><img src="https://user-images.githubusercontent.com/7269927/179826453-a4293c14-2a83-4739-acf2-8b378e4e85e9.png" alt="Screenshot from 2022-07-19 13-29-05" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7269927/179826442-b9e3d24d-52ff-49fc-a8cc-fe1cb5143bcb.png"><img src="https://user-images.githubusercontent.com/7269927/179826442-b9e3d24d-52ff-49fc-a8cc-fe1cb5143bcb.png" alt="Screenshot from 2022-07-19 13-47-47" style="max-width: 100%;"></a></p> <p dir="auto">Presumably this is because the UI normally strips off the <code class="notranslate">group_id</code> prefix.</p> <p dir="auto">* Graph View was very inconsistent in my experience. Sometimes the names are truncated, and sometimes they render correctly. I haven't figured out the pattern behind this behavior.</p> <ol start="2" dir="auto"> <li>Duplicate <code class="notranslate">task_id</code>s between groups result in a <code class="notranslate">airflow.exceptions.DuplicateTaskIdFound</code>, even if the <code class="notranslate">group_id</code> would normally disambiguate them.</li> </ol> <h3 dir="auto">What you think should happen instead</h3> <p dir="auto">These dynamic tasks inside of a group should have the <code class="notranslate">group_id</code> prepended for consistent behavior.</p> <h3 dir="auto">How to reproduce</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#!/usr/bin/env python3 import datetime from airflow.decorators import dag, task from airflow.utils.task_group import TaskGroup @dag( start_date=datetime.datetime(2022, 7, 19), schedule_interval=None, ) def test_dag(): with TaskGroup(group_id='group'): @task def plus_one(x: int): return x + 1 plus_one.expand(x=[1, 2, 3]) with TaskGroup(group_id='ggg'): @task def plus_two(x: int): return x + 2 plus_two.expand(x=[1, 2, 3]) dag = test_dag() if __name__ == '__main__': dag.cli()"><pre class="notranslate"><code class="notranslate">#!/usr/bin/env python3 import datetime from airflow.decorators import dag, task from airflow.utils.task_group import TaskGroup @dag( start_date=datetime.datetime(2022, 7, 19), schedule_interval=None, ) def test_dag(): with TaskGroup(group_id='group'): @task def plus_one(x: int): return x + 1 plus_one.expand(x=[1, 2, 3]) with TaskGroup(group_id='ggg'): @task def plus_two(x: int): return x + 2 plus_two.expand(x=[1, 2, 3]) dag = test_dag() if __name__ == '__main__': dag.cli() </code></pre></div> <h3 dir="auto">Operating System</h3> <p dir="auto">CentOS Stream 8</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto">N/A</p> <h3 dir="auto">Deployment</h3> <p dir="auto">Other</p> <h3 dir="auto">Deployment details</h3> <p dir="auto">Standalone</p> <h3 dir="auto">Anything else</h3> <p dir="auto">Possibly related: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="741611909" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/12309" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/12309/hovercard" href="https://github.com/apache/airflow/issues/12309">#12309</a></p> <h3 dir="auto">Are you willing to submit PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
0
<p dir="auto"><strong>Describe the bug</strong><br> A clear and concise description of what the bug is. <strong>If your problem is not a bug, please file under Support or Usage Question</strong></p> <p dir="auto"><strong>To Reproduce</strong><br> Code snippet to reproduce, ideally that will work by pasting into something like <a href="https://npm.runkit.com/axios" rel="nofollow">https://npm.runkit.com/axios</a>, a hosted solution, or a repository that illustrates the issue. <strong>If your problem is not reproducible, please file under Support or Usage Question</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Example code here"><pre class="notranslate"><span class="pl-c">// Example code here</span></pre></div> <p dir="auto"><strong>Expected behavior</strong><br> A clear and concise description of what you expected to happen.</p> <p dir="auto"><strong>Environment:</strong></p> <ul dir="auto"> <li>Axios Version [e.g. 0.18.0]</li> <li>OS: [e.g. iOS 12.1.0, OSX 10.13.4]</li> <li>Browser [e.g. Chrome, Safari]</li> <li>Browser Version [e.g. 22]</li> <li>Additional Library Versions [e.g. React 16.7, React Native 0.58.0]</li> </ul> <p dir="auto"><strong>Additional context/Screenshots</strong><br> Add any other context about the problem here. If applicable, add screenshots to help explain.</p>
<h4 dir="auto">Summary</h4> <p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="301721609" data-permission-text="Title is private" data-url="https://github.com/axios/axios/issues/1395" data-hovercard-type="pull_request" data-hovercard-url="/axios/axios/pull/1395/hovercard" href="https://github.com/axios/axios/pull/1395">#1395</a> launched a fix that instance config may override global config, but it <a href="https://github.com/axios/axios/blob/master/lib/core/mergeConfig.js#L36">ignore custom configs</a>.<br> So it will break something we'd like to attach into the config and access in interceptor (e.g. CookieJar).</p> <p dir="auto">For example (<a href="https://codepen.io/anon/pen/gjZRdR?editors=1111" rel="nofollow">https://codepen.io/anon/pen/gjZRdR?editors=1111</a>):</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const inst = axios.create(); inst.interceptors.request.use(config =&gt; { console.log('should be &quot;test&quot;, actual', config.testAttr); }) inst.get('/', { testAttr: 'test', });"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">inst</span> <span class="pl-c1">=</span> <span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">inst</span><span class="pl-kos">.</span><span class="pl-c1">interceptors</span><span class="pl-kos">.</span><span class="pl-c1">request</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-s1">config</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'should be "test", actual'</span><span class="pl-kos">,</span> <span class="pl-s1">config</span><span class="pl-kos">.</span><span class="pl-c1">testAttr</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">inst</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'/'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">testAttr</span>: <span class="pl-s">'test'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <h4 dir="auto">Context</h4> <ul dir="auto"> <li>axios version: v0.19.0-beta.1</li> <li>Environment: node &amp; chrome</li> </ul>
1
<p dir="auto">Hi,<br> On a Google Colab notebook with keras(2.2.4) and tensorflow(1.13.1) as a backend, I am trying to tune a CNN, I use a simple and basic table of hyper-parameters and run my tests in a set of loops.<br> My problem is that I can't free the GPU memory after each iteration and Keras doesn't seem to be able to release GPU memory automatically. So every time I get a <strong>Ressource Exhausted : Out Of Memory (OOM)</strong><br> I did some digging up and run into this function that reassembles different solutions that have been suggested to solve this problem (didn't work for me though) :</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def reset_keras(): sess = get_session() clear_session() sess.close() sess = get_session() try: del model # this is from global space - change this as you need except: pass print(gc.collect()) # if it's done something you should see a number being outputted # use the same config as you used to create the session config = tf.ConfigProto() config.gpu_options.per_process_gpu_memory_fraction = 1 config.gpu_options.visible_device_list = &quot;0&quot; set_session(tf.Session(config=config))"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">reset_keras</span>(): <span class="pl-s1">sess</span> <span class="pl-c1">=</span> <span class="pl-en">get_session</span>() <span class="pl-en">clear_session</span>() <span class="pl-s1">sess</span>.<span class="pl-en">close</span>() <span class="pl-s1">sess</span> <span class="pl-c1">=</span> <span class="pl-en">get_session</span>() <span class="pl-k">try</span>: <span class="pl-k">del</span> <span class="pl-s1">model</span> <span class="pl-c"># this is from global space - change this as you need</span> <span class="pl-k">except</span>: <span class="pl-k">pass</span> <span class="pl-en">print</span>(<span class="pl-s1">gc</span>.<span class="pl-en">collect</span>()) <span class="pl-c"># if it's done something you should see a number being outputted</span> <span class="pl-c"># use the same config as you used to create the session</span> <span class="pl-s1">config</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-v">ConfigProto</span>() <span class="pl-s1">config</span>.<span class="pl-s1">gpu_options</span>.<span class="pl-s1">per_process_gpu_memory_fraction</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span> <span class="pl-s1">config</span>.<span class="pl-s1">gpu_options</span>.<span class="pl-s1">visible_device_list</span> <span class="pl-c1">=</span> <span class="pl-s">"0"</span> <span class="pl-en">set_session</span>(<span class="pl-s1">tf</span>.<span class="pl-v">Session</span>(<span class="pl-s1">config</span><span class="pl-c1">=</span><span class="pl-s1">config</span>))</pre></div> <p dir="auto">The only thing that i didn't fully grasp is the "<em>same config as you used to create your model</em> " since with Keras we don't chose explicitly a certain configuration. I get by for one iteration, some times two, but I can't go beyond. I already tried to change the batch_size and for the moment I am unable to afford for a machine with higher performances.</p>
<p dir="auto">In order to preform a object detection like task, I used a CNN. I am using a custom generator that follows this <a href="https://stanford.edu/~shervine/blog/keras-how-to-generate-data-on-the-fly" rel="nofollow">example</a></p> <p dir="auto">My machine is a MacOS High Sierra 10.13.6, yet I am running my code using Google Colab's GPU so my machine's performances has nothing to do with the issue(right ?). It should be noted that I have tested my code on another platform (FloydHub's Tesla K80 GPU) and had the same problem.</p> <p dir="auto">I am using</p> <ul dir="auto"> <li>Keras 2.2.4</li> <li>Tensorflow backend 1.13.1</li> <li>Python (3.7)</li> <li>CUDA release 10.1, V10.1.168</li> <li>GPU model and memory: Tesla K80 (up to my knowledge, this is what google uses on Colab)</li> </ul> <p dir="auto">I run out of GPU memory quickly, when passing my model's training in a for loop (looking for optimal hyper-parameters) the program stops on <strong>Out Of Memory Error</strong> after the first iteration. Before the beginning of the first epoch and shortly before the loading arrow for the first epoch appears, the GPU usage jumps to a value of 98%. I put a <strong>gc.collect()</strong> , <strong>del model</strong> and <strong>K.clear_session()</strong> in the end of my training in order to release memory for the next model but it seems to have no effect on GPU which remains at 98% before eventually crashing my notebook.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- ResourceExhaustedError Traceback (most recent call last) &lt;ipython-input-75-31b4f9e0b883&gt; in &lt;module&gt;() 15 models={} 16 compile_model(model,OPTIMIZER,LOSS,METRICS,LR,MOMENTUM,DECAY) ---&gt; 17 allinone2(Hist,model,Data,VAL_SPLIT,OPTIMIZER,LOSS,METRICS,LR,MOMENTUM,DECAY,BATCH_SIZE,EPOCHS,PARAMS,True) 9 frames &lt;ipython-input-71-125d04498229&gt; in allinone2(Hist, model, Data, validation_split, optimizer, loss, metric, lr, momentum, decay, batch_size, epochs, params, showbboxs) 2 if TPU : 3 model = tf.contrib.tpu.keras_to_tpu_model(model,strategy=tf.contrib.tpu.TPUDistributionStrategy(tf.contrib.cluster_resolver.TPUClusterResolver(TPU_WORKER))) ----&gt; 4 train_gen,validation_gen,Hist = fit(model,Hist,Data,VAL_SPLIT,BATCH_SIZE,EPOCHS,PARAMS) 5 Save_model(SAVE_DIR,name_json=&quot;model&quot;,nameh5=&quot;model&quot;,save=SAVE_MODEL) 6 training_results(Hist,str(validation_split)+str(batch_size)+str(epochs),savefig=SAVE_FIG) &lt;ipython-input-64-efd2c5419ad6&gt; in fit(model, Hist, Data, validation_split, batch_size, epochs, params) 17 validation_steps = lenvalidation // batch_size, 18 callbacks=[Hist], ---&gt; 19 validation_data = validation_gen 20 ) 21 /usr/local/lib/python3.6/dist-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs) 89 warnings.warn('Update your `' + object_name + '` call to the ' + 90 'Keras 2 API: ' + signature, stacklevel=2) ---&gt; 91 return func(*args, **kwargs) 92 wrapper._original_function = func 93 return wrapper /usr/local/lib/python3.6/dist-packages/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 1416 use_multiprocessing=use_multiprocessing, 1417 shuffle=shuffle, -&gt; 1418 initial_epoch=initial_epoch) 1419 1420 @interfaces.legacy_generator_methods_support /usr/local/lib/python3.6/dist-packages/keras/engine/training_generator.py in fit_generator(model, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 215 outs = model.train_on_batch(x, y, 216 sample_weight=sample_weight, --&gt; 217 class_weight=class_weight) 218 219 outs = to_list(outs) /usr/local/lib/python3.6/dist-packages/keras/engine/training.py in train_on_batch(self, x, y, sample_weight, class_weight) 1215 ins = x + y + sample_weights 1216 self._make_train_function() -&gt; 1217 outputs = self.train_function(ins) 1218 return unpack_singleton(outputs) 1219 /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py in __call__(self, inputs) 2713 return self._legacy_call(inputs) 2714 -&gt; 2715 return self._call(inputs) 2716 else: 2717 if py_any(is_tensor(x) for x in inputs): /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py in _call(self, inputs) 2673 fetched = self._callable_fn(*array_vals, run_metadata=self.run_metadata) 2674 else: -&gt; 2675 fetched = self._callable_fn(*array_vals) 2676 return fetched[:len(self.outputs)] 2677 /usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py in __call__(self, *args, **kwargs) 1437 ret = tf_session.TF_SessionRunCallable( 1438 self._session._session, self._handle, args, status, -&gt; 1439 run_metadata_ptr) 1440 if run_metadata: 1441 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr) /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/errors_impl.py in __exit__(self, type_arg, value_arg, traceback_arg) 526 None, None, 527 compat.as_text(c_api.TF_Message(self.status.status)), --&gt; 528 c_api.TF_GetCode(self.status.status)) 529 # Delete the underlying status object from memory otherwise it stays alive 530 # as there is a reference to status from this from the traceback due to ResourceExhaustedError: OOM when allocating tensor with shape[3114176,32] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc [[{{node training_3/Adam/gradients/dense_17/MatMul_grad/MatMul_1}}]] Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info."><pre class="notranslate"><code class="notranslate">--------------------------------------------------------------------------- ResourceExhaustedError Traceback (most recent call last) &lt;ipython-input-75-31b4f9e0b883&gt; in &lt;module&gt;() 15 models={} 16 compile_model(model,OPTIMIZER,LOSS,METRICS,LR,MOMENTUM,DECAY) ---&gt; 17 allinone2(Hist,model,Data,VAL_SPLIT,OPTIMIZER,LOSS,METRICS,LR,MOMENTUM,DECAY,BATCH_SIZE,EPOCHS,PARAMS,True) 9 frames &lt;ipython-input-71-125d04498229&gt; in allinone2(Hist, model, Data, validation_split, optimizer, loss, metric, lr, momentum, decay, batch_size, epochs, params, showbboxs) 2 if TPU : 3 model = tf.contrib.tpu.keras_to_tpu_model(model,strategy=tf.contrib.tpu.TPUDistributionStrategy(tf.contrib.cluster_resolver.TPUClusterResolver(TPU_WORKER))) ----&gt; 4 train_gen,validation_gen,Hist = fit(model,Hist,Data,VAL_SPLIT,BATCH_SIZE,EPOCHS,PARAMS) 5 Save_model(SAVE_DIR,name_json="model",nameh5="model",save=SAVE_MODEL) 6 training_results(Hist,str(validation_split)+str(batch_size)+str(epochs),savefig=SAVE_FIG) &lt;ipython-input-64-efd2c5419ad6&gt; in fit(model, Hist, Data, validation_split, batch_size, epochs, params) 17 validation_steps = lenvalidation // batch_size, 18 callbacks=[Hist], ---&gt; 19 validation_data = validation_gen 20 ) 21 /usr/local/lib/python3.6/dist-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs) 89 warnings.warn('Update your `' + object_name + '` call to the ' + 90 'Keras 2 API: ' + signature, stacklevel=2) ---&gt; 91 return func(*args, **kwargs) 92 wrapper._original_function = func 93 return wrapper /usr/local/lib/python3.6/dist-packages/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 1416 use_multiprocessing=use_multiprocessing, 1417 shuffle=shuffle, -&gt; 1418 initial_epoch=initial_epoch) 1419 1420 @interfaces.legacy_generator_methods_support /usr/local/lib/python3.6/dist-packages/keras/engine/training_generator.py in fit_generator(model, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 215 outs = model.train_on_batch(x, y, 216 sample_weight=sample_weight, --&gt; 217 class_weight=class_weight) 218 219 outs = to_list(outs) /usr/local/lib/python3.6/dist-packages/keras/engine/training.py in train_on_batch(self, x, y, sample_weight, class_weight) 1215 ins = x + y + sample_weights 1216 self._make_train_function() -&gt; 1217 outputs = self.train_function(ins) 1218 return unpack_singleton(outputs) 1219 /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py in __call__(self, inputs) 2713 return self._legacy_call(inputs) 2714 -&gt; 2715 return self._call(inputs) 2716 else: 2717 if py_any(is_tensor(x) for x in inputs): /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py in _call(self, inputs) 2673 fetched = self._callable_fn(*array_vals, run_metadata=self.run_metadata) 2674 else: -&gt; 2675 fetched = self._callable_fn(*array_vals) 2676 return fetched[:len(self.outputs)] 2677 /usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py in __call__(self, *args, **kwargs) 1437 ret = tf_session.TF_SessionRunCallable( 1438 self._session._session, self._handle, args, status, -&gt; 1439 run_metadata_ptr) 1440 if run_metadata: 1441 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr) /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/errors_impl.py in __exit__(self, type_arg, value_arg, traceback_arg) 526 None, None, 527 compat.as_text(c_api.TF_Message(self.status.status)), --&gt; 528 c_api.TF_GetCode(self.status.status)) 529 # Delete the underlying status object from memory otherwise it stays alive 530 # as there is a reference to status from this from the traceback due to ResourceExhaustedError: OOM when allocating tensor with shape[3114176,32] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc [[{{node training_3/Adam/gradients/dense_17/MatMul_grad/MatMul_1}}]] Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info. </code></pre></div> <p dir="auto">I should be able to free the GPU memory in order to run my tests, It should be noted that my dataset has 1000 images of 800x1000 shape.</p> <p dir="auto">A snippet of the code that causes the problem (.ipynb =&gt; .py) :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="!pip install gputil !pip install psutil !pip install humanize #Imports ... def penalty(y_true, y_pred): a = tf.placeholder(tf.float64) p = 20 loss = K.switch(tf.less(y_true - y_pred, 0.1), K.square(y_true - y_pred) , p * K.square(y_true - y_pred)) return K.max(loss) def cusloss(y_true,y_pred): return K.mean(K.equal(K.round(100*y_pred , 100*y_true)),tf.zeros_like(y_pred)) # Global parameters IMG_SIZE = 800,1000,3 BATCH_SIZEs = [4,8,16,32] EPOCHSs = [10] PARAMSs = [{&quot;rotation&quot;:20,&quot;scale&quot;:0.1,&quot;shear&quot;:0.1,&quot;translate&quot;:0.1,&quot;scale&quot;:0.1}] OPTIMIZERs = ['adam'] LOSSEs = [penalty] METRICSs = [[cusloss,penalty,losses.msle,losses.mae,losses.mse,losses.logcosh]] LRs = [0.01,0.005] MOMENTUMs = [0.05,0.1] DECAYs = [0.2] VAL_SPLITs = [0.2] def load_data(*args): ... return Data class Generator(keras.utils.Sequence): def __init__(self, Data, params ,batch_size): &quot;&quot;&quot;Initials an image generator&quot;&quot;&quot; self.x = col(Data,0,1) self.y = np.array(col(Data,1,5)) self.batch_size = batch_size self.params = params self.on_epoch_end() def __len__(self): &quot;&quot;&quot;Our generator's length&quot;&quot;&quot; return int(np.ceil(len(self.x) / float(self.batch_size))) def __getitem__(self, idx): &quot;&quot;&quot; __getitem__ gives access to an item of our generator which will be a batch of BATCH_SIZE size. It is called via the brackets []&quot;&quot;&quot; images_list = self.x bboxes = self.y batch_size = self.batch_size w,h = IMG_SIZE[:2] required_transformations = self.params.keys() # Generate indexes of the batch indexes = self.indexes[idx*self.batch_size:(idx+1)*self.batch_size] if sum(indexes) == 0 : # check if indexes is empty return None # extracting BATCH_SIZE images from the dataset x_temp = [self.x[i] for i in indexes] y_temp = np.array([self.y[i,] for i in indexes]) # shuffling our batch's elements Ids,y0 = sklearn.utils.shuffle(x_temp,y_temp) # Initiate our batchs X = np.zeros((batch_size,h,w,1)) y = np.zeros((batch_size,4)) for i,image in enumerate(Ids) : image = image[0] try : img = cv2.imread(&quot;scans/&quot;+image+&quot;.png&quot;) except : print(&quot;Unable to read %s&quot;%(image)) img = None # Starting preprocessing if not (img is None) : img = cv2.resize(img,(w,h)) bbox = y0[i,] try : X[i,:,:,:] = np.expand_dims(rgb2gray(img_),axis=2) y[i,:] = bboxes_ except Exception as exc: # Prints the error without stoping the process print(&quot;Error found at index %d&quot;%(i)) print(traceback.format_exc()) print(exc) else : print(&quot;%s is None&quot;%(image)) return X,y def on_epoch_end(self): 'Updates indexes after each epoch' self.indexes = np.arange(len(self.x)) np.random.shuffle(self.indexes) def fit(model,Hist,Data,validation_split,batch_size,epochs,params): &quot;&quot;&quot; Fits our input to the output&quot;&quot;&quot; n = len(Data) lenvalidation = int(validation_split*n) lentrain = n - lenvalidation train_set = sklearn.utils.shuffle(Data[:lentrain]) validation_set = sklearn.utils.shuffle(Data[lentrain:]) train_gen = Generator(train_set,params,batch_size) validation_gen = Generator(validation_set,params,batch_size) print(&quot;starting training...&quot;) model.fit_generator(train_gen, steps_per_epoch = lentrain // batch_size, epochs=epochs, validation_steps = lenvalidation // batch_size, callbacks=[Hist], validation_data = validation_gen ) return train_gen,validation_gen,Hist def create_model(): # History initialisation Hist = History() # Defining the architecture of our CNN based NN model = Sequential() model.add(Conv2D(32, kernel_size=(3, 3), activation='relu', input_shape=(IMG_SIZE[1],IMG_SIZE[0],1))) model.add(MaxPooling2D(pool_size=(2, 2),strides=(2,2))) model.add(Dropout(0.25)) model.add(Conv2D(64, kernel_size=(5, 5), activation='relu')) model.add(MaxPooling2D(pool_size=(2, 2),strides=(2,2))) model.add(Dropout(0.3)) model.add(Flatten()) model.add(Dense(32, activation='relu')) model.add(Dropout(0.3)) model.add(Dense(4)) return Hist,model def compile_model(model,optimize,loss,metric,lr,momentum,decay): # Compiles the model run_opts = tf.RunOptions(report_tensor_allocations_upon_oom = True) model.compile(optimizer=optimize , loss = loss, metrics = metric, options = run_opts) # Define optimizers K.set_value(model.optimizer.lr, lr) K.set_value(model.optimizer.decay, decay) try : K.set_value(optimizer.momentum, momentum) except : pass def allinone(Hist,model,Data,validation_split,optimizer,loss,metric,lr,momentum,decay,batch_size,epochs,params) : compile_model(model,optimizer,loss,metric,lr,momentum,decay) train_gen,validation_gen,Hist = fit(model,Hist,Data,VAL_SPLIT,BATCH_SIZE,EPOCHS,PARAMS) torch.cuda.empty_cache() del model gc.collect() K.clear_session() def printmm(y_true=0,y_pred=0): GPUs = GPUtil.getGPUs() gpu = GPUs[0] print(GPUtil.showUtilization()) return(tf.Variable(gpu.memoryUtil*100)) # The Ultimate test Data = load_data() Hist,model = create_model() for EPOCHS in EPOCHSs: for BATCH_SIZE in BATCH_SIZEs: for PARAMS in PARAMSs : for OPTIMIZER in OPTIMIZERs: for LOSS in LOSSEs : for METRICS in METRICSs: for LR in LRs : for MOMENTUM in MOMENTUMs: for DECAY in DECAYs: for VAL_SPLIT in VAL_SPLITs : allinone(Hist,model,Data,VAL_SPLIT,OPTIMIZER,LOSS,METRICS,LR,MOMENTUM,DECAY,BATCH_SIZE,EPOCHS,PARAMS) "><pre class="notranslate"><code class="notranslate">!pip install gputil !pip install psutil !pip install humanize #Imports ... def penalty(y_true, y_pred): a = tf.placeholder(tf.float64) p = 20 loss = K.switch(tf.less(y_true - y_pred, 0.1), K.square(y_true - y_pred) , p * K.square(y_true - y_pred)) return K.max(loss) def cusloss(y_true,y_pred): return K.mean(K.equal(K.round(100*y_pred , 100*y_true)),tf.zeros_like(y_pred)) # Global parameters IMG_SIZE = 800,1000,3 BATCH_SIZEs = [4,8,16,32] EPOCHSs = [10] PARAMSs = [{"rotation":20,"scale":0.1,"shear":0.1,"translate":0.1,"scale":0.1}] OPTIMIZERs = ['adam'] LOSSEs = [penalty] METRICSs = [[cusloss,penalty,losses.msle,losses.mae,losses.mse,losses.logcosh]] LRs = [0.01,0.005] MOMENTUMs = [0.05,0.1] DECAYs = [0.2] VAL_SPLITs = [0.2] def load_data(*args): ... return Data class Generator(keras.utils.Sequence): def __init__(self, Data, params ,batch_size): """Initials an image generator""" self.x = col(Data,0,1) self.y = np.array(col(Data,1,5)) self.batch_size = batch_size self.params = params self.on_epoch_end() def __len__(self): """Our generator's length""" return int(np.ceil(len(self.x) / float(self.batch_size))) def __getitem__(self, idx): """ __getitem__ gives access to an item of our generator which will be a batch of BATCH_SIZE size. It is called via the brackets []""" images_list = self.x bboxes = self.y batch_size = self.batch_size w,h = IMG_SIZE[:2] required_transformations = self.params.keys() # Generate indexes of the batch indexes = self.indexes[idx*self.batch_size:(idx+1)*self.batch_size] if sum(indexes) == 0 : # check if indexes is empty return None # extracting BATCH_SIZE images from the dataset x_temp = [self.x[i] for i in indexes] y_temp = np.array([self.y[i,] for i in indexes]) # shuffling our batch's elements Ids,y0 = sklearn.utils.shuffle(x_temp,y_temp) # Initiate our batchs X = np.zeros((batch_size,h,w,1)) y = np.zeros((batch_size,4)) for i,image in enumerate(Ids) : image = image[0] try : img = cv2.imread("scans/"+image+".png") except : print("Unable to read %s"%(image)) img = None # Starting preprocessing if not (img is None) : img = cv2.resize(img,(w,h)) bbox = y0[i,] try : X[i,:,:,:] = np.expand_dims(rgb2gray(img_),axis=2) y[i,:] = bboxes_ except Exception as exc: # Prints the error without stoping the process print("Error found at index %d"%(i)) print(traceback.format_exc()) print(exc) else : print("%s is None"%(image)) return X,y def on_epoch_end(self): 'Updates indexes after each epoch' self.indexes = np.arange(len(self.x)) np.random.shuffle(self.indexes) def fit(model,Hist,Data,validation_split,batch_size,epochs,params): """ Fits our input to the output""" n = len(Data) lenvalidation = int(validation_split*n) lentrain = n - lenvalidation train_set = sklearn.utils.shuffle(Data[:lentrain]) validation_set = sklearn.utils.shuffle(Data[lentrain:]) train_gen = Generator(train_set,params,batch_size) validation_gen = Generator(validation_set,params,batch_size) print("starting training...") model.fit_generator(train_gen, steps_per_epoch = lentrain // batch_size, epochs=epochs, validation_steps = lenvalidation // batch_size, callbacks=[Hist], validation_data = validation_gen ) return train_gen,validation_gen,Hist def create_model(): # History initialisation Hist = History() # Defining the architecture of our CNN based NN model = Sequential() model.add(Conv2D(32, kernel_size=(3, 3), activation='relu', input_shape=(IMG_SIZE[1],IMG_SIZE[0],1))) model.add(MaxPooling2D(pool_size=(2, 2),strides=(2,2))) model.add(Dropout(0.25)) model.add(Conv2D(64, kernel_size=(5, 5), activation='relu')) model.add(MaxPooling2D(pool_size=(2, 2),strides=(2,2))) model.add(Dropout(0.3)) model.add(Flatten()) model.add(Dense(32, activation='relu')) model.add(Dropout(0.3)) model.add(Dense(4)) return Hist,model def compile_model(model,optimize,loss,metric,lr,momentum,decay): # Compiles the model run_opts = tf.RunOptions(report_tensor_allocations_upon_oom = True) model.compile(optimizer=optimize , loss = loss, metrics = metric, options = run_opts) # Define optimizers K.set_value(model.optimizer.lr, lr) K.set_value(model.optimizer.decay, decay) try : K.set_value(optimizer.momentum, momentum) except : pass def allinone(Hist,model,Data,validation_split,optimizer,loss,metric,lr,momentum,decay,batch_size,epochs,params) : compile_model(model,optimizer,loss,metric,lr,momentum,decay) train_gen,validation_gen,Hist = fit(model,Hist,Data,VAL_SPLIT,BATCH_SIZE,EPOCHS,PARAMS) torch.cuda.empty_cache() del model gc.collect() K.clear_session() def printmm(y_true=0,y_pred=0): GPUs = GPUtil.getGPUs() gpu = GPUs[0] print(GPUtil.showUtilization()) return(tf.Variable(gpu.memoryUtil*100)) # The Ultimate test Data = load_data() Hist,model = create_model() for EPOCHS in EPOCHSs: for BATCH_SIZE in BATCH_SIZEs: for PARAMS in PARAMSs : for OPTIMIZER in OPTIMIZERs: for LOSS in LOSSEs : for METRICS in METRICSs: for LR in LRs : for MOMENTUM in MOMENTUMs: for DECAY in DECAYs: for VAL_SPLIT in VAL_SPLITs : allinone(Hist,model,Data,VAL_SPLIT,OPTIMIZER,LOSS,METRICS,LR,MOMENTUM,DECAY,BATCH_SIZE,EPOCHS,PARAMS) </code></pre></div>
1
<p dir="auto">This issue is related to character encoding of the request parameters when sending a GET request. In my scenario, I need the percent character to not be encoded as %25. The <code class="notranslate">urllib.parse.urlencode</code> function has the <code class="notranslate">safe</code> input for this purpose. However, the <code class="notranslate">requests.get</code> function does not have such input. Therefore, I use <code class="notranslate">urllib.parse.urlencode</code> with <code class="notranslate">safe='%'</code> to get an ampersand-separated string of my request parameters and send that in for the <code class="notranslate">params</code> value of <code class="notranslate">requests.get</code>. Even with this trick, the response that I get is different than what I get with <code class="notranslate">urllib.request.Request</code>. The interesting thing is that when I print <code class="notranslate">response.url</code> (where <code class="notranslate">response</code> is the response object of <code class="notranslate">requests.get</code>), I see that the percent character is not encoded, but still the response is incorrect. It seems like encoding takes place somewhere else. I really hate abandoning the requests package because of this defect. I was wondering if there is any way this can be fixed in a future release.</p> <h2 dir="auto">Expected Result</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;result&gt; &lt;TotalMatches&gt;1135&lt;/TotalMatches&gt; &lt;TotalPages&gt;57&lt;/TotalPages&gt; &lt;PageNumber&gt;1&lt;/PageNumber&gt; &lt;item&gt; &lt;mid&gt;36145&lt;/mid&gt; &lt;merchantname&gt; ..."><pre class="notranslate"><code class="notranslate">&lt;result&gt; &lt;TotalMatches&gt;1135&lt;/TotalMatches&gt; &lt;TotalPages&gt;57&lt;/TotalPages&gt; &lt;PageNumber&gt;1&lt;/PageNumber&gt; &lt;item&gt; &lt;mid&gt;36145&lt;/mid&gt; &lt;merchantname&gt; ... </code></pre></div> <h2 dir="auto">Actual Result</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;result&gt; &lt;TotalMatches&gt;0&lt;/TotalMatches&gt; &lt;TotalPages&gt;0&lt;/TotalPages&gt; &lt;PageNumber&gt;1&lt;/PageNumber&gt; &lt;/result&gt; "><pre class="notranslate"><code class="notranslate">&lt;result&gt; &lt;TotalMatches&gt;0&lt;/TotalMatches&gt; &lt;TotalPages&gt;0&lt;/TotalPages&gt; &lt;PageNumber&gt;1&lt;/PageNumber&gt; &lt;/result&gt; </code></pre></div> <h2 dir="auto">Reproduction Steps</h2> <p dir="auto">This is the URL I am hitting:</p> <p dir="auto"><code class="notranslate">http://productsearch.linksynergy.com/productsearch?token=&lt;token&gt;&amp;mid=36145&amp;cat=Women%27s+Warehouse+Sale+-+Up+To+70%+Off&amp;keyword=dress&amp;pagenumber=1</code></p> <p dir="auto">Unfortunately, I cannot share the token. The decoded value for the <code class="notranslate">cat</code> parameter is "Women's Warehouse Sale - Up To 70% Off". The percent sign after 70 is the one that is causing the issue.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import requests with requests.Session() as http_session: response = http_session.get('http://productsearch.linksynergy.com/productsearch', params='token=&lt;token&gt;&amp;mid=36145&amp;cat=Women%27s+Warehouse+Sale+-+Up+To+70%+Off&amp;keyword=dress&amp;pagenumber=1')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">requests</span> <span class="pl-k">with</span> <span class="pl-s1">requests</span>.<span class="pl-v">Session</span>() <span class="pl-k">as</span> <span class="pl-s1">http_session</span>: <span class="pl-s1">response</span> <span class="pl-c1">=</span> <span class="pl-s1">http_session</span>.<span class="pl-en">get</span>(<span class="pl-s">'http://productsearch.linksynergy.com/productsearch'</span>, <span class="pl-s1">params</span><span class="pl-c1">=</span><span class="pl-s">'token=&lt;token&gt;&amp;mid=36145&amp;cat=Women%27s+Warehouse+Sale+-+Up+To+70%+Off&amp;keyword=dress&amp;pagenumber=1'</span>)</pre></div> <h2 dir="auto">System Information</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -m requests.help"><pre class="notranslate"><code class="notranslate">$ python -m requests.help </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;chardet&quot;: { &quot;version&quot;: &quot;4.0.0&quot; }, &quot;cryptography&quot;: { &quot;version&quot;: &quot;&quot; }, &quot;idna&quot;: { &quot;version&quot;: &quot;2.10&quot; }, &quot;implementation&quot;: { &quot;name&quot;: &quot;CPython&quot;, &quot;version&quot;: &quot;3.7.2&quot; }, &quot;platform&quot;: { &quot;release&quot;: &quot;5.8.0-40-generic&quot;, &quot;system&quot;: &quot;Linux&quot; }, &quot;pyOpenSSL&quot;: { &quot;openssl_version&quot;: &quot;&quot;, &quot;version&quot;: null }, &quot;requests&quot;: { &quot;version&quot;: &quot;2.25.1&quot; }, &quot;system_ssl&quot;: { &quot;version&quot;: &quot;1010106f&quot; }, &quot;urllib3&quot;: { &quot;version&quot;: &quot;1.26.3&quot; }, &quot;using_pyopenssl&quot;: false }"><pre class="notranslate"><code class="notranslate">{ "chardet": { "version": "4.0.0" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.7.2" }, "platform": { "release": "5.8.0-40-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "1010106f" }, "urllib3": { "version": "1.26.3" }, "using_pyopenssl": false } </code></pre></div> <p dir="auto">This command is only available on Requests v2.16.4 and greater. Otherwise,<br> please provide some basic information about your system (Python version,<br> operating system, &amp;c).</p>
<p dir="auto">I'm using requests to download asynchronously and parse the content of a bunch of URLs from different hosts. When the number of URLs is small (up to 1000 URLs) all works fine. When I run the same script with 10000 I get the following error <strong>only when there are about 10 URLs left to download</strong>:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;many_async_req.py&quot;, line 35, in &lt;module&gt; File &quot;/home/alex/code/.virtualenvs/testreq/local/lib/python2.7/site-packages/requests-0.11.2-py2.7.egg/requests/async.py&quot;, line 83, in map File &quot;/home/alex/code/.virtualenvs/testreq/local/lib/python2.7/site-packages/gevent/greenlet.py&quot;, line 487, in joinall ImportError: No module named queue"><pre class="notranslate"><span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"many_async_req.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">35</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/alex/code/.virtualenvs/testreq/local/lib/python2.7/site-packages/requests-0.11.2-py2.7.egg/requests/async.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">83</span>, <span class="pl-s1">in</span> <span class="pl-s1">map</span> <span class="pl-v">File</span> <span class="pl-s">"/home/alex/code/.virtualenvs/testreq/local/lib/python2.7/site-packages/gevent/greenlet.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">487</span>, <span class="pl-s1">in</span> <span class="pl-s1">joinall</span> <span class="pl-v">ImportError</span>: <span class="pl-v">No</span> <span class="pl-s1">module</span> <span class="pl-s1">named</span> <span class="pl-s1">queue</span></pre></div> <p dir="auto">Sometimes the script just hangs with about 10 URLs left. I observed this behavior with requests installed from pipy and with the code downloaded from the development branch.</p> <p dir="auto">This happened to me using the version of gevent from pypi <strong>and</strong> using the <a href="http://code.google.com/p/gevent/downloads/list" rel="nofollow">latest version</a> downloaded from gevent's Google Code repository.<br> I'm using a virtualenv with only the relevant modules installed:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(testreq)alex@haiku:~/code$ pip freeze certifi==0.0.8 chardet==1.0.1 distribute==0.6.19 gevent==0.13.7 greenlet==0.3.4 requests==0.11.2 wsgiref==0.1.2"><pre class="notranslate">(testreq)alex@haiku:<span class="pl-k">~</span>/code$ pip freeze certifi==0.0.8 chardet==1.0.1 distribute==0.6.19 gevent==0.13.7 greenlet==0.3.4 requests==0.11.2 wsgiref==0.1.2</pre></div> <p dir="auto">To reproduce the error I'm using the following script (that is a stripped-down version of the original) that basically just print the status code of each URL.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import codecs import random from requests import async from requests import defaults import sys defaults.defaults['base_headers']['User-Agent'] = &quot;Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0&quot; defaults.defaults['max_retries'] = 5 defaults.defaults['verbose'] = sys.stderr def check(response): global counter print &quot;\t %s HTTP status code: %s&quot; % (counter, response.status_code) counter += 1 def load_urls(fname): &quot;&quot;&quot; Read URLs from file and remove duplicates &quot;&quot;&quot; with codecs.open(fname, 'r', 'utf-8') as fh: urls = list(set([url.strip() for url in fh.readlines()])) random.shuffle(urls) return urls if __name__ == '__main__': urls = load_urls('urls.txt') limit = int(sys.argv[1]) urls = urls[:limit] rs = [] counter = 0 todo = len(urls) for url in urls: rs.append(async.get(url, hooks=dict(response=check), timeout=5.0)) async.map(rs, size=10) print &quot;To check: %s&quot; % todo print &quot;To checked: %s&quot; % counter"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">codecs</span> <span class="pl-k">import</span> <span class="pl-s1">random</span> <span class="pl-k">from</span> <span class="pl-s1">requests</span> <span class="pl-k">import</span> <span class="pl-s1">async</span> <span class="pl-k">from</span> <span class="pl-s1">requests</span> <span class="pl-k">import</span> <span class="pl-s1">defaults</span> <span class="pl-k">import</span> <span class="pl-s1">sys</span> <span class="pl-s1">defaults</span>.<span class="pl-s1">defaults</span>[<span class="pl-s">'base_headers'</span>][<span class="pl-s">'User-Agent'</span>] <span class="pl-c1">=</span> <span class="pl-s">"Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0"</span> <span class="pl-s1">defaults</span>.<span class="pl-s1">defaults</span>[<span class="pl-s">'max_retries'</span>] <span class="pl-c1">=</span> <span class="pl-c1">5</span> <span class="pl-s1">defaults</span>.<span class="pl-s1">defaults</span>[<span class="pl-s">'verbose'</span>] <span class="pl-c1">=</span> <span class="pl-s1">sys</span>.<span class="pl-s1">stderr</span> <span class="pl-k">def</span> <span class="pl-en">check</span>(<span class="pl-s1">response</span>): <span class="pl-k">global</span> <span class="pl-s1">counter</span> <span class="pl-k">print</span> <span class="pl-s">"<span class="pl-cce">\t</span> %s HTTP status code: %s"</span> <span class="pl-c1">%</span> (<span class="pl-s1">counter</span>, <span class="pl-s1">response</span>.<span class="pl-s1">status_code</span>) <span class="pl-s1">counter</span> <span class="pl-c1">+=</span> <span class="pl-c1">1</span> <span class="pl-k">def</span> <span class="pl-en">load_urls</span>(<span class="pl-s1">fname</span>): <span class="pl-s">""" Read URLs from file and remove duplicates """</span> <span class="pl-k">with</span> <span class="pl-s1">codecs</span>.<span class="pl-en">open</span>(<span class="pl-s1">fname</span>, <span class="pl-s">'r'</span>, <span class="pl-s">'utf-8'</span>) <span class="pl-k">as</span> <span class="pl-s1">fh</span>: <span class="pl-s1">urls</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-en">set</span>([<span class="pl-s1">url</span>.<span class="pl-en">strip</span>() <span class="pl-k">for</span> <span class="pl-s1">url</span> <span class="pl-c1">in</span> <span class="pl-s1">fh</span>.<span class="pl-en">readlines</span>()])) <span class="pl-s1">random</span>.<span class="pl-en">shuffle</span>(<span class="pl-s1">urls</span>) <span class="pl-k">return</span> <span class="pl-s1">urls</span> <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>: <span class="pl-s1">urls</span> <span class="pl-c1">=</span> <span class="pl-en">load_urls</span>(<span class="pl-s">'urls.txt'</span>) <span class="pl-s1">limit</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-s1">sys</span>.<span class="pl-s1">argv</span>[<span class="pl-c1">1</span>]) <span class="pl-s1">urls</span> <span class="pl-c1">=</span> <span class="pl-s1">urls</span>[:<span class="pl-s1">limit</span>] <span class="pl-s1">rs</span> <span class="pl-c1">=</span> [] <span class="pl-s1">counter</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span> <span class="pl-s1">todo</span> <span class="pl-c1">=</span> <span class="pl-en">len</span>(<span class="pl-s1">urls</span>) <span class="pl-k">for</span> <span class="pl-s1">url</span> <span class="pl-c1">in</span> <span class="pl-s1">urls</span>: <span class="pl-s1">rs</span>.<span class="pl-en">append</span>(<span class="pl-s1">async</span>.<span class="pl-en">get</span>(<span class="pl-s1">url</span>, <span class="pl-s1">hooks</span><span class="pl-c1">=</span><span class="pl-en">dict</span>(<span class="pl-s1">response</span><span class="pl-c1">=</span><span class="pl-s1">check</span>), <span class="pl-s1">timeout</span><span class="pl-c1">=</span><span class="pl-c1">5.0</span>)) <span class="pl-s1">async</span>.<span class="pl-en">map</span>(<span class="pl-s1">rs</span>, <span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-c1">10</span>) <span class="pl-k">print</span> <span class="pl-s">"To check: %s"</span> <span class="pl-c1">%</span> <span class="pl-s1">todo</span> <span class="pl-k">print</span> <span class="pl-s">"To checked: %s"</span> <span class="pl-c1">%</span> <span class="pl-s1">counter</span></pre></div>
0
<p dir="auto">linux-amd64 trybot crash here, with git parent <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/golang/go/commit/783741844b48ebbe6b575369c915bfc1c6e53972/hovercard" href="https://github.com/golang/go/commit/783741844b48ebbe6b575369c915bfc1c6e53972"><tt>7837418</tt></a>:</p> <p dir="auto"><a href="https://storage.googleapis.com/go-build-log/ea276538/linux-amd64_e00cadd4.log" rel="nofollow">https://storage.googleapis.com/go-build-log/ea276538/linux-amd64_e00cadd4.log</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="... ok crypto/subtle 0.006s unexpected fault address 0x0 fatal error: fault [signal 0x7 code=0x80 addr=0x0 pc=0x55c755] goroutine 36 [running]: runtime.throw(0x70f852, 0x5) /tmp/workdir/go/src/runtime/panic.go:566 +0x8c fp=0xc8201ed2b0 sp=0xc8201ed298 runtime.sigpanic() /tmp/workdir/go/src/runtime/sigpanic_unix.go:21 +0xe8 fp=0xc8201ed300 sp=0xc8201ed2b0 math/big.nat.cmp(0xdeaddeaddeaddead, 0x9, 0x1e, 0xc82007a410, 0x9, 0xa, 0x9) /tmp/workdir/go/src/math/big/nat.go:162 +0x45 fp=0xc8201ed308 sp=0xc8201ed300 math/big.nat.div(0x0, 0x0, 0x0, 0xdeaddeaddeaddead, 0x9, 0x1e, 0xdeaddeaddeaddead, 0x9, 0x1e, 0xc82007a410, ...) /tmp/workdir/go/src/math/big/nat.go:525 +0x7b fp=0xc8201ed3c8 sp=0xc8201ed308 math/big.(*Int).QuoRem(0xc8201ed4b0, 0xc8203ac200, 0xc82000e920, 0xc8203ac200, 0xc820012840, 0xc82039c920) /tmp/workdir/go/src/math/big/int.go:227 +0xaf fp=0xc8201ed478 sp=0xc8201ed3c8 math/big.(*Int).Mod(0xc8203ac200, 0xc8203ac200, 0xc82000e920, 0xc82039c8a0) /tmp/workdir/go/src/math/big/int.go:258 +0xcf fp=0xc8201ed4f8 sp=0xc8201ed478 crypto/ecdsa.Verify(0xc8201b1900, 0xc8201b1de0, 0x14, 0x20, 0xc8201b1e00, 0xc8201b1e20, 0x0) /tmp/workdir/go/src/crypto/ecdsa/ecdsa.go:259 +0x405 fp=0xc8201ed608 sp=0xc8201ed4f8 crypto/tls.(*ecdheKeyAgreement).processServerKeyExchange(0xc8201aebc0, 0xc820080280, 0xc8201b23c0, 0xc8201de580, 0xc8201f0480, 0xc8201b6c30, 0x0, 0xc8201cec00) /tmp/workdir/go/src/crypto/tls/key_agreement.go:366 +0x796 fp=0xc8201ed738 sp=0xc8201ed608 crypto/tls.(*clientHandshakeState).doFullHandshake(0xc8201edc50, 0xc8201cec60, 0x59) /tmp/workdir/go/src/crypto/tls/handshake_client.go:318 +0x416 fp=0xc8201edaa0 sp=0xc8201ed738 crypto/tls.(*Conn).clientHandshake(0xc8201cc600, 0x72a778, 0xc8201cc614) /tmp/workdir/go/src/crypto/tls/handshake_client.go:209 +0xec9 fp=0xc8201edd00 sp=0xc8201edaa0 crypto/tls.(*Conn).Handshake(0xc8201cc600, 0x0, 0x0) /tmp/workdir/go/src/crypto/tls/conn.go:1031 +0x9f fp=0xc8201edd28 sp=0xc8201edd00 crypto/tls.(*Conn).Write(0xc8201cc600, 0xc8201ede70, 0x6, 0x6, 0x0, 0x0, 0x0) /tmp/workdir/go/src/crypto/tls/conn.go:878 +0xdd fp=0xc8201eddb0 sp=0xc8201edd28 crypto/tls.(*clientTest).run.func1(0xc8201cc600, 0xc82013ecf0, 0xc8201c6b80, 0x7fc10778e7e0, 0xc8201b49a0, 0xc8201ceae0) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:212 +0x8a fp=0xc8201edf60 sp=0xc8201eddb0 runtime.goexit() /tmp/workdir/go/src/runtime/asm_amd64.s:2006 +0x1 fp=0xc8201edf68 sp=0xc8201edf60 created by crypto/tls.(*clientTest).run /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:223 +0x210 goroutine 1 [chan receive]: testing.RunTests(0x72a0e8, 0x83d3e0, 0x41, 0x41, 0xc820080201) /tmp/workdir/go/src/testing/testing.go:582 +0x359 testing.(*M).Run(0xc820031f08, 0x404cda) /tmp/workdir/go/src/testing/testing.go:515 +0x79 main.main() crypto/tls/_test/_testmain.go:184 +0xb4 goroutine 17 [syscall, locked to thread]: runtime.goexit() /tmp/workdir/go/src/runtime/asm_amd64.s:2006 +0x1 goroutine 35 [semacquire]: sync.runtime_Syncsemacquire(0xc8201c84c0) /tmp/workdir/go/src/runtime/sema.go:241 +0x1a0 sync.(*Cond).Wait(0xc8201c84b0) /tmp/workdir/go/src/sync/cond.go:63 +0x69 io.(*pipe).read(0xc8201c8480, 0xc8201055f0, 0x86, 0x86, 0x0, 0x0, 0x0) /tmp/workdir/go/src/io/pipe.go:52 +0xdc io.(*PipeReader).Read(0xc8201ca040, 0xc8201055f0, 0x86, 0x86, 0x0, 0x0, 0x0) /tmp/workdir/go/src/io/pipe.go:134 +0x42 io.ReadAtLeast(0x7fc10778e840, 0xc8201b49b0, 0xc8201055f0, 0x86, 0x86, 0x86, 0x0, 0x0, 0x7fc10778e840) /tmp/workdir/go/src/io/io.go:297 +0xa3 io.ReadFull(0x7fc10778e840, 0xc8201b49b0, 0xc8201055f0, 0x86, 0x86, 0x86, 0x0, 0x0) /tmp/workdir/go/src/io/io.go:315 +0x4e crypto/tls.(*clientTest).run(0xc8201c6b80, 0xc82013ecf0, 0x0) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:236 +0x7f0 crypto/tls.runClientTestForVersion(0xc82013ecf0, 0xc820033f00, 0x6f0ee0, 0x7, 0x6f0ce1, 0x5) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:277 +0x245 crypto/tls.runClientTestTLS10(0xc82013ecf0, 0xc820033f00) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:281 +0x55 crypto/tls.TestHandshakeClientECDHEECDSAAES(0xc82013ecf0) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:335 +0xf1 testing.tRunner(0xc82013ecf0, 0x83d488) /tmp/workdir/go/src/testing/testing.go:473 +0x7e created by testing.RunTests /tmp/workdir/go/src/testing/testing.go:581 +0x313 FAIL crypto/tls 0.155s ok crypto/x509 1.621s ..."><pre class="notranslate"><code class="notranslate">... ok crypto/subtle 0.006s unexpected fault address 0x0 fatal error: fault [signal 0x7 code=0x80 addr=0x0 pc=0x55c755] goroutine 36 [running]: runtime.throw(0x70f852, 0x5) /tmp/workdir/go/src/runtime/panic.go:566 +0x8c fp=0xc8201ed2b0 sp=0xc8201ed298 runtime.sigpanic() /tmp/workdir/go/src/runtime/sigpanic_unix.go:21 +0xe8 fp=0xc8201ed300 sp=0xc8201ed2b0 math/big.nat.cmp(0xdeaddeaddeaddead, 0x9, 0x1e, 0xc82007a410, 0x9, 0xa, 0x9) /tmp/workdir/go/src/math/big/nat.go:162 +0x45 fp=0xc8201ed308 sp=0xc8201ed300 math/big.nat.div(0x0, 0x0, 0x0, 0xdeaddeaddeaddead, 0x9, 0x1e, 0xdeaddeaddeaddead, 0x9, 0x1e, 0xc82007a410, ...) /tmp/workdir/go/src/math/big/nat.go:525 +0x7b fp=0xc8201ed3c8 sp=0xc8201ed308 math/big.(*Int).QuoRem(0xc8201ed4b0, 0xc8203ac200, 0xc82000e920, 0xc8203ac200, 0xc820012840, 0xc82039c920) /tmp/workdir/go/src/math/big/int.go:227 +0xaf fp=0xc8201ed478 sp=0xc8201ed3c8 math/big.(*Int).Mod(0xc8203ac200, 0xc8203ac200, 0xc82000e920, 0xc82039c8a0) /tmp/workdir/go/src/math/big/int.go:258 +0xcf fp=0xc8201ed4f8 sp=0xc8201ed478 crypto/ecdsa.Verify(0xc8201b1900, 0xc8201b1de0, 0x14, 0x20, 0xc8201b1e00, 0xc8201b1e20, 0x0) /tmp/workdir/go/src/crypto/ecdsa/ecdsa.go:259 +0x405 fp=0xc8201ed608 sp=0xc8201ed4f8 crypto/tls.(*ecdheKeyAgreement).processServerKeyExchange(0xc8201aebc0, 0xc820080280, 0xc8201b23c0, 0xc8201de580, 0xc8201f0480, 0xc8201b6c30, 0x0, 0xc8201cec00) /tmp/workdir/go/src/crypto/tls/key_agreement.go:366 +0x796 fp=0xc8201ed738 sp=0xc8201ed608 crypto/tls.(*clientHandshakeState).doFullHandshake(0xc8201edc50, 0xc8201cec60, 0x59) /tmp/workdir/go/src/crypto/tls/handshake_client.go:318 +0x416 fp=0xc8201edaa0 sp=0xc8201ed738 crypto/tls.(*Conn).clientHandshake(0xc8201cc600, 0x72a778, 0xc8201cc614) /tmp/workdir/go/src/crypto/tls/handshake_client.go:209 +0xec9 fp=0xc8201edd00 sp=0xc8201edaa0 crypto/tls.(*Conn).Handshake(0xc8201cc600, 0x0, 0x0) /tmp/workdir/go/src/crypto/tls/conn.go:1031 +0x9f fp=0xc8201edd28 sp=0xc8201edd00 crypto/tls.(*Conn).Write(0xc8201cc600, 0xc8201ede70, 0x6, 0x6, 0x0, 0x0, 0x0) /tmp/workdir/go/src/crypto/tls/conn.go:878 +0xdd fp=0xc8201eddb0 sp=0xc8201edd28 crypto/tls.(*clientTest).run.func1(0xc8201cc600, 0xc82013ecf0, 0xc8201c6b80, 0x7fc10778e7e0, 0xc8201b49a0, 0xc8201ceae0) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:212 +0x8a fp=0xc8201edf60 sp=0xc8201eddb0 runtime.goexit() /tmp/workdir/go/src/runtime/asm_amd64.s:2006 +0x1 fp=0xc8201edf68 sp=0xc8201edf60 created by crypto/tls.(*clientTest).run /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:223 +0x210 goroutine 1 [chan receive]: testing.RunTests(0x72a0e8, 0x83d3e0, 0x41, 0x41, 0xc820080201) /tmp/workdir/go/src/testing/testing.go:582 +0x359 testing.(*M).Run(0xc820031f08, 0x404cda) /tmp/workdir/go/src/testing/testing.go:515 +0x79 main.main() crypto/tls/_test/_testmain.go:184 +0xb4 goroutine 17 [syscall, locked to thread]: runtime.goexit() /tmp/workdir/go/src/runtime/asm_amd64.s:2006 +0x1 goroutine 35 [semacquire]: sync.runtime_Syncsemacquire(0xc8201c84c0) /tmp/workdir/go/src/runtime/sema.go:241 +0x1a0 sync.(*Cond).Wait(0xc8201c84b0) /tmp/workdir/go/src/sync/cond.go:63 +0x69 io.(*pipe).read(0xc8201c8480, 0xc8201055f0, 0x86, 0x86, 0x0, 0x0, 0x0) /tmp/workdir/go/src/io/pipe.go:52 +0xdc io.(*PipeReader).Read(0xc8201ca040, 0xc8201055f0, 0x86, 0x86, 0x0, 0x0, 0x0) /tmp/workdir/go/src/io/pipe.go:134 +0x42 io.ReadAtLeast(0x7fc10778e840, 0xc8201b49b0, 0xc8201055f0, 0x86, 0x86, 0x86, 0x0, 0x0, 0x7fc10778e840) /tmp/workdir/go/src/io/io.go:297 +0xa3 io.ReadFull(0x7fc10778e840, 0xc8201b49b0, 0xc8201055f0, 0x86, 0x86, 0x86, 0x0, 0x0) /tmp/workdir/go/src/io/io.go:315 +0x4e crypto/tls.(*clientTest).run(0xc8201c6b80, 0xc82013ecf0, 0x0) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:236 +0x7f0 crypto/tls.runClientTestForVersion(0xc82013ecf0, 0xc820033f00, 0x6f0ee0, 0x7, 0x6f0ce1, 0x5) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:277 +0x245 crypto/tls.runClientTestTLS10(0xc82013ecf0, 0xc820033f00) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:281 +0x55 crypto/tls.TestHandshakeClientECDHEECDSAAES(0xc82013ecf0) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:335 +0xf1 testing.tRunner(0xc82013ecf0, 0x83d488) /tmp/workdir/go/src/testing/testing.go:473 +0x7e created by testing.RunTests /tmp/workdir/go/src/testing/testing.go:581 +0x313 FAIL crypto/tls 0.155s ok crypto/x509 1.621s ... </code></pre></div>
<p dir="auto">See <a href="http://build.golang.org/log/1b98f2faca78eb97adbd218ad62fb20d3b62d8e8" rel="nofollow">http://build.golang.org/log/1b98f2faca78eb97adbd218ad62fb20d3b62d8e8</a>. But it happened only once on the freebsd-race buildbot.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="unexpected fault address 0x5ec7a6 fatal error: fault [signal 0xa code=0x3 addr=0x5ec7a6 pc=0x5ec7a6] goroutine 23 [running]: runtime.throw(0x7df110, 0x5) /tmp/workdir/go/src/runtime/panic.go:549 +0x8c fp=0xc820098cf0 sp=0xc820098cd8 runtime.sigpanic() /tmp/workdir/go/src/runtime/sigpanic_unix.go:21 +0x1ce fp=0xc820098d40 sp=0xc820098cf0 math/big.mulAddVWW(0xc8201b8070, 0x9, 0xe, 0xdeaddeaddeaddead, 0x9, 0x1e, 0x1, 0x0, 0xe, 0x9, ...) /tmp/workdir/go/src/math/big/arith_amd64.s:331 +0x26 fp=0xc820098d48 sp=0xc820098d40 math/big.nat.mulAddWW(0x0, 0x0, 0x0, 0xdeaddeaddeaddead, 0x9, 0x1e, 0x1, 0x0, 0x9, 0xe, ...) /tmp/workdir/go/src/math/big/nat.go:183 +0x184 fp=0xc820098db8 sp=0xc820098d48 math/big.nat.mul(0x0, 0x0, 0x0, 0xdeaddeaddeaddead, 0x9, 0x1e, 0xc8201d4060, 0x1, 0x6, 0x0, ...) /tmp/workdir/go/src/math/big/nat.go:408 +0xac8 fp=0xc820098ea8 sp=0xc820098db8 math/big.(*Int).Mul(0xc8200990d0, 0xc8202f8580, 0xc820099130, 0xc8200990f0) /tmp/workdir/go/src/math/big/int.go:156 +0xdf fp=0xc820098f30 sp=0xc820098ea8 crypto/elliptic.(*CurveParams).addJacobian(0xc820052800, 0xc82025dee0, 0xc82025df00, 0xc82025c000, 0xc8202f8580, 0xc8202f85a0, 0xc82025c020, 0x0, 0xc8201d5d70, 0x1) /tmp/workdir/go/src/crypto/elliptic/elliptic.go:133 +0x420 fp=0xc820099158 sp=0xc820098f30 crypto/elliptic.(*CurveParams).Add(0xc820052800, 0xc82025dee0, 0xc82025df00, 0xc8202f8580, 0xc8202f85a0, 0x42, 0xc8202f8580) /tmp/workdir/go/src/crypto/elliptic/elliptic.go:105 +0xaf fp=0xc8200991b8 sp=0xc820099158 crypto/ecdsa.Verify(0xc8201e90a0, 0xc8201e9580, 0x14, 0x20, 0xc8201e95a0, 0xc8201e95c0, 0x0) /tmp/workdir/go/src/crypto/ecdsa/ecdsa.go:253 +0x73b fp=0xc8200992e8 sp=0xc8200991b8 crypto/tls.(*ecdheKeyAgreement).processServerKeyExchange(0xc8200f1d40, 0xc820084280, 0xc820085680, 0xc820089e40, 0xc8201f6000, 0xc8201d4ff0, 0x0, 0x715360) /tmp/workdir/go/src/crypto/tls/key_agreement.go:366 +0xe82 fp=0xc8200994a0 sp=0xc8200992e8 crypto/tls.(*clientHandshakeState).doFullHandshake(0xc820099c10, 0xc8201d78c0, 0x59) /tmp/workdir/go/src/crypto/tls/handshake_client.go:316 +0x2569 fp=0xc820099928 sp=0xc8200994a0 crypto/tls.(*Conn).clientHandshake(0xc8201dc600, 0x8508c8, 0xc8201dc614) /tmp/workdir/go/src/crypto/tls/handshake_client.go:207 +0x19cc fp=0xc820099cc0 sp=0xc820099928 crypto/tls.(*Conn).Handshake(0xc8201dc600, 0x0, 0x0) /tmp/workdir/go/src/crypto/tls/conn.go:1033 +0x123 fp=0xc820099d00 sp=0xc820099cc0 crypto/tls.(*Conn).Write(0xc8201dc600, 0xc820099e50, 0x6, 0x6, 0x0, 0x0, 0x0) /tmp/workdir/go/src/crypto/tls/conn.go:880 +0xfc fp=0xc820099d90 sp=0xc820099d00 crypto/tls.(*clientTest).run.func1(0xc8201dc600, 0xc8201ea1b0, 0xc820103400, 0x800aae7b8, 0xc82010dc20, 0xc8201d7740) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:211 +0x9b fp=0xc820099f60 sp=0xc820099d90 runtime.goexit() /tmp/workdir/go/src/runtime/asm_amd64.s:2006 +0x1 fp=0xc820099f68 sp=0xc820099f60 created by crypto/tls.(*clientTest).run /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:222 +0x298"><pre class="notranslate"><code class="notranslate">unexpected fault address 0x5ec7a6 fatal error: fault [signal 0xa code=0x3 addr=0x5ec7a6 pc=0x5ec7a6] goroutine 23 [running]: runtime.throw(0x7df110, 0x5) /tmp/workdir/go/src/runtime/panic.go:549 +0x8c fp=0xc820098cf0 sp=0xc820098cd8 runtime.sigpanic() /tmp/workdir/go/src/runtime/sigpanic_unix.go:21 +0x1ce fp=0xc820098d40 sp=0xc820098cf0 math/big.mulAddVWW(0xc8201b8070, 0x9, 0xe, 0xdeaddeaddeaddead, 0x9, 0x1e, 0x1, 0x0, 0xe, 0x9, ...) /tmp/workdir/go/src/math/big/arith_amd64.s:331 +0x26 fp=0xc820098d48 sp=0xc820098d40 math/big.nat.mulAddWW(0x0, 0x0, 0x0, 0xdeaddeaddeaddead, 0x9, 0x1e, 0x1, 0x0, 0x9, 0xe, ...) /tmp/workdir/go/src/math/big/nat.go:183 +0x184 fp=0xc820098db8 sp=0xc820098d48 math/big.nat.mul(0x0, 0x0, 0x0, 0xdeaddeaddeaddead, 0x9, 0x1e, 0xc8201d4060, 0x1, 0x6, 0x0, ...) /tmp/workdir/go/src/math/big/nat.go:408 +0xac8 fp=0xc820098ea8 sp=0xc820098db8 math/big.(*Int).Mul(0xc8200990d0, 0xc8202f8580, 0xc820099130, 0xc8200990f0) /tmp/workdir/go/src/math/big/int.go:156 +0xdf fp=0xc820098f30 sp=0xc820098ea8 crypto/elliptic.(*CurveParams).addJacobian(0xc820052800, 0xc82025dee0, 0xc82025df00, 0xc82025c000, 0xc8202f8580, 0xc8202f85a0, 0xc82025c020, 0x0, 0xc8201d5d70, 0x1) /tmp/workdir/go/src/crypto/elliptic/elliptic.go:133 +0x420 fp=0xc820099158 sp=0xc820098f30 crypto/elliptic.(*CurveParams).Add(0xc820052800, 0xc82025dee0, 0xc82025df00, 0xc8202f8580, 0xc8202f85a0, 0x42, 0xc8202f8580) /tmp/workdir/go/src/crypto/elliptic/elliptic.go:105 +0xaf fp=0xc8200991b8 sp=0xc820099158 crypto/ecdsa.Verify(0xc8201e90a0, 0xc8201e9580, 0x14, 0x20, 0xc8201e95a0, 0xc8201e95c0, 0x0) /tmp/workdir/go/src/crypto/ecdsa/ecdsa.go:253 +0x73b fp=0xc8200992e8 sp=0xc8200991b8 crypto/tls.(*ecdheKeyAgreement).processServerKeyExchange(0xc8200f1d40, 0xc820084280, 0xc820085680, 0xc820089e40, 0xc8201f6000, 0xc8201d4ff0, 0x0, 0x715360) /tmp/workdir/go/src/crypto/tls/key_agreement.go:366 +0xe82 fp=0xc8200994a0 sp=0xc8200992e8 crypto/tls.(*clientHandshakeState).doFullHandshake(0xc820099c10, 0xc8201d78c0, 0x59) /tmp/workdir/go/src/crypto/tls/handshake_client.go:316 +0x2569 fp=0xc820099928 sp=0xc8200994a0 crypto/tls.(*Conn).clientHandshake(0xc8201dc600, 0x8508c8, 0xc8201dc614) /tmp/workdir/go/src/crypto/tls/handshake_client.go:207 +0x19cc fp=0xc820099cc0 sp=0xc820099928 crypto/tls.(*Conn).Handshake(0xc8201dc600, 0x0, 0x0) /tmp/workdir/go/src/crypto/tls/conn.go:1033 +0x123 fp=0xc820099d00 sp=0xc820099cc0 crypto/tls.(*Conn).Write(0xc8201dc600, 0xc820099e50, 0x6, 0x6, 0x0, 0x0, 0x0) /tmp/workdir/go/src/crypto/tls/conn.go:880 +0xfc fp=0xc820099d90 sp=0xc820099d00 crypto/tls.(*clientTest).run.func1(0xc8201dc600, 0xc8201ea1b0, 0xc820103400, 0x800aae7b8, 0xc82010dc20, 0xc8201d7740) /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:211 +0x9b fp=0xc820099f60 sp=0xc820099d90 runtime.goexit() /tmp/workdir/go/src/runtime/asm_amd64.s:2006 +0x1 fp=0xc820099f68 sp=0xc820099f60 created by crypto/tls.(*clientTest).run /tmp/workdir/go/src/crypto/tls/handshake_client_test.go:222 +0x298 </code></pre></div>
1
<h4 dir="auto">Description</h4> <p dir="auto">i use minibatchkmeans and set k=2000, but, the number of clusters that minibatchkmeans returns is 1997, that is less than 2000. Then, i set k=1950, the minibatchkmeans return 1947, and it is less than 1950. I have over 16 million samples of datasets and each sample have 150 features.</p> <h4 dir="auto">Steps/Code to Reproduce</h4> <h4 dir="auto">Expected Results</h4> <p dir="auto">when set k =2000, return 2000</p> <h4 dir="auto">Actual Results</h4> <p dir="auto">1947</p> <h4 dir="auto">Versions</h4> <p dir="auto">sklean 0.20.1<br> system: centos6.3<br> scipy 1.1.0<br> numpy 1.14.5</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="clf = DecisionTreeClassifier(min_samples_split=20, min_samples_leaf=5, max_features=None) shape X (3220, 3375) shape y (3220,) calling clf.fit(X,y) Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored"><pre class="notranslate"><code class="notranslate">clf = DecisionTreeClassifier(min_samples_split=20, min_samples_leaf=5, max_features=None) shape X (3220, 3375) shape y (3220,) calling clf.fit(X,y) Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored Exception ValueError: ValueError('Attempting to find a split with an empty sample_mask',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored </code></pre></div> <p dir="auto"><del>I tested this with the current git version. Using cython 0.16, the problem goes away.</del></p> <p dir="auto"><del>Broken:</del></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo make clean &amp;&amp; sudo python2 setup.py install"><pre class="notranslate"><code class="notranslate">sudo make clean &amp;&amp; sudo python2 setup.py install </code></pre></div> <p dir="auto"><del>Fixed:</del></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo make clean &amp;&amp; make cython &amp;&amp; sudo python2 setup.py install"><pre class="notranslate"><code class="notranslate">sudo make clean &amp;&amp; make cython &amp;&amp; sudo python2 setup.py install </code></pre></div>
0
<p dir="auto">I am exploring Apache SuperSet. I want to connect to mysql database on server i.e., EC2 instance. I have installed all the required libraries based on <a href="https://superset.incubator.apache.org/installation.html" rel="nofollow">https://superset.incubator.apache.org/installation.html</a> and launched the superset as well.<br> I did go through <a href="https://docs.sqlalchemy.org/en/12/core/engines.html#database-urls" rel="nofollow">https://docs.sqlalchemy.org/en/12/core/engines.html#database-urls</a>.<br> entered mysql://{username}:{password}@{ip address of ec2 instance}/{database name} in the URL<br> Although i have the library, yet when i try to connect the mysql it says "No module named 'MySQLdb'". (Yes i have installed mysql-client)</p> <p dir="auto">Please help me with how to proceed?</p>
<p dir="auto">In latest master, open METRICS popover, see missing saved metrics from the dropdown select.</p> <p dir="auto">To reproduce:</p> <ul dir="auto"> <li>Open any charts that use sample data(e.g. FCC2018 Survey)</li> <li>Go to Edit dataset. in metric tab, create 3 new metrics and Save</li> <li>Go back to the control panel, click the pre-filled saved metric in METRICS</li> <li>Save tab, click dropdown, see list missing the original one,</li> </ul> <p dir="auto"><strong>Actual</strong></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 Screen.Recording.2021-01-28.at.6.04.50.PM.mov" class="m-1">Screen.Recording.2021-01-28.at.6.04.50.PM.mov</span> <span class="dropdown-caret"></span> </summary> <video src="https://user-images.githubusercontent.com/67837651/106222980-7112a200-6195-11eb-8652-8c8afb796876.mov" data-canonical-src="https://user-images.githubusercontent.com/67837651/106222980-7112a200-6195-11eb-8652-8c8afb796876.mov" controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" style="max-height:640px; min-height: 200px"> </video> </details> <p dir="auto"><strong>Expected</strong><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/67837651/106222908-4aed0200-6195-11eb-807d-2e64ee0cf909.png"><img width="737" alt="Screen Shot 2021-01-28 at 6 08 30 PM" src="https://user-images.githubusercontent.com/67837651/106222908-4aed0200-6195-11eb-807d-2e64ee0cf909.png" style="max-width: 100%;"></a></p>
0
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+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%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 in this issue<br> (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> <p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="319077292" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4693" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/4693/hovercard" href="https://github.com/celery/celery/issues/4693">#4693</a></p> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h1 dir="auto">Description</h1> <p dir="auto">In current documentation, in the "Optimizing" section, <a href="https://docs.celeryproject.org/en/latest/userguide/optimizing.html#librabbitmq" rel="nofollow">this paragraph</a> recommends using librabbitmq but in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="319077292" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4693" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/4693/hovercard" href="https://github.com/celery/celery/issues/4693">#4693</a> it's mentioned librabbitmq is not the best performing package anymore.</p> <h1 dir="auto">Suggestions</h1> <p dir="auto">I'd suggest to mark <a href="https://docs.celeryproject.org/en/latest/userguide/optimizing.html#librabbitmq" rel="nofollow">this paragraph</a> as "old" or remove it to prevent users from using it as a "best practice".</p>
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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"> 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"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">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><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.4.0 (cliffs) kombu:4.6.7 py:3.7.0 billiard:3.6.1.0 sqs:N/A platform -&gt; system:Linux arch:64bit kernel version:5.0.0-37-generic imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:sqs results:disabled broker_url: 'sqs://***:********@localhost//' task_default_queue: 'inference' broker_transport_options: { 'region': 'us-west-2'}"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.4.0 (cliffs) kombu:4.6.7 py:3.7.0 billiard:3.6.1.0 sqs:N/A platform -&gt; system:Linux arch:64bit kernel version:5.0.0-37-generic imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:sqs results:disabled broker_url: 'sqs://***:********@localhost//' task_default_queue: 'inference' broker_transport_options: { 'region': 'us-west-2'} </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: 3.7.0 (conda)</li> <li><strong>Minimal Celery Version</strong>: N/A or Unknown</li> <li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li> <li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery[sqs]"><pre class="notranslate"><code class="notranslate">celery[sqs] </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><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import os from celery import Celery from kombu.utils.url import quote aws_access_key = # AWS access key aws_secret_key = # AWS secret key broker_url = &quot;sqs://{aws_access_key}:{aws_secret_key}@&quot;.format( aws_access_key=aws_access_key, aws_secret_key=aws_secret_key, ) app = Celery('default', broker=broker_url) app.conf.broker_transport_options = {'region': 'us-west-2'} @app.task def add(x, y): return x + y"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-v">Celery</span> <span class="pl-k">from</span> <span class="pl-s1">kombu</span>.<span class="pl-s1">utils</span>.<span class="pl-s1">url</span> <span class="pl-k">import</span> <span class="pl-s1">quote</span> <span class="pl-s1">aws_access_key</span> <span class="pl-c1">=</span> <span class="pl-c"># AWS access key</span> <span class="pl-s1">aws_secret_key</span> <span class="pl-c1">=</span> <span class="pl-c"># AWS secret key</span> <span class="pl-s1">broker_url</span> <span class="pl-c1">=</span> <span class="pl-s">"sqs://{aws_access_key}:{aws_secret_key}@"</span>.<span class="pl-en">format</span>( <span class="pl-s1">aws_access_key</span><span class="pl-c1">=</span><span class="pl-s1">aws_access_key</span>, <span class="pl-s1">aws_secret_key</span><span class="pl-c1">=</span><span class="pl-s1">aws_secret_key</span>, ) <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'default'</span>, <span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s1">broker_url</span>) <span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-s1">broker_transport_options</span> <span class="pl-c1">=</span> {<span class="pl-s">'region'</span>: <span class="pl-s">'us-west-2'</span>} <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span> <span class="pl-k">def</span> <span class="pl-en">add</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>): <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-s1">y</span></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Start a worker</p> <h1 dir="auto">Actual Behavior</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -------------- celery@kidzik-XPS-8900 v4.4.0 (cliffs) --- ***** ----- -- ******* ---- Linux-5.0.0-37-generic-x86_64-with-debian-buster-sid 2020-01-03 19:10:18 - *** --- * --- - ** ---------- [config] - ** ---------- .&gt; app: infrence:0x7f1e39811be0 - ** ---------- .&gt; transport: sqs://***:**@localhost// - ** ---------- .&gt; results: disabled:// - *** --- * --- .&gt; concurrency: 8 (prefork) -- ******* ---- .&gt; task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .&gt; default exchange=default(direct) key=default [tasks] . app.add [2020-01-03 19:10:19,095: INFO/MainProcess] Connected to sqs://***:**@localhost// [2020-01-03 19:10:19,369: INFO/MainProcess] celery@kidzik-XPS-8900 ready. Segmentation fault (core dumped)"><pre class="notranslate"><code class="notranslate"> -------------- celery@kidzik-XPS-8900 v4.4.0 (cliffs) --- ***** ----- -- ******* ---- Linux-5.0.0-37-generic-x86_64-with-debian-buster-sid 2020-01-03 19:10:18 - *** --- * --- - ** ---------- [config] - ** ---------- .&gt; app: infrence:0x7f1e39811be0 - ** ---------- .&gt; transport: sqs://***:**@localhost// - ** ---------- .&gt; results: disabled:// - *** --- * --- .&gt; concurrency: 8 (prefork) -- ******* ---- .&gt; task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .&gt; default exchange=default(direct) key=default [tasks] . app.add [2020-01-03 19:10:19,095: INFO/MainProcess] Connected to sqs://***:**@localhost// [2020-01-03 19:10:19,369: INFO/MainProcess] celery@kidzik-XPS-8900 ready. Segmentation fault (core dumped) </code></pre></div>
0
<p dir="auto">Only happens when the user function mutates the input</p> <p dir="auto">Originally from: <a href="http://stackoverflow.com/questions/20691168/pandas-apply-to-data-frame-groupby/20705226#20705226" rel="nofollow">http://stackoverflow.com/questions/20691168/pandas-apply-to-data-frame-groupby/20705226#20705226</a></p> <p dir="auto">Could be auto-fixed or maybe just a better error report to the user (about the dups)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [40]: df = DataFrame(dict(A = ['foo','foo','bar','bar'], B = np.random.randn(4)),index=[1,1,2,2]) In [41]: df Out[41]: A B 1 foo 0.971425 1 foo -1.151693 2 bar 1.265031 2 bar -0.219011 [4 rows x 2 columns] In [42]: def f(x): x['std'] = x['B'].std() return x ....: "><pre class="notranslate"><code class="notranslate">In [40]: df = DataFrame(dict(A = ['foo','foo','bar','bar'], B = np.random.randn(4)),index=[1,1,2,2]) In [41]: df Out[41]: A B 1 foo 0.971425 1 foo -1.151693 2 bar 1.265031 2 bar -0.219011 [4 rows x 2 columns] In [42]: def f(x): x['std'] = x['B'].std() return x ....: </code></pre></div> <p dir="auto">Cannot straight perform the apply</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [44]: df.groupby('A').apply(f) ValueError: cannot reindex from a duplicate axis"><pre class="notranslate"><code class="notranslate">In [44]: df.groupby('A').apply(f) ValueError: cannot reindex from a duplicate axis </code></pre></div> <p dir="auto">By using unique indices everything is ok (so straightforward to fix)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [45]: df.reset_index().groupby('A').apply(f).set_index('index') Out[45]: A B std index 1 foo 0.971425 1.501271 1 foo -1.151693 1.501271 2 bar 1.265031 1.049376 2 bar -0.219011 1.049376 [4 rows x 3 columns]"><pre class="notranslate"><code class="notranslate">In [45]: df.reset_index().groupby('A').apply(f).set_index('index') Out[45]: A B std index 1 foo 0.971425 1.501271 1 foo -1.151693 1.501271 2 bar 1.265031 1.049376 2 bar -0.219011 1.049376 [4 rows x 3 columns] </code></pre></div>
<p dir="auto">Me and several of my colleagues typically create output for variables that have greek letters. Inside pandas, we then call them "epsilon", "sBar" or similar. Right now we have to run a string replace on the output of to_latex() and then manually save it to a file.</p> <p dir="auto">It'd be nice to be able to give to_latex() a template such as ['epsilon':'$\epsilon$', 'sBar':'$\bar s$'] and then to_latex() would replace these in the output accordingly.</p>
0
<p dir="auto">Describe what you were doing when the bug occurred:</p> <ol dir="auto"> <li>Clicked restart and start profiling</li> <li>Finished profiling</li> <li>Clicked on a commit and got the error below</li> </ol> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.2.1-3816ae7c3</p> <p dir="auto">Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157108<br> at Map.forEach ()<br> at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157054)<br> at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157577)<br> at vl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:314907)<br> at gi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59907)<br> at jl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:107381)<br> at Lc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92715)<br> at Pc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92640)<br> at wc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:89544)</p> <p dir="auto">Component stack: in vl<br> in div<br> in div<br> in div<br> in wo<br> in Unknown<br> in n<br> in Unknown<br> in div<br> in div<br> in Li<br> in $e<br> in dn<br> in Ca<br> in Pc</p>
<p dir="auto">PLEASE INCLUDE REPRO INSTRUCTIONS AND EXAMPLE CODE</p> <p dir="auto">I got this error when I click 'Ranked'.</p> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.0.4-3c6a219</p> <p dir="auto">Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11441<br> at Map.forEach ()<br> at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11387)<br> at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11920)<br> at _i (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:277123)<br> at Ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:55890)<br> at Xl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:98280)<br> at Hl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:84255)<br> at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:81285)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:25363</p> <p dir="auto">Component stack: in _i<br> in div<br> in div<br> in div<br> in Or<br> in Unknown<br> in n<br> in Unknown<br> in div<br> in div<br> in Ha<br> in le<br> in ve<br> in ko<br> in Ul</p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=celal" rel="nofollow">Celal Ziftci</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5696?redirect=false" rel="nofollow">SPR-5696</a></strong> and commented</p> <p dir="auto">Currently there are methods that take in "Object[]" for the execution of operations in most of the jdbc.object classes, such as:</p> <ul dir="auto"> <li>SqlUpdate.update(Object[])</li> <li>MappingSqlQuery.execute(Object[])</li> </ul> <p dir="auto">It would be very beneficial to have a similar method in StoredProcedure as "execute(Object[])".</p> <p dir="auto">I understand that there is a distinction in terms of update or query, and stored procedures in that stored procs can have a mixture of input and output params. However, this can be handled quite easily by using the already existing metadata provided to construct the StoredProcedure.</p> <p dir="auto">Below is a sample implementation:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/** * Avoids having to use a Map, hence to duplicate the keys of the map, which are the parameter names already * provided while registering the parameters to the {@link StoredProcedure}. * * @param values * the values for the &lt;b&gt;input&lt;/b&gt; parameters defined on this stored procedure, in the order of * registration. It is legal for map entries to be null, and this will produce the correct behavior using * a NULL argument to the stored procedure. * @return map of output params, keyed by name as in parameter declarations. Output parameters will appear here, * with their values after the stored procedure has been called. */ public Map execute(Object[] values) { if (values == null) { return execute(Collections.EMPTY_MAP); } else { List&lt;SqlParameter&gt; params = this.getDeclaredParameters(); List&lt;SqlParameter&gt; inputParams = new ArrayList&lt;SqlParameter&gt;(); // filter the input params for (SqlParameter sqlParameter : params) { if (sqlParameter.isInputValueProvided()) { inputParams.add(sqlParameter); } } // Make sure exactly correct number of arguments are provided if (inputParams.size() != values.length) { throw new IllegalArgumentException(&quot;There are &quot; + inputParams.size() + &quot; input arguments, but &quot; + values.length + &quot; values are provided&quot;); } // Create a map, and call existing execute method Map&lt;String, Object&gt; valuesToReturn = new HashMap&lt;String, Object&gt;(); for (int i = 0; i &lt; inputParams.size(); i++) { valuesToReturn.put(inputParams.get(i).getName(), values[i]); } return execute(valuesToReturn); } }"><pre class="notranslate"><code class="notranslate">/** * Avoids having to use a Map, hence to duplicate the keys of the map, which are the parameter names already * provided while registering the parameters to the {@link StoredProcedure}. * * @param values * the values for the &lt;b&gt;input&lt;/b&gt; parameters defined on this stored procedure, in the order of * registration. It is legal for map entries to be null, and this will produce the correct behavior using * a NULL argument to the stored procedure. * @return map of output params, keyed by name as in parameter declarations. Output parameters will appear here, * with their values after the stored procedure has been called. */ public Map execute(Object[] values) { if (values == null) { return execute(Collections.EMPTY_MAP); } else { List&lt;SqlParameter&gt; params = this.getDeclaredParameters(); List&lt;SqlParameter&gt; inputParams = new ArrayList&lt;SqlParameter&gt;(); // filter the input params for (SqlParameter sqlParameter : params) { if (sqlParameter.isInputValueProvided()) { inputParams.add(sqlParameter); } } // Make sure exactly correct number of arguments are provided if (inputParams.size() != values.length) { throw new IllegalArgumentException("There are " + inputParams.size() + " input arguments, but " + values.length + " values are provided"); } // Create a map, and call existing execute method Map&lt;String, Object&gt; valuesToReturn = new HashMap&lt;String, Object&gt;(); for (int i = 0; i &lt; inputParams.size(); i++) { valuesToReturn.put(inputParams.get(i).getName(), values[i]); } return execute(valuesToReturn); } } </code></pre></div> <p dir="auto">The use-case for this is: this avoids having to duplicate the input parameter names twice:</p> <ul dir="auto"> <li>once during the registration of the input parameter with name to StoredProcedure</li> <li>second, when we construct the Map for values to pass values to StoredProcedure.execute(Map) method</li> </ul> <hr> <p dir="auto"><strong>Affects:</strong> 3.0 M1</p> <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/7c053127ddc4cbfdf0aef8778029d087cd11d808/hovercard" href="https://github.com/spring-projects/spring-framework/commit/7c053127ddc4cbfdf0aef8778029d087cd11d808"><tt>7c05312</tt></a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=grzegorzborkowski" rel="nofollow">Grzegorz Borkowski</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5327?redirect=false" rel="nofollow">SPR-5327</a></strong> and commented</p> <p dir="auto">Currently Spring Framework depends on Commons-Logging. All of us know that for long time Commons-Logging has very bad reputation and is the source of many problems, bug, memory leaks etc.<br> The SLF4j is the newer implementation of similar idea, and many people claim it works much better than Commons-Logging. It contain even some adapter for Commons-Logging users, allowing for gradual transition. Perhaps with Spring 3, along with migration to Java 5, is the best time to migrate also to SLF4J and remove dependency on Commons-Logging?<br> In fact, you can probably do it somehow automatically, writing the script that will replace in all java files the imports and logger types.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0 M4</p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/15468/SPR-5327.patch" rel="nofollow">SPR-5327.patch</a> (<em>511.88 kB</em>)</li> </ul> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398111146" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12774" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12774/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12774">#12774</a> Revisit subsystem-oriented logging</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398195939" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/19081" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/19081/hovercard" href="https://github.com/spring-projects/spring-framework/issues/19081">#19081</a> Revisit Commons Logging vs java.util.logging vs SLF4J vs Log4j 2</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/f4763a801fe0a8f57aafeb2f9fb97d0d9fad43a5/hovercard" href="https://github.com/spring-projects/spring-framework/commit/f4763a801fe0a8f57aafeb2f9fb97d0d9fad43a5"><tt>f4763a8</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/1a06b6a0ab2f7744324de0e8dbdb167c3c83e126/hovercard" href="https://github.com/spring-projects/spring-framework/commit/1a06b6a0ab2f7744324de0e8dbdb167c3c83e126"><tt>1a06b6a</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/ad3fa505f33d3533f226ad32ddb833b757343400/hovercard" href="https://github.com/spring-projects/spring-framework/commit/ad3fa505f33d3533f226ad32ddb833b757343400"><tt>ad3fa50</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/604a9f077d5081865a7189124a17a840d2a83d42/hovercard" href="https://github.com/spring-projects/spring-framework/commit/604a9f077d5081865a7189124a17a840d2a83d42"><tt>604a9f0</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/b7e37ddb072b0b0a57659761e5fceddb3a854bc0/hovercard" href="https://github.com/spring-projects/spring-framework/commit/b7e37ddb072b0b0a57659761e5fceddb3a854bc0"><tt>b7e37dd</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/1202f67cc8afbdc7d49a43ea8a86a549fbfbb37a/hovercard" href="https://github.com/spring-projects/spring-framework/commit/1202f67cc8afbdc7d49a43ea8a86a549fbfbb37a"><tt>1202f67</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/0400ccc11fa19b29c4b2a5e2b0f10b85679feed6/hovercard" href="https://github.com/spring-projects/spring-framework/commit/0400ccc11fa19b29c4b2a5e2b0f10b85679feed6"><tt>0400ccc</tt></a></p> <p dir="auto">20 votes, 13 watchers</p>
0
<p dir="auto"><strong>pytorch version:</strong> '0.1.12_2'</p> <p dir="auto">It is not so easy to describe the exact bug here, but I think it is sufficient to provide an example in which strange results can be reproduced.</p> <p dir="auto">Use the serialised version of Tensor in the attachment. Then run this snippet (also included in the attachment)</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" import torch from torch.autograd import Variable x_restored = Variable(torch.load('x.pth'), requires_grad=False) x_res_repeated = x_restored.repeat(10, 1) print(x_restored.eq(x_res_repeated[0]).data.numpy().sum()) print(x_restored.eq(x_res_repeated[0]).data.sum()) print(x_restored.eq(x_res_repeated[0]).sum()) "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">torch</span> <span class="pl-k">from</span> <span class="pl-s1">torch</span>.<span class="pl-s1">autograd</span> <span class="pl-k">import</span> <span class="pl-v">Variable</span> <span class="pl-s1">x_restored</span> <span class="pl-c1">=</span> <span class="pl-v">Variable</span>(<span class="pl-s1">torch</span>.<span class="pl-en">load</span>(<span class="pl-s">'x.pth'</span>), <span class="pl-s1">requires_grad</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-s1">x_res_repeated</span> <span class="pl-c1">=</span> <span class="pl-s1">x_restored</span>.<span class="pl-en">repeat</span>(<span class="pl-c1">10</span>, <span class="pl-c1">1</span>) <span class="pl-en">print</span>(<span class="pl-s1">x_restored</span>.<span class="pl-en">eq</span>(<span class="pl-s1">x_res_repeated</span>[<span class="pl-c1">0</span>]).<span class="pl-s1">data</span>.<span class="pl-en">numpy</span>().<span class="pl-en">sum</span>()) <span class="pl-en">print</span>(<span class="pl-s1">x_restored</span>.<span class="pl-en">eq</span>(<span class="pl-s1">x_res_repeated</span>[<span class="pl-c1">0</span>]).<span class="pl-s1">data</span>.<span class="pl-en">sum</span>()) <span class="pl-en">print</span>(<span class="pl-s1">x_restored</span>.<span class="pl-en">eq</span>(<span class="pl-s1">x_res_repeated</span>[<span class="pl-c1">0</span>]).<span class="pl-en">sum</span>())</pre></div> <p dir="auto">The output</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="3200 3200 Variable containing: 128 [torch.ByteTensor of size 1]"><pre class="notranslate"><code class="notranslate">3200 3200 Variable containing: 128 [torch.ByteTensor of size 1] </code></pre></div> <p dir="auto">I would expect the summation to return the same results regardless of whether we operate on numpy arrays, pytorch tensors or <code class="notranslate">Variable</code> holding a <code class="notranslate">Tensor</code> in the <code class="notranslate">data</code> field. (Which means it should return a Variable holding a Tensor with the right capacity to store the summed value.<br> However, this is unfortunately not the case.</p> <p dir="auto"><a href="https://github.com/pytorch/pytorch/files/1124295/bug_reproduce.zip">bug_reproduce.zip</a></p>
<p dir="auto">Test script:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import torch from torch.autograd import Variable byte_tensor = torch.ByteTensor(256) byte_tensor[:] = 1 byte_variable = Variable(byte_tensor) # The results should be the same, but actually not print('byte_tensor.sum():') print(byte_tensor.sum()) print('byte_variable.sum():') print(byte_variable.sum())"><pre class="notranslate"><code class="notranslate">import torch from torch.autograd import Variable byte_tensor = torch.ByteTensor(256) byte_tensor[:] = 1 byte_variable = Variable(byte_tensor) # The results should be the same, but actually not print('byte_tensor.sum():') print(byte_tensor.sum()) print('byte_variable.sum():') print(byte_variable.sum()) </code></pre></div> <p dir="auto">Results:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="byte_tensor.sum(): 256 byte_variable.sum(): Variable containing: 0 [torch.ByteTensor of size 1]"><pre class="notranslate"><code class="notranslate">byte_tensor.sum(): 256 byte_variable.sum(): Variable containing: 0 [torch.ByteTensor of size 1] </code></pre></div> <p dir="auto">Looks like <code class="notranslate">ByteTensor</code> <strong>does handle overflow</strong> but <code class="notranslate">Variable(ByteTensor)</code> <strong>doesn't</strong>. Such inconsistency has caused some troubles when I'm calculating my model's accuracy.</p>
1
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://github.com/celery/celery/discussions">discussions forum</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"> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &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">4.4.7 (cliffs)<br> <strong>Celery version</strong>:</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.4.7 (cliffs) kombu:4.6.11 py:3.6.12 billiard:3.6.3.0 redis:3.5.3 platform -&gt; system:Linux arch:64bit kernel version:4.4.0-1098-aws imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:redis results:disabled"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.4.7 (cliffs) kombu:4.6.11 py:3.6.12 billiard:3.6.3.0 redis:3.5.3 platform -&gt; system:Linux arch:64bit kernel version:4.4.0-1098-aws imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:redis results:disabled </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: N/A or Unknown</li> <li><strong>Minimal Celery Version</strong>: 4.0.0</li> <li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li> <li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==2.6.1 anyjson==0.3.3 apns2==0.3.0 appdirs==1.4.4 args==0.1.0 asn1crypto==1.4.0 attrs==21.4.0 backports.shutil-get-terminal-size==1.0.0 beautifulsoup4==4.6.0 billiard==3.6.3.0 boto==2.48.0 cached-property==1.5.2 cairocffi==1.1.0 CairoSVG==2.4.0 celery==4.4.7 certifi==2018.1.18 cffi==1.14.3 chardet==3.0.4 clint==0.5.1 cryptography==2.9.2 cssselect==1.0.0 cssselect2==0.2.2 cssutils==1.0.2 decorator==4.2.1 defusedxml==0.6.0 diff-match-patch==20121119 Django==1.11.11 django-admin-bootstrapped-rubgomez93==3.0.1 django-ajax-selects==1.7.0 django-bootstrap3-datetimepicker-rubgomez93==3.0.2 django-boto==0.3.12 django-constance==2.1.0 django-cookies-samesite==0.5.1 django-cors-headers==2.2.0 django-countries==5.5 django-dbconn-retry==0.1.5 django-debug-toolbar==1.9.1 django-filter==1.1.0 django-form-admin==0.5.1 django-import-export==1.0.0 django-localflavor==2.0 django-money==0.12.3 django-multiselectfield==0.1.8 django-p3p==1.2.0 django-picklefield==1.0.0 django-proxy==1.1.0 django-push-notifications-rubgomez93==1.6.4 django-redis==4.11.0 django-session-timeout-joinup==1.0.0 django-storages==1.6.5 django-su==0.6.0 django-tables2==2.3.1 django-timezone-field==2.1 djangorestframework==3.6.4 djangorestframework-gis==0.11.2 djangorestframework-jwt==1.11.0 djangorestframework-xml==1.3.0 ecdsa==0.13 eight==0.4.2 endesive==1.5.12 enum34==1.1.6 et-xmlfile==1.0.1 forex-python==1.3 funcsigs==1.0.2 future==0.16.0 geopy==1.11.0 google-api-python-client==1.6.5 gunicorn==19.7.1 h2==2.6.2 hpack==3.0.0 html5lib==1.0.1 http-ece==1.0.5 httplib2==0.18.1 hyper==0.7.0 hyperframe==3.2.0 idna==2.6 importlib-metadata==4.8.3 importlib-resources==5.4.0 ipaddress==1.0.19 ipython-genutils==0.2.0 iso3166==2.0.2 isodate==0.6.1 jdcal==1.3 jsonfield-joinup==2.1.2 kombu==4.6.11 lxml==4.1.1 mock==2.0.0 numpy==1.19.5 oauth2client==4.1.2 odfpy==1.3.6 olefile==0.45.1 openpyxl==2.4.9 oscrypto==1.2.1 paramiko==2.1.1 pathlib2==2.3.0 pbr==3.1.1 pdfrw==0.4 pexpect==4.4.0 PGPy==0.5.3 phonenumbers==8.9.0 pickleshare==0.7.4 Pillow==4.1.1 polyline==1.4.0 prompt-toolkit==2.0.10 psutil==5.6.1 psycopg2==2.7.4 psycopg2-binary==2.7.4 ptyprocess==0.5.2 py-moneyed==0.7.0 py-vapid==1.3.0 pyasn1==0.4.2 pyasn1-modules==0.2.1 pycairo==1.16.3 pycparser==2.20 Pygments==2.2.0 PyJWT==1.6.0 PyKCS11==1.5.9 pymongo==3.10.1 pynliner==0.8.0 pyOpenSSL==17.5.0 Pyphen==0.9.4 pysftp==0.2.9 PySocks==1.7.1 python-dateutil==2.6.1 pytz==2018.3 pywebpush==1.6.0 PyYAML==3.12 redis==3.5.3 requests==2.22.0 requests-toolbelt==0.9.1 rsa==3.4.2 scandir==1.7 schwifty==2020.2.2 signxml==2.5.2 simplegeneric==0.8.1 simplejson==3.16.0 six==1.15.0 smsutil==1.1.3 sqlparse==0.2.4 static3==0.7.0 stripe==2.32.1 tablib==0.12.1 timezonefinder==3.4.2 tinycss==0.4 tinycss2==1.0.0 traitlets==4.3.2 typing-extensions==4.0.1 unicodecsv==0.14.1 uritemplate==3.0.0 urllib3==1.22 vine==1.3.0 wcwidth==0.1.7 WeasyPrint==51 webencodings==0.5.1 whitenoise==3.3.1 xlrd==1.1.0 XlsxWriter==1.0.2 xlwt==1.3.0 zeep==3.4.0 zipp==3.6.0"><pre class="notranslate"><code class="notranslate">amqp==2.6.1 anyjson==0.3.3 apns2==0.3.0 appdirs==1.4.4 args==0.1.0 asn1crypto==1.4.0 attrs==21.4.0 backports.shutil-get-terminal-size==1.0.0 beautifulsoup4==4.6.0 billiard==3.6.3.0 boto==2.48.0 cached-property==1.5.2 cairocffi==1.1.0 CairoSVG==2.4.0 celery==4.4.7 certifi==2018.1.18 cffi==1.14.3 chardet==3.0.4 clint==0.5.1 cryptography==2.9.2 cssselect==1.0.0 cssselect2==0.2.2 cssutils==1.0.2 decorator==4.2.1 defusedxml==0.6.0 diff-match-patch==20121119 Django==1.11.11 django-admin-bootstrapped-rubgomez93==3.0.1 django-ajax-selects==1.7.0 django-bootstrap3-datetimepicker-rubgomez93==3.0.2 django-boto==0.3.12 django-constance==2.1.0 django-cookies-samesite==0.5.1 django-cors-headers==2.2.0 django-countries==5.5 django-dbconn-retry==0.1.5 django-debug-toolbar==1.9.1 django-filter==1.1.0 django-form-admin==0.5.1 django-import-export==1.0.0 django-localflavor==2.0 django-money==0.12.3 django-multiselectfield==0.1.8 django-p3p==1.2.0 django-picklefield==1.0.0 django-proxy==1.1.0 django-push-notifications-rubgomez93==1.6.4 django-redis==4.11.0 django-session-timeout-joinup==1.0.0 django-storages==1.6.5 django-su==0.6.0 django-tables2==2.3.1 django-timezone-field==2.1 djangorestframework==3.6.4 djangorestframework-gis==0.11.2 djangorestframework-jwt==1.11.0 djangorestframework-xml==1.3.0 ecdsa==0.13 eight==0.4.2 endesive==1.5.12 enum34==1.1.6 et-xmlfile==1.0.1 forex-python==1.3 funcsigs==1.0.2 future==0.16.0 geopy==1.11.0 google-api-python-client==1.6.5 gunicorn==19.7.1 h2==2.6.2 hpack==3.0.0 html5lib==1.0.1 http-ece==1.0.5 httplib2==0.18.1 hyper==0.7.0 hyperframe==3.2.0 idna==2.6 importlib-metadata==4.8.3 importlib-resources==5.4.0 ipaddress==1.0.19 ipython-genutils==0.2.0 iso3166==2.0.2 isodate==0.6.1 jdcal==1.3 jsonfield-joinup==2.1.2 kombu==4.6.11 lxml==4.1.1 mock==2.0.0 numpy==1.19.5 oauth2client==4.1.2 odfpy==1.3.6 olefile==0.45.1 openpyxl==2.4.9 oscrypto==1.2.1 paramiko==2.1.1 pathlib2==2.3.0 pbr==3.1.1 pdfrw==0.4 pexpect==4.4.0 PGPy==0.5.3 phonenumbers==8.9.0 pickleshare==0.7.4 Pillow==4.1.1 polyline==1.4.0 prompt-toolkit==2.0.10 psutil==5.6.1 psycopg2==2.7.4 psycopg2-binary==2.7.4 ptyprocess==0.5.2 py-moneyed==0.7.0 py-vapid==1.3.0 pyasn1==0.4.2 pyasn1-modules==0.2.1 pycairo==1.16.3 pycparser==2.20 Pygments==2.2.0 PyJWT==1.6.0 PyKCS11==1.5.9 pymongo==3.10.1 pynliner==0.8.0 pyOpenSSL==17.5.0 Pyphen==0.9.4 pysftp==0.2.9 PySocks==1.7.1 python-dateutil==2.6.1 pytz==2018.3 pywebpush==1.6.0 PyYAML==3.12 redis==3.5.3 requests==2.22.0 requests-toolbelt==0.9.1 rsa==3.4.2 scandir==1.7 schwifty==2020.2.2 signxml==2.5.2 simplegeneric==0.8.1 simplejson==3.16.0 six==1.15.0 smsutil==1.1.3 sqlparse==0.2.4 static3==0.7.0 stripe==2.32.1 tablib==0.12.1 timezonefinder==3.4.2 tinycss==0.4 tinycss2==1.0.0 traitlets==4.3.2 typing-extensions==4.0.1 unicodecsv==0.14.1 uritemplate==3.0.0 urllib3==1.22 vine==1.3.0 wcwidth==0.1.7 WeasyPrint==51 webencodings==0.5.1 whitenoise==3.3.1 xlrd==1.1.0 XlsxWriter==1.0.2 xlwt==1.3.0 zeep==3.4.0 zipp==3.6.0 </code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <p dir="auto">I have added a unit test (<a href="https://github.com/we-are-Joinup/celery/commit/6d0c1327ec895543052ff32b51e34771d5843f74">test_pending_left_10_milliseconds_tick</a>) in my fork. This test fails with current master branch, but this does not fails with my forked master branch</p> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Celery beat executes tasks periodically and sleeps until the next task is dued. So we expect celery beat periodically executes the corresponding tasks without the process sleeping more than the necessary time between task executions.</p> <p dir="auto">For our case:</p> <ul dir="auto"> <li>The task that we scheduled with the lowest value is 13 seconds.</li> <li>Celery beat should not sleep more than 13 seconds in any case.</li> </ul> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">Sometimes celery beat calculates wrong that the time to sleep is 300 seconds (default value for max interval). In our case, it pass kind of one time per day.</p> <p dir="auto">How it is possible?:</p> <ul dir="auto"> <li>If the next task to run will due in 0.01 seconds, so this tasks is not dued still, the tick function will calculate the time that celery beat process should sleep.</li> <li>To calculate it, <a href="https://github.com/celery/celery/blob/v5.2.3/celery/beat.py#L328">tick</a> function calls to the function <a href="https://github.com/celery/celery/blob/v5.2.3/celery/beat.py#L294">adjust</a>, this subtracts 0.01 to next_time_to_run variable. The result of this operation is 0.</li> <li>The return value of the tick function will be maximum between: <ul dir="auto"> <li>0 or max interval =&gt; max interval</li> <li>max interval</li> </ul> </li> <li>So, celery beat will sleep wrongly for max interval (300 seconds)</li> </ul> <p dir="auto">I have added comments to these functions with the tag [ISSUE_COMMENT] to describe this case</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def adjust(self, n, drift=-0.010): if n and n &gt; 0: # [ISSUE_COMMENT] if n is 0.01 this function returns 0.01 + (-0.010) = 0.0 return n + drift return n"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">adjust</span>(<span class="pl-s1">self</span>, <span class="pl-s1">n</span>, <span class="pl-s1">drift</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">0.010</span>): <span class="pl-k">if</span> <span class="pl-s1">n</span> <span class="pl-c1">and</span> <span class="pl-s1">n</span> <span class="pl-c1">&gt;</span> <span class="pl-c1">0</span>: <span class="pl-c"># [ISSUE_COMMENT] if n is 0.01 this function returns 0.01 + (-0.010) = 0.0</span> <span class="pl-k">return</span> <span class="pl-s1">n</span> <span class="pl-c1">+</span> <span class="pl-s1">drift</span> <span class="pl-k">return</span> <span class="pl-s1">n</span></pre></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def tick(self, event_t=event_t, min=min, heappop=heapq.heappop, heappush=heapq.heappush, heapify=heapq.heapify, mktime=time.mktime): ... event = H[0] entry = event[2] # [ISSUE_COMMENT] when exactly lefts 0.01 seconds to run the next task =&gt; is_due = False ; next_time_to_run = 0.01 is_due, next_time_to_run = self.is_due(entry) if is_due: verify = heappop(H) ... # [ISSUE_COMMENT] if next_time_to_run = 0.01, adjust(next_time_to_run) = 0 =&gt; 0 or max_interval = max_interval ; max(max_interval, max_interval) = max_interval # [ISSUE_COMMENT] max_interval by default is 300 seconds return min(adjust(next_time_to_run) or max_interval, max_interval) "><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">tick</span>(<span class="pl-s1">self</span>, <span class="pl-s1">event_t</span><span class="pl-c1">=</span><span class="pl-s1">event_t</span>, <span class="pl-s1">min</span><span class="pl-c1">=</span><span class="pl-s1">min</span>, <span class="pl-s1">heappop</span><span class="pl-c1">=</span><span class="pl-s1">heapq</span>.<span class="pl-s1">heappop</span>, <span class="pl-s1">heappush</span><span class="pl-c1">=</span><span class="pl-s1">heapq</span>.<span class="pl-s1">heappush</span>, <span class="pl-s1">heapify</span><span class="pl-c1">=</span><span class="pl-s1">heapq</span>.<span class="pl-s1">heapify</span>, <span class="pl-s1">mktime</span><span class="pl-c1">=</span><span class="pl-s1">time</span>.<span class="pl-s1">mktime</span>): ... <span class="pl-s1">event</span> <span class="pl-c1">=</span> <span class="pl-v">H</span>[<span class="pl-c1">0</span>] <span class="pl-s1">entry</span> <span class="pl-c1">=</span> <span class="pl-s1">event</span>[<span class="pl-c1">2</span>] <span class="pl-c"># [ISSUE_COMMENT] when exactly lefts 0.01 seconds to run the next task =&gt; is_due = False ; next_time_to_run = 0.01</span> <span class="pl-s1">is_due</span>, <span class="pl-s1">next_time_to_run</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">is_due</span>(<span class="pl-s1">entry</span>) <span class="pl-k">if</span> <span class="pl-s1">is_due</span>: <span class="pl-s1">verify</span> <span class="pl-c1">=</span> <span class="pl-en">heappop</span>(<span class="pl-v">H</span>) ... <span class="pl-c"># [ISSUE_COMMENT] if next_time_to_run = 0.01, adjust(next_time_to_run) = 0 =&gt; 0 or max_interval = max_interval ; max(max_interval, max_interval) = max_interval</span> <span class="pl-c"># [ISSUE_COMMENT] max_interval by default is 300 seconds</span> <span class="pl-k">return</span> <span class="pl-en">min</span>(<span class="pl-en">adjust</span>(<span class="pl-s1">next_time_to_run</span>) <span class="pl-c1">or</span> <span class="pl-s1">max_interval</span>, <span class="pl-s1">max_interval</span>) </pre></div>
<p dir="auto">I am currently running celery 4.0.2 with a single worker like this:</p> <p dir="auto">celery.py:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="app = Celery('project', broker='amqp://jimmy:jimmy123@localhost/jimmy_vhost', backend='rpc://', include=['project.tasks']) if __name__ == '__main__': app.start() app.name"><pre class="notranslate"><code class="notranslate">app = Celery('project', broker='amqp://jimmy:jimmy123@localhost/jimmy_vhost', backend='rpc://', include=['project.tasks']) if __name__ == '__main__': app.start() app.name </code></pre></div> <p dir="auto">tasks.py:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from .celery import app from celery.schedules import schedule from time import sleep, strftime app.conf.beat_schedule = { 'planner_1': { 'task': 'project.tasks.call_orders', 'schedule': 1800, }, 'planner_2': { 'task': 'project.tasks.call_inventory', 'schedule': 900, }, }"><pre class="notranslate"><code class="notranslate">from .celery import app from celery.schedules import schedule from time import sleep, strftime app.conf.beat_schedule = { 'planner_1': { 'task': 'project.tasks.call_orders', 'schedule': 1800, }, 'planner_2': { 'task': 'project.tasks.call_inventory', 'schedule': 900, }, } </code></pre></div> <p dir="auto">I used the following command to run with beat:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" celery -A project worker -l info --concurrency=3 --beat -E"><pre class="notranslate"><code class="notranslate"> celery -A project worker -l info --concurrency=3 --beat -E </code></pre></div> <p dir="auto">Right now it is only a single queue with only one worker running.</p> <blockquote> <p dir="auto">My question is how to run celery with multiple workers and single queue so that tasks are executed in parallel using multiprocessing without duplication?</p> </blockquote> <p dir="auto">I looked up on the internet, how to run celery with multiprocessing. According to this article:</p> <blockquote> <p dir="auto"><code class="notranslate">celery worker -l info -P processes -c 16</code> will result in a single message consumer delegating work to 16 OS-level pool processes. Each OS-level process can be assigned to different CPU in a multicore environment, and as such it will process tasks in parallel, but it will not consume messages in parallel.</p> </blockquote> <p dir="auto">Can using the -p processes argument solve my problem? Also but what is meant by, "it will process tasks in parallel, but it will not consume messages in parallel"?</p>
0
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2> <p dir="auto">I installed pybind11 v2.3.0 systemwide (for fastText). PyTorch build system detects it, use it but then build fails.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Install pybind11 v2.3.0 system wide (distro used, Arch linux with the <a href="https://github.com/mratsim/Arch-Data-Science/blob/2739b1aa5bd1c955d15e9f8fd67087931bf623af/frameworks/python-pytorch-magma-mkldnn-cudnn-git/PKGBUILD#L38-L112">following build script<br> </a><br> The build will fail with sleef visibility issue:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ 83%] Building CXX object caffe2/CMakeFiles/thread_init_test.dir/__/aten/src/ATen/test/thread_init_test.cpp.o [ 83%] Building CXX object caffe2/CMakeFiles/cuda_tensor_interop_test.dir/__/aten/src/ATen/test/cuda_tensor_interop_test.cpp.o [ 83%] Building CXX object caffe2/CMakeFiles/tensor_iterator_test.dir/__/aten/src/ATen/test/tensor_iterator_test.cpp.o [ 83%] Building CXX object caffe2/CMakeFiles/native_test.dir/__/aten/src/ATen/test/native_test.cpp.o [ 83%] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state.dir/python/pybind_state.cc.o [ 83%] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state_gpu.dir/python/pybind_state.cc.o In file included from /pkg/makepkg/buildpkg/python-pytorch-magma-mkldnn-cudnn-git/src/pytorch/aten/src/ATen/cpu/vec256/vec256.h:6, from /pkg/makepkg/buildpkg/python-pytorch-magma-mkldnn-cudnn-git/src/pytorch/aten/src/ATen/native/cpu/Loops.h:34, from /pkg/makepkg/buildpkg/python-pytorch-magma-mkldnn-cudnn-git/src/pytorch/aten/src/ATen/test/tensor_iterator_test.cpp:6: /pkg/makepkg/buildpkg/python-pytorch-magma-mkldnn-cudnn-git/src/pytorch/aten/src/ATen/cpu/vec256/vec256_float.h:6:10: fatal error: sleef.h: No such file or directory #include &lt;sleef.h&gt; ^~~~~~~~~ compilation terminated. make[2]: *** [caffe2/CMakeFiles/tensor_iterator_test.dir/build.make:63: caffe2/CMakeFiles/tensor_iterator_test.dir/__/aten/src/ATen/test/tensor_iterator_test.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:3877: caffe2/CMakeFiles/tensor_iterator_test.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 83%] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state.dir/python/pybind_state_dlpack.cc.o [ 83%] Linking CXX executable ../bin/fatal_signal_asan_no_sig_test [ 83%] Built target fatal_signal_asan_no_sig_test"><pre class="notranslate"><code class="notranslate">[ 83%] Building CXX object caffe2/CMakeFiles/thread_init_test.dir/__/aten/src/ATen/test/thread_init_test.cpp.o [ 83%] Building CXX object caffe2/CMakeFiles/cuda_tensor_interop_test.dir/__/aten/src/ATen/test/cuda_tensor_interop_test.cpp.o [ 83%] Building CXX object caffe2/CMakeFiles/tensor_iterator_test.dir/__/aten/src/ATen/test/tensor_iterator_test.cpp.o [ 83%] Building CXX object caffe2/CMakeFiles/native_test.dir/__/aten/src/ATen/test/native_test.cpp.o [ 83%] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state.dir/python/pybind_state.cc.o [ 83%] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state_gpu.dir/python/pybind_state.cc.o In file included from /pkg/makepkg/buildpkg/python-pytorch-magma-mkldnn-cudnn-git/src/pytorch/aten/src/ATen/cpu/vec256/vec256.h:6, from /pkg/makepkg/buildpkg/python-pytorch-magma-mkldnn-cudnn-git/src/pytorch/aten/src/ATen/native/cpu/Loops.h:34, from /pkg/makepkg/buildpkg/python-pytorch-magma-mkldnn-cudnn-git/src/pytorch/aten/src/ATen/test/tensor_iterator_test.cpp:6: /pkg/makepkg/buildpkg/python-pytorch-magma-mkldnn-cudnn-git/src/pytorch/aten/src/ATen/cpu/vec256/vec256_float.h:6:10: fatal error: sleef.h: No such file or directory #include &lt;sleef.h&gt; ^~~~~~~~~ compilation terminated. make[2]: *** [caffe2/CMakeFiles/tensor_iterator_test.dir/build.make:63: caffe2/CMakeFiles/tensor_iterator_test.dir/__/aten/src/ATen/test/tensor_iterator_test.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:3877: caffe2/CMakeFiles/tensor_iterator_test.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 83%] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state.dir/python/pybind_state_dlpack.cc.o [ 83%] Linking CXX executable ../bin/fatal_signal_asan_no_sig_test [ 83%] Built target fatal_signal_asan_no_sig_test </code></pre></div> <p dir="auto">Rebuilding the same commit (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/pytorch/pytorch/commit/4444b9114125a7a7b79d941a54b68eabbbc36583/hovercard" href="https://github.com/pytorch/pytorch/commit/4444b9114125a7a7b79d941a54b68eabbbc36583"><tt>4444b91</tt></a>) without systemwide Pybind11 works</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Successful build</p> <h2 dir="auto">Environment</h2> <ul dir="auto"> <li>PyTorch Version (e.g., 1.0): source</li> <li>OS (e.g., Linux): Arch</li> <li>How you installed PyTorch (<code class="notranslate">conda</code>, <code class="notranslate">pip</code>, source): source</li> <li>Build command you used (if compiling from source): <a href="https://github.com/mratsim/Arch-Data-Science/blob/2739b1aa5bd1c955d15e9f8fd67087931bf623af/frameworks/python-pytorch-magma-mkldnn-cudnn-git/PKGBUILD#L38-L112">https://github.com/mratsim/Arch-Data-Science/blob/2739b1aa5bd1c955d15e9f8fd67087931bf623af/frameworks/python-pytorch-magma-mkldnn-cudnn-git/PKGBUILD#L38-L112</a></li> <li>Python version:</li> <li>CUDA/cuDNN version:</li> <li>GPU models and configuration:</li> <li>Any other relevant information:</li> </ul> <h2 dir="auto">Additional context</h2>
<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> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior:</p> <p dir="auto">1.<code class="notranslate">USE_NATIVE_ARCH=ON python setup.py install</code></p> <h2 dir="auto">Expected behavior</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="caffe2/CMakeFiles/tensor_iterator_test.dir/__/aten/src/ATen/test/tensor_iterator_test.cpp.o -c ../aten/src/ATen/test/tensor_iterator_test.cpp In file included from ../aten/src/ATen/cpu/vec256/vec256.h:6:0, from ../aten/src/ATen/native/cpu/Loops.h:34, from ../aten/src/ATen/test/tensor_iterator_test.cpp:6: ../aten/src/ATen/cpu/vec256/vec256_float.h:6:19: fatal error: sleef.h: No such file or directory #include &lt;sleef.h&gt; ^ compilation terminated. [1508/2705] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state.dir/python/pybind_state.cc.o ninja: build stopped: subcommand failed. Traceback (most recent call last): File &quot;setup.py&quot;, line 756, in &lt;module&gt; build_deps() File &quot;setup.py&quot;, line 321, in build_deps cmake=cmake) File &quot;/home/xiaobinz/Downloads/pytorch-xiaobing/tools/build_pytorch_libs.py&quot;, line 63, in build_caffe2 cmake.build(my_env) File &quot;/home/xiaobinz/Downloads/pytorch-xiaobing/tools/setup_helpers/cmake.py&quot;, line 331, in build self.run(build_args, my_env) File &quot;/home/xiaobinz/Downloads/pytorch-xiaobing/tools/setup_helpers/cmake.py&quot;, line 142, in run check_call(command, cwd=self.build_dir, env=env) File &quot;/home/xiaobinz/anaconda3/envs/pytorch-test/lib/python3.6/subprocess.py&quot;, line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '112']' returned non-zero exit status 1."><pre class="notranslate"><code class="notranslate">caffe2/CMakeFiles/tensor_iterator_test.dir/__/aten/src/ATen/test/tensor_iterator_test.cpp.o -c ../aten/src/ATen/test/tensor_iterator_test.cpp In file included from ../aten/src/ATen/cpu/vec256/vec256.h:6:0, from ../aten/src/ATen/native/cpu/Loops.h:34, from ../aten/src/ATen/test/tensor_iterator_test.cpp:6: ../aten/src/ATen/cpu/vec256/vec256_float.h:6:19: fatal error: sleef.h: No such file or directory #include &lt;sleef.h&gt; ^ compilation terminated. [1508/2705] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state.dir/python/pybind_state.cc.o ninja: build stopped: subcommand failed. Traceback (most recent call last): File "setup.py", line 756, in &lt;module&gt; build_deps() File "setup.py", line 321, in build_deps cmake=cmake) File "/home/xiaobinz/Downloads/pytorch-xiaobing/tools/build_pytorch_libs.py", line 63, in build_caffe2 cmake.build(my_env) File "/home/xiaobinz/Downloads/pytorch-xiaobing/tools/setup_helpers/cmake.py", line 331, in build self.run(build_args, my_env) File "/home/xiaobinz/Downloads/pytorch-xiaobing/tools/setup_helpers/cmake.py", line 142, in run check_call(command, cwd=self.build_dir, env=env) File "/home/xiaobinz/anaconda3/envs/pytorch-test/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '112']' returned non-zero exit status 1. </code></pre></div> <h2 dir="auto">Environment</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Collecting environment information... PyTorch version: N/A Is debug build: N/A CUDA used to build PyTorch: N/A OS: CentOS Linux 7 (Core) GCC version: (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16) CMake version: version 3.14.0 Python version: 3.6 Is CUDA available: N/A CUDA runtime version: Could not collect GPU models and configuration: Could not collect Nvidia driver version: Could not collect cuDNN version: Could not collect Versions of relevant libraries: [pip] numpy==1.16.5 [conda] blas 1.0 mkl [conda] mkl 2019.4 243 [conda] mkl-include 2019.4 243 [conda] mkl-service 2.3.0 py36he904b0f_0 [conda] mkl_fft 1.0.14 py36ha843d7b_0 [conda] mkl_random 1.0.2 py36hd81dba3_0"><pre class="notranslate"><code class="notranslate"> Collecting environment information... PyTorch version: N/A Is debug build: N/A CUDA used to build PyTorch: N/A OS: CentOS Linux 7 (Core) GCC version: (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16) CMake version: version 3.14.0 Python version: 3.6 Is CUDA available: N/A CUDA runtime version: Could not collect GPU models and configuration: Could not collect Nvidia driver version: Could not collect cuDNN version: Could not collect Versions of relevant libraries: [pip] numpy==1.16.5 [conda] blas 1.0 mkl [conda] mkl 2019.4 243 [conda] mkl-include 2019.4 243 [conda] mkl-service 2.3.0 py36he904b0f_0 [conda] mkl_fft 1.0.14 py36ha843d7b_0 [conda] mkl_random 1.0.2 py36hd81dba3_0 </code></pre></div>
1
<h5 dir="auto">Issue Type:</h5> <p dir="auto">Bug Report</p> <h5 dir="auto">Ansible Version:</h5> <p dir="auto">1.7</p> <h5 dir="auto">Environment:</h5> <p dir="auto">Centos 6.5</p> <h5 dir="auto">Summary:</h5> <p dir="auto">Duplicate security group names (between different VPCs) cause issues with instance creation--</p> <p dir="auto">When I run the ec2 module to create an instance in a VPC, it doesn't restrict the Security Group search to that VPC. So if I have the same SG name in 2 different VPCs (maybe bad practice), it can find the wrong one (and fail).</p> <h5 dir="auto">Steps To Reproduce:</h5> <ol dir="auto"> <li>Create 2 VPCs with a subnet</li> <li>Create a security group in each with the same name</li> <li>Run: ansible localhost -m ec2 -a "image=ami-fb8e9292 instance_type=m3.medium keypair= group= wait=yes region=us-east-1 vpc_subnet_id=" -c local</li> <li>If that works, try the other VPC/Subnet</li> </ol> <h5 dir="auto">Expected Results:</h5> <p dir="auto">Identify the security group associated with the correct VPC/Subnet and create the instance</p> <h5 dir="auto">Actual Results:</h5> <pre class="notranslate">localhost | FAILED &gt;&gt; { "failed": true, "msg": "Instance creation failed =&gt; InvalidParameter: Security group sg-xxxxxxx and subnet subnet-xxxxxxx belong to different networks." } </pre>
<h5 dir="auto">ISSUE TYPE</h5> <p dir="auto">Bug Report</p> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto"><code class="notranslate">/lib/ansible/plugins/strategy/__init__.py</code></p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.5.0b1 config file = None configured module search path = [u'/home/ec2-user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python2.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 2.7.13 (default, Jan 31 2018, 00:17:36) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]"><pre class="notranslate"><code class="notranslate">ansible 2.5.0b1 config file = None configured module search path = [u'/home/ec2-user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python2.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 2.7.13 (default, Jan 31 2018, 00:17:36) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">no config changes</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Amazon Linux (essentially CentOS 7)</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">If a role has handlers defined in <code class="notranslate">ROLE/handlers/main.yaml</code> they are not loaded, however if the file extension is changed to <code class="notranslate">yml</code> the handlers are loaded. If both main.yml and main.yaml are present, ansible complains:<br> <code class="notranslate">ERROR! found multiple main files at /home/ec2-user/ansible/roles/unicorn/handlers, only one allowed</code><br> which suggests to me that it is processing the <code class="notranslate">main.yaml</code> still. The reason I believe it is not loading the handlers is my notify's began failing with:<br> <code class="notranslate">ERROR! The requested handler 'HANDLER NAME' was not found in either the main handlers list nor in the listening handlers list</code></p> <p dir="auto">I've been using the yaml extension for all of my other yaml files and they work just fine, this is the only case I have noticed where that file extension produced issues.</p>
0
<p dir="auto">The number one thing I miss from X Windows when using MS Windows is the X Windows selection buffer. If possible, having the selection buffer be managed separately from the clipboard buffer would be awesome.</p> <p dir="auto">This would go well with the Xmouse utility.</p>
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [run &quot;ver&quot; at a command prompt] PowerToys version: PowerToy module for which you are reporting the bug (if applicable):"><pre class="notranslate"><code class="notranslate">Windows build number: [run "ver" at a command prompt] PowerToys version: PowerToy module for which you are reporting the bug (if applicable): </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <h1 dir="auto">Expected behavior</h1> <h1 dir="auto">Actual behavior</h1> <p dir="auto">After upgrading from v0.18.0 to v0.18.1 Powertoys run bar doesn't launch.</p> <h1 dir="auto">Screenshots</h1>
0
<p dir="auto">Are there plans to support the <code class="notranslate">using</code> keyword? In large projects there are usually set of modules called "utils" and it's pretty annoying to write <code class="notranslate">import foo = utils.foo;</code> for every used entity.</p>
<p dir="auto">We have some legacy .js files which we ported to .ts. These files are AMD modules, so we generate external AMD modules with tsc.<br> We have 2 files with the same name (app.js), one at the compilation root directory and another in a subdirectory. The inner file has the one at the root level as a dependency:</p> <p dir="auto"><code class="notranslate">define(["app"], function(app){...});</code></p> <p dir="auto">As in RequireJS paths which don't start with . are treated a relative to the compilation root, it includes the root app.js correctly.<br> When porting this files to the equivalent Typescript:</p> <p dir="auto"><code class="notranslate">import app = require("app");</code></p> <p dir="auto">The compiler started crashing with a Out of stack space error.<br> If we use a relative path: require("../app"), or we rename either file, the error goes away.<br> I think there are two issues here. On the one hand, I don't know if require expression above is wrong (suspect as it may seem). I expected tsc to follow the AMD resolution mechanism and map app to the app.ts in the compilation root but it seems to resolve to the current module, which would explain the out of stack error.<br> On the other hand, even if it were an invalid expression it should issue an error message not a compiler crash. So this one at least I believe to be a bug.</p>
0
<pre class="notranslate">It has been common to use the idiom of limiting a workgroup size by blocking on send to a buffered chan, where the cap of the chan is set to the desired workgroup size. This approach has also been used in the standard library. However there has been discussion in both golang-nuts and golang-dev with comments that suggest that this behaviour is not formally guaranteed to work (although it does in the current runtime implementations). I would be good to have either a guarantee that the idiom is guaranteed to continue to work or that there is no guarantee. For further details, see the thread here: <a href="https://groups.google.com/d/topic/golang-nuts/wSRqJLvVTzo" rel="nofollow">https://groups.google.com/d/topic/golang-nuts/wSRqJLvVTzo</a></pre>
<p dir="auto">by <strong>schwehr</strong>:</p> <pre class="notranslate">While not required by any means, it would be really nice if go followed the more typical source distribution convention. This would help speed go along towards more greater adoption. e.g. - go-1.1.3.tar.{gz,bz2,xz} that unpacks as go-1.1.3 - go-1.1.3/INSTALL file rather than having to dig down into go/doc/install-source.html or at least just point from that top level INSTALL to the html file</pre>
0
<p dir="auto">Hello,</p> <p dir="auto">I open the twbs variable.less file in visual studio and i have some syntax errors :-(</p> <p dir="auto">Please change variables.less //** to //-- or remove the star.</p> <p dir="auto">In CSS and Less this is /* Comment */</p> <p dir="auto">thanks</p>
<p dir="auto">I'm not sure why the comments in the <code class="notranslate">variables.less</code> got changed to this style <code class="notranslate">//**</code>, but it my opinion it was a brave move.</p> <p dir="auto">For me at least it prevents compilation when using the nodejs compiler <code class="notranslate">lessc</code>.</p> <p dir="auto">At also breaks the syntax highlighting in my IDE, Visual Studio 2013</p>
1
<p dir="auto">Is there anything like this for Deno yet, that gives us a graphical window?</p>
<p dir="auto">Hello everyone, we already have fetch available, but it would be better if it also supports XMLHttpRequest, which will increase the usability to be compatible with many AJAX technology JavaScript projects, thank you.</p>
0