text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<h1 dir="auto">Description of the new feature/enhancement</h1> <h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">I use cmd.exe's right-click on the menu bar to Select All, Mark, Find, Copy, and Paste. I would like Windows Terminal to support a similar feature.<br> Conhost.exe<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3976990/67612708-d85fcc00-f772-11e9-8830-a50e1e8007c7.png"><img src="https://user-images.githubusercontent.com/3976990/67612708-d85fcc00-f772-11e9-8830-a50e1e8007c7.png" alt="image" style="max-width: 100%;"></a><br> I also get the right mouse button on WSL's Ubuntu console.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3976990/67612732-42787100-f773-11e9-9e20-f31e3cb278b9.png"><img src="https://user-images.githubusercontent.com/3976990/67612732-42787100-f773-11e9-9e20-f31e3cb278b9.png" alt="image" style="max-width: 100%;"></a></p>
0
<p dir="auto"><strong>Glide Version</strong>:<br> Glide version:3.7.0</p> <p dir="auto"><strong>Integration libraries</strong>:<br> okhttp:2.7.0</p> <p dir="auto"><strong>Device/Android Version</strong>:<br> All Devices</p> <p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:<br> When Image is loaded for the first time it shows compressed with less height.<br> Once it gets cached it shows perfect.</p> <p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(context).load(gallery.getPath()).placeholder(R.drawable.logo) .override(512, 512) .transform(new CenterCrop(context)) .diskCacheStrategy(DiskCacheStrategy.SOURCE) .into(holder.img);."><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">context</span>).<span class="pl-en">load</span>(<span class="pl-s1">gallery</span>.<span class="pl-en">getPath</span>()).<span class="pl-en">placeholder</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">logo</span>) .<span class="pl-en">override</span>(<span class="pl-c1">512</span>, <span class="pl-c1">512</span>) .<span class="pl-en">transform</span>(<span class="pl-k">new</span> <span class="pl-smi">CenterCrop</span>(<span class="pl-s1">context</span>)) .<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">SOURCE</span>) .<span class="pl-en">into</span>(<span class="pl-s1">holder</span>.<span class="pl-s1">img</span>);.</pre></div> <p dir="auto"><strong>Layout XML</strong>:</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot; xmlns:tools=&quot;http://schemas.android.com/tools&quot; android:layout_width=&quot;@dimen/column_width&quot; android:layout_height=&quot;@dimen/column_width&quot; android:orientation=&quot;vertical&quot;&gt; &lt;android.support.v7.widget.CardView android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;match_parent&quot; app:cardCornerRadius=&quot;4dp&quot; app:contentPadding=&quot;4dp&quot;&gt; &lt;ImageView android:id=&quot;@+id/img&quot; android:layout_width=&quot;122dp&quot; android:layout_height=&quot;122dp&quot; tools:src=&quot;@drawable/logo&quot; /&gt; &lt;/android.support.v7.widget.CardView&gt; &lt;/LinearLayout&gt;"><pre class="notranslate">&lt;<span class="pl-ent">LinearLayout</span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">android</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res/android<span class="pl-pds">"</span></span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">app</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res-auto<span class="pl-pds">"</span></span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">tools</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/tools<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/column_width<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>@dimen/column_width<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">orientation</span>=<span class="pl-s"><span class="pl-pds">"</span>vertical<span class="pl-pds">"</span></span>&gt; &lt;<span class="pl-ent">android</span>.support.v7.widget.CardView <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span> <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">cardCornerRadius</span>=<span class="pl-s"><span class="pl-pds">"</span>4dp<span class="pl-pds">"</span></span> <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">contentPadding</span>=<span class="pl-s"><span class="pl-pds">"</span>4dp<span class="pl-pds">"</span></span>&gt; &lt;<span class="pl-ent">ImageView</span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/img<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>122dp<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>122dp<span class="pl-pds">"</span></span> <span class="pl-e">tools</span><span class="pl-e">:</span><span class="pl-e">src</span>=<span class="pl-s"><span class="pl-pds">"</span>@drawable/logo<span class="pl-pds">"</span></span> /&gt; &lt;/<span class="pl-ent">android</span>.support.v7.widget.CardView&gt; &lt;/<span class="pl-ent">LinearLayout</span>&gt;</pre></div> <p dir="auto"><strong>Stack trace / LogCat</strong>:</p> <div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="paste stack trace and/or log here"><pre class="notranslate"><span class="pl-en">paste</span> <span class="pl-en">stack</span> <span class="pl-en">trace</span> <span class="pl-k">and</span>/<span class="pl-en">or</span> <span class="pl-en">log</span> <span class="pl-en">here</span></pre></div>
<p dir="auto"><strong>Glide Version/Integration library (if any)</strong>: 3.5.2<br> <strong>Device/Android Version</strong>: S4/4.4<br> <strong>Issue details/Repro steps</strong>: Load a different sized thumbnail and image, or placeholder and image and note the result:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2906988/6538023/e027582a-c45c-11e4-8758-abb9d7a67c69.gif"><img src="https://cloud.githubusercontent.com/assets/2906988/6538023/e027582a-c45c-11e4-8758-abb9d7a67c69.gif" alt="demo" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Glide load line</strong>:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Delay extends UnitTransformation { private final int sleepTime; public Delay(int sleepTime) { this.sleepTime = sleepTime; } @Override public Resource transform(Resource resource, int outWidth, int outHeight) { try { Thread.sleep(sleepTime); } catch (InterruptedException ex) {} return super.transform(resource, outWidth, outHeight); } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final ImageView image = new ImageView(this); setContentView(image); // Saved as R.drawable.placeholder String placeholder = &quot;http://placehold.it/300x500/eedddd.png&amp;text=PLACEHOLDER&quot;; // Square image String thumb = &quot;http://placehold.it/300x300/eeeedd.png&amp;text=THUMB&quot;; // Wide image final String full = &quot;http://placehold.it/300x100/eedddd.png&amp;text=FULL&quot;; // Prepared request with unimportant clutter final DrawableRequestBuilder&lt;String&gt; req = Glide .with(this) .fromString() .diskCacheStrategy(DiskCacheStrategy.SOURCE) // disable network delay for demo .skipMemoryCache(true) // make sure transform runs for demo .crossFade(2000) // default, just stretch time for noticability ; req.clone() .thumbnail(req.clone() .transform(new Delay(500)) // wait a little .load(thumb) ) .transform(new Delay(1000)) // wait before going from thumbnail to image //.dontAnimate() // solves the problem .load(full) .into(image); image.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { req.clone() .load(full) .placeholder(R.drawable.placeholder) .transform(new Delay(1000)) //.animate(R.anim.abc_fade_in) // also solves the problem .into(image); } });"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Delay</span> <span class="pl-k">extends</span> <span class="pl-smi">UnitTransformation</span> { <span class="pl-k">private</span> <span class="pl-k">final</span> <span class="pl-smi">int</span> <span class="pl-s1">sleepTime</span>; <span class="pl-k">public</span> <span class="pl-smi">Delay</span>(<span class="pl-smi">int</span> <span class="pl-s1">sleepTime</span>) { <span class="pl-smi">this</span>.<span class="pl-s1">sleepTime</span> = <span class="pl-s1">sleepTime</span>; } <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">Resource</span> <span class="pl-en">transform</span>(<span class="pl-smi">Resource</span> <span class="pl-s1">resource</span>, <span class="pl-smi">int</span> <span class="pl-s1">outWidth</span>, <span class="pl-smi">int</span> <span class="pl-s1">outHeight</span>) { <span class="pl-k">try</span> { <span class="pl-smi">Thread</span>.<span class="pl-en">sleep</span>(<span class="pl-s1">sleepTime</span>); } <span class="pl-k">catch</span> (<span class="pl-smi">InterruptedException</span> <span class="pl-s1">ex</span>) {} <span class="pl-k">return</span> <span class="pl-en">super</span>.<span class="pl-en">transform</span>(<span class="pl-s1">resource</span>, <span class="pl-s1">outWidth</span>, <span class="pl-s1">outHeight</span>); } } <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">protected</span> <span class="pl-smi">void</span> <span class="pl-s1">onCreate</span>(<span class="pl-smi">Bundle</span> <span class="pl-s1">savedInstanceState</span>) { <span class="pl-en">super</span>.<span class="pl-en">onCreate</span>(<span class="pl-s1">savedInstanceState</span>); <span class="pl-k">final</span> <span class="pl-smi">ImageView</span> <span class="pl-s1">image</span> = <span class="pl-k">new</span> <span class="pl-smi">ImageView</span>(<span class="pl-smi">this</span>); <span class="pl-en">setContentView</span>(<span class="pl-s1">image</span>); <span class="pl-c">// Saved as R.drawable.placeholder</span> <span class="pl-smi">String</span> <span class="pl-s1">placeholder</span> = <span class="pl-s">"http://placehold.it/300x500/eedddd.png&amp;text=PLACEHOLDER"</span>; <span class="pl-c">// Square image</span> <span class="pl-smi">String</span> <span class="pl-s1">thumb</span> = <span class="pl-s">"http://placehold.it/300x300/eeeedd.png&amp;text=THUMB"</span>; <span class="pl-c">// Wide image</span> <span class="pl-k">final</span> <span class="pl-smi">String</span> <span class="pl-s1">full</span> = <span class="pl-s">"http://placehold.it/300x100/eedddd.png&amp;text=FULL"</span>; <span class="pl-c">// Prepared request with unimportant clutter</span> <span class="pl-k">final</span> <span class="pl-smi">DrawableRequestBuilder</span>&lt;<span class="pl-smi">String</span>&gt; <span class="pl-s1">req</span> = <span class="pl-smi">Glide</span> .<span class="pl-en">with</span>(<span class="pl-smi">this</span>) .<span class="pl-en">fromString</span>() .<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">SOURCE</span>) <span class="pl-c">// disable network delay for demo</span> .<span class="pl-en">skipMemoryCache</span>(<span class="pl-c1">true</span>) <span class="pl-c">// make sure transform runs for demo</span> .<span class="pl-en">crossFade</span>(<span class="pl-c1">2000</span>) <span class="pl-c">// default, just stretch time for noticability</span> ; <span class="pl-s1">req</span>.<span class="pl-en">clone</span>() .<span class="pl-en">thumbnail</span>(<span class="pl-s1">req</span>.<span class="pl-en">clone</span>() .<span class="pl-en">transform</span>(<span class="pl-k">new</span> <span class="pl-smi">Delay</span>(<span class="pl-c1">500</span>)) <span class="pl-c">// wait a little</span> .<span class="pl-en">load</span>(<span class="pl-s1">thumb</span>) ) .<span class="pl-en">transform</span>(<span class="pl-k">new</span> <span class="pl-smi">Delay</span>(<span class="pl-c1">1000</span>)) <span class="pl-c">// wait before going from thumbnail to image</span> <span class="pl-c">//.dontAnimate() // solves the problem</span> .<span class="pl-en">load</span>(<span class="pl-s1">full</span>) .<span class="pl-en">into</span>(<span class="pl-s1">image</span>); <span class="pl-s1">image</span>.<span class="pl-en">setOnClickListener</span>(<span class="pl-k">new</span> <span class="pl-smi">OnClickListener</span>() { <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onClick</span>(<span class="pl-smi">View</span> <span class="pl-s1">v</span>) { <span class="pl-s1">req</span>.<span class="pl-en">clone</span>() .<span class="pl-en">load</span>(<span class="pl-s1">full</span>) .<span class="pl-en">placeholder</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">placeholder</span>) .<span class="pl-en">transform</span>(<span class="pl-k">new</span> <span class="pl-smi">Delay</span>(<span class="pl-c1">1000</span>)) <span class="pl-c">//.animate(R.anim.abc_fade_in) // also solves the problem</span> .<span class="pl-en">into</span>(<span class="pl-s1">image</span>); } });</pre></div> <p dir="auto">By removing all the delaying parts, the end result is better, but the now the thumbnail is messed up:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2906988/6538022/e0252d02-c45c-11e4-82a6-6f13f3a215af.gif"><img src="https://cloud.githubusercontent.com/assets/2906988/6538022/e0252d02-c45c-11e4-82a6-6f13f3a215af.gif" alt="demo3" data-animated-image="" style="max-width: 100%;"></a></p>
1
<p dir="auto">Currently, VSCode doesn't show any kind of graphical feedback of where function breakpoints have bound to.</p> <p dir="auto">Visual Studio and other IDEs show some graphical feedback to show the function breakpoint has bound to some specific locations / the debugger is in break mode at a particular line because of a function breakpoint.<br> It would be great for VSCode to support this in the case when debug adapters report the line(s) where the function breakpoint has been bound.</p> <p dir="auto">This helps users determine that</p> <ul dir="auto"> <li>there is a breakpoint that will be hit at some locations</li> <li>a breakpoint has been hit when stopped at a function breakpoint.</li> </ul> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/weinand/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/weinand">@weinand</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/isidorn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/isidorn">@isidorn</a></p>
<p dir="auto">Testing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="132382915" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/2832" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/2832/hovercard" href="https://github.com/microsoft/vscode/issues/2832">#2832</a></p> <p dir="auto">I have a breakpoint on <code class="notranslate">if (_key === key) {</code> and I've added a function breakpoint for <code class="notranslate">console.log</code>. The breakpoint for <code class="notranslate">if (_key === key) {</code> is hit, but the console.log near the end is not hit.</p> <p dir="auto">I tried clicking <code class="notranslate">Reapply all breakpoints</code> which did not help in this case.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function Safe(_key) { var _locked = true; var _value = null; this.unlock = function(key) { if (_key === key) { _locked = false; } return; }; this.lock = function() { _locked = true; }; Object.defineProperty(this, 'value', { get: function() { if (_locked) { console.log('thief detected!'); process.exit(0); } return _value; }, set: function(value) { if (_locked) { console.log('thief detected!'); process.exit(0); } _value = value; } }); } var safe = new Safe('mySecretPassword'); safe.unlock('mySecretPassword'); safe.value = 3; console.log(safe.value); safe.lock(); "><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-v">Safe</span><span class="pl-kos">(</span><span class="pl-s1">_key</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">_locked</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">_value</span> <span class="pl-c1">=</span> <span class="pl-c1">null</span><span class="pl-kos">;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">unlock</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">key</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">_key</span> <span class="pl-c1">===</span> <span class="pl-s1">key</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">_locked</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</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">lock</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">_locked</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s">'value'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-en">get</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">_locked</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'thief detected!'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">exit</span><span class="pl-kos">(</span><span class="pl-c1">0</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">_value</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">set</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">value</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">_locked</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'thief detected!'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-en">exit</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-s1">_value</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">var</span> <span class="pl-s1">safe</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Safe</span><span class="pl-kos">(</span><span class="pl-s">'mySecretPassword'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">safe</span><span class="pl-kos">.</span><span class="pl-en">unlock</span><span class="pl-kos">(</span><span class="pl-s">'mySecretPassword'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">safe</span><span class="pl-kos">.</span><span class="pl-c1">value</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">safe</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">safe</span><span class="pl-kos">.</span><span class="pl-en">lock</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </pre></div>
1
<p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/10671/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/10671/</a></p> <p dir="auto">Failed: [k8s.io] Kubectl client [k8s.io] Update Demo should create and stop a replication controller [Conformance] {Kubernetes e2e suite}</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:209 Expected error: &lt;*errors.errorString | 0xc8200527d0&gt;: { s: &quot;Error running &amp;{/workspace/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://104.154.29.236 --kubeconfig=/workspace/.kube/config get pods update-demo-nautilus-ogkrk -o template --template={{if (exists . \&quot;status\&quot; \&quot;containerStatuses\&quot;)}}{{range .status.containerStatuses}}{{if (and (eq .name \&quot;update-demo\&quot;) (exists . \&quot;state\&quot; \&quot;running\&quot;))}}true{{end}}{{end}}{{end}} --namespace=e2e-tests-kubectl-o84gz] [] &lt;nil&gt; failed to find client for version v1: error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.\n [] &lt;nil&gt; 0xc8209c1320 exit status 1 &lt;nil&gt; true [0xc820a6c238 0xc820a6c250 0xc820a6c268] [0xc820a6c238 0xc820a6c250 0xc820a6c268] [0xc820a6c248 0xc820a6c260] [0xa9d530 0xa9d530] 0xc820ce8900}:\nCommand stdout:\n\nstderr:\nfailed to find client for version v1: error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.\n\nerror:\nexit status 1\n&quot;, } Error running &amp;{/workspace/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://104.154.29.236 --kubeconfig=/workspace/.kube/config get pods update-demo-nautilus-ogkrk -o template --template={{if (exists . &quot;status&quot; &quot;containerStatuses&quot;)}}{{range .status.containerStatuses}}{{if (and (eq .name &quot;update-demo&quot;) (exists . &quot;state&quot; &quot;running&quot;))}}true{{end}}{{end}}{{end}} --namespace=e2e-tests-kubectl-o84gz] [] &lt;nil&gt; failed to find client for version v1: error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. [] &lt;nil&gt; 0xc8209c1320 exit status 1 &lt;nil&gt; true [0xc820a6c238 0xc820a6c250 0xc820a6c268] [0xc820a6c238 0xc820a6c250 0xc820a6c268] [0xc820a6c248 0xc820a6c260] [0xa9d530 0xa9d530] 0xc820ce8900}: Command stdout: stderr: failed to find client for version v1: error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. error: exit status 1 not to have occurred"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:209 Expected error: &lt;*errors.errorString | 0xc8200527d0&gt;: { s: "Error running &amp;{/workspace/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://104.154.29.236 --kubeconfig=/workspace/.kube/config get pods update-demo-nautilus-ogkrk -o template --template={{if (exists . \"status\" \"containerStatuses\")}}{{range .status.containerStatuses}}{{if (and (eq .name \"update-demo\") (exists . \"state\" \"running\"))}}true{{end}}{{end}}{{end}} --namespace=e2e-tests-kubectl-o84gz] [] &lt;nil&gt; failed to find client for version v1: error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.\n [] &lt;nil&gt; 0xc8209c1320 exit status 1 &lt;nil&gt; true [0xc820a6c238 0xc820a6c250 0xc820a6c268] [0xc820a6c238 0xc820a6c250 0xc820a6c268] [0xc820a6c248 0xc820a6c260] [0xa9d530 0xa9d530] 0xc820ce8900}:\nCommand stdout:\n\nstderr:\nfailed to find client for version v1: error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.\n\nerror:\nexit status 1\n", } Error running &amp;{/workspace/kubernetes/platforms/linux/amd64/kubectl [kubectl --server=https://104.154.29.236 --kubeconfig=/workspace/.kube/config get pods update-demo-nautilus-ogkrk -o template --template={{if (exists . "status" "containerStatuses")}}{{range .status.containerStatuses}}{{if (and (eq .name "update-demo") (exists . "state" "running"))}}true{{end}}{{end}}{{end}} --namespace=e2e-tests-kubectl-o84gz] [] &lt;nil&gt; failed to find client for version v1: error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. [] &lt;nil&gt; 0xc8209c1320 exit status 1 &lt;nil&gt; true [0xc820a6c238 0xc820a6c250 0xc820a6c268] [0xc820a6c238 0xc820a6c250 0xc820a6c268] [0xc820a6c248 0xc820a6c260] [0xa9d530 0xa9d530] 0xc820ce8900}: Command stdout: stderr: failed to find client for version v1: error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. error: exit status 1 not to have occurred </code></pre></div>
<p dir="auto"><code class="notranslate">error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.</code> appears in a lot of flakes. Speculation is that the metadata server is slow to respond.</p> <p dir="auto">So far, these are the issues where this message has popped up:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="164220053" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28569" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28569/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28569">#28569</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="164204998" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28565" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28565/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28565">#28565</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163991819" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28523" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28523/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28523">#28523</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163933215" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28507" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28507/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28507">#28507</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163811600" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28493" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28493/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28493">#28493</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163579268" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28439" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28439/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28439">#28439</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163578278" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28437" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28437/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28437">#28437</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163545161" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28429" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28429/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28429">#28429</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163541783" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28426" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28426/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28426">#28426</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163533035" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28420" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28420/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28420">#28420</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163207971" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28293" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28293/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28293">#28293</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="162029512" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27976" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/27976/hovercard" href="https://github.com/kubernetes/kubernetes/issues/27976">#27976</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="161598746" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27839" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/27839/hovercard" href="https://github.com/kubernetes/kubernetes/issues/27839">#27839</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="161178789" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27715" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/27715/hovercard" href="https://github.com/kubernetes/kubernetes/issues/27715">#27715</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="159529335" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27156" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/27156/hovercard" href="https://github.com/kubernetes/kubernetes/issues/27156">#27156</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="158173781" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/26715" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/26715/hovercard" href="https://github.com/kubernetes/kubernetes/issues/26715">#26715</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="157357173" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/26490" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/26490/hovercard" href="https://github.com/kubernetes/kubernetes/issues/26490">#26490</a></p> <p dir="auto">Sample failed run: <a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/10664" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/10664</a></p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cjcullen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cjcullen">@cjcullen</a> since this is dealing with auth, I'm initially assigning to you. Feel free to reassign to someone more appropriate.</p>
1
<p dir="auto">e.g.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{randn(10000)}"><pre class="notranslate"><code class="notranslate">{randn(10000)} </code></pre></div>
<p dir="auto">Executing the following:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="M = {rand(1000,1000) for i=1:10}"><pre class="notranslate"><code class="notranslate">M = {rand(1000,1000) for i=1:10} </code></pre></div> <p dir="auto">Slams out 10 pages of text into my terminal, which kind of defeats the purpose of our nice array elision. I realize there may not be an easy solution to this, but wanted to check with you all to see.</p>
1
<h2 dir="auto">Problem</h2> <p dir="auto">Current module resolution logic is roughly based on Node module loading logic however not all aspects of Node specific module loading were implemented. Also this approach does not really play well with scenarios like RequireJS\ES6 style module loading where resolution of relative files names is performed deterministically using the <a href="http://requirejs.org/docs/api.html#config-baseUrl" rel="nofollow">base url</a> without needing the folder walk. Also current process does not allow user to specify extra locations for module resolution.</p> <h2 dir="auto">Proposal</h2> <p dir="auto">Instead of using one hybrid way to resolve modules, have two implementations, one for out-of-browser workflows (i.e Node) and one for in-browser versions (ES6). These implementations should closely mimic its runtime counterparts to avoid runtime failures when design time module resolution succeeded and vice versa.</p> <h2 dir="auto">Node Resolution Algorithm</h2> <p dir="auto">Resolution logic should use the following algorithm (originally taken from <a href="https://nodejs.org/api/modules.html#modules_all_together" rel="nofollow">Modules all toghether</a>):</p> <p dir="auto"><em>require(X) from module at path Y</em></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" If exists ambient external module named X { return the ambient external module } else if X begins with './' or '../' or it is rooted path { try LOAD_AS_FILE(Y + X, loadOnlyDts=false) try LOAD_AS_DIRECTORY(Y + X, loadOnlyDts=false) } else { LOAD_NODE_MODULES(X, dirname(Y)) } THROW &quot;not found&quot; function LOAD_AS_FILE(X, loadOnlyDts) { if loadOnlyDts then load X.d.ts else { if X.ts is a file, load X.ts else if X.tsx is a file, load X.tsx else If X.d.ts is a file, load X.d.ts } } function LOAD_AS_DIRECTORY(X, loadOnlyDts) { If X/package.json is a file { Parse X/package.json, and look for &quot;typings&quot; field. if parsed json has field &quot;typings&quot;: let M = X + (json &quot;typings&quot; field) LOAD_AS_FILE(M, loadOnlyDts). } LOAD_AS_FILE(X/index, loadOnlyDts) } function LOAD_NODE_MODULES(X, START) { let DIRS=NODE_MODULES_PATHS(START) for each DIR in DIRS { LOAD_AS_FILE(DIR/X, loadOnlyDts=true) LOAD_AS_DIRECTORY(DIR/X, loadOnlyDts=true) } } function NODE_MODULES_PATHS(START) { let PARTS = path split(START) let I = count of PARTS - 1 let DIRS = [] while I &gt;= 0 { if PARTS[I] = &quot;node_modules&quot; CONTINUE DIR = path join(PARTS[0 .. I] + &quot;node_modules&quot;) DIRS = DIRS + DIR let I = I - 1 } return DIRS }"><pre class="notranslate"><span class="pl-v">If</span> <span class="pl-s1">exists</span> <span class="pl-s1">ambient</span> <span class="pl-s1">external</span> <span class="pl-smi">module</span> <span class="pl-s1">named</span> <span class="pl-v">X</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">the</span> <span class="pl-s1">ambient</span> <span class="pl-s1">external</span> <span class="pl-smi">module</span> <span class="pl-kos">}</span> <span class="pl-s1">else</span> <span class="pl-s1">if</span> <span class="pl-v">X</span> <span class="pl-s1">begins</span> <span class="pl-s1">with</span> <span class="pl-s">'./'</span> <span class="pl-s1">or</span> <span class="pl-s">'../'</span> <span class="pl-s1">or</span> <span class="pl-s1">it</span> <span class="pl-s1">is</span> <span class="pl-s1">rooted</span> <span class="pl-s1">path</span> <span class="pl-kos">{</span> <span class="pl-k">try</span> <span class="pl-c1">LOAD_AS_FILE</span><span class="pl-kos">(</span><span class="pl-v">Y</span> <span class="pl-c1">+</span> <span class="pl-v">X</span><span class="pl-kos">,</span> <span class="pl-s1">loadOnlyDts</span><span class="pl-c1">=</span><span class="pl-c1">false</span><span class="pl-kos">)</span> <span class="pl-k">try</span> <span class="pl-c1">LOAD_AS_DIRECTORY</span><span class="pl-kos">(</span><span class="pl-v">Y</span> <span class="pl-c1">+</span> <span class="pl-v">X</span><span class="pl-kos">,</span> <span class="pl-s1">loadOnlyDts</span><span class="pl-c1">=</span><span class="pl-c1">false</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-s1">else</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-c1">LOAD_NODE_MODULES</span><span class="pl-kos">(</span><span class="pl-v">X</span><span class="pl-kos">,</span> <span class="pl-en">dirname</span><span class="pl-kos">(</span><span class="pl-v">Y</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-c1">THROW</span><span class="pl-kos"></span> <span class="pl-s">"not found"</span> <span class="pl-k">function</span> <span class="pl-c1">LOAD_AS_FILE</span><span class="pl-kos">(</span><span class="pl-v">X</span><span class="pl-kos">,</span> <span class="pl-s1">loadOnlyDts</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-s1">loadOnlyDts</span> <span class="pl-s1">then</span> <span class="pl-s1">load</span> <span class="pl-v">X</span><span class="pl-kos">.</span><span class="pl-c1">d</span><span class="pl-kos">.</span><span class="pl-c1">ts</span> <span class="pl-s1">else</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-v">X</span><span class="pl-kos">.</span><span class="pl-c1">ts</span> <span class="pl-s1">is</span> <span class="pl-s1">a</span> <span class="pl-s1">file</span><span class="pl-kos">,</span> <span class="pl-s1">load</span> <span class="pl-v">X</span><span class="pl-kos">.</span><span class="pl-c1">ts</span> <span class="pl-s1">else</span> <span class="pl-s1">if</span> <span class="pl-v">X</span><span class="pl-kos">.</span><span class="pl-c1">tsx</span> <span class="pl-s1">is</span> <span class="pl-s1">a</span> <span class="pl-s1">file</span><span class="pl-kos">,</span> <span class="pl-s1">load</span> <span class="pl-v">X</span><span class="pl-kos">.</span><span class="pl-c1">tsx</span> <span class="pl-s1">else</span> <span class="pl-v">If</span> <span class="pl-v">X</span><span class="pl-kos">.</span><span class="pl-c1">d</span><span class="pl-kos">.</span><span class="pl-c1">ts</span> <span class="pl-s1">is</span> <span class="pl-s1">a</span> <span class="pl-s1">file</span><span class="pl-kos">,</span> <span class="pl-s1">load</span> <span class="pl-v">X</span><span class="pl-kos">.</span><span class="pl-c1">d</span><span class="pl-kos">.</span><span class="pl-c1">ts</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-c1">LOAD_AS_DIRECTORY</span><span class="pl-kos">(</span><span class="pl-v">X</span><span class="pl-kos">,</span> <span class="pl-s1">loadOnlyDts</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-v">If</span> <span class="pl-v">X</span><span class="pl-c1">/</span><span class="pl-s1">package</span><span class="pl-kos">.</span><span class="pl-c1">json</span> <span class="pl-s1">is</span> <span class="pl-s1">a</span> <span class="pl-s1">file</span> <span class="pl-kos">{</span> <span class="pl-v">Parse</span> <span class="pl-v">X</span><span class="pl-c1">/</span><span class="pl-s1">package</span><span class="pl-kos">.</span>json<span class="pl-kos">,</span> <span class="pl-s1">and</span> <span class="pl-s1">look</span> <span class="pl-k">for</span> <span class="pl-s">"typings"</span> <span class="pl-s1">field</span><span class="pl-kos">.</span> <span class="pl-k">if</span> <span class="pl-s1">parsed</span> <span class="pl-s1">json</span> <span class="pl-s1">has</span> <span class="pl-s1">field</span> <span class="pl-s">"typings"</span>: <span class="pl-s1">let</span> <span class="pl-v">M</span> <span class="pl-c1">=</span> <span class="pl-v">X</span> <span class="pl-c1">+</span> <span class="pl-kos">(</span><span class="pl-s1">json</span> <span class="pl-s">"typings"</span> <span class="pl-s1">field</span><span class="pl-kos">)</span> <span class="pl-c1">LOAD_AS_FILE</span><span class="pl-kos">(</span><span class="pl-v">M</span><span class="pl-kos">,</span> <span class="pl-s1">loadOnlyDts</span><span class="pl-kos">)</span><span class="pl-kos">.</span> <span class="pl-kos">}</span> <span class="pl-en">LOAD_AS_FILE</span><span class="pl-kos">(</span><span class="pl-v">X</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">,</span> <span class="pl-s1">loadOnlyDts</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-c1">LOAD_NODE_MODULES</span><span class="pl-kos">(</span><span class="pl-v">X</span><span class="pl-kos">,</span> <span class="pl-c1">START</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> <span class="pl-c1">DIRS</span><span class="pl-c1">=</span><span class="pl-c1">NODE_MODULES_PATHS</span><span class="pl-kos">(</span><span class="pl-c1">START</span><span class="pl-kos">)</span> <span class="pl-k">for</span> <span class="pl-s1">each</span> <span class="pl-c1">DIR</span> <span class="pl-k">in</span> <span class="pl-c1">DIRS</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-c1">LOAD_AS_FILE</span><span class="pl-kos">(</span><span class="pl-c1">DIR</span><span class="pl-c1">/</span><span class="pl-v">X</span><span class="pl-kos">,</span> <span class="pl-s1">loadOnlyDts</span><span class="pl-c1">=</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-c1">LOAD_AS_DIRECTORY</span><span class="pl-kos">(</span><span class="pl-c1">DIR</span><span class="pl-c1">/</span><span class="pl-v">X</span><span class="pl-kos">,</span> <span class="pl-s1">loadOnlyDts</span><span class="pl-c1">=</span><span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-c1">NODE_MODULES_PATHS</span><span class="pl-kos">(</span><span class="pl-c1">START</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> <span class="pl-c1">PARTS</span> <span class="pl-c1">=</span> <span class="pl-s1">path</span> <span class="pl-en">split</span><span class="pl-kos">(</span><span class="pl-c1">START</span><span class="pl-kos">)</span> <span class="pl-k">let</span> <span class="pl-v">I</span> <span class="pl-c1">=</span> <span class="pl-s1">count</span> <span class="pl-s1">of</span> <span class="pl-c1">PARTS</span> <span class="pl-c1">-</span> <span class="pl-c1">1</span> <span class="pl-k">let</span> <span class="pl-c1">DIRS</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span> <span class="pl-k">while</span> <span class="pl-v">I</span> <span class="pl-c1">&gt;=</span> <span class="pl-c1">0</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-c1">PARTS</span><span class="pl-kos">[</span><span class="pl-v">I</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s">"node_modules"</span><span class="pl-kos"></span> <span class="pl-c1">CONTINUE</span> <span class="pl-c1">DIR</span> <span class="pl-c1">=</span> <span class="pl-s1">path</span> <span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-c1">PARTS</span><span class="pl-kos">[</span><span class="pl-c1">0</span> <span class="pl-kos">.</span><span class="pl-kos">.</span> <span class="pl-c1">I</span><span class="pl-kos">]</span> <span class="pl-c1">+</span> <span class="pl-s">"node_modules"</span><span class="pl-kos">)</span> <span class="pl-c1">DIRS</span> <span class="pl-c1">=</span> <span class="pl-c1">DIRS</span> <span class="pl-c1">+</span> <span class="pl-c1">DIR</span> <span class="pl-k">let</span> <span class="pl-v">I</span> <span class="pl-c1">=</span> <span class="pl-v">I</span> <span class="pl-c1">-</span> <span class="pl-c1">1</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-c1">DIRS</span> <span class="pl-kos">}</span></pre></div> <h2 dir="auto">RequireJS/ES6 module loader</h2> <ul dir="auto"> <li>If module name starts with './' - then name is relative to the file that imports module or calls <code class="notranslate">require</code>.</li> <li>If module name is a relative path (i.e. 'a/b/c') - it is resolved using the base folder.</li> </ul> <p dir="auto">Base folder can be either specified explicitly via command line option or can be inferred:</p> <ul dir="auto"> <li>if compiler can uses 'tsconfig.json' to determine files and compilation options then location of 'tsconfig.json' is the base folder</li> <li>otherwise base folder is common subpath for all explicitly provided files</li> </ul> <p dir="auto">Path mappings can be used to customize module resolution process. In 'package.json' these mappings can be represented as JSON object with a following structure:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" { &quot;*.ts&quot;:&quot;project/ts/*.ts&quot;, &quot;annotations&quot;: &quot;/common/core/annotations&quot; }"><pre class="notranslate"> { <span class="pl-ent">"*.ts"</span>:<span class="pl-s"><span class="pl-pds">"</span>project/ts/*.ts<span class="pl-pds">"</span></span>, <span class="pl-ent">"annotations"</span>: <span class="pl-s"><span class="pl-pds">"</span>/common/core/annotations<span class="pl-pds">"</span></span> }</pre></div> <p dir="auto">Property name represents a pattern that might contain zero or one asterisk (which acts as a capture group). Property value represents a substitution that might contain zero or one asterisk - here it marks the location where captured content will be spliced. For example mapping above for a path 'assert.ts' will produce a string 'project/ts/assert.ts'. Effectively this logic is the same with the implementation of <code class="notranslate">locate</code> function in <a href="https://github.com/ModuleLoader/es6-module-loader/blob/master/src/system.js#L221">System.js</a>.</p> <p dir="auto">With path mappings in mind module resolution can be described as:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (var path in [relative_path, relative_path + '.ts', relative_path + &quot;d.ts&quot;]) { var mappedPath = apply_path_mapping(path); var candidatePath = isPathRooted(mappedPath) ? mappedPath : combine(baseFolder, mappedPath); if (fileExists(candidatePath)) { return candidatePath } } return undefined"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">path</span> <span class="pl-k">in</span> <span class="pl-kos">[</span><span class="pl-s1">relative_path</span><span class="pl-kos">,</span> <span class="pl-s1">relative_path</span> <span class="pl-c1">+</span> <span class="pl-s">'.ts'</span><span class="pl-kos">,</span> <span class="pl-s1">relative_path</span> <span class="pl-c1">+</span> <span class="pl-s">"d.ts"</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">mappedPath</span> <span class="pl-c1">=</span> <span class="pl-en">apply_path_mapping</span><span class="pl-kos">(</span><span class="pl-s1">path</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">candidatePath</span> <span class="pl-c1">=</span> <span class="pl-en">isPathRooted</span><span class="pl-kos">(</span><span class="pl-s1">mappedPath</span><span class="pl-kos">)</span> ? <span class="pl-s1">mappedPath</span> : <span class="pl-en">combine</span><span class="pl-kos">(</span><span class="pl-s1">baseFolder</span><span class="pl-kos">,</span> <span class="pl-s1">mappedPath</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">fileExists</span><span class="pl-kos">(</span><span class="pl-s1">candidatePath</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">candidatePath</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-c1">undefined</span></pre></div> <p dir="auto">With path mappings it becomes trivial to resolve some module names to files located on network share or some location on the disk outside the project folder.</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;*.ts&quot;: &quot;project/scripts/*.ts&quot;, &quot;shared/*&quot;: &quot;q:/shared/*.ts&quot; }"><pre class="notranslate">{ <span class="pl-ent">"*.ts"</span>: <span class="pl-s"><span class="pl-pds">"</span>project/scripts/*.ts<span class="pl-pds">"</span></span>, <span class="pl-ent">"shared/*"</span>: <span class="pl-s"><span class="pl-pds">"</span>q:/shared/*.ts<span class="pl-pds">"</span></span> }</pre></div> <p dir="auto">Using this mapping relative path 'shared/core' will be mapped to absolute path 'q:/shared/core.ts'.</p> <p dir="auto">We can apply the same resolution rules for both modules and tripleslash references though for the latter onces its is not strictly necessary since they do not implact runtime in any way.</p>
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">1.8.7 / nightly (1.9.0-dev.20160217)</p> <p dir="auto"><strong>Code</strong></p> <p dir="auto">Consider the following three files:</p> <p dir="auto">a.ts</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export class A { }"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">foo.ts</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {A} from './a'; declare module './a' { interface A { foo(): number; } } A.prototype.foo = () =&gt; 42;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-smi">A</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./a'</span><span class="pl-kos">;</span> <span class="pl-k">declare</span> module <span class="pl-s">'./a'</span> <span class="pl-kos">{</span> <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-kos">)</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-smi">A</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-en">foo</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">42</span><span class="pl-kos">;</span></pre></div> <p dir="auto">main.ts</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {A} from './a'; // import './foo'; var a = new A(); console.log(a.foo()); // Shouldn't the second import be necessary in order for this code to compile?"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-smi">A</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./a'</span><span class="pl-kos">;</span> <span class="pl-c">// import './foo';</span> <span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-k">new</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-en">foo</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">// Shouldn't the second import be necessary in order for this code to compile?</span></pre></div> <p dir="auto"><strong>Expected behavior:</strong><br> The <code class="notranslate">foo</code> member should not be suggested in autocomplete, and main.ts should not compile. That should only happen if <code class="notranslate">foo</code> is imported (i.e. the second import is uncommented).</p> <p dir="auto"><strong>Actual behavior:</strong><br> The code compiles, but will fail at runtime with:</p> <blockquote> <p dir="auto">TypeError: a.foo is not a function</p> </blockquote> <p dir="auto"><strong>Additional info:</strong><br> I think this was working correctly as of early Feb, so this might be a regression introduced by something else.</p>
0
<h1 dir="auto">Checklist</h1> <ul dir="auto"> <li>[ X] I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li>[ X] This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li>[ X] I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li>[ X] I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li>[ X] I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li>[ X] I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li>[ X] I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul dir="auto"> <li>[ X] I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li>[ X] I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li>[ X] I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li>[ X] I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &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>:</p> <details> <summary><b><code class="notranslate"> software -&gt; celery:5.0.2 (singularity) kombu:5.0.2 py:3.7.4 billiard:3.6.3.0 py-amqp:5.0.2 platform -&gt; system:Linux arch:64bit, ELF kernel version:5.9.16_1 imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:amqp results:rpc:/// </code></b><p dir="auto"><b><code class="notranslate">broker_url: 'amqp://guest:********@localhost:5672//'<br> result_backend: 'rpc:///'<br> deprecated_settings: None<br> </code> Output:</b></p></summary><p dir="auto"></p> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></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>: 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"> asn1crypto==0.24.0 brotlipy==0.7.0 certifi==2020.6.20 cffi==1.14.0 chardet==3.0.4 conda==4.8.3 conda-package-handling==1.7.0 configparser==3.7.4 cryptography==2.9.2 idna @ file:///tmp/build/80754af9/idna_1593446292537/work OWSLib==0.19.2 pycosat==0.6.3 pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1594392929924/work pyproj==2.5.0 PySocks @ file:///tmp/build/80754af9/pysocks_1594394576006/work python-dateutil==2.8.1 pytz==2019.3 PyYAML==5.3 requests @ file:///tmp/build/80754af9/requests_1592841827918/work ruamel-yaml==0.15.87 six==1.15.0 tqdm @ file:///tmp/build/80754af9/tqdm_1593446365756/work urllib3==1.25.9 </code></b><p dir="auto"><b><code class="notranslate"></code> Output:</b></p></summary><p dir="auto"></p> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> # packages in environment at /opt/miniconda3/envs/[redacted]: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge aggdraw 1.3.12 py37hdf465ad_1 conda-forge amqp 5.0.2 pyhd8ed1ab_0 conda-forge appdirs 1.4.4 pyh9f0ad1d_0 conda-forge argon2-cffi 20.1.0 py37h4abf009_2 conda-forge asgiref 3.3.1 pyhd8ed1ab_0 conda-forge astroid 2.4.2 py37hc8dfbb8_1 conda-forge async_generator 1.10 py_0 conda-forge attrs 20.3.0 pyhd3deb0d_0 conda-forge autopep8 1.5.4 pyh9f0ad1d_0 conda-forge azure-core 1.9.0 pypi_0 pypi azure-storage-blob 12.6.0 pypi_0 pypi backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.1 py_0 conda-forge billiard 3.6.3.0 py37h8f50634_2 conda-forge black 20.8b1 py_1 conda-forge bleach 3.2.1 pyh9f0ad1d_0 conda-forge boost-cpp 1.72.0 h8e57a91_0 conda-forge brotlipy 0.7.0 py37hb5d75c8_1001 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.17.1 h36c2ea0_0 conda-forge ca-certificates 2020.12.5 ha878542_0 conda-forge cairocffi 1.2.0 pypi_0 pypi cairosvg 2.5.0 pypi_0 pypi celery 5.0.2 pyhd8ed1ab_0 conda-forge certifi 2020.12.5 py37h89c1867_1 conda-forge cffi 1.14.4 py37h11fe52a_0 conda-forge chardet 4.0.0 py37h89c1867_0 conda-forge click 7.1.2 pyh9f0ad1d_0 conda-forge click-didyoumean 0.0.3 pyh8c360ce_0 conda-forge click-repl 0.1.6 py_0 conda-forge colorzero 1.1 pypi_0 pypi cryptography 3.3.1 py37h7f0c10b_0 conda-forge cssselect2 0.4.1 pypi_0 pypi cycler 0.10.0 pypi_0 pypi dataclasses 0.7 pyhb2cacf7_7 conda-forge dbus 1.13.6 hfdff14a_1 conda-forge decorator 4.4.2 py_0 conda-forge defusedxml 0.6.0 py_0 conda-forge django 3.1.5 pyhd8ed1ab_0 conda-forge django-crispy-forms 1.10.0 pypi_0 pypi drawsvg 1.7.0 pypi_0 pypi entrypoints 0.3 pyhd8ed1ab_1003 conda-forge expat 2.2.9 he1b5a44_2 conda-forge flake8 3.8.4 py_0 conda-forge fontconfig 2.13.1 h86ecdb6_1001 conda-forge freeimageplus 3.18.0 hf484d3e_2 dlr-sc freetype 2.10.4 h7ca028e_0 conda-forge future 0.18.2 py37h89c1867_2 conda-forge gettext 0.19.8.1 hf34092f_1004 conda-forge glib 2.66.3 h58526e2_0 conda-forge gmp 6.2.1 h58526e2_0 conda-forge gmsh 4.6.0 h7d08f12_0 conda-forge gpiozero 1.5.1 pypi_0 pypi gst-plugins-base 1.14.5 h0935bb2_2 conda-forge gstreamer 1.14.5 h36ae1b5_2 conda-forge guizero 1.1.1 pypi_0 pypi h11 0.12.0 pypi_0 pypi icu 64.2 he1b5a44_1 conda-forge idna 2.10 pyh9f0ad1d_0 conda-forge ifcopenshell v0.6.0 py37h4488930_3 conda-forge imageio 2.9.0 pypi_0 pypi importlib-metadata 3.3.0 py37h89c1867_2 conda-forge importlib_metadata 3.3.0 hd8ed1ab_2 conda-forge ipykernel 5.4.2 py37h888b3d9_0 conda-forge ipython 7.19.0 py37h888b3d9_1 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 7.6.2 pyhd3deb0d_0 conda-forge isodate 0.6.0 pypi_0 pypi isort 5.7.0 pyhd8ed1ab_0 conda-forge jedi 0.17.2 py37h89c1867_1 conda-forge jinja2 2.11.2 pyh9f0ad1d_0 conda-forge jpeg 9d h36c2ea0_0 conda-forge jsonschema 3.2.0 py_2 conda-forge jupyter 1.0.0 py_2 conda-forge jupyter_client 6.1.7 py_0 conda-forge jupyter_console 6.2.0 py_0 conda-forge jupyter_core 4.7.0 py37h89c1867_0 conda-forge jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge jupyterlab_widgets 1.0.0 pyhd8ed1ab_1 conda-forge kiwisolver 1.3.1 pypi_0 pypi kombu 5.0.2 py37h89c1867_1 conda-forge krb5 1.17.2 h926e7f8_0 conda-forge lazy-object-proxy 1.4.3 py37h8f50634_2 conda-forge lcms2 2.11 hcbb858e_1 conda-forge libblas 3.9.0 6_openblas conda-forge libclang 9.0.1 default_hde54327_0 conda-forge libcurl 7.71.1 hcdd3856_8 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libffi 3.2.1 he1b5a44_1007 conda-forge libgcc-ng 9.3.0 h5dbcf3e_17 conda-forge libgfortran-ng 9.3.0 he4bcb1c_17 conda-forge libgfortran5 9.3.0 he4bcb1c_17 conda-forge libglib 2.66.3 hbe7bbb4_0 conda-forge libglu 9.0.0 he1b5a44_1001 conda-forge libgomp 9.3.0 h5dbcf3e_17 conda-forge libiconv 1.16 h516909a_0 conda-forge liblapack 3.9.0 6_openblas conda-forge libllvm9 9.0.1 hf817b99_2 conda-forge libnghttp2 1.41.0 h8cfc5f6_2 conda-forge libopenblas 0.3.12 pthreads_h4812303_1 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libsodium 1.0.18 h36c2ea0_1 conda-forge libssh2 1.9.0 hab1572f_5 conda-forge libstdcxx-ng 9.3.0 h2ae2ef3_17 conda-forge libtiff 4.2.0 hdc55705_0 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge libwebp-base 1.1.0 h36c2ea0_3 conda-forge libxcb 1.13 h14c3975_1002 conda-forge libxkbcommon 0.10.0 he1b5a44_0 conda-forge libxml2 2.9.10 hee79883_0 conda-forge libxslt 1.1.33 h31b3aaa_0 conda-forge lz4-c 1.9.3 h9c3ff4c_0 conda-forge markupsafe 1.1.1 py37hb5d75c8_2 conda-forge matplotlib 2.2.2 pypi_0 pypi mccabe 0.6.1 py_1 conda-forge mistune 0.8.4 py37h4abf009_1002 conda-forge mono 5.14.0.177 he1b5a44_1001 conda-forge msrest 0.6.19 pypi_0 pypi mu-editor 1.0.3 pypi_0 pypi mypy_extensions 0.4.3 py37h89c1867_2 conda-forge nbclient 0.5.1 py_0 conda-forge nbconvert 6.0.7 py37h89c1867_3 conda-forge nbformat 5.0.8 py_0 conda-forge ncurses 6.2 h58526e2_4 conda-forge nest-asyncio 1.4.3 pyhd8ed1ab_0 conda-forge notebook 6.1.6 py37h89c1867_0 conda-forge nspr 4.29 h9c3ff4c_1 conda-forge nss 3.59 h2c00c37_0 conda-forge nudatus 0.0.4 pypi_0 pypi numpy 1.19.4 pypi_0 pypi oauthlib 3.1.0 pypi_0 pypi occt 7.4.0 h9121d39_3 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge opencascade 7.4.0 h6bb024c_5 dlr-sc openssl 1.1.1i h7f98852_0 conda-forge owslib 0.21.0 pyhd8ed1ab_0 conda-forge packaging 20.8 pyhd3deb0d_0 conda-forge pandoc 2.11.3.2 h7f98852_0 conda-forge pandocfilters 1.4.2 py_1 conda-forge parso 0.7.1 pyh9f0ad1d_0 conda-forge pathspec 0.8.1 pyhd3deb0d_0 conda-forge pcre 8.44 he1b5a44_0 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pgzero 1.2 pypi_0 pypi pickleshare 0.7.5 py_1003 conda-forge pigpio 1.78 pypi_0 pypi pillow 8.1.0 py37he6b4880_0 conda-forge pip 20.3.3 pyhd8ed1ab_0 conda-forge pluggy 0.13.1 py37he5f6b98_3 conda-forge proj 7.2.0 h8b9fe22_0 conda-forge prometheus_client 0.9.0 pyhd3deb0d_0 conda-forge prompt-toolkit 3.0.8 pyha770c72_0 conda-forge prompt_toolkit 3.0.8 hd8ed1ab_0 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge punycodes 1.0.1 pypi_0 pypi pycodestyle 2.4.0 pypi_0 pypi pycparser 2.20 pyh9f0ad1d_2 conda-forge pydocstyle 5.1.1 py_0 conda-forge pyflakes 2.0.0 pypi_0 pypi pygame 1.9.6 pypi_0 pypi pygments 2.7.3 pyhd8ed1ab_0 conda-forge pylint 2.6.0 py37hc8dfbb8_1 conda-forge pyls 0.1.6 pypi_0 pypi pyopenssl 20.0.1 pyhd8ed1ab_0 conda-forge pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pyproj 3.0.0.post1 py37hf874b97_0 conda-forge pyqt5 5.14.1 pypi_0 pypi pyqt5-sip 12.8.1 pypi_0 pypi pyqtchart 5.14.0 pypi_0 pypi pyqtwebengine 5.12.1 pypi_0 pypi pyrsistent 0.17.3 py37h4abf009_1 conda-forge pyserial 3.4 pypi_0 pypi pyside2 5.13.2 py37hbee1fde_2 conda-forge pysocks 1.7.1 py37he5f6b98_2 conda-forge python 3.7.4 h265db76_1 python-dateutil 2.8.1 py_0 conda-forge python-jsonrpc-server 0.4.0 pyh9f0ad1d_0 conda-forge python-language-server 0.36.2 pyhd8ed1ab_0 conda-forge python_abi 3.7 1_cp37m conda-forge pythonnet 2.4.0 py37haf93ef1_1 conda-forge pythonocc-core 7.4.1 py37h2bc3f7f_0 dlr-sc pytz 2020.5 pyhd8ed1ab_0 conda-forge pyyaml 5.3.1 py37hb5d75c8_1 conda-forge pyzmq 20.0.0 py37h5a562af_1 conda-forge qscintilla 2.11.4 pypi_0 pypi qt 5.12.5 hd8c4c69_1 conda-forge qtconsole 4.3.1 pypi_0 pypi qtpy 1.9.0 py_0 conda-forge readline 7.0 hf8c457e_1001 conda-forge regex 2020.11.13 py37h5e8e339_0 conda-forge reportlab 3.5.59 py37h69800bb_0 conda-forge requests 2.25.1 pyhd3deb0d_0 conda-forge requests-oauthlib 1.3.0 pypi_0 pypi rope 0.18.0 pyh9f0ad1d_0 conda-forge semver 2.13.0 pypi_0 pypi send2trash 1.5.0 py_0 conda-forge setuptools 49.6.0 py37he5f6b98_2 conda-forge six 1.15.0 pyh9f0ad1d_0 conda-forge snowballstemmer 2.0.0 py_0 conda-forge sqlalchemy 1.3.22 py37h5e8e339_1 conda-forge sqlite 3.33.0 h62c20be_0 sqlparse 0.4.1 pyh9f0ad1d_0 conda-forge tbb 2020.2 h4bd325d_2 conda-forge terminado 0.9.1 py37h89c1867_1 conda-forge testpath 0.4.4 py_0 conda-forge tinycss2 1.1.0 pypi_0 pypi tk 8.6.10 h21135ba_1 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tornado 6.1 py37h4abf009_0 conda-forge traitlets 5.0.5 py_0 conda-forge typed-ast 1.4.2 py37h5e8e339_0 conda-forge typing_extensions 3.7.4.3 py_0 conda-forge ujson 4.0.1 py37h3340039_1 conda-forge urllib3 1.26.2 pyhd8ed1ab_0 conda-forge uvicorn 0.13.3 pypi_0 pypi vine 5.0.0 pyhd8ed1ab_1 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.36.2 pyhd3deb0d_0 conda-forge widgetsnbextension 3.5.1 py37h89c1867_4 conda-forge wrapt 1.11.2 py37h8f50634_1 conda-forge xorg-fixesproto 5.0 h14c3975_1002 conda-forge xorg-kbproto 1.0.7 h14c3975_1002 conda-forge xorg-libice 1.0.10 h516909a_0 conda-forge xorg-libsm 1.2.3 h84519dc_1000 conda-forge xorg-libx11 1.6.12 h516909a_0 conda-forge xorg-libxau 1.0.9 h14c3975_0 conda-forge xorg-libxdmcp 1.1.3 h516909a_0 conda-forge xorg-libxext 1.3.4 h516909a_0 conda-forge xorg-libxfixes 5.0.3 h516909a_1004 conda-forge xorg-libxmu 1.1.3 h516909a_0 conda-forge xorg-libxrender 0.9.10 h516909a_1002 conda-forge xorg-libxt 1.1.5 h516909a_1003 conda-forge xorg-renderproto 0.11.1 h14c3975_1002 conda-forge xorg-xextproto 7.3.0 h14c3975_1002 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.2.5 h516909a_1 conda-forge yaml 0.2.5 h516909a_0 conda-forge yapf 0.30.0 pyh9f0ad1d_0 conda-forge zeromq 4.3.3 h58526e2_3 conda-forge zipp 3.4.0 alias xclip="xclip -selection c" py_0 conda-forge zlib 1.2.11 h516909a_1010 conda-forge zstd 1.4.8 ha95c52a_1 conda-forge </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p><p dir="auto">I am working on a program that needs to use another dept.'s dotnet core dll's and it works swimmingly when executed normally.<br> For example, considering this code:</p> <p dir="auto">tasks.py:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import os import sys sys.path.append(&quot;./dll_lib&quot;) import clr clr.AddReference(&quot;System.IO&quot;) import System.IO from celery import Celery app = Celery('Test', broker='amqp://guest:guest@localhost:5672//', backend=&quot;rpc://&quot;) @app.task def test(json_file): json_content = System.IO.File.ReadAllText(json_file) return 1 "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">os</span> <span class="pl-k">import</span> <span class="pl-s1">sys</span> <span class="pl-s1">sys</span>.<span class="pl-s1">path</span>.<span class="pl-en">append</span>(<span class="pl-s">"./dll_lib"</span>) <span class="pl-k">import</span> <span class="pl-s1">clr</span> <span class="pl-s1">clr</span>.<span class="pl-v">AddReference</span>(<span class="pl-s">"System.IO"</span>) <span class="pl-k">import</span> <span class="pl-v">System</span>.<span class="pl-v">IO</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-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'Test'</span>, <span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">'amqp://guest:guest@localhost:5672//'</span>, <span class="pl-s1">backend</span><span class="pl-c1">=</span><span class="pl-s">"rpc://"</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">test</span>(<span class="pl-s1">json_file</span>): <span class="pl-s1">json_content</span> <span class="pl-c1">=</span> <span class="pl-v">System</span>.<span class="pl-v">IO</span>.<span class="pl-v">File</span>.<span class="pl-v">ReadAllText</span>(<span class="pl-s1">json_file</span>) <span class="pl-k">return</span> <span class="pl-c1">1</span></pre></div> <p dir="auto">start.sh:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#!/bin/bash CELERY_ALWAYS_EAGER=True CELERYD_MAX_TASKS_PER_CHILD=1 CELERYD_CONCURRENCY=1 CELERYD_PREFETCH_MULTIPLIER=1 CELERY_RESULT_BACKEND=&quot;rpc://&quot; CELERY_RESULT_PERSISTENT=False celery -A tasks worker --loglevel=INFO --max-tasks-per-child=1"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#!</span>/bin/bash</span> CELERY_ALWAYS_EAGER=True CELERYD_MAX_TASKS_PER_CHILD=1 CELERYD_CONCURRENCY=1 CELERYD_PREFETCH_MULTIPLIER=1 CELERY_RESULT_BACKEND=<span class="pl-s"><span class="pl-pds">"</span>rpc://<span class="pl-pds">"</span></span> CELERY_RESULT_PERSISTENT=False celery -A tasks worker --loglevel=INFO --max-tasks-per-child=1</pre></div> <p dir="auto">When I test this task it runs fine as a standalone function.<br> But this problem is nebulous, because I can issue a task with the path to a small json (&lt;1mb) and it succeeds:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ ipython -i Python 3.7.4 (default, Aug 13 2019, 20:35:49) Type 'copyright', 'credits' or 'license' for more information IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import tasks In [2]: res = tasks.test.delay(&quot;/path/small.json&quot;) In [3]: res.ready() Out[3]: True"><pre class="notranslate">$ ipython -i Python 3.7.4 (default, Aug 13 2019, 20:35:49) Type <span class="pl-s"><span class="pl-pds">'</span>copyright<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>credits<span class="pl-pds">'</span></span> or <span class="pl-s"><span class="pl-pds">'</span>license<span class="pl-pds">'</span></span> <span class="pl-k">for</span> more information IPython 7.19.0 -- An enhanced Interactive Python. Type <span class="pl-s"><span class="pl-pds">'</span>?<span class="pl-pds">'</span></span> <span class="pl-k">for</span> help. In [1]: import tasks In [2]: res = tasks.test.delay(<span class="pl-s"><span class="pl-pds">"</span>/path/small.json<span class="pl-pds">"</span></span>) In [3]: <span class="pl-en">res.ready</span>() Out[3]: True</pre></div> <p dir="auto">But when I do this with the path to a bigger json (~7mb), it stalls indefinitely:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [4]: res_big = tasks.test.delay(&quot;/path/bigger.json&quot;) In [5]: res_big.ready() Out[5]: False"><pre class="notranslate">In [4]: res_big = tasks.test.delay(<span class="pl-s"><span class="pl-pds">"</span>/path/bigger.json<span class="pl-pds">"</span></span>) In [5]: <span class="pl-en">res_big.ready</span>() Out[5]: False</pre></div> <p dir="auto">Does anybody have an idea what can be related to this issue ? It looks connected to memory used.</p> <p dir="auto">NOTE:<br> This problem is not IO related, as I have tested it by reading a json as a string in the python way and using Newtonsoft.Json.dll to deserialize it. This test behaves along the similiarly with the same files, works with the small json, stalls on the bigger one.</p> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">I expect a task to succeed independent of the size of the supplied json.</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">Sizeable (&lt;1 mB) json's succeed, but bigger (~ 7 mB) json stall; the task is received, but never succeeds.</p>
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" 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"> 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"> 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"><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="celery==4.4.0 django-redis==4.10.0 redis==3.3.11"><pre class="notranslate"><code class="notranslate">celery==4.4.0 django-redis==4.10.0 redis==3.3.11 </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.6</li> <li><strong>Minimal Celery Version</strong>: 4.4.0</li> <li><strong>Minimal Kombu Version</strong>: 4.6.7</li> <li><strong>Minimal Broker Version</strong>: rabbitmq</li> <li><strong>Minimal Result Backend Version</strong>: redis</li> <li><strong>Minimal OS and/or Kernel Version</strong>: ubuntu 18.04</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==4.4.0 kombu==4.6.7 redis==3.3.11"><pre class="notranslate"><code class="notranslate">celery==4.4.0 kombu==4.6.7 redis==3.3.11 </code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p> </details> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">I have the following code that run as expected on a single worker / code base :</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@task() def fail(*args, **kwargs): raise NotImplementedError @task() def set_error(*args, **kwargs): print('im in') fail.s().on_error(set_error.s()).delay('foo', foo='bar').get()"><pre class="notranslate"><span class="pl-en">@<span class="pl-en">task</span>()</span> <span class="pl-k">def</span> <span class="pl-en">fail</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>): <span class="pl-k">raise</span> <span class="pl-v">NotImplementedError</span> <span class="pl-en">@<span class="pl-en">task</span>()</span> <span class="pl-k">def</span> <span class="pl-en">set_error</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>): <span class="pl-en">print</span>(<span class="pl-s">'im in'</span>) <span class="pl-s1">fail</span>.<span class="pl-en">s</span>().<span class="pl-en">on_error</span>(<span class="pl-s1">set_error</span>.<span class="pl-en">s</span>()).<span class="pl-en">delay</span>(<span class="pl-s">'foo'</span>, <span class="pl-s1">foo</span><span class="pl-c1">=</span><span class="pl-s">'bar'</span>).<span class="pl-en">get</span>()</pre></div> <p dir="auto">As expected, behavior is:</p> <ol dir="auto"> <li><code class="notranslate">fail</code> task is called and raise a error</li> <li><code class="notranslate">set_error</code> is called</li> <li>client gets a <code class="notranslate">NotImplementedError</code> exception</li> </ol> <p dir="auto">Now let say <code class="notranslate">fail</code> is on another worker. code becomes:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="signature('proj.fail', queue='some-queue').on_error(set_error.s()).delay('foo', foo='bar').get()"><pre class="notranslate"><span class="pl-en">signature</span>(<span class="pl-s">'proj.fail'</span>, <span class="pl-s1">queue</span><span class="pl-c1">=</span><span class="pl-s">'some-queue'</span>).<span class="pl-en">on_error</span>(<span class="pl-s1">set_error</span>.<span class="pl-en">s</span>()).<span class="pl-en">delay</span>(<span class="pl-s">'foo'</span>, <span class="pl-s1">foo</span><span class="pl-c1">=</span><span class="pl-s">'bar'</span>).<span class="pl-en">get</span>()</pre></div> <p dir="auto">Behavior:</p> <ol dir="auto"> <li><code class="notranslate">fail</code> task is called and raise an error. kombu tries to serialize the error leading to another exception (see Traceback below)</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/billiard/pool.py&quot;, line 1791, in safe_apply_callback fun(*args, **kwargs) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/worker/request.py&quot;, line 528, in on_failure store_result=self.store_errors, File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/backends/base.py&quot;, line 165, in mark_as_failure self._call_task_errbacks(request, exc, traceback) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/backends/base.py&quot;, line 188, in _call_task_errbacks errback(request, exc, traceback) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/canvas.py&quot;, line 613, in __call__ return self.apply_async(args, kwargs) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/canvas.py&quot;, line 642, in apply_async dict(self.options, **options) if options else self.options)) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/canvas.py&quot;, line 669, in run first_task.apply_async(**options) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/canvas.py&quot;, line 235, in apply_async return _apply(args, kwargs, **options) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/app/base.py&quot;, line 771, in send_task amqp.send_task_message(P, name, message, **options) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/app/amqp.py&quot;, line 559, in send_task_message **properties File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/messaging.py&quot;, line 169, in publish compression, headers) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/messaging.py&quot;, line 252, in _prepare body) = dumps(body, serializer=serializer) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/serialization.py&quot;, line 221, in dumps payload = encoder(data) File &quot;/.pyenv/versions/3.6.6/lib/python3.6/contextlib.py&quot;, line 99, in __exit__ self.gen.throw(type, value, traceback) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/serialization.py&quot;, line 54, in _reraise_errors reraise(wrapper, wrapper(exc), sys.exc_info()[2]) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/vine/five.py&quot;, line 194, in reraise raise value.with_traceback(tb) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/serialization.py&quot;, line 50, in _reraise_errors yield File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/serialization.py&quot;, line 221, in dumps payload = encoder(data) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/utils/json.py&quot;, line 70, in dumps **dict(default_kwargs, **kwargs)) File &quot;/.pyenv/versions/3.6.6/lib/python3.6/json/__init__.py&quot;, line 238, in dumps **kw).encode(obj) File &quot;/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py&quot;, line 199, in encode chunks = self.iterencode(o, _one_shot=True) File &quot;/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py&quot;, line 257, in iterencode return _iterencode(o, 0) File &quot;/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/utils/json.py&quot;, line 59, in default return super(JSONEncoder, self).default(o) File &quot;/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py&quot;, line 180, in default o.__class__.__name__) kombu.exceptions.EncodeError: Object of type 'Context' is not JSON serializable"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/billiard/pool.py", line 1791, in safe_apply_callback fun(*args, **kwargs) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/worker/request.py", line 528, in on_failure store_result=self.store_errors, File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/backends/base.py", line 165, in mark_as_failure self._call_task_errbacks(request, exc, traceback) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/backends/base.py", line 188, in _call_task_errbacks errback(request, exc, traceback) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/canvas.py", line 613, in __call__ return self.apply_async(args, kwargs) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/canvas.py", line 642, in apply_async dict(self.options, **options) if options else self.options)) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/canvas.py", line 669, in run first_task.apply_async(**options) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/canvas.py", line 235, in apply_async return _apply(args, kwargs, **options) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/app/base.py", line 771, in send_task amqp.send_task_message(P, name, message, **options) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/celery/app/amqp.py", line 559, in send_task_message **properties File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/messaging.py", line 169, in publish compression, headers) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/messaging.py", line 252, in _prepare body) = dumps(body, serializer=serializer) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/serialization.py", line 221, in dumps payload = encoder(data) File "/.pyenv/versions/3.6.6/lib/python3.6/contextlib.py", line 99, in __exit__ self.gen.throw(type, value, traceback) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/serialization.py", line 54, in _reraise_errors reraise(wrapper, wrapper(exc), sys.exc_info()[2]) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/vine/five.py", line 194, in reraise raise value.with_traceback(tb) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/serialization.py", line 50, in _reraise_errors yield File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/serialization.py", line 221, in dumps payload = encoder(data) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/utils/json.py", line 70, in dumps **dict(default_kwargs, **kwargs)) File "/.pyenv/versions/3.6.6/lib/python3.6/json/__init__.py", line 238, in dumps **kw).encode(obj) File "/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/.pyenv/versions/3.6.6/envs/my-env/lib/python3.6/site-packages/kombu/utils/json.py", line 59, in default return super(JSONEncoder, self).default(o) File "/.pyenv/versions/3.6.6/lib/python3.6/json/encoder.py", line 180, in default o.__class__.__name__) kombu.exceptions.EncodeError: Object of type 'Context' is not JSON serializable </code></pre></div> <ol start="2" dir="auto"> <li><code class="notranslate">set_error</code> is never called</li> <li>client wait forever</li> </ol> <h1 dir="auto">Expected Behavior</h1> <p dir="auto"><code class="notranslate">Context</code> object should be serialized and error propagated.</p> <h1 dir="auto">Workaround</h1> <p dir="auto">using <code class="notranslate">pickle</code> as default serializer fix the issue</p> <p dir="auto">Best regards<br> Nicolas</p>
0
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report =&gt; search github for a similar issue or PR before submitting [x] 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">[ ] bug report =&gt; search github for a similar issue or PR before submitting [x] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong><br> This is more a stylistic thing, but</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this.renderer.setElementAttribute(this.el.nativeElement, 'data-some-param', undefined);"><pre class="notranslate"><code class="notranslate">this.renderer.setElementAttribute(this.el.nativeElement, 'data-some-param', undefined); </code></pre></div> <p dir="auto">is a legal usage as it deletes data-some-param attribute from element, but this code shows typescript error when using strictNullChecks because setElementAttribute is described as:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue: string): void;"><pre class="notranslate"><code class="notranslate">abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue: string): void; </code></pre></div> <p dir="auto">attributeValue is just <code class="notranslate">string</code> and not <code class="notranslate">string | undefined</code></p> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">attributeValue to have type <code class="notranslate">string | undefined</code><br> <strong>Minimal reproduction of the problem with instructions</strong></p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.2.4</li> </ul> <p dir="auto"><a href="https://github.com/angular/angular/blob/master/modules/%40angular/core/src/render/api.ts">https://github.com/angular/angular/blob/master/modules/%40angular/core/src/render/api.ts</a><br> still the same in latest Angular</p> <ul dir="auto"> <li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li> </ul> <ul dir="auto"> <li> <p dir="auto"><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]</p> </li> <li> <p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =</p> </li> </ul>
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[X] bug report =&gt; search github for a similar issue or PR before submitting"><pre class="notranslate"><code class="notranslate">[X] bug report =&gt; search github for a similar issue or PR before submitting </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">When trying to compile an ng2 application with typescript 2.0 strictNullChecks turned on the compiler runs into errors.</p> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">Expect that ng2 would support use with strictNullChecks.</p> <p dir="auto"><strong>Reproduction of the problem</strong></p> <p dir="auto">Reproduced by taking the quick start application and setting the strictNullChecks option true in tsconfig.json. (see: <a href="https://github.com/abierbaum/quickstart">https://github.com/abierbaum/quickstart</a>)</p> <p dir="auto">When doing this and running <code class="notranslate">npm run tsc</code> the following error is shown:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; [email protected] tsc /home/allenb/Source/quickstart &gt; tsc node_modules/@angular/core/src/util/decorators.d.ts(11,5): error TS2411: Property 'extends' of type 'Type&lt;any&gt; | undefined' is not assignable to string index type 'Function | any[] | Type&lt;any&gt;'. node_modules/@angular/platform-browser/src/dom/dom_renderer.d.ts(25,22): error TS2420: Class 'DomRenderer' incorrectly implements interface 'Renderer'. Types of property 'animate' are incompatible. Type '(element: any, startingStyles: AnimationStyles | undefined, keyframes: (AnimationKeyframe | undef...' is not assignable to type '(element: any, startingStyles: AnimationStyles, keyframes: AnimationKeyframe[], duration: number,...'. Type 'AnimationPlayer | undefined' is not assignable to type 'AnimationPlayer'. Type 'undefined' is not assignable to type 'AnimationPlayer'."><pre class="notranslate"><code class="notranslate">&gt; [email protected] tsc /home/allenb/Source/quickstart &gt; tsc node_modules/@angular/core/src/util/decorators.d.ts(11,5): error TS2411: Property 'extends' of type 'Type&lt;any&gt; | undefined' is not assignable to string index type 'Function | any[] | Type&lt;any&gt;'. node_modules/@angular/platform-browser/src/dom/dom_renderer.d.ts(25,22): error TS2420: Class 'DomRenderer' incorrectly implements interface 'Renderer'. Types of property 'animate' are incompatible. Type '(element: any, startingStyles: AnimationStyles | undefined, keyframes: (AnimationKeyframe | undef...' is not assignable to type '(element: any, startingStyles: AnimationStyles, keyframes: AnimationKeyframe[], duration: number,...'. Type 'AnimationPlayer | undefined' is not assignable to type 'AnimationPlayer'. Type 'undefined' is not assignable to type 'AnimationPlayer'. </code></pre></div> <p dir="auto">Other similar errors occur with larger projects.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto">strictNullChecks is a recommended best practices for new typescript code and it would be great if we could use this with ng2 applications.</p>
1
<h2 dir="auto">🚀 Feature</h2> <p dir="auto">Hi,<br> I wonder if there can be a script for fine-tuning BertAbs on new dataset?<br> Or if you have some hint to provide about this task? Not sure how to access loss from <code class="notranslate">modeling_bertabs.py</code>.</p> <p dir="auto">Thanks</p>
<p dir="auto">Hi all,<br> Is there any way to do transfer learning on the Text Summarization model (bertabs-finetuned-cnndm)? I would like to continue training it on my dataset.<br> The code run_summarization.py only does prediction. Thanks!</p>
1
<p dir="auto">If you know how to fix the issue, make a pull request instead.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I tried using the the latest "npm install --save @types/react-redux" having this issue when run the npm start</li> </ul>
<p dir="auto">If you know how to fix the issue, make a pull request instead.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/xxxx</code> package and had problems.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond. <ul dir="auto"> <li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alloy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alloy">@alloy</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/huhuanming/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/huhuanming">@huhuanming</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/iRoachie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/iRoachie">@iRoachie</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Skn0tt/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Skn0tt">@Skn0tt</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timwangdev/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timwangdev">@timwangdev</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kamal/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kamal">@kamal</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nelyousfi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nelyousfi">@nelyousfi</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexdunne/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexdunne">@alexdunne</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/swissmanu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/swissmanu">@swissmanu</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bm-software/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bm-software">@bm-software</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tkrotoff/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tkrotoff">@tkrotoff</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/a-tarasyuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/a-tarasyuk">@a-tarasyuk</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mvdam/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mvdam">@mvdam</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Esemesek/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Esemesek">@Esemesek</a></li> </ul> </li> </ul> <hr> <p dir="auto">Using valid style created by StyleSheet.create on imaghe results in following typescript error</p> <blockquote> <p dir="auto">[ts]<br> Type 'RegisteredStyle&lt;ViewStyle | TextStyle | ImageStyle&gt;' is not assignable to type 'StyleProp'.<br> Type 'RegisteredStyle&lt;ViewStyle | TextStyle | ImageStyle&gt;' is not assignable to type 'RecursiveArray&lt;false | ImageStyle | RegisteredStyle | null | undefined&gt;'.<br> Property 'length' is missing in type 'Number &amp; { __registeredStyleBrand: ViewStyle | TextStyle | ImageStyle; }'.<br> index.d.ts(3750, 5): The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes &amp; IntrinsicClassAttributes<a target="_blank" rel="noopener noreferrer" href=""><img style="max-width: 100%;"></a> &amp; Readonly&lt;{ children?: ReactNode; }&gt; &amp; Readonly'<br> (JSX attribute) style?: StyleProp<br> Style</p> </blockquote> <p dir="auto">Can be reproduced via</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as React from 'react'; import { Image, StyleSheet } from 'react-native'; /** * Component */ class GameHeaderBar extends React.Component&lt;{}&gt; { render() { return &lt;Image style={styles.barImg} source={{ uri: 'game_header_bar' }} /&gt;; } } export default GameHeaderBar; /** * Styles */ const styles = StyleSheet.create({ barImg: { position: 'relative', zIndex: 2 } });"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">Image</span><span class="pl-kos">,</span> <span class="pl-v">StyleSheet</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-native'</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * Component</span> <span class="pl-c"> */</span> <span class="pl-k">class</span> <span class="pl-v">GameHeaderBar</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span><span class="pl-c1">&lt;</span><span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Image</span> <span class="pl-c1">style</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">styles</span><span class="pl-kos">.</span><span class="pl-c1">barImg</span><span class="pl-kos">}</span> <span class="pl-c1">source</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">{</span> <span class="pl-c1">uri</span>: <span class="pl-s">'game_header_bar'</span> <span class="pl-kos">}</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-s1">export</span> <span class="pl-k">default</span> <span class="pl-v">GameHeaderBar</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * Styles</span> <span class="pl-c"> */</span> <span class="pl-k">const</span> <span class="pl-s1">styles</span> <span class="pl-c1">=</span> <span class="pl-v">StyleSheet</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-c1">barImg</span>: <span class="pl-kos">{</span> <span class="pl-c1">position</span>: <span class="pl-s">'relative'</span><span class="pl-kos">,</span> <span class="pl-c1">zIndex</span>: <span class="pl-c1">2</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">I started getting this issue after upgrading <code class="notranslate">@types/[email protected]</code> to <code class="notranslate">@types/[email protected]</code></p>
0
<ul dir="auto"> <li>Electron version: all</li> <li>Operating system: OSX</li> </ul> <p dir="auto"><a href="https://github.com/brian-mann/electron-iframe-window-open-bug">Example repo is here.</a></p> <p dir="auto">If you embed an <code class="notranslate">&lt;iframe&gt;</code> and then within that <code class="notranslate">&lt;iframe&gt;</code> you do this:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// child returns undefined var child = window.open(...)"><pre class="notranslate"><span class="pl-c">// child returns undefined</span> <span class="pl-k">var</span> <span class="pl-s1">child</span> <span class="pl-c1">=</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-en">open</span><span class="pl-kos">(</span>...<span class="pl-kos">)</span></pre></div> <p dir="auto"><code class="notranslate">child</code> will be <code class="notranslate">undefined</code>, instead of the <code class="notranslate">BrowserWindowProxy</code>.</p> <p dir="auto">Changing the code to this works by returning the proxy:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var child = window.top.open(...)"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">child</span> <span class="pl-c1">=</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">top</span><span class="pl-kos">.</span><span class="pl-en">open</span><span class="pl-kos">(</span>...<span class="pl-kos">)</span></pre></div> <p dir="auto">In my case I am embedding guest content in an <code class="notranslate">&lt;iframe&gt;</code> and cannot force the users to update their code.</p>
<ul dir="auto"> <li>Electron version: 1.3.0</li> <li>Operating system: Windows 10</li> </ul> <p dir="auto"><code class="notranslate">x.js</code></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const app = require('electron').app; const BW = require('electron').BrowserWindow; const path = require('path'); app.once('ready', () =&gt; { const win = new BW({}); win.loadURL('file://' + path.join(__dirname, 'x.html')); });"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">app</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-c1">BW</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">BrowserWindow</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">path</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'path'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">once</span><span class="pl-kos">(</span><span class="pl-s">'ready'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">win</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">BW</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">win</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s">'file://'</span> <span class="pl-c1">+</span> <span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">'x.html'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><code class="notranslate">x.html</code></p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;iframe width=&quot;100%&quot; height=&quot;200&quot; src=&quot;y.html&quot;&gt;&lt;/iframe&gt; XXXX &lt;script type=&quot;text/javascript&quot;&gt; function fn() { const w = window.open('http://electron.atom.io/'); console.log(w); w.focus(); } &lt;/script&gt; &lt;button onclick=&quot;fn()&quot;&gt;Open Window&lt;/button&gt; &lt;/body&gt; &lt;/html&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">title</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">title</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">iframe</span> <span class="pl-c1">width</span>="<span class="pl-s">100%</span>" <span class="pl-c1">height</span>="<span class="pl-s">200</span>" <span class="pl-c1">src</span>="<span class="pl-s">y.html</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">iframe</span><span class="pl-kos">&gt;</span> XXXX <span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">type</span>="<span class="pl-s">text/javascript</span>"<span class="pl-kos">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">fn</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">w</span> <span class="pl-c1">=</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-en">open</span><span class="pl-kos">(</span><span class="pl-s">'http://electron.atom.io/'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">w</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">w</span><span class="pl-kos">.</span><span class="pl-en">focus</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-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">onclick</span>="<span class="pl-s">fn()</span>"<span class="pl-kos">&gt;</span>Open Window<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">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span></pre></div> <p dir="auto"><code class="notranslate">y.html</code></p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="YYYY &lt;script type=&quot;text/javascript&quot;&gt; function fn() { const w = window.open('http://electron.atom.io/'); console.log(w); w.focus(); } &lt;/script&gt; &lt;button onclick=&quot;fn()&quot;&gt;Open Window&lt;/button&gt;"><pre class="notranslate">YYYY <span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">type</span>="<span class="pl-s">text/javascript</span>"<span class="pl-kos">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">fn</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">w</span> <span class="pl-c1">=</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-en">open</span><span class="pl-kos">(</span><span class="pl-s">'http://electron.atom.io/'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">w</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">w</span><span class="pl-kos">.</span><span class="pl-en">focus</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-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">onclick</span>="<span class="pl-s">fn()</span>"<span class="pl-kos">&gt;</span>Open Window<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span></pre></div> <p dir="auto"><code class="notranslate">w</code> is <code class="notranslate">undefined</code> when called from <code class="notranslate">y.html</code>, but not <code class="notranslate">x.html</code>. In both cases, a new BrowserWindow is created for the popup.</p>
1
<p dir="auto">If I do a striped table and i color some row with contextual classes the strippered is most important then contextual.<br> In old bootstrap it was correct and colored the row</p>
<p dir="auto">i have table with class .table-striped. it has 3 rows with tr.danger. only the middle one is red, the other two are default color.</p> <p dir="auto">when i remove .table-striped, it works correctly</p>
1
<h1 dir="auto">Filter Currently Running Applications</h1> <p dir="auto">Since the merge with Wox, the Window Walker aspect of PTRun has become much less efficient, as opening new applications and other search results often take priority over applications that are currently running. For instance, I used to use Window Walker to search through open browser tabs, but this isn't really feasible anymore as PTRun returns too many results upon search to be easy or efficient.</p> <p dir="auto">To that end, would it be possible to somehow set an option so that PTRun only displays currently running applications? Perhaps with a specific shortcut that opens PTRun to only look at open applications? Or a character in the search to set as a filter (like "&gt;" is a terminal run, maybe ":" only returns running applications)?</p> <p dir="auto">I think a lot of previous users of Window Walker would benefit.</p> <p dir="auto">Many Thanks for your consideration!</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">Currently PowerToys Run operates as a universal search. The original implementation (as Window Walker) appears to be an alt-tab system for those with many many many windows open.</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1> <p dir="auto">Can we have an option to limit searches to open windows/tabs? Or should I just install Window Walker?</p>
1
<p dir="auto">Hi! I'm using Glide in my project.</p> <p dir="auto">Like some people, I had a problem,<code class="notranslate">How can I fetch a loaded image file from cache?</code></p> <p dir="auto">I read the Glide api carefully ,and found <code class="notranslate">downloadOnly</code> ,but it can not solve my problem,<br> Only need to get the picture cache, if not loaded do not need to download.</p> <p dir="auto">And then I read the Glide api again,found the <code class="notranslate">EngineKey</code> is key。<br> finally,I replace the <code class="notranslate">EngineKey.java</code>,<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7588760/23538285/3d100f58-000d-11e7-8595-a71495799c68.png"><img src="https://cloud.githubusercontent.com/assets/7588760/23538285/3d100f58-000d-11e7-8595-a71495799c68.png" alt="image" style="max-width: 100%;"></a></p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public class EngineKey implements Key { private static final String EMPTY_LOG_STRING = &quot;&quot;; private String id; private Key signature; private String stringKey; private int hashCode; private Key originalKey; public EngineKey(String id, Key signature, int width, int height, ResourceDecoder cacheDecoder, ResourceDecoder sourceDecoder, Transformation transformation, ResourceEncoder encoder, ResourceTranscoder transcoder, Encoder sourceEncoder){ this(id,signature); } public EngineKey(String id, Key signature) { this.id = id; this.signature = signature; } public EngineKey(String id) { this(id, EmptySignature.obtain()); } public Key getOriginalKey() { if (originalKey == null) { originalKey = new OriginalKey(id, signature); } return originalKey; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } EngineKey engineKey = (EngineKey) o; if (!id.equals(engineKey.id)) { return false; } else if (!signature.equals(engineKey.signature)) { return false; } return true; } @Override public int hashCode() { if (hashCode == 0) { hashCode = id.hashCode(); hashCode = 31 * hashCode + signature.hashCode(); } return hashCode; } @Override public String toString() { if (stringKey == null) { stringKey = new StringBuilder() .append(&quot;EngineKey{&quot;) .append(id) .append('+') .append(signature) .append('}') .toString(); } return stringKey; } @Override public void updateDiskCacheKey(MessageDigest messageDigest) throws UnsupportedEncodingException { signature.updateDiskCacheKey(messageDigest); messageDigest.update(id.getBytes(STRING_CHARSET_NAME)); } }"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">EngineKey</span> <span class="pl-k">implements</span> <span class="pl-smi">Key</span> { <span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-k">final</span> <span class="pl-smi">String</span> <span class="pl-c1">EMPTY_LOG_STRING</span> = <span class="pl-s">""</span>; <span class="pl-k">private</span> <span class="pl-smi">String</span> <span class="pl-s1">id</span>; <span class="pl-k">private</span> <span class="pl-smi">Key</span> <span class="pl-s1">signature</span>; <span class="pl-k">private</span> <span class="pl-smi">String</span> <span class="pl-s1">stringKey</span>; <span class="pl-k">private</span> <span class="pl-smi">int</span> <span class="pl-s1">hashCode</span>; <span class="pl-k">private</span> <span class="pl-smi">Key</span> <span class="pl-s1">originalKey</span>; <span class="pl-k">public</span> <span class="pl-smi">EngineKey</span>(<span class="pl-smi">String</span> <span class="pl-s1">id</span>, <span class="pl-smi">Key</span> <span class="pl-s1">signature</span>, <span class="pl-smi">int</span> <span class="pl-s1">width</span>, <span class="pl-smi">int</span> <span class="pl-s1">height</span>, <span class="pl-smi">ResourceDecoder</span> <span class="pl-s1">cacheDecoder</span>, <span class="pl-smi">ResourceDecoder</span> <span class="pl-s1">sourceDecoder</span>, <span class="pl-smi">Transformation</span> <span class="pl-s1">transformation</span>, <span class="pl-smi">ResourceEncoder</span> <span class="pl-s1">encoder</span>, <span class="pl-smi">ResourceTranscoder</span> <span class="pl-s1">transcoder</span>, <span class="pl-smi">Encoder</span> <span class="pl-s1">sourceEncoder</span>){ <span class="pl-smi">this</span>(<span class="pl-s1">id</span>,<span class="pl-s1">signature</span>); } <span class="pl-k">public</span> <span class="pl-smi">EngineKey</span>(<span class="pl-smi">String</span> <span class="pl-s1">id</span>, <span class="pl-smi">Key</span> <span class="pl-s1">signature</span>) { <span class="pl-smi">this</span>.<span class="pl-s1">id</span> = <span class="pl-s1">id</span>; <span class="pl-smi">this</span>.<span class="pl-s1">signature</span> = <span class="pl-s1">signature</span>; } <span class="pl-k">public</span> <span class="pl-smi">EngineKey</span>(<span class="pl-smi">String</span> <span class="pl-s1">id</span>) { <span class="pl-smi">this</span>(<span class="pl-s1">id</span>, <span class="pl-smi">EmptySignature</span>.<span class="pl-en">obtain</span>()); } <span class="pl-k">public</span> <span class="pl-smi">Key</span> <span class="pl-en">getOriginalKey</span>() { <span class="pl-k">if</span> (<span class="pl-s1">originalKey</span> == <span class="pl-c1">null</span>) { <span class="pl-s1">originalKey</span> = <span class="pl-k">new</span> <span class="pl-smi">OriginalKey</span>(<span class="pl-s1">id</span>, <span class="pl-s1">signature</span>); } <span class="pl-k">return</span> <span class="pl-s1">originalKey</span>; } <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">boolean</span> <span class="pl-en">equals</span>(<span class="pl-smi">Object</span> <span class="pl-s1">o</span>) { <span class="pl-k">if</span> (<span class="pl-smi">this</span> == <span class="pl-s1">o</span>) { <span class="pl-k">return</span> <span class="pl-c1">true</span>; } <span class="pl-k">if</span> (<span class="pl-s1">o</span> == <span class="pl-c1">null</span> || <span class="pl-en">getClass</span>() != <span class="pl-s1">o</span>.<span class="pl-en">getClass</span>()) { <span class="pl-k">return</span> <span class="pl-c1">false</span>; } <span class="pl-smi">EngineKey</span> <span class="pl-s1">engineKey</span> = (<span class="pl-smi">EngineKey</span>) <span class="pl-s1">o</span>; <span class="pl-k">if</span> (!<span class="pl-s1">id</span>.<span class="pl-en">equals</span>(<span class="pl-s1">engineKey</span>.<span class="pl-s1">id</span>)) { <span class="pl-k">return</span> <span class="pl-c1">false</span>; } <span class="pl-k">else</span> <span class="pl-k">if</span> (!<span class="pl-s1">signature</span>.<span class="pl-en">equals</span>(<span class="pl-s1">engineKey</span>.<span class="pl-s1">signature</span>)) { <span class="pl-k">return</span> <span class="pl-c1">false</span>; } <span class="pl-k">return</span> <span class="pl-c1">true</span>; } <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">int</span> <span class="pl-en">hashCode</span>() { <span class="pl-k">if</span> (<span class="pl-s1">hashCode</span> == <span class="pl-c1">0</span>) { <span class="pl-s1">hashCode</span> = <span class="pl-s1">id</span>.<span class="pl-en">hashCode</span>(); <span class="pl-s1">hashCode</span> = <span class="pl-c1">31</span> * <span class="pl-s1">hashCode</span> + <span class="pl-s1">signature</span>.<span class="pl-en">hashCode</span>(); } <span class="pl-k">return</span> <span class="pl-s1">hashCode</span>; } <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-en">toString</span>() { <span class="pl-k">if</span> (<span class="pl-s1">stringKey</span> == <span class="pl-c1">null</span>) { <span class="pl-s1">stringKey</span> = <span class="pl-k">new</span> <span class="pl-smi">StringBuilder</span>() .<span class="pl-en">append</span>(<span class="pl-s">"EngineKey{"</span>) .<span class="pl-en">append</span>(<span class="pl-s1">id</span>) .<span class="pl-en">append</span>(<span class="pl-s">'+'</span>) .<span class="pl-en">append</span>(<span class="pl-s1">signature</span>) .<span class="pl-en">append</span>(<span class="pl-s">'}'</span>) .<span class="pl-en">toString</span>(); } <span class="pl-k">return</span> <span class="pl-s1">stringKey</span>; } <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">updateDiskCacheKey</span>(<span class="pl-smi">MessageDigest</span> <span class="pl-s1">messageDigest</span>) <span class="pl-k">throws</span> <span class="pl-smi">UnsupportedEncodingException</span> { <span class="pl-s1">signature</span>.<span class="pl-en">updateDiskCacheKey</span>(<span class="pl-s1">messageDigest</span>); <span class="pl-s1">messageDigest</span>.<span class="pl-en">update</span>(<span class="pl-s1">id</span>.<span class="pl-en">getBytes</span>(<span class="pl-c1">STRING_CHARSET_NAME</span>)); } }</pre></div> <p dir="auto">use like that:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="String url = &quot;http://xxxxxx&quot;; ExternalCacheDiskCacheFactory factory = new ExternalCacheDiskCacheFactory(activity); File file = factory.build().get(new EngineKey(url));"><pre class="notranslate"><span class="pl-smi">String</span> <span class="pl-s1">url</span> = <span class="pl-s">"http://xxxxxx"</span>; <span class="pl-smi">ExternalCacheDiskCacheFactory</span> <span class="pl-s1">factory</span> = <span class="pl-k">new</span> <span class="pl-smi">ExternalCacheDiskCacheFactory</span>(<span class="pl-s1">activity</span>); <span class="pl-smi">File</span> <span class="pl-s1">file</span> = <span class="pl-s1">factory</span>.<span class="pl-en">build</span>().<span class="pl-en">get</span>(<span class="pl-k">new</span> <span class="pl-smi">EngineKey</span>(<span class="pl-s1">url</span>));</pre></div>
<p dir="auto">Hi,now I want to migrate my app from universalimageloader to glide. But I have a question is that I can‘t judge a image is already cached in disk。</p> <p dir="auto">There is my case:<br> There are many different resources and different URL for one image. Different network environments load different resources。For example,When I was in the 3G network,load the low quality image resource and the URL is "http://www.xxxxx_3g.png"。When I was in the WIFI network,load the high quality image resource and the URL is "http://www.yyyyyy_wifi.png",There are two different URLs。</p> <p dir="auto">BUT! When I was in the 3G network,check the high quality image resource first。If the high quality image resource is already cached, load the high quality image resource URL from disk cache. Otherwise load "http://www.xxxxx_3g.png"。</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if (isCache(&quot;http://www.yyyyyy_wifi.png&quot;) { Glide.with(...) .load(&quot;http://www.yyyyyy_wifi.png&quot;) .into(...); } else { Glide.with(...) .load(&quot;http://www.xxxxx_3g.png&quot;) .into(...); } public boolean isCache(String url) { // what should I do ??? }"><pre class="notranslate"><span class="pl-k">if</span> (<span class="pl-en">isCache</span>(<span class="pl-s">"http://www.yyyyyy_wifi.png"</span>) { <span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(...) .<span class="pl-en">load</span>(<span class="pl-s">"http://www.yyyyyy_wifi.png"</span>) .<span class="pl-en">into</span>(...); } <span class="pl-k">else</span> { <span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(...) .<span class="pl-en">load</span>(<span class="pl-s">"http://www.xxxxx_3g.png"</span>) .<span class="pl-en">into</span>(...); } <span class="pl-k">public</span> <span class="pl-smi">boolean</span> <span class="pl-s1">isCache</span>(<span class="pl-smi">String</span> <span class="pl-s1">url</span>) { <span class="pl-c">// what should I do ???</span> }</pre></div> <p dir="auto">So,How can I judge the high quality image resource(URL is "http://www.yyyyyy_wifi.png") is already cached in disk synchronously?</p> <p dir="auto">Thank you very much。</p>
1
<p dir="auto">This led to a significant performance problem in the <code class="notranslate">threefry2x32</code> implementation when it was changed to use a <code class="notranslate">dynamic_slice</code> as part of its implementation and when batched as part of the <code class="notranslate">gamma</code> implementation. If we cannot prove that <code class="notranslate">i</code> is equal across batch elements, <code class="notranslate">x[i]</code> turns into a relatively expensive gather of scalars, but if we know <code class="notranslate">x</code> and <code class="notranslate">i</code> are unbatched, it remains a dynamic slice.</p>
<p dir="auto">The PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="480184913" data-permission-text="Title is private" data-url="https://github.com/google/jax/issues/1175" data-hovercard-type="pull_request" data-hovercard-url="/google/jax/pull/1175/hovercard" href="https://github.com/google/jax/pull/1175">#1175</a> greatly improves performance of functions involve many <code class="notranslate">random.split</code> ops. Follow up the discussion there about a regression of gamma sampler, I make a repro script here</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from jax import jit, lax, random, vmap import jax.numpy as np from jax.config import config; config.update(&quot;jax_platform_name&quot;, &quot;cpu&quot;) def gamma_one(key, alpha): key, subkey = random.split(key) boost = np.where(alpha &gt;= 1.0, 1.0, random.uniform(subkey, ()) ** (1.0 / alpha)) alpha = np.where(alpha &gt;= 1.0, alpha, alpha + 1.0) d = alpha - 1.0 / 3.0 c = 1.0 / np.sqrt(9.0 * d) def _cond_fn(kXVU): _, X, V, U = kXVU return (U &gt;= 1.0 - 0.0331 * X * X) &amp; (np.log(U) &gt;= 0.5 * X + d * (1.0 - V + np.log(V))) def _body_fn(kXVU): def _next_kxv(kxv): k = kxv[0] k, subkey = random.split(k) x = random.normal(subkey, ()) v = 1.0 + c * x return k, x, v key = kXVU[0] key, x_key, U_key = random.split(key, 3) _, x, v = lax.while_loop(lambda kxv: kxv[2] &lt;= 0.0, _next_kxv, (x_key, 0.0, -1.0)) X = x * x V = v * v * v U = random.uniform(U_key, ()) return key, X, V, U _, _, V, _ = lax.while_loop(_cond_fn, _body_fn, (key, 1.0, 1.0, 2.0)) z = d * V * boost return np.where(z == 0, np.finfo(z.dtype).tiny, z) def gamma_trick_one(key, alpha): boost = np.where(alpha &gt;= 1.0, 1.0, random.uniform(key, ()) ** (1.0 / alpha)) key, = random.split(key, 1) alpha = np.where(alpha &gt;= 1.0, alpha, alpha + 1.0) d = alpha - 1.0 / 3.0 c = 1.0 / np.sqrt(9.0 * d) def _cond_fn(kXVU): _, X, V, U = kXVU return (U &gt;= 1.0 - 0.0331 * X * X) &amp; (np.log(U) &gt;= 0.5 * X + d * (1.0 - V + np.log(V))) def _body_fn(kXVU): def _next_kxv(kxv): k = kxv[0] x = random.normal(k, ()) k, = random.split(k, 1) v = 1.0 + c * x return k, x, v key = kXVU[0] key, x, v = lax.while_loop(lambda kxv: kxv[2] &lt;= 0.0, _next_kxv, (key, 0.0, -1.0)) X = x * x V = v * v * v U = random.uniform(key, ()) key, = random.split(key, 1) return key, X, V, U _, _, V, _ = lax.while_loop(_cond_fn, _body_fn, (key, 1.0, 1.0, 2.0)) z = d * V * boost return np.where(z == 0, np.finfo(z.dtype).tiny, z) gamma_trick = jit(vmap(gamma_trick_one)) gamma = jit(vmap(gamma_one)) rng = random.PRNGKey(0) alpha = random.uniform(rng, (1000,)) * 2 rngs = random.split(rng, 1000)"><pre class="notranslate"><code class="notranslate">from jax import jit, lax, random, vmap import jax.numpy as np from jax.config import config; config.update("jax_platform_name", "cpu") def gamma_one(key, alpha): key, subkey = random.split(key) boost = np.where(alpha &gt;= 1.0, 1.0, random.uniform(subkey, ()) ** (1.0 / alpha)) alpha = np.where(alpha &gt;= 1.0, alpha, alpha + 1.0) d = alpha - 1.0 / 3.0 c = 1.0 / np.sqrt(9.0 * d) def _cond_fn(kXVU): _, X, V, U = kXVU return (U &gt;= 1.0 - 0.0331 * X * X) &amp; (np.log(U) &gt;= 0.5 * X + d * (1.0 - V + np.log(V))) def _body_fn(kXVU): def _next_kxv(kxv): k = kxv[0] k, subkey = random.split(k) x = random.normal(subkey, ()) v = 1.0 + c * x return k, x, v key = kXVU[0] key, x_key, U_key = random.split(key, 3) _, x, v = lax.while_loop(lambda kxv: kxv[2] &lt;= 0.0, _next_kxv, (x_key, 0.0, -1.0)) X = x * x V = v * v * v U = random.uniform(U_key, ()) return key, X, V, U _, _, V, _ = lax.while_loop(_cond_fn, _body_fn, (key, 1.0, 1.0, 2.0)) z = d * V * boost return np.where(z == 0, np.finfo(z.dtype).tiny, z) def gamma_trick_one(key, alpha): boost = np.where(alpha &gt;= 1.0, 1.0, random.uniform(key, ()) ** (1.0 / alpha)) key, = random.split(key, 1) alpha = np.where(alpha &gt;= 1.0, alpha, alpha + 1.0) d = alpha - 1.0 / 3.0 c = 1.0 / np.sqrt(9.0 * d) def _cond_fn(kXVU): _, X, V, U = kXVU return (U &gt;= 1.0 - 0.0331 * X * X) &amp; (np.log(U) &gt;= 0.5 * X + d * (1.0 - V + np.log(V))) def _body_fn(kXVU): def _next_kxv(kxv): k = kxv[0] x = random.normal(k, ()) k, = random.split(k, 1) v = 1.0 + c * x return k, x, v key = kXVU[0] key, x, v = lax.while_loop(lambda kxv: kxv[2] &lt;= 0.0, _next_kxv, (key, 0.0, -1.0)) X = x * x V = v * v * v U = random.uniform(key, ()) key, = random.split(key, 1) return key, X, V, U _, _, V, _ = lax.while_loop(_cond_fn, _body_fn, (key, 1.0, 1.0, 2.0)) z = d * V * boost return np.where(z == 0, np.finfo(z.dtype).tiny, z) gamma_trick = jit(vmap(gamma_trick_one)) gamma = jit(vmap(gamma_one)) rng = random.PRNGKey(0) alpha = random.uniform(rng, (1000,)) * 2 rngs = random.split(rng, 1000) </code></pre></div> <p dir="auto">then</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="%time x1 = gamma(rngs, alpha).copy() %time x2 = gamma_trick(rngs, alpha).copy() %time x3 = random.gamma(rng, alpha).copy() assert (np.abs(x1 - x3) &gt; 1e-5).sum() == 0"><pre class="notranslate"><code class="notranslate">%time x1 = gamma(rngs, alpha).copy() %time x2 = gamma_trick(rngs, alpha).copy() %time x3 = random.gamma(rng, alpha).copy() assert (np.abs(x1 - x3) &gt; 1e-5).sum() == 0 </code></pre></div> <p dir="auto">returns (with JAX 0.1.41)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CPU times: user 2.06 s, sys: 28 ms, total: 2.09 s Wall time: 2.07 s CPU times: user 1.41 s, sys: 7.77 ms, total: 1.42 s Wall time: 1.41 s CPU times: user 6.01 s, sys: 35.8 ms, total: 6.04 s Wall time: 6.03 s"><pre class="notranslate"><code class="notranslate">CPU times: user 2.06 s, sys: 28 ms, total: 2.09 s Wall time: 2.07 s CPU times: user 1.41 s, sys: 7.77 ms, total: 1.42 s Wall time: 1.41 s CPU times: user 6.01 s, sys: 35.8 ms, total: 6.04 s Wall time: 6.03 s </code></pre></div> <p dir="auto">To my surprise, time to compile <code class="notranslate">gamma</code> and <code class="notranslate">random.gamma</code> are so different, while the algorithm is the same (modulo precision issues due to using <code class="notranslate">np.</code> vs <code class="notranslate">lax.</code> - I don't understand why precision is 1e-5 but I guess that it is due to how constant values are handled in two implementations). Maybe we should use <code class="notranslate">gamma</code> implementation instead of the current implementation in <code class="notranslate">random.gamma</code>?</p> <p dir="auto">In current master branch (after PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="480184913" data-permission-text="Title is private" data-url="https://github.com/google/jax/issues/1175" data-hovercard-type="pull_request" data-hovercard-url="/google/jax/pull/1175/hovercard" href="https://github.com/google/jax/pull/1175">#1175</a>), the compiling time of them are</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CPU times: user 4.43 s, sys: 11.1 ms, total: 4.45 s Wall time: 4.42 s CPU times: user 4.17 s, sys: 31.9 ms, total: 4.21 s Wall time: 4.2 s CPU times: user 4.79 s, sys: 16.2 ms, total: 4.8 s Wall time: 4.78 s"><pre class="notranslate"><code class="notranslate">CPU times: user 4.43 s, sys: 11.1 ms, total: 4.45 s Wall time: 4.42 s CPU times: user 4.17 s, sys: 31.9 ms, total: 4.21 s Wall time: 4.2 s CPU times: user 4.79 s, sys: 16.2 ms, total: 4.8 s Wall time: 4.78 s </code></pre></div> <p dir="auto">which improves the performance of <code class="notranslate">random.gamma</code> but makes regression for <code class="notranslate">gamma</code> and <code class="notranslate">gamma_trick</code>.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mattjj/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mattjj">@mattjj</a> I hope the above repro code illustrates some interesting performance issue for JAX/XLA team. :)</p>
1
<p dir="auto">such as:</p> <ul dir="auto"> <li><code class="notranslate">[TOC]</code></li> <li>task list <code class="notranslate">- [x]</code></li> <li>flowchart [http://adrai.github.io/flowchart.js/]</li> <li>sequence-diagrams [http://bramp.github.io/js-sequence-diagrams/]</li> </ul>
<p dir="auto">In the Common Questions section of <a href="https://code.visualstudio.com/docs/languages/markdown" rel="nofollow">https://code.visualstudio.com/docs/languages/markdown</a> it says "Code supports GitHub Flavored Markdown".</p> <p dir="auto">This support is incomplete as at least Code's internal preview does not render task lists correctly. They are described as part of GFM here: <a href="https://help.github.com/articles/writing-on-github/">https://help.github.com/articles/writing-on-github/</a></p> <p dir="auto">Please add this to Code's previewer.</p>
1
<p dir="auto">When a multiple import fails, the error message does not specify which ident was not found. The squiggly arrow seems to always point to the beginning of the thing being imported, whether or not that was the unresolved part.</p> <h2 dir="auto">Examples (from rust-http-client)</h2> <p dir="auto">Multi-line multiple import: (no line at all!)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/Users/burg/repos/servo/src/rust-http-client/http_client.rs:5:7: 8:2 error: failed to resolve import /Users/burg/repos/servo/src/rust-http-client/http_client.rs:5 import std::net::ip::{ /Users/burg/repos/servo/src/rust-http-client/http_client.rs:6 get_addr, format_addr, ipv4, ipv6, IpAddr, /Users/burg/repos/servo/src/rust-http-client/http_client.rs:7 ip_get_addr_err /Users/burg/repos/servo/src/rust-http-client/http_client.rs:8 };"><pre class="notranslate"><code class="notranslate">/Users/burg/repos/servo/src/rust-http-client/http_client.rs:5:7: 8:2 error: failed to resolve import /Users/burg/repos/servo/src/rust-http-client/http_client.rs:5 import std::net::ip::{ /Users/burg/repos/servo/src/rust-http-client/http_client.rs:6 get_addr, format_addr, ipv4, ipv6, IpAddr, /Users/burg/repos/servo/src/rust-http-client/http_client.rs:7 ip_get_addr_err /Users/burg/repos/servo/src/rust-http-client/http_client.rs:8 }; </code></pre></div> <p dir="auto">Single-line multiple import: (points to <code class="notranslate">std::</code>)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/Users/burg/repos/servo/src/rust-http-client/connection.rs:2:7: 2:59 error: failed to resolve import /Users/burg/repos/servo/src/rust-http-client/connection.rs:2 import std::net::tcp::{tcp_err_data, tcp_connect_err_data}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">/Users/burg/repos/servo/src/rust-http-client/connection.rs:2:7: 2:59 error: failed to resolve import /Users/burg/repos/servo/src/rust-http-client/connection.rs:2 import std::net::tcp::{tcp_err_data, tcp_connect_err_data}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ </code></pre></div> <p dir="auto">Single-line single import: (points to <code class="notranslate">std::</code>)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/Users/burg/repos/servo/src/rust-http-client/connection.rs:25:15: 25:41 error: failed to resolve import /Users/burg/repos/servo/src/rust-http-client/connection.rs:25 import std::net::tcp::tcp_socket; ^~~~~~~~~~~~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">/Users/burg/repos/servo/src/rust-http-client/connection.rs:25:15: 25:41 error: failed to resolve import /Users/burg/repos/servo/src/rust-http-client/connection.rs:25 import std::net::tcp::tcp_socket; ^~~~~~~~~~~~~~~~~~~~~~~~~~ </code></pre></div>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct Foo&lt;T&gt; { value: T } impl&lt;T: Owned&gt; Foo&lt;T&gt; { fn from_owned(value: T) -&gt; Foo&lt;T&gt; { Foo{value: value} } } impl&lt;T: Const&gt; Foo&lt;T&gt; { fn from_const(value: T) -&gt; Foo&lt;T&gt; { Foo{value: value} } } fn main() { }"><pre class="notranslate"><span class="pl-k">struct</span> <span class="pl-smi">Foo</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">value</span><span class="pl-kos">:</span> <span class="pl-smi">T</span> <span class="pl-kos">}</span> <span class="pl-k">impl</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">Owned</span><span class="pl-kos">&gt;</span> <span class="pl-smi">Foo</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">fn</span> <span class="pl-en">from_owned</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">:</span> <span class="pl-smi">T</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Foo</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">Foo</span><span class="pl-kos">{</span><span class="pl-c1">value</span><span class="pl-kos">:</span> value<span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">impl</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">Const</span><span class="pl-kos">&gt;</span> <span class="pl-smi">Foo</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">fn</span> <span class="pl-en">from_const</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">:</span> <span class="pl-smi">T</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Foo</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">Foo</span><span class="pl-kos">{</span><span class="pl-c1">value</span><span class="pl-kos">:</span> value<span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="foo.rs:11:0: 15:1 error: duplicate definition of type `Foo` foo.rs:11 impl&lt;T: Const&gt; Foo&lt;T&gt; { foo.rs:12 fn from_const(value: T) -&gt; Foo&lt;T&gt; { foo.rs:13 Foo{value: value} foo.rs:14 } foo.rs:15 } foo.rs:5:0: 9:1 note: first definition of type Foo here: foo.rs:5 impl&lt;T: Owned&gt; Foo&lt;T&gt; { foo.rs:6 fn from_owned(value: T) -&gt; Foo&lt;T&gt; { foo.rs:7 Foo{value: value} foo.rs:8 } foo.rs:9 } error: aborting due to previous error zsh: exit 101 rustc foo.rs"><pre class="notranslate"><code class="notranslate">foo.rs:11:0: 15:1 error: duplicate definition of type `Foo` foo.rs:11 impl&lt;T: Const&gt; Foo&lt;T&gt; { foo.rs:12 fn from_const(value: T) -&gt; Foo&lt;T&gt; { foo.rs:13 Foo{value: value} foo.rs:14 } foo.rs:15 } foo.rs:5:0: 9:1 note: first definition of type Foo here: foo.rs:5 impl&lt;T: Owned&gt; Foo&lt;T&gt; { foo.rs:6 fn from_owned(value: T) -&gt; Foo&lt;T&gt; { foo.rs:7 Foo{value: value} foo.rs:8 } foo.rs:9 } error: aborting due to previous error zsh: exit 101 rustc foo.rs </code></pre></div>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Working dateTimePicker in Firefox on demo page.</p> <p dir="auto"><a href="https://material-ui.com/demos/pickers/#pickers" rel="nofollow">https://material-ui.com/demos/pickers/#pickers</a></p> <h2 dir="auto">Current Behavior</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5550440/35767890-43029dd6-08f4-11e8-9fb1-649919e4ef41.png"><img src="https://user-images.githubusercontent.com/5550440/35767890-43029dd6-08f4-11e8-9fb1-649919e4ef41.png" alt="ohwell" style="max-width: 100%;"></a></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>open <a href="https://material-ui.com/demos/pickers/#pickers" rel="nofollow">https://material-ui.com/demos/pickers/#pickers</a> in Firefox</li> </ol> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>^1.0.0-beta.27</td> </tr> <tr> <td>React</td> <td>^16.2.0</td> </tr> <tr> <td>browser</td> <td>firefox 57.0.4 (64-bit) +</td> </tr> <tr> <td>OS</td> <td>OSX</td> </tr> </tbody> </table>
<p dir="auto">onBlur() is being called on a TextField with event parameter as <code class="notranslate">undefined</code></p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto"><code class="notranslate">onBlur()</code> should always be called with an event.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">In some situations, <code class="notranslate">onBlur()</code> is being called with an undefined event.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">I am not able to reproduce this in a small example, but I can tell you which code path is making this spurious call to <code class="notranslate">onBlur</code>. The culprit is essentially the <code class="notranslate">componentWillUpdate()</code> method in Input.js. See <a href="https://github.com/callemall/material-ui/blob/v1-beta/src/Input/Input.js#L386-L398">here</a>.</p> <ol dir="auto"> <li>On line 395, there is a call to <code class="notranslate">muiFormControl.onBlur()</code>, without passing an event!!!</li> <li>This calls <a href="https://github.com/callemall/material-ui/blob/v1-beta/src/Form/FormControl.js#L180-L187">FormControl.handleBlur()</a>, which expects an event.</li> <li>This in turn calls <code class="notranslate">this.props.onBlur(event)</code>, which is my event handler that gets an undefined event.</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">This issue is requiring me to check for an undefined event in the beginning of my event handler.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0.0-beta.20</td> </tr> <tr> <td>React</td> <td>16.0.0</td> </tr> <tr> <td>browser</td> <td>Chrome</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
0
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br> I want to request a <em>feature</em>.</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <ul dir="auto"> <li> <p dir="auto">Warning code is hardcoded to call <code class="notranslate">fbjs/lib/warning</code>. This makes it hard to integrate warnings with tools.</p> </li> <li> <p dir="auto">As a workaround we could use webpack’s <code class="notranslate">resolve.alias</code> to alias <code class="notranslate">fbjs/lib/warning</code> into our fork which displays it on-screen.</p> <ul dir="auto"> <li>This use case is similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="167784727" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/7360" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/7360/hovercard" href="https://github.com/facebook/react/pull/7360">#7360</a>.</li> </ul> </li> <li> <p dir="auto">Another use case is to integrate React warnings with our testing infrastructure. This helps us to better see which warning belongs to which test.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/193136/27680560-587f934a-5ce6-11e7-985b-a1a2042d831a.png"><img src="https://user-images.githubusercontent.com/193136/27680560-587f934a-5ce6-11e7-985b-a1a2042d831a.png" alt="image" style="max-width: 100%;"></a></p> </li> </ul> <p dir="auto"><strong>What is the expected behavior?</strong></p> <ul dir="auto"> <li>React allows library user to override the default warnings behavior.</li> </ul> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong></p> <ul dir="auto"> <li> <p dir="auto">The workaround works in React 15 and should still work in React 16, as the flat bundles does <code class="notranslate">var warning = require('fbjs/lib/warning')</code> which means we can still hook into it for now.</p> </li> <li> <p dir="auto">This probably breaks when the flat bundles stopped doing <code class="notranslate">var warning = require('fbjs/lib/warning')</code>.</p> </li> </ul>
<p dir="auto">I'd like to configure my testsuite to fail if there are any react warnings triggered.</p> <p dir="auto">I'm currently using a variant on this SO answer <a href="http://stackoverflow.com/questions/29651950/karma-and-react-have-warnings-to-cause-errors" rel="nofollow">http://stackoverflow.com/questions/29651950/karma-and-react-have-warnings-to-cause-errors</a></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="console.warn = (function(warn) { return function(msg) { // Detect react warnings &amp; error if (/^Warning: /.test(msg)) { throw new Error(&quot;React &quot; + msg); } return warn.apply(this, arguments); }; })(console.warn);"><pre class="notranslate"><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-c1">warn</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">warn</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-kos">(</span><span class="pl-s1">msg</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// Detect react warnings &amp; error</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">^</span>Warning: <span class="pl-c1">/</span></span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">msg</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">"React "</span> <span class="pl-c1">+</span> <span class="pl-s1">msg</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">warn</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-smi">arguments</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-c1">warn</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">This basically works, but has a problem because there's some global-state memoisation in the code which triggers warning to try not to trigger too often:<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/facebook/react/blob/500d4c3f8779bce7c7dde129eb2fec9e901cf5ae/src/isomorphic/classic/element/ReactElementValidator.js#L46">react/src/isomorphic/classic/element/ReactElementValidator.js</a> </p> <p class="mb-0 color-fg-muted"> Line 46 in <a data-pjax="true" class="commit-tease-sha" href="/facebook/react/commit/500d4c3f8779bce7c7dde129eb2fec9e901cf5ae">500d4c3</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L46" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="46"></td> <td id="LC46" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">var</span> <span class="pl-s1">ownerHasKeyUseWarning</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">Could we provide a way to clear this state, or even better a supported API for opt-in erroring on warnings?</p>
1
<p dir="auto">Hello,</p> <p dir="auto">Recently I have been struggling with weird and unexpected behavior of numpy, and would like to have some help.</p> <p dir="auto">Here is my code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np vec = np.random.uniform(-0.5, 0.5, size=(100)).astype(np.float32) print(np.linalg.norm(vec))"><pre class="notranslate"><code class="notranslate">import numpy as np vec = np.random.uniform(-0.5, 0.5, size=(100)).astype(np.float32) print(np.linalg.norm(vec)) </code></pre></div> <p dir="auto">This code returns very differently every run including</p> <ol dir="auto"> <li><code class="notranslate">0.0</code></li> <li><code class="notranslate">nan</code> along with <code class="notranslate">RuntimeWarning: invalid value encountered in sqrt</code></li> <li>Very large value, i.e. <code class="notranslate">6074001000.0</code></li> <li>Good value, i.e. <code class="notranslate">1.4142135</code></li> </ol> <p dir="auto">Further I confirmed that it works fine if I don't have <code class="notranslate">.astype</code>, but I need <code class="notranslate">vec</code> to be float32 for following process.</p> <p dir="auto">My environment is</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="OS: macOS High Sierra numpy version: 1.14.0 python version: anaconda3-5.1.0 (install with pyenv)"><pre class="notranslate"><code class="notranslate">OS: macOS High Sierra numpy version: 1.14.0 python version: anaconda3-5.1.0 (install with pyenv) </code></pre></div> <p dir="auto">Thank you</p>
<p dir="auto">I am getting a different and incorrect value for the first element comparison when using the "assume_unique" option in numpy.in1d when comparing two 1D arrays.</p> <blockquote> <blockquote> <blockquote> <p dir="auto">mask = np.in1d(sum_array1, sum_array2)<br> mask<br> array([<strong>False</strong>, False, False, ..., True, False, False], dtype=bool)</p> <p dir="auto">mask = np.in1d(sum_array1, sum_array2, assume_unique=True)<br> mask<br> array([ <strong>True</strong>, False, False, ..., True, False, False], dtype=bool)</p> </blockquote> </blockquote> </blockquote> <p dir="auto">NOTE: The first value in mask is incorrect when I used the "assume_unique" option. As far as I can tell the other values are ok.</p> <blockquote> <blockquote> <blockquote> <p dir="auto">sum_array1.shape<br> (10000,)<br> sum_array2.shape<br> (200000,)<br> sum_array1<br> array([ 166.25097656, -131. , -72.66274261, ..., -153.37646484,<br> -154.26272583, -248.20391846], dtype=float32)<br> sum_array2<br> array([ -67.80783844, -155.38824463, -6.23921967, ..., -290.447052 ,<br> 179.6862793 , 205.69413757], dtype=float32)</p> <p dir="auto">np.version.version<br> '1.10.1'<br> print(sys.version)<br> 2.7.6 (default, Jun 22 2015, 17:58:13)<br> [GCC 4.8.2]</p> </blockquote> </blockquote> <p dir="auto">lsb_release -a<br> No LSB modules are available.<br> Distributor ID: Ubuntu<br> Description: Ubuntu 14.04.2 LTS<br> Release: 14.04<br> Codename: trusty</p> </blockquote>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.3</li> <li>Operating System version: mac</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>服务提供者项目为A【里面接一个接口】,2个项目消费A,分别为 项目B 和项目C。</li> <li>服务注册到nacos 将项目名没有放在服务名上,而是放在了元数据中。导致3个项目启动 只有2个服务。分别一个提供者、一个消费者【应该是2个消费者】。</li> <li>2个消费者调用没有影响。列表bug</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! </code></pre></div>
<h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.3</li> <li>Nacos version: 1.1.3</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>注册一个provider,nacos控制台里面有1个provider</li> <li>再注册一个consumer,nacos控制台里面有1个consumer</li> <li>再注册一个consumer,nacos控制台里面还是1个consumer,但是这个consumer已经被更新了,里面的应用名变了。</li> </ol> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/26211950/70118432-efafa480-16a2-11ea-9d5a-d71607bfbe3a.png"><img src="https://user-images.githubusercontent.com/26211950/70118432-efafa480-16a2-11ea-9d5a-d71607bfbe3a.png" alt="image" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/26211950/70118444-f6d6b280-16a2-11ea-84d1-31a4836fecf6.png"><img src="https://user-images.githubusercontent.com/26211950/70118444-f6d6b280-16a2-11ea-84d1-31a4836fecf6.png" alt="image" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/26211950/70118458-ffc78400-16a2-11ea-829f-005a5ca4c5b7.png"><img src="https://user-images.githubusercontent.com/26211950/70118458-ffc78400-16a2-11ea-829f-005a5ca4c5b7.png" alt="image" style="max-width: 100%;"></a></p>
1
<p dir="auto">I'm not sure if this is a bug or not but the behavior doesn't make sense. I'm using a model driven form on my page and one of the controls has two synchronous validators (required and minlength) and a custom asyncValidator. When the page initially loads the form control is empty so it should be failing the required and minlength validations. The custom validator will return valid when the field is empty. However, the state of the control is being set Valid on form initialization. Previously my custom async validator had been a synchronous validator and it worked as expected, i.e. the custom validator is initially valid but the form control is still invalid due to the other validations being invalid.</p> <p dir="auto">The following plnkr illustrates the behavior:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="http://plnkr.co/edit/VJlg1Q1EXs9mQ8Bx2YTQ?p=preview"><pre class="notranslate"><code class="notranslate">http://plnkr.co/edit/VJlg1Q1EXs9mQ8Bx2YTQ?p=preview </code></pre></div> <p dir="auto">Also, note that the after form initialization the async validator only runs after satisfying the minlength requirement (in this case upon typing the 6th character) while the sync validator runs on every key press and the sync validator is run twice on form initialization while the async validator only runs once. Another thing is that the form control with the async validator will report invalid if you type some characters then delete them all making the field empty.</p>
<p dir="auto"><strong>I'm submitting a ...</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[X] bug report"><pre class="notranslate"><code class="notranslate">[X] bug report </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">If I have a sync and a async validation on a formControl the async validation overwrites the sync validation when it comes back even if the value has changed. So if I put in something in a field that passes the sync validation the async validation triggers. However when I then change the value of the field before the last async validation have come back to something that doesn't pass the sync validation the last value async validation becomes the winning one.</p> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">Probably that the async validation should be ignored if the value has changed since the request?</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p> <p dir="auto"><a href="http://plnkr.co/edit/MrY2Gq03dNjp8hvET3cn?p=preview" rel="nofollow">http://plnkr.co/edit/MrY2Gq03dNjp8hvET3cn?p=preview</a></p> <ol dir="auto"> <li>Fill in <a href="mailto:[email protected]">[email protected]</a> in the input field.</li> <li>Within 5 seconds, change the value of the field to asdf.</li> <li>Wait a second or two and now the Control is valid, but asdf is not valid according to the sync validation.</li> </ol> <ul dir="auto"> <li><strong>Angular version:</strong> 2.1.12</li> </ul> <ul dir="auto"> <li><strong>Browser:</strong>: Tested in latest Chrome and Safari</li> </ul> <ul dir="auto"> <li><strong>Language:</strong>: Typescript</li> </ul>
1
<p dir="auto">[ 82%] Built target opencv_python2<br> [ 82%] Generating pyopencv_generated_include.h, pyopencv_generated_funcs.h, pyopencv_generated_types.h, pyopencv_generated_type_reg.h, pyopencv_generated_ns_reg.h<br> Note: Class l has more than 1 base class (not supported by Python C extensions)<br> Bases: cv::a, cv::s, cv::s, cv::A, cv::l, cv::g, cv::o, cv::r, cv::i, cv::t, cv::h, cv::m<br> Only the first base class will be used<br> Generator error: constant l_MAGIC_VAL (cname=cv::l::MAGIC_VAL) already exists<br> make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:269: modules/python3/pyopencv_generated_include.h] Error 255<br> make[1]: *** [CMakeFiles/Makefile2:13602: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2<br> make: *** [Makefile:163: all] Error 2</p> <p dir="auto">I used python 3.7</p> <p dir="auto">cmake -D CMAKE_BUILD_TYPE=RELEASE <br> -D CMAKE_INSTALL_PREFIX=/usr/local <br> -D INSTALL_PYTHON_EXAMPLES=ON <br> -D INSTALL_C_EXAMPLES=OFF <br> -D ENABLE_PRECOMPILED_HEADERS=OFF <br> -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.1.0/modules <br> -D BUILD_EXAMPLES=ON ..</p> <p dir="auto">and followed these steps <a href="https://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/" rel="nofollow">https://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/</a></p> <p dir="auto">please help!!!!!</p>
<h5 dir="auto">System information (version)</h5> <h5 dir="auto">Detailed description</h5> <p dir="auto">[ 98%] Built target pch_Generate_opencv_videostab<br> [ 98%] Built target opencv_videostab<br> [ 98%] Built target opencv_python2<br> [ 98%] Generating pyopencv_generated_include.h, pyopencv_generated_funcs.h, pyopencv_generated_types.h, pyopencv_generated_type_reg.h, pyopencv_generated_ns_reg.h<br> Note: Class l has more than 1 base class (not supported by Python C extensions)<br> Bases: cv::a, cv::s, cv::s, cv::A, cv::l, cv::g, cv::o, cv::r, cv::i, cv::t, cv::h, cv::m<br> Only the first base class will be used<br> Generator error: constant l_MAGIC_VAL (cname=cv::l::MAGIC_VAL) already exists<br> modules/python3/CMakeFiles/opencv_python3.dir/build.make:158: recipe for target 'modules/python3/pyopencv_generated_include.h' failed<br> make[2]: *** [modules/python3/pyopencv_generated_include.h] Error 255<br> CMakeFiles/Makefile2:11977: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/all' failed<br> make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2<br> Makefile:162: recipe for target 'all' failed<br> make: *** [all] Error 2</p>
1
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/return-a-value-from-a-function-with-return#?solution=%0A%2F%2F%20Example%0Afunction%20minusSeven(num)%20%7B%0A%20%20return%20num%20-%207%3B%0A%7D%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0Afunction%20timesFive(num)%20%7B%0A%20%20return%20num%20*%205%3B%0A%7D%0A%0A" rel="nofollow">Return a Value from a Function with Return</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 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-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" // Example function minusSeven(num) { return num - 7; } // Only change code below this line function timesFive(num) { return num * 5; } "><pre class="notranslate"><span class="pl-c">// Example</span> <span class="pl-k">function</span> <span class="pl-en">minusSeven</span><span class="pl-kos">(</span><span class="pl-s1">num</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">num</span> <span class="pl-c1">-</span> <span class="pl-c1">7</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c">// Only change code below this line</span> <span class="pl-k">function</span> <span class="pl-en">timesFive</span><span class="pl-kos">(</span><span class="pl-s1">num</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">num</span> <span class="pl-c1">*</span> <span class="pl-c1">5</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> </pre></div> <p dir="auto">The code above passes the test, but the console output shows the function in lower case only: <code class="notranslate">timesfive(5) === 25</code> instead of <code class="notranslate">timesFive(5) === 25</code> like it should.</p>
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/return-a-value-from-a-function-with-return#?solution=%0A%2F%2F%20Example%0Afunction%20minusSeven%28num%29%20%7B%0A%20%20return%20num%20-%207%3B%0A%7D%0Avar%20answer%20%3D%20minusSeven%287%29%3B%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0A%0A%0A" rel="nofollow">Return a Value from a Function with Return</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 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:<br> function timesFive(num){<br> return num * 5;<br> }<br> var answer = timesFive(5);</p> <p dir="auto">// Example<br> function minusSeven(num) {<br> return num - 7;<br> }<br> var answer = minusSeven(7);<br> // Only change code below this line</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="**The console deck won't change no matter what you type in. Always showing &quot;timesFive(5)===25&quot;.** People who have this kind of problem could go to this link and test: https://jsbin.com/daxoyifabe/edit?html,css,output"><pre class="notranslate"><code class="notranslate">**The console deck won't change no matter what you type in. Always showing "timesFive(5)===25".** People who have this kind of problem could go to this link and test: https://jsbin.com/daxoyifabe/edit?html,css,output </code></pre></div>
1
<p dir="auto">Can't find an exact match for the issue, so create a new one here. Feel free to close it as a duplicate if it's the case.</p> <p dir="auto">/home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sync/mutex.rs:177:37: 180:2 error: internal compiler error: debuginfo: Could not find scope info for node NodeExpr(Expr { id: 9643, node: ExprStruct(Path { span: Span { lo: BytePos(4553805), hi: BytePos(4553816), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: StaticMutex#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }, [Field { ident: Spanned { node: lock#0, span: Span { lo: BytePos(1772893), hi: BytePos(1772897), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 9644, node: ExprPath(None, Path { span: Span { lo: BytePos(4553829), hi: BytePos(4553844), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: sys#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: MUTEX_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4553829), hi: BytePos(4553844), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4553823), hi: BytePos(4553844), expn_id: ExpnId(4294967295) } }, Field { ident: Spanned { node: poison#0, span: Span { lo: BytePos(1772920), hi: BytePos(1772926), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 9645, node: ExprPath(None, Path { span: Span { lo: BytePos(4553858), hi: BytePos(4553875), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: poison#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: FLAG_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4553858), hi: BytePos(4553875), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4553850), hi: BytePos(4553875), expn_id: ExpnId(4294967295) } }], None), span: Span { lo: BytePos(4553805), hi: BytePos(4553878), expn_id: ExpnId(4294967295) } })<br> note: the compiler unexpectedly panicked. this is a bug.<br> note: we would appreciate a bug report: <a href="https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports">https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports</a><br> note: run with <code class="notranslate">RUST_BACKTRACE=1</code> for a backtrace<br> thread 'rustc' panicked at 'Box', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:129</p> <p dir="auto">stack backtrace:<br> 1: 0x7f0c71ceef6f - sys::backtrace::write::h2f046b875b210aadOBA<br> 2: 0x7f0c71d19c82 - panicking::on_panic::h792ac47fb8c07faehHJ<br> 3: 0x7f0c71c4ef2a - rt::unwind::begin_unwind_inner::hbffac672008352c8knJ<br> 4: 0x7f0c6f08b84d - rt::unwind::begin_unwind::h7782663023585067018<br> 5: 0x7f0c6f08b7f3 - diagnostic::SpanHandler::span_bug::h2cdd5e3b5b05e8f800D<br> 6: 0x7f0c6f964d03 - session::Session::span_bug::hae37e3dbc1cfddbalVp<br> 7: 0x7f0c7147c6bc - trans::debuginfo::scope_metadata::h3b34d6a00870eb16ClE<br> 8: 0x7f0c7138e568 - trans::debuginfo::set_source_location::h9f5b090c644fcb73vPD<br> 9: 0x7f0c71342f32 - trans::expr::trans_into::h3bbb0e210c9fb401Vph<br> 10: 0x7f0c713431f9 - trans::expr::trans_into::h3bbb0e210c9fb401Vph<br> 11: 0x7f0c713a57df - trans::expr::trans_uniq_expr::hd6a8aea14a08d77bQmj<br> 12: 0x7f0c713a644f - trans::expr::trans_unary::h35488c79f6cf1ec15ij<br> 13: 0x7f0c7139096e - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h<br> 14: 0x7f0c71343507 - trans::expr::trans_into::h3bbb0e210c9fb401Vph<br> 15: 0x7f0c713c3859 - trans::expr::trans_adt::h66e672e44790aeeca9i<br> 16: 0x7f0c713c630f - trans::expr::trans_struct::closure.42092<br> 17: 0x7f0c713b0176 - trans::expr::trans_struct::ha16472c37d95c70064i<br> 18: 0x7f0c7139269d - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi<br> 19: 0x7f0c713434e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph<br> 20: 0x7f0c71344317 - trans::controlflow::trans_block::h4b526e186a057814x7d<br> 21: 0x7f0c7141b3b1 - trans::base::trans_closure::h194b7ad0474e43a46mt<br> 22: 0x7f0c7132c948 - trans::base::trans_fn::h5416ef5d9cea730bZxt<br> 23: 0x7f0c7132e3e0 - trans::monomorphize::monomorphic_fn::he3c4a3a0040e5501Qud<br> 24: 0x7f0c71373f9e - trans::callee::trans_fn_ref_with_substs::h85a6252d422343b2qng<br> 25: 0x7f0c7137252e - trans::callee::trans_fn_ref::h7eebc758d7f24cf00bg<br> 26: 0x7f0c7136f97d - trans::callee::trans::h1b831ba8a404e3ach1f<br> 27: 0x7f0c713860eb - trans::callee::trans_call_inner::h15453122340747063984<br> 28: 0x7f0c71392b40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi<br> 29: 0x7f0c713434e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph<br> 30: 0x7f0c713c3859 - trans::expr::trans_adt::h66e672e44790aeeca9i<br> 31: 0x7f0c713c630f - trans::expr::trans_struct::closure.42092<br> 32: 0x7f0c713b0176 - trans::expr::trans_struct::ha16472c37d95c70064i<br> 33: 0x7f0c7139269d - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi<br> 34: 0x7f0c713434e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph<br> 35: 0x7f0c71344317 - trans::controlflow::trans_block::h4b526e186a057814x7d<br> 36: 0x7f0c7141b3b1 - trans::base::trans_closure::h194b7ad0474e43a46mt<br> 37: 0x7f0c7132c948 - trans::base::trans_fn::h5416ef5d9cea730bZxt<br> 38: 0x7f0c7132e3e0 - trans::monomorphize::monomorphic_fn::he3c4a3a0040e5501Qud<br> 39: 0x7f0c71373f9e - trans::callee::trans_fn_ref_with_substs::h85a6252d422343b2qng<br> 40: 0x7f0c7137252e - trans::callee::trans_fn_ref::h7eebc758d7f24cf00bg<br> 41: 0x7f0c7136f97d - trans::callee::trans::h1b831ba8a404e3ach1f<br> 42: 0x7f0c713860eb - trans::callee::trans_call_inner::h15453122340747063984<br> 43: 0x7f0c71392b40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi<br> 44: 0x7f0c713907c8 - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h<br> 45: 0x7f0c71344c48 - trans::expr::trans::h4730571ef226d1543vh<br> 46: 0x7f0c71381b43 - trans::callee::trans_args::hfa9ae7de71a462d8I3g<br> 47: 0x7f0c71386fd0 - trans::callee::trans_call_inner::h15453122340747063984<br> 48: 0x7f0c71392b40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi<br> 49: 0x7f0c713907c8 - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h<br> 50: 0x7f0c71344c48 - trans::expr::trans::h4730571ef226d1543vh<br> 51: 0x7f0c71381b43 - trans::callee::trans_args::hfa9ae7de71a462d8I3g<br> 52: 0x7f0c71386fd0 - trans::callee::trans_call_inner::h15453122340747063984<br> 53: 0x7f0c71392b40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi<br> 54: 0x7f0c713434e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph<br> 55: 0x7f0c71454df7 - trans::_match::mk_binding_alloca::h16286962064436778167<br> 56: 0x7f0c713428ed - trans::base::init_local::he5827bc6a6f1a71eyBs<br> 57: 0x7f0c71343ff2 - trans::controlflow::trans_block::h4b526e186a057814x7d<br> 58: 0x7f0c7141b3b1 - trans::base::trans_closure::h194b7ad0474e43a46mt<br> 59: 0x7f0c7132c948 - trans::base::trans_fn::h5416ef5d9cea730bZxt<br> 60: 0x7f0c7132df76 - trans::monomorphize::monomorphic_fn::he3c4a3a0040e5501Qud<br> 61: 0x7f0c71373f9e - trans::callee::trans_fn_ref_with_substs::h85a6252d422343b2qng<br> 62: 0x7f0c7137252e - trans::callee::trans_fn_ref::h7eebc758d7f24cf00bg<br> 63: 0x7f0c7136f97d - trans::callee::trans::h1b831ba8a404e3ach1f<br> 64: 0x7f0c713860eb - trans::callee::trans_call_inner::h15453122340747063984<br> 65: 0x7f0c71392b40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi<br> 66: 0x7f0c713907c8 - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h<br> 67: 0x7f0c71344c48 - trans::expr::trans::h4730571ef226d1543vh<br> 68: 0x7f0c713429c2 - trans::base::init_local::he5827bc6a6f1a71eyBs<br> 69: 0x7f0c71343ff2 - trans::controlflow::trans_block::h4b526e186a057814x7d<br> 70: 0x7f0c7141b3b1 - trans::base::trans_closure::h194b7ad0474e43a46mt<br> 71: 0x7f0c7132c948 - trans::base::trans_fn::h5416ef5d9cea730bZxt<br> 72: 0x7f0c713286e1 - trans::base::trans_item::h2af153dd6f7fd52bRVt<br> 73: 0x7f0c7142474c - trans::base::trans_crate::h5cb53f6b3e2377862Ru<br> 74: 0x7f0c72327613 - driver::phase_4_translate_to_llvm::h60575195b9fa298dENa<br> 75: 0x7f0c7230305b - driver::compile_input::h9772b425fd1776fdNba<br> 76: 0x7f0c723c7697 - run_compiler::h17c28dbe4dd58e3bV5b<br> 77: 0x7f0c723c52c9 - thunk::F.Invoke&lt;A, R&gt;::invoke::h3041729087284544127<br> 78: 0x7f0c723c3f40 - rt::unwind::try::try_fn::h11775082019993619070<br> 79: 0x7f0c71d89e38 - rust_try_inner<br> 80: 0x7f0c71d89e25 - rust_try<br> 81: 0x7f0c723c46df - thunk::F.Invoke&lt;A, R&gt;::invoke::h10556879288050829464<br> 82: 0x7f0c71d049b5 - sys:<g-emoji class="g-emoji" alias="thread" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f9f5.png">🧵</g-emoji>:thread_start::hfe8c2cac3ec4afcdr8E<br> 83: 0x7f0c6bb64181 - start_thread<br> 84: 0x7f0c718bf47c - __clone<br> 85: 0x0 - </p> <p dir="auto">Could not compile <code class="notranslate">rusttest</code>.</p> <p dir="auto">Caused by:<br> Process didn't exit successfully: <code class="notranslate">rustc src/main.rs --crate-name rusttest --crate-type bin -g --out-dir /home/wlu/projects/rusttest/target --emit=dep-info,link -L dependency=/home/wlu/projects/rusttest/target -L dependency=/home/wlu/projects/rusttest/target/deps --extern time=/home/wlu/projects/rusttest/target/deps/libtime-f5c2f62bb1bdf976.rlib -L native=/home/wlu/projects/rusttest/target/build/time-f5c2f62bb1bdf976/out</code> (exit code: 101)</p> <p dir="auto">rustc 1.0.0-nightly (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/b0746ff19b3bc204215f04bbb5756159f9bc5c92/hovercard" href="https://github.com/rust-lang/rust/commit/b0746ff19b3bc204215f04bbb5756159f9bc5c92"><tt>b0746ff</tt></a> 2015-03-05) (built 2015-03-06)<br> ubuntu 14.04 x86_64</p>
<p dir="auto">I was looking for a collection of environment variables that <code class="notranslate">rustc</code> honours but was unable to find a definitive list. There are a few mentions of variables such as <code class="notranslate">RUSTFLAGS</code>, <code class="notranslate">RUST_THREADS</code> and <code class="notranslate">RUST_BACKTRACE</code> on google but none of them are documented in <a href="https://github.com/rust-lang/rust/blob/master/man/rustc.1">rustc(1)</a></p> <p dir="auto">Would it be possible to add these to the manual for future reference under an <code class="notranslate">ENVIRONMENT</code> section much like <code class="notranslate">clang</code> and <code class="notranslate">gcc</code>?</p>
0
<h3 dir="auto">Preflight Checklist</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li> </ul> <h3 dir="auto">Issue Details</h3> <ul dir="auto"> <li><strong>Electron Version:</strong> <ul dir="auto"> <li>6.0.8</li> </ul> </li> <li><strong>Node Version:</strong> <ul dir="auto"> <li>12.10.0</li> </ul> </li> <li><strong>Npm Version:</strong> <ul dir="auto"> <li>6.10.3</li> </ul> </li> <li><strong>Operating System:</strong> <ul dir="auto"> <li>Windows 10 (1903) x64</li> </ul> </li> <li><strong>Last Known Working Electron version:</strong> <ul dir="auto"> <li>N/A</li> </ul> </li> </ul> <p dir="auto">I have also run <code class="notranslate">npm i -g windows-build-tools</code>, and am using a <code class="notranslate">.npmrc</code> file with the following contents:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="runtime = electron target = 6.0.8 target_arch = x64 disturl = https://atom.io/download/electron build_from_source = true"><pre class="notranslate"><code class="notranslate">runtime = electron target = 6.0.8 target_arch = x64 disturl = https://atom.io/download/electron build_from_source = true </code></pre></div> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">The <code class="notranslate">nodegit</code> package can be installed and used.</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">The build crashes saying that checksums for win-x64/node.lib do not match (43f611616154f667fe1101315834923cd06699bb7b4cb273bf780142ed6f0b44 == d5a48e83d9c112a2db16ccf08406b381ea9e86f86b44a2d13712afd84842834d)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; [email protected] install D:\dev\startup\git-interface-2\electron\node_modules\nodegit &gt; node lifecycleScripts/preinstall &amp;&amp; node lifecycleScripts/install [nodegit] Running pre-install script [nodegit] Running install script node-pre-gyp info it worked if it ends with ok node-pre-gyp verb cli [ node-pre-gyp verb cli 'C:\\Program Files\\nodejs\\node.exe', node-pre-gyp verb cli 'D:\\dev\\startup\\git-interface-2\\electron\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp', node-pre-gyp verb cli 'install', node-pre-gyp verb cli '--fallback-to-build' node-pre-gyp verb cli ] node-pre-gyp info using [email protected] node-pre-gyp info using [email protected] | win32 | x64 node-pre-gyp verb command install [] node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp info build requesting source compile node-pre-gyp verb command build [ 'rebuild' ] gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli 'C:\\Program Files\\nodejs\\node.exe', gyp verb cli 'C:\\Users\\mjerr\\AppData\\Roaming\\nvm\\v12.10.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js', gyp verb cli 'clean' gyp verb cli ] gyp info using [email protected] gyp info using [email protected] | win32 | x64 gyp verb command clean [] gyp verb clean removing &quot;build&quot; directory gyp info ok gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli 'C:\\Program Files\\nodejs\\node.exe', gyp verb cli 'C:\\Users\\mjerr\\AppData\\Roaming\\nvm\\v12.10.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js', gyp verb cli 'configure', gyp verb cli '--fallback-to-build', gyp verb cli '--module=D:\\dev\\startup\\git-interface-2\\electron\\node_modules\\nodegit\\build\\Release\\nodegit.node', gyp verb cli '--module_name=nodegit', gyp verb cli '--module_path=D:\\dev\\startup\\git-interface-2\\electron\\node_modules\\nodegit\\build\\Release', gyp verb cli '--napi_version=4', gyp verb cli '--node_abi_napi=napi', gyp verb cli '--napi_build_version=0', gyp verb cli '--node_napi_label=electron-v6.0', gyp verb cli '--python=C:\\Users\\mjerr\\.windows-build-tools\\python27\\python.exe' gyp verb cli ] gyp info using [email protected] gyp info using [email protected] | win32 | x64 gyp verb command configure [] gyp verb download using dist-url https://atom.io/download/electron gyp verb find Python checking Python explicitly set from command line or npm configuration gyp verb find Python - &quot;--python=&quot; or &quot;npm config get python&quot; is &quot;C:\Users\mjerr\.windows-build-tools\python27\python.exe&quot; gyp verb find Python - executing &quot;C:\Users\mjerr\.windows-build-tools\python27\python.exe&quot; to get executable path gyp verb find Python - executable path is &quot;C:\Users\mjerr\.windows-build-tools\python27\python.exe&quot; gyp verb find Python - executing &quot;C:\Users\mjerr\.windows-build-tools\python27\python.exe&quot; to get version gyp verb find Python - version is &quot;2.7.15&quot; gyp info find Python using Python version 2.7.15 found at &quot;C:\Users\mjerr\.windows-build-tools\python27\python.exe&quot; gyp verb get node dir compiling against --target node version: 6.0.8 gyp verb command install [ '6.0.8' ] gyp verb download using dist-url https://atom.io/download/electron gyp verb install input version string &quot;6.0.8&quot; gyp verb install installing version: 6.0.8 gyp verb install --ensure was passed, so won't reinstall if already installed gyp verb install version not already installed, continuing with install 6.0.8 gyp verb ensuring nodedir is created C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8 gyp verb created nodedir C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8 gyp http GET https://atom.io/download/electron/v6.0.8/node-v6.0.8-headers.tar.gz gyp http 200 https://atom.io/download/electron/v6.0.8/node-v6.0.8-headers.tar.gz gyp verb extracted file from tarball node_headers/include/node/common.gypi gyp verb extracted file from tarball node_headers/include/node/config.gypi gyp verb extracted file from tarball node_headers/include/node/js_native_api.h gyp verb extracted file from tarball node_headers/include/node/js_native_api_types.h gyp verb extracted file from tarball node_headers/include/node/libplatform/libplatform-export.h gyp verb extracted file from tarball node_headers/include/node/libplatform/libplatform.h gyp verb extracted file from tarball node_headers/include/node/libplatform/v8-tracing.h gyp verb extracted file from tarball node_headers/include/node/node.h gyp verb extracted file from tarball node_headers/include/node/node_api.h gyp verb extracted file from tarball node_headers/include/node/node_api_types.h gyp verb extracted file from tarball node_headers/include/node/node_buffer.h gyp verb extracted file from tarball node_headers/include/node/node_object_wrap.h gyp verb extracted file from tarball node_headers/include/node/node_version.h gyp verb extracted file from tarball node_headers/include/node/uv/aix.h gyp verb extracted file from tarball node_headers/include/node/uv/android-ifaddrs.h gyp verb extracted file from tarball node_headers/include/node/uv/bsd.h gyp verb extracted file from tarball node_headers/include/node/uv/darwin.h gyp verb extracted file from tarball node_headers/include/node/uv/errno.h gyp verb extracted file from tarball node_headers/include/node/uv/linux.h gyp verb extracted file from tarball node_headers/include/node/uv/os390.h gyp verb extracted file from tarball node_headers/include/node/uv/posix.h gyp verb extracted file from tarball node_headers/include/node/uv/stdint-msvc2008.h gyp verb extracted file from tarball node_headers/include/node/uv/sunos.h gyp verb extracted file from tarball node_headers/include/node/uv/threadpool.h gyp verb extracted file from tarball node_headers/include/node/uv/tree.h gyp verb extracted file from tarball node_headers/include/node/uv/unix.h gyp verb extracted file from tarball node_headers/include/node/uv/version.h gyp verb extracted file from tarball node_headers/include/node/uv/win.h gyp verb extracted file from tarball node_headers/include/node/uv.h gyp verb extracted file from tarball node_headers/include/node/v8-internal.h gyp verb extracted file from tarball node_headers/include/node/v8-platform.h gyp verb extracted file from tarball node_headers/include/node/v8-profiler.h gyp verb extracted file from tarball node_headers/include/node/v8-testing.h gyp verb extracted file from tarball node_headers/include/node/v8-util.h gyp verb extracted file from tarball node_headers/include/node/v8-value-serializer-version.h gyp verb extracted file from tarball node_headers/include/node/v8-version-string.h gyp verb extracted file from tarball node_headers/include/node/v8-version.h gyp verb extracted file from tarball node_headers/include/node/v8-wasm-trap-handler-posix.h gyp verb extracted file from tarball node_headers/include/node/v8-wasm-trap-handler-win.h gyp verb extracted file from tarball node_headers/include/node/v8.h gyp verb extracted file from tarball node_headers/include/node/v8config.h gyp verb extracted file from tarball node_headers/include/node/zconf.h gyp verb extracted file from tarball node_headers/include/node/zlib.h gyp verb content checksum node-v6.0.8-headers.tar.gz 88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b gyp verb tarball done parsing tarball gyp verb on Windows; need to download `node.lib`... gyp verb ia32 node.lib dir C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8\ia32 gyp verb ia32 node.lib url https://atom.io/download/electron/v6.0.8/win-x86/node.lib gyp verb x64 node.lib dir C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8\x64 gyp verb x64 node.lib url https://atom.io/download/electron/v6.0.8/win-x64/node.lib gyp verb check download content checksum, need to download `SHASUMS256.txt`... gyp verb checksum url https://atom.io/download/electron/v6.0.8/SHASUMS256.txt gyp http GET https://atom.io/download/electron/v6.0.8/SHASUMS256.txt gyp verb streaming ia32 node.lib to: C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8\ia32\node.lib gyp http GET https://atom.io/download/electron/v6.0.8/win-x86/node.lib gyp verb streaming x64 node.lib to: C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8\x64\node.lib gyp http GET https://atom.io/download/electron/v6.0.8/win-x64/node.lib gyp http 200 https://atom.io/download/electron/v6.0.8/win-x64/node.lib gyp http 200 https://atom.io/download/electron/v6.0.8/SHASUMS256.txt gyp verb checksum data {&quot;node-v6.0.8.tar.gz&quot;:&quot;88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b&quot;,&quot;node-v6.0.8-headers.tar.gz&quot;:&quot;88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b&quot;,&quot;iojs-v6.0.8.tar.gz&quot;:&quot;88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b&quot;,&quot;iojs-v6.0.8-headers.tar.gz&quot;:&quot;88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b&quot;,&quot;node.lib&quot;:&quot;d89e722d388e9bd3a7233782149de343cfaefae4b341d634fc3d6232ed77adfa&quot;,&quot;x64/node.lib&quot;:&quot;d5a48e83d9c112a2db16ccf08406b381ea9e86f86b44a2d13712afd84842834d&quot;,&quot;win-x86/iojs.lib&quot;:&quot;d89e722d388e9bd3a7233782149de343cfaefae4b341d634fc3d6232ed77adfa&quot;,&quot;win-x64/iojs.lib&quot;:&quot;d5a48e83d9c112a2db16ccf08406b381ea9e86f86b44a2d13712afd84842834d&quot;,&quot;win-x86/node.lib&quot;:&quot;d89e722d388e9bd3a7233782149de343cfaefae4b341d634fc3d6232ed77adfa&quot;,&quot;win-x64/node.lib&quot;:&quot;d5a48e83d9c112a2db16ccf08406b381ea9e86f86b44a2d13712afd84842834d&quot;} gyp http 200 https://atom.io/download/electron/v6.0.8/win-x86/node.lib gyp verb content checksum win-x64/node.lib 43f611616154f667fe1101315834923cd06699bb7b4cb273bf780142ed6f0b44 gyp verb content checksum win-x86/node.lib d89e722d388e9bd3a7233782149de343cfaefae4b341d634fc3d6232ed77adfa gyp verb download contents checksum {&quot;node-v6.0.8-headers.tar.gz&quot;:&quot;88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b&quot;,&quot;win-x64/node.lib&quot;:&quot;43f611616154f667fe1101315834923cd06699bb7b4cb273bf780142ed6f0b44&quot;,&quot;win-x86/node.lib&quot;:&quot;d89e722d388e9bd3a7233782149de343cfaefae4b341d634fc3d6232ed77adfa&quot;} gyp verb validating download checksum for node-v6.0.8-headers.tar.gz (88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b == 88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b) gyp verb validating download checksum for win-x64/node.lib (43f611616154f667fe1101315834923cd06699bb7b4cb273bf780142ed6f0b44 == d5a48e83d9c112a2db16ccf08406b381ea9e86f86b44a2d13712afd84842834d) gyp WARN install got an error, rolling back install"><pre class="notranslate"><code class="notranslate">&gt; [email protected] install D:\dev\startup\git-interface-2\electron\node_modules\nodegit &gt; node lifecycleScripts/preinstall &amp;&amp; node lifecycleScripts/install [nodegit] Running pre-install script [nodegit] Running install script node-pre-gyp info it worked if it ends with ok node-pre-gyp verb cli [ node-pre-gyp verb cli 'C:\\Program Files\\nodejs\\node.exe', node-pre-gyp verb cli 'D:\\dev\\startup\\git-interface-2\\electron\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp', node-pre-gyp verb cli 'install', node-pre-gyp verb cli '--fallback-to-build' node-pre-gyp verb cli ] node-pre-gyp info using [email protected] node-pre-gyp info using [email protected] | win32 | x64 node-pre-gyp verb command install [] node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp info build requesting source compile node-pre-gyp verb command build [ 'rebuild' ] gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli 'C:\\Program Files\\nodejs\\node.exe', gyp verb cli 'C:\\Users\\mjerr\\AppData\\Roaming\\nvm\\v12.10.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js', gyp verb cli 'clean' gyp verb cli ] gyp info using [email protected] gyp info using [email protected] | win32 | x64 gyp verb command clean [] gyp verb clean removing "build" directory gyp info ok gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli 'C:\\Program Files\\nodejs\\node.exe', gyp verb cli 'C:\\Users\\mjerr\\AppData\\Roaming\\nvm\\v12.10.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js', gyp verb cli 'configure', gyp verb cli '--fallback-to-build', gyp verb cli '--module=D:\\dev\\startup\\git-interface-2\\electron\\node_modules\\nodegit\\build\\Release\\nodegit.node', gyp verb cli '--module_name=nodegit', gyp verb cli '--module_path=D:\\dev\\startup\\git-interface-2\\electron\\node_modules\\nodegit\\build\\Release', gyp verb cli '--napi_version=4', gyp verb cli '--node_abi_napi=napi', gyp verb cli '--napi_build_version=0', gyp verb cli '--node_napi_label=electron-v6.0', gyp verb cli '--python=C:\\Users\\mjerr\\.windows-build-tools\\python27\\python.exe' gyp verb cli ] gyp info using [email protected] gyp info using [email protected] | win32 | x64 gyp verb command configure [] gyp verb download using dist-url https://atom.io/download/electron gyp verb find Python checking Python explicitly set from command line or npm configuration gyp verb find Python - "--python=" or "npm config get python" is "C:\Users\mjerr\.windows-build-tools\python27\python.exe" gyp verb find Python - executing "C:\Users\mjerr\.windows-build-tools\python27\python.exe" to get executable path gyp verb find Python - executable path is "C:\Users\mjerr\.windows-build-tools\python27\python.exe" gyp verb find Python - executing "C:\Users\mjerr\.windows-build-tools\python27\python.exe" to get version gyp verb find Python - version is "2.7.15" gyp info find Python using Python version 2.7.15 found at "C:\Users\mjerr\.windows-build-tools\python27\python.exe" gyp verb get node dir compiling against --target node version: 6.0.8 gyp verb command install [ '6.0.8' ] gyp verb download using dist-url https://atom.io/download/electron gyp verb install input version string "6.0.8" gyp verb install installing version: 6.0.8 gyp verb install --ensure was passed, so won't reinstall if already installed gyp verb install version not already installed, continuing with install 6.0.8 gyp verb ensuring nodedir is created C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8 gyp verb created nodedir C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8 gyp http GET https://atom.io/download/electron/v6.0.8/node-v6.0.8-headers.tar.gz gyp http 200 https://atom.io/download/electron/v6.0.8/node-v6.0.8-headers.tar.gz gyp verb extracted file from tarball node_headers/include/node/common.gypi gyp verb extracted file from tarball node_headers/include/node/config.gypi gyp verb extracted file from tarball node_headers/include/node/js_native_api.h gyp verb extracted file from tarball node_headers/include/node/js_native_api_types.h gyp verb extracted file from tarball node_headers/include/node/libplatform/libplatform-export.h gyp verb extracted file from tarball node_headers/include/node/libplatform/libplatform.h gyp verb extracted file from tarball node_headers/include/node/libplatform/v8-tracing.h gyp verb extracted file from tarball node_headers/include/node/node.h gyp verb extracted file from tarball node_headers/include/node/node_api.h gyp verb extracted file from tarball node_headers/include/node/node_api_types.h gyp verb extracted file from tarball node_headers/include/node/node_buffer.h gyp verb extracted file from tarball node_headers/include/node/node_object_wrap.h gyp verb extracted file from tarball node_headers/include/node/node_version.h gyp verb extracted file from tarball node_headers/include/node/uv/aix.h gyp verb extracted file from tarball node_headers/include/node/uv/android-ifaddrs.h gyp verb extracted file from tarball node_headers/include/node/uv/bsd.h gyp verb extracted file from tarball node_headers/include/node/uv/darwin.h gyp verb extracted file from tarball node_headers/include/node/uv/errno.h gyp verb extracted file from tarball node_headers/include/node/uv/linux.h gyp verb extracted file from tarball node_headers/include/node/uv/os390.h gyp verb extracted file from tarball node_headers/include/node/uv/posix.h gyp verb extracted file from tarball node_headers/include/node/uv/stdint-msvc2008.h gyp verb extracted file from tarball node_headers/include/node/uv/sunos.h gyp verb extracted file from tarball node_headers/include/node/uv/threadpool.h gyp verb extracted file from tarball node_headers/include/node/uv/tree.h gyp verb extracted file from tarball node_headers/include/node/uv/unix.h gyp verb extracted file from tarball node_headers/include/node/uv/version.h gyp verb extracted file from tarball node_headers/include/node/uv/win.h gyp verb extracted file from tarball node_headers/include/node/uv.h gyp verb extracted file from tarball node_headers/include/node/v8-internal.h gyp verb extracted file from tarball node_headers/include/node/v8-platform.h gyp verb extracted file from tarball node_headers/include/node/v8-profiler.h gyp verb extracted file from tarball node_headers/include/node/v8-testing.h gyp verb extracted file from tarball node_headers/include/node/v8-util.h gyp verb extracted file from tarball node_headers/include/node/v8-value-serializer-version.h gyp verb extracted file from tarball node_headers/include/node/v8-version-string.h gyp verb extracted file from tarball node_headers/include/node/v8-version.h gyp verb extracted file from tarball node_headers/include/node/v8-wasm-trap-handler-posix.h gyp verb extracted file from tarball node_headers/include/node/v8-wasm-trap-handler-win.h gyp verb extracted file from tarball node_headers/include/node/v8.h gyp verb extracted file from tarball node_headers/include/node/v8config.h gyp verb extracted file from tarball node_headers/include/node/zconf.h gyp verb extracted file from tarball node_headers/include/node/zlib.h gyp verb content checksum node-v6.0.8-headers.tar.gz 88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b gyp verb tarball done parsing tarball gyp verb on Windows; need to download `node.lib`... gyp verb ia32 node.lib dir C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8\ia32 gyp verb ia32 node.lib url https://atom.io/download/electron/v6.0.8/win-x86/node.lib gyp verb x64 node.lib dir C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8\x64 gyp verb x64 node.lib url https://atom.io/download/electron/v6.0.8/win-x64/node.lib gyp verb check download content checksum, need to download `SHASUMS256.txt`... gyp verb checksum url https://atom.io/download/electron/v6.0.8/SHASUMS256.txt gyp http GET https://atom.io/download/electron/v6.0.8/SHASUMS256.txt gyp verb streaming ia32 node.lib to: C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8\ia32\node.lib gyp http GET https://atom.io/download/electron/v6.0.8/win-x86/node.lib gyp verb streaming x64 node.lib to: C:\Users\mjerr\AppData\Local\node-gyp\Cache\6.0.8\x64\node.lib gyp http GET https://atom.io/download/electron/v6.0.8/win-x64/node.lib gyp http 200 https://atom.io/download/electron/v6.0.8/win-x64/node.lib gyp http 200 https://atom.io/download/electron/v6.0.8/SHASUMS256.txt gyp verb checksum data {"node-v6.0.8.tar.gz":"88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b","node-v6.0.8-headers.tar.gz":"88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b","iojs-v6.0.8.tar.gz":"88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b","iojs-v6.0.8-headers.tar.gz":"88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b","node.lib":"d89e722d388e9bd3a7233782149de343cfaefae4b341d634fc3d6232ed77adfa","x64/node.lib":"d5a48e83d9c112a2db16ccf08406b381ea9e86f86b44a2d13712afd84842834d","win-x86/iojs.lib":"d89e722d388e9bd3a7233782149de343cfaefae4b341d634fc3d6232ed77adfa","win-x64/iojs.lib":"d5a48e83d9c112a2db16ccf08406b381ea9e86f86b44a2d13712afd84842834d","win-x86/node.lib":"d89e722d388e9bd3a7233782149de343cfaefae4b341d634fc3d6232ed77adfa","win-x64/node.lib":"d5a48e83d9c112a2db16ccf08406b381ea9e86f86b44a2d13712afd84842834d"} gyp http 200 https://atom.io/download/electron/v6.0.8/win-x86/node.lib gyp verb content checksum win-x64/node.lib 43f611616154f667fe1101315834923cd06699bb7b4cb273bf780142ed6f0b44 gyp verb content checksum win-x86/node.lib d89e722d388e9bd3a7233782149de343cfaefae4b341d634fc3d6232ed77adfa gyp verb download contents checksum {"node-v6.0.8-headers.tar.gz":"88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b","win-x64/node.lib":"43f611616154f667fe1101315834923cd06699bb7b4cb273bf780142ed6f0b44","win-x86/node.lib":"d89e722d388e9bd3a7233782149de343cfaefae4b341d634fc3d6232ed77adfa"} gyp verb validating download checksum for node-v6.0.8-headers.tar.gz (88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b == 88e97b101dab40d44f92a28c0c8d60ef23fd4ee34197f72df4c2d9bf5092835b) gyp verb validating download checksum for win-x64/node.lib (43f611616154f667fe1101315834923cd06699bb7b4cb273bf780142ed6f0b44 == d5a48e83d9c112a2db16ccf08406b381ea9e86f86b44a2d13712afd84842834d) gyp WARN install got an error, rolling back install </code></pre></div> <h3 dir="auto">To Reproduce</h3> <p dir="auto">I have created a minimum repo that reproduces the error:<br> <a href="https://github.com/MikeJerred/nodegit-test">https://github.com/MikeJerred/nodegit-test</a></p> <p dir="auto">I am using Windows 10 (1903), with node <code class="notranslate">v12.10.0</code>, npm <code class="notranslate">v6.10.3</code> and have the windows-build-tools npm package installed.</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ git clone https://github.com/MikeJerred/nodegit-test $ npm install"><pre class="notranslate">$ git clone https://github.com/MikeJerred/nodegit-test $ npm install</pre></div>
<ul dir="auto"> <li>Electron version: 1.2.0, 1.2.1, 1.2.2</li> <li>Operating system: Windows</li> </ul> <p dir="auto">If you start an browser window in fullscreen and then attempt to toggle to windowed mode, the window will just black out and become unresponsive. Attempting to toggle back again still results in a black screen.</p> <p dir="auto">However, if you start the window in windowed mode and then toggle to fullscreen, it works as expected.</p> <p dir="auto">This maybe related to the fixes made to the fullscreen API in 1.2.x. It only occurs on Windows. It does not happen on 1.1.3.</p> <p dir="auto">You can reproduce easily with the <code class="notranslate">electron-api-demos</code> application and 1.2.2.<br> <a href="https://github.com/electron/electron-api-demos">https://github.com/electron/electron-api-demos</a></p> <p dir="auto">Update <code class="notranslate">window-options</code> to set <code class="notranslate">fullscreen: true</code><br> <a href="https://github.com/electron/electron-api-demos/blob/master/main.js#L22">https://github.com/electron/electron-api-demos/blob/master/main.js#L22</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var windowOptions = { width: 1080, minWidth: 680, height: 840, title: app.getName(), fullscreen: true }"><pre class="notranslate"><code class="notranslate">var windowOptions = { width: 1080, minWidth: 680, height: 840, title: app.getName(), fullscreen: true } </code></pre></div> <p dir="auto">Start the application and hit F11 to switch to windowed mode and you'll get a black screen.</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">Error text:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" [1054/2736] Building CXX object caffe2\CMakeFiles\torch_cpu.dir\__\aten\src\ATen\ExpandUtils.cpp.obj FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/ExpandUtils.cpp.obj C:\w\1\s\windows\tmp_bin\sccache.exe cl /nologo /TP -DAT_PARALLEL_OPENMP=1 -DCPUINFO_SUPPORTED_PLATFORM=1 -DMAGMA_V2 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE=1 -D_OPENMP_NOFORCE_MANIFEST -Dtorch_cpu_EXPORTS -Iaten\src -I..\aten\src -I. -I..\ -I..\cmake\..\third_party\benchmark\include -Icaffe2\contrib\aten -I..\third_party\onnx -Ithird_party\onnx -I..\third_party\foxi -Ithird_party\foxi -I..\caffe2\..\torch\csrc\api -I..\caffe2\..\torch\csrc\api\include -I..\caffe2\aten\src\TH -Icaffe2\aten\src\TH -I..\caffe2\..\torch\..\aten\src -Icaffe2\aten\src -Icaffe2\..\aten\src -Icaffe2\..\aten\src\ATen -I..\caffe2\..\torch\csrc -I..\caffe2\..\torch\..\third_party\miniz-2.0.8 -I..\aten\src\TH -I..\aten\..\third_party\catch\single_include -I..\aten\src\ATen\.. -Icaffe2\aten\src\ATen -I..\third_party\miniz-2.0.8 -I..\caffe2\core\nomnigraph\include -I..\c10\.. -I..\third_party\cpuinfo\include -I..\third_party\FP16\include -I..\cmake\..\third_party\googletest\googlemock\include -I..\cmake\..\third_party\googletest\googletest\include -I..\third_party\protobuf\src -IC:\w\1\s\windows\mkl\include -I..\cmake\..\third_party\eigen -IC:\w\1\s\windows\conda\envs\py37\include -IC:\w\1\s\windows\conda\envs\py37\lib\site-packages\numpy\core\include -I..\cmake\..\third_party\pybind11\include -I\opt\rocm\hip\include -I\include -I..\cmake\..\third_party\cub -IC:\w\1\s\windows\magma_cuda101_release\include -I&quot;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include&quot; -I..\caffe2 /DWIN32 /D_WINDOWS /GR /w /EHa /MP /bigobj -openmp -DHAVE_AVX_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION /MD /O2 /Ob2 /w /EHa /MP /bigobj -DCUDA_HAS_FP16=1 -DUSE_GCC_GET_CPUID -DUSE_AVX -DUSE_AVX2 -DTH_HAVE_THREAD /Z7 /EHa /DNOMINMAX /wd4267 /wd4251 /wd4522 /wd4838 /wd4305 /wd4244 /wd4190 /wd4101 /wd4996 /wd4275 /bigobj -O2 -DCAFFE2_BUILD_MAIN_LIB -DONNX_BUILD_MAIN_LIB -std:c++14 /showIncludes /Focaffe2\CMakeFiles\torch_cpu.dir\__\aten\src\ATen\ExpandUtils.cpp.obj /Fdcaffe2\CMakeFiles\torch_cpu.dir\ /FS -c ..\aten\src\ATen\ExpandUtils.cpp C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(302): error C2061: syntax error: identifier 'IValue' C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(302): error C2238: unexpected token(s) preceding ';' C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(306): error C2988: unrecognizable template declaration/definition C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(306): error C2059: syntax error: 'return' C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(306): error C2653: 'Tag': is not a class or namespace name C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(306): error C2238: unexpected token(s) preceding ';' C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(307): error C2146: syntax error: missing ';' before identifier 'toGenericDict' C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(307): error C2270: 'toGenericDict': modifiers not allowed on nonmember functions C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): error C2653: 'Tag': is not a class or namespace name C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): error C2065: 'None': undeclared identifier C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): error C2614: 'c10::IValue': illegal member initialization: 'payload' is not a base or member C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): error C2614: 'c10::IValue': illegal member initialization: 'tag' is not a base or member C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): error C2614: 'c10::IValue': illegal member initialization: 'is_intrusive_ptr' is not a base or member C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): fatal error C1903: unable to recover from previous error(s); stopping compilation Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe. You will be prompted to send an error report to Microsoft later. INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe' Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information"><pre class="notranslate"><code class="notranslate"> [1054/2736] Building CXX object caffe2\CMakeFiles\torch_cpu.dir\__\aten\src\ATen\ExpandUtils.cpp.obj FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/ExpandUtils.cpp.obj C:\w\1\s\windows\tmp_bin\sccache.exe cl /nologo /TP -DAT_PARALLEL_OPENMP=1 -DCPUINFO_SUPPORTED_PLATFORM=1 -DMAGMA_V2 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTH_BLAS_MKL -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE=1 -D_OPENMP_NOFORCE_MANIFEST -Dtorch_cpu_EXPORTS -Iaten\src -I..\aten\src -I. -I..\ -I..\cmake\..\third_party\benchmark\include -Icaffe2\contrib\aten -I..\third_party\onnx -Ithird_party\onnx -I..\third_party\foxi -Ithird_party\foxi -I..\caffe2\..\torch\csrc\api -I..\caffe2\..\torch\csrc\api\include -I..\caffe2\aten\src\TH -Icaffe2\aten\src\TH -I..\caffe2\..\torch\..\aten\src -Icaffe2\aten\src -Icaffe2\..\aten\src -Icaffe2\..\aten\src\ATen -I..\caffe2\..\torch\csrc -I..\caffe2\..\torch\..\third_party\miniz-2.0.8 -I..\aten\src\TH -I..\aten\..\third_party\catch\single_include -I..\aten\src\ATen\.. -Icaffe2\aten\src\ATen -I..\third_party\miniz-2.0.8 -I..\caffe2\core\nomnigraph\include -I..\c10\.. -I..\third_party\cpuinfo\include -I..\third_party\FP16\include -I..\cmake\..\third_party\googletest\googlemock\include -I..\cmake\..\third_party\googletest\googletest\include -I..\third_party\protobuf\src -IC:\w\1\s\windows\mkl\include -I..\cmake\..\third_party\eigen -IC:\w\1\s\windows\conda\envs\py37\include -IC:\w\1\s\windows\conda\envs\py37\lib\site-packages\numpy\core\include -I..\cmake\..\third_party\pybind11\include -I\opt\rocm\hip\include -I\include -I..\cmake\..\third_party\cub -IC:\w\1\s\windows\magma_cuda101_release\include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I..\caffe2 /DWIN32 /D_WINDOWS /GR /w /EHa /MP /bigobj -openmp -DHAVE_AVX_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION /MD /O2 /Ob2 /w /EHa /MP /bigobj -DCUDA_HAS_FP16=1 -DUSE_GCC_GET_CPUID -DUSE_AVX -DUSE_AVX2 -DTH_HAVE_THREAD /Z7 /EHa /DNOMINMAX /wd4267 /wd4251 /wd4522 /wd4838 /wd4305 /wd4244 /wd4190 /wd4101 /wd4996 /wd4275 /bigobj -O2 -DCAFFE2_BUILD_MAIN_LIB -DONNX_BUILD_MAIN_LIB -std:c++14 /showIncludes /Focaffe2\CMakeFiles\torch_cpu.dir\__\aten\src\ATen\ExpandUtils.cpp.obj /Fdcaffe2\CMakeFiles\torch_cpu.dir\ /FS -c ..\aten\src\ATen\ExpandUtils.cpp C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(302): error C2061: syntax error: identifier 'IValue' C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(302): error C2238: unexpected token(s) preceding ';' C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(306): error C2988: unrecognizable template declaration/definition C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(306): error C2059: syntax error: 'return' C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(306): error C2653: 'Tag': is not a class or namespace name C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(306): error C2238: unexpected token(s) preceding ';' C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(307): error C2146: syntax error: missing ';' before identifier 'toGenericDict' C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(307): error C2270: 'toGenericDict': modifiers not allowed on nonmember functions C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): error C2653: 'Tag': is not a class or namespace name C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): error C2065: 'None': undeclared identifier C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): error C2614: 'c10::IValue': illegal member initialization: 'payload' is not a base or member C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): error C2614: 'c10::IValue': illegal member initialization: 'tag' is not a base or member C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): error C2614: 'c10::IValue': illegal member initialization: 'is_intrusive_ptr' is not a base or member C:\w\1\s\windows\pytorch\aten\src\ATen/core/ivalue.h(63): fatal error C1903: unable to recover from previous error(s); stopping compilation Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe. You will be prompted to send an error report to Microsoft later. INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe' Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information </code></pre></div> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior:</p> <ol dir="auto"> <li>python setup.py install</li> </ol> <h2 dir="auto">Expected behavior</h2> <h2 dir="auto">Environment</h2> <p dir="auto">Please copy and paste the output from our<br> <a href="https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py" rel="nofollow">environment collection script</a><br> (or fill out the checklist below manually).</p> <p dir="auto">You can get the script and run it with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py # For security purposes, please check the contents of collect_env.py before running it. python collect_env.py"><pre class="notranslate"><code class="notranslate">wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py # For security purposes, please check the contents of collect_env.py before running it. python collect_env.py </code></pre></div> <ul dir="auto"> <li>PyTorch Version (e.g., 1.0): <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/pytorch/pytorch/commit/3c8892aa0cd80e62f01b1ba3c99e4f5fd713868c/hovercard" href="https://github.com/pytorch/pytorch/commit/3c8892aa0cd80e62f01b1ba3c99e4f5fd713868c"><tt>3c8892a</tt></a></li> <li>OS (e.g., Linux): Windows</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): source</li> <li>Python version: 3.5/3.6/3.7</li> <li>CUDA/cuDNN version: Node / 9.2 / 10.1</li> <li>GPU models and configuration: None</li> <li>Any other relevant information:</li> </ul> <h2 dir="auto">Additional context</h2> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/peterjc123/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/peterjc123">@peterjc123</a></p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2> <p dir="auto">When trying to compile with VS2019 but targeting v141 toolchain and cuda 10.0 there seems to be some issues with rewrite of dispatching that was done in recent weeks.</p> <p dir="auto">This snippet was from building using facebook internal Buck, but I was able to reproduce same thing using cmake.</p> <p dir="auto">Compiling with /permissive- fixed the "no matching overload" error, but raises some other cuda errors related to <code class="notranslate">__nv_hdl_create_wrapper_t</code></p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior:</p> <ol dir="auto"> <li>checkout pytorch master</li> <li>pass v141 as toolchain to cmake when generating</li> <li>set cuda sdk root to 10.0</li> <li>try and build torch_cuda</li> </ol> <p dir="auto">Error without /permissive-</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): error C2672: 'c10::impl::boxAndCallBoxedFunc': no matching overloaded function found caffe2/aten/src\ATen/core/dispatch/Dispatcher.h(180): note: see reference to function template instantiation 'Return c10::KernelFunction::callUnboxed&lt;Return,const at::Tensor&amp;,const at::Tensor&amp;,bool,bool&gt;(const c10::OperatorHandle &amp;,const at::Tensor &amp;,const at::Tensor &amp;,bool,bool) const' being compiled with [ Return=void ] caffe2/aten/src\ATen/core/dispatch/Dispatcher.h(155): note: see reference to function template instantiation 'Return c10::Dispatcher::callUnboxed&lt;Return,const at::Tensor&amp;,const at::Tensor&amp;,bool,bool&gt;(const c10::OperatorHandle &amp;,const at::Tensor &amp;,const at::Tensor &amp;,bool,bool) const' being compiled with [ Return=void ] caffe2\ATen/core/TensorMethods.h(66): note: see reference to function template instantiation 'Return c10::OperatorHandle::callUnboxed&lt;void,const at::Tensor&amp;,const at::Tensor&amp;,bool,bool&gt;(const at::Tensor &amp;,const at::Tensor &amp;,bool,bool) const' being compiled with [ Return=void ] caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): error C2770: invalid explicit template argument(s) for 'Result c10::impl::boxAndCallBoxedFunc(c10::KernelFunction::InternalBoxedKernelFunction (__cdecl *),c10::OperatorKernel *,const c10::OperatorHandle &amp;,Args...,enable_if&lt;_Test,_Ty&gt;::type)' with [ _Ty=int ] caffe2/aten/src\ATen/core/boxing/boxing.h(53): note: see declaration of 'c10::impl::boxAndCallBoxedFunc' caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): error C2893: Failed to specialize function template 'Result c10::impl::boxAndCallBoxedFunc(c10::KernelFunction::InternalBoxedKernelFunction (__cdecl *),c10::OperatorKernel *,const c10::OperatorHandle &amp;,Args...,enable_if&lt;_Test,_Ty&gt;::type)' with [ _Ty=int ] caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): note: With the following template arguments: caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): note: 'Result=Return' caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): note: 'Args={}'"><pre class="notranslate"><code class="notranslate">caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): error C2672: 'c10::impl::boxAndCallBoxedFunc': no matching overloaded function found caffe2/aten/src\ATen/core/dispatch/Dispatcher.h(180): note: see reference to function template instantiation 'Return c10::KernelFunction::callUnboxed&lt;Return,const at::Tensor&amp;,const at::Tensor&amp;,bool,bool&gt;(const c10::OperatorHandle &amp;,const at::Tensor &amp;,const at::Tensor &amp;,bool,bool) const' being compiled with [ Return=void ] caffe2/aten/src\ATen/core/dispatch/Dispatcher.h(155): note: see reference to function template instantiation 'Return c10::Dispatcher::callUnboxed&lt;Return,const at::Tensor&amp;,const at::Tensor&amp;,bool,bool&gt;(const c10::OperatorHandle &amp;,const at::Tensor &amp;,const at::Tensor &amp;,bool,bool) const' being compiled with [ Return=void ] caffe2\ATen/core/TensorMethods.h(66): note: see reference to function template instantiation 'Return c10::OperatorHandle::callUnboxed&lt;void,const at::Tensor&amp;,const at::Tensor&amp;,bool,bool&gt;(const at::Tensor &amp;,const at::Tensor &amp;,bool,bool) const' being compiled with [ Return=void ] caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): error C2770: invalid explicit template argument(s) for 'Result c10::impl::boxAndCallBoxedFunc(c10::KernelFunction::InternalBoxedKernelFunction (__cdecl *),c10::OperatorKernel *,const c10::OperatorHandle &amp;,Args...,enable_if&lt;_Test,_Ty&gt;::type)' with [ _Ty=int ] caffe2/aten/src\ATen/core/boxing/boxing.h(53): note: see declaration of 'c10::impl::boxAndCallBoxedFunc' caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): error C2893: Failed to specialize function template 'Result c10::impl::boxAndCallBoxedFunc(c10::KernelFunction::InternalBoxedKernelFunction (__cdecl *),c10::OperatorKernel *,const c10::OperatorHandle &amp;,Args...,enable_if&lt;_Test,_Ty&gt;::type)' with [ _Ty=int ] caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): note: With the following template arguments: caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): note: 'Result=Return' caffe2\aten\src\aten\core\boxing\KernelFunction_impl.h(67): note: 'Args={}' </code></pre></div> <p dir="auto">Error with /permissive-</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="nvcc_internal_extended_lambda_implementation(542): error C3861: 'args': identifier not found caffe2/aten/src/ATen/native/cuda/Copy.cu(62): note: see reference to class template instantiation '__nv_hdl_create_wrapper_t&lt;false,true,__nv_dl_tag&lt;void (__cdecl *)(at::TensorIterator &amp;,bool),at::native::copy_device_to_device,1&gt;&gt;' being compiled"><pre class="notranslate"><code class="notranslate">nvcc_internal_extended_lambda_implementation(542): error C3861: 'args': identifier not found caffe2/aten/src/ATen/native/cuda/Copy.cu(62): note: see reference to class template instantiation '__nv_hdl_create_wrapper_t&lt;false,true,__nv_dl_tag&lt;void (__cdecl *)(at::TensorIterator &amp;,bool),at::native::copy_device_to_device,1&gt;&gt;' being compiled </code></pre></div> <h2 dir="auto">Expected behavior</h2> <p dir="auto">files compile</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">@zou3519</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yf225/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yf225">@yf225</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/peterjc123/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/peterjc123">@peterjc123</a></p>
1
<p dir="auto">Form minimalism</p>
<p dir="auto">I would love to see an option to hide the tray icon.</p>
1
<p dir="auto">When you create an index it would be good to be able to specify a date that it could be auto-deleted on. Either a fixed, hard coded date or a parameter in how many days before deleting. We are using ELK for monitoring of a lot of production actiivity and the indices can get very big. Auto-deletion is a very attractive possible feature.</p>
<p dir="auto">Allow setting ttl to index, so the whole index gets deleted when expired</p>
1
<h2 dir="auto">Problem Description</h2> <p dir="auto">Dropdown component causing dom change error in hot reload. When the basic Dropdown is rendered we get the following hot reloading error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Uncaught Invariant Violation: findComponentRoot(..., .0.1.1.1.2.1.$1/=11.0.2.1.0.$2016-03-07T13=208=201-05=2001.1:$37.3.0.1.0): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a &lt;tbody&gt; when using tables, nesting tags like &lt;form&gt;, &lt;p&gt;, or &lt;a&gt;, or using non-SVG elements in an &lt;svg&gt; parent. Try inspecting the child nodes of the element with React ID ``."><pre class="notranslate"><code class="notranslate">Uncaught Invariant Violation: findComponentRoot(..., .0.1.1.1.2.1.$1/=11.0.2.1.0.$2016-03-07T13=208=201-05=2001.1:$37.3.0.1.0): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a &lt;tbody&gt; when using tables, nesting tags like &lt;form&gt;, &lt;p&gt;, or &lt;a&gt;, or using non-SVG elements in an &lt;svg&gt; parent. Try inspecting the child nodes of the element with React ID ``. </code></pre></div> <p dir="auto">This is usually a result of bad formed HTML. We checked all components and only the Dropdown is causing this problem.</p> <h2 dir="auto">Versions</h2> <ul dir="auto"> <li>Material-UI: 15 alpha 1</li> <li>React: 14.7</li> <li>Browser: Chrome / Firefox</li> <li>Webpack: 1.12.12</li> <li>Webpack dev server 1.14.1</li> <li>react-hot-loader: 1.3.0</li> </ul>
<p dir="auto">I have a universal app with HMR in development. I noticed something very strange when using an <code class="notranslate">&lt;IconMenu /&gt;</code>.</p> <p dir="auto">My code:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;IconMenu iconButtonElement={ &lt;IconButton&gt;&lt;MoreVertIcon color=&quot;#fff&quot; /&gt;&lt;/IconButton&gt; } targetOrigin={ { horizontal: 'right', vertical: 'top' } } anchorOrigin={ { horizontal: 'right', vertical: 'top' } } &gt; &lt;MenuItem primaryText=&quot;Logout&quot; onClick={ () =&gt; actions.logout() } /&gt; &lt;/IconMenu&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-ent">IconMenu</span> <span class="pl-c1">iconButtonElement</span><span class="pl-c1">=</span><span class="pl-kos">{</span> <span class="pl-c1">&lt;</span><span class="pl-ent">IconButton</span><span class="pl-c1">&gt;</span><span class="pl-c1">&lt;</span><span class="pl-ent">MoreVertIcon</span> <span class="pl-c1">color</span><span class="pl-c1">=</span><span class="pl-s">"#fff"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">IconButton</span><span class="pl-c1">&gt;</span> <span class="pl-kos">}</span> <span class="pl-c1">targetOrigin</span><span class="pl-c1">=</span><span class="pl-kos">{</span> <span class="pl-kos">{</span> <span class="pl-c1">horizontal</span>: <span class="pl-s">'right'</span><span class="pl-kos">,</span> <span class="pl-c1">vertical</span>: <span class="pl-s">'top'</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-c1">anchorOrigin</span><span class="pl-c1">=</span><span class="pl-kos">{</span> <span class="pl-kos">{</span> <span class="pl-c1">horizontal</span>: <span class="pl-s">'right'</span><span class="pl-kos">,</span> <span class="pl-c1">vertical</span>: <span class="pl-s">'top'</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">MenuItem</span> <span class="pl-c1">primaryText</span><span class="pl-c1">=</span><span class="pl-s">"Logout"</span> <span class="pl-c1">onClick</span><span class="pl-c1">=</span><span class="pl-kos">{</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">actions</span><span class="pl-kos">.</span><span class="pl-en">logout</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">IconMenu</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">The rendered HTML:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6344219/13511151/942dd924-e159-11e5-8a55-b5596f97c5bf.png"><img src="https://cloud.githubusercontent.com/assets/6344219/13511151/942dd924-e159-11e5-8a55-b5596f97c5bf.png" alt="screen shot 2016-03-03 at 4 01 52 pm" style="max-width: 100%;"></a></p> <p dir="auto">If you look at the highlighted part, there is an extra, unclosed <code class="notranslate">&lt;noscript&gt;</code> in there. I believe this is what's causing issues.</p> <p dir="auto"><strong>Edit:</strong><br> Looks like it's coming from the <code class="notranslate">react-event-listener</code> library: <a href="https://github.com/callemall/material-ui/blob/master/src/popover/popover.jsx#L384">https://github.com/callemall/material-ui/blob/master/src/popover/popover.jsx#L384</a></p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/oliviertassinari/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/oliviertassinari">@oliviertassinari</a></p> <h2 dir="auto">Versions</h2> <p dir="auto">Material UI Version: 0.15.0-alpha.1<br> React: 0.14.7<br> Browser: Chrome</p>
1
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/d3v1an7/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/d3v1an7">@d3v1an7</a> on July 21, 2016 8:38</em></p> <h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report [or]</li> <li>Documentation Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">osx_defaults</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0 (devel 372018dfce) last updated 2016/07/21 18:27:38 (GMT +1100) lib/ansible/modules/core: (detached HEAD 7de287237f) last updated 2016/07/21 18:27:59 (GMT +1100) lib/ansible/modules/extras: (detached HEAD 68ca157f3b) last updated 2016/07/21 18:28:05 (GMT +1100) config file = configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.0 (devel 372018dfce) last updated 2016/07/21 18:27:38 (GMT +1100) lib/ansible/modules/core: (detached HEAD 7de287237f) last updated 2016/07/21 18:27:59 (GMT +1100) lib/ansible/modules/extras: (detached HEAD 68ca157f3b) last updated 2016/07/21 18:28:05 (GMT +1100) config file = configured module search path = Default w/o overrides </code></pre></div> <p dir="auto">Also had issue on 2.1.</p> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">Playbook level ansible.cfg</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="retry_files_enabled = False"><pre class="notranslate"><code class="notranslate">retry_files_enabled = False </code></pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">10.11.5</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">When attempting to interface with an array, I get the error: <code class="notranslate">Invalid value. Expected value to be an array</code>.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">Copy code from docs: <a href="http://docs.ansible.com/ansible/osx_defaults_module.html" rel="nofollow">http://docs.ansible.com/ansible/osx_defaults_module.html</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- osx_defaults: key: AppleLanguages type: array value: [&quot;en&quot;, &quot;nl&quot;]"><pre class="notranslate"><code class="notranslate">- osx_defaults: key: AppleLanguages type: array value: ["en", "nl"] </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">A green ok :)</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [system/install : osx_defaults] ******************************************* fatal: [localhost]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;msg&quot;: &quot;Invalid value. Expected value to be an array&quot;}"><pre class="notranslate"><code class="notranslate">TASK [system/install : osx_defaults] ******************************************* fatal: [localhost]: FAILED! =&gt; {"changed": false, "failed": true, "msg": "Invalid value. Expected value to be an array"} </code></pre></div> <p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="166766074" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-extras/issues/2610" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-extras/issues/2610/hovercard" href="https://github.com/ansible/ansible-modules-extras/issues/2610">ansible/ansible-modules-extras#2610</a></em></p>
<h5 dir="auto">ISSUE TYPE</h5> <p dir="auto">bug report</p> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">service module</p> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">ansible 1.9.4</p> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">retry_files_enabled = False</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Running from Mac OS X 10.10.5 python 2.7.10<br> to FreeBSD 10.1-RELEASE-p16 0 Tue Jul 28 120419 UTC 2015<br> with PostgreSQL 9.4.5</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Attempting to use the 'service' module to control PostgreSQL hangs every time. I strongly suspect that this is the same issue as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="27221082" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/5923" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/5923/hovercard" href="https://github.com/ansible/ansible/issues/5923">#5923</a></p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1) Install postgres94-client and postgres94-server packages on FreeBSD 10.1 2) set up inventory so that the dbserver is in group fll2-dev-dbservers in inventory file development.ini [fll2-dev-dbservers] fll2gdbs01dev 3) ansible -vvvv -i development.ini fll2-dev-dbservers -m service -a &quot;name=postgresql state=stopped&quot;"><pre class="notranslate"><code class="notranslate">1) Install postgres94-client and postgres94-server packages on FreeBSD 10.1 2) set up inventory so that the dbserver is in group fll2-dev-dbservers in inventory file development.ini [fll2-dev-dbservers] fll2gdbs01dev 3) ansible -vvvv -i development.ini fll2-dev-dbservers -m service -a "name=postgresql state=stopped" </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">pg_ctl is called to stop the server, returns when finished, ansible reports success/failure and server state</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;fll2gdbs01dev&gt; ESTABLISH CONNECTION FOR USER: rmartin &lt;fll2gdbs01dev&gt; REMOTE_MODULE service name=postgresql state=restarted &lt;fll2gdbs01dev&gt; EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=&quot;/Users/rmartin/.ansible/cp/ansible-ssh-%h-%p-%r&quot; -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 fll2gdbs01dev /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931' &lt;fll2gdbs01dev&gt; PUT /var/folders/j_/gh1x7cn138b04zb7w6q41ffw59y07m/T/tmpHfd5G9 TO /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/service &lt;fll2gdbs01dev&gt; EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=&quot;/Users/rmartin/.ansible/cp/ansible-ssh-%h-%p-%r&quot; -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 fll2gdbs01dev /bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python2.7 /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/service; rm -rf /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/ &gt;/dev/null 2&gt;&amp;1'"><pre class="notranslate"><code class="notranslate">&lt;fll2gdbs01dev&gt; ESTABLISH CONNECTION FOR USER: rmartin &lt;fll2gdbs01dev&gt; REMOTE_MODULE service name=postgresql state=restarted &lt;fll2gdbs01dev&gt; EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/rmartin/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 fll2gdbs01dev /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931' &lt;fll2gdbs01dev&gt; PUT /var/folders/j_/gh1x7cn138b04zb7w6q41ffw59y07m/T/tmpHfd5G9 TO /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/service &lt;fll2gdbs01dev&gt; EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/rmartin/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 fll2gdbs01dev /bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python2.7 /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/service; rm -rf /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/ &gt;/dev/null 2&gt;&amp;1' </code></pre></div> <p dir="auto">ps auxww excerpt on the server during the hang:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rmartin 1258 0.0 0.1 17068 2484 0 Is+ 3:14PM 0:00.01 /bin/sh -c LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python2.7 /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/service; rm -rf /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/ &gt;/dev/null 2&gt;&amp;1 rmartin 1259 0.0 0.3 81724 13236 0 S+ 3:14PM 0:00.16 /usr/local/bin/python2.7 /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/service rmartin 1261 0.0 0.1 17068 2852 0 I+ 3:14PM 0:00.03 /bin/sh /usr/local/etc/rc.d/postgresql onestatus root 1268 0.0 0.1 49768 2652 0 I&lt;+ 3:14PM 0:00.00 su -l pgsql -c exec /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l /dev/null -w -s -m fast status"><pre class="notranslate"><code class="notranslate">rmartin 1258 0.0 0.1 17068 2484 0 Is+ 3:14PM 0:00.01 /bin/sh -c LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python2.7 /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/service; rm -rf /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/ &gt;/dev/null 2&gt;&amp;1 rmartin 1259 0.0 0.3 81724 13236 0 S+ 3:14PM 0:00.16 /usr/local/bin/python2.7 /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/service rmartin 1261 0.0 0.1 17068 2852 0 I+ 3:14PM 0:00.03 /bin/sh /usr/local/etc/rc.d/postgresql onestatus root 1268 0.0 0.1 49768 2652 0 I&lt;+ 3:14PM 0:00.00 su -l pgsql -c exec /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l /dev/null -w -s -m fast status </code></pre></div> <p dir="auto">I have tried both with and without the fix suggested in the old ticket <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="27221082" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/5923" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/5923/hovercard" href="https://github.com/ansible/ansible/issues/5923">#5923</a>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="postgresql_flags=&quot;-l /dev/null -w -s -m fast&quot;"><pre class="notranslate"><code class="notranslate">postgresql_flags="-l /dev/null -w -s -m fast" </code></pre></div> <p dir="auto">It has not made a difference.</p> <p dir="auto">Note that copying the ansible command</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python2.7 /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/service; rm -rf /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/ &gt;/dev/null 2&gt;&amp;1"><pre class="notranslate"><code class="notranslate">LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python2.7 /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/service; rm -rf /home/rmartin/.ansible/tmp/ansible-tmp-1447359262.53-79308781944931/ &gt;/dev/null 2&gt;&amp;1 </code></pre></div> <p dir="auto">from the hung SSH command above, and pasting it into a bash prompt running on that server over interactive SSH works fine.</p> <p dir="auto">Any ideas why this is misbehaving, or how to work around it?</p> <p dir="auto">Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="116632370" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/2459" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/2459/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/2459">ansible/ansible-modules-core#2459</a></p>
0
<p dir="auto">I wonder if that can be achieved. I tried to to use cpu profiler using "net/http/pprof", but without binary it didn't manage to get anything useful for top or list commands. Unpacked apk and used .so as binary but it also didn't help.</p> <p dir="auto">Host OS - Windows 8.1.<br> Mobile OS - Android 4.4.</p> <p dir="auto">Can be anything done about it? Or I am doing something severely wrong?</p>
<p dir="auto">I haven't tested this, but I suspect it is true: if you build a Go library using -buildmode=c-archive or c-shared, and call the Go library from a C program, and the Go library tries to use runtime/pprof.StartCPUProfile, I expect it won't work. The problem is that Go will not have installed the SIGPROF signal handler.</p>
1
<h3 dir="auto">First Check</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I added a very descriptive title to this issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already read and followed all the tutorial in the docs and didn't find an answer.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/samuelcolvin/pydantic">Pydantic</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/swagger-api/swagger-ui">Swagger UI</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/Redocly/redoc">ReDoc</a>.</li> </ul> <h3 dir="auto">Commit to Help</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I commit to help with one of those options <g-emoji class="g-emoji" alias="point_up_2" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f446.png">👆</g-emoji></li> </ul> <h3 dir="auto">Example Code</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import typing import fastapi import httpx import pydantic as pydantic import pytest from fastapi import FastAPI from fastapi.encoders import jsonable_encoder from pydantic import ValidationError from starlette import status from starlette.responses import JSONResponse class ResponseOne(pydantic.BaseModel): val: str class ResponseTwo(pydantic.BaseModel): val: str app = FastAPI() incorrect_response = {&quot;abc&quot;: &quot;def&quot;} @app.exception_handler(ValidationError) async def validation_exception_handler(request: fastapi.Request, exc: ValidationError): return JSONResponse( status_code=status.HTTP_400_BAD_REQUEST, content=jsonable_encoder({&quot;detail&quot;: exc.errors()}), ) @app.get(&quot;/union&quot;, response_model=typing.Union[ResponseOne, ResponseTwo]) async def union(): return incorrect_response @app.get(&quot;/single&quot;, response_model=ResponseOne) async def single(): return incorrect_response @pytest.fixture async def client(): async with httpx.AsyncClient(app=app, base_url=&quot;http://localhost&quot;) as client: yield client async def test_unprintable(client): res = await client.get(&quot;/union&quot;) assert res.status_code == 400 async def test_400(client): res = await client.get(&quot;/single&quot;) assert res.status_code == 400"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-s1">httpx</span> <span class="pl-k">import</span> <span class="pl-s1">pydantic</span> <span class="pl-k">as</span> <span class="pl-s1">pydantic</span> <span class="pl-k">import</span> <span class="pl-s1">pytest</span> <span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">FastAPI</span> <span class="pl-k">from</span> <span class="pl-s1">fastapi</span>.<span class="pl-s1">encoders</span> <span class="pl-k">import</span> <span class="pl-s1">jsonable_encoder</span> <span class="pl-k">from</span> <span class="pl-s1">pydantic</span> <span class="pl-k">import</span> <span class="pl-v">ValidationError</span> <span class="pl-k">from</span> <span class="pl-s1">starlette</span> <span class="pl-k">import</span> <span class="pl-s1">status</span> <span class="pl-k">from</span> <span class="pl-s1">starlette</span>.<span class="pl-s1">responses</span> <span class="pl-k">import</span> <span class="pl-v">JSONResponse</span> <span class="pl-k">class</span> <span class="pl-v">ResponseOne</span>(<span class="pl-s1">pydantic</span>.<span class="pl-v">BaseModel</span>): <span class="pl-s1">val</span>: <span class="pl-s1">str</span> <span class="pl-k">class</span> <span class="pl-v">ResponseTwo</span>(<span class="pl-s1">pydantic</span>.<span class="pl-v">BaseModel</span>): <span class="pl-s1">val</span>: <span class="pl-s1">str</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>() <span class="pl-s1">incorrect_response</span> <span class="pl-c1">=</span> {<span class="pl-s">"abc"</span>: <span class="pl-s">"def"</span>} <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">exception_handler</span>(<span class="pl-v">ValidationError</span>)</span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">validation_exception_handler</span>(<span class="pl-s1">request</span>: <span class="pl-s1">fastapi</span>.<span class="pl-v">Request</span>, <span class="pl-s1">exc</span>: <span class="pl-v">ValidationError</span>): <span class="pl-k">return</span> <span class="pl-v">JSONResponse</span>( <span class="pl-s1">status_code</span><span class="pl-c1">=</span><span class="pl-s1">status</span>.<span class="pl-v">HTTP_400_BAD_REQUEST</span>, <span class="pl-s1">content</span><span class="pl-c1">=</span><span class="pl-en">jsonable_encoder</span>({<span class="pl-s">"detail"</span>: <span class="pl-s1">exc</span>.<span class="pl-en">errors</span>()}), ) <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">"/union"</span>, <span class="pl-s1">response_model</span><span class="pl-c1">=</span><span class="pl-s1">typing</span>.<span class="pl-v">Union</span>[<span class="pl-v">ResponseOne</span>, <span class="pl-v">ResponseTwo</span>])</span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">union</span>(): <span class="pl-k">return</span> <span class="pl-s1">incorrect_response</span> <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">"/single"</span>, <span class="pl-s1">response_model</span><span class="pl-c1">=</span><span class="pl-v">ResponseOne</span>)</span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">single</span>(): <span class="pl-k">return</span> <span class="pl-s1">incorrect_response</span> <span class="pl-en">@<span class="pl-s1">pytest</span>.<span class="pl-s1">fixture</span></span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">client</span>(): <span class="pl-k">async</span> <span class="pl-k">with</span> <span class="pl-s1">httpx</span>.<span class="pl-v">AsyncClient</span>(<span class="pl-s1">app</span><span class="pl-c1">=</span><span class="pl-s1">app</span>, <span class="pl-s1">base_url</span><span class="pl-c1">=</span><span class="pl-s">"http://localhost"</span>) <span class="pl-k">as</span> <span class="pl-s1">client</span>: <span class="pl-k">yield</span> <span class="pl-s1">client</span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">test_unprintable</span>(<span class="pl-s1">client</span>): <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">client</span>.<span class="pl-en">get</span>(<span class="pl-s">"/union"</span>) <span class="pl-k">assert</span> <span class="pl-s1">res</span>.<span class="pl-s1">status_code</span> <span class="pl-c1">==</span> <span class="pl-c1">400</span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">test_400</span>(<span class="pl-s1">client</span>): <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">client</span>.<span class="pl-en">get</span>(<span class="pl-s">"/single"</span>) <span class="pl-k">assert</span> <span class="pl-s1">res</span>.<span class="pl-s1">status_code</span> <span class="pl-c1">==</span> <span class="pl-c1">400</span></pre></div> <h3 dir="auto">Description</h3> <p dir="auto">When <code class="notranslate">response_model</code> is set to a union of two possible models and I return something that does not match one of the two models, FastAPI returns a 500 error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_.py:30: in validation_exception_handler content=jsonable_encoder({&quot;detail&quot;: exc.errors()}), ../../../../../Library/Caches/pypoetry/virtualenvs/bla/lib/python3.9/site-packages/pydantic/error_wrappers.py:63: in errors config = self.model.__pydantic_model__.__config__ # type: ignore _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = typing.Union[tests.test_.ResponseOne, tests.test_.ResponseTwo] attr = '__pydantic_model__' def __getattr__(self, attr): # We are careful for copy and pickle. # Also for simplicity we just don't relay all dunder names if '__origin__' in self.__dict__ and not _is_dunder(attr): return getattr(self.__origin__, attr) &gt; raise AttributeError(attr) E AttributeError: __pydantic_model__ ../../../../../.pyenv/versions/3.9.9/lib/python3.9/typing.py:710: AttributeError"><pre class="notranslate"><code class="notranslate">test_.py:30: in validation_exception_handler content=jsonable_encoder({"detail": exc.errors()}), ../../../../../Library/Caches/pypoetry/virtualenvs/bla/lib/python3.9/site-packages/pydantic/error_wrappers.py:63: in errors config = self.model.__pydantic_model__.__config__ # type: ignore _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = typing.Union[tests.test_.ResponseOne, tests.test_.ResponseTwo] attr = '__pydantic_model__' def __getattr__(self, attr): # We are careful for copy and pickle. # Also for simplicity we just don't relay all dunder names if '__origin__' in self.__dict__ and not _is_dunder(attr): return getattr(self.__origin__, attr) &gt; raise AttributeError(attr) E AttributeError: __pydantic_model__ ../../../../../.pyenv/versions/3.9.9/lib/python3.9/typing.py:710: AttributeError </code></pre></div> <h3 dir="auto">Operating System</h3> <p dir="auto">macOS</p> <h3 dir="auto">Operating System Details</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">FastAPI Version</h3> <p dir="auto">0.81.0</p> <h3 dir="auto">Python Version</h3> <p dir="auto">3.9.9</p> <h3 dir="auto">Additional Context</h3> <p dir="auto">It also does not work in FastAPI 0.7* and the pydantic version (1.9 vs 1.0) has no influence, either.</p>
<h3 dir="auto">First Check</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I added a very descriptive title to this issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already read and followed all the tutorial in the docs and didn't find an answer.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/samuelcolvin/pydantic">Pydantic</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/swagger-api/swagger-ui">Swagger UI</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/Redocly/redoc">ReDoc</a>.</li> </ul> <h3 dir="auto">Commit to Help</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I commit to help with one of those options <g-emoji class="g-emoji" alias="point_up_2" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f446.png">👆</g-emoji></li> </ul> <h3 dir="auto">Example Code</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import uvicorn from typing import Union from fastapi import FastAPI, Request from fastapi.responses import JSONResponse from pydantic import BaseModel app = FastAPI() class BaseItem(BaseModel): name: str type: str class MyItem(BaseModel): foo: str num_foo: int bar: str num_bar: int items = [ {&quot;name&quot;: &quot;kitty&quot;, &quot;type&quot;: &quot;cat&quot;}, { &quot;foo&quot;: &quot;foo&quot;, &quot;num_foo&quot;: &quot;???&quot;, # &lt;-- Validation will FAIL ! &quot;bar&quot;: &quot;bar&quot;, &quot;num_bar&quot;:&quot;???&quot; # &lt;-- Validation will FAIL ! } ] @app.middleware('http') async def exception_handler(request: Request, call_next): try: response = await call_next(request) except ValueError as ve: print(ve.raw_errors) errors = ve.errors() # &lt;-- This raises AttributeError: __pydantic_model__ # on 'http://localhost:8000/items_union_model/1' return JSONResponse(content=errors) return response @app.get(&quot;/items_single_model/{item_id}&quot;, response_model=MyItem) async def read_item_single_model(item_id: int): return items[item_id] @app.get(&quot;/items_union_model/{item_id}&quot;, response_model=Union[BaseItem, MyItem]) # &lt;-- Union type async def read_item_union_model(item_id: int): return items[item_id] if __name__ == '__main__': uvicorn.run(app, host='0.0.0.0')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">uvicorn</span> <span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">Union</span> <span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">FastAPI</span>, <span class="pl-v">Request</span> <span class="pl-k">from</span> <span class="pl-s1">fastapi</span>.<span class="pl-s1">responses</span> <span class="pl-k">import</span> <span class="pl-v">JSONResponse</span> <span class="pl-k">from</span> <span class="pl-s1">pydantic</span> <span class="pl-k">import</span> <span class="pl-v">BaseModel</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>() <span class="pl-k">class</span> <span class="pl-v">BaseItem</span>(<span class="pl-v">BaseModel</span>): <span class="pl-s1">name</span>: <span class="pl-s1">str</span> <span class="pl-s1">type</span>: <span class="pl-s1">str</span> <span class="pl-k">class</span> <span class="pl-v">MyItem</span>(<span class="pl-v">BaseModel</span>): <span class="pl-s1">foo</span>: <span class="pl-s1">str</span> <span class="pl-s1">num_foo</span>: <span class="pl-s1">int</span> <span class="pl-s1">bar</span>: <span class="pl-s1">str</span> <span class="pl-s1">num_bar</span>: <span class="pl-s1">int</span> <span class="pl-s1">items</span> <span class="pl-c1">=</span> [ {<span class="pl-s">"name"</span>: <span class="pl-s">"kitty"</span>, <span class="pl-s">"type"</span>: <span class="pl-s">"cat"</span>}, { <span class="pl-s">"foo"</span>: <span class="pl-s">"foo"</span>, <span class="pl-s">"num_foo"</span>: <span class="pl-s">"???"</span>, <span class="pl-c"># &lt;-- Validation will FAIL !</span> <span class="pl-s">"bar"</span>: <span class="pl-s">"bar"</span>, <span class="pl-s">"num_bar"</span>:<span class="pl-s">"???"</span> <span class="pl-c"># &lt;-- Validation will FAIL !</span> } ] <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">middleware</span>(<span class="pl-s">'http'</span>)</span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">exception_handler</span>(<span class="pl-s1">request</span>: <span class="pl-v">Request</span>, <span class="pl-s1">call_next</span>): <span class="pl-k">try</span>: <span class="pl-s1">response</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">call_next</span>(<span class="pl-s1">request</span>) <span class="pl-k">except</span> <span class="pl-v">ValueError</span> <span class="pl-k">as</span> <span class="pl-s1">ve</span>: <span class="pl-en">print</span>(<span class="pl-s1">ve</span>.<span class="pl-s1">raw_errors</span>) <span class="pl-s1">errors</span> <span class="pl-c1">=</span> <span class="pl-s1">ve</span>.<span class="pl-en">errors</span>() <span class="pl-c"># &lt;-- This raises AttributeError: __pydantic_model__ </span> <span class="pl-c"># on 'http://localhost:8000/items_union_model/1'</span> <span class="pl-k">return</span> <span class="pl-v">JSONResponse</span>(<span class="pl-s1">content</span><span class="pl-c1">=</span><span class="pl-s1">errors</span>) <span class="pl-k">return</span> <span class="pl-s1">response</span> <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">"/items_single_model/{item_id}"</span>, <span class="pl-s1">response_model</span><span class="pl-c1">=</span><span class="pl-v">MyItem</span>)</span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">read_item_single_model</span>(<span class="pl-s1">item_id</span>: <span class="pl-s1">int</span>): <span class="pl-k">return</span> <span class="pl-s1">items</span>[<span class="pl-s1">item_id</span>] <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">"/items_union_model/{item_id}"</span>, <span class="pl-s1">response_model</span><span class="pl-c1">=</span><span class="pl-v">Union</span>[<span class="pl-v">BaseItem</span>, <span class="pl-v">MyItem</span>]) <span class="pl-c"># &lt;-- Union type</span></span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">read_item_union_model</span>(<span class="pl-s1">item_id</span>: <span class="pl-s1">int</span>): <span class="pl-k">return</span> <span class="pl-s1">items</span>[<span class="pl-s1">item_id</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">uvicorn</span>.<span class="pl-en">run</span>(<span class="pl-s1">app</span>, <span class="pl-s1">host</span><span class="pl-c1">=</span><span class="pl-s">'0.0.0.0'</span>)</pre></div> <h3 dir="auto">Description</h3> <h2 dir="auto">Summary</h2> <ul dir="auto"> <li>When data validation using response_model fails due to wrong data, I want to return back the error list to the requester. <ul dir="auto"> <li>I added <code class="notranslate">exception_handler</code> middleware to achieve this.</li> </ul> </li> <li>This works perfectly when the response_model is a single class (derived from BaseModel of Pydantic) <ul dir="auto"> <li>You can open <a href="http://localhost:8000/items_single_model/1" rel="nofollow">http://localhost:8000/items_single_model/1</a> from the browser.</li> </ul> </li> <li>But when the response_model is <code class="notranslate">Union</code> type which is said to be supported by <a href="https://fastapi.tiangolo.com/tutorial/extra-models/?h=union#union-or-anyof" rel="nofollow">this example</a> <ul dir="auto"> <li><code class="notranslate">AttributeError: __pydantic_model__</code> occurs when I call <code class="notranslate">ValidationError.errors()</code> method to get error information</li> <li>You can open <a href="http://localhost:8000/items_union_model/1" rel="nofollow">http://localhost:8000/items_union_model/1</a> and see the server log.</li> </ul> </li> <li>This could ultimately be a problem of Pydantic but the way passing the error data to Pydantic might be a problem</li> </ul> <p dir="auto">Is this expected behavior ? If so, How can I exact list or dict type of error data in this situation ?</p> <h2 dir="auto">Traceback</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py&quot;, line 398, in run_asgi result = await app(self.scope, self.receive, self.send) File &quot;/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py&quot;, line 45, in __call__ return await self.app(scope, receive, send) File &quot;/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/fastapi/applications.py&quot;, line 208, in __call__ await super().__call__(scope, receive, send) File &quot;/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/starlette/applications.py&quot;, line 112, in __call__ await self.middleware_stack(scope, receive, send) File &quot;/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/starlette/middleware/errors.py&quot;, line 181, in __call__ raise exc from None File &quot;/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/starlette/middleware/errors.py&quot;, line 159, in __call__ await self.app(scope, receive, _send) File &quot;/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/starlette/middleware/base.py&quot;, line 25, in __call__ response = await self.dispatch_func(request, self.call_next) File &quot;./main.py&quot;, line 40, in exception_handler errors = ve.errors() # &lt;-- This raises AttributeError: __pydantic_model__ File &quot;pydantic/error_wrappers.py&quot;, line 52, in pydantic.error_wrappers.ValidationError.errors File &quot;/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/typing.py&quot;, line 760, in __getattr__ raise AttributeError(attr) AttributeError: __pydantic_model__"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 398, in run_asgi result = await app(self.scope, self.receive, self.send) File "/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__ return await self.app(scope, receive, send) File "/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/fastapi/applications.py", line 208, in __call__ await super().__call__(scope, receive, send) File "/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/starlette/applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__ raise exc from None File "/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__ await self.app(scope, receive, _send) File "/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in __call__ response = await self.dispatch_func(request, self.call_next) File "./main.py", line 40, in exception_handler errors = ve.errors() # &lt;-- This raises AttributeError: __pydantic_model__ File "pydantic/error_wrappers.py", line 52, in pydantic.error_wrappers.ValidationError.errors File "/home/jamie/.asdf/installs/python/3.8.10/lib/python3.8/typing.py", line 760, in __getattr__ raise AttributeError(attr) AttributeError: __pydantic_model__ </code></pre></div> <h3 dir="auto">Operating System</h3> <p dir="auto">Linux</p> <h3 dir="auto">Operating System Details</h3> <p dir="auto">Ubuntu 20.04 (under Windows 10 WSL2)</p> <h3 dir="auto">FastAPI Version</h3> <p dir="auto">0.68.0</p> <h3 dir="auto">Python Version</h3> <p dir="auto">3.8.10</p> <h3 dir="auto">Additional Context</h3> <p dir="auto">Pydantic version: 1.8.2</p>
1
<p dir="auto"><strong>Documentation issue</strong></p> <p dir="auto">In the <a href="https://pytorch.org/docs/stable/nn.html#lstm" rel="nofollow">documentation</a> of PyTorch 1.0.1. It is mentioned that:</p> <blockquote> <p dir="auto">batch_first – If True, then the input and output tensors are provided as (batch, seq, feature). Default: False</p> </blockquote> <p dir="auto">So I would expect the ouput tensor h_n of shape: (batch, num_layers * num_directions, hidden_size). But it is not the case. The batch is the second dimension, which does not match with the above statement from the documentation.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="input = torch.rand([60, 8, 256]) #batch size is 60, sequence size is 8, features are 256 lstm = torch.nn.LSTM(256, 512, batch_first=True) _, (finalHiddenState, _) = lstm(input) print(finalHiddenState.shape) Ouput: torch.Size([1, 60, 512]) "><pre class="notranslate"><code class="notranslate">input = torch.rand([60, 8, 256]) #batch size is 60, sequence size is 8, features are 256 lstm = torch.nn.LSTM(256, 512, batch_first=True) _, (finalHiddenState, _) = lstm(input) print(finalHiddenState.shape) Ouput: torch.Size([1, 60, 512]) </code></pre></div> <p dir="auto">Batch (60) is now the second dimension here</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2> <p dir="auto">When using MPI to launch processes, and mpi4py to assign ranks and get world size, DDP fails to initialize.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior:</p> <p dir="auto">Here is a complete reproducer script:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import torch import random # This calls mpi.Init() from mpi4py import MPI # What rank? World size? rank = MPI.COMM_WORLD.Get_rank() world_size = MPI.COMM_WORLD.Get_size() # Pytorch data parallel: import torch import torch.distributed as dist from torch.nn.parallel import DistributedDataParallel as DDP import torch.multiprocessing as mp # Create a 1-layer network, put it on GPU: n = torch.nn.Linear(1, 128).cuda() # May need to change init method to not be 'cadams' home dir ... init_method = f'file:///home/cadams/.torch_ddp_init' dist.init_process_group(&quot;nccl&quot;, init_method=init_method,rank=rank, world_size=world_size) n = DDP(n) print(&quot;SUCCESS&quot;)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">torch</span> <span class="pl-k">import</span> <span class="pl-s1">random</span> <span class="pl-c"># This calls mpi.Init()</span> <span class="pl-k">from</span> <span class="pl-s1">mpi4py</span> <span class="pl-k">import</span> <span class="pl-v">MPI</span> <span class="pl-c"># What rank? World size?</span> <span class="pl-s1">rank</span> <span class="pl-c1">=</span> <span class="pl-v">MPI</span>.<span class="pl-v">COMM_WORLD</span>.<span class="pl-v">Get_rank</span>() <span class="pl-s1">world_size</span> <span class="pl-c1">=</span> <span class="pl-v">MPI</span>.<span class="pl-v">COMM_WORLD</span>.<span class="pl-v">Get_size</span>() <span class="pl-c"># Pytorch data parallel:</span> <span class="pl-k">import</span> <span class="pl-s1">torch</span> <span class="pl-k">import</span> <span class="pl-s1">torch</span>.<span class="pl-s1">distributed</span> <span class="pl-k">as</span> <span class="pl-s1">dist</span> <span class="pl-k">from</span> <span class="pl-s1">torch</span>.<span class="pl-s1">nn</span>.<span class="pl-s1">parallel</span> <span class="pl-k">import</span> <span class="pl-v">DistributedDataParallel</span> <span class="pl-k">as</span> <span class="pl-v">DDP</span> <span class="pl-k">import</span> <span class="pl-s1">torch</span>.<span class="pl-s1">multiprocessing</span> <span class="pl-k">as</span> <span class="pl-s1">mp</span> <span class="pl-c"># Create a 1-layer network, put it on GPU:</span> <span class="pl-s1">n</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-s1">nn</span>.<span class="pl-v">Linear</span>(<span class="pl-c1">1</span>, <span class="pl-c1">128</span>).<span class="pl-en">cuda</span>() <span class="pl-c"># May need to change init method to not be 'cadams' home dir ...</span> <span class="pl-s1">init_method</span> <span class="pl-c1">=</span> <span class="pl-s">f'file:///home/cadams/.torch_ddp_init'</span> <span class="pl-s1">dist</span>.<span class="pl-en">init_process_group</span>(<span class="pl-s">"nccl"</span>, <span class="pl-s1">init_method</span><span class="pl-c1">=</span><span class="pl-s1">init_method</span>,<span class="pl-s1">rank</span><span class="pl-c1">=</span><span class="pl-s1">rank</span>, <span class="pl-s1">world_size</span><span class="pl-c1">=</span><span class="pl-s1">world_size</span>) <span class="pl-s1">n</span> <span class="pl-c1">=</span> <span class="pl-v">DDP</span>(<span class="pl-s1">n</span>) <span class="pl-en">print</span>(<span class="pl-s">"SUCCESS"</span>)</pre></div> <p dir="auto">I launch this with <code class="notranslate">mpirun -n 2 python reproducer.py</code></p> <p dir="auto">For each rank, I see this:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;pytorch_mpi4py_ddp_crash.py&quot;, line 25, in &lt;module&gt; n = DDP(n) File &quot;/opt/conda/lib/python3.6/site-packages/torch/nn/parallel/distributed.py&quot;, line 389, in __init__ self.broadcast_bucket_size) File &quot;/opt/conda/lib/python3.6/site-packages/torch/nn/parallel/distributed.py&quot;, line 606, in _distributed_broadcast_coalesced dist._broadcast_coalesced(self.process_group, tensors, buffer_size) RuntimeError: NCCL error in: ../torch/lib/c10d/ProcessGroupNCCL.cpp:558, invalid usage, NCCL version 2.7.8"><pre class="notranslate">Traceback (most recent call last): File <span class="pl-s"><span class="pl-pds">"</span>pytorch_mpi4py_ddp_crash.py<span class="pl-pds">"</span></span>, line 25, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span> n = DDP(n) File <span class="pl-s"><span class="pl-pds">"</span>/opt/conda/lib/python3.6/site-packages/torch/nn/parallel/distributed.py<span class="pl-pds">"</span></span>, line 389, <span class="pl-k">in</span> __init__ self.broadcast_bucket_size) File <span class="pl-s"><span class="pl-pds">"</span>/opt/conda/lib/python3.6/site-packages/torch/nn/parallel/distributed.py<span class="pl-pds">"</span></span>, line 606, <span class="pl-k">in</span> _distributed_broadcast_coalesced dist._broadcast_coalesced(self.process_group, tensors, buffer_size) RuntimeError: NCCL error in: ../torch/lib/c10d/ProcessGroupNCCL.cpp:558, invalid usage, NCCL version 2.7.8</pre></div> <p dir="auto">Is it possible that the mpi4py call to MPI_Init is being duplicated in pytorch? I know this was a bug in Summer 2020 but not sure if it persists.</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">I expect DDP to successfully init and wrap the networks, one per rank.</p> <h2 dir="auto">Environment</h2> <p dir="auto">Collecting environment information...<br> PyTorch version: 1.7.0a0+8deb4fe<br> Is debug build: False<br> CUDA used to build PyTorch: 11.0<br> ROCM used to build PyTorch: N/A</p> <p dir="auto">OS: Ubuntu 18.04.5 LTS (x86_64)<br> GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0<br> Clang version: Could not collect<br> CMake version: version 3.14.0</p> <p dir="auto">Python version: 3.6 (64-bit runtime)<br> Is CUDA available: True<br> CUDA runtime version: Could not collect<br> GPU models and configuration:<br> GPU 0: A100-SXM4-40GB<br> GPU 1: A100-SXM4-40GB<br> GPU 2: A100-SXM4-40GB<br> GPU 3: A100-SXM4-40GB<br> GPU 4: A100-SXM4-40GB<br> GPU 5: A100-SXM4-40GB<br> GPU 6: A100-SXM4-40GB<br> GPU 7: A100-SXM4-40GB</p> <p dir="auto">Nvidia driver version: 450.51.05<br> cuDNN version: Probably one of the following:<br> /usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.4<br> /usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.4<br> /usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.0.4<br> /usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.0.4<br> /usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.0.4<br> /usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.0.4<br> /usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.0.4<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.1<br> [pip3] pytorch-transformers==1.1.0<br> [pip3] torch==1.7.0a0+8deb4fe<br> [pip3] torch-cluster==1.5.7<br> [pip3] torch-geometric==1.6.1<br> [pip3] torch-scatter==2.0.5<br> [pip3] torch-sparse==0.6.7<br> [pip3] torchtext==0.6.0<br> [pip3] torchvision==0.8.0a0<br> [conda] magma-cuda110 2.5.2 5 local<br> [conda] mkl 2019.1 144<br> [conda] mkl-include 2019.1 144<br> [conda] nomkl 3.0 0<br> [conda] numpy 1.19.1 py36h30dfecb_0<br> [conda] numpy-base 1.19.1 py36h75fe3a5_0<br> [conda] pytorch-transformers 1.1.0 pypi_0 pypi<br> [conda] torch 1.7.0a0+8deb4fe pypi_0 pypi<br> [conda] torchtext 0.6.0 pypi_0 pypi<br> [conda] torchvision 0.8.0a0 pypi_0 pypi</p> <h2 dir="auto">Additional context</h2> <p dir="auto">I am running this on 8xA100 DGX systems, using nvidia's container: docker pull nvcr.io/nvidia/pytorch:20.09-py3</p>
0
<p dir="auto">I am using @types/core-js 0.9.34. I am getting the following error. This is the statement i had it in the tsconfig.json file</p> <p dir="auto">{<br> "compilerOptions": {<br> "target": "es5",<br> "module": "commonjs",<br> "lib": ["es5","dom"],<br> "moduleResolution": "node",<br> "declaration": false,<br> "noImplicitAny": false,<br> "removeComments": true,<br> "emitDecoratorMetadata": true,<br> "experimentalDecorators": true,<br> "sourceMap": true,<br> "typeRoots": [ "node_modules/<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/types/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/types">@types</a>" ]<br> },<br> "exclude": [<br> "node_modules",<br> "typings/browser.d.ts",<br> "typings/browser/<strong>"<br> ],<br> "compileOnSave": false,<br> "filesGlob": [<br> "public/*.ts",<br> "public/</strong>/*.ts"<br> ]<br> }</p> <p dir="auto">when I compile it i am getting the following error: node_modules/@types/core-js/index.d.ts(21,14): error TS2300: Duplicate identifier 'PropertyKey'. The typescript version I have used is :"typescript": "2.0.10"</p> <p dir="auto">Please give me an idea how to rectify the issue</p>
<p dir="auto">Is something wrong with CI or publishing infrastructure?</p> <ul dir="auto"> <li>Check the <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/44317" data-hovercard-type="issue" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/issues/44317/hovercard">Infrastructure status updates</a> thread for known issues.</li> <li>Leave a message on the <a href="http://gitter.im/DefinitelyTyped/DefinitelyTyped" rel="nofollow">DefinitelyTyped Gitter</a>.</li> </ul> <p dir="auto">If you know how to fix the issue, make a pull request instead.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/react-redux</code> package and had problems.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond. <ul dir="auto"> <li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tkqubo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tkqubo">@tkqubo</a> @kenzierocks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/clayne11/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/clayne11">@clayne11</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tansongyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tansongyang">@tansongyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/NicholasBoll/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/NicholasBoll">@NicholasBoll</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mDibyo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mDibyo">@mDibyo</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Kallikrein/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Kallikrein">@Kallikrein</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/val1984/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/val1984">@val1984</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jrakotoharisoa/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jrakotoharisoa">@jrakotoharisoa</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/apapirovski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/apapirovski">@apapirovski</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/surgeboris/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/surgeboris">@surgeboris</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/soerenbf/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/soerenbf">@soerenbf</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/MrWolfZ/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/MrWolfZ">@MrWolfZ</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DylanVann/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DylanVann">@DylanVann</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Lazyuki/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Lazyuki">@Lazyuki</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kazuma1989/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kazuma1989">@kazuma1989</a></li> </ul> </li> </ul> <p dir="auto">Hi guys,<br> I am using <code class="notranslate">redux 3.x.x</code> and <code class="notranslate">react-redux 7.2.0</code> (they supposed to be <a href="https://github.com/reduxjs/react-redux/blob/master/package.json#L40">compatible </a> )<br> I am facing problems with <code class="notranslate">@types/react-redux 7.x</code> because they use types from <code class="notranslate">redux 4.x</code> and they are not compatible with types from the previous versions.<br> Could the version with dependency on the previous redux be added? Or what should be the version for such typings if i submit them via PR?</p>
0
<p dir="auto">CentOS 6.7<br> Cuda 7.0<br> cuDNN 4.0.7</p> <p dir="auto">I resolve <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="153611031" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/2266" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/2266/hovercard" href="https://github.com/tensorflow/tensorflow/issues/2266">#2266</a> by hard coding the python2.7 path in <code class="notranslate">third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc</code>.</p> <p dir="auto">After also resolving a similar problem with <code class="notranslate">swig</code>, it compiles without errors:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Target //tensorflow/tools/pip_package:build_pip_package up-to-date: bazel-bin/tensorflow/tools/pip_package/build_pip_package INFO: Elapsed time: 228.884s, Critical Path: 199.55s"><pre class="notranslate"><code class="notranslate">Target //tensorflow/tools/pip_package:build_pip_package up-to-date: bazel-bin/tensorflow/tools/pip_package/build_pip_package INFO: Elapsed time: 228.884s, Critical Path: 199.55s </code></pre></div> <p dir="auto">But it seems that <code class="notranslate">build_pip_package</code> was only partially (?) completed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[email protected]@login-node03 tensorflow $ bazel-bin/tensorflow/tools/pip_package/build_pip_package testonly Tue May 17 11:09:33 EDT 2016 : === Using tmpdir: /tmp/tmp.akIEI1WBAX cp: cannot stat `bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/tensorflow': No such file or directory cp: cannot stat `bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/external': No such file or directory"><pre class="notranslate"><code class="notranslate">[email protected]@login-node03 tensorflow $ bazel-bin/tensorflow/tools/pip_package/build_pip_package testonly Tue May 17 11:09:33 EDT 2016 : === Using tmpdir: /tmp/tmp.akIEI1WBAX cp: cannot stat `bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/tensorflow': No such file or directory cp: cannot stat `bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/external': No such file or directory </code></pre></div> <p dir="auto">Any ideas? Could something be failing silently?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg 2016年 04月 21日 星期四 07:34:12 CST : === Using tmpdir: /tmp/tmp.cMsLMGw3bz cp: cannot stat ‘bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/tensorflow’: No such file or directory cp: cannot stat ‘bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/external’: No such file or directory"><pre class="notranslate"><code class="notranslate">bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg 2016年 04月 21日 星期四 07:34:12 CST : === Using tmpdir: /tmp/tmp.cMsLMGw3bz cp: cannot stat ‘bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/tensorflow’: No such file or directory cp: cannot stat ‘bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/external’: No such file or directory </code></pre></div>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=juergen.hoeller" rel="nofollow">Juergen Hoeller</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6543?redirect=false" rel="nofollow">SPR-6543</a></strong> and commented</p> <p dir="auto">Support for JSF 2.0's view scope, as exposed through UIViewRoot.getViewMap().<br> Possibly also for "facesRequest" scope: FacesContext.getAttributes().<br> Also research options for making good use of the JSF 2.0 flash scope.</p> <hr> <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="398111055" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12758" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12758/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12758">#12758</a> Specific support for JSF 2.2 / 2.3</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398099737" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11082" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11082/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11082">#11082</a> Provide conversation management support</li> </ul> <p dir="auto">51 votes, 44 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=charlesb" rel="nofollow">Charles Blaxland</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2772?redirect=false" rel="nofollow">SPR-2772</a></strong> and commented</p> <p dir="auto">When many threads attempt to create non-singleton beans simultaneously Spring's performance is extremely poor. Spring 2.0 also seems to be worse than Spring 1.2.8 in this regard. I suspect its due to all the synchronized blocks in the BeanFactory.</p> <p dir="auto">I have a heavily threaded server application, which at a certain point creates a bunch of nested non-singleton beans via a Spring lookup-method. While running load tests I noticed this step was a bottleneck in our application. I wrote a small test application which created a number of threads which all tried to create a number of non-singleton beans. The results are below:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Spring 2.0 ========== singleton=&quot;false&quot; ----------------- 08188ms 1 Thread, 10000 bean creations per thread (10000 total) 15656ms 10 Threads, 1000 bean creations per thread (10000 total) 24703ms 100 Threads, 100 bean creations per thread (10000 total) 27235ms 1000 Threads, 10 bean creations per thread (10000 total) singleton=&quot;true&quot; ---------------- 01110ms 1 Thread, 10000 bean creations per thread (10000 total) 01266ms 10 Threads, 1000 bean creations per thread (10000 total) 01281ms 100 Threads, 100 bean creations per thread (10000 total) 01515ms 1000 Threads, 10 bean creations per thread (10000 total) Spring 1.2.8 ============ singleton=&quot;false&quot; ----------------- 04797ms 1 Thread, 10000 bean creations per thread (10000 total) 05719ms 10 Threads, 1000 bean creations per thread (10000 total) 13000ms 100 Threads, 100 bean creations per thread (10000 total) 17922ms 1000 Threads, 10 bean creations per thread (10000 total)"><pre class="notranslate"><code class="notranslate">Spring 2.0 ========== singleton="false" ----------------- 08188ms 1 Thread, 10000 bean creations per thread (10000 total) 15656ms 10 Threads, 1000 bean creations per thread (10000 total) 24703ms 100 Threads, 100 bean creations per thread (10000 total) 27235ms 1000 Threads, 10 bean creations per thread (10000 total) singleton="true" ---------------- 01110ms 1 Thread, 10000 bean creations per thread (10000 total) 01266ms 10 Threads, 1000 bean creations per thread (10000 total) 01281ms 100 Threads, 100 bean creations per thread (10000 total) 01515ms 1000 Threads, 10 bean creations per thread (10000 total) Spring 1.2.8 ============ singleton="false" ----------------- 04797ms 1 Thread, 10000 bean creations per thread (10000 total) 05719ms 10 Threads, 1000 bean creations per thread (10000 total) 13000ms 100 Threads, 100 bean creations per thread (10000 total) 17922ms 1000 Threads, 10 bean creations per thread (10000 total) </code></pre></div> <p dir="auto">You can see that for the same number of bean creations, the time taken increases rapidly as you increase the number of threads. Obviously there is some overhead in managing the many threads, but not enough to account for what is seen here. Its apparent that Spring 2.0 is also 60-70% slower than 1.2.8 for this task, even with a single thread.</p> <hr> <p dir="auto"><strong>Affects:</strong> 1.2.8, 2.0 final</p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/12075/screenshot+profiling+session.jpg" rel="nofollow">screenshot profiling session.jpg</a> (<em>293.05 kB</em>)</li> <li><a href="https://jira.spring.io/secure/attachment/12074/Spring2TestBean.java" rel="nofollow">Spring2TestBean.java</a> (<em>672 bytes</em>)</li> <li><a href="https://jira.spring.io/secure/attachment/12072/springtest.zip" rel="nofollow">springtest.zip</a> (<em>1.98 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="398073300" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7573" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7573/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7573">#7573</a> Poor performance creating prototype beans (<em><strong>"is duplicated by"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398074080" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7667" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7667/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7667">#7667</a> Spring performance is insufficient for intensive work at short scopes</li> </ul> <p dir="auto">6 votes, 2 watchers</p>
0
<p dir="auto"><a href="https://console.cloud.google.com/storage/browser/kubernetes-jenkins/pr-logs/pull/20965/kubernetes-pull-test-unit-integration/14051/" rel="nofollow">https://console.cloud.google.com/storage/browser/kubernetes-jenkins/pr-logs/pull/20965/kubernetes-pull-test-unit-integration/14051/</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0212 17:47:39.819927 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:&quot;delete&quot;, Node:(*client.Node)(0xc8235322a0), PrevNode:(*client.Node)(0xc823532300), Index:0xc2} &amp;client.Node{Key:&quot;/registry&quot;, Dir:true, Value:&quot;&quot;, Nodes:client.Nodes(nil), CreatedIndex:0xb7, ModifiedIndex:0xc3, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.819980 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:&quot;delete&quot;, Node:(*client.Node)(0xc8236f6f60), PrevNode:(*client.Node)(0xc8236f6fc0), Index:0xc2} &amp;client.Node{Key:&quot;/registry&quot;, Dir:true, Value:&quot;&quot;, Nodes:client.Nodes(nil), CreatedIndex:0xb7, ModifiedIndex:0xc3, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.820226 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:&quot;delete&quot;, Node:(*client.Node)(0xc82416b440), PrevNode:(*client.Node)(0xc82416b4a0), Index:0xbe} &amp;client.Node{Key:&quot;/registry&quot;, Dir:true, Value:&quot;&quot;, Nodes:client.Nodes(nil), CreatedIndex:0xb7, ModifiedIndex:0xc3, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.820674 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:&quot;delete&quot;, Node:(*client.Node)(0xc82178d620), PrevNode:(*client.Node)(0xc82178d680), Index:0xc2} &amp;client.Node{Key:&quot;/registry&quot;, Dir:true, Value:&quot;&quot;, Nodes:client.Nodes(nil), CreatedIndex:0xb7, ModifiedIndex:0xc3, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.822516 9094 persistentvolume_claim_binder_controller.go:123] PVClaimBinder could not update volume fake-pv: Cannot reload volume fake-pv: persistentvolumes &quot;fake-pv&quot; not found E0212 17:47:39.876514 9094 persistentvolume_claim_binder_controller.go:188] PVClaimBinder could not update volume fake-pv from deleteClaim handler: Cannot reload volume fake-pv: persistentvolumes &quot;fake-pv&quot; not found E0212 17:47:39.878893 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:&quot;delete&quot;, Node:(*client.Node)(0xc821dfaba0), PrevNode:(*client.Node)(0xc821dfac00), Index:0xcd} &amp;client.Node{Key:&quot;/registry&quot;, Dir:true, Value:&quot;&quot;, Nodes:client.Nodes(nil), CreatedIndex:0xc4, ModifiedIndex:0xce, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.878893 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:&quot;delete&quot;, Node:(*client.Node)(0xc823dcd440), PrevNode:(*client.Node)(0xc823dcd500), Index:0xcd} &amp;client.Node{Key:&quot;/registry&quot;, Dir:true, Value:&quot;&quot;, Nodes:client.Nodes(nil), CreatedIndex:0xc4, ModifiedIndex:0xce, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.878970 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:&quot;delete&quot;, Node:(*client.Node)(0xc8237a4060), PrevNode:(*client.Node)(0xc8237a40c0), Index:0xcd} &amp;client.Node{Key:&quot;/registry&quot;, Dir:true, Value:&quot;&quot;, Nodes:client.Nodes(nil), CreatedIndex:0xc4, ModifiedIndex:0xce, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.879007 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:&quot;delete&quot;, Node:(*client.Node)(0xc8237a45a0), PrevNode:(*client.Node)(0xc8237a4660), Index:0xcd} &amp;client.Node{Key:&quot;/registry&quot;, Dir:true, Value:&quot;&quot;, Nodes:client.Nodes(nil), CreatedIndex:0xc4, ModifiedIndex:0xce, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.879064 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:&quot;delete&quot;, Node:(*client.Node)(0xc824b03d40), PrevNode:(*client.Node)(0xc824b03da0), Index:0xcb} &amp;client.Node{Key:&quot;/registry&quot;, Dir:true, Value:&quot;&quot;, Nodes:client.Nodes(nil), CreatedIndex:0xc4, ModifiedIndex:0xce, Expiration:(*time.Time)(nil), TTL:0} panic: sync: WaitGroup is reused before previous Wait has returned [recovered] panic: sync: WaitGroup is reused before previous Wait has returned goroutine 2786 [running]: testing.tRunner.func1(0xc822bcc2d0) /usr/local/go/src/testing/testing.go:450 +0x171 sync.(*WaitGroup).Wait(0xc824a9f570) /usr/local/go/src/sync/waitgroup.go:128 +0x114 net/http/httptest.(*Server).Close(0xc824a9f540) /usr/local/go/src/net/http/httptest/server.go:168 +0x5c k8s.io/kubernetes/test/integration.TestPersistentVolumeRecycler(0xc822bcc2d0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/persistent_volumes_test.go:177 +0x2829 testing.tRunner(0xc822bcc2d0, 0x251a1f8) /usr/local/go/src/testing/testing.go:456 +0x98 created by testing.RunTests /usr/local/go/src/testing/testing.go:561 +0x86d goroutine 1 [chan receive]: testing.RunTests(0x1ce4488, 0x2519fa0, 0x22, 0x22, 0xc820340401) /usr/local/go/src/testing/testing.go:562 +0x8ad testing.(*M).Run(0xc8210bcf08, 0xc8202d6c80) /usr/local/go/src/testing/testing.go:494 +0x70 main.main() k8s.io/kubernetes/test/integration/_test/_testmain.go:120 +0x116 goroutine 17 [syscall, locked to thread]: runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1721 +0x1 goroutine 5 [chan receive]: github.com/golang/glog.(*loggingT).flushDaemon(0x264c0e0) /workspace/kubernetes/Godeps/_workspace/src/github.com/golang/glog/glog.go:879 +0x67 created by github.com/golang/glog.init.1 /workspace/kubernetes/Godeps/_workspace/src/github.com/golang/glog/glog.go:410 +0x297 goroutine 41 [syscall]: os/signal.loop() /usr/local/go/src/os/signal/signal_unix.go:22 +0x18 created by os/signal.init.1 /usr/local/go/src/os/signal/signal_unix.go:28 +0x37 goroutine 60 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc8207cbf78, 0x29e8d60800, 0x0, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc8207cbf78, 0x29e8d60800, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/registry/service/ipallocator/controller.(*Repair).RunUntil(0xc82068b0e0, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/registry/service/ipallocator/controller/repair.go:72 +0x46 k8s.io/kubernetes/pkg/registry/service/ipallocator/controller.(*Repair).RunUntil-fm(0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 398 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc8206b1f78, 0x29e8d60800, 0x0, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc8206b1f78, 0x29e8d60800, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil(0xc820ff0b00, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/registry/service/portallocator/controller/repair.go:58 +0x46 k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil-fm(0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 20 [IO wait]: net.runtime_pollWait(0x7fcbbc04c210, 0x72, 0xc820012150) /usr/local/go/src/runtime/netpoll.go:157 +0x60 net.(*pollDesc).Wait(0xc8201273a0, 0x72, 0x0, 0x0) /usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a net.(*pollDesc).WaitRead(0xc8201273a0, 0x0, 0x0) /usr/local/go/src/net/fd_poll_runtime.go:78 +0x36 net.(*netFD).accept(0xc820127340, 0x0, 0x7fcbbc04c810, 0xc8205c8b20) /usr/local/go/src/net/fd_unix.go:408 +0x27c net.(*TCPListener).AcceptTCP(0xc8200d6120, 0xc8206e4280, 0x0, 0x0) /usr/local/go/src/net/tcpsock_posix.go:254 +0x4d net.(*TCPListener).Accept(0xc8200d6120, 0x0, 0x0, 0x0, 0x0) /usr/local/go/src/net/tcpsock_posix.go:264 +0x3d net/http/httptest.(*historyListener).Accept(0xc82013c9f0, 0x0, 0x0, 0x0, 0x0) /usr/local/go/src/net/http/httptest/server.go:48 +0x63 net/http.(*Server).Serve(0xc8200d2ea0, 0x7fcbb99d9670, 0xc82013c9f0, 0x0, 0x0) /usr/local/go/src/net/http/server.go:1887 +0xb3 created by net/http/httptest.(*Server).Start /usr/local/go/src/net/http/httptest/server.go:109 +0x380 goroutine 2468 [chan send]: k8s.io/kubernetes/pkg/watch.(*StreamWatcher).receive(0xc824af41e0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/watch/iowatcher.go:117 +0x5cc created by k8s.io/kubernetes/pkg/watch.NewStreamWatcher /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/watch/iowatcher.go:60 +0xbf goroutine 59 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc8207c9f78, 0x2540be400, 0x0, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc8207c9f78, 0x2540be400, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/master.(*Controller).RunKubernetesService(0xc820216b40, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:110 +0x4a k8s.io/kubernetes/pkg/master.(*Controller).RunKubernetesService-fm(0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 61 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc8207caf78, 0x29e8d60800, 0x0, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc8207caf78, 0x29e8d60800, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil(0xc82068db40, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/registry/service/portallocator/controller/repair.go:58 +0x46 k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil-fm(0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 1966 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc82127df78, 0x2540be400, 0x0, 0xc820ddbc80) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc82127df78, 0x2540be400, 0xc820ddbc80) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/master.(*Controller).RunKubernetesService(0xc822778240, 0xc820ddbc80) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:110 +0x4a k8s.io/kubernetes/pkg/master.(*Controller).RunKubernetesService-fm(0xc820ddbc80) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 1797 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc82127ff78, 0x29e8d60800, 0x0, 0xc821e3e180) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc82127ff78, 0x29e8d60800, 0xc821e3e180) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil(0xc821e42a40, 0xc821e3e180) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/registry/service/portallocator/controller/repair.go:58 +0x46 k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil-fm(0xc821e3e180) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 397 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc8207c6f78, 0x29e8d60800, 0x0, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc8207c6f78, 0x29e8d60800, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/registry/service/ipallocator/controller.(*Repair).RunUntil(0xc82097ae10, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/registry/service/ipallocator/controller/repair.go:72 +0x46 k8s.io/kubernetes/pkg/registry/service/ipallocator/controller.(*Repair).RunUntil-fm(0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 "><pre class="notranslate"><code class="notranslate">E0212 17:47:39.819927 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:"delete", Node:(*client.Node)(0xc8235322a0), PrevNode:(*client.Node)(0xc823532300), Index:0xc2} &amp;client.Node{Key:"/registry", Dir:true, Value:"", Nodes:client.Nodes(nil), CreatedIndex:0xb7, ModifiedIndex:0xc3, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.819980 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:"delete", Node:(*client.Node)(0xc8236f6f60), PrevNode:(*client.Node)(0xc8236f6fc0), Index:0xc2} &amp;client.Node{Key:"/registry", Dir:true, Value:"", Nodes:client.Nodes(nil), CreatedIndex:0xb7, ModifiedIndex:0xc3, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.820226 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:"delete", Node:(*client.Node)(0xc82416b440), PrevNode:(*client.Node)(0xc82416b4a0), Index:0xbe} &amp;client.Node{Key:"/registry", Dir:true, Value:"", Nodes:client.Nodes(nil), CreatedIndex:0xb7, ModifiedIndex:0xc3, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.820674 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:"delete", Node:(*client.Node)(0xc82178d620), PrevNode:(*client.Node)(0xc82178d680), Index:0xc2} &amp;client.Node{Key:"/registry", Dir:true, Value:"", Nodes:client.Nodes(nil), CreatedIndex:0xb7, ModifiedIndex:0xc3, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.822516 9094 persistentvolume_claim_binder_controller.go:123] PVClaimBinder could not update volume fake-pv: Cannot reload volume fake-pv: persistentvolumes "fake-pv" not found E0212 17:47:39.876514 9094 persistentvolume_claim_binder_controller.go:188] PVClaimBinder could not update volume fake-pv from deleteClaim handler: Cannot reload volume fake-pv: persistentvolumes "fake-pv" not found E0212 17:47:39.878893 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:"delete", Node:(*client.Node)(0xc821dfaba0), PrevNode:(*client.Node)(0xc821dfac00), Index:0xcd} &amp;client.Node{Key:"/registry", Dir:true, Value:"", Nodes:client.Nodes(nil), CreatedIndex:0xc4, ModifiedIndex:0xce, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.878893 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:"delete", Node:(*client.Node)(0xc823dcd440), PrevNode:(*client.Node)(0xc823dcd500), Index:0xcd} &amp;client.Node{Key:"/registry", Dir:true, Value:"", Nodes:client.Nodes(nil), CreatedIndex:0xc4, ModifiedIndex:0xce, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.878970 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:"delete", Node:(*client.Node)(0xc8237a4060), PrevNode:(*client.Node)(0xc8237a40c0), Index:0xcd} &amp;client.Node{Key:"/registry", Dir:true, Value:"", Nodes:client.Nodes(nil), CreatedIndex:0xc4, ModifiedIndex:0xce, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.879007 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:"delete", Node:(*client.Node)(0xc8237a45a0), PrevNode:(*client.Node)(0xc8237a4660), Index:0xcd} &amp;client.Node{Key:"/registry", Dir:true, Value:"", Nodes:client.Nodes(nil), CreatedIndex:0xc4, ModifiedIndex:0xce, Expiration:(*time.Time)(nil), TTL:0} E0212 17:47:39.879064 9094 etcd_watcher.go:428] failure to decode api object: Object 'Kind' is missing in '' from &amp;client.Response{Action:"delete", Node:(*client.Node)(0xc824b03d40), PrevNode:(*client.Node)(0xc824b03da0), Index:0xcb} &amp;client.Node{Key:"/registry", Dir:true, Value:"", Nodes:client.Nodes(nil), CreatedIndex:0xc4, ModifiedIndex:0xce, Expiration:(*time.Time)(nil), TTL:0} panic: sync: WaitGroup is reused before previous Wait has returned [recovered] panic: sync: WaitGroup is reused before previous Wait has returned goroutine 2786 [running]: testing.tRunner.func1(0xc822bcc2d0) /usr/local/go/src/testing/testing.go:450 +0x171 sync.(*WaitGroup).Wait(0xc824a9f570) /usr/local/go/src/sync/waitgroup.go:128 +0x114 net/http/httptest.(*Server).Close(0xc824a9f540) /usr/local/go/src/net/http/httptest/server.go:168 +0x5c k8s.io/kubernetes/test/integration.TestPersistentVolumeRecycler(0xc822bcc2d0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/persistent_volumes_test.go:177 +0x2829 testing.tRunner(0xc822bcc2d0, 0x251a1f8) /usr/local/go/src/testing/testing.go:456 +0x98 created by testing.RunTests /usr/local/go/src/testing/testing.go:561 +0x86d goroutine 1 [chan receive]: testing.RunTests(0x1ce4488, 0x2519fa0, 0x22, 0x22, 0xc820340401) /usr/local/go/src/testing/testing.go:562 +0x8ad testing.(*M).Run(0xc8210bcf08, 0xc8202d6c80) /usr/local/go/src/testing/testing.go:494 +0x70 main.main() k8s.io/kubernetes/test/integration/_test/_testmain.go:120 +0x116 goroutine 17 [syscall, locked to thread]: runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1721 +0x1 goroutine 5 [chan receive]: github.com/golang/glog.(*loggingT).flushDaemon(0x264c0e0) /workspace/kubernetes/Godeps/_workspace/src/github.com/golang/glog/glog.go:879 +0x67 created by github.com/golang/glog.init.1 /workspace/kubernetes/Godeps/_workspace/src/github.com/golang/glog/glog.go:410 +0x297 goroutine 41 [syscall]: os/signal.loop() /usr/local/go/src/os/signal/signal_unix.go:22 +0x18 created by os/signal.init.1 /usr/local/go/src/os/signal/signal_unix.go:28 +0x37 goroutine 60 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc8207cbf78, 0x29e8d60800, 0x0, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc8207cbf78, 0x29e8d60800, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/registry/service/ipallocator/controller.(*Repair).RunUntil(0xc82068b0e0, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/registry/service/ipallocator/controller/repair.go:72 +0x46 k8s.io/kubernetes/pkg/registry/service/ipallocator/controller.(*Repair).RunUntil-fm(0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 398 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc8206b1f78, 0x29e8d60800, 0x0, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc8206b1f78, 0x29e8d60800, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil(0xc820ff0b00, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/registry/service/portallocator/controller/repair.go:58 +0x46 k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil-fm(0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 20 [IO wait]: net.runtime_pollWait(0x7fcbbc04c210, 0x72, 0xc820012150) /usr/local/go/src/runtime/netpoll.go:157 +0x60 net.(*pollDesc).Wait(0xc8201273a0, 0x72, 0x0, 0x0) /usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a net.(*pollDesc).WaitRead(0xc8201273a0, 0x0, 0x0) /usr/local/go/src/net/fd_poll_runtime.go:78 +0x36 net.(*netFD).accept(0xc820127340, 0x0, 0x7fcbbc04c810, 0xc8205c8b20) /usr/local/go/src/net/fd_unix.go:408 +0x27c net.(*TCPListener).AcceptTCP(0xc8200d6120, 0xc8206e4280, 0x0, 0x0) /usr/local/go/src/net/tcpsock_posix.go:254 +0x4d net.(*TCPListener).Accept(0xc8200d6120, 0x0, 0x0, 0x0, 0x0) /usr/local/go/src/net/tcpsock_posix.go:264 +0x3d net/http/httptest.(*historyListener).Accept(0xc82013c9f0, 0x0, 0x0, 0x0, 0x0) /usr/local/go/src/net/http/httptest/server.go:48 +0x63 net/http.(*Server).Serve(0xc8200d2ea0, 0x7fcbb99d9670, 0xc82013c9f0, 0x0, 0x0) /usr/local/go/src/net/http/server.go:1887 +0xb3 created by net/http/httptest.(*Server).Start /usr/local/go/src/net/http/httptest/server.go:109 +0x380 goroutine 2468 [chan send]: k8s.io/kubernetes/pkg/watch.(*StreamWatcher).receive(0xc824af41e0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/watch/iowatcher.go:117 +0x5cc created by k8s.io/kubernetes/pkg/watch.NewStreamWatcher /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/watch/iowatcher.go:60 +0xbf goroutine 59 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc8207c9f78, 0x2540be400, 0x0, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc8207c9f78, 0x2540be400, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/master.(*Controller).RunKubernetesService(0xc820216b40, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:110 +0x4a k8s.io/kubernetes/pkg/master.(*Controller).RunKubernetesService-fm(0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 61 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc8207caf78, 0x29e8d60800, 0x0, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc8207caf78, 0x29e8d60800, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil(0xc82068db40, 0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/registry/service/portallocator/controller/repair.go:58 +0x46 k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil-fm(0xc8205252c0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 1966 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc82127df78, 0x2540be400, 0x0, 0xc820ddbc80) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc82127df78, 0x2540be400, 0xc820ddbc80) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/master.(*Controller).RunKubernetesService(0xc822778240, 0xc820ddbc80) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:110 +0x4a k8s.io/kubernetes/pkg/master.(*Controller).RunKubernetesService-fm(0xc820ddbc80) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 1797 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc82127ff78, 0x29e8d60800, 0x0, 0xc821e3e180) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc82127ff78, 0x29e8d60800, 0xc821e3e180) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil(0xc821e42a40, 0xc821e3e180) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/registry/service/portallocator/controller/repair.go:58 +0x46 k8s.io/kubernetes/pkg/registry/service/portallocator/controller.(*Repair).RunUntil-fm(0xc821e3e180) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 goroutine 397 [select]: k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc8207c6f78, 0x29e8d60800, 0x0, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:74 +0x13b k8s.io/kubernetes/pkg/util/wait.Until(0xc8207c6f78, 0x29e8d60800, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x3e k8s.io/kubernetes/pkg/registry/service/ipallocator/controller.(*Repair).RunUntil(0xc82097ae10, 0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/registry/service/ipallocator/controller/repair.go:72 +0x46 k8s.io/kubernetes/pkg/registry/service/ipallocator/controller.(*Repair).RunUntil-fm(0xc82093bce0) /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/master/controller.go:97 +0x2a created by k8s.io/kubernetes/pkg/util.(*Runner).Start /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/runner.go:45 +0x153 </code></pre></div>
<p dir="auto">httptest.Server races between requests coming into its mux, and Server.Close. Normal usage doesn't typically trigger the race detector, but when a test client timeouts (we do this intentionally in letsencrypt/boulder to test how boulder fails) and moves on to teardown the test with Close, a race is found easily.</p> <p dir="auto">This code has a client that always times out when making a request to the server and reliably has a race detected: <a href="https://play.golang.org/p/aC0YTPBYGn" rel="nofollow">https://play.golang.org/p/aC0YTPBYGn</a></p> <p dir="auto">This is its output when run with the race detector:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GET error: Get http://127.0.0.1:61653: net/http: request canceled (Client.Timeout exceeded while awaiting headers) ================== WARNING: DATA RACE Write by main goroutine: sync.raceWrite() /Users/jmhodges/projects/go/src/sync/race.go:41 +0x2e sync.(*WaitGroup).Wait() /Users/jmhodges/projects/go/src/sync/waitgroup.go:124 +0xf9 net/http/httptest.(*Server).Close() /Users/jmhodges/projects/go/src/net/http/httptest/server.go:168 +0x80 main.main() /Users/jmhodges/projects/foo.go:35 +0x1fb Previous read by goroutine 10: sync.raceRead() /Users/jmhodges/projects/go/src/sync/race.go:37 +0x2e sync.(*WaitGroup).Add() /Users/jmhodges/projects/go/src/sync/waitgroup.go:66 +0xfa net/http/httptest.(*waitGroupHandler).ServeHTTP() /Users/jmhodges/projects/go/src/net/http/httptest/server.go:198 +0x5c net/http.serverHandler.ServeHTTP() /Users/jmhodges/projects/go/src/net/http/server.go:1862 +0x206 net/http.(*conn).serve() /Users/jmhodges/projects/go/src/net/http/server.go:1361 +0x117c Goroutine 10 (running) created at: net/http.(*Server).Serve() /Users/jmhodges/projects/go/src/net/http/server.go:1910 +0x464 ================== Found 1 data race(s)"><pre class="notranslate"><code class="notranslate">GET error: Get http://127.0.0.1:61653: net/http: request canceled (Client.Timeout exceeded while awaiting headers) ================== WARNING: DATA RACE Write by main goroutine: sync.raceWrite() /Users/jmhodges/projects/go/src/sync/race.go:41 +0x2e sync.(*WaitGroup).Wait() /Users/jmhodges/projects/go/src/sync/waitgroup.go:124 +0xf9 net/http/httptest.(*Server).Close() /Users/jmhodges/projects/go/src/net/http/httptest/server.go:168 +0x80 main.main() /Users/jmhodges/projects/foo.go:35 +0x1fb Previous read by goroutine 10: sync.raceRead() /Users/jmhodges/projects/go/src/sync/race.go:37 +0x2e sync.(*WaitGroup).Add() /Users/jmhodges/projects/go/src/sync/waitgroup.go:66 +0xfa net/http/httptest.(*waitGroupHandler).ServeHTTP() /Users/jmhodges/projects/go/src/net/http/httptest/server.go:198 +0x5c net/http.serverHandler.ServeHTTP() /Users/jmhodges/projects/go/src/net/http/server.go:1862 +0x206 net/http.(*conn).serve() /Users/jmhodges/projects/go/src/net/http/server.go:1361 +0x117c Goroutine 10 (running) created at: net/http.(*Server).Serve() /Users/jmhodges/projects/go/src/net/http/server.go:1910 +0x464 ================== Found 1 data race(s) </code></pre></div> <p dir="auto">It seems the race detector is saying that between Server.Close closing the listener and Server.Close calling WaitGroup.Wait, a new Request could be pulled off the listener, but that the new Request could then only get to waitGroupHandler.ServeHTTP's WaitGroup.Add after the Wait is called.</p>
1
<p dir="auto">There is a sample on the bootstrap website</p> <ul dir="auto"> <li>Navigate to <a href="http://getbootstrap.com/javascript/#modals" rel="nofollow">http://getbootstrap.com/javascript/#modals</a></li> <li>click "Launch demo modal"</li> <li>scroll down, click "Close"</li> <li>again, click "Launch demo modal"</li> <li>again, scroll down, click "Close"</li> </ul> <p dir="auto">second time, modal will not close. ESC works.</p>
<p dir="auto">Hi,</p> <p dir="auto">The code used on last Thursday worked fine. But after updated to latest code on Monday (GMT+8), the modal dialog when clicks to dismiss for seconds onward cannot be close.</p> <p dir="auto">I am checking on source code line 932, if I commented out this line then it is working again.</p> <p dir="auto">this.$element<br> .removeClass('in')<br> .attr('aria-hidden', true)<br> //.off('click.dismiss.modal')</p> <p dir="auto">Am I missing anything...?</p> <p dir="auto">Sorry for the grammar. Thanks.</p>
1
<h3 dir="auto">Which website or app were you using when the bug happened?</h3> <p dir="auto">Please provide a link to the URL of the website (if it is public), a CodeSandbox (<a href="https://codesandbox.io/s/new" rel="nofollow">https://codesandbox.io/s/new</a>) example that reproduces the bug, or a project on GitHub that we can checkout and run locally.</p> <h3 dir="auto">What were you doing on the website or app when the bug happened?</h3> <p dir="auto">If possible, please describe how to reproduce this bug on the website or app mentioned above:</p> <ol dir="auto"> <li> </li> <li> </li> <li> </li> </ol> <h3 dir="auto">Generated information</h3> <p dir="auto">DevTools version: 4.13.1-93782cfed2</p> <p dir="auto">Call stack:<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:21499:43<br> at bridge_Bridge.emit (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19607:22)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19767:12<br> at listener (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37788:39)</p> <p dir="auto">Component stack:<br> (none)</p> <p dir="auto">GitHub URL search query:<br> <a href="https://api.github.com/search/issues?q=Cannot%20remove%20node%20%20because%20no%20matching%20node%20was%20found%20in%20the%20Store.%20in%3Atitle%20is%3Aissue%20is%3Aopen%20is%3Apublic%20label%3A%22Component%3A%20Developer%20Tools%22%20repo%3Afacebook%2Freact">https://api.github.com/search/issues?q=Cannot%20remove%20node%20%20because%20no%20matching%20node%20was%20found%20in%20the%20Store.%20in%3Atitle%20is%3Aissue%20is%3Aopen%20is%3Apublic%20label%3A%22Component%3A%20Developer%20Tools%22%20repo%3Afacebook%2Freact</a></p>
<h3 dir="auto">Edit: If you have issues but you did NOT upgrade to 18, or if you upgraded but get confusing errors from dependencies, the problem is likely that some library (incorrectly) specifies <code class="notranslate">@types/react</code> as a dependency with version <code class="notranslate">*</code> rather than an optional peer dependency. Find which library it is and file an issue for it. See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1196695161" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/24304" data-hovercard-type="issue" data-hovercard-url="/facebook/react/issues/24304/hovercard?comment_id=1094565891&amp;comment_type=issue_comment" href="https://github.com/facebook/react/issues/24304#issuecomment-1094565891">#24304 (comment)</a> for diagnostics and common workarounds.</h3> <p dir="auto">A few hours ago, a major version of React types for Typescript was released.</p> <p dir="auto">I have tried to test this right away to see if there are any changes that require adaptation in my own projects.</p> <p dir="auto">Due to a very large number of users using React's type library (we use fundamental types like React.FC by the hundreds in our own projects), it's reasonable to question whether there's been a small mistake here.</p> <p dir="auto">Specifically, the following type declaration still exists in the 18 release.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type PropsWithChildren&lt;P&gt; = P &amp; { children?: ReactNode | undefined };"><pre class="notranslate"><code class="notranslate">type PropsWithChildren&lt;P&gt; = P &amp; { children?: ReactNode | undefined }; </code></pre></div> <p dir="auto">However, this is no longer used in the library, at least not when looking at the diff<br> <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/DefinitelyTyped/DefinitelyTyped/commit/55dc209ceb6dbcd59c4c68cc8dfb77faadd9de12/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/commit/55dc209ceb6dbcd59c4c68cc8dfb77faadd9de12">DefinitelyTyped/DefinitelyTyped@<tt>55dc209</tt></a></p> <p dir="auto">A quick search on Github yields millions of hits that use the type alias React.FC to the actual type React.FunctionalComponent.</p> <p dir="auto">Before</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="interface FunctionComponent&lt;P = {}&gt; { (props: PropsWithChildren&lt;P&gt;, context?: any): ReactElement&lt;any, any&gt; | null; ... }"><pre class="notranslate"><code class="notranslate">interface FunctionComponent&lt;P = {}&gt; { (props: PropsWithChildren&lt;P&gt;, context?: any): ReactElement&lt;any, any&gt; | null; ... } </code></pre></div> <p dir="auto">Now</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="interface FunctionComponent&lt;P = {}&gt; { (props: P, context?: any): ReactElement&lt;any, any&gt; | null; }"><pre class="notranslate"><code class="notranslate">interface FunctionComponent&lt;P = {}&gt; { (props: P, context?: any): ReactElement&lt;any, any&gt; | null; } </code></pre></div> <p dir="auto">I think matching very, very many places in a single project doesn't seem to do justice to the change made; always the property children?: ReactNode to be redefined is definitely too much effort.</p> <p dir="auto"><strong>Positions at which PropsWithChildren were used before</strong></p> <ul dir="auto"> <li>FunctionComponent, as shown in the example</li> <li>ForwardRefRenderFunction,</li> <li>und das Funktions-Interface propsAreEqual von memo</li> </ul> <p dir="auto">Thx!</p>
0
<p dir="auto">Hi,</p> <p dir="auto">In version 0.10.10 intellisense is not working after downloading typescript for the modules which I have downloaded using npm like express, firebase etc. But version 0.10.08 is working fine and I am able to see intellisense working flawlessly.</p>
<p dir="auto">I updated to 0.10.10 today, hoping to try out the new JavaScript support with Salsa. Unfortunately, my Intellisense has stopped working. I am using type definition files from definitely typed (e.g. the express.d.ts).</p> <p dir="auto">For example, using 0.10.8:</p> <p dir="auto">var exp = require("express");<br> exp.Router</p> <p dir="auto">I will see the content assist for the "Router" function and I can visit the definition file by right clicking on "Router" &gt; Go to Definition</p> <p dir="auto">Now when I do the same thing in 0.10.10, I don't see "Router" in the Intellisense list. In addition, the list seems to have variables I had defined earlier in my code (which doesn't apply to express at all).</p>
1
<p dir="auto">By calling</p> <p dir="auto">graph.get_tensor_by_name("output:0")<br> I found that it returns a tensor shaped [batch_size,num],How to test a saved model trained with tf.train.batch ?</p>
<p dir="auto">For an input with an undefined batch size, <code class="notranslate">atrous_conv2d</code> emits tensors where all except the final dimension are undefined:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="input = tf.placeholder(tf.float32, (None, 256, 256, 3)) conv = tf.nn.conv2d(input, tf.zeros((3, 3, 3, 16)), strides=[1, 1, 1, 1], padding='SAME') print(conv.get_shape()) # Correctly displays (?, 256, 256, 16) dilated = tf.nn.atrous_conv2d(input, tf.zeros((3, 3, 3, 16)), rate=2, padding='SAME') print(dilated.get_shape()) # Displays (?, ?, ?, 16)"><pre class="notranslate"><span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">placeholder</span>(<span class="pl-s1">tf</span>.<span class="pl-s1">float32</span>, (<span class="pl-c1">None</span>, <span class="pl-c1">256</span>, <span class="pl-c1">256</span>, <span class="pl-c1">3</span>)) <span class="pl-s1">conv</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">nn</span>.<span class="pl-en">conv2d</span>(<span class="pl-s1">input</span>, <span class="pl-s1">tf</span>.<span class="pl-en">zeros</span>((<span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">16</span>)), <span class="pl-s1">strides</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>], <span class="pl-s1">padding</span><span class="pl-c1">=</span><span class="pl-s">'SAME'</span>) <span class="pl-en">print</span>(<span class="pl-s1">conv</span>.<span class="pl-en">get_shape</span>()) <span class="pl-c"># Correctly displays (?, 256, 256, 16)</span> <span class="pl-s1">dilated</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">nn</span>.<span class="pl-en">atrous_conv2d</span>(<span class="pl-s1">input</span>, <span class="pl-s1">tf</span>.<span class="pl-en">zeros</span>((<span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">16</span>)), <span class="pl-s1">rate</span><span class="pl-c1">=</span><span class="pl-c1">2</span>, <span class="pl-s1">padding</span><span class="pl-c1">=</span><span class="pl-s">'SAME'</span>) <span class="pl-en">print</span>(<span class="pl-s1">dilated</span>.<span class="pl-en">get_shape</span>()) <span class="pl-c"># Displays (?, ?, ?, 16)</span></pre></div> <p dir="auto">(For concrete batch sizes, everything works as expected.)</p> <p dir="auto">Tested on <code class="notranslate">0.10.0rc0</code></p>
0
<p dir="auto"><strong>Apache Airflow version</strong>: None given</p> <p dir="auto">Ticket was created 21/Nov/16 18:35</p> <p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>):</p> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>:</li> <li><strong>OS</strong> (e.g. from /etc/os-release):</li> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li> <li><strong>Install tools</strong>:</li> <li><strong>Others</strong>:<br> <strong>What happened</strong>:</li> </ul> <p dir="auto">We are planning to run around 40,000 tasks a day using airflow and some of them are critical to give quick feedback to developers.</p> <p dir="auto">Currently having execution date to uniquely identify tasks does not work for us since we mainly trigger dags (instead of running them on schedule) we collide with 1 sec granularity on several occasions. Having a task uuid or associating dag_run to task_instance table and using this for scheduling and updating status will help us here.</p> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto"><strong>How to reproduce it</strong>:</p> <p dir="auto"><strong>Anything else we need to know</strong>:</p> <p dir="auto">Moved here from <a href="https://issues.apache.org/jira/browse/AIRFLOW-642" rel="nofollow">https://issues.apache.org/jira/browse/AIRFLOW-642</a></p>
<p dir="auto"><strong>Apache Airflow version</strong>: 1.10.*<br> <strong>Backport packages version</strong>: 2020.10.5rc1</p> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">Although good work has been done to improve the <code class="notranslate">BigQueryInsertJobOperator</code> by the assigning of a <code class="notranslate">job_id</code> based on a combination of <code class="notranslate">dag_id</code>, <code class="notranslate">task_id</code>, <code class="notranslate">execution_date</code> and an additional <code class="notranslate">uniqueness_suffix</code>, other operators that create BigQuery jobs - e.g. <code class="notranslate">GCSToBigQueryOperator </code> - do not take advantage of this but instead still create a job_id based on a timestamp.</p> <p dir="auto"><a href="https://github.com/apache/airflow/blob/master/airflow/providers/google/cloud/hooks/bigquery.py#L1475">https://github.com/apache/airflow/blob/master/airflow/providers/google/cloud/hooks/bigquery.py#L1475</a></p> <p dir="auto">If more than one task based on this operator are launched at the same time, this will cause an error due to a duplication in the job_id.</p> <p dir="auto"><code class="notranslate">Already Exists: Job my-project:EU.airflow_1601894411</code></p> <p dir="auto"><strong>What you expected to happen</strong>:<br> Any task that starts a BigQuery should create a job_id that is unique.</p> <p dir="auto">Perhaps the method of <code class="notranslate">job_id</code> creation needs to move into the BigQuery hook, if possible?<br> <a href="https://github.com/apache/airflow/blob/master/airflow/providers/google/cloud/operators/bigquery.py#L2060">https://github.com/apache/airflow/blob/master/airflow/providers/google/cloud/operators/bigquery.py#L2060</a></p>
0
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2> <p dir="auto">While looking at issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="499503440" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/26971" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26971/hovercard" href="https://github.com/pytorch/pytorch/pull/26971">#26971</a>, I wondered if torch's uniform number generators was generating too many zeros since it generates in average more than 5 zeros per 10^8 generations according to the following:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sum((torch.rand(100000000) &lt;= 0.).sum().float() for i in range(20)) / 20"><pre class="notranslate"><span class="pl-en">sum</span>((<span class="pl-s1">torch</span>.<span class="pl-en">rand</span>(<span class="pl-c1">100000000</span>) <span class="pl-c1">&lt;=</span> <span class="pl-c1">0.</span>).<span class="pl-en">sum</span>().<span class="pl-en">float</span>() <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">20</span>)) <span class="pl-c1">/</span> <span class="pl-c1">20</span></pre></div> <p dir="auto">On GPU, it generates in average around 3 zeros per 10^8 generators:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sum((torch.rand(100000000, device=torch.device('cuda')) &lt;= 0.).sum().float() for i in range(20)) / 20"><pre class="notranslate"><span class="pl-en">sum</span>((<span class="pl-s1">torch</span>.<span class="pl-en">rand</span>(<span class="pl-c1">100000000</span>, <span class="pl-s1">device</span><span class="pl-c1">=</span><span class="pl-s1">torch</span>.<span class="pl-en">device</span>(<span class="pl-s">'cuda'</span>)) <span class="pl-c1">&lt;=</span> <span class="pl-c1">0.</span>).<span class="pl-en">sum</span>().<span class="pl-en">float</span>() <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">20</span>)) <span class="pl-c1">/</span> <span class="pl-c1">20</span></pre></div> <p dir="auto">If you do the same test with NumPy, you will see that it never generates zeros:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sum((np.random.rand(100000000).astype('float32') &lt;= 0.).sum() for i in range(20)) / 20"><pre class="notranslate"><span class="pl-en">sum</span>((<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">100000000</span>).<span class="pl-en">astype</span>(<span class="pl-s">'float32'</span>) <span class="pl-c1">&lt;=</span> <span class="pl-c1">0.</span>).<span class="pl-en">sum</span>() <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">20</span>)) <span class="pl-c1">/</span> <span class="pl-c1">20</span></pre></div> <p dir="auto">(if you try with <code class="notranslate">'float16'</code> instead of <code class="notranslate">'float32'</code>, you will see that it generates some zeros)<br> Thus, I think that PyTorch's generator might be biased towards zero and this may hide other biases that I'm not aware.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">See above.</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">In my opinion, the behavior should be similar to NumPy's unless NumPy has a bug instead.</p> <h2 dir="auto">Environment</h2> <p dir="auto">Collecting environment information...<br> PyTorch version: 1.2.0<br> Is debug build: No<br> CUDA used to build PyTorch: 10.0.130</p> <p dir="auto">OS: Ubuntu 18.04.3 LTS<br> GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0<br> CMake version: Could not collect</p> <p dir="auto">Python version: 3.6<br> Is CUDA available: Yes<br> CUDA runtime version: 9.1.85<br> GPU models and configuration:<br> GPU 0: GeForce GTX 1080 Ti<br> GPU 1: GeForce GTX 1080 Ti<br> GPU 2: GeForce GT 1030</p> <p dir="auto">Nvidia driver version: 430.26<br> cuDNN version: Could not collect</p> <p dir="auto">Versions of relevant libraries:<br> [pip3] msgpack-numpy==0.4.3.1<br> [pip3] numpy==1.16.2<br> [pip3] numpydoc==0.8.0<br> [pip3] torch==1.2.0<br> [pip3] torchvision==0.4.0a0+6b959ee<br> [conda] blas 1.0 mkl<br> [conda] mkl 2019.1 144<br> [conda] mkl-service 1.1.2 py36he904b0f_5<br> [conda] mkl_fft 1.0.10 py36ha843d7b_0<br> [conda] mkl_random 1.0.2 py36hd81dba3_0<br> [conda] pytorch 1.2.0 py3.6_cuda10.0.130_cudnn7.6.2_0 pytorch<br> [conda] torch 1.1.0 pypi_0 pypi<br> [conda] torchvision 0.2.1 pypi_0 pypi</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2> <p dir="auto">When using uniformly-distributed random number generation, especially using <code class="notranslate">float32</code>, over a range including 0, the sampling code ignores the extra precision of floating-point around 0, leading to very bad sampling.</p> <p dir="auto">The generated floats also have at most 24 (<code class="notranslate">float32</code>) or 53 (<code class="notranslate">float64</code>) bits of entropy.</p> <p dir="auto"><strong>Consequence 1:</strong> Multiplying any PyTorch float32 <code class="notranslate">uniform_(0,1)</code> by a large integer like <code class="notranslate">2**33</code> is guaranteed to give an integer.<br> <strong>Consequence 2:</strong> It is actually possible to generate an exact <code class="notranslate">0.0</code> using the <code class="notranslate">float32</code> <strong><code class="notranslate">uniform_(0,1)</code>,</strong> with probability 2**-24, whereas that should actually have been 2**-149.<br> <strong>Consequence 3:</strong> It is not possible to generate a <code class="notranslate">float32</code> strictly between <code class="notranslate">0.0</code> and <code class="notranslate">2**-24</code> with <code class="notranslate">uniform_(0,1)</code>, whereas it should have been possible with probability 2**-24.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto"><em>Test 1:</em> If the following is <code class="notranslate">!= 0</code>, the RNG sucks: <code class="notranslate">torch.FloatTensor(int(1e8)).uniform_().eq(0).sum()</code><br> <em>Test 2:</em> If the following is <code class="notranslate">== -inf</code>, the RNG sucks: <code class="notranslate">torch.FloatTensor(int(1e8)).uniform_().log().sum()</code></p> <h2 dir="auto">Expected behavior</h2> <p dir="auto"><em>Test 1:</em> A return of <code class="notranslate">0</code>.<br> <em>Test 2:</em> A finite, negative value.</p> <h2 dir="auto">Environment</h2> <p dir="auto"><em>Not relevant.</em></p> <ul dir="auto"> <li>PyTorch Version 1.1.0a0+c865d46, but the same problem dates back to the beginning of the history of this code, which is over a year.</li> </ul> <h2 dir="auto">Additional context</h2> <p dir="auto">This has serious knock-on effects on many other distributions that use <code class="notranslate">uniform_()</code> as a basis. In particular, <code class="notranslate">log(uniform_())</code> has a 2**-24 chance of producing <code class="notranslate">-inf</code>, and <code class="notranslate">log2(uniform_())</code> cannot produce a number <code class="notranslate">&lt; -24</code> (except <code class="notranslate">-inf</code>).</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pbelevich/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pbelevich">@pbelevich</a></p>
1
<p dir="auto">Here's a sample code to illustrate the problem which stems from a case sensitive string matching somewhere in the code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package main import ( &quot;fmt&quot; &quot;path/filepath&quot; ) func main() { a,_ := filepath.Glob(&quot;c:\\users\\*\\appdata&quot;) fmt.Println(a) //this prints [] b,_ := filepath.Glob(&quot;c:\\users\\*\\AppData&quot;) fmt.Println(b) //this prints [c:\users\Default\Appdata ...] }"><pre class="notranslate"><code class="notranslate">package main import ( "fmt" "path/filepath" ) func main() { a,_ := filepath.Glob("c:\\users\\*\\appdata") fmt.Println(a) //this prints [] b,_ := filepath.Glob("c:\\users\\*\\AppData") fmt.Println(b) //this prints [c:\users\Default\Appdata ...] } </code></pre></div> <p dir="auto">Because file and directory names in Windows are case insensitive therefore this is a bug.</p> <p dir="auto">Please note that before the asterisk(*) the path name does not have to match case but after the asterisk it doesn't provide any results if the case doesn't match.</p>
<pre class="notranslate">Here are two functions that won't compile: func f(x int) bool { if x &gt; 5 { return true } else { return false } } func g(x int) bool { switch { case x &gt; 5: return true default: return false } } Isn't it possible to make these compile? Perhaps I'm being naive, but if the last statement in a function that requires a return is an if or a switch and the if has an else with a return or the switch has a default with a return isn't that sufficient to know that the function will work? Or are you having to allow for gotos or something else subverting the flow of control?</pre>
0
<p dir="auto">I have this simple code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import * as React from &quot;react&quot;; import * as ReactDOM from &quot;react-dom&quot;; ReactDOM.render(&lt;div&gt;Hi&lt;/div&gt;, document.getElementById(&quot;root&quot;));"><pre class="notranslate"><code class="notranslate">import * as React from "react"; import * as ReactDOM from "react-dom"; ReactDOM.render(&lt;div&gt;Hi&lt;/div&gt;, document.getElementById("root")); </code></pre></div> <p dir="auto">that is giving me this error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Argument of type 'Element' is not assignable to parameter of type 'ReactElement&lt;any&gt;[]'. Property 'length' is missing in type 'Element'."><pre class="notranslate"><code class="notranslate">Argument of type 'Element' is not assignable to parameter of type 'ReactElement&lt;any&gt;[]'. Property 'length' is missing in type 'Element'. </code></pre></div> <p dir="auto">I've currently tried these versions of react and react-dom:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;react&quot;: &quot;16.4.2&quot;, &quot;react-dom&quot;: &quot;16.4.2&quot;, &quot;@types/react&quot;: &quot;16.4.7&quot;, &quot;@types/react-dom&quot;: &quot;16.0.6&quot;,"><pre class="notranslate"><code class="notranslate">"react": "16.4.2", "react-dom": "16.4.2", "@types/react": "16.4.7", "@types/react-dom": "16.0.6", </code></pre></div> <p dir="auto">and</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;react&quot;: &quot;16.4.0&quot;, &quot;react-dom&quot;: &quot;16.4.0&quot;, &quot;@types/react&quot;: &quot;16.3.17&quot;, &quot;@types/react-dom&quot;: &quot;16.0.6&quot;,"><pre class="notranslate"><code class="notranslate">"react": "16.4.0", "react-dom": "16.4.0", "@types/react": "16.3.17", "@types/react-dom": "16.0.6", </code></pre></div> <p dir="auto">I'd like to have react 16, but I'm not sure what the typing issue is here.</p>
<p dir="auto">Below are examples of mistakes I make all the time. For that reason, I would really like for these to be type errors, so I can catch these mistakes earlier.</p> <p dir="auto">IIUC, the reason these are not type errors is because the <code class="notranslate">children</code>/<code class="notranslate">ReactNode</code> type includes <code class="notranslate">{}</code>, which allows almost anything through. That begs the question, can we remove <code class="notranslate">{}</code>, or is there a valid reason to keep it?</p> <h4 dir="auto">Passing a function as a React child (forgot to call the function)</h4> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as React from 'react'; import { FC } from 'react'; const renderChildren = () =&gt; 'foo' declare const MyComponent: FC&lt;{}&gt;; // Oops! We forgot to call this function. But we got no type error :-( &lt;MyComponent&gt;{renderChildren}&lt;/MyComponent&gt;; // Should be: // &lt;MyComponent&gt;{renderChildren()}&lt;/MyComponent&gt;;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-smi">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">FC</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-en">renderChildren</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s">'foo'</span> <span class="pl-k">declare</span> <span class="pl-k">const</span> <span class="pl-smi">MyComponent</span>: <span class="pl-smi">FC</span><span class="pl-kos">&lt;</span><span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-c">// Oops! We forgot to call this function. But we got no type error :-(</span> <span class="pl-c1">&lt;</span><span class="pl-smi">MyComponent</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-s1">renderChildren</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">MyComponent</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-c">// Should be:</span> <span class="pl-c">// &lt;MyComponent&gt;{renderChildren()}&lt;/MyComponent&gt;;</span></pre></div> <h4 dir="auto">Passing an <code class="notranslate">Option</code> as a React child (forgot to serialize/decode)</h4> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as React from 'react'; import { FC } from 'react'; type Option&lt;T&gt; = { value: T, orNull: () =&gt; T | null } declare const myOption: Option&lt;string&gt; declare const MyComponent: FC&lt;{}&gt;; // Oops! We forgot to serialize/decode this `Option`. But we got no type error :-( &lt;MyComponent&gt;{myOption}&lt;/MyComponent&gt;; // Should be: // &lt;MyComponent&gt;{myOption.orNull()}&lt;/MyComponent&gt;;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-smi">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">FC</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">type</span> <span class="pl-smi">Option</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">value</span>: <span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-c1">orNull</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">T</span> <span class="pl-c1">|</span> <span class="pl-c1">null</span> <span class="pl-kos">}</span> <span class="pl-k">declare</span> <span class="pl-k">const</span> <span class="pl-s1">myOption</span>: <span class="pl-smi">Option</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-kos">&gt;</span> <span class="pl-k">declare</span> <span class="pl-k">const</span> <span class="pl-smi">MyComponent</span>: <span class="pl-smi">FC</span><span class="pl-kos">&lt;</span><span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-c">// Oops! We forgot to serialize/decode this `Option`. But we got no type error :-(</span> <span class="pl-c1">&lt;</span><span class="pl-smi">MyComponent</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-s1">myOption</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">MyComponent</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-c">// Should be:</span> <span class="pl-c">// &lt;MyComponent&gt;{myOption.orNull()}&lt;/MyComponent&gt;;</span></pre></div> <hr> <p dir="auto">One workaround I know of is to explicitly define the <code class="notranslate">children</code> prop:</p> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as React from 'react'; import { FC } from 'react'; const renderChildren = () =&gt; 'foo' declare const MyComponent: FC&lt;{ children: string }&gt;; // Oops! We forgot to call this function. We got a type error :-) &lt;MyComponent&gt;{renderChildren}&lt;/MyComponent&gt;; // Should be: &lt;MyComponent&gt;{renderChildren()}&lt;/MyComponent&gt;;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-smi">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">FC</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-en">renderChildren</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s">'foo'</span> <span class="pl-k">declare</span> <span class="pl-k">const</span> <span class="pl-smi">MyComponent</span>: <span class="pl-smi">FC</span><span class="pl-kos">&lt;</span><span class="pl-kos">{</span> <span class="pl-c1">children</span>: <span class="pl-smi">string</span> <span class="pl-kos">}</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-c">// Oops! We forgot to call this function. We got a type error :-)</span> <span class="pl-c1">&lt;</span><span class="pl-smi">MyComponent</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-s1">renderChildren</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">MyComponent</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-c">// Should be:</span> <span class="pl-c1">&lt;</span><span class="pl-smi">MyComponent</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-en">renderChildren</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">MyComponent</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span></pre></div> <p dir="auto">However I hoped this wouldn't be necessary. That also doesn't help when passing children to a DOM component:</p> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Oops! We forgot to call this function. But we got no type error :-( &lt;div&gt;{renderChildren}&lt;/div&gt;;"><pre class="notranslate"><span class="pl-c">// Oops! We forgot to call this function. But we got no type error :-(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-s1">renderChildren</span><span class="pl-kos">}</span><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></pre></div> <hr> <p dir="auto">If you know how to fix the issue, make a pull request instead.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/xxxx</code> package and had problems.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond. <ul dir="auto"> <li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/johnnyreilly/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/johnnyreilly">@johnnyreilly</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bbenezech/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bbenezech">@bbenezech</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pzavolinsky/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pzavolinsky">@pzavolinsky</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/digiguru/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/digiguru">@digiguru</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ericanderson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ericanderson">@ericanderson</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tkrotoff/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tkrotoff">@tkrotoff</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DovydasNavickas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DovydasNavickas">@DovydasNavickas</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/onigoetz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/onigoetz">@onigoetz</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/theruther4d/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/theruther4d">@theruther4d</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/guilhermehubner/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/guilhermehubner">@guilhermehubner</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ferdaber/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ferdaber">@ferdaber</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jrakotoharisoa/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jrakotoharisoa">@jrakotoharisoa</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pascaloliv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pascaloliv">@pascaloliv</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Hotell/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Hotell">@Hotell</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/franklixuefei/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/franklixuefei">@franklixuefei</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Jessidhia/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Jessidhia">@Jessidhia</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/saranshkataria/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/saranshkataria">@saranshkataria</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lukyth/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lukyth">@lukyth</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/eps1lon/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eps1lon">@eps1lon</a></li> </ul> </li> </ul> <p dir="auto">If you do not mention the authors the issue will be ignored.</p>
0
<p dir="auto">reproduce - Goto<br> <a href="http://getbootstrap.com/javascript/#modals" rel="nofollow">http://getbootstrap.com/javascript/#modals</a></p> <p dir="auto">try to open and close "Launch Demo Modal" Twice using button</p> <p dir="auto">Escape key works (ie keyboard) but data-dismiss="modal" fails</p> <p dir="auto">Worked in RC1</p> <p dir="auto">Regards,<br> Mike</p>
<p dir="auto">Hi,</p> <p dir="auto">The code used on last Thursday worked fine. But after updated to latest code on Monday (GMT+8), the modal dialog when clicks to dismiss for seconds onward cannot be close.</p> <p dir="auto">I am checking on source code line 932, if I commented out this line then it is working again.</p> <p dir="auto">this.$element<br> .removeClass('in')<br> .attr('aria-hidden', true)<br> //.off('click.dismiss.modal')</p> <p dir="auto">Am I missing anything...?</p> <p dir="auto">Sorry for the grammar. Thanks.</p>
1
<p dir="auto">The Autocomplete demo suggestion container takes up room even when not in use</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Put two autocompletes above each other (or any other element below an autocomplete) and it will sit flush against the bottom</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">There is around a 200px height gap between autocomplete and the control below</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto"><a href="https://codesandbox.io/s/mj5q02oo58" rel="nofollow">https://codesandbox.io/s/mj5q02oo58</a></p> <ol dir="auto"> <li>Load codesandbox</li> <li>See two autocompletes</li> <li>Note that there is a large gap between the two</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">I fixed it by changing the css. I removed the <code class="notranslate">container</code> key and changed <code class="notranslate">suggestionsContainerOpen</code> to the following.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="suggestionsContainerOpen: { flexGrow: 1, position: 'relative', minHeight: 200, marginTop: theme.spacing.unit, marginBottom: theme.spacing.unit * 3, left: 0, right: 0, },"><pre class="notranslate"><code class="notranslate">suggestionsContainerOpen: { flexGrow: 1, position: 'relative', minHeight: 200, marginTop: theme.spacing.unit, marginBottom: theme.spacing.unit * 3, left: 0, right: 0, }, </code></pre></div> <p dir="auto">So this is not impacting me. However, your Component Demos are awesome and this caused me some confusion. For future visitors it might be nice to change this behavior.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0 beta 22</td> </tr> </tbody> </table>
<p dir="auto">I was wondering, if it would be better if we move the <code class="notranslate">selected</code> prop from the <code class="notranslate">MenuItem</code> directly to the <code class="notranslate">ListItem</code>.</p> <p dir="auto">I was using the <code class="notranslate">Drawer</code> component and I wanted to show the user which <code class="notranslate">ListItem</code> was active in the <code class="notranslate">Drawer</code>. So I thought I make it <code class="notranslate">selected</code>, but than I realized the ListItem has no <code class="notranslate">selected</code> prop, but I remebered that the <code class="notranslate">MenuItem</code> has this prop. I looked into the code and saw that the <code class="notranslate">MenuItem</code> is basicly a <code class="notranslate">ListItem</code>.</p> <p dir="auto">If we do not think this is a good idea, we should at least tell the user in the docs, when he wants to make a <code class="notranslate">ListItem</code> <code class="notranslate">selected</code> he should use a <code class="notranslate">MenuItem</code> instead.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>v1.0.0-beta.16</td> </tr> </tbody> </table>
0
<p dir="auto">After updating Deno to latest version 1.2.0 I got 2 errors:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="error: TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'. Type 'URL' is not assignable to type 'string'. return new URL(url).pathname ~~~ at https://deno.land/[email protected]/path/win32.ts:911:18 TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'. Type 'URL' is not assignable to type 'string'. return new URL(url).pathname; ~~~ at https://deno.land/[email protected]/path/posix.ts:433:18 Found 2 errors."><pre class="notranslate">error: TS2345 [ERROR]: Argument of <span class="pl-c1">type</span> <span class="pl-s"><span class="pl-pds">'</span>string | URL<span class="pl-pds">'</span></span> is not assignable to parameter of <span class="pl-c1">type</span> <span class="pl-s"><span class="pl-pds">'</span>string<span class="pl-pds">'</span></span>. Type <span class="pl-s"><span class="pl-pds">'</span>URL<span class="pl-pds">'</span></span> is not assignable to <span class="pl-c1">type</span> <span class="pl-s"><span class="pl-pds">'</span>string<span class="pl-pds">'</span></span>. <span class="pl-k">return</span> new URL(url).pathname <span class="pl-k">~</span>~~ at https://deno.land/[email protected]/path/win32.ts:911:18 TS2345 [ERROR]: Argument of <span class="pl-c1">type</span> <span class="pl-s"><span class="pl-pds">'</span>string | URL<span class="pl-pds">'</span></span> is not assignable to parameter of <span class="pl-c1">type</span> <span class="pl-s"><span class="pl-pds">'</span>string<span class="pl-pds">'</span></span>. Type <span class="pl-s"><span class="pl-pds">'</span>URL<span class="pl-pds">'</span></span> is not assignable to <span class="pl-c1">type</span> <span class="pl-s"><span class="pl-pds">'</span>string<span class="pl-pds">'</span></span>. <span class="pl-k">return</span> new URL(url).pathname<span class="pl-k">;</span> <span class="pl-k">~</span>~~ at https://deno.land/[email protected]/path/posix.ts:433:18 Found 2 errors.</pre></div> <p dir="auto">I have global deps.ts file with dependencies but are actual @0.61.0<br> Also I tried run with argument <code class="notranslate">-L debug</code> but no more information.<br> Any ideas what i can do to locate problem ?</p>
<p dir="auto">After upgrading to 1.2.0, running deno, will fail with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Check file:///Users/xxxxxxx/yyyyyyy/code/src/github.com/nats-io/nats.deno/.deno.test.ts error: TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'. Type 'URL' is not assignable to type 'string'. return new URL(url).pathname ~~~ at https://deno.land/std/path/win32.ts:917:18 TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'. Type 'URL' is not assignable to type 'string'. return new URL(url).pathname; ~~~ at https://deno.land/std/path/posix.ts:438:18 Found 2 errors."><pre lang="✘130" class="notranslate"><code class="notranslate">Check file:///Users/xxxxxxx/yyyyyyy/code/src/github.com/nats-io/nats.deno/.deno.test.ts error: TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'. Type 'URL' is not assignable to type 'string'. return new URL(url).pathname ~~~ at https://deno.land/std/path/win32.ts:917:18 TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'. Type 'URL' is not assignable to type 'string'. return new URL(url).pathname; ~~~ at https://deno.land/std/path/posix.ts:438:18 Found 2 errors. </code></pre></div> <p dir="auto">There's a single reference to URL on a constructor in my project:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" let url = new URL(u); if (!url.port) { url.port = `${DEFAULT_PORT}`; ..."><pre class="notranslate"><code class="notranslate"> let url = new URL(u); if (!url.port) { url.port = `${DEFAULT_PORT}`; ... </code></pre></div> <p dir="auto">This is on OS X.</p>
1
<h3 dir="auto">Preflight Checklist</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li> </ul> <h3 dir="auto">Electron Version</h3> <p dir="auto">12.0.1</p> <h3 dir="auto">What operating system are you using?</h3> <p dir="auto">Windows</p> <h3 dir="auto">Operating System Version</h3> <p dir="auto">Windows 10 Enterprise build no. 19041</p> <h3 dir="auto">What arch are you using?</h3> <p dir="auto">x64</p> <h3 dir="auto">Last Known Working Electron version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">When I print a pdf using print({ silent: true, printBackground: true }) } I expect for it to work and print without showing dialog box of printing options, but use the default print configuration.</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">It does not print but remains stuck if default print option is print. If I set it to Microsoft Print to Pdf, it prints an empty doc.</p> <p dir="auto">If I use executeJavaScript('window.print({ silent: true, printBackground: true })'), it prints but it is not silent. This problem exists only with pdf.<br> I updated electron version to 13.0.0 but there the pdf view does not work also, it stucks showing blank pages, so I had to downgrade.</p> <p dir="auto">Silent pdf printing is a very important feature and I have seen other people asking about it, but still no solution.</p> <h3 dir="auto">Testcase Gist URL</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Additional Information</h3> <p dir="auto"><em>No response</em></p>
<ul dir="auto"> <li>Electron version: 1.6.13</li> <li>Operating system: MacOS High Sierra</li> </ul> <h3 dir="auto">Expected behavior</h3> <p dir="auto">With Developer Tools open, close frameless window should performs correctly.</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/31855269/34165621-cb6adfa8-e4aa-11e7-93c5-dccf255070da.gif"><img src="https://user-images.githubusercontent.com/31855269/34165621-cb6adfa8-e4aa-11e7-93c5-dccf255070da.gif" alt="window-retain" data-animated-image="" style="max-width: 100%;"></a></p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">Create a frameless window with titlebar &amp; closeButton. Then openDevTools as an independent window. Close the main window directly, the window resource seems retains.</p>
0
<p dir="auto">Celery workers become stuck/deadlocked when using Redis broker in Celery 3.1.17.<br> Reproduced in 3.1.0 and 3.1.16 as well.</p> <p dir="auto"><strong>Issue does not occur in current Celery master (3.2.0a2).</strong><br> <strong>Issue does not occur with RabbitMQ as broker.</strong><br> <strong>Reproducable on Linux and Mac OS.</strong></p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Scientific Linux release 6.5 or Mac OS 10.10.2</li> <li>Python 2.7.9</li> <li>Redis 2.8.9</li> <li>Celery 3.1.0, 3.1.16, 3.1.17</li> <li>virtualenv 12.0.5</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:3.1.17 (Cipater) kombu:3.0.24 py:2.7.9 billiard:3.3.0.19 redis:2.10.3 platform -&gt; system:Linux arch:64bit, ELF imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:redis results:disabled BROKER_URL: 'redis://localhost:6380/0'"><pre class="notranslate"><code class="notranslate">software -&gt; celery:3.1.17 (Cipater) kombu:3.0.24 py:2.7.9 billiard:3.3.0.19 redis:2.10.3 platform -&gt; system:Linux arch:64bit, ELF imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:redis results:disabled BROKER_URL: 'redis://localhost:6380/0' </code></pre></div> <p dir="auto"><strong>redis.conf</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# close the connection after a client is idle for N seconds timeout 0"><pre class="notranslate"><code class="notranslate"># close the connection after a client is idle for N seconds timeout 0 </code></pre></div> <p dir="auto"><strong>celeryconfig.py</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="BROKER_URL = 'redis://localhost:6380/0'"><pre class="notranslate"><code class="notranslate">BROKER_URL = 'redis://localhost:6380/0' </code></pre></div> <p dir="auto"><strong>tasks.py</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from celery import Celery import celeryconfig import time app = Celery('tasks') app.config_from_object(celeryconfig) @app.task def myTask(id): return id"><pre class="notranslate"><code class="notranslate">from celery import Celery import celeryconfig import time app = Celery('tasks') app.config_from_object(celeryconfig) @app.task def myTask(id): return id </code></pre></div> <p dir="auto"><strong>test_client.py</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from multiprocessing import Pool from tasks import myTask def run(task_id): myTask.delay(1) num_tasks = 20000 pool = Pool(processes=4) pool.map(run, xrange(num_tasks)) pool.close() pool.join()"><pre class="notranslate"><code class="notranslate">from multiprocessing import Pool from tasks import myTask def run(task_id): myTask.delay(1) num_tasks = 20000 pool = Pool(processes=4) pool.map(run, xrange(num_tasks)) pool.close() pool.join() </code></pre></div> <h3 dir="auto">Reproducing</h3> <ol dir="auto"> <li>Ran test_client.py to submit 20K tasks.</li> <li>Started two concurrent workers (<code class="notranslate">-Ofair</code> doesn't make a difference):</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery -A tasks worker --loglevel=DEBUG --concurrency=3 [-Ofair]"><pre class="notranslate"><code class="notranslate">celery -A tasks worker --loglevel=DEBUG --concurrency=3 [-Ofair] </code></pre></div> <ol dir="auto"> <li>After ~10-20K of processed tasks, workers stuck/deadlocked.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2015-01-21 17:40:31,304: DEBUG/MainProcess] Task accepted: tasks.regulatorTask[6d2be28f-4d97-43b3-84dd-ad28b3a9d0f7] pid:13242 [2015-01-21 17:40:31,305: DEBUG/MainProcess] Task accepted: tasks.regulatorTask[6d798559-3e1e-4fe8-a813-065696d8a1df] pid:13243 [2015-01-21 17:40:31,306: INFO/MainProcess] Received task: tasks.regulatorTask[6adbe350-2d5e-4a92-89d9-4bbd63973aa6] [2015-01-21 17:40:31,306: DEBUG/MainProcess] TaskPool: Apply &lt;function _fast_trace_task at 0x7f3436baf848&gt; (args:('tasks.regulatorTask', '6adbe350-2d5e-4a92-89d9-4bbd63973aa6', (1,), {}, {'utc': True, u'is_eager': False, 'chord': None, u'group': None, 'args': (1,), 'retries': 0, u'delivery_info': {u'priority': 0, u'redelivered': None, u'routing_key': u'celery', u'exchange': u'celery'}, 'expires': None, u'hostname': '[email protected]', 'task': 'tasks.regulatorTask', 'callbacks': None, u'correlation_id': u'6adbe350-2d5e-4a92-89d9-4bbd63973aa6', 'errbacks': None, 'timelimit': (None, None), 'taskset': None, 'kwargs': {}, 'eta': None, u'reply_to': u'7d9537ab-0a15-34eb-afa2-aafc60e63b1a', 'id': '6adbe350-2d5e-4a92-89d9-4bbd63973aa6', u'headers': {}}) kwargs:{}) [2015-01-21 17:40:31,307: INFO/MainProcess] Task tasks.regulatorTask[6d2be28f-4d97-43b3-84dd-ad28b3a9d0f7] succeeded in 0.00572886499867s: 1 [2015-01-21 17:40:31,308: INFO/MainProcess] Task tasks.regulatorTask[6d798559-3e1e-4fe8-a813-065696d8a1df] succeeded in 0.00644170500163s: 1"><pre class="notranslate"><code class="notranslate">[2015-01-21 17:40:31,304: DEBUG/MainProcess] Task accepted: tasks.regulatorTask[6d2be28f-4d97-43b3-84dd-ad28b3a9d0f7] pid:13242 [2015-01-21 17:40:31,305: DEBUG/MainProcess] Task accepted: tasks.regulatorTask[6d798559-3e1e-4fe8-a813-065696d8a1df] pid:13243 [2015-01-21 17:40:31,306: INFO/MainProcess] Received task: tasks.regulatorTask[6adbe350-2d5e-4a92-89d9-4bbd63973aa6] [2015-01-21 17:40:31,306: DEBUG/MainProcess] TaskPool: Apply &lt;function _fast_trace_task at 0x7f3436baf848&gt; (args:('tasks.regulatorTask', '6adbe350-2d5e-4a92-89d9-4bbd63973aa6', (1,), {}, {'utc': True, u'is_eager': False, 'chord': None, u'group': None, 'args': (1,), 'retries': 0, u'delivery_info': {u'priority': 0, u'redelivered': None, u'routing_key': u'celery', u'exchange': u'celery'}, 'expires': None, u'hostname': '[email protected]', 'task': 'tasks.regulatorTask', 'callbacks': None, u'correlation_id': u'6adbe350-2d5e-4a92-89d9-4bbd63973aa6', 'errbacks': None, 'timelimit': (None, None), 'taskset': None, 'kwargs': {}, 'eta': None, u'reply_to': u'7d9537ab-0a15-34eb-afa2-aafc60e63b1a', 'id': '6adbe350-2d5e-4a92-89d9-4bbd63973aa6', u'headers': {}}) kwargs:{}) [2015-01-21 17:40:31,307: INFO/MainProcess] Task tasks.regulatorTask[6d2be28f-4d97-43b3-84dd-ad28b3a9d0f7] succeeded in 0.00572886499867s: 1 [2015-01-21 17:40:31,308: INFO/MainProcess] Task tasks.regulatorTask[6d798559-3e1e-4fe8-a813-065696d8a1df] succeeded in 0.00644170500163s: 1 </code></pre></div> <p dir="auto"><code class="notranslate">strace</code> indicates workers blocking on I/O read from Redis</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Process 13241 attached - interrupt to quit read(13, Process 13242 attached - interrupt to quit read(17, Process 13243 attached - interrupt to quit read(9,"><pre class="notranslate"><code class="notranslate">Process 13241 attached - interrupt to quit read(13, Process 13242 attached - interrupt to quit read(17, Process 13243 attached - interrupt to quit read(9, </code></pre></div> <h3 dir="auto">Notables</h3> <ul dir="auto"> <li>adding a connection <code class="notranslate">timeout</code> in Redis will cause deadlock to release after timeout period</li> <li>specifying a <code class="notranslate">CELERYD_TASK_TIME_LIMIT</code> does not prevent/release the deadlock</li> <li>single worker execution (<code class="notranslate">--concurrency=1</code>) works properly</li> </ul>
<p dir="auto">So I have been battling this issue for a few days now but it's really hard to figure out exactly what causes it. I had a repro for a day on an amazon machine but unfortunately it was a spot instance and I no longer have access to it. I tried to make another repro on the weekend and failed. Here is what I'm observing:</p> <ul dir="auto"> <li>two amazon machines (does not matter if in vpc or not)</li> <li>install redis on one, celery on the other</li> <li>run celery with four prefork workers</li> <li>spam the queue with lots of tasks</li> </ul> <p dir="auto">After some period of time everything will lock up. Ways I have seen this recover:</p> <ul dir="auto"> <li>restart celery</li> <li><code class="notranslate">CLIENT KILL</code> from the redis server (this will trigger some epoll errors).</li> </ul> <p dir="auto">We have a customer who also seems to have a related issue but it recovers after 30 minutes. I have not have a way to reproduce this issue, but it might be related to the client timeout on redis.</p> <p dir="auto">Things I know other than that:</p> <ul dir="auto"> <li>strace: when it hangs, it's trying to read from a redis socket.</li> <li>the read is _read_from_socket in SocketBuffer in py-redis</li> <li>changing timeouts on the redis side changes nothing</li> <li>enabling keepalives changes nothing</li> <li>a dummy python script that does BLPOP in a loop against the redis server with a second script that puts items into the queue does not get stuck.</li> </ul> <p dir="auto">I have a few theories on what this could be but I'm honestly at the end of my understanding of the issue. What I see is that kombu internally catches down random epoll errors and when I add some prints there I can see that I get epoll errors even though the socket seems alive and happy. I'm wondering if it could be possible that for some reason wrong fds are attempted to be registered with that thing.</p> <p dir="auto">Versions used:</p> <ul dir="auto"> <li>kombu==3.0.26</li> <li>celery==3.1.18</li> <li>redis==2.10.3</li> <li>Redis server: 3.0.4</li> <li>Happens with at least ubuntu 14.04</li> </ul> <p dir="auto">I have since tried to reproduce this again on another amazon machine and it does not appear to happen. I'm not entirely sure what triggers it but it seems like the socket py-redis tries to read from is not what it thinks it is. The socket was from what I can tell in ESTABLISHED.</p> <p dir="auto">I'm completely out of ideas how to continue debugging this especially because it's impossible for me to reproduce on anything other than this particular amazon machine. It does not appear on OS X, on two linux VMs running in virtualbox, not happening from one of my linux servers on hetzner to another one there and I could also not reproduce it form hetzner to amazon though in that particular case I saw some other artifacts that might have prevented debugging this (in particular the performance was quite bad and it continued on for a day without incidents).</p> <p dir="auto">I first thought this mighe be <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="26829016" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/1845" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/1845/hovercard" href="https://github.com/celery/celery/issues/1845">#1845</a> but from what I can tell there is no high CPU usage involved. It just blocks on a read. If I can help in any way with investigating this further, please let me know.</p>
1
<p dir="auto">Navbar dropdown links work fine normally in Chrome, but when navbar is collapsed links do not have any hover state and clicking on links just collapses the dropdown menu.</p> <p dir="auto">JSFiddle is here.. <a href="http://jsfiddle.net/richyclarke/urbnD/3/" rel="nofollow">http://jsfiddle.net/richyclarke/urbnD/3/</a></p> <p dir="auto">Collapse the navbar by reducing the frame size and try to click on the 'IBM' link under the main navbar li 'Links'. It works in Internet Explorer (IE10 and maybe others) but not in Chrome (latest), Firefox (latest) or IOS devices (Chrome or Safari browser on iPad or iPhone)</p> <p dir="auto">This used to work in Bootstrap 2.1.x but has stopped working since 2.2.0 and still doesn't work in 2.3.x</p>
<p dir="auto">I had a project using more or less the same menu and it worked. Found out it was using Bootstrap version 2.3.1. Compared version 2.3.2 and 2.3.1 and found that in version 2.3.2 there's this snippet of CSS that reads:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".dropdown-backdrop { position: fixed; left: 0; right: 0; bottom: 0; top: 0; z-index: 990; }"><pre class="notranslate"><code class="notranslate">.dropdown-backdrop { position: fixed; left: 0; right: 0; bottom: 0; top: 0; z-index: 990; } </code></pre></div> <p dir="auto">and the rule: <code class="notranslate">position: fixed;</code> seems to cause all the problems.</p> <p dir="auto">I still don't undertand the point of the markup that is added by the bootstrap dropdown plugin:</p> <p dir="auto"><code class="notranslate">&lt;div class="dropdown-backdrop"&gt;&lt;/div&gt;</code></p> <p dir="auto">So I've temporarily fixed the bug on my end by adding a style to override the style causing the problem:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".dropdown-backdrop { position: static; }"><pre class="notranslate"><code class="notranslate">.dropdown-backdrop { position: static; } </code></pre></div> <p dir="auto">To me this looks like a bug introduced from version 2.3.1 to 2.3.2. Maybe I'm wrong. If someone could explain the purpose of the empty div, it would be helpful.</p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=golliwog" rel="nofollow">Julian Sareyka</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8849?redirect=false" rel="nofollow">SPR-8849</a></strong> and commented</p> <p dir="auto">Hi,<br> I use an embedded database (HSQL) in my integration test suite. Its a maven project with TestNG.</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;jdbc:embedded-database id=&quot;mirDataSource&quot;&gt; &lt;jdbc:script location=&quot;classpath:db/schema.sql&quot; /&gt; &lt;jdbc:script location=&quot;classpath:db/tables_hsqldb.sql&quot; /&gt; &lt;jdbc:script location=&quot;classpath:db/package_verweildauer.sql&quot; /&gt; &lt;jdbc:script location=&quot;classpath:db/data.sql&quot; /&gt; &lt;/jdbc:embedded-database&gt;"><pre class="notranslate">&lt;<span class="pl-ent">jdbc</span><span class="pl-ent">:</span><span class="pl-ent">embedded-database</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>mirDataSource<span class="pl-pds">"</span></span>&gt; &lt;<span class="pl-ent">jdbc</span><span class="pl-ent">:</span><span class="pl-ent">script</span> <span class="pl-e">location</span>=<span class="pl-s"><span class="pl-pds">"</span>classpath:db/schema.sql<span class="pl-pds">"</span></span> /&gt; &lt;<span class="pl-ent">jdbc</span><span class="pl-ent">:</span><span class="pl-ent">script</span> <span class="pl-e">location</span>=<span class="pl-s"><span class="pl-pds">"</span>classpath:db/tables_hsqldb.sql<span class="pl-pds">"</span></span> /&gt; &lt;<span class="pl-ent">jdbc</span><span class="pl-ent">:</span><span class="pl-ent">script</span> <span class="pl-e">location</span>=<span class="pl-s"><span class="pl-pds">"</span>classpath:db/package_verweildauer.sql<span class="pl-pds">"</span></span> /&gt; &lt;<span class="pl-ent">jdbc</span><span class="pl-ent">:</span><span class="pl-ent">script</span> <span class="pl-e">location</span>=<span class="pl-s"><span class="pl-pds">"</span>classpath:db/data.sql<span class="pl-pds">"</span></span> /&gt; &lt;/<span class="pl-ent">jdbc</span><span class="pl-ent">:</span><span class="pl-ent">embedded-database</span>&gt;</pre></div> <p dir="auto">I have one default context configuration (which includes the database) and several extensions:<br> for instance:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@ContextConfiguration(&quot;/spring/default.xml&quot;) public class PodcastControllerTest extends AbstractTestNGSpringContextTests {...} // and @ContextConfiguration({ &quot;/spring/components/amq-broker.xml&quot;, &quot;/spring/default.xml&quot; }) public class SophoraAvDocumentTest extends AbstractTestNGSpringContextTests {...}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">ContextConfiguration</span>(<span class="pl-s">"/spring/default.xml"</span>) <span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">PodcastControllerTest</span> <span class="pl-k">extends</span> <span class="pl-smi">AbstractTestNGSpringContextTests</span> {...} <span class="pl-c">// and</span> <span class="pl-c1">@</span><span class="pl-c1">ContextConfiguration</span>({ <span class="pl-s">"/spring/components/amq-broker.xml"</span>, <span class="pl-s">"/spring/default.xml"</span> }) <span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">SophoraAvDocumentTest</span> <span class="pl-k">extends</span> <span class="pl-smi">AbstractTestNGSpringContextTests</span> {...}</pre></div> <p dir="auto">When executing the tests with maven (maven-surefire), all the tests with the first configuration reuse the same context (due to context caching). The first test-setup with the second configuration should create a fresh application context, but it fails with Database-Errors indicating, that the objects to create already exist. (I spent quite some time debugging the maven process).</p> <p dir="auto">Here is the maven surefire config:</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;threadCount&gt;1&lt;/threadCount&gt; &lt;excludedGroups&gt;slow,local&lt;/excludedGroups&gt; &lt;argLine&gt;-Xmx1024m&lt;/argLine&gt; &lt;/configuration&gt; &lt;/plugin&gt;"><pre class="notranslate">&lt;<span class="pl-ent">plugin</span>&gt; &lt;<span class="pl-ent">groupId</span>&gt;org.apache.maven.plugins&lt;/<span class="pl-ent">groupId</span>&gt; &lt;<span class="pl-ent">artifactId</span>&gt;maven-surefire-plugin&lt;/<span class="pl-ent">artifactId</span>&gt; &lt;<span class="pl-ent">configuration</span>&gt; &lt;<span class="pl-ent">threadCount</span>&gt;1&lt;/<span class="pl-ent">threadCount</span>&gt; &lt;<span class="pl-ent">excludedGroups</span>&gt;slow,local&lt;/<span class="pl-ent">excludedGroups</span>&gt; &lt;<span class="pl-ent">argLine</span>&gt;-Xmx1024m&lt;/<span class="pl-ent">argLine</span>&gt; &lt;/<span class="pl-ent">configuration</span>&gt; &lt;/<span class="pl-ent">plugin</span>&gt;</pre></div> <p dir="auto">My theory is, that both contexts connect to the same database instance, because they are in the same vm and the name of the db-instance is the same:<br> EmbeddedDatabaseFactory.databaseName = "testdb";</p> <p dir="auto">I did not find a way to assign the name with the jdbc:embedded-database-Tag.</p> <p dir="auto">So I created a custom EmbeddedDatabaseBuilder which assigns a random name (UUID) to every new instance:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.HSQL).setName(UUID.randomUUID().toString()); for (String sqlResource : this.scripts) { builder.addScript(sqlResource); } this.embeddedDatabase = builder.build();"><pre class="notranslate"><span class="pl-smi">EmbeddedDatabaseBuilder</span> <span class="pl-s1">builder</span> = <span class="pl-k">new</span> <span class="pl-smi">EmbeddedDatabaseBuilder</span>().<span class="pl-en">setType</span>(<span class="pl-smi">EmbeddedDatabaseType</span>.<span class="pl-c1">HSQL</span>).<span class="pl-en">setName</span>(<span class="pl-smi">UUID</span>.<span class="pl-en">randomUUID</span>().<span class="pl-en">toString</span>()); <span class="pl-k">for</span> (<span class="pl-smi">String</span> <span class="pl-s1">sqlResource</span> : <span class="pl-smi">this</span>.<span class="pl-s1">scripts</span>) { <span class="pl-s1">builder</span>.<span class="pl-en">addScript</span>(<span class="pl-s1">sqlResource</span>); } <span class="pl-smi">this</span>.<span class="pl-s1">embeddedDatabase</span> = <span class="pl-s1">builder</span>.<span class="pl-en">build</span>();</pre></div> <p dir="auto">With this one the errors are gone. Would it be a solution to add a configuration-option to jdbc:embedded-database for random db-instance names?</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.1 GA</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="398177832" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/17432" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/17432/hovercard" href="https://github.com/spring-projects/spring-framework/issues/17432">#17432</a> Introduce database-name attribute in &lt;jdbc:embedded-database /&gt; (<em><strong>"depends on"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398177900" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/17437" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/17437/hovercard" href="https://github.com/spring-projects/spring-framework/issues/17437">#17437</a> Document support for generating unique names for embedded databases in the reference manual (<em><strong>"is depended on by"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398165103" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/15999" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/15999/hovercard" href="https://github.com/spring-projects/spring-framework/issues/15999">#15999</a> Embedded database connection closed by shutdown() method</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398116015" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13560" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13560/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13560">#13560</a> Using multiple declarations of jdbc:embedded-database creates only one H2 instance per JVM</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398107795" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12260" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12260/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12260">#12260</a> jdbc:datasource lacks 'name' attribute or related mechanism</li> </ul> <p dir="auto">6 votes, 7 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=tschafer" rel="nofollow">Tim Schafer</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-671?redirect=false" rel="nofollow">SPR-671</a></strong> and commented</p> <p dir="auto">2005-01-31 13:58:49 StandardContext[/kls2]Loading root WebApplicationContext<br> 2005-01-31 13:58:49 StandardContext[/kls2]Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener<br> org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/classpath:/database.beans.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/classpath:/database.beans.xml]<br> java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/classpath:/database.beans.xml]<br> at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:89)<br> at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:127)<br> at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.importBeanDefinitionResource(DefaultXmlBeanDefinitionParser.java:226)<br> at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:180)<br> at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:170)<br> at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:129)<br> at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:144)<br> at org.springframework.context.support.AbstractXmlApplicationContext.refreshBeanFactory(AbstractXmlApplicationContext.java:79)<br> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:249)<br> at org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131)<br> at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:167)<br> at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:101)<br> at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)<br> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)<br> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)<br> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)<br> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)<br> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)<br> at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)<br> at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)<br> at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:922)<br> at org.apache.catalina.manager.HTMLManagerServlet.deployInternal(HTMLManagerServlet.java:271)<br> at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:95)<br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)<br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)<br> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)<br> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)<br> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)<br> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)<br> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)<br> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)<br> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)<br> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)<br> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)<br> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)<br> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)<br> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)<br> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)<br> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)<br> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)<br> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)<br> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)<br> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)<br> at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)<br> at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)<br> at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)<br> at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)<br> at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)<br> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)<br> at java.lang.Thread.run(Thread.java:534)</p> <hr> <p dir="auto"><strong>Affects:</strong> 1.1.2</p> <p dir="auto">1 votes, 0 watchers</p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Component Demos should be present on the corresponding Component API sections.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Component Demos and Component API are separated in docs.</p> <h2 dir="auto">Context</h2> <p dir="auto">While reading the docs <a href="https://material-ui-next.com/" rel="nofollow">https://material-ui.com/</a>, I find myself with two windows open, the Component Demo and the corresponding Component API. I see the two sections aren't exactly 1:1, however I'm guessing the goal is to have a demo for every Component.</p> <p dir="auto">There will be a need for compositional demos, much like Semantic's <a href="https://semantic-ui.com/views/comment.html" rel="nofollow">Views docs</a>. These demos can be linked to on each Component API doc page and indexed in a Composed Components top level nav.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>next</td> </tr> <tr> <td>React</td> <td></td> </tr> <tr> <td>browser</td> <td></td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">The Issue</h2> <p dir="auto">When I provide <code class="notranslate">NavLink</code> as a component for <code class="notranslate">Button</code> it seems to work fine but I get this error in console :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Warning: Material-UI: you have provided a custom Component to the `component` property of `ButtonBase`. In order to make the keyboard focus logic work, we need a reference on the root element. Please provide a class component instead of a functional component. You need to fix the: NavLink component."><pre class="notranslate"><code class="notranslate">Warning: Material-UI: you have provided a custom Component to the `component` property of `ButtonBase`. In order to make the keyboard focus logic work, we need a reference on the root element. Please provide a class component instead of a functional component. You need to fix the: NavLink component. </code></pre></div> <p dir="auto">providing <code class="notranslate">Link</code> works fine without errors.</p> <p dir="auto">Here is a sandbox demo : <a href="https://x0n7x11vw.codesandbox.io/" rel="nofollow">https://x0n7x11vw.codesandbox.io/</a></p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>v1.beta-10</td> </tr> <tr> <td>React</td> <td>15.6.1</td> </tr> <tr> <td>browser</td> <td>chrome</td> </tr> </tbody> </table>
0
<h2 dir="auto">Update</h2> <p dir="auto">This issue is a duplicate of <a href="https://github.com/microsoft/PowerToys/issues/2795#issuecomment-636443180" data-hovercard-type="issue" data-hovercard-url="/microsoft/PowerToys/issues/2795/hovercard">#2795</a></p> <h2 dir="auto">TL;DR</h2> <p dir="auto">I believe this is just a typo. <code class="notranslate">%5</code> should be actual width and <code class="notranslate">%6</code> should be actual height. Instead, these two are swapped in the tooltip. The actual implementation in the format still works so doing <code class="notranslate">%5 x %6</code> would give <code class="notranslate">width x height</code>, as expected.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/34325463/91639628-85b60700-ea4a-11ea-837d-7dab076befbb.png"><img src="https://user-images.githubusercontent.com/34325463/91639628-85b60700-ea4a-11ea-837d-7dab076befbb.png" alt="image" style="max-width: 100%;"></a></p> <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: v0.20.1</li> <li>PowerToy Utility: Image Resizer</li> <li>Running PowerToys as Admin: no</li> <li>Windows build number: Version 1909 (OS Build 18363.1016)</li> </ul> <h2 dir="auto">📝 Provide detailed reproduction steps (if any)</h2> <ol dir="auto"> <li>Enable ImageResizer</li> <li>Under File and the option Filename Format, use the following format: <code class="notranslate">%1 %5 %6</code> (any format that uses <code class="notranslate">%5</code> and <code class="notranslate">%6</code> will work)</li> <li>Resize any image file, ensuring that you make a copy when you resize it.</li> <li>Check the filename for the resized image.</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">Assuming the filename is <code class="notranslate">oopsie.png</code>. After the resize, assuming we picked 1920x1080 (fill), and the format is <code class="notranslate">%1 (%6x%5)</code> (actual width by actual height), the new filename is <code class="notranslate">oopsie (1920x1080).png</code>.</p> <h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">❌</g-emoji> Actual result</h3> <p dir="auto">Assuming we choose the options and have the format as stated above, we'd instead get <code class="notranslate">oopsie (1080x1920).png</code>.</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">I am using an US keyboard layout as input and would like to be able to either remap a key or a shortcut to generate unicode characters, in my case Umlauts (ä, ö, ü,...).</p> <p dir="auto">So ideally I'd like to remap a shortcut (i.e. CTRL+ALT+O) to generate a lower-case ö. I'd be totally fine with entering the desired unicode key in the 'Remap a key' or 'Remap a shortcut' dialogs.</p>
0
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p> <p dir="auto"><strong>What is the current behavior?</strong><br> RT<br> <strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br> I have a multi Page app and I have two enties 'main.js','main2.js' for two pages.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//main.js require(['./a','./b','./c'],function(){ console.log('main') })"><pre class="notranslate"><span class="pl-c">//main.js</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-s">'./a'</span><span class="pl-kos">,</span><span class="pl-s">'./b'</span><span class="pl-kos">,</span><span class="pl-s">'./c'</span><span class="pl-kos">]</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'main'</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//main2.js require(['./a','./b','./d'],function(){ console.log('main') })"><pre class="notranslate"><span class="pl-c">//main2.js</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-s">'./a'</span><span class="pl-kos">,</span><span class="pl-s">'./b'</span><span class="pl-kos">,</span><span class="pl-s">'./d'</span><span class="pl-kos">]</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'main'</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> <p dir="auto">as you see. two entries share common './a', ',/b'.<br> if bundle the code now , './a', ',/b' will apear twice , result in large file size if they are big files<br> then I want to use CommonsChunksPlugins to remove duplicate module like</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//webpack.config.js new webpack.optimize.CommonsChunkPlugin({ async: true, minChunks: 2 })"><pre class="notranslate"><span class="pl-c">//webpack.config.js</span> <span class="pl-k">new</span> <span class="pl-s1">webpack</span><span class="pl-kos">.</span><span class="pl-c1">optimize</span><span class="pl-kos">.</span><span class="pl-c1">CommonsChunkPlugin</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">async</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">minChunks</span>: <span class="pl-c1">2</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> <p dir="auto">nothing change... then i change to</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" entry:{ main:'./main.js', main2:'./main2.js', common:['./a','./b'] }, plugins: [ new webpack.optimize.CommonsChunkPlugin({ name: ['share','common'], async: true, minChunks: 2 }) ]"><pre class="notranslate"> entry:<span class="pl-kos">{</span> <span class="pl-c1">main</span>:<span class="pl-s">'./main.js'</span><span class="pl-kos">,</span> <span class="pl-c1">main2</span>:<span class="pl-s">'./main2.js'</span><span class="pl-kos">,</span> <span class="pl-c1">common</span>:<span class="pl-kos">[</span><span class="pl-s">'./a'</span><span class="pl-kos">,</span><span class="pl-s">'./b'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">plugins</span>: <span class="pl-kos">[</span> <span class="pl-k">new</span> <span class="pl-s1">webpack</span><span class="pl-kos">.</span><span class="pl-c1">optimize</span><span class="pl-kos">.</span><span class="pl-c1">CommonsChunkPlugin</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-kos">[</span><span class="pl-s">'share'</span><span class="pl-kos">,</span><span class="pl-s">'common'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c1">async</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">minChunks</span>: <span class="pl-c1">2</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">]</span></pre></div> <p dir="auto">this time it generate share.js contain './a', ',/b'.<br> but entries main.js and main2.js still contain './a', ',/b'. it does not reduce ouptsize</p> <p dir="auto"><strong>What is the expected behavior?</strong><br> extract common modules from entries to #share.js<br> <strong>Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.</strong><br> Window10<br> Webpack 2.2.0<br> node 6.9.2</p>
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong></p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[webpack-cli] Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:130:10) at BulkUpdateDecorator.hashFactory (/opt/src/node_modules/webpack/lib/util/createHash.js:155:18) at BulkUpdateDecorator.digest (/opt/src/node_modules/webpack/lib/util/createHash.js:80:21) at /opt/src/node_modules/webpack/lib/DefinePlugin.js:595:38 at Hook.eval [as call] (eval at create (/opt/src/node_modules/tapable/lib/HookCodeFactory.js:19:10), &lt;anonymous&gt;:100:1) at Hook.CALL_DELEGATE [as _call] (/opt/src/node_modules/tapable/lib/Hook.js:14:14) at Compiler.newCompilation (/opt/src/node_modules/webpack/lib/Compiler.js:1053:26) at /opt/src/node_modules/webpack/lib/Compiler.js:1097:29 at Hook.eval [as callAsync] (eval at create (/opt/src/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1) { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }"><pre class="notranslate">[webpack-cli] Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:130:10) at BulkUpdateDecorator.hashFactory (/opt/src/node_modules/webpack/lib/util/createHash.js:155:18) at BulkUpdateDecorator.digest (/opt/src/node_modules/webpack/lib/util/createHash.js:80:21) at /opt/src/node_modules/webpack/lib/DefinePlugin.js:595:38 at Hook.eval [as call] (eval at create (/opt/src/node_modules/tapable/lib/HookCodeFactory.js:19:10), <span class="pl-k">&lt;</span>anonymous<span class="pl-k">&gt;</span>:100:1) at Hook.CALL_DELEGATE [as _call] (/opt/src/node_modules/tapable/lib/Hook.js:14:14) at Compiler.newCompilation (/opt/src/node_modules/webpack/lib/Compiler.js:1053:26) at /opt/src/node_modules/webpack/lib/Compiler.js:1097:29 at Hook.eval [as callAsync] (eval at create (/opt/src/node_modules/tapable/lib/HookCodeFactory.js:33:10), <span class="pl-k">&lt;</span>anonymous<span class="pl-k">&gt;</span>:6:1) { opensslErrorStack: [ <span class="pl-s"><span class="pl-pds">'</span>error:03000086:digital envelope routines::initialization error<span class="pl-pds">'</span></span> ], library: <span class="pl-s"><span class="pl-pds">'</span>digital envelope routines<span class="pl-pds">'</span></span>, reason: <span class="pl-s"><span class="pl-pds">'</span>unsupported<span class="pl-pds">'</span></span>, code: <span class="pl-s"><span class="pl-pds">'</span>ERR_OSSL_EVP_UNSUPPORTED<span class="pl-pds">'</span></span> }</pre></div> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 5.59.0<br> Node.js version: 17.0.0<br> Operating System: linux x64</p>
0
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 18363.418 Windows Terminal version: 0.5.2762.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 18363.418 Windows Terminal version: 0.5.2762.0 </code></pre></div> <p dir="auto">If a profile is defined with an invalid commandline, or if the shell specified has been uninstalled by the user, trying to open a tab with that profile will not show any warning about the failure to launch the shell process.</p> <p dir="auto">If the profile is defined with "closeOnExit":false, the tab will wait forever for the shell to get connected instead of showing an error message. If the profile is defined with "closeOnExit":true, the tab will immediately close with no explanation.</p> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Create a profile with a non-existing shell such as the following:<br> {<br> // A non-existing shell<br> "guid": "{0225F6B6-EC1C-4746-8384-A83DB214D13A}",<br> "closeOnExit": false,<br> "name": "dummy",<br> "commandline": "dummyshell.exe",<br> "hidden": false<br> },</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">If the commandline cannot be launched, an error should notify the user that the process couldn't be created, so they know they have to look at the command line more closely.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Instead of some error message, Windows Terminal keeps the tab open and cursor waiting with no hint that something went wrong launching the shell, or simply silently closes the tab if "closeOnExit":true.</p>
<p dir="auto">This is work that's following on from work that's being done for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="460696043" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/1625" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/1625/hovercard" href="https://github.com/microsoft/terminal/issues/1625">#1625</a>.</p> <p dir="auto">I'm pulling the code for updating the drag region out of <code class="notranslate">NonClientIslandWindow::OnSize</code> into its own method. Unfortunately, both these methods need to do the following block of work:</p> <div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" const auto windowRect = GetWindowRect(); const auto width = windowRect.right - windowRect.left; const auto height = windowRect.bottom - windowRect.top; const auto scale = GetCurrentDpiScale(); const auto dpi = ::GetDpiForWindow(_window.get()); const auto dragY = ::GetSystemMetricsForDpi(SM_CYDRAG, dpi); const auto dragX = ::GetSystemMetricsForDpi(SM_CXDRAG, dpi); // If we're maximized, we don't want to use the frame as our margins, // instead we want to use the margins from the maximization. If we included // the left&amp;right sides of the frame in this calculation while maximized, // you' have a few pixels of the window border on the sides while maximized, // which most apps do not have. const auto bordersWidth = _isMaximized ? (_maximizedMargins.cxLeftWidth + _maximizedMargins.cxRightWidth) : (dragX * 2); const auto bordersHeight = _isMaximized ? (_maximizedMargins.cyBottomHeight + _maximizedMargins.cyTopHeight) : (dragY * 2); const auto windowsWidth = width - bordersWidth; const auto windowsHeight = height - bordersHeight; const auto xPos = _isMaximized ? _maximizedMargins.cxLeftWidth : dragX; const auto yPos = _isMaximized ? _maximizedMargins.cyTopHeight : dragY; const auto dragBarRect = GetDragAreaRect(); const auto nonClientHeight = dragBarRect.bottom - dragBarRect.top;"><pre class="notranslate"> <span class="pl-k">const</span> <span class="pl-k">auto</span> windowRect = GetWindowRect(); <span class="pl-k">const</span> <span class="pl-k">auto</span> width = windowRect.right - windowRect.left; <span class="pl-k">const</span> <span class="pl-k">auto</span> height = windowRect.bottom - windowRect.top; <span class="pl-k">const</span> <span class="pl-k">auto</span> scale = GetCurrentDpiScale(); <span class="pl-k">const</span> <span class="pl-k">auto</span> dpi = ::GetDpiForWindow(_window.get()); <span class="pl-k">const</span> <span class="pl-k">auto</span> dragY = ::GetSystemMetricsForDpi(SM_CYDRAG, dpi); <span class="pl-k">const</span> <span class="pl-k">auto</span> dragX = ::GetSystemMetricsForDpi(SM_CXDRAG, dpi); <span class="pl-c"><span class="pl-c">//</span> If we're maximized, we don't want to use the frame as our margins,</span> <span class="pl-c"><span class="pl-c">//</span> instead we want to use the margins from the maximization. If we included</span> <span class="pl-c"><span class="pl-c">//</span> the left&amp;right sides of the frame in this calculation while maximized,</span> <span class="pl-c"><span class="pl-c">//</span> you' have a few pixels of the window border on the sides while maximized,</span> <span class="pl-c"><span class="pl-c">//</span> which most apps do not have.</span> <span class="pl-k">const</span> <span class="pl-k">auto</span> bordersWidth = _isMaximized ? (_maximizedMargins.cxLeftWidth + _maximizedMargins.cxRightWidth) : (dragX * <span class="pl-c1">2</span>); <span class="pl-k">const</span> <span class="pl-k">auto</span> bordersHeight = _isMaximized ? (_maximizedMargins.cyBottomHeight + _maximizedMargins.cyTopHeight) : (dragY * <span class="pl-c1">2</span>); <span class="pl-k">const</span> <span class="pl-k">auto</span> windowsWidth = width - bordersWidth; <span class="pl-k">const</span> <span class="pl-k">auto</span> windowsHeight = height - bordersHeight; <span class="pl-k">const</span> <span class="pl-k">auto</span> xPos = _isMaximized ? _maximizedMargins.cxLeftWidth : dragX; <span class="pl-k">const</span> <span class="pl-k">auto</span> yPos = _isMaximized ? _maximizedMargins.cyTopHeight : dragY; <span class="pl-k">const</span> <span class="pl-k">auto</span> dragBarRect = GetDragAreaRect(); <span class="pl-k">const</span> <span class="pl-k">auto</span> nonClientHeight = dragBarRect.bottom - dragBarRect.top;</pre></div> <p dir="auto">Doing this twice is clearly ridiculous, and more likely than not, <em>wrong</em>.</p> <p dir="auto">I'm thinking that on the resize, we could <em>probably</em> just cache some of these values. I think this will also important for dealing with maximizing, cause I <del>think</del> know the maximize borders are wrong on non-primary displays.</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 verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <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"> 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>:</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:5.1.0 (sun-harmonics) kombu:5.1.0 py:3.9.5 billiard:3.6.4.0 py-amqp:5.0.6 platform -&gt; system:Linux arch:64bit, ELF kernel version:5.10.35-1-lts imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:pyamqp results:couchdb://..... broker_url: 'amqp://..... result_backend: 'couchdb://..... deprecated_settings: None"><pre class="notranslate"><code class="notranslate">software -&gt; celery:5.1.0 (sun-harmonics) kombu:5.1.0 py:3.9.5 billiard:3.6.4.0 py-amqp:5.0.6 platform -&gt; system:Linux arch:64bit, ELF kernel version:5.10.35-1-lts imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:pyamqp results:couchdb://..... broker_url: 'amqp://..... result_backend: 'couchdb://..... deprecated_settings: None </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>: 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="amqp==5.0.6 billiard==3.6.4.0 celery==5.1.0 certifi==2020.12.5 chardet==4.0.0 click==7.1.2 click-didyoumean==0.0.3 click-plugins==1.1.1 click-repl==0.1.6 idna==2.10 kombu==5.1.0 prompt-toolkit==3.0.18 pycouchdb==1.14.1 pygobject==3.26.1 python-apt==1.6.5+ubuntu0.5 pytz==2021.1 requests==2.25.1 six==1.16.0 unattended-upgrades==0.1 urllib3==1.26.4 vine==5.0.0 wcwidth==0.2.5"><pre class="notranslate"><code class="notranslate">amqp==5.0.6 billiard==3.6.4.0 celery==5.1.0 certifi==2020.12.5 chardet==4.0.0 click==7.1.2 click-didyoumean==0.0.3 click-plugins==1.1.1 click-repl==0.1.6 idna==2.10 kombu==5.1.0 prompt-toolkit==3.0.18 pycouchdb==1.14.1 pygobject==3.26.1 python-apt==1.6.5+ubuntu0.5 pytz==2021.1 requests==2.25.1 six==1.16.0 unattended-upgrades==0.1 urllib3==1.26.4 vine==5.0.0 wcwidth==0.2.5 </code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> Couchdb v. 3.1.1 </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <p dir="auto">This is the code example from the getting started guide. RabbotMQ as a broker and couchdb as a backend.</p> <details> <p dir="auto"> </p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from celery import Celery app = Celery(&quot;tasks&quot;, broker=&quot;pyamqp://....&quot;, backend=&quot;couchdb://...&quot;) @app.task def add(x, y): return x + y"><pre class="notranslate"><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-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">"tasks"</span>, <span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">"pyamqp://...."</span>, <span class="pl-s1">backend</span><span class="pl-c1">=</span><span class="pl-s">"couchdb://..."</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">The result is stored in the backend.</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">The following error message is displayed:</p> <details> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2021-05-23 19:34:24,965: ERROR/MainProcess] Pool callback raised exception: TypeError(&quot;a bytes-like object is required, not 'str'&quot;) Traceback (most recent call last): File &quot;/config/.local/lib/python3.9/site-packages/billiard/pool.py&quot;, line 1796, in safe_apply_callback fun(*args, **kwargs) File &quot;/config/.local/lib/python3.9/site-packages/celery/worker/request.py&quot;, line 567, in on_failure self.task.backend.mark_as_failure( File &quot;/config/.local/lib/python3.9/site-packages/celery/backends/base.py&quot;, line 171, in mark_as_failure self.store_result(task_id, exc, state, File &quot;/config/.local/lib/python3.9/site-packages/celery/backends/base.py&quot;, line 477, in store_result self._store_result(task_id, result, state, traceback, File &quot;/config/.local/lib/python3.9/site-packages/celery/backends/base.py&quot;, line 898, in _store_result current_meta = self._get_task_meta_for(task_id) File &quot;/config/.local/lib/python3.9/site-packages/celery/backends/base.py&quot;, line 920, in _get_task_meta_for meta = self.get(self.get_key_for_task(task_id)) File &quot;/config/.local/lib/python3.9/site-packages/celery/backends/couchdb.py&quot;, line 79, in get return self.connection.get(key)['value'] File &quot;/config/.local/lib/python3.9/site-packages/pycouchdb/client.py&quot;, line 345, in get (resp, result) = self.resource(*_id_to_path(doc_id)).get(params=params) File &quot;/config/.local/lib/python3.9/site-packages/pycouchdb/resource.py&quot;, line 52, in __call__ base_url = utils.urljoin(self.base_url, *path) File &quot;/config/.local/lib/python3.9/site-packages/pycouchdb/utils.py&quot;, line 86, in urljoin return reduce(_join, path, base) File &quot;/config/.local/lib/python3.9/site-packages/pycouchdb/utils.py&quot;, line 55, in _join parts = [head.rstrip(URLSPLITTER), tail.lstrip(URLSPLITTER)] TypeError: a bytes-like object is required, not 'str'"><pre class="notranslate"><code class="notranslate">[2021-05-23 19:34:24,965: ERROR/MainProcess] Pool callback raised exception: TypeError("a bytes-like object is required, not 'str'") Traceback (most recent call last): File "/config/.local/lib/python3.9/site-packages/billiard/pool.py", line 1796, in safe_apply_callback fun(*args, **kwargs) File "/config/.local/lib/python3.9/site-packages/celery/worker/request.py", line 567, in on_failure self.task.backend.mark_as_failure( File "/config/.local/lib/python3.9/site-packages/celery/backends/base.py", line 171, in mark_as_failure self.store_result(task_id, exc, state, File "/config/.local/lib/python3.9/site-packages/celery/backends/base.py", line 477, in store_result self._store_result(task_id, result, state, traceback, File "/config/.local/lib/python3.9/site-packages/celery/backends/base.py", line 898, in _store_result current_meta = self._get_task_meta_for(task_id) File "/config/.local/lib/python3.9/site-packages/celery/backends/base.py", line 920, in _get_task_meta_for meta = self.get(self.get_key_for_task(task_id)) File "/config/.local/lib/python3.9/site-packages/celery/backends/couchdb.py", line 79, in get return self.connection.get(key)['value'] File "/config/.local/lib/python3.9/site-packages/pycouchdb/client.py", line 345, in get (resp, result) = self.resource(*_id_to_path(doc_id)).get(params=params) File "/config/.local/lib/python3.9/site-packages/pycouchdb/resource.py", line 52, in __call__ base_url = utils.urljoin(self.base_url, *path) File "/config/.local/lib/python3.9/site-packages/pycouchdb/utils.py", line 86, in urljoin return reduce(_join, path, base) File "/config/.local/lib/python3.9/site-packages/pycouchdb/utils.py", line 55, in _join parts = [head.rstrip(URLSPLITTER), tail.lstrip(URLSPLITTER)] TypeError: a bytes-like object is required, not 'str' </code></pre></div> <p dir="auto"></p> </details> <p dir="auto">It looks like this function </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/celery/celery/blob/025bad6e93087414b3ddc288060c367d1937774b/celery/backends/couchdb.py#L77">celery/celery/backends/couchdb.py</a> </p> <p class="mb-0 color-fg-muted"> Line 77 in <a data-pjax="true" class="commit-tease-sha" href="/celery/celery/commit/025bad6e93087414b3ddc288060c367d1937774b">025bad6</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L77" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="77"></td> <td id="LC77" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">def</span> <span class="pl-en">get</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>): </td> </tr> </tbody></table> </div> </div> is getting a bytes-like object but a string is needed. I enclosed the key in str(). Then it worked.<p></p>
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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"> 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><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="645573628" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/6189" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/6189/hovercard" href="https://github.com/celery/celery/pull/6189">#6189</a></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>: 5.0.1 (singularity)</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:5.0.1 (singularity) kombu:5.0.2 py:3.9.0 billiard:3.6.3.0 py-amqp:5.0.1 platform -&gt; system:Linux arch:64bit, ELF kernel version:5.8.0-26-generic imp:CPython loader -&gt; celery.loaders.default.Loader settings -&gt; transport:amqp results:disabled deprecated_settings: None "><pre class="notranslate"><code class="notranslate">software -&gt; celery:5.0.1 (singularity) kombu:5.0.2 py:3.9.0 billiard:3.6.3.0 py-amqp:5.0.1 platform -&gt; system:Linux arch:64bit, ELF kernel version:5.8.0-26-generic imp:CPython loader -&gt; celery.loaders.default.Loader settings -&gt; transport:amqp results:disabled deprecated_settings: None </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.x</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=""><pre class="notranslate"><code class="notranslate"> </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="from celery import shared_task, chain @shared_task def foo(*args): return 'foo' @shared_task(bind=True) def replace_with_empty_chain(): self.replace(chain()) chain(foo.s(), replace_with_empty_chain.s()).delay()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-s1">shared_task</span>, <span class="pl-s1">chain</span> <span class="pl-en">@<span class="pl-s1">shared_task</span></span> <span class="pl-k">def</span> <span class="pl-en">foo</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>): <span class="pl-k">return</span> <span class="pl-s">'foo'</span> <span class="pl-en">@<span class="pl-en">shared_task</span>(<span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</span> <span class="pl-k">def</span> <span class="pl-en">replace_with_empty_chain</span>(): <span class="pl-s1">self</span>.<span class="pl-en">replace</span>(<span class="pl-en">chain</span>()) <span class="pl-en">chain</span>(<span class="pl-s1">foo</span>.<span class="pl-en">s</span>(), <span class="pl-s1">replace_with_empty_chain</span>.<span class="pl-en">s</span>()).<span class="pl-en">delay</span>()</pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">A clear error message is raised.</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">An <code class="notranslate">IndexError</code> is raised with a message that doesn't explain what went wrong.</p>
0
<p dir="auto">Steps to reproduce:</p> <ol dir="auto"> <li>Go to <a href="http://material-ui.com/#/components/text-fields" rel="nofollow">http://material-ui.com/#/components/text-fields</a></li> <li>Click on the text field sample (first row, second column), specifically on the floating label</li> </ol> <p dir="auto">Actual: Clicking on the floating label the first time does not focus the field<br> Expected: Clicking on the floating label for the first time should focus the field input</p>
<p dir="auto">The css class names definitions are duplicated for some components - in my case it is duplicated (I guess from my debugging) for <code class="notranslate">MuiIconButton</code> and <code class="notranslate">MuiModal</code> - check current behavior</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">The class names should not be duplicated across components.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">My button styles:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11510581/30492845-37fd9560-9a42-11e7-8251-f04b1efb2ee3.png"><img src="https://user-images.githubusercontent.com/11510581/30492845-37fd9560-9a42-11e7-8251-f04b1efb2ee3.png" alt="classnames_conflict" style="max-width: 100%;"></a><br> The class is duplicated.<br> Styles definition:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11510581/30492862-461c21d4-9a42-11e7-8774-5baf1fd74e83.png"><img src="https://user-images.githubusercontent.com/11510581/30492862-461c21d4-9a42-11e7-8774-5baf1fd74e83.png" alt="classnames_conflit_2" style="max-width: 100%;"></a></p> <p dir="auto">It is working in development mode:<br> My buttons styles:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11510581/30492876-528b3d7e-9a42-11e7-8ac9-fca2627dbeb7.png"><img src="https://user-images.githubusercontent.com/11510581/30492876-528b3d7e-9a42-11e7-8ac9-fca2627dbeb7.png" alt="development_class" style="max-width: 100%;"></a></p> <p dir="auto">and found the definitions:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11510581/30492889-5dc28472-9a42-11e7-99cb-916781efde94.png"><img src="https://user-images.githubusercontent.com/11510581/30492889-5dc28472-9a42-11e7-99cb-916781efde94.png" alt="mui-icon-button-dev" style="max-width: 100%;"></a></p> <p dir="auto">and from modal:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11510581/30492896-63b9ba12-9a42-11e7-8937-3c24535ac8a1.png"><img src="https://user-images.githubusercontent.com/11510581/30492896-63b9ba12-9a42-11e7-8937-3c24535ac8a1.png" alt="mui-modal-dev" style="max-width: 100%;"></a></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">I can try to prepare the environment to reproduce the problem but right now I just wanted to report it here.</p> <h2 dir="auto">Context</h2> <p dir="auto">I'm trying to release my application with the production environment.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0.0-beta.10</td> </tr> <tr> <td>React</td> <td>15.6.1</td> </tr> <tr> <td>browser</td> <td>any</td> </tr> <tr> <td>webpack</td> <td>^3.3.0</td> </tr> </tbody> </table> <p dir="auto">I need some hints where may be the problem. I'm not using <code class="notranslate">withStyles</code> solution anywhere - I use styled components for styles overriding.</p>
0
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong><br> if more than 10 conditions in [ngClass] object, angular throw errors same as *ngFor = "let i of [1, 2, 3, .......11]"<br> <strong>Expected behavior</strong><br> it should handle without throwing error</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> try to validate when parsing the template without defining the object in .ts file.</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li> <p dir="auto"><strong>Angular version:</strong> 2.0.X<br> 2.2.1</p> </li> <li> <p dir="auto"><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]<br> Chrome</p> </li> <li> <p dir="auto">**Language:**TypeScript ES5</p> </li> <li> <p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> = v6.2.0</p> </li> </ul>
<p dir="auto">**I'm submitting a <strong>bug</strong>.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x ] bug report [ ] feature request [ ] support request"><pre class="notranslate"><code class="notranslate">[x ] bug report [ ] feature request [ ] support request </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">I wanted to repeat particular element several amount of time, so I'm using <code class="notranslate">*ngFor</code> directive with hard-coded array like <code class="notranslate">[1,2,3,4,5,6,7,8,9,10]</code> and that got worked awesome. I achieved what I wanted to do.</p> <p dir="auto"><strong>Code</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Component({ selector: 'my-app', template: `&lt;h1&gt;My First Angular App&lt;/h1&gt; &lt;div *ngFor=&quot;let item of [1,2,3,4,5,6,7,8,9,10]&quot;&gt; {{item}}: My Element &lt;/div&gt;` })"><pre class="notranslate"><code class="notranslate">@Component({ selector: 'my-app', template: `&lt;h1&gt;My First Angular App&lt;/h1&gt; &lt;div *ngFor="let item of [1,2,3,4,5,6,7,8,9,10]"&gt; {{item}}: My Element &lt;/div&gt;` }) </code></pre></div> <p dir="auto">[Demo Plunkr][1]</p> <p dir="auto">But as soon as I increased the array size more than 10, I start getting below error. Which is really annoying.</p> <blockquote> <p dir="auto">[email protected]?main=browser:355 Unhandled Promise rejection:<br> Unsupported number of argument for pure functions: 11 ; Zone: ;<br> Task: Promise.then ; Value: Error: Unsupported number of argument for<br> pure functions: 11(…) Error: Unsupported number of argument for pure<br> functions: 11</p> </blockquote> <p dir="auto"><strong>Template</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div *ngFor=&quot;let item of [1,2,3,4,5,6,7,8,9,10,11]&quot;&gt; {{item}} &lt;/div&gt;`"><pre class="notranslate"><code class="notranslate">&lt;div *ngFor="let item of [1,2,3,4,5,6,7,8,9,10,11]"&gt; {{item}} &lt;/div&gt;` </code></pre></div> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">I'm curious to know why that error is happening as soon as array size increase more than 10? But another interesting thing is when I put the same array in component inside variable <code class="notranslate">items= [1,2,3,4,5,6,7,8,9,10,11]</code> and used <code class="notranslate">items</code> in <code class="notranslate">*ngFor</code> and it got worked.</p> <ul dir="auto"> <li> <p dir="auto"><strong>Angular version:</strong> 2.0.1</p> </li> <li> <p dir="auto"><strong>Browser:</strong> all</p> </li> <li> <p dir="auto"><strong>Language:</strong> TypeScript</p> </li> </ul>
1
<p dir="auto">If using MultiIndex as columns, saving to CSV adds an extra line with no data between the column headers and the data. I couldn't find information that this is something that should happen so it was unexpected to me.</p> <h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <p dir="auto">In IPython:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd pd.DataFrame({('a','b'): [1, 2], ('c','d'): [3, 4]}).to_csv('temp.csv', index=False) cat temp.csv"><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">pd</span>.<span class="pl-v">DataFrame</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-s">'c'</span>,<span class="pl-s">'d'</span>): [<span class="pl-c1">3</span>, <span class="pl-c1">4</span>]}).<span class="pl-en">to_csv</span>(<span class="pl-s">'temp.csv'</span>, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-s1">cat</span> <span class="pl-s1">temp</span>.<span class="pl-s1">csv</span></pre></div> <p dir="auto">Outputs:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a,c b,d , 1,3 2,4"><pre class="notranslate"><code class="notranslate">a,c b,d , 1,3 2,4 </code></pre></div> <h4 dir="auto">Expected Output</h4> <p dir="auto">I expected not to have an empty row between column names and the data:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a,c b,d 1,3 2,4"><pre class="notranslate"><code class="notranslate">a,c b,d 1,3 2,4 </code></pre></div> <h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INSTALLED VERSIONS ------------------ commit: None python: 3.5.1.final.0 python-bits: 64 OS: Linux OS-release: 4.5.2-gnu-1 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_DK.UTF-8 pandas: 0.18.0 nose: 1.3.7 pip: 8.1.1 setuptools: 20.10.1 Cython: 0.24 numpy: 1.11.0 scipy: 0.17.0 statsmodels: None xarray: None IPython: 4.2.0 sphinx: 1.4 patsy: None dateutil: 2.5.3 pytz: 2016.4 blosc: None bottleneck: None tables: 3.2.2 numexpr: 2.5.2 matplotlib: 1.5.1 openpyxl: None xlrd: 0.9.4 xlwt: None xlsxwriter: None lxml: None bs4: 4.4.1 html5lib: None httplib2: 0.9.2 apiclient: 1.5.0 sqlalchemy: 1.0.12 pymysql: None psycopg2: 2.6.1 (dt dec pq3 ext lo64) jinja2: 2.8 boto: None"><pre class="notranslate"><code class="notranslate">INSTALLED VERSIONS ------------------ commit: None python: 3.5.1.final.0 python-bits: 64 OS: Linux OS-release: 4.5.2-gnu-1 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_DK.UTF-8 pandas: 0.18.0 nose: 1.3.7 pip: 8.1.1 setuptools: 20.10.1 Cython: 0.24 numpy: 1.11.0 scipy: 0.17.0 statsmodels: None xarray: None IPython: 4.2.0 sphinx: 1.4 patsy: None dateutil: 2.5.3 pytz: 2016.4 blosc: None bottleneck: None tables: 3.2.2 numexpr: 2.5.2 matplotlib: 1.5.1 openpyxl: None xlrd: 0.9.4 xlwt: None xlsxwriter: None lxml: None bs4: 4.4.1 html5lib: None httplib2: 0.9.2 apiclient: 1.5.0 sqlalchemy: 1.0.12 pymysql: None psycopg2: 2.6.1 (dt dec pq3 ext lo64) jinja2: 2.8 boto: None </code></pre></div>
<p dir="auto">This seems strange to me, but I don't often use a MultiIndex so I might be missing something obvious.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; pd.__version__ '0.13.1-420-g6899ed6' &gt;&gt;&gt; df2 = pd.DataFrame([1], columns=pd.MultiIndex.from_arrays([[1],[2]])) &gt;&gt;&gt; df2 1 2 0 1 [1 rows x 1 columns] &gt;&gt;&gt; df2.columns MultiIndex(levels=[[1], [2]], labels=[[0], [0]]) &gt;&gt;&gt; print df2.to_csv() ,1 ,2 , 0,1"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; pd.__version__ '0.13.1-420-g6899ed6' &gt;&gt;&gt; df2 = pd.DataFrame([1], columns=pd.MultiIndex.from_arrays([[1],[2]])) &gt;&gt;&gt; df2 1 2 0 1 [1 rows x 1 columns] &gt;&gt;&gt; df2.columns MultiIndex(levels=[[1], [2]], labels=[[0], [0]]) &gt;&gt;&gt; print df2.to_csv() ,1 ,2 , 0,1 </code></pre></div> <p dir="auto">Is there supposed to be that empty line at the end of the header? Compare</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; print df2.to_csv(header=False) 0,1"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; print df2.to_csv(header=False) 0,1 </code></pre></div>
1
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p> <ol dir="auto"> <li>What version of Go are you using (<code class="notranslate">go version</code>)?<br> go version go1.6 darwin/amd64</li> <li>What operating system and processor architecture are you using (<code class="notranslate">go env</code>)?<br> mac os x 10.9.5</li> <li>What did you do?<br> (Use play.golang.org to provide a runnable example, if possible.)<br> I want to download golang package for mac os x from an ISP in Iran using golang.org</li> <li>What did you expect to see?<br> I expect to see that golang is available for developers from Iran.<br> You call golang "open-source" that it means its OPEN for anybody. we are developers too.</li> <li>What did you see instead?</li> <li>That’s an error.<br> Your client does not have permission to get URL / from this server. (Client IP address: xxx.xxx.xxx.xxx)<br> We're sorry, but this service is not available in your country. That’s all we know.</li> </ol>
<p dir="auto">using go 1.5.1 and 1.6 on linux/x64</p> <p dir="auto">given this string</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var cgroupname = &quot;/machine.slice/machine-rkt\\x2dbad20ebf\\x2de8b8\\x2d48fe\\x2dabba\\x2de2e3f72123fb.scope/system.slice/alpine-sh.service&quot;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">cgroupname</span> <span class="pl-c1">=</span> <span class="pl-s">"/machine.slice/machine-rkt<span class="pl-cce">\\</span>x2dbad20ebf<span class="pl-cce">\\</span>x2de8b8<span class="pl-cce">\\</span>x2d48fe<span class="pl-cce">\\</span>x2dabba<span class="pl-cce">\\</span>x2de2e3f72123fb.scope/system.slice/alpine-sh.service"</span></pre></div> <p dir="auto">trying to use this function to strip out part of it. (yes, can use regex, but that's a different point)</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func parseName(name string) (string, error) { splits := strings.Split(name, &quot;/&quot;) if len(splits) == 3 || len(splits) == 5 { if splits[1] == &quot;machine.slice&quot; { replacer := strings.NewReplacer(&quot;machine-rkt-&quot;, &quot;&quot;, &quot;.scope&quot;, &quot;&quot;, &quot;\\x2d&quot;, &quot;-&quot;) pod := replacer.Replace(splits[2]) pod = strings.Replace(pod, &quot;machine-rkt-&quot;, &quot;&quot;, -1) if len(splits) == 3 { return pod, nil } if splits[3] == &quot;system.slice&quot; { container := strings.Replace(splits[4], &quot;.service&quot;, &quot;&quot;, -1) return pod + &quot;:&quot; + container, nil } } } return &quot;&quot;, fmt.Errorf(&quot;%s not handled by rkt handler&quot;, name) }"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">parseName</span>(<span class="pl-s1">name</span> <span class="pl-smi">string</span>) (<span class="pl-smi">string</span>, <span class="pl-smi">error</span>) { <span class="pl-s1">splits</span> <span class="pl-c1">:=</span> <span class="pl-s1">strings</span>.<span class="pl-en">Split</span>(<span class="pl-s1">name</span>, <span class="pl-s">"/"</span>) <span class="pl-k">if</span> <span class="pl-en">len</span>(<span class="pl-s1">splits</span>) <span class="pl-c1">==</span> <span class="pl-c1">3</span> <span class="pl-c1">||</span> <span class="pl-en">len</span>(<span class="pl-s1">splits</span>) <span class="pl-c1">==</span> <span class="pl-c1">5</span> { <span class="pl-k">if</span> <span class="pl-s1">splits</span>[<span class="pl-c1">1</span>] <span class="pl-c1">==</span> <span class="pl-s">"machine.slice"</span> { <span class="pl-s1">replacer</span> <span class="pl-c1">:=</span> <span class="pl-s1">strings</span>.<span class="pl-en">NewReplacer</span>(<span class="pl-s">"machine-rkt-"</span>, <span class="pl-s">""</span>, <span class="pl-s">".scope"</span>, <span class="pl-s">""</span>, <span class="pl-s">"<span class="pl-cce">\\</span>x2d"</span>, <span class="pl-s">"-"</span>) <span class="pl-s1">pod</span> <span class="pl-c1">:=</span> <span class="pl-s1">replacer</span>.<span class="pl-en">Replace</span>(<span class="pl-s1">splits</span>[<span class="pl-c1">2</span>]) <span class="pl-s1">pod</span> <span class="pl-c1">=</span> <span class="pl-s1">strings</span>.<span class="pl-en">Replace</span>(<span class="pl-s1">pod</span>, <span class="pl-s">"machine-rkt-"</span>, <span class="pl-s">""</span>, <span class="pl-c1">-</span><span class="pl-c1">1</span>) <span class="pl-k">if</span> <span class="pl-en">len</span>(<span class="pl-s1">splits</span>) <span class="pl-c1">==</span> <span class="pl-c1">3</span> { <span class="pl-k">return</span> <span class="pl-s1">pod</span>, <span class="pl-c1">nil</span> } <span class="pl-k">if</span> <span class="pl-s1">splits</span>[<span class="pl-c1">3</span>] <span class="pl-c1">==</span> <span class="pl-s">"system.slice"</span> { <span class="pl-s1">container</span> <span class="pl-c1">:=</span> <span class="pl-s1">strings</span>.<span class="pl-en">Replace</span>(<span class="pl-s1">splits</span>[<span class="pl-c1">4</span>], <span class="pl-s">".service"</span>, <span class="pl-s">""</span>, <span class="pl-c1">-</span><span class="pl-c1">1</span>) <span class="pl-k">return</span> <span class="pl-s1">pod</span> <span class="pl-c1">+</span> <span class="pl-s">":"</span> <span class="pl-c1">+</span> <span class="pl-s1">container</span>, <span class="pl-c1">nil</span> } } } <span class="pl-k">return</span> <span class="pl-s">""</span>, <span class="pl-s1">fmt</span>.<span class="pl-en">Errorf</span>(<span class="pl-s">"%s not handled by rkt handler"</span>, <span class="pl-s1">name</span>) }</pre></div> <p dir="auto">the strings.Replace for pod shouldn't be necessary, I'd expect the replacer to work correctly, but it doesn't. Either it's buggy or i'm using it incorrectly, but I don't know what I'm doing wrong.</p> <p dir="auto">can duplicate with <a href="https://play.golang.org/p/p_akq9d3YW" rel="nofollow">https://play.golang.org/p/p_akq9d3YW</a> by playing with comenting out line 18</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"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <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" checked=""> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="586475593" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/6009" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/6009/hovercard" href="https://github.com/celery/celery/issues/6009">#6009</a></li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="389812167" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5230" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5230/hovercard" href="https://github.com/celery/celery/issues/5230">#5230</a></li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="331649180" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4809" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/4809/hovercard" href="https://github.com/celery/celery/issues/4809">#4809</a></li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="594781509" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/6023" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/6023/hovercard" href="https://github.com/celery/celery/issues/6023">#6023</a></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>:</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="# With broker rabbitmq software -&gt; celery:4.4.2 (cliffs) kombu:4.6.8 py:3.8.0 billiard:3.6.3.0 py-amqp:2.5.2 platform -&gt; system:Darwin arch:64bit kernel version:19.4.0 imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:pyamqp results:disabled broker_url: 'amqp://guest:********@localhost:5672//' # With broker redis software -&gt; celery:4.4.2 (cliffs) kombu:4.6.8 py:3.8.0 billiard:3.6.3.0 redis:3.4.1 platform -&gt; system:Darwin arch:64bit kernel version:19.4.0 imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:redis results:disabled broker_url: 'redis://localhost:6379/0' "><pre class="notranslate"><code class="notranslate"># With broker rabbitmq software -&gt; celery:4.4.2 (cliffs) kombu:4.6.8 py:3.8.0 billiard:3.6.3.0 py-amqp:2.5.2 platform -&gt; system:Darwin arch:64bit kernel version:19.4.0 imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:pyamqp results:disabled broker_url: 'amqp://guest:********@localhost:5672//' # With broker redis software -&gt; celery:4.4.2 (cliffs) kombu:4.6.8 py:3.8.0 billiard:3.6.3.0 redis:3.4.1 platform -&gt; system:Darwin arch:64bit kernel version:19.4.0 imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:redis results:disabled broker_url: 'redis://localhost:6379/0' </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>: 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="amqp==2.5.2 billiard==3.6.3.0 celery==4.4.2 kombu==4.6.8 pytz==2019.3 redis==3.4.1 vine==1.3.0"><pre class="notranslate"><code class="notranslate">amqp==2.5.2 billiard==3.6.3.0 celery==4.4.2 kombu==4.6.8 pytz==2019.3 redis==3.4.1 vine==1.3.0 </code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from celery import Celery app = Celery('tasks', broker='pyamqp://guest:guest@localhost:5672') # for rabitmq broker # app = Celery('tasks', broker='redis://localhost:6379/0') for refis broker @app.task def task_example(): s = 'a' * 256 * (10**6) # Create a string of 256MB raise"><pre class="notranslate"><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-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'tasks'</span>, <span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">'pyamqp://guest:guest@localhost:5672'</span>) <span class="pl-c"># for rabitmq broker</span> <span class="pl-c"># app = Celery('tasks', broker='redis://localhost:6379/0') for refis broker</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">task_example</span>(): <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s">'a'</span> <span class="pl-c1">*</span> <span class="pl-c1">256</span> <span class="pl-c1">*</span> (<span class="pl-c1">10</span><span class="pl-c1">**</span><span class="pl-c1">6</span>) <span class="pl-c"># Create a string of 256MB</span> <span class="pl-k">raise</span></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">I will describe all the scenarios that I tested.</p> <ul dir="auto"> <li>Scenario 1: I ran the worker with the command <code class="notranslate">celery worker -A tasks -lINFO</code> and after this I executed the task with the command <code class="notranslate">python -c "from tasks import task_example; task_example.delay()"</code>.</li> <li>Scenario 2: I ran the worker with the command <code class="notranslate">celery worker -A tasks -lINFO -P threads</code> and after this I executed the task with the command <code class="notranslate">python -c "from tasks import task_example; task_example.delay()"</code>.</li> <li>Scenario 3: I ran the worker with the command <code class="notranslate">celery worker -A tasks -lINFO --max-memory-per-child 125000</code> and after this I executed the task with the command <code class="notranslate">python -c "from tasks import task_example; task_example.delay()"</code>.</li> <li>Scenario 4: I ran the worker with the command <code class="notranslate">celery worker -A tasks -lINFO -P threads --max-memory-per-child 125000</code> and after this I executed the task with the command <code class="notranslate">python -c "from tasks import task_example; task_example.delay()"</code>.</li> </ul> <p dir="auto">In all of this scenarios I expect that after run the task, celery will not continue consume the memory.</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">Only in scenario 3, as the documentation explains, the celery not continue consume memory because celery replaced the child process.</p> <p dir="auto">On scenarios 1, 2, and 4 the celery keep the memory that the task allocate(256MB for each task ran in this case).</p>
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li>[x ] I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li>[ x] I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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"> 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"> 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"> 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"> 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><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="376704832" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5157" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5157/hovercard" href="https://github.com/celery/celery/issues/5157">#5157</a></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>:</p> <p dir="auto">celery --version<br> 4.3.0 (rhubarb)</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><p dir="auto">software -&gt; celery:4.3.0 (rhubarb) kombu:4.5.0 py:3.6.8<br> billiard:3.6.0.0 librabbitmq:2.0.0<br> platform -&gt; system:Linux arch:64bit<br> kernel version:3.10.0-327.el7.x86_64 imp:CPython<br> loader -&gt; celery.loaders.app.AppLoader<br> settings -&gt; transport:librabbitmq results:celery_redis_cluster_backend.redis_cluster.RedisClusterBackend</p> <p dir="auto">ABSOLUTE_URL_OVERRIDES: {<br> }<br> ADMINS: []<br> AES_KEY: '<em><strong><em><strong>'<br> ALLOWED_HOSTS: ['<em>']<br> ALTER_URL: 'http://</em>'<br> AMQP_URL: 'amqp://</strong></em>:</strong></em>@<em><strong>:5672/ws?heartbeat=30'<br> APPEND_SLASH: True<br> AUTHENTICATION_BACKENDS: ['django.contrib.auth.backends.ModelBackend']<br> AUTH_PASSWORD_VALIDATORS: '</strong></em><em><strong>'<br> AUTH_USER_MODEL: 'auth.User'<br> BASE_DIR: '/schedule_center'<br> BROKER_URL: 'amqp://yunwei:</strong></em><em><strong>@</strong></em>:5672/CRON-celery'<br> CACHES: {<br> 'default': { 'BACKEND': 'django_redis_cluster.cache.RedisClusterCache',<br> 'LOCATION': [ 'redis://:<strong>@</strong>:<strong>/0',<br> 'redis://:</strong>@<strong>:</strong>/0'<br> 'redis://:<strong>@</strong>:<strong>/0'<br> 'redis://:</strong>@<strong>:</strong>/0'<br> 'redis://:<strong>@</strong>:<strong>/0'<br> 'redis://:</strong>@<strong>:</strong>/0'],<br> 'OPTIONS': { 'CLIENT_CLASS': 'django_redis_cluster.client.DefaultClient',<br> 'COMPRESS_COMPRESSOR': ,<br> 'COMPRESS_DECOMPRESSOR': ,<br> 'COMPRESS_DECOMPRESSOR_ERROR': &lt;class 'zlib.error'&gt;,<br> 'PASSWORD': '<strong>'}}}<br> CACHE_MIDDLEWARE_ALIAS: 'default'<br> CACHE_MIDDLEWARE_KEY_PREFIX: '</strong>'<br> CACHE_MIDDLEWARE_SECONDS: 600<br> CAPTCHA_FONT_SIZE: 26<br> CAPTCHA_IMAGE_SIZE:<br> (92, 34)<br> CAPTCHA_TIMEOUT: 3<br> CELERYD_CONCURRENCY: 50<br> CELERYD_MAX_TASKS_PER_CHILD: 200<br> CELERY_ACCEPT_CONTENT: ['application/json']<br> CELERY_BEAT_SCHEDULER: 'django_celery_beat.schedulers:DatabaseScheduler'<br> CELERY_ENABLE_UTC: False<br> CELERY_FORCE_EXECV: True<br> CELERY_IGNORE_RESULT: False<br> CELERY_REDIS_CLUSTER_SETTINGS: {<br> 'password': '<strong>',<br> 'startup_nodes': [ {'host': '', 'port': '</strong><strong>'},<br> {'host': '</strong><strong>', 'port': '</strong><strong>'},<br> {'host': '</strong><strong>', 'port': '</strong><strong>'},<br> {'host': '</strong><strong>', 'port': '</strong><strong>'},<br> {'host': '</strong><strong>', 'port': '</strong><strong>'},<br> {'host': '</strong><strong>', 'port': '</strong><strong>'}]}<br> CELERY_RESULT_BACKEND: 'celery_redis_cluster_backend.redis_cluster.RedisClusterBackend'<br> CELERY_RESULT_SERIALIZER: 'json'<br> CELERY_TASK_RESULT_EXPIRES: 5400<br> CELERY_TASK_SERIALIZER: 'json'<br> CELERY_TIMEZONE: 'Asia/Shanghai'<br> CHANNEL_LAYERS: {<br> 'default': { 'BACKEND': 'asgi_rabbitmq.RabbitmqChannelLayer',<br> 'CONFIG': { 'url': 'amqp://</strong><strong>:</strong><strong>@</strong><strong>:5672/GM-channels'},<br> 'ROUTING': 'Common.routing.channel_routing'}}<br> CMDBAPI: '</strong><strong>'<br> CMDBAPIORG: '</strong><strong>'<br> CMDBKEY: '</strong><strong>'<br> CMDBSEC: '</strong>-<strong>-</strong>'<br> CSRF_COOKIE_AGE: 31449600<br> CSRF_COOKIE_DOMAIN: None<br> CSRF_COOKIE_HTTPONLY: False<br> CSRF_COOKIE_NAME: 'csrftoken'<br> CSRF_COOKIE_PATH: '/'<br> CSRF_COOKIE_SECURE: False<br> CSRF_FAILURE_VIEW: 'django.views.csrf.csrf_failure'<br> CSRF_HEADER_NAME: 'HTTP_X_CSRFTOKEN'<br> CSRF_TRUSTED_ORIGINS: []<br> CSRF_USE_SESSIONS: False<br> DATABASES: {<br> '<strong>': { 'ATOMIC_REQUESTS': False,<br> 'AUTOCOMMIT': True,<br> 'CONN_MAX_AGE': 0,<br> 'ENGINE': 'django.db.backends.mysql',<br> 'HOST': '</strong>',<br> 'NAME': '<strong>',<br> 'OPTIONS': {},<br> 'PASSWORD': '</strong><strong>',<br> 'PORT': ,<br> 'TEST': { 'CHARSET': None,<br> 'COLLATION': None,<br> 'MIRROR': None,<br> 'NAME': None},<br> 'TIME_ZONE': None,<br> 'USER': ''},<br> 'default': { 'ATOMIC_REQUESTS': False,<br> 'AUTOCOMMIT': True,<br> 'CONN_MAX_AGE': 0,<br> 'ENGINE': 'django.db.backends.mysql',<br> 'HOST': '</strong><strong>',<br> 'NAME': '</strong><strong>',<br> 'OPTIONS': {},<br> 'PASSWORD': '</strong><strong>',<br> 'PORT': ,<br> 'TEST': { 'CHARSET': None,<br> 'COLLATION': None,<br> 'MIRROR': None,<br> 'NAME': None},<br> 'TIME_ZONE': None,<br> 'USER': ''}}<br> DATABASE_ROUTERS: '</strong><strong>'<br> DATA_UPLOAD_MAX_MEMORY_SIZE: 2621440<br> DATA_UPLOAD_MAX_NUMBER_FIELDS: 1000<br> DATETIME_FORMAT: 'N j, Y, P'<br> DATETIME_INPUT_FORMATS: ['%Y-%m-%d %H:%M:%S',<br> '%Y-%m-%d %H:%M:%S.%f',<br> '%Y-%m-%d %H:%M',<br> '%Y-%m-%d',<br> '%m/%d/%Y %H:%M:%S',<br> '%m/%d/%Y %H:%M:%S.%f',<br> '%m/%d/%Y %H:%M',<br> '%m/%d/%Y',<br> '%m/%d/%y %H:%M:%S',<br> '%m/%d/%y %H:%M:%S.%f',<br> '%m/%d/%y %H:%M',<br> '%m/%d/%y']<br> DATE_FORMAT: 'N j, Y'<br> DATE_INPUT_FORMATS: ['%Y-%m-%d',<br> '%m/%d/%Y',<br> '%m/%d/%y',<br> '%b %d %Y',<br> '%b %d, %Y',<br> '%d %b %Y',<br> '%d %b, %Y',<br> '%B %d %Y',<br> '%B %d, %Y',<br> '%d %B %Y',<br> '%d %B, %Y']<br> DEBUG: False<br> DEBUG_PROPAGATE_EXCEPTIONS: False<br> DECIMAL_SEPARATOR: '.'<br> DEFAULT_CHARSET: 'utf-8'<br> DEFAULT_CONTENT_TYPE: 'text/html'<br> DEFAULT_EXCEPTION_REPORTER_FILTER: 'django.views.debug.SafeExceptionReporterFilter'<br> DEFAULT_FILE_STORAGE: 'django.core.files.storage.FileSystemStorage'<br> DEFAULT_FROM_EMAIL: '</strong><strong>'<br> DEFAULT_INDEX_TABLESPACE: ''<br> DEFAULT_TABLESPACE: ''<br> DISALLOWED_USER_AGENTS: []<br> DJANGO_CELERY_BEAT_TZ_AWARE: False<br> EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'<br> EMAIL_HOST: '</strong><strong>'<br> EMAIL_HOST_PASSWORD: '</strong><strong>'<br> EMAIL_HOST_USER: '</strong>'<br> EMAIL_PORT: 25<br> EMAIL_SSL_CERTFILE: None<br> EMAIL_SSL_KEYFILE: '<strong>'<br> EMAIL_SUBJECT_PREFIX: '[Django] '<br> EMAIL_TIMEOUT: None<br> EMAIL_USE_LOCALTIME: False<br> EMAIL_USE_SSL: False<br> EMAIL_USE_TLS: False<br> EXCHANGE_NAME: 'ws.fanout'<br> FILE_CHARSET: 'utf-8'<br> FILE_UPLOAD_DIRECTORY_PERMISSIONS: None<br> FILE_UPLOAD_HANDLERS: ['django.core.files.uploadhandler.MemoryFileUploadHandler',<br> 'django.core.files.uploadhandler.TemporaryFileUploadHandler']<br> FILE_UPLOAD_MAX_MEMORY_SIZE: 2621440<br> FILE_UPLOAD_PERMISSIONS: None<br> FILE_UPLOAD_TEMP_DIR: None<br> FIRST_DAY_OF_WEEK: 0<br> FIXTURE_DIRS: []<br> FORCE_SCRIPT_NAME: None<br> FORMAT_MODULE_PATH: None<br> FORM_RENDERER: 'django.forms.renderers.DjangoTemplates'<br> IGNORABLE_404_URLS: []<br> INSTALLED_APPS: ['django.contrib.admin',<br> 'django.contrib.auth',<br> 'django.contrib.contenttypes',<br> 'django.contrib.sessions',<br> 'django.contrib.messages',<br> 'django.contrib.staticfiles',<br> 'system_cron.apps.SystemCronConfig',<br> 'django_celery_beat',<br> 'django_redis_cluster',<br> 'channels']<br> INTERNAL_IPS: []<br> LANGUAGES: [('af', 'Afrikaans'),<br> ('ar', 'Arabic'),<br> ('ast', 'Asturian'),<br> ('az', 'Azerbaijani'),<br> ('bg', 'Bulgarian'),<br> ('be', 'Belarusian'),<br> ('bn', 'Bengali'),<br> ('br', 'Breton'),<br> ('bs', 'Bosnian'),<br> ('ca', 'Catalan'),<br> ('cs', 'Czech'),<br> ('cy', 'Welsh'),<br> ('da', 'Danish'),<br> ('de', 'German'),<br> ('dsb', 'Lower Sorbian'),<br> ('el', 'Greek'),<br> ('en', 'English'),<br> ('en-au', 'Australian English'),<br> ('en-gb', 'British English'),<br> ('eo', 'Esperanto'),<br> ('es', 'Spanish'),<br> ('es-ar', 'Argentinian Spanish'),<br> ('es-co', 'Colombian Spanish'),<br> ('es-mx', 'Mexican Spanish'),<br> ('es-ni', 'Nicaraguan Spanish'),<br> ('es-ve', 'Venezuelan Spanish'),<br> ('et', 'Estonian'),<br> ('eu', 'Basque'),<br> ('fa', 'Persian'),<br> ('fi', 'Finnish'),<br> ('fr', 'French'),<br> ('fy', 'Frisian'),<br> ('ga', 'Irish'),<br> ('gd', 'Scottish Gaelic'),<br> ('gl', 'Galician'),<br> ('he', 'Hebrew'),<br> ('hi', 'Hindi'),<br> ('hr', 'Croatian'),<br> ('hsb', 'Upper Sorbian'),<br> ('hu', 'Hungarian'),<br> ('ia', 'Interlingua'),<br> ('id', 'Indonesian'),<br> ('io', 'Ido'),<br> ('is', 'Icelandic'),<br> ('it', 'Italian'),<br> ('ja', 'Japanese'),<br> ('ka', 'Georgian'),<br> ('kk', 'Kazakh'),<br> ('km', 'Khmer'),<br> ('kn', 'Kannada'),<br> ('ko', 'Korean'),<br> ('lb', 'Luxembourgish'),<br> ('lt', 'Lithuanian'),<br> ('lv', 'Latvian'),<br> ('mk', 'Macedonian'),<br> ('ml', 'Malayalam'),<br> ('mn', 'Mongolian'),<br> ('mr', 'Marathi'),<br> ('my', 'Burmese'),<br> ('nb', 'Norwegian Bokmål'),<br> ('ne', 'Nepali'),<br> ('nl', 'Dutch'),<br> ('nn', 'Norwegian Nynorsk'),<br> ('os', 'Ossetic'),<br> ('pa', 'Punjabi'),<br> ('pl', 'Polish'),<br> ('pt', 'Portuguese'),<br> ('pt-br', 'Brazilian Portuguese'),<br> ('ro', 'Romanian'),<br> ('ru', 'Russian'),<br> ('sk', 'Slovak'),<br> ('sl', 'Slovenian'),<br> ('sq', 'Albanian'),<br> ('sr', 'Serbian'),<br> ('sr-latn', 'Serbian Latin'),<br> ('sv', 'Swedish'),<br> ('sw', 'Swahili'),<br> ('ta', 'Tamil'),<br> ('te', 'Telugu'),<br> ('th', 'Thai'),<br> ('tr', 'Turkish'),<br> ('tt', 'Tatar'),<br> ('udm', 'Udmurt'),<br> ('uk', 'Ukrainian'),<br> ('ur', 'Urdu'),<br> ('vi', 'Vietnamese'),<br> ('zh-hans', 'Simplified Chinese'),<br> ('zh-hant', 'Traditional Chinese')]<br> LANGUAGES_BIDI: ['he', 'ar', 'fa', 'ur']<br> LANGUAGE_CODE: 'zh-Hans'<br> LANGUAGE_COOKIE_AGE: None<br> LANGUAGE_COOKIE_DOMAIN: None<br> LANGUAGE_COOKIE_NAME: 'django_language'<br> LANGUAGE_COOKIE_PATH: '/'<br> LOCALE_PATHS: []<br> LOGGING: {<br> 'disable_existing_loggers': False,<br> 'filters': {},<br> 'formatters': { 'standard': { 'format': '{"date":%(asctime)s,"threadName":%(threadName)s,"thread":%(thread)d,"name":%(name)s,"lineno":%(lineno)d,"module":%(module)s,"funcName":%(funcName)s,"levelname":%(levelname)s,"message":%(message)s}'}},<br> 'handlers': { 'console': { 'class': 'logging.StreamHandler',<br> 'formatter': 'standard',<br> 'level': 'DEBUG'},<br> 'default': { 'backupCount': 5,<br> 'class': 'logging.handlers.RotatingFileHandler',<br> 'filename': '/schedule_center/logs/access.log',<br> 'formatter': 'standard',<br> 'level': 'INFO',<br> 'maxBytes': 5242880},<br> 'error': { 'backupCount': 5,<br> 'class': 'logging.handlers.RotatingFileHandler',<br> 'filename': '/schedule_center/logs/error.log',<br> 'formatter': 'standard',<br> 'level': 'ERROR',<br> 'maxBytes': 5242880},<br> 'mail_admins': { 'class': 'django.utils.log.AdminEmailHandler',<br> 'include_html': True,<br> 'level': 'ERROR'}},<br> 'loggers': { 'django': { 'handlers': ['default', 'console'],<br> 'level': 'INFO',<br> 'propagate': False},<br> 'django.request': { 'handlers': ['error'],<br> 'level': 'INFO',<br> 'propagate': False},<br> 'sourceDns.webdns.util': { 'handlers': ['error'],<br> 'level': 'ERROR',<br> 'propagate': True},<br> 'sourceDns.webdns.views': { 'handlers': [ 'default',<br> 'error'],<br> 'level': 'INFO',<br> 'propagate': True}},<br> 'version': 1}<br> LOGGING_CONFIG: 'logging.config.dictConfig'<br> LOGIN_REDIRECT_URL: '/accounts/profile/'<br> LOGIN_URL: '/accounts/login/'<br> LOGOUT_REDIRECT_URL: None<br> MANAGERS: []<br> MEDIA_ROOT: ''<br> MEDIA_URL: ''<br> MESSAGE_STORAGE: 'django.contrib.messages.storage.fallback.FallbackStorage'<br> MIDDLEWARE: ['django.middleware.security.SecurityMiddleware',<br> 'django.contrib.sessions.middleware.SessionMiddleware',<br> 'django.middleware.common.CommonMiddleware',<br> 'django.middleware.csrf.CsrfViewMiddleware',<br> 'django.contrib.auth.middleware.AuthenticationMiddleware',<br> 'django.contrib.messages.middleware.MessageMiddleware',<br> 'django.middleware.clickjacking.XFrameOptionsMiddleware']<br> MIDDLEWARE_CLASSES: ['django.middleware.common.CommonMiddleware',<br> 'django.middleware.csrf.CsrfViewMiddleware']<br> MIGRATION_MODULES: {<br> }<br> MONTH_DAY_FORMAT: 'F j'<br> NUMBER_GROUPING: 0<br> OPERATIONCMD: 4<br> OPERATIONCMDBYDIY: 5<br> OPERATIONERROR: 10<br> PASSWORD_HASHERS: '</strong>'<br> PASSWORD_RESET_TIMEOUT_DAYS: '<strong>'<br> PREPEND_WWW: False<br> QUEUE: ''<br> REDIS_DB: 1<br> REDIS_HOST: '</strong><strong>'<br> REDIS_PORT: ******<br> REDIS_PWD: '</strong><strong>'<br> REDIS_URL: 'redis://:</strong><strong>@</strong><strong>:</strong><strong>/1'<br> ROOT_URLCONF: 'schedule_center.urls'<br> SALTAPI: '</strong><strong>'<br> SALTPWD: '</strong><strong>'<br> SALTUSER: '</strong><strong>'<br> SECRET_KEY: '</strong><strong>'<br> SECURE_BROWSER_XSS_FILTER: False<br> SECURE_CONTENT_TYPE_NOSNIFF: False<br> SECURE_HSTS_INCLUDE_SUBDOMAINS: False<br> SECURE_HSTS_PRELOAD: False<br> SECURE_HSTS_SECONDS: 0<br> SECURE_PROXY_SSL_HEADER: None<br> SECURE_REDIRECT_EXEMPT: []<br> SECURE_SSL_HOST: None<br> SECURE_SSL_REDIRECT: False<br> SERVER_EMAIL: 'root@localhost'<br> SESSION_CACHE_ALIAS: 'default'<br> SESSION_COOKIE_AGE: 5400<br> SESSION_COOKIE_DOMAIN: None<br> SESSION_COOKIE_HTTPONLY: True<br> SESSION_COOKIE_NAME: 'sessionid'<br> SESSION_COOKIE_PATH: '/schedule_center'<br> SESSION_COOKIE_SECURE: False<br> SESSION_ENGINE: 'django.contrib.sessions.backends.db'<br> SESSION_EXPIRE_AT_BROWSER_CLOSE: True<br> SESSION_FILE_PATH: None<br> SESSION_SAVE_EVERY_REQUEST: False<br> SESSION_SERIALIZER: 'django.contrib.sessions.serializers.JSONSerializer'<br> SETTINGS_MODULE: 'schedule_center.settings_prd'<br> SHORT_DATETIME_FORMAT: 'm/d/Y P'<br> SHORT_DATE_FORMAT: 'm/d/Y'<br> SIGNING_BACKEND: 'django.core.signing.TimestampSigner'<br> SILENCED_SYSTEM_CHECKS: []<br> STATICFILES_DIRS: ['/schedule_center/schedule_center/static']<br> STATICFILES_FINDERS: ['django.contrib.staticfiles.finders.FileSystemFinder',<br> 'django.contrib.staticfiles.finders.AppDirectoriesFinder']<br> STATICFILES_STORAGE: 'django.contrib.staticfiles.storage.StaticFilesStorage'<br> STATIC_ROOT: None<br> STATIC_URL: '/schedule_center/static/'<br> TEMPLATES: [{'APP_DIRS': True,<br> 'BACKEND': 'django.template.backends.django.DjangoTemplates',<br> 'DIRS': ['/schedule_center/templates'],<br> 'OPTIONS': {'context_processors': ['django.template.context_processors.debug',<br> 'django.template.context_processors.request',<br> 'django.contrib.auth.context_processors.auth',<br> 'django.contrib.messages.context_processors.messages']}}]<br> TEST_NON_SERIALIZED_APPS: []<br> TEST_RUNNER: 'django.test.runner.DiscoverRunner'<br> THOUSAND_SEPARATOR: ','<br> TIME_FORMAT: 'P'<br> TIME_INPUT_FORMATS: ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']<br> TIME_ZONE: 'Asia/Shanghai'<br> TOKEN: '</strong><strong>'<br> USERLOGIN: 11<br> USERLOGOUT: 12<br> USE_ETAGS: False<br> USE_I18N: True<br> USE_L10N: True<br> USE_THOUSAND_SEPARATOR: False<br> USE_TZ: False<br> USE_X_FORWARDED_HOST: False<br> USE_X_FORWARDED_PORT: False<br> WSGI_APPLICATION: 'schedule_center.wsgi.application'<br> X_FRAME_OPTIONS: 'SAMEORIGIN'<br> YEAR_MONTH_FORMAT: 'F Y'<br> ZABBIX_PASSWORD: '</strong><strong>'<br> ZABBIX_URL: 'http://</strong><strong>/api_jsonrpc.php'<br> ZABBIX_USERNAME: '</strong>**'<br> is_overridden: &lt;bound method Settings.is_overridden of &lt;Settings "schedule_center.settings_prd"&gt;&gt;</p> <p dir="auto">BROKER_URL = 'amqp://username:[email protected]:5672/CRON-celery?heartbeat=30'<br> AMQP_URL = 'amqp://username:[email protected]:5672/ws?heartbeat=30'</p> <p dir="auto">EXCHANGE_NAME = "ws.fanout"</p> <p dir="auto">CELERY_BEAT_SCHEDULER = 'django_celery_beat.schedulers:DatabaseScheduler'<br> CELERY_RESULT_BACKEND = "celery_redis_cluster_backend.redis_cluster.RedisClusterBackend"</p> <h1 dir="auto">CELERY_BEAT_SCHEDULER = 'Common.schedulers:DatabaseScheduler'</h1> <h1 dir="auto">CELERY_RESULT_BACKEND = 'django_celery_beat.backends.database:DatabaseBackend'</h1> <h1 dir="auto">CELERY_IGNORE_RESULT = True</h1> <p dir="auto">CELERY_FORCE_EXECV = True<br> CELERY_ACCEPT_CONTENT = ['application/json']<br> CELERY_TASK_SERIALIZER = 'json'<br> CELERY_RESULT_SERIALIZER = 'json'<br> CELERYD_CONCURRENCY = 50<br> CELERYD_MAX_TASKS_PER_CHILD = 200</p> <p dir="auto">CELERY_TIMEZONE = TIME_ZONE<br> CELERY_ENABLE_UTC=False<br> DJANGO_CELERY_BEAT_TZ_AWARE = False<br> CELERY_TASK_RESULT_EXPIRES = 60*90<br> CELERY_IGNORE_RESULT = False</p> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: 3.6 for me</li> <li><strong>Minimal Celery Version</strong>: 4.3.0 for me</li> <li><strong>Minimal Kombu Version</strong>: 4.5.0 for me</li> <li><strong>Minimal Broker Version</strong>: rabbitmq with 3.7.12</li> <li><strong>Minimal Result Backend Version</strong>: redis with 4.0</li> <li><strong>Minimal OS and/or Kernel Version</strong>: Debian GNU/Linux 9 3.10.0-327.el7.x86_64</li> <li><strong>Minimal Broker Client Version</strong>: librabbitmq 2.0.0</li> <li><strong>Minimal Result Backend Client Version</strong>: celery_redis_cluster_backend NA</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.4.2 anyjson==0.3.3 APScheduler==3.5.3 asgi-rabbitmq==0.5.5 asgi-redis==1.4.3 asgiref==1.1.2 asn1crypto==0.24.0 attrs==18.2.0 autobahn==19.2.1 Automat==0.7.0 Babel==2.6.0 billiard==3.6.0.0 cached-property==1.5.1 celery==4.3.0 -e git://github.com/hbasria/celery-redis-cluster-backend.git@943e9c0d41272c52c57e5ef205ada6d141a92931#egg=celery_redis_cluster_backend certifi==2018.11.29 cffi==1.12.2 channels==1.1.8 chardet==3.0.4 Click==7.0 configparser==3.5.0 constantly==15.1.0 cryptography==2.4.2 daphne==1.4.2 defusedxml==0.5.0 diff-match-patch==20181111 Django==1.11.18 django-apscheduler==0.2.12 django-cas-client==1.4.0 django-celery==3.2.2 django-celery-beat==1.1.0 django-cors-headers==2.4.0 django-crispy-forms==1.7.2 django-filter==1.1.0 django-formtools==2.1 django-import-export==1.1.0 django-nose==1.4.6 django-ranged-response==0.2.0 django-redis==4.10.0 django-redis-sessions==0.5.0 django-rest-framework==0.1.0 django-reversion==3.0.0 django-simple-captcha==0.5.9 django-websocket-redis==0.4.5 djangorestframework==3.8.2 djangorestframework-jwt==1.11.0 dnspython==1.16.0 ephem==3.7.6.0 et-xmlfile==1.0.1 eventlet==0.24.1 Flask==1.0.2 flower==0.9.2 funcsigs==1.0.2 gevent==1.4.0 greenlet==0.4.15 hyperlink==18.0.0 idna==2.8 incremental==17.5.0 IPy==0.83 itsdangerous==1.1.0 itypes==1.1.0 jdcal==1.4 Jinja2==2.10 kombu==4.5.0 librabbitmq==2.0.0 Markdown==2.6.11 MarkupSafe==1.0 mock==2.0.0 monotonic==1.5 msgpack==0.6.0 msgpack-python==0.5.6 multi-key-dict==2.0.3 mysqlclient==1.3.13 nose==1.3.7 numpy==1.16.0 odfpy==1.4.0 openpyxl==2.5.12 pbr==4.0.4 pika==0.11.2 Pillow==5.2.0 pyasn1==0.4.3 pyasn1-modules==0.2.2 pycparser==2.18 pycryptodome==3.8.1 PyHamcrest==1.9.0 PyJWT==1.6.4 pymongo==3.6.1 PyMySQL==0.9.2 pyOpenSSL==18.0.0 python-dateutil==2.7.3 python-jenkins==1.2.1 pytz==2018.9 PyYAML==3.13 pyzabbix==0.7.5 redis==2.10.6 redis-py-cluster==1.3.6 requests==2.21.0 service-identity==18.1.0 six==1.12.0 tablib==0.12.1 tornado==5.1.1 Twisted==18.9.0 txaio==18.8.1 tzlocal==1.5.1 unicodecsv==0.14.1 urllib3==1.22 uWSGI==2.0.18 vine==1.3.0 virtualenv==16.0.0 websocket-client==0.35.0 Werkzeug==0.14.1 xlrd==1.2.0 xlwt==1.3.0 zope.interface==4.6.0"><pre class="notranslate"><code class="notranslate">amqp==2.4.2 anyjson==0.3.3 APScheduler==3.5.3 asgi-rabbitmq==0.5.5 asgi-redis==1.4.3 asgiref==1.1.2 asn1crypto==0.24.0 attrs==18.2.0 autobahn==19.2.1 Automat==0.7.0 Babel==2.6.0 billiard==3.6.0.0 cached-property==1.5.1 celery==4.3.0 -e git://github.com/hbasria/celery-redis-cluster-backend.git@943e9c0d41272c52c57e5ef205ada6d141a92931#egg=celery_redis_cluster_backend certifi==2018.11.29 cffi==1.12.2 channels==1.1.8 chardet==3.0.4 Click==7.0 configparser==3.5.0 constantly==15.1.0 cryptography==2.4.2 daphne==1.4.2 defusedxml==0.5.0 diff-match-patch==20181111 Django==1.11.18 django-apscheduler==0.2.12 django-cas-client==1.4.0 django-celery==3.2.2 django-celery-beat==1.1.0 django-cors-headers==2.4.0 django-crispy-forms==1.7.2 django-filter==1.1.0 django-formtools==2.1 django-import-export==1.1.0 django-nose==1.4.6 django-ranged-response==0.2.0 django-redis==4.10.0 django-redis-sessions==0.5.0 django-rest-framework==0.1.0 django-reversion==3.0.0 django-simple-captcha==0.5.9 django-websocket-redis==0.4.5 djangorestframework==3.8.2 djangorestframework-jwt==1.11.0 dnspython==1.16.0 ephem==3.7.6.0 et-xmlfile==1.0.1 eventlet==0.24.1 Flask==1.0.2 flower==0.9.2 funcsigs==1.0.2 gevent==1.4.0 greenlet==0.4.15 hyperlink==18.0.0 idna==2.8 incremental==17.5.0 IPy==0.83 itsdangerous==1.1.0 itypes==1.1.0 jdcal==1.4 Jinja2==2.10 kombu==4.5.0 librabbitmq==2.0.0 Markdown==2.6.11 MarkupSafe==1.0 mock==2.0.0 monotonic==1.5 msgpack==0.6.0 msgpack-python==0.5.6 multi-key-dict==2.0.3 mysqlclient==1.3.13 nose==1.3.7 numpy==1.16.0 odfpy==1.4.0 openpyxl==2.5.12 pbr==4.0.4 pika==0.11.2 Pillow==5.2.0 pyasn1==0.4.3 pyasn1-modules==0.2.2 pycparser==2.18 pycryptodome==3.8.1 PyHamcrest==1.9.0 PyJWT==1.6.4 pymongo==3.6.1 PyMySQL==0.9.2 pyOpenSSL==18.0.0 python-dateutil==2.7.3 python-jenkins==1.2.1 pytz==2018.9 PyYAML==3.13 pyzabbix==0.7.5 redis==2.10.6 redis-py-cluster==1.3.6 requests==2.21.0 service-identity==18.1.0 six==1.12.0 tablib==0.12.1 tornado==5.1.1 Twisted==18.9.0 txaio==18.8.1 tzlocal==1.5.1 unicodecsv==0.14.1 urllib3==1.22 uWSGI==2.0.18 vine==1.3.0 virtualenv==16.0.0 websocket-client==0.35.0 Werkzeug==0.14.1 xlrd==1.2.0 xlwt==1.3.0 zope.interface==4.6.0 </code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <h1 dir="auto">Actual Behavior</h1> <blockquote> <p dir="auto">The Celery Worker Log Output</p> </blockquote> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-lv8dv [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-zg5tj [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-dlctr [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-q7x8v [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-cgthd [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-dgh8r [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-pkklk [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-fscqx [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-28hz7 [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-pz4zv [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-gt4mw [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-796s5 [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-w2rnc [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-5rmfb"><pre class="notranslate"><code class="notranslate">[2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-lv8dv [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-zg5tj [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-dlctr [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-q7x8v [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-cgthd [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-dgh8r [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-pkklk [2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-fscqx [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-28hz7 [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-pz4zv [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-gt4mw [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-796s5 [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-w2rnc [2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-5rmfb </code></pre></div>
0
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto"><code class="notranslate">get_url</code> module</p> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">Ansible 2.4.1.0 (sorry, don't have the exact ansible --version output at hand right now)</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" &quot;ansible_python&quot;: { &quot;executable&quot;: &quot;/usr/bin/python&quot;, &quot;has_sslcontext&quot;: true, &quot;type&quot;: &quot;CPython&quot;, &quot;version&quot;: { &quot;major&quot;: 2, &quot;micro&quot;: 12, &quot;minor&quot;: 7, &quot;releaselevel&quot;: &quot;final&quot;, &quot;serial&quot;: 0 }, &quot;version_info&quot;: [ 2, 7, 12, &quot;final&quot;, 0 ] }"><pre class="notranslate"> <span class="pl-ent">"ansible_python"</span>: { <span class="pl-ent">"executable"</span>: <span class="pl-s"><span class="pl-pds">"</span>/usr/bin/python<span class="pl-pds">"</span></span>, <span class="pl-ent">"has_sslcontext"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>CPython<span class="pl-pds">"</span></span>, <span class="pl-ent">"version"</span>: { <span class="pl-ent">"major"</span>: <span class="pl-c1">2</span>, <span class="pl-ent">"micro"</span>: <span class="pl-c1">12</span>, <span class="pl-ent">"minor"</span>: <span class="pl-c1">7</span>, <span class="pl-ent">"releaselevel"</span>: <span class="pl-s"><span class="pl-pds">"</span>final<span class="pl-pds">"</span></span>, <span class="pl-ent">"serial"</span>: <span class="pl-c1">0</span> }, <span class="pl-ent">"version_info"</span>: [ <span class="pl-c1">2</span>, <span class="pl-c1">7</span>, <span class="pl-c1">12</span>, <span class="pl-s"><span class="pl-pds">"</span>final<span class="pl-pds">"</span></span>, <span class="pl-c1">0</span> ] }</pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">nothing changed</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Ubuntu 16.04 in a Vagrant Box running on VirtualBox on Windows. The script runs during Vagrant's Ansible provisioning.</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Ansible's get_url module fails to retrieve data when these conditions are met:</p> <ul dir="auto"> <li>A proxy is defined (through https_proxy environment variable in my case)</li> <li>The target url is secure i.e. uses https://</li> <li>Certificate validation is active (which it is by default)</li> </ul> <p dir="auto">It then says "Connection to proxy failed". In my case there's a cascade of proxies with a local cntlm talking to the corporate squid proxy.</p> <p dir="auto">The problem does not occur when you use <code class="notranslate">validate_certs: no</code>. In Ansible the issues seems to arise from </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/ansible/ansible/blob/e946c4b3b73be28871ab67965584e060d7da1c4b/lib/ansible/module_utils/urls.py#L602">ansible/lib/ansible/module_utils/urls.py</a> </p> <p class="mb-0 color-fg-muted"> Line 602 in <a data-pjax="true" class="commit-tease-sha" href="/ansible/ansible/commit/e946c4b3b73be28871ab67965584e060d7da1c4b">e946c4b</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L602" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="602"></td> <td id="LC602" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-v">CONNECT_COMMAND</span> <span class="pl-c1">=</span> <span class="pl-s">"CONNECT %s:%s HTTP/1.0<span class="pl-cce">\r</span><span class="pl-cce">\n</span>Connection: close<span class="pl-cce">\r</span><span class="pl-cce">\n</span>"</span> </td> </tr> </tbody></table> </div> </div> That is part of the <code class="notranslate">SSLValidationHandler</code> in that file. And that is only used when using <code class="notranslate">validate_certs: yes</code>. Please see below for details and packet captures.<p></p> <p dir="auto">The problem is pretty much the same as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="257425810" data-permission-text="Title is private" data-url="https://github.com/request/request/issues/2766" data-hovercard-type="issue" data-hovercard-url="/request/request/issues/2766/hovercard" href="https://github.com/request/request/issues/2766">request/request#2766</a> in the <code class="notranslate">requests</code> library. Similar problems have been reported in Ansible before (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="73961578" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/10941" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/10941/hovercard" href="https://github.com/ansible/ansible/issues/10941">#10941</a>) but that discussion is a bit misleading and eventually led nowhere.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">You'd need a web proxy like squid. Make sure to <code class="notranslate">export https_proxy=http://whatever-adress-your-proxy-may-have.net:3128</code> to point to that proxy.</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" - name: download nodejs script to add repository get_url: url: https://deb.nodesource.com/setup_7.x dest: /tmp/nodejs_setup_7.x mode: 0755"><pre class="notranslate"> - <span class="pl-ent">name</span>: <span class="pl-s">download nodejs script to add repository</span> <span class="pl-ent">get_url</span>: <span class="pl-ent">url</span>: <span class="pl-s">https://deb.nodesource.com/setup_7.x</span> <span class="pl-ent">dest</span>: <span class="pl-s">/tmp/nodejs_setup_7.x</span> <span class="pl-ent">mode</span>: <span class="pl-c1">0755</span></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">get_url should connect through the proxy, verify the certificate, fetch the URL, and save the file.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">The file is not retrieved. An error is written and the below traceback is printed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File &quot;/tmp/ansible_akRnA9/ansible_modlib.zip/ansible/module_utils/urls.py&quot;, line 1044, in fetch_url client_key=client_key, cookies=cookies) File &quot;/tmp/ansible_akRnA9/ansible_modlib.zip/ansible/module_utils/urls.py&quot;, line 951, in open_url r = urllib_request.urlopen(*urlopen_args) File &quot;/usr/lib/python2.7/urllib2.py&quot;, line 154, in urlopen return opener.open(url, data, timeout) File &quot;/usr/lib/python2.7/urllib2.py&quot;, line 427, in open req = meth(req) File &quot;/tmp/ansible_akRnA9/ansible_modlib.zip/ansible/module_utils/urls.py&quot;, line 740, in http_request self.validate_proxy_response(connect_result) File &quot;/tmp/ansible_akRnA9/ansible_modlib.zip/ansible/module_utils/urls.py&quot;, line 682, in validate_proxy_response raise ProxyError('Connection to proxy failed')"><pre class="notranslate"><code class="notranslate"> File "/tmp/ansible_akRnA9/ansible_modlib.zip/ansible/module_utils/urls.py", line 1044, in fetch_url client_key=client_key, cookies=cookies) File "/tmp/ansible_akRnA9/ansible_modlib.zip/ansible/module_utils/urls.py", line 951, in open_url r = urllib_request.urlopen(*urlopen_args) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 427, in open req = meth(req) File "/tmp/ansible_akRnA9/ansible_modlib.zip/ansible/module_utils/urls.py", line 740, in http_request self.validate_proxy_response(connect_result) File "/tmp/ansible_akRnA9/ansible_modlib.zip/ansible/module_utils/urls.py", line 682, in validate_proxy_response raise ProxyError('Connection to proxy failed') </code></pre></div> <p dir="auto">I used tcpdump to compare get_url with</p> <ul dir="auto"> <li><code class="notranslate">validate_certs: yes</code></li> <li><code class="notranslate">validate_certs: no</code></li> <li>and <code class="notranslate">wget</code></li> </ul> <p dir="auto">This is the result in packet capture snippets:<br> <strong>validate yes</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CONNECT deb.nodesource.com:443 HTTP/1.0 Connection: close HTTP/1.1 407 Proxy Authentication Required Server: squid/3.5.27 Mime-Version: 1.0 Date: Wed, 08 Nov 2017 07:25:21 GMT"><pre class="notranslate"><code class="notranslate">CONNECT deb.nodesource.com:443 HTTP/1.0 Connection: close HTTP/1.1 407 Proxy Authentication Required Server: squid/3.5.27 Mime-Version: 1.0 Date: Wed, 08 Nov 2017 07:25:21 GMT </code></pre></div> <p dir="auto"><strong>validate no</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CONNECT deb.nodesource.com:443 HTTP/1.0 HTTP/1.1 200 Connection established Connection: close"><pre class="notranslate"><code class="notranslate">CONNECT deb.nodesource.com:443 HTTP/1.0 HTTP/1.1 200 Connection established Connection: close </code></pre></div> <p dir="auto"><strong>wget</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CONNECT deb.nodesource.com:443 HTTP/1.1 User-Agent: Wget/1.17.1 (linux-gnu) Host: deb.nodesource.com:443 HTTP/1.1 200 Connection established Connection: close"><pre class="notranslate"><code class="notranslate">CONNECT deb.nodesource.com:443 HTTP/1.1 User-Agent: Wget/1.17.1 (linux-gnu) Host: deb.nodesource.com:443 HTTP/1.1 200 Connection established Connection: close </code></pre></div> <p dir="auto">Notice that when using certificate validation get_url sets the <code class="notranslate">Connection: close</code> header. This causes squid to kill the connection right away. There seems to be a violation of <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html" rel="nofollow">rfc 2616</a>.</p> <p dir="auto">I wouldn't know what good it does anyway to set the header the way it's done. So I suggest to just get rid of setting the header. After all, it's not set when validation is off.</p>
<p dir="auto">I want to assert that certain EC2 security groups are present.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Create EC2 SSH security group. ec2_group: name: SSH description: Allows SSH access. state: present region: &quot;{{ aws_region }}&quot; rules: - proto: tcp from_port: 22 to_port: 22 cidr_ip: 0.0.0.0/0"><pre class="notranslate"><code class="notranslate">- name: Create EC2 SSH security group. ec2_group: name: SSH description: Allows SSH access. state: present region: "{{ aws_region }}" rules: - proto: tcp from_port: 22 to_port: 22 cidr_ip: 0.0.0.0/0 </code></pre></div> <p dir="auto">It works the first time:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook -i hosts provision.yml PLAY [localhost] ************************************************************** TASK: [ec2 | Create EC2 SSH security group.] ********************************** changed: [localhost] PLAY RECAP ******************************************************************** localhost : ok=1 changed=1 unreachable=0 failed=0"><pre class="notranslate"><code class="notranslate">$ ansible-playbook -i hosts provision.yml PLAY [localhost] ************************************************************** TASK: [ec2 | Create EC2 SSH security group.] ********************************** changed: [localhost] PLAY RECAP ******************************************************************** localhost : ok=1 changed=1 unreachable=0 failed=0 </code></pre></div> <p dir="auto">But when running it again, it fails:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook -i hosts provision.yml PLAY [localhost] ************************************************************** TASK: [ec2 | Create EC2 SSH security group.] ********************************** failed: [localhost] =&gt; {&quot;failed&quot;: true, &quot;item&quot;: &quot;&quot;, &quot;parsed&quot;: false} invalid output was: Traceback (most recent call last): File &quot;/home/danilo/.ansible/tmp/ansible-1389865891.33-218682145301746/ec2_group&quot;, line 1313, in &lt;module&gt; main() File &quot;/home/danilo/.ansible/tmp/ansible-1389865891.33-218682145301746/ec2_group&quot;, line 192, in main group = ec2.create_security_group(name, description, vpc_id=vpc_id) File &quot;/usr/lib/python2.7/site-packages/boto/ec2/connection.py&quot;, line 2948, in create_security_group SecurityGroup, verb='POST') File &quot;/usr/lib/python2.7/site-packages/boto/connection.py&quot;, line 1151, in get_object raise self.ResponseError(response.status, response.reason, body) boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;Response&gt;&lt;Errors&gt;&lt;Error&gt;&lt;Code&gt;InvalidGroup.Duplicate&lt;/Code&gt;&lt;Message&gt;The security group 'SSH' already exists for VPC 'vpc-ab1e15c9'&lt;/Message&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;RequestID&gt;76a8ffae-6e58-4ab4-aacb-fff220476816&lt;/RequestID&gt;&lt;/Response&gt; FATAL: all hosts have already failed -- aborting PLAY RECAP ******************************************************************** to retry, use: --limit @/home/danilo/provision.retry localhost : ok=0 changed=0 unreachable=0 failed=1"><pre class="notranslate"><code class="notranslate">$ ansible-playbook -i hosts provision.yml PLAY [localhost] ************************************************************** TASK: [ec2 | Create EC2 SSH security group.] ********************************** failed: [localhost] =&gt; {"failed": true, "item": "", "parsed": false} invalid output was: Traceback (most recent call last): File "/home/danilo/.ansible/tmp/ansible-1389865891.33-218682145301746/ec2_group", line 1313, in &lt;module&gt; main() File "/home/danilo/.ansible/tmp/ansible-1389865891.33-218682145301746/ec2_group", line 192, in main group = ec2.create_security_group(name, description, vpc_id=vpc_id) File "/usr/lib/python2.7/site-packages/boto/ec2/connection.py", line 2948, in create_security_group SecurityGroup, verb='POST') File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1151, in get_object raise self.ResponseError(response.status, response.reason, body) boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;Response&gt;&lt;Errors&gt;&lt;Error&gt;&lt;Code&gt;InvalidGroup.Duplicate&lt;/Code&gt;&lt;Message&gt;The security group 'SSH' already exists for VPC 'vpc-ab1e15c9'&lt;/Message&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;RequestID&gt;76a8ffae-6e58-4ab4-aacb-fff220476816&lt;/RequestID&gt;&lt;/Response&gt; FATAL: all hosts have already failed -- aborting PLAY RECAP ******************************************************************** to retry, use: --limit @/home/danilo/provision.retry localhost : ok=0 changed=0 unreachable=0 failed=1 </code></pre></div> <p dir="auto">Is there a way to make this module idempotent? When a rule with the same name already exists, the rules should be compared. If they're the same, it should set the status to "not changed". (Otherwise an error could be thrown.)</p>
0
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 4.2</li> <li>Operating System / Platform =&gt; Ubuntu 18.04</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">Incorrect output from cv2.dnn.NMSBoxes. I think it can because of incorrect rounding in python bindings.</p> <h5 dir="auto">Steps to reproduce</h5> <p dir="auto">Incorrect</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import cv2 rect1 = [0.0, 0.0, 0.2, 0.2] rect2 = [0.2, 0.2, 0.4, 0.4] cv2.dnn.NMSBoxes([rect1, rect2], [1.0, 1.0], 0.5, 0.5) # output: array([[0]], dtype=int32)"><pre class="notranslate"><code class="notranslate">import cv2 rect1 = [0.0, 0.0, 0.2, 0.2] rect2 = [0.2, 0.2, 0.4, 0.4] cv2.dnn.NMSBoxes([rect1, rect2], [1.0, 1.0], 0.5, 0.5) # output: array([[0]], dtype=int32) </code></pre></div> <p dir="auto">Let's multiply each value of rectangles by 10. Now, output is correct</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import cv2 rect1 = [0.0, 0.0, 2.0, 2.0] rect2 = [2.0, 2.0, 4.0, 4.0] cv2.dnn.NMSBoxes([rect1, rect2], [1.0, 1.0], 0.5, 0.5) # output: array([[0], [1]], dtype=int32)"><pre class="notranslate"><code class="notranslate">import cv2 rect1 = [0.0, 0.0, 2.0, 2.0] rect2 = [2.0, 2.0, 4.0, 4.0] cv2.dnn.NMSBoxes([rect1, rect2], [1.0, 1.0], 0.5, 0.5) # output: array([[0], [1]], dtype=int32) </code></pre></div> <p dir="auto">Also, code in c++ works correct:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#include &lt;iostream&gt; #include &lt;vector&gt; #include &lt;opencv2/imgproc.hpp&gt; #include &lt;opencv2/highgui.hpp&gt; #include &lt;opencv2/dnn.hpp&gt; using namespace cv; using namespace cv::dnn; using namespace std; int main() { int a; vector&lt;float&gt; confidences = {1.0, 1.0}; float confThreshold = 0.5; float nmsThreshold = 0.5; std::vector&lt;int&gt; indices; vector&lt;Rect2d&gt; boxes = {{0, 0, 0.2, 0.2}, {0.2, 0.2, 0.3, 0.3}}; NMSBoxes(boxes, confidences, confThreshold, nmsThreshold, indices); for (auto i: indices) cout&lt;&lt;i&lt;&lt;endl; return 0; } //Output: //0 //1"><pre class="notranslate"><code class="notranslate">#include &lt;iostream&gt; #include &lt;vector&gt; #include &lt;opencv2/imgproc.hpp&gt; #include &lt;opencv2/highgui.hpp&gt; #include &lt;opencv2/dnn.hpp&gt; using namespace cv; using namespace cv::dnn; using namespace std; int main() { int a; vector&lt;float&gt; confidences = {1.0, 1.0}; float confThreshold = 0.5; float nmsThreshold = 0.5; std::vector&lt;int&gt; indices; vector&lt;Rect2d&gt; boxes = {{0, 0, 0.2, 0.2}, {0.2, 0.2, 0.3, 0.3}}; NMSBoxes(boxes, confidences, confThreshold, nmsThreshold, indices); for (auto i: indices) cout&lt;&lt;i&lt;&lt;endl; return 0; } //Output: //0 //1 </code></pre></div> <h5 dir="auto">Issue submission checklist</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues,<br> answers.opencv.org, Stack Overflow, etc and have not found solution </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I updated to latest OpenCV version and the issue is still there </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> There is reproducer code and related data files: videos, images, onnx, etc </li> </ul>
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 4.0.1</li> <li>Operating System / Platform =&gt; macOS 10.14.6</li> <li>Compiler =&gt; Apple Clang 11.0.0 (clang-1100.0.33.16)</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto"><code class="notranslate">cv::dnn::NMSBoxes</code> can accept <code class="notranslate">std::vector&lt;Rect2d&gt;</code> but only the one for <code class="notranslate">std::vector&lt;Rect&gt;</code> can be called from python.</p> <h5 dir="auto">Steps to reproduce</h5> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="boxes_zero = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]] conf = [.6, .5, .2] print(cv2.dnn.NMSBoxes(boxes_zero, conf, 0, 0)) # returns [[0]] boxes0 = [[1, 2, 3, 4], [2, 1, 3, 4], [4, 3, 2, 1]] print(cv2.dnn.NMSBoxes(boxes0, conf, 0, 0)) # returns [[0], [2]] boxes1 = [[float(elem) for elem in box] for box in boxes0] print(cv2.dnn.NMSBoxes(boxes1, conf, 0, 0)) # returns [[0], [2]] boxes2 = [[elem * 0.1 for elem in box] for box in boxes1] print(cv2.dnn.NMSBoxes(boxes2, conf, 0, 0)) # returns [[0]] boxes3 = np.array(boxes0)[np.newaxis, :] print(cv2.dnn.NMSBoxes(boxes3, conf, 0, 0)) # returns [[0], [2]] boxes4 = boxes3.astype(np.float64) print(cv2.dnn.NMSBoxes(boxes4, conf, 0, 0)) # returns [[0], [2]] boxes5 = boxes4 * 0.1 print(cv2.dnn.NMSBoxes(boxes5, conf, 0, 0)) # returns [[0]] boxes6 = boxes5.astype(np.float32) print(cv2.dnn.NMSBoxes(boxes6, conf, 0, 0)) # returns [[0]] boxes7 = boxes6 * 10 print(cv2.dnn.NMSBoxes(boxes7, conf, 0, 0)) # returns [[0], [2]]"><pre class="notranslate"><span class="pl-s1">boxes_zero</span> <span class="pl-c1">=</span> [[<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>]] <span class="pl-s1">conf</span> <span class="pl-c1">=</span> [<span class="pl-c1">.6</span>, <span class="pl-c1">.5</span>, <span class="pl-c1">.2</span>] <span class="pl-en">print</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">NMSBoxes</span>(<span class="pl-s1">boxes_zero</span>, <span class="pl-s1">conf</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>)) <span class="pl-c"># returns [[0]]</span> <span class="pl-s1">boxes0</span> <span class="pl-c1">=</span> [[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>], [<span class="pl-c1">4</span>, <span class="pl-c1">3</span>, <span class="pl-c1">2</span>, <span class="pl-c1">1</span>]] <span class="pl-en">print</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">NMSBoxes</span>(<span class="pl-s1">boxes0</span>, <span class="pl-s1">conf</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>)) <span class="pl-c"># returns [[0], [2]]</span> <span class="pl-s1">boxes1</span> <span class="pl-c1">=</span> [[<span class="pl-en">float</span>(<span class="pl-s1">elem</span>) <span class="pl-k">for</span> <span class="pl-s1">elem</span> <span class="pl-c1">in</span> <span class="pl-s1">box</span>] <span class="pl-k">for</span> <span class="pl-s1">box</span> <span class="pl-c1">in</span> <span class="pl-s1">boxes0</span>] <span class="pl-en">print</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">NMSBoxes</span>(<span class="pl-s1">boxes1</span>, <span class="pl-s1">conf</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>)) <span class="pl-c"># returns [[0], [2]]</span> <span class="pl-s1">boxes2</span> <span class="pl-c1">=</span> [[<span class="pl-s1">elem</span> <span class="pl-c1">*</span> <span class="pl-c1">0.1</span> <span class="pl-k">for</span> <span class="pl-s1">elem</span> <span class="pl-c1">in</span> <span class="pl-s1">box</span>] <span class="pl-k">for</span> <span class="pl-s1">box</span> <span class="pl-c1">in</span> <span class="pl-s1">boxes1</span>] <span class="pl-en">print</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">NMSBoxes</span>(<span class="pl-s1">boxes2</span>, <span class="pl-s1">conf</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>)) <span class="pl-c"># returns [[0]]</span> <span class="pl-s1">boxes3</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-s1">boxes0</span>)[<span class="pl-s1">np</span>.<span class="pl-s1">newaxis</span>, :] <span class="pl-en">print</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">NMSBoxes</span>(<span class="pl-s1">boxes3</span>, <span class="pl-s1">conf</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>)) <span class="pl-c"># returns [[0], [2]]</span> <span class="pl-s1">boxes4</span> <span class="pl-c1">=</span> <span class="pl-s1">boxes3</span>.<span class="pl-en">astype</span>(<span class="pl-s1">np</span>.<span class="pl-s1">float64</span>) <span class="pl-en">print</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">NMSBoxes</span>(<span class="pl-s1">boxes4</span>, <span class="pl-s1">conf</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>)) <span class="pl-c"># returns [[0], [2]]</span> <span class="pl-s1">boxes5</span> <span class="pl-c1">=</span> <span class="pl-s1">boxes4</span> <span class="pl-c1">*</span> <span class="pl-c1">0.1</span> <span class="pl-en">print</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">NMSBoxes</span>(<span class="pl-s1">boxes5</span>, <span class="pl-s1">conf</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>)) <span class="pl-c"># returns [[0]]</span> <span class="pl-s1">boxes6</span> <span class="pl-c1">=</span> <span class="pl-s1">boxes5</span>.<span class="pl-en">astype</span>(<span class="pl-s1">np</span>.<span class="pl-s1">float32</span>) <span class="pl-en">print</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">NMSBoxes</span>(<span class="pl-s1">boxes6</span>, <span class="pl-s1">conf</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>)) <span class="pl-c"># returns [[0]]</span> <span class="pl-s1">boxes7</span> <span class="pl-c1">=</span> <span class="pl-s1">boxes6</span> <span class="pl-c1">*</span> <span class="pl-c1">10</span> <span class="pl-en">print</span>(<span class="pl-s1">cv2</span>.<span class="pl-s1">dnn</span>.<span class="pl-v">NMSBoxes</span>(<span class="pl-s1">boxes7</span>, <span class="pl-s1">conf</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>)) <span class="pl-c"># returns [[0], [2]]</span></pre></div>
1
<p dir="auto"><strong>System information</strong></p> <ul dir="auto"> <li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes</li> <li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Debian 9.0 stretch</li> <li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:</li> <li>TensorFlow installed from (source or binary):</li> <li>TensorFlow version (use command below): v1.12.1-2376-gf5ce1c00d4 1.14.0-rc0</li> <li>Python version: 3.6</li> <li>Bazel version (if compiling from source):</li> <li>GCC/Compiler version (if compiling from source):</li> <li>CUDA/cuDNN version: 10.0/7.6</li> <li>GPU model and memory: NVIDIA Titan X (Pascal) 12Gb</li> </ul> <p dir="auto"><strong>Describe the current behavior</strong><br> logging from the python's standard library stopped working in TF 1.14. Log file is not created and the output supposed to be written there is instead redirected to the stdout, which results in each logging message appear twice in the console.</p> <p dir="auto"><strong>Describe the expected behavior</strong><br> When run on TF 1.12 , log.txt is created and the logging is being recorded correctly.</p> <p dir="auto"><strong>Code to reproduce the issue</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import logging import tensorflow as tf def main(_): FORMAT = '%(asctime)-15s %(message)s' logging.basicConfig(filename='log.txt', filemode='w', datefmt='%Y-%m-%d %H:%M:%S', level=logging.INFO, format=FORMAT) console = logging.StreamHandler() console.setLevel(logging.INFO) logging.getLogger('').addHandler(console) sess = tf.Session() logging.info(&quot;test write&quot;) if __name__ == '__main__': tf.app.run()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">logging</span> <span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span> <span class="pl-k">def</span> <span class="pl-en">main</span>(<span class="pl-s1">_</span>): <span class="pl-v">FORMAT</span> <span class="pl-c1">=</span> <span class="pl-s">'%(asctime)-15s %(message)s'</span> <span class="pl-s1">logging</span>.<span class="pl-en">basicConfig</span>(<span class="pl-s1">filename</span><span class="pl-c1">=</span><span class="pl-s">'log.txt'</span>, <span class="pl-s1">filemode</span><span class="pl-c1">=</span><span class="pl-s">'w'</span>, <span class="pl-s1">datefmt</span><span class="pl-c1">=</span><span class="pl-s">'%Y-%m-%d %H:%M:%S'</span>, <span class="pl-s1">level</span><span class="pl-c1">=</span><span class="pl-s1">logging</span>.<span class="pl-v">INFO</span>, <span class="pl-s1">format</span><span class="pl-c1">=</span><span class="pl-v">FORMAT</span>) <span class="pl-s1">console</span> <span class="pl-c1">=</span> <span class="pl-s1">logging</span>.<span class="pl-v">StreamHandler</span>() <span class="pl-s1">console</span>.<span class="pl-en">setLevel</span>(<span class="pl-s1">logging</span>.<span class="pl-v">INFO</span>) <span class="pl-s1">logging</span>.<span class="pl-en">getLogger</span>(<span class="pl-s">''</span>).<span class="pl-en">addHandler</span>(<span class="pl-s1">console</span>) <span class="pl-s1">sess</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-v">Session</span>() <span class="pl-s1">logging</span>.<span class="pl-en">info</span>(<span class="pl-s">"test write"</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">tf</span>.<span class="pl-s1">app</span>.<span class="pl-en">run</span>()</pre></div> <p dir="auto">This yields the following output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-06-16 17:54:24.047410: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10711 MB memory) -&gt; physical GPU (device: 0, name: TITAN X (Pascal), pci bus id: 0000:04:00.0, compute capability: 6.1) I0616 17:54:24.051054 140454010144128 test_logging.py:15] test write test write"><pre class="notranslate"><code class="notranslate">2019-06-16 17:54:24.047410: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10711 MB memory) -&gt; physical GPU (device: 0, name: TITAN X (Pascal), pci bus id: 0000:04:00.0, compute capability: 6.1) I0616 17:54:24.051054 140454010144128 test_logging.py:15] test write test write </code></pre></div> <p dir="auto">Notice that <code class="notranslate">test write</code> appears twice in the output. And log.txt is not created. When run with TF 1.12 this code snippets behaves as expected.</p>
<p dir="auto"><em>Please make sure that this is a bug. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template</em></p> <p dir="auto"><strong>System information</strong></p> <ul dir="auto"> <li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): mac OS Mojave</li> <li>TensorFlow installed from (source or binary): pip</li> <li>TensorFlow version (use command below): 2.0.0 alpha-0</li> <li>Python version: 3.7.2</li> </ul> <p dir="auto"><strong>Describe the current behavior</strong><br> When using Python internal "logging" module with Tensorflow, a logging module emits below warning message.</p> <blockquote> <p dir="auto">WARNING: Logging before flag parsing goes to stderr.</p> </blockquote> <p dir="auto">Also, it prints out duplicate logging message with my own formatter and something internally defined format(I guess) as below.</p> <blockquote> <p dir="auto">$ python3 test.py<br> [INFO|test.py:29] 2019-03-14 17:30:14,402 &gt;&gt; Hello World.<br> WARNING: Logging before flag parsing goes to stderr.<br> I0314 17:30:14.402168 4528047552 test.py:29] Hello World.<br> [INFO|test.py:30] 2019-03-14 17:30:14,402 &gt;&gt; This is message 1<br> I0314 17:30:14.402369 4528047552 test.py:30] This is message 1</p> </blockquote> <p dir="auto">When I try without importing Tensorflow, then it works properly.</p> <blockquote> <p dir="auto">$ python3 test.py<br> [INFO|test.py:29] 2019-03-14 17:37:40,172 &gt;&gt; Hello World.<br> [INFO|test.py:30] 2019-03-14 17:37:40,172 &gt;&gt; This is message 1</p> </blockquote> <p dir="auto"><strong>Describe the expected behavior</strong><br> Maybe stream handler is colliding each other.</p> <p dir="auto"><strong>Code to reproduce the issue</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import logging import tensorflow as tf formatter = logging.Formatter('[%(levelname)s|%(filename)s:%(lineno)s] %(asctime)s &gt;&gt; %(message)s') stream_logger = logging.getLogger('logger_stream') stream_logger.setLevel(logging.INFO) # Set handler streamHandler = logging.StreamHandler() streamHandler.setFormatter(formatter) stream_logger.addHandler(streamHandler) stream_logger.info(&quot;Hello World&quot;) stream_logger.info(&quot;This is message 1&quot;)"><pre class="notranslate"><code class="notranslate">import logging import tensorflow as tf formatter = logging.Formatter('[%(levelname)s|%(filename)s:%(lineno)s] %(asctime)s &gt;&gt; %(message)s') stream_logger = logging.getLogger('logger_stream') stream_logger.setLevel(logging.INFO) # Set handler streamHandler = logging.StreamHandler() streamHandler.setFormatter(formatter) stream_logger.addHandler(streamHandler) stream_logger.info("Hello World") stream_logger.info("This is message 1") </code></pre></div>
1
<p dir="auto">This should be a peerDependency...</p>
<p dir="auto"><a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/chai/chai.d.ts#L412">https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/chai/chai.d.ts#L412</a></p> <blockquote> <p dir="auto">node_modules/@types/chai/index.d.ts(412,11): error TS2451: Cannot redeclare block-scoped variable 'Object'.</p> </blockquote>
0
<p dir="auto">Example failure at<br> <a href="https://app.shippable.com/builds/55b327486572ba0c00576d31" rel="nofollow">https://app.shippable.com/builds/55b327486572ba0c00576d31</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- FAIL: TestDQ_always_pop_earliest_deadline (23.77 seconds) delay_test.go:256: Expected delay-prority of 1s got instead got 2s FAIL coverage: 64.9% of statements FAIL github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/queue 92.958s"><pre class="notranslate"><code class="notranslate">--- FAIL: TestDQ_always_pop_earliest_deadline (23.77 seconds) delay_test.go:256: Expected delay-prority of 1s got instead got 2s FAIL coverage: 64.9% of statements FAIL github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/queue 92.958s </code></pre></div> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/karlkfi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/karlkfi">@karlkfi</a></p>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one): BUG REPORT</p> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.0&quot;, GitCommit:&quot;a16c0a7f71a6f93c7e0f222d961f4675cd97a46b&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-09-26T18:16:57Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;darwin/amd64&quot;} Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.0&quot;, GitCommit:&quot;a16c0a7f71a6f93c7e0f222d961f4675cd97a46b&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-09-26T18:10:32Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:16:57Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:10:32Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} </code></pre></div> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>: AWS</li> <li><strong>OS</strong> (e.g. from /etc/os-release): Debian GNU/Linux 8 (jessie)</li> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux</li> </ul> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">Deployed a scheduled job from this manifest:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" --- apiVersion: batch/v2alpha1 kind: ScheduledJob metadata: name: expire-documents spec: schedule: 15,45 * * * * jobTemplate: spec: template: spec: containers: - name: expire-documents-job image: registry.example.com/base:alpine imagePullPolicy: Always args: - curl - -XPOST - -v - http://document.stage.svc.example.cluster:8080/admin/tasks/expire-documents restartPolicy: OnFailure imagePullSecrets: - name: my-registry"><pre class="notranslate"><code class="notranslate"> --- apiVersion: batch/v2alpha1 kind: ScheduledJob metadata: name: expire-documents spec: schedule: 15,45 * * * * jobTemplate: spec: template: spec: containers: - name: expire-documents-job image: registry.example.com/base:alpine imagePullPolicy: Always args: - curl - -XPOST - -v - http://document.stage.svc.example.cluster:8080/admin/tasks/expire-documents restartPolicy: OnFailure imagePullSecrets: - name: my-registry </code></pre></div> <p dir="auto">After some time the jobs are no longer executed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kubectl --namespace stage describe scheduledjobs Name: expire-documents Namespace: stage Schedule: 15,45 * * * * Concurrency Policy: Allow Suspend: False Starting Deadline Seconds: &lt;unset&gt; Image(s): registry.example.com/base:alpine Selector: &lt;unset&gt; Parallelism: &lt;unset&gt; Completions: &lt;unset&gt; No volumes. Labels: &lt;none&gt; Last Schedule Time: Sat, 08 Oct 2016 18:15:00 +0200 Active Jobs: &lt;none&gt; Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 1h 31m 178 {scheduled-job-controller } Warning FailedCreate Error creating job: jobs.batch &quot;expire-documents-1858111306&quot; already exists 30m 1m 177 {scheduled-job-controller } Warning FailedCreate Error creating job: jobs.batch &quot;expire-documents-1858242378&quot; already exists 8h 1m 14 {scheduled-job-controller } Warning FailedCreate (events with common reason combined) 56s 6s 6 {scheduled-job-controller } Warning FailedCreate Error creating job: jobs.batch &quot;expire-documents-1400211256&quot; already exists"><pre class="notranslate"><code class="notranslate">kubectl --namespace stage describe scheduledjobs Name: expire-documents Namespace: stage Schedule: 15,45 * * * * Concurrency Policy: Allow Suspend: False Starting Deadline Seconds: &lt;unset&gt; Image(s): registry.example.com/base:alpine Selector: &lt;unset&gt; Parallelism: &lt;unset&gt; Completions: &lt;unset&gt; No volumes. Labels: &lt;none&gt; Last Schedule Time: Sat, 08 Oct 2016 18:15:00 +0200 Active Jobs: &lt;none&gt; Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 1h 31m 178 {scheduled-job-controller } Warning FailedCreate Error creating job: jobs.batch "expire-documents-1858111306" already exists 30m 1m 177 {scheduled-job-controller } Warning FailedCreate Error creating job: jobs.batch "expire-documents-1858242378" already exists 8h 1m 14 {scheduled-job-controller } Warning FailedCreate (events with common reason combined) 56s 6s 6 {scheduled-job-controller } Warning FailedCreate Error creating job: jobs.batch "expire-documents-1400211256" already exists </code></pre></div> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">Jobs are executed as defined in the manifest.</p> <p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p> <p dir="auto">Deploy a scheduled job and wait for some time.</p>
0
<p dir="auto">ie8 calculates the size of input, textarea and select fields wrong if box sizing is border-box.</p> <p dir="auto">maybe a workaround:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="min-height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) min-height: (@input-height-base - @padding-base-vertical * 2 - 2px) ~&quot;\9&quot;; // ie8"><pre class="notranslate"><code class="notranslate">min-height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) min-height: (@input-height-base - @padding-base-vertical * 2 - 2px) ~"\9"; // ie8 </code></pre></div>
<p dir="auto">Removing min-height from Shared size and type resets in forms.less stops inputs being bloated in IE8. Tested in IE9/10 latest FF and Chrome and dosen't seem to cause any problems.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/9126cf33ff841c3102ad9b87701f5abb62775d0bd94971726cfcff4db401c25b/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f38333730382f3135363935382f62643762363064342d373661662d313165322d396138612d6236656365346366626464662e706e67"><img src="https://camo.githubusercontent.com/9126cf33ff841c3102ad9b87701f5abb62775d0bd94971726cfcff4db401c25b/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f38333730382f3135363935382f62643762363064342d373661662d313165322d396138612d6236656365346366626464662e706e67" alt="3d99c82e-6304-11e2-933e-9151f3701965" data-canonical-src="https://f.cloud.github.com/assets/83708/156958/bd7b60d4-76af-11e2-9a8a-b6ece4cfbddf.png" style="max-width: 100%;"></a></p>
1
<ul dir="auto"> <li>Atom version: v0.165.0</li> <li>OS: elementaryOS 0.2 "Luna" (64-bit)</li> </ul> <p dir="auto">Minor, but annoying if you like your projects hoisted into the sidebar. This seems to work fine on Windows 7.</p>
<p dir="auto">I checked this issue list and it seems it is not a duplicate. I suppose this could be considered an enhancement request.</p> <p dir="auto">Atom is too heavy-weighted. Given all those features such as package management, even some support like a web-browser way, it should be alright. But taking the official release as example, they are approximately 100 Mb, which is almost the size of Firefox browser. I see for windows compilation, chromiumcontent.dll is the single biggest file, along with others.</p> <p dir="auto">Is there any way or work goign on to slim down Atom a little bit more?</p>
0
<p dir="auto">I am having an issue with what seems to be a very infrequent infinite loop in <code class="notranslate">RungeKutta._step_impl</code> in <code class="notranslate">scipy/integrate/_ivp/rk.py</code>. Running a bunch of experiments in parallel on large number of cores, I maybe see it once a week, and not in any easily reproducible fashion, as far as I can tell.</p> <p dir="auto">I caught it after, as far as I can tell, <code class="notranslate">scipy.integrate</code> was running for a couple of days without completing. I am guessing <code class="notranslate">RungeKutta._step_impl</code> is the one not completing, but perhaps it's higher in the call stack.</p> <p dir="auto">I examined the running process using gdb with python extensions. At the point where <code class="notranslate">rk_step</code> is called inside the <code class="notranslate">while</code> loop, the following are some of the relevant values (more details are in the gdb session log below):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="self.n == 6 self.t == t == 0 self.y == y == numpy.ndarray([2.19183852e-33, 0, 1.40129846e-45, 0, 1.39532281e-34, 0]) self.h_abs == -NaN h_abs == NaN self.max_step == max_step == Inf min_step == 4.9406564584124654e-323 self.direction == 1 order == 4 h == t_new == -NaN self.t_bound = 0.02"><pre class="notranslate"><code class="notranslate">self.n == 6 self.t == t == 0 self.y == y == numpy.ndarray([2.19183852e-33, 0, 1.40129846e-45, 0, 1.39532281e-34, 0]) self.h_abs == -NaN h_abs == NaN self.max_step == max_step == Inf min_step == 4.9406564584124654e-323 self.direction == 1 order == 4 h == t_new == -NaN self.t_bound = 0.02 </code></pre></div> <p dir="auto">I am running:</p> <ul dir="auto"> <li>Ubuntu 16.04</li> <li>python 3.5.2</li> <li>numpy 1.15.4</li> <li>scipy 1.3.3</li> </ul> <p dir="auto">More complete <code class="notranslate">gdb</code> output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(gdb) py-bt Traceback (most recent call first): [...] File &quot;[...]/envs/model/model.py&quot;, line 215, in _tire_dynamics_rear * (np.tan(alpha)/(1+K))**2 ) File &quot;[...]/envs/model/model.py&quot;, line 83, in _dynamics F_xr, F_yr = self._tire_dynamics_rear(v_x, cmd_vx, alpha_r) File &quot;[...]/envs/model/model.py&quot;, line 55, in &lt;lambda&gt; fun=(lambda t, X: self._dynamics(X, t, U)), File &quot;/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/base.py&quot;, line 21, in fun_wrapped return np.asarray(fun(t, y), dtype=dtype) File &quot;/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/base.py&quot;, line 139, in fun return self.fun_single(t, y) File &quot;/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/rk.py&quot;, line 70, in rk_step K[s + 1] = fun(t + c * h, y + dy) File &quot;/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/rk.py&quot;, line 143, in _step_impl self.B, self.C, self.E, self.K) File &quot;/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/base.py&quot;, line 182, in step success, message = self._step_impl() File &quot;/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/ivp.py&quot;, line 502, in solve_ivp message = solver.step() File &quot;[...]/envs/model/model.py&quot;, line 56, in state_transition t_span=t, y0=X, atol=1e-5) [...] (gdb) py-up [...] (gdb) py-up #24 Frame 0x61ffa18, for file /usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/rk.py, line 143, in _step_impl (self=&lt;RK45(t=&lt;float at remote 0x7f80dcc71510&gt;, direction=&lt;numpy.float64 at remote 0x7f80dccc5ee8&gt;, K=&lt;numpy.ndarray at remote 0x7f80dcc53d00&gt;, vectorized=False, _fun=&lt;function at remote 0x7f80dcc51f28&gt;, y_old=None, status='running', f=&lt;numpy.ndarray at remote 0x7f80dcc53a80&gt;, y=&lt;numpy.ndarray at remote 0x7f80dcc53350&gt;, fun_vectorized=&lt;function at remote 0x7f80dcc51950&gt;, t_old=None, fun=&lt;function at remote 0x7f80dcc51d90&gt;, t_bound=&lt;float at remote 0x7f80dcc71090&gt;, njev=0, fun_single=&lt;function at remote 0x7f80dcc51f28&gt;, nfev=2149842846, nlu=0, atol=&lt;numpy.ndarray at remote 0x7f80dcc537b0&gt;, h_abs=&lt;numpy.float64 at remote 0x7f80dccdb2d0&gt;, rtol=&lt;float at remote 0x7f809c0ca6a8&gt;, n=6, max_step=&lt;float at remote 0x7f8184eb3420&gt;) at remote 0x7f80a0c9bb00&gt;, t=&lt;float at remote 0x7f80dcc71510&gt;, y=&lt;numpy.ndarray at remote 0x7f80dcc53350&gt;, max_step=&lt;float at remote 0x7f8184eb3420&gt;, rtol=&lt;float at remote 0x7f...(truncated) self.B, self.C, self.E, self.K) (gdb) py-print self local 'self' = &lt;RK45(t=&lt;float at remote 0x7f80dcc71510&gt;, direction=&lt;numpy.float64 at remote 0x7f80dccc5ee8&gt;, K=&lt;numpy.ndarray at remote 0x7f80dcc53d00&gt;, vectorized=False, _fun=&lt;function at remote 0x7f80dcc51f28&gt;, y_old=None, status='running', f=&lt;numpy.ndarray at remote 0x7f80dcc53a80&gt;, y=&lt;numpy.ndarray at remote 0x7f80dcc53350&gt;, fun_vectorized=&lt;function at remote 0x7f80dcc51950&gt;, t_old=None, fun=&lt;function at remote 0x7f80dcc51d90&gt;, t_bound=&lt;float at remote 0x7f80dcc71090&gt;, njev=0, fun_single=&lt;function at remote 0x7f80dcc51f28&gt;, nfev=2149842846, nlu=0, atol=&lt;numpy.ndarray at remote 0x7f80dcc537b0&gt;, h_abs=&lt;numpy.float64 at remote 0x7f80dccdb2d0&gt;, rtol=&lt;float at remote 0x7f809c0ca6a8&gt;, n=6, max_step=&lt;float at remote 0x7f8184eb3420&gt;) at remote 0x7f80a0c9bb00&gt; (gdb) py-print t local 't' = &lt;float at remote 0x7f80dcc71510&gt; (gdb) p * (PyFloatObject*) 0x7f80dcc71510 $36 = {ob_base = {ob_refcnt = 7, ob_type = 0xa3c2c0 &lt;PyFloat_Type&gt;}, ob_fval = 0} (gdb) py-print y local 'y' = &lt;numpy.ndarray at remote 0x7f80dcc53350&gt; (gdb) p *(PyArrayObject_fields*) 0x7f80dcc53350 $37 = {ob_base = {ob_refcnt = 12, ob_type = 0x7f81838f7180}, data = 0x9361740 &quot;4D\350\372^\a\005\300\320:\240v&lt;M\374?\221\361\240\266#\343\347\277\250\037\335d\323\271\376?O\210g\377\221\331\307?\332\v+1\227\315\301?\320\246\235\006&quot;, nd = 1, dimensions = 0x7397860, strides = 0x7397868, base = &lt;numpy.ndarray at remote 0x7f80dcc53710&gt;, descr = 0x7f81838f7ec0, flags = 1283, weakreflist = 0x0} (gdb) p ((PyArrayObject_fields*) 0x7f80dcc53350)-&gt;dimensions $38 = (npy_intp *) 0x7397860 (gdb) $39 = (npy_intp *) 0x7397860 (gdb) p *((PyArrayObject_fields*) 0x7f80dcc53350)-&gt;dimensions $40 = 6 (gdb) p (float[6])(((PyArrayObject_fields*) 0x7f80dcc53350)-&gt;data) $41 = {2.19183852e-33, 0, 1.40129846e-45, 0, 1.39532281e-34, 0} (gdb) py-print h_abs local 'h_abs' = &lt;numpy.float64 at remote 0x7f80dccdbca8&gt; (gdb) p * (PyFloatObject*) 0x7f80dccdb2d0 $42 = {ob_base = {ob_refcnt = 1, ob_type = 0x7f8183909600}, ob_fval = -nan(0x8000000000000)} (gdb) p * (PyFloatObject*) 0x7f80dccdbca8 $43 = {ob_base = {ob_refcnt = 1, ob_type = 0x7f8183909600}, ob_fval = nan(0x8000000000000)} (gdb) py-print max_step local 'max_step' = &lt;float at remote 0x7f8184eb3420&gt; (gdb) p * (PyFloatObject*) 0x7f8184eb3420 $44 = {ob_base = {ob_refcnt = 246, ob_type = 0xa3c2c0 &lt;PyFloat_Type&gt;}, ob_fval = inf} (gdb) py-print min_step local 'min_step' = &lt;numpy.float64 at remote 0x7f80dcd0f360&gt; (gdb) p * (PyFloatObject*) 0x7f80dcd0f360 $45 = {ob_base = {ob_refcnt = 1, ob_type = 0x7f8183909600}, ob_fval = 4.9406564584124654e-323} (gdb) p * (PyFloatObject*) 0x7f80dccc5ee8 $46 = {ob_base = {ob_refcnt = 1, ob_type = 0x7f8183909600}, ob_fval = 1} (gdb) py-print order local 'order' = 4 (gdb) py-print step_accepted local 'step_accepted' = False (gdb) py-print h local 'h' = &lt;numpy.float64 at remote 0x7f80dccd4270&gt; (gdb) p * (PyFloatObject*) 0x7f80dccd4270 $47 = {ob_base = {ob_refcnt = 3, ob_type = 0x7f8183909600}, ob_fval = -nan(0x8000000000000)} (gdb) p * (PyFloatObject*) 0x7f80dcc71090 $48 = {ob_base = {ob_refcnt = 2, ob_type = 0xa3c2c0 &lt;PyFloat_Type&gt;}, ob_fval = 0.02} (gdb) py-print t_new local 't_new' = &lt;numpy.float64 at remote 0x7f80dcdacf18&gt; (gdb) p * (PyFloatObject*) 0x7f80dcdacf18 $49 = {ob_base = {ob_refcnt = 1, ob_type = 0x7f8183909600}, ob_fval = -nan(0x8000000000000)}"><pre class="notranslate"><code class="notranslate">(gdb) py-bt Traceback (most recent call first): [...] File "[...]/envs/model/model.py", line 215, in _tire_dynamics_rear * (np.tan(alpha)/(1+K))**2 ) File "[...]/envs/model/model.py", line 83, in _dynamics F_xr, F_yr = self._tire_dynamics_rear(v_x, cmd_vx, alpha_r) File "[...]/envs/model/model.py", line 55, in &lt;lambda&gt; fun=(lambda t, X: self._dynamics(X, t, U)), File "/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/base.py", line 21, in fun_wrapped return np.asarray(fun(t, y), dtype=dtype) File "/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/base.py", line 139, in fun return self.fun_single(t, y) File "/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/rk.py", line 70, in rk_step K[s + 1] = fun(t + c * h, y + dy) File "/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/rk.py", line 143, in _step_impl self.B, self.C, self.E, self.K) File "/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/base.py", line 182, in step success, message = self._step_impl() File "/usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/ivp.py", line 502, in solve_ivp message = solver.step() File "[...]/envs/model/model.py", line 56, in state_transition t_span=t, y0=X, atol=1e-5) [...] (gdb) py-up [...] (gdb) py-up #24 Frame 0x61ffa18, for file /usr/local/lib/python3.5/dist-packages/scipy/integrate/_ivp/rk.py, line 143, in _step_impl (self=&lt;RK45(t=&lt;float at remote 0x7f80dcc71510&gt;, direction=&lt;numpy.float64 at remote 0x7f80dccc5ee8&gt;, K=&lt;numpy.ndarray at remote 0x7f80dcc53d00&gt;, vectorized=False, _fun=&lt;function at remote 0x7f80dcc51f28&gt;, y_old=None, status='running', f=&lt;numpy.ndarray at remote 0x7f80dcc53a80&gt;, y=&lt;numpy.ndarray at remote 0x7f80dcc53350&gt;, fun_vectorized=&lt;function at remote 0x7f80dcc51950&gt;, t_old=None, fun=&lt;function at remote 0x7f80dcc51d90&gt;, t_bound=&lt;float at remote 0x7f80dcc71090&gt;, njev=0, fun_single=&lt;function at remote 0x7f80dcc51f28&gt;, nfev=2149842846, nlu=0, atol=&lt;numpy.ndarray at remote 0x7f80dcc537b0&gt;, h_abs=&lt;numpy.float64 at remote 0x7f80dccdb2d0&gt;, rtol=&lt;float at remote 0x7f809c0ca6a8&gt;, n=6, max_step=&lt;float at remote 0x7f8184eb3420&gt;) at remote 0x7f80a0c9bb00&gt;, t=&lt;float at remote 0x7f80dcc71510&gt;, y=&lt;numpy.ndarray at remote 0x7f80dcc53350&gt;, max_step=&lt;float at remote 0x7f8184eb3420&gt;, rtol=&lt;float at remote 0x7f...(truncated) self.B, self.C, self.E, self.K) (gdb) py-print self local 'self' = &lt;RK45(t=&lt;float at remote 0x7f80dcc71510&gt;, direction=&lt;numpy.float64 at remote 0x7f80dccc5ee8&gt;, K=&lt;numpy.ndarray at remote 0x7f80dcc53d00&gt;, vectorized=False, _fun=&lt;function at remote 0x7f80dcc51f28&gt;, y_old=None, status='running', f=&lt;numpy.ndarray at remote 0x7f80dcc53a80&gt;, y=&lt;numpy.ndarray at remote 0x7f80dcc53350&gt;, fun_vectorized=&lt;function at remote 0x7f80dcc51950&gt;, t_old=None, fun=&lt;function at remote 0x7f80dcc51d90&gt;, t_bound=&lt;float at remote 0x7f80dcc71090&gt;, njev=0, fun_single=&lt;function at remote 0x7f80dcc51f28&gt;, nfev=2149842846, nlu=0, atol=&lt;numpy.ndarray at remote 0x7f80dcc537b0&gt;, h_abs=&lt;numpy.float64 at remote 0x7f80dccdb2d0&gt;, rtol=&lt;float at remote 0x7f809c0ca6a8&gt;, n=6, max_step=&lt;float at remote 0x7f8184eb3420&gt;) at remote 0x7f80a0c9bb00&gt; (gdb) py-print t local 't' = &lt;float at remote 0x7f80dcc71510&gt; (gdb) p * (PyFloatObject*) 0x7f80dcc71510 $36 = {ob_base = {ob_refcnt = 7, ob_type = 0xa3c2c0 &lt;PyFloat_Type&gt;}, ob_fval = 0} (gdb) py-print y local 'y' = &lt;numpy.ndarray at remote 0x7f80dcc53350&gt; (gdb) p *(PyArrayObject_fields*) 0x7f80dcc53350 $37 = {ob_base = {ob_refcnt = 12, ob_type = 0x7f81838f7180}, data = 0x9361740 "4D\350\372^\a\005\300\320:\240v&lt;M\374?\221\361\240\266#\343\347\277\250\037\335d\323\271\376?O\210g\377\221\331\307?\332\v+1\227\315\301?\320\246\235\006", nd = 1, dimensions = 0x7397860, strides = 0x7397868, base = &lt;numpy.ndarray at remote 0x7f80dcc53710&gt;, descr = 0x7f81838f7ec0, flags = 1283, weakreflist = 0x0} (gdb) p ((PyArrayObject_fields*) 0x7f80dcc53350)-&gt;dimensions $38 = (npy_intp *) 0x7397860 (gdb) $39 = (npy_intp *) 0x7397860 (gdb) p *((PyArrayObject_fields*) 0x7f80dcc53350)-&gt;dimensions $40 = 6 (gdb) p (float[6])(((PyArrayObject_fields*) 0x7f80dcc53350)-&gt;data) $41 = {2.19183852e-33, 0, 1.40129846e-45, 0, 1.39532281e-34, 0} (gdb) py-print h_abs local 'h_abs' = &lt;numpy.float64 at remote 0x7f80dccdbca8&gt; (gdb) p * (PyFloatObject*) 0x7f80dccdb2d0 $42 = {ob_base = {ob_refcnt = 1, ob_type = 0x7f8183909600}, ob_fval = -nan(0x8000000000000)} (gdb) p * (PyFloatObject*) 0x7f80dccdbca8 $43 = {ob_base = {ob_refcnt = 1, ob_type = 0x7f8183909600}, ob_fval = nan(0x8000000000000)} (gdb) py-print max_step local 'max_step' = &lt;float at remote 0x7f8184eb3420&gt; (gdb) p * (PyFloatObject*) 0x7f8184eb3420 $44 = {ob_base = {ob_refcnt = 246, ob_type = 0xa3c2c0 &lt;PyFloat_Type&gt;}, ob_fval = inf} (gdb) py-print min_step local 'min_step' = &lt;numpy.float64 at remote 0x7f80dcd0f360&gt; (gdb) p * (PyFloatObject*) 0x7f80dcd0f360 $45 = {ob_base = {ob_refcnt = 1, ob_type = 0x7f8183909600}, ob_fval = 4.9406564584124654e-323} (gdb) p * (PyFloatObject*) 0x7f80dccc5ee8 $46 = {ob_base = {ob_refcnt = 1, ob_type = 0x7f8183909600}, ob_fval = 1} (gdb) py-print order local 'order' = 4 (gdb) py-print step_accepted local 'step_accepted' = False (gdb) py-print h local 'h' = &lt;numpy.float64 at remote 0x7f80dccd4270&gt; (gdb) p * (PyFloatObject*) 0x7f80dccd4270 $47 = {ob_base = {ob_refcnt = 3, ob_type = 0x7f8183909600}, ob_fval = -nan(0x8000000000000)} (gdb) p * (PyFloatObject*) 0x7f80dcc71090 $48 = {ob_base = {ob_refcnt = 2, ob_type = 0xa3c2c0 &lt;PyFloat_Type&gt;}, ob_fval = 0.02} (gdb) py-print t_new local 't_new' = &lt;numpy.float64 at remote 0x7f80dcdacf18&gt; (gdb) p * (PyFloatObject*) 0x7f80dcdacf18 $49 = {ob_base = {ob_refcnt = 1, ob_type = 0x7f8183909600}, ob_fval = -nan(0x8000000000000)} </code></pre></div> <p dir="auto">I am not able to share all the code, but the <code class="notranslate">model.py</code> file is essentially the same as <a href="https://github.com/r-pad/aa_simulation/blob/990f548047/envs/model/model.py">https://github.com/r-pad/aa_simulation/blob/990f548047/envs/model/model.py</a></p>
<h3 dir="auto">Describe your issue.</h3> <p dir="auto"><code class="notranslate">scipy.integrate._ivp.common.select_initial_step()</code> returns <code class="notranslate">numpy.nan</code> if <code class="notranslate">max(abs(y0)) == numpy.inf</code></p> <p dir="auto">This causes programs to lock, when calling <code class="notranslate">solve_ivp()</code> with such an initial value.</p> <p dir="auto">Probably, <code class="notranslate">select_initial_step()</code> (or its callers) should raise an Error in that situation.</p> <h3 dir="auto">Reproducing Code Example</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Call `solve_ivp()` with at least one component of `y0` being infinite (probably a NaN component would cause the same problem)."><pre class="notranslate"><span class="pl-v">Call</span> <span class="pl-s">`solve_ivp()`</span> <span class="pl-k">with</span> <span class="pl-s1">at</span> <span class="pl-s1">least</span> <span class="pl-s1">one</span> <span class="pl-s1">component</span> <span class="pl-s1">of</span> <span class="pl-s">`y0`</span> <span class="pl-s1">being</span> <span class="pl-en">infinite</span> (<span class="pl-s1">probably</span> <span class="pl-s1">a</span> <span class="pl-v">NaN</span> <span class="pl-s1">component</span> <span class="pl-s1">would</span> <span class="pl-s1">cause</span> <span class="pl-s1">the</span> <span class="pl-s1">same</span> <span class="pl-s1">problem</span>).</pre></div> <h3 dir="auto">Error message</h3> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="None, program goes into infinite loop, when calling `solve_ivp()`"><pre class="notranslate">None, program goes into infinite loop, when calling <span class="pl-en">`solve_ivp</span>()<span class="pl-s"><span class="pl-pds">`</span></span></pre></div> <h3 dir="auto">SciPy/NumPy/Python version information</h3> <p dir="auto">1.9.3 1.23.5 sys.version_info(major=3, minor=10, micro=6, releaselevel='final', serial=0)</p>
1
<p dir="auto">We have a dark application background. However, the browser-window initially shows as white(which causes flickering) and we want to make it custom color so it matches our application background(which will prevent the flickering).</p>
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong><br> My application (REST client) allows to manipulate cookies when making a HTTP request. It also allows to export and import application data. It is possible to export created session cookies data but it is not possible to import them back because the URL used to set the cookie is not available.</p> <p dir="auto"><strong>Describe the solution you'd like</strong><br> When querying for cookie data from the session class I would like to see another property with original URL used to set the cookie.</p> <p dir="auto"><strong>Describe alternatives you've considered</strong><br> I was considering creating a database storing cookie with the url but it would defeat the purpose of using this API in the first place as I would have to duplicate the whole API.</p> <p dir="auto"><strong>Additional context</strong><br> There are few use cases when the user would export cookie data from the application:</p> <ul dir="auto"> <li>application backup</li> <li>moving application to another machine</li> <li>sharing session data with team mates so it's easier for them to use the REST client</li> </ul> <p dir="auto">In the application the user can configure cookies by either creating a cookie manually or by opening a browser window and logging in to a web service.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3320020/44633140-ac14a980-a93b-11e8-8993-627683fc058b.png"><img src="https://user-images.githubusercontent.com/3320020/44633140-ac14a980-a93b-11e8-8993-627683fc058b.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">When the application makes a request to the endpoint it queries for the cookies to apply them to the request.</p> <p dir="auto">This feature would also simplifies cookie removal from the session. Currently when the user request from the panel on the screenshot to remove a cookie the application constructs the url from cookie domain and cookie path. However sometimes I noticed it does not work as intended. Having the URL would also allows the app to handle this issue.</p>
0
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">AttributeError: module 'matplotlib' has no attribute 'verbose'</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="# from matplotlib import cbook, pyplot as plt, style # #"><pre class="notranslate"><span class="pl-c"># from matplotlib import cbook, pyplot as plt, style</span> <span class="pl-c">#</span> <span class="pl-c">#</span></pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;C:/Users/95235/Desktop/history-1.py&quot;, line 4, in &lt;module&gt; from matplotlib import cbook, pyplot as plt, style File &quot;D:\JetBrains\pyEnv\python363\lib\site-packages\matplotlib\pyplot.py&quot;, line 115, in &lt;module&gt; _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File &quot;D:\JetBrains\pyEnv\python363\lib\site-packages\matplotlib\backends\__init__.py&quot;, line 62, in pylab_setup [backend_name], 0) File &quot;D:\JetBrains\PyCharm 2017.3\helpers\pycharm_matplotlib_backend\backend_interagg.py&quot;, line 17, in &lt;module&gt; verbose = matplotlib.verbose AttributeError: module 'matplotlib' has no attribute 'verbose'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "C:/Users/95235/Desktop/history-1.py", line 4, in &lt;module&gt; from matplotlib import cbook, pyplot as plt, style File "D:\JetBrains\pyEnv\python363\lib\site-packages\matplotlib\pyplot.py", line 115, in &lt;module&gt; _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "D:\JetBrains\pyEnv\python363\lib\site-packages\matplotlib\backends\__init__.py", line 62, in pylab_setup [backend_name], 0) File "D:\JetBrains\PyCharm 2017.3\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 17, in &lt;module&gt; verbose = matplotlib.verbose AttributeError: module 'matplotlib' has no attribute 'verbose' </code></pre></div> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">"verbose = matplotlib.verbose"(line in in backend_interagg.py) should be "verbose = matplotlib.Verbose"</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: Windows 10</li> <li>Matplotlib version: matplotlib-2.2.0</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://backend_interagg</li> <li>Python version: python 3.6.3</li> <li>Jupyter version (if applicable):</li> <li>Other libraries:</li> </ul> <p dir="auto">pip install matplotlib</p>
<p dir="auto">Minimum amount of code to reproduce the bug:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt x = [0.15, 0.11, 0.06, 0.06, 0.12, 0.56] flierprops = dict(marker='o', markerfacecolor='green', markersize=12, linestyle='none') plt.boxplot(x, flierprops=flierprops) plt.show()"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt x = [0.15, 0.11, 0.06, 0.06, 0.12, 0.56] flierprops = dict(marker='o', markerfacecolor='green', markersize=12, linestyle='none') plt.boxplot(x, flierprops=flierprops) plt.show() </code></pre></div> <p dir="auto">This produces<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/438870/4129016/530ddecc-3317-11e4-964b-c9f08541e321.png"><img src="https://cloud.githubusercontent.com/assets/438870/4129016/530ddecc-3317-11e4-964b-c9f08541e321.png" alt="buggy-boxplot" style="max-width: 100%;"></a></p> <p dir="auto">Note the flier is a large blue plus sign, not a green circle as specified by <code class="notranslate">flierprops</code>.</p> <p dir="auto">This happens with Python 2.7.8 and matplotlib 1.4.0 -- haven't tested other situations.</p> <p dir="auto">This bug does not seem to be dependent upon the particular choice of <code class="notranslate">flierprops</code> but I haven't exhaustively tested this.</p> <p dir="auto">Notably, this broken example can also be found in the boxplot demo code: <a href="http://matplotlib.org/examples/statistics/boxplot_demo.html" rel="nofollow">http://matplotlib.org/examples/statistics/boxplot_demo.html</a></p> <p dir="auto">The relevant code at that page is shown in the third line at the top and the last two lines at the bottom of this image:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/438870/4129069/b013e958-3318-11e4-9d9f-508539471c4e.png"><img src="https://cloud.githubusercontent.com/assets/438870/4129069/b013e958-3318-11e4-9d9f-508539471c4e.png" alt="boxplot-demo-code" style="max-width: 100%;"></a></p> <p dir="auto">And the demo graph that results from this demo code is also broken in the same way as the first example -- a large blue plus is shown instead of the specified symbol:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/438870/4129072/ba1a1a9e-3318-11e4-837b-dfd5bb6fdf28.png"><img src="https://cloud.githubusercontent.com/assets/438870/4129072/ba1a1a9e-3318-11e4-837b-dfd5bb6fdf28.png" alt="boxplot-demo-broken-result" style="max-width: 100%;"></a></p> <p dir="auto">Lastly, note that if the the <code class="notranslate">sym</code> argument is provided that specifies the symbol desired, <code class="notranslate">boxplot</code> does seem to respect <code class="notranslate">flierprops</code>. Code example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt x = [0.15, 0.11, 0.06, 0.06, 0.12, 0.56] flierprops = dict(marker='o', markerfacecolor='red', markersize=16, linestyle='none') plt.boxplot(x, flierprops=flierprops, sym='o') # Added sym argument! plt.show()"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt x = [0.15, 0.11, 0.06, 0.06, 0.12, 0.56] flierprops = dict(marker='o', markerfacecolor='red', markersize=16, linestyle='none') plt.boxplot(x, flierprops=flierprops, sym='o') # Added sym argument! plt.show() </code></pre></div> <p dir="auto">Result:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/438870/4129051/26ec9878-3318-11e4-89d1-2529e2fd52b5.png"><img src="https://cloud.githubusercontent.com/assets/438870/4129051/26ec9878-3318-11e4-89d1-2529e2fd52b5.png" alt="buggy-boxplot-fix" style="max-width: 100%;"></a></p> <p dir="auto">If this is the intended fix or correct way to use this function, this should be made clear in the documentation and in the demo code.</p> <p dir="auto">Justification for this issue: There were closed issues related to this, but one seemed to involve some debate about defaults and the other seemed to concern only lower values. The bug reported here is not a problem with defaults nor just with lower fliers. Couldn't find other potential duplicates but apologies if that is the case.</p>
0
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>Current Behavior</strong><br> A clear and concise description of the behavior.<br> Use <code class="notranslate">npx babel-upgrade --write</code> to update babel, but get this duplication issue, I check them but can't find which plugin or preset is duplicated<br> <strong>Input Code</strong></p> <ul dir="auto"> <li>REPL or Repo link if applicable:<br> This is new .bablerc file</li> </ul> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;presets&quot;: [ &quot;@babel/preset-react&quot;, &quot;@babel/preset-env&quot;, &quot;@babel/env&quot; ], &quot;plugins&quot;: [ [&quot;@babel/plugin-proposal-object-rest-spread&quot;, {}, &quot;unique-name-a&quot;], [&quot;@babel/plugin-syntax-dynamic-import&quot;, {}, &quot;unique-name-b&quot;], [&quot;@babel/plugin-syntax-import-meta&quot;, {}, &quot;unique-name-d&quot;], [&quot;@babel/plugin-proposal-class-properties&quot;, {}, &quot;unique-name-c&quot;], [&quot;@babel/plugin-proposal-json-strings&quot;, {}, &quot;unique-name-e&quot;], [ [&quot;@babel/plugin-proposal-decorators&quot;, {}, &quot;unique-name-p&quot;], { &quot;legacy&quot;: true } ], [&quot;@babel/plugin-proposal-function-sent&quot;, {}, &quot;unique-name-f&quot;], [&quot;@babel/plugin-proposal-export-namespace-from&quot;, {}, &quot;unique-name-g&quot;], [&quot;@babel/plugin-proposal-numeric-separator&quot;, {}, &quot;unique-name-h&quot;], [&quot;@babel/plugin-proposal-throw-expressions&quot;, {}, &quot;unique-name-i&quot;], [&quot;@babel/plugin-proposal-export-default-from&quot;, {}, &quot;unique-name-j&quot;], [&quot;@babel/plugin-proposal-logical-assignment-operators&quot;, {}, &quot;unique-name-k&quot;], [&quot;@babel/plugin-proposal-optional-chaining&quot;, {}, &quot;unique-name-l&quot;], [ [&quot;@babel/plugin-proposal-pipeline-operator&quot;, {}, &quot;unique-name-q&quot;], { &quot;proposal&quot;: &quot;minimal&quot; } ], [&quot;@babel/plugin-proposal-nullish-coalescing-operator&quot;, {}, &quot;unique-name-m&quot;], [&quot;@babel/plugin-proposal-do-expressions&quot;, {}, &quot;unique-name-n&quot;], [&quot;@babel/plugin-proposal-function-bind&quot;, {}, &quot;unique-name-o&quot;], ] }"><pre class="notranslate"><span class="pl-kos">{</span> <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span> <span class="pl-s">"@babel/preset-react"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/preset-env"</span><span class="pl-kos">,</span> <span class="pl-s">"@babel/env"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-object-rest-spread"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-a"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-syntax-dynamic-import"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-b"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-syntax-import-meta"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-d"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-class-properties"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-c"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-json-strings"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-e"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-decorators"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-p"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"legacy"</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-function-sent"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-f"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-export-namespace-from"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-g"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-numeric-separator"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-h"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-throw-expressions"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-i"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-export-default-from"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-j"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-logical-assignment-operators"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-k"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-optional-chaining"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-l"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-pipeline-operator"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-q"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"proposal"</span>: <span class="pl-s">"minimal"</span> <span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-nullish-coalescing-operator"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-m"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-do-expressions"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-n"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-function-bind"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"unique-name-o"</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">webpack.config.js file: (didn't do any change)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const webpack = require('webpack') const ExtractTextPlugin = require('extract-text-webpack-plugin') const path = require('path') module.exports = { devtool: 'source-map', entry: [ 'babel-polyfill', './public/scripts/main', ], module: { loaders: [ {test: /.json$/, loader: 'json'}, {test: /\.hbs$/, loader: 'handlebars'}, {test: /.jsx?$/, loader: 'babel', exclude: /node_modules\/(?!ol)/}, ], }, output: { filename: 'bundle.js', path: `${__dirname}/public/scripts/`, }, plugins: [ new webpack.DefinePlugin({ 'process.env': { NODE_ENV: '&quot;production&quot;', }, }), new webpack.IgnorePlugin(/regenerator|nodent|js-beautify/, /ajv/), new webpack.optimize.OccurenceOrderPlugin(), new webpack.optimize.DedupePlugin(), new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false, }, dead_code: true, minimize: true, }), ], resolve: { extensions: [ '', '.js', '.json', '.jsx', ], alias: { 'ol': path.resolve(__dirname, './', 'node_modules/ol'), 'react': path.resolve(__dirname, './', 'node_modules/react'), 'react-dom': path.resolve(__dirname, './', 'node_modules/react-dom'), 'styled-components': path.resolve(__dirname, './', 'node_modules/styled-components') } }, }"><pre class="notranslate"><code class="notranslate">const webpack = require('webpack') const ExtractTextPlugin = require('extract-text-webpack-plugin') const path = require('path') module.exports = { devtool: 'source-map', entry: [ 'babel-polyfill', './public/scripts/main', ], module: { loaders: [ {test: /.json$/, loader: 'json'}, {test: /\.hbs$/, loader: 'handlebars'}, {test: /.jsx?$/, loader: 'babel', exclude: /node_modules\/(?!ol)/}, ], }, output: { filename: 'bundle.js', path: `${__dirname}/public/scripts/`, }, plugins: [ new webpack.DefinePlugin({ 'process.env': { NODE_ENV: '"production"', }, }), new webpack.IgnorePlugin(/regenerator|nodent|js-beautify/, /ajv/), new webpack.optimize.OccurenceOrderPlugin(), new webpack.optimize.DedupePlugin(), new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false, }, dead_code: true, minimize: true, }), ], resolve: { extensions: [ '', '.js', '.json', '.jsx', ], alias: { 'ol': path.resolve(__dirname, './', 'node_modules/ol'), 'react': path.resolve(__dirname, './', 'node_modules/react'), 'react-dom': path.resolve(__dirname, './', 'node_modules/react-dom'), 'styled-components': path.resolve(__dirname, './', 'node_modules/styled-components') } }, } </code></pre></div> <p dir="auto"><strong>Expected behavior/code</strong><br> A clear and concise description of what you expected to happen (or code).</p> <p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p> <p dir="auto"><strong>Environment</strong></p> <ul dir="auto"> <li>Babel version(s): 7.00</li> <li>Node/npm version: Node 8/npm 5]</li> <li>OS: OSX 10.13.4</li> <li>Monorepo: [e.g. yes/no/Lerna]</li> <li>How you are using Babel: loader</li> </ul> <p dir="auto"><strong>Possible Solution</strong></p> <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>
<blockquote> <p dir="auto">Issue originally reported by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hzoo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hzoo">@hzoo</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="219374082" data-permission-text="Title is private" data-url="https://github.com/babel/babel-preset-env/issues/248" data-hovercard-type="issue" data-hovercard-url="/babel/babel-preset-env/issues/248/hovercard" href="https://github.com/babel/babel-preset-env/issues/248">babel/babel-preset-env#248</a></p> </blockquote> <p dir="auto">Just going to make another issue to talk about the ideal scenario for both polyfills and babel helpers and how we can get there via babel-preset-env.</p> <p dir="auto">How can we write ES20xx and ship the smallest amount of code (for a given target environment)?</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> syntax: if your target environment supports that syntax, don't compile it (the original point of this project)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> polyfill: if your target environment supports that built-in, don't polyfill it (done in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="181806367" data-permission-text="Title is private" data-url="https://github.com/babel/babel-preset-env/issues/20" data-hovercard-type="issue" data-hovercard-url="/babel/babel-preset-env/issues/20/hovercard" href="https://github.com/babel/babel-preset-env/issues/20">babel/babel-preset-env#20</a> v1.0.0)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> polyfill: if your code doesn't actually use the polyfill, don't add it (do a pass over all code to find the use of a built-in) <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="218600722" data-permission-text="Title is private" data-url="https://github.com/babel/babel-preset-env/issues/241" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel-preset-env/pull/241/hovercard" href="https://github.com/babel/babel-preset-env/pull/241">babel/babel-preset-env#241</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> bundler: do polyfills need to be it's own chunk (webpack)?</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> babel helpers: reference the same helpers instead of recreating per file (either via <a href="https://github.com/babel/babel/tree/7.0/packages/babel-plugin-transform-runtime#options">https://github.com/babel/babel/tree/7.0/packages/babel-plugin-transform-runtime#options</a>) or (<a href="http://babeljs.io/docs/plugins/external-helpers" rel="nofollow">http://babeljs.io/docs/plugins/external-helpers</a>) <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="219340245" data-permission-text="Title is private" data-url="https://github.com/babel/babel-preset-env/issues/246" data-hovercard-type="issue" data-hovercard-url="/babel/babel-preset-env/issues/246/hovercard" href="https://github.com/babel/babel-preset-env/issues/246">babel/babel-preset-env#246</a> Move transform-runtime into this preset if a library (<code class="notranslate">type: "library"</code>)?</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="219371745" data-permission-text="Title is private" data-url="https://github.com/babel/babel-preset-env/issues/247" data-hovercard-type="issue" data-hovercard-url="/babel/babel-preset-env/issues/247/hovercard" href="https://github.com/babel/babel-preset-env/issues/247">babel/babel-preset-env#247</a> Move external-helpers into this preset if an application (<code class="notranslate">type: "app"</code>)?</li> </ul> </li> </ul>
0
<h3 dir="auto">Version</h3> <p dir="auto">2.5.17</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://codepen.io/fjc0k/pen/KxBvbY?editors=1111" rel="nofollow">https://codepen.io/fjc0k/pen/KxBvbY?editors=1111</a></p> <h3 dir="auto">Steps to reproduce</h3> <ol dir="auto"> <li>open codepen url</li> <li>open console</li> </ol> <h3 dir="auto">What is expected?</h3> <p dir="auto">$attrs: <code class="notranslate">{ value: '' }</code></p> <p dir="auto">$listeners: <code class="notranslate">{ input: () =&gt; {} }</code></p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">$attrs: <code class="notranslate">{}</code></p> <p dir="auto">$listeners: <code class="notranslate">{ input: () =&gt; {} }</code></p>
<h3 dir="auto">Version</h3> <p dir="auto">2.6.10</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://codesandbox.io/embed/vue-template-3pnsx" rel="nofollow">https://codesandbox.io/embed/vue-template-3pnsx</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Click "toggle loading" button</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">Both child elements should have data attribute applied and should be green.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">First child element is missing data attribute</p> <hr> <p dir="auto">Looks like div element is reused between loader and first child of the slot content</p>
0
<h3 dir="auto">Describe the issue:</h3> <p dir="auto">Functions often accepts any ndarray as long as the elements are numbers. Using <code class="notranslate">npt.NDArray[np.number]</code> creates many mypy/pyright errors as none of the operators seems to be annotated for it.</p> <h3 dir="auto">Reproduce the code example:</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import numpy.typing as npt def foo(x: npt.NDArray[np.number]): x * 1 x * x"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span>.<span class="pl-s1">typing</span> <span class="pl-k">as</span> <span class="pl-s1">npt</span> <span class="pl-k">def</span> <span class="pl-en">foo</span>(<span class="pl-s1">x</span>: <span class="pl-s1">npt</span>.<span class="pl-v">NDArray</span>[<span class="pl-s1">np</span>.<span class="pl-s1">number</span>]): <span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-c1">1</span> <span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span></pre></div> <h3 dir="auto">Error message:</h3> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="error: Unsupported operand types for * (&quot;ndarray[Any, dtype[number[Any]]]&quot; and &quot;int&quot;) [operator] error: Unsupported operand types for * (&quot;ndarray[Any, dtype[number[Any]]]&quot; and &quot;ndarray[Any, dtype[number[Any]]]&quot;) [operator]"><pre class="notranslate">error: Unsupported operand types <span class="pl-k">for</span> <span class="pl-k">*</span> (<span class="pl-s"><span class="pl-pds">"</span>ndarray[Any, dtype[number[Any]]]<span class="pl-pds">"</span></span> and <span class="pl-s"><span class="pl-pds">"</span>int<span class="pl-pds">"</span></span>) [operator] error: Unsupported operand types <span class="pl-k">for</span> <span class="pl-k">*</span> (<span class="pl-s"><span class="pl-pds">"</span>ndarray[Any, dtype[number[Any]]]<span class="pl-pds">"</span></span> and <span class="pl-s"><span class="pl-pds">"</span>ndarray[Any, dtype[number[Any]]]<span class="pl-pds">"</span></span>) [operator]</pre></div> <h3 dir="auto">NumPy/Python version information:</h3> <p dir="auto">1.22.3 3.10.2 (v3.10.2:a58ebcc, Mar 10 2022, 19:36:59) [GCC 9.4.0]</p>
<h3 dir="auto">Describe the issue:</h3> <p dir="auto">Why operating on arrays typed as <code class="notranslate">npt.NDArray[np.number[Any]]</code>, the mypy plugin reports that <code class="notranslate">ndarray.__mul__</code> cannot accept argument type <code class="notranslate">int</code>.</p> <p dir="auto">I would expect that an array of <code class="notranslate">np.number</code> can be multiplied by an integer.</p> <h3 dir="auto">Reproduce the code example:</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# tmp.py from typing import Any import numpy as np from numpy import typing as npt arr: npt.NDArray[np.number[Any]] = np.array([1, 2]) arr * 3 # mypy error"><pre class="notranslate"><span class="pl-c"># tmp.py</span> <span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">Any</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-k">from</span> <span class="pl-s1">numpy</span> <span class="pl-k">import</span> <span class="pl-s1">typing</span> <span class="pl-k">as</span> <span class="pl-s1">npt</span> <span class="pl-s1">arr</span>: <span class="pl-s1">npt</span>.<span class="pl-v">NDArray</span>[<span class="pl-s1">np</span>.<span class="pl-s1">number</span>[<span class="pl-v">Any</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-s1">arr</span> <span class="pl-c1">*</span> <span class="pl-c1">3</span> <span class="pl-c"># mypy error</span></pre></div> <p dir="auto">Running <code class="notranslate">mypy</code> on the above code gives an error.</p> <h3 dir="auto">Error message:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ mypy tmp.py tmp.py:8: error: No overload variant of &quot;__mul__&quot; of &quot;ndarray&quot; matches argument type &quot;int&quot; tmp.py:8: note: Possible overload variants: tmp.py:8: note: def __mul__(self, Union[str, bytes, Sequence[Union[str, bytes]], Sequence[Sequence[Union[str, bytes]]], Sequence[Sequence[Sequence[Union[str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[str, bytes]]]]]]) -&gt; NoReturn tmp.py:8: note: def __mul__(self, Union[_SupportsArray[dtype[object_]], Sequence[_SupportsArray[dtype[object_]]], Sequence[Sequence[_SupportsArray[dtype[object_]]]], Sequence[Sequence[Sequence[_SupportsArray[dtype[object_]]]]], Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[object_]]]]]]]) -&gt; Any tmp.py:8: note: def __mul__(self, Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]]) -&gt; Any Found 1 error in 1 file (checked 1 source file)"><pre lang="text" class="notranslate"><code class="notranslate">$ mypy tmp.py tmp.py:8: error: No overload variant of "__mul__" of "ndarray" matches argument type "int" tmp.py:8: note: Possible overload variants: tmp.py:8: note: def __mul__(self, Union[str, bytes, Sequence[Union[str, bytes]], Sequence[Sequence[Union[str, bytes]]], Sequence[Sequence[Sequence[Union[str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[str, bytes]]]]]]) -&gt; NoReturn tmp.py:8: note: def __mul__(self, Union[_SupportsArray[dtype[object_]], Sequence[_SupportsArray[dtype[object_]]], Sequence[Sequence[_SupportsArray[dtype[object_]]]], Sequence[Sequence[Sequence[_SupportsArray[dtype[object_]]]]], Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[object_]]]]]]]) -&gt; Any tmp.py:8: note: def __mul__(self, Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]]) -&gt; Any Found 1 error in 1 file (checked 1 source file) </code></pre></div> <h3 dir="auto">NumPy/Python version information:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ mypy --version mypy 0.910 $ python Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:23:11) [GCC 9.4.0] on linux ... &gt;&gt;&gt; import numpy; print(numpy.__version__) 1.21.4"><pre lang="text" class="notranslate"><code class="notranslate">$ mypy --version mypy 0.910 $ python Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:23:11) [GCC 9.4.0] on linux ... &gt;&gt;&gt; import numpy; print(numpy.__version__) 1.21.4 </code></pre></div>
1
<pre class="notranslate">when the variable is pointer of instance making with new(), finalizer isn't call for last. ------------------ package main import "runtime" type foo struct { } func bar() { f := foo {} runtime.SetFinalizer(&amp;f, func(pf *foo) { println("finalized") }) } func main() { bar() bar() runtime.GC() } // finalized // finalized ------------------ but ------------------ package main import "runtime" type foo struct { } func bar() { f := new(foo) println("allocated", f) runtime.SetFinalizer(f, func(pf *foo) { println("finalized", pf) }) } func main() { bar() bar() runtime.GC() } // allocated 0x7b0008 // allocated 0x7b00f8 // finalized 0x7b0008 ------------------ It seems a bug.</pre>
<pre class="notranslate">If you view an interface as a set of constraints on the implementing type, then combining two interfaces (that are not mutually incompatible) such as: type I interface { f(); String() string } type J interface { g(); String() string } has a natural interpretation that is equivalent to an interface containing the union of such constraints. e.g. these should be equivalent: type IJ interface { I; J } type IJ interface { f(); g(); String() string } but in fact the first is an error: "duplicate method: String". This is somewhat surprising. Is there any reason not to permit this? The set-union behaviour is easy to understand, describe and implement, and it seems useful in practise when you have overlapping interfaces describing different aspects of a type. (I chose String() string since I've seen many users add this constraint to their interfaces. It could be any method though.)</pre>
0
<p dir="auto">The problem described in the issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="264799360" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/31620" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/31620/hovercard" href="https://github.com/ansible/ansible/issues/31620">#31620</a> still persists. Please reopen the issue!</p>
<p dir="auto">Playbook:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: provision server gather_facts: false hosts: - tag_role_{{ role }} roles: - { role: common, tags: [&quot;production&quot;, &quot;staging&quot;] } - { role: ruby193, tags: [&quot;production&quot;, &quot;staging&quot;] } - { role: deployer, tags: [&quot;production&quot;, &quot;staging&quot;] } - app - name: upload assets to S3 gather_facts: false hosts: - tag_role_{{ role }}[0] roles: - assets_sync"><pre class="notranslate"><code class="notranslate">- name: provision server gather_facts: false hosts: - tag_role_{{ role }} roles: - { role: common, tags: ["production", "staging"] } - { role: ruby193, tags: ["production", "staging"] } - { role: deployer, tags: ["production", "staging"] } - app - name: upload assets to S3 gather_facts: false hosts: - tag_role_{{ role }}[0] roles: - assets_sync </code></pre></div> <p dir="auto">Show tasks:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="system &quot;ansible-playbook ansible/app.yml ---list-tasks --private-key=~/.ssh/pd-app-server --inventory-file=ansible/hosts/ --tags='staging,web,queue'"><pre class="notranslate"><code class="notranslate">system "ansible-playbook ansible/app.yml ---list-tasks --private-key=~/.ssh/pd-app-server --inventory-file=ansible/hosts/ --tags='staging,web,queue' </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="playbook: ansible/app.yml play #1 (provision server): shell echo 'alias wpld=&quot;watch -n 0 \&quot;ps ax | grep unic\&quot;&quot;' &gt;&gt; {{bash_file}} shell echo 'alias pld=&quot;cd {{code_dir}}&quot;' &gt;&gt; {{bash_file}} shell echo 'alias rpld=&quot;sudo restart pipelinedeals&quot;' &gt;&gt; {{bash_file}} shell echo 'alias lpld=&quot;tail -f /var/log/syslog&quot;' &gt;&gt; {{bash_file}} create log dir move old logs and link dir restart rsyslog update apt install htop check if timezone has already been set up rm /etc/localtime link /etc/localtime install ntp install git Don't strict check github.com install build tools add repo for updated ruby install ruby193 don't install docs install bundler use multiple cores in bundler install rake transfer deployer key install build tools add nginx log directory add apt repo for nginx install nginx and needed packages set up nginx.conf prod logrotate nginx start nginx check if then remote_syslog is installed install remote_syslog gem add log_files conf for papertrail check if remote_syslog is running start remote_syslog clone source code bundle install shell echo 'export RESQUE_PASSWORD=baggio77' &gt;&gt; /etc/environment install resque_web service start resque_web shell echo 'export RAILS_ENV={{rails_env}}' &gt;&gt; /etc/environment shell echo 'export RACK_ENV={{rails_env}}' &gt;&gt; /etc/environment shell echo 'export REDIS_NAMESPACE={{deploy_key}}' &gt;&gt; /etc/environment shell echo 'export GIT_BRANCH={{git_branch}}' &gt;&gt; /etc/environment shell echo 'export WEB_CONCURRENCY={{web_concurrency}}' &gt;&gt; /etc/environment install ruby build dependencies clone source code bundle install add database.yml create log dir touch log file install java remove old assets remove old assets remove old assets bundle assets drop in web Procfile drop in web .foreman drop in queue Procfile drop in queue .foreman drop in staging Procfile drop in staging .foreman install service get status of service start pipelinedeals service restart pipelinedeals service"><pre class="notranslate"><code class="notranslate">playbook: ansible/app.yml play #1 (provision server): shell echo 'alias wpld="watch -n 0 \"ps ax | grep unic\""' &gt;&gt; {{bash_file}} shell echo 'alias pld="cd {{code_dir}}"' &gt;&gt; {{bash_file}} shell echo 'alias rpld="sudo restart pipelinedeals"' &gt;&gt; {{bash_file}} shell echo 'alias lpld="tail -f /var/log/syslog"' &gt;&gt; {{bash_file}} create log dir move old logs and link dir restart rsyslog update apt install htop check if timezone has already been set up rm /etc/localtime link /etc/localtime install ntp install git Don't strict check github.com install build tools add repo for updated ruby install ruby193 don't install docs install bundler use multiple cores in bundler install rake transfer deployer key install build tools add nginx log directory add apt repo for nginx install nginx and needed packages set up nginx.conf prod logrotate nginx start nginx check if then remote_syslog is installed install remote_syslog gem add log_files conf for papertrail check if remote_syslog is running start remote_syslog clone source code bundle install shell echo 'export RESQUE_PASSWORD=baggio77' &gt;&gt; /etc/environment install resque_web service start resque_web shell echo 'export RAILS_ENV={{rails_env}}' &gt;&gt; /etc/environment shell echo 'export RACK_ENV={{rails_env}}' &gt;&gt; /etc/environment shell echo 'export REDIS_NAMESPACE={{deploy_key}}' &gt;&gt; /etc/environment shell echo 'export GIT_BRANCH={{git_branch}}' &gt;&gt; /etc/environment shell echo 'export WEB_CONCURRENCY={{web_concurrency}}' &gt;&gt; /etc/environment install ruby build dependencies clone source code bundle install add database.yml create log dir touch log file install java remove old assets remove old assets remove old assets bundle assets drop in web Procfile drop in web .foreman drop in queue Procfile drop in queue .foreman drop in staging Procfile drop in staging .foreman install service get status of service start pipelinedeals service restart pipelinedeals service </code></pre></div> <p dir="auto">As you can see it doesn't show playbook <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3525397" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/2" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/2/hovercard" href="https://github.com/ansible/ansible/issues/2">#2</a>.</p> <p dir="auto">This is what happened when I actually ran it...</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [app | get status of service] ******************************************* changed: [ec2-54-234-223-73.compute-1.amazonaws.com] TASK: [app | start pipelinedeals service] ************************************* changed: [ec2-54-234-223-73.compute-1.amazonaws.com] TASK: [app | restart pipelinedeals service] *********************************** skipping: [ec2-54-234-223-73.compute-1.amazonaws.com] PLAY [upload assets to S3] **************************************************** TASK: [assets_sync | upload assets to S3 bucket - deal-shared] ****************"><pre class="notranslate"><code class="notranslate">TASK: [app | get status of service] ******************************************* changed: [ec2-54-234-223-73.compute-1.amazonaws.com] TASK: [app | start pipelinedeals service] ************************************* changed: [ec2-54-234-223-73.compute-1.amazonaws.com] TASK: [app | restart pipelinedeals service] *********************************** skipping: [ec2-54-234-223-73.compute-1.amazonaws.com] PLAY [upload assets to S3] **************************************************** TASK: [assets_sync | upload assets to S3 bucket - deal-shared] **************** </code></pre></div> <p dir="auto">That last task is from the 2nd playbook. I cut it off b/c it was doing something it shouldn't have. But it was running...</p>
0
<p dir="auto">I have seen evidence that both tuple indexing and slicing syntax are silently allowed by <code class="notranslate">rustc</code>, rather than requiring the feature gate turned on to enable them.</p> <p dir="auto">It could be that I missed some step along the way where these features were officially enabled. But I think its more likely that someone has accidentally turned them both on somehow, especially since the team discussion from last Thursday on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="45643411" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/18006" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/18006/hovercard" href="https://github.com/rust-lang/rust/issues/18006">#18006</a> included statements that tuple-indexing is meant to be feature gated.</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="% cat /tmp/f.rs fn main() { let t = ('a', 'b', 'c'); let v = vec!['x', 'y', 'z']; println!(&quot;t: {} v: {}&quot;, t.1, v[]); } % rustc-0.12-x64 --version=verbose rustc 0.12.0 (ba4081a5a 2014-10-07 13:44:41 -0700) binary: rustc commit-hash: ba4081a5a8573875fed17545846f6f6902c8ba8d commit-date: 2014-10-07 13:44:41 -0700 host: x86_64-apple-darwin release: 0.12.0 % rustc-0.12-x64 /tmp/f.rs % rustc --version rustc 0.13.0-dev (4480caf2a 2014-10-18 06:22:15 +0000) % rustc /tmp/f.rs % ./f t: b v: [x, y, z] % "><pre class="notranslate">% cat /tmp/f<span class="pl-kos">.</span><span class="pl-en">rs</span> fn main<span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> t = <span class="pl-kos">(</span><span class="pl-s">'a'</span><span class="pl-kos">,</span> <span class="pl-s">'b'</span><span class="pl-kos">,</span> <span class="pl-s">'c'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">let</span> v = <span class="pl-en">vec</span><span class="pl-en">!</span><span class="pl-kos">[</span><span class="pl-s">'x'</span>, <span class="pl-s">'y'</span>, <span class="pl-s">'z'</span><span class="pl-kos">]</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">"t: {} v: {}"</span>, t.<span class="pl-c1">1</span>, v<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> % rustc-<span class="pl-c1">0.12</span>-x64 --version=verbose rustc <span class="pl-c1">0.12</span><span class="pl-kos">.</span><span class="pl-c1">0</span> <span class="pl-kos">(</span>ba4081a5a <span class="pl-c1">2014</span>-<span class="pl-c1">10</span>-<span class="pl-c1">07</span> <span class="pl-c1">13</span><span class="pl-kos">:</span><span class="pl-c1">44</span><span class="pl-kos">:</span><span class="pl-c1">41</span> -<span class="pl-c1">0700</span><span class="pl-kos">)</span> binary<span class="pl-kos">:</span> rustc commit-hash<span class="pl-kos">:</span> ba4081a5a8573875fed17545846f6f6902c8ba8d commit-date<span class="pl-kos">:</span> <span class="pl-c1">2014</span>-<span class="pl-c1">10</span>-<span class="pl-c1">07</span> <span class="pl-c1">13</span><span class="pl-kos">:</span><span class="pl-c1">44</span><span class="pl-kos">:</span><span class="pl-c1">41</span> -<span class="pl-c1">0700</span> host<span class="pl-kos">:</span> x86_64-apple-darwin release<span class="pl-kos">:</span> <span class="pl-c1">0.12</span><span class="pl-kos">.</span><span class="pl-c1">0</span> % rustc-<span class="pl-c1">0.12</span>-x64 /tmp/f<span class="pl-kos">.</span><span class="pl-c1">rs</span> % rustc --version rustc <span class="pl-c1">0.13</span><span class="pl-kos">.</span><span class="pl-c1">0</span>-<span class="pl-en">dev</span> <span class="pl-kos">(</span><span class="pl-c1">4480</span>caf2a <span class="pl-c1">2014</span>-<span class="pl-c1">10</span>-<span class="pl-c1">18</span> <span class="pl-c1">06</span><span class="pl-kos">:</span><span class="pl-c1">22</span><span class="pl-kos">:</span><span class="pl-c1">15</span> +<span class="pl-c1">0000</span><span class="pl-kos">)</span> % rustc /tmp/f<span class="pl-kos">.</span><span class="pl-c1">rs</span> % <span class="pl-kos">.</span>/f t<span class="pl-kos">:</span> b v<span class="pl-kos">:</span> <span class="pl-kos">[</span>x<span class="pl-kos">,</span> y<span class="pl-kos">,</span> z<span class="pl-kos">]</span> % </pre></div>
<p dir="auto">Feature gates are generally checked before expansion so feature gates are defeated by code inside macros.</p>
1
<p dir="auto">Previewing the 'latest.md' in the latest VS Code looks like this:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1898161/13320699/191a55e8-dbcb-11e5-83d4-e500a8730cd0.png"><img src="https://cloud.githubusercontent.com/assets/1898161/13320699/191a55e8-dbcb-11e5-83d4-e500a8730cd0.png" alt="2016-02-25 14-20-04" style="max-width: 100%;"></a></p> <p dir="auto">and here the same file in VS Code 0.10.9:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1898161/13320724/335e1c64-dbcb-11e5-8be2-b7f9c8d47a98.png"><img src="https://cloud.githubusercontent.com/assets/1898161/13320724/335e1c64-dbcb-11e5-8be2-b7f9c8d47a98.png" alt="2016-02-25 14-19-27" style="max-width: 100%;"></a></p>
<ul dir="auto"> <li>Open a markdown file</li> <li>Click on preview <blockquote> <p dir="auto">It renders markdown in the dark theme</p> </blockquote> </li> </ul> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5047891/13350751/39348e90-dc82-11e5-8504-d2952513d4a3.png"><img src="https://cloud.githubusercontent.com/assets/5047891/13350751/39348e90-dc82-11e5-8504-d2952513d4a3.png" alt="image" style="max-width: 100%;"></a></p>
1
<p dir="auto">Followup from a tweet from Unpkg (unpkg?) about ES6 module support:<br> <a href="https://twitter.com/unpkg/status/905239560988221440" rel="nofollow">https://twitter.com/unpkg/status/905239560988221440</a></p> <blockquote> <p dir="auto">For fun, try using <code class="notranslate">import * as d3 from '//unpkg.com/d3?module</code> inside a &lt;script type=module&gt; and watch those modules load!</p> </blockquote> <p dir="auto">It would be neat if you could just <code class="notranslate">import { Component } from 'https://unpkg.com/react?module'</code> in browsers like Safari (and soon Chrome). As far as I understand the problem, we'd just need to export an ES6 build target from Rollup.</p> <p dir="auto">I use "just" lightly. Hopefully it's that simple; it's probably more complicated. In any case, now we have an issue for it!</p>
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br> Request a feature</p> <p dir="auto"><strong>What is the current behavior?</strong><br> React ecosystem was promoting ES6 classes and modules since 2014 and many packages like react-router, redux and so on, have an "es" folder in the npm package with source code in ES2015 modules. Unless I am missing something, it is strange that React itself does not offer that option.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via <a href="https://jsfiddle.net" rel="nofollow">https://jsfiddle.net</a> or similar (template: <a href="https://jsfiddle.net/84v837e9/" rel="nofollow">https://jsfiddle.net/84v837e9/</a>).</strong><br> Install react and try to import it in a browser with native modules enabled.</p> <p dir="auto"><strong>What is the expected behavior?</strong><br> Have an "es" folder in the npm package with ES2015 modules source code, like most React ecosystem projects do. Allow to import react from ES2015 native modules to make developer workflow more simple.</p> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong><br> All versions</p>
1
<p dir="auto"><strong>Symfony version(s) affected</strong>: 3.4.15</p> <p dir="auto"><strong>Description</strong><br> When following the symfony-cmf installation guide with SF 3.4.15 I get the following error:</p> <p dir="auto"><code class="notranslate">Cannot dump definitions which have method calls.</code></p> <p dir="auto">This is not the case with 3.4.14, so downgrading solves.</p> <p dir="auto"><strong>How to reproduce</strong><br> I created a test project for this.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone [email protected]:wuestkamp/my_project_name.git cd my_project_name composer install"><pre class="notranslate"><code class="notranslate">git clone [email protected]:wuestkamp/my_project_name.git cd my_project_name composer install </code></pre></div> <p dir="auto">This will show the error.</p> <p dir="auto"><strong>Additional context</strong><br> Here is the verbose output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In PhpDumper.php line 1761: [Symfony\Component\DependencyInjection\Exception\RuntimeException] Cannot dump definitions which have method calls. Exception trace: Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;dumpValue() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:642 Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;addServiceMethodCalls() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:521 Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;addServiceInlinedDefinitions() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:834 Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;addService() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:889 Symfony\Component\DependencyInjection\Dumper\PhpDumper::generateServiceFiles() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:218 Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;dump() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:859 Symfony\Component\HttpKernel\Kernel-&gt;dumpContainer() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:663 Symfony\Component\HttpKernel\Kernel-&gt;initializeContainer() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:135 Symfony\Component\HttpKernel\Kernel-&gt;boot() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:64 Symfony\Bundle\FrameworkBundle\Console\Application-&gt;doRun() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:148 Symfony\Component\Console\Application-&gt;run() at /Users/kim/tmp/my_project_name/bin/console:27"><pre class="notranslate"><code class="notranslate">In PhpDumper.php line 1761: [Symfony\Component\DependencyInjection\Exception\RuntimeException] Cannot dump definitions which have method calls. Exception trace: Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;dumpValue() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:642 Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;addServiceMethodCalls() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:521 Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;addServiceInlinedDefinitions() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:834 Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;addService() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:889 Symfony\Component\DependencyInjection\Dumper\PhpDumper::generateServiceFiles() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php:218 Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;dump() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:859 Symfony\Component\HttpKernel\Kernel-&gt;dumpContainer() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:663 Symfony\Component\HttpKernel\Kernel-&gt;initializeContainer() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:135 Symfony\Component\HttpKernel\Kernel-&gt;boot() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:64 Symfony\Bundle\FrameworkBundle\Console\Application-&gt;doRun() at /Users/kim/tmp/my_project_name/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:148 Symfony\Component\Console\Application-&gt;run() at /Users/kim/tmp/my_project_name/bin/console:27 </code></pre></div> <p dir="auto">When I debug, then in PhpDumper::dumpValue the $value is of class <code class="notranslate">Symfony\Component\DependencyInjection\Definition</code></p>
<p dir="auto"><strong>Symfony version(s) affected</strong>: 4.1.4</p> <p dir="auto"><strong>Description</strong></p> <p dir="auto">After upgrading to v4.1.4 the following error shown when container tries to build.</p> <p dir="auto">RuntimeException Cannot dump definitions which have method calls.</p> <details> <summary>Tace</summary> RuntimeException Cannot dump definitions which have method calls. [Symfony\Component\DependencyInjection\Exception\RuntimeException] Cannot dump definitions which have method calls. <p dir="auto">Exception trace:<br> Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;dumpValue() at /var/www/html/vendor/symfony/dependency-injection/Dumper/PhpDumper.php:614<br> Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;addServiceMethodCalls() at /var/www/html/vendor/symfony/dependency-injection/Dumper/PhpDumper.php:516<br> Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;addServiceInlinedDefinitions() at /var/www/html/vendor/symfony/dependency-injection/Dumper/PhpDumper.php:792<br> Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;addService() at /var/www/html/vendor/symfony/dependency-injection/Dumper/PhpDumper.php:827<br> Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;addServices() at /var/www/html/vendor/symfony/dependency-injection/Dumper/PhpDumper.php:194<br> Symfony\Component\DependencyInjection\Dumper\PhpDumper-&gt;dump() at /var/www/html/vendor/symfony/http-kernel/Kernel.php:704<br> Symfony\Component\HttpKernel\Kernel-&gt;dumpContainer() at /var/www/html/vendor/symfony/http-kernel/Kernel.php:541<br> Symfony\Component\HttpKernel\Kernel-&gt;initializeContainer() at /var/www/html/vendor/symfony/http-kernel/Kernel.php:123<br> Symfony\Component\HttpKernel\Kernel-&gt;boot() at /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:65<br> Symfony\Bundle\FrameworkBundle\Console\Application-&gt;doRun() at /var/www/html/vendor/symfony/console/Application.php:145<br> Symfony\Component\Console\Application-&gt;run() at /var/www/html/bin/console:39</p> </details> <p dir="auto">possibly BC break<br> possibly caused by: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="344454837" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/28060" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/28060/hovercard" href="https://github.com/symfony/symfony/pull/28060">#28060</a><br> (or maybe i missed something and used it wrong)</p> <p dir="auto"><strong>How to reproduce</strong><br> I have a monolog handler that requires EntityManagerInterface and a doctrine EventSubscriber that needs the monolog logger with the handler. It works fine when I downgrade to symfony/dependency-injection to v4.1.3</p> <p dir="auto">Files that requre to reproduce:</p> <details> <summary>src/Monolog/DoctrineDBHandler.php</summary> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" namespace App\Monolog; use Doctrine\ORM\EntityManagerInterface; use Monolog\Handler\AbstractProcessingHandler; class DoctrineDBHandler extends AbstractProcessingHandler { private $entityManager; public function __construct(EntityManagerInterface $em) { parent::__construct(); $this-&gt;entityManager = $em; } protected function write(array $record): void { // write log to db } }"><pre class="notranslate"><span class="pl-k">namespace</span> <span class="pl-v">App</span>\<span class="pl-v">Monolog</span>; <span class="pl-k">use</span> <span class="pl-v">Doctrine</span>\<span class="pl-c1">ORM</span>\<span class="pl-v">EntityManagerInterface</span>; <span class="pl-k">use</span> <span class="pl-v">Monolog</span>\<span class="pl-v">Handler</span>\<span class="pl-v">AbstractProcessingHandler</span>; <span class="pl-k">class</span> <span class="pl-v">DoctrineDBHandler</span> <span class="pl-k">extends</span> <span class="pl-v">AbstractProcessingHandler</span> { <span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>entityManager</span>; <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">__construct</span>(<span class="pl-smi"><span class="pl-smi">EntityManagerInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>em</span>) { <span class="pl-smi">parent</span>::<span class="pl-en">__construct</span>(); <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">entityManager</span> = <span class="pl-s1"><span class="pl-c1">$</span>em</span>; } <span class="pl-k">protected</span> <span class="pl-k">function</span> <span class="pl-en">write</span>(<span class="pl-smi">array</span> <span class="pl-s1"><span class="pl-c1">$</span>record</span>): <span class="pl-smi">void</span> { <span class="pl-c">// write log to db</span> } }</pre></div> </details> <details> <summary>src/EventSubscriber/DoctrineLogSubscriber.php</summary> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" namespace App\EventSubscriber; use Doctrine\Common\EventSubscriber; use Doctrine\ORM\Event\LifecycleEventArgs; use Monolog\Logger; class DoctrineLogSubscriber implements EventSubscriber { private $logger; public function __construct(Logger $logger) { $this-&gt;logger = $logger; } public function getSubscribedEvents(): array { return ['postPersist']; } public function postPersist(LifecycleEventArgs $args): void { $this-&gt;logger-&gt;addInfo('create'); } }"><pre class="notranslate"><span class="pl-k">namespace</span> <span class="pl-v">App</span>\<span class="pl-v">EventSubscriber</span>; <span class="pl-k">use</span> <span class="pl-v">Doctrine</span>\<span class="pl-v">Common</span>\<span class="pl-v">EventSubscriber</span>; <span class="pl-k">use</span> <span class="pl-v">Doctrine</span>\<span class="pl-c1">ORM</span>\<span class="pl-v">Event</span>\<span class="pl-v">LifecycleEventArgs</span>; <span class="pl-k">use</span> <span class="pl-v">Monolog</span>\<span class="pl-v">Logger</span>; <span class="pl-k">class</span> <span class="pl-v">DoctrineLogSubscriber</span> <span class="pl-k">implements</span> <span class="pl-v">EventSubscriber</span> { <span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>logger</span>; <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">__construct</span>(<span class="pl-smi"><span class="pl-smi">Logger</span></span> <span class="pl-s1"><span class="pl-c1">$</span>logger</span>) { <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">logger</span> = <span class="pl-s1"><span class="pl-c1">$</span>logger</span>; } <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">getSubscribedEvents</span>(): <span class="pl-smi">array</span> { <span class="pl-k">return</span> [<span class="pl-s">'postPersist'</span>]; } <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">postPersist</span>(<span class="pl-smi"><span class="pl-smi">LifecycleEventArgs</span></span> <span class="pl-s1"><span class="pl-c1">$</span>args</span>): <span class="pl-smi">void</span> { <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">logger</span>-&gt;<span class="pl-en">addInfo</span>(<span class="pl-s">'create'</span>); } }</pre></div> </details> <details> <summary>config/services.yaml</summary> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" parameters: locale: 'en' services: _defaults: autowire: true autoconfigure: true public: false App\: resource: '../src/*' exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' App\DoctrineLogSubscriber: arguments: ['@monolog.logger.demo'] tags: - { name: doctrine.event_subscriber } "><pre class="notranslate"><span class="pl-ent">parameters</span>: <span class="pl-ent">locale</span>: <span class="pl-s"><span class="pl-pds">'</span>en<span class="pl-pds">'</span></span> <span class="pl-ent">services</span>: <span class="pl-ent">_defaults</span>: <span class="pl-ent">autowire</span>: <span class="pl-c1">true</span> <span class="pl-ent">autoconfigure</span>: <span class="pl-c1">true</span> <span class="pl-ent">public</span>: <span class="pl-c1">false</span> <span class="pl-ent">App\</span>: <span class="pl-ent">resource</span>: <span class="pl-s"><span class="pl-pds">'</span>../src/*<span class="pl-pds">'</span></span> <span class="pl-ent">exclude</span>: <span class="pl-s"><span class="pl-pds">'</span>../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}<span class="pl-pds">'</span></span> <span class="pl-ent">App\DoctrineLogSubscriber</span>: <span class="pl-ent">arguments</span>: <span class="pl-s">['@monolog.logger.demo']</span> <span class="pl-ent">tags</span>: - <span class="pl-s">{ name: doctrine.event_subscriber }</span> </pre></div> </details> <details> <summary>config/packages/dev/monolog.yaml</summary> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" ... monolog: channels: ['demo'] handlers: main: type: stream path: &quot;%kernel.logs_dir%/%kernel.environment%.log&quot; level: debug channels: [&quot;!event&quot;] console: type: console process_psr_3_messages: false channels: [&quot;!event&quot;, &quot;!doctrine&quot;, &quot;!console&quot;] demo: channels: ['demo'] level: INFO type: service id: App\Monolog\DoctrineDBHandler "><pre class="notranslate">... <span class="pl-ent">monolog</span>: <span class="pl-ent">channels</span>: <span class="pl-s">['demo']</span> <span class="pl-ent">handlers</span>: <span class="pl-ent">main</span>: <span class="pl-ent">type</span>: <span class="pl-s">stream</span> <span class="pl-ent">path</span>: <span class="pl-s"><span class="pl-pds">"</span>%kernel.logs_dir%/%kernel.environment%.log<span class="pl-pds">"</span></span> <span class="pl-ent">level</span>: <span class="pl-s">debug</span> <span class="pl-ent">channels</span>: <span class="pl-s">["!event"]</span> <span class="pl-ent">console</span>: <span class="pl-ent">type</span>: <span class="pl-s">console</span> <span class="pl-ent">process_psr_3_messages</span>: <span class="pl-c1">false</span> <span class="pl-ent">channels</span>: <span class="pl-s">["!event", "!doctrine", "!console"]</span> <span class="pl-ent">demo</span>: <span class="pl-ent">channels</span>: <span class="pl-s">['demo']</span> <span class="pl-ent">level</span>: <span class="pl-s">INFO</span> <span class="pl-ent">type</span>: <span class="pl-s">service</span> <span class="pl-ent">id</span>: <span class="pl-s">App\Monolog\DoctrineDBHandler</span> </pre></div> </details>
1
<p dir="auto">As I mentioned on <a href="https://discourse.julialang.org/t/issetequal-behavior-with-duplicate-elements/26238" rel="nofollow">Discourse</a>, the <code class="notranslate">issetequal</code> docstring says that <code class="notranslate">issetequal(a, b)</code> is equivalent to <code class="notranslate">a ⊆ b &amp;&amp; b ⊆ a</code>, but this isn't the case when there are duplicate elements:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; versioninfo() Julia Version 1.0.0 Commit 5d4eaca0c9 (2018-08-08 20:58 UTC) Platform Info: OS: macOS (x86_64-apple-darwin14.5.0) CPU: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.0 (ORCJIT, broadwell) julia&gt; a = [1,2,3]; julia&gt; b = [1,1,2,3]; julia&gt; a ⊆ b &amp;&amp; b ⊆ a true julia&gt; issetequal(a, b) false"><pre class="notranslate"><code class="notranslate">julia&gt; versioninfo() Julia Version 1.0.0 Commit 5d4eaca0c9 (2018-08-08 20:58 UTC) Platform Info: OS: macOS (x86_64-apple-darwin14.5.0) CPU: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.0 (ORCJIT, broadwell) julia&gt; a = [1,2,3]; julia&gt; b = [1,1,2,3]; julia&gt; a ⊆ b &amp;&amp; b ⊆ a true julia&gt; issetequal(a, b) false </code></pre></div> <p dir="auto">This is because the <a href="https://github.com/JuliaLang/julia/blob/master/base/abstractset.jl#L291">implementation</a> assumes no duplicate elements:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="issetequal(l, r) = length(l) == length(r) &amp;&amp; l ⊆ r"><pre class="notranslate"><code class="notranslate">issetequal(l, r) = length(l) == length(r) &amp;&amp; l ⊆ r </code></pre></div>
<p dir="auto">Due to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="53167972" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/9513" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/9513/hovercard" href="https://github.com/JuliaLang/julia/issues/9513">#9513</a>, we've decided to push the 0.3.5 release up two weeks, shooting for this weekend for a new release. Let's discuss here what we want to try and include in this release. Although it is motivated by a single issue, I see no reason to avoid other fixes that have already been merged into <code class="notranslate">release-0.3</code>/are close to being merged. In short, this should be a fully-fledged release, not a targeted bugfix.</p>
0
<p dir="auto">Using Version 0.201.0 (0.201.0) on OS X Yosemite.</p> <p dir="auto">Given this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/c5f0499d290e743543fcb3cd4dc8c3de2a34af6aeda85e5a153c1081938f112e/687474703a2f2f7331382e706f7374696d672e6f72672f646c72716e303176642f696e7075742e706e67"><img src="https://camo.githubusercontent.com/c5f0499d290e743543fcb3cd4dc8c3de2a34af6aeda85e5a153c1081938f112e/687474703a2f2f7331382e706f7374696d672e6f72672f646c72716e303176642f696e7075742e706e67" alt="foo bar and baz on separate lines" data-canonical-src="http://s18.postimg.org/dlrqn01vd/input.png" style="max-width: 100%;"></a></p> <p dir="auto">When I click 'Replace All' I get this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/35bf060e12bfe640163166c994d3bcf255f297fb89cc726e6ed51798c24ef924/687474703a2f2f7332332e706f7374696d672e6f72672f67737479646e76367a2f61637475616c2e706e67"><img src="https://camo.githubusercontent.com/35bf060e12bfe640163166c994d3bcf255f297fb89cc726e6ed51798c24ef924/687474703a2f2f7332332e706f7374696d672e6f72672f67737479646e76367a2f61637475616c2e706e67" alt="the first line looking correct" data-canonical-src="http://s23.postimg.org/gstydnv6z/actual.png" style="max-width: 100%;"></a></p> <p dir="auto">But I expected this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/1a47a2817f27aa4cf2d5c7d4f862576e07502706c0cf1054d9b3f20618ddb2bc/687474703a2f2f7332322e706f7374696d672e6f72672f7770767765376476352f65787065637465642e706e67"><img src="https://camo.githubusercontent.com/1a47a2817f27aa4cf2d5c7d4f862576e07502706c0cf1054d9b3f20618ddb2bc/687474703a2f2f7332322e706f7374696d672e6f72672f7770767765376476352f65787065637465642e706e67" alt="all lines looking correct" data-canonical-src="http://s22.postimg.org/wpvwe7dv5/expected.png" style="max-width: 100%;"></a></p> <p dir="auto">Not sure if this is a bug or by design. Either way I thought I should raise it.</p> <p dir="auto">Cheers,<br> Matt.</p>
<p dir="auto">In Sublime Text and Text Wrangler it is possible to do regex find and replace such as this</p> <p dir="auto">Find : ^\d{2}$\n<br> Replace: </p> <p dir="auto">to find lines that are two digits only and delete them. In Atom, it can match the lines but cannot do the replace. When clicking on 'Replace All' the text remains unchanged.</p> <p dir="auto">Version 0.75.0, Platform:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/129028/2705472/9dd6310a-c47e-11e3-98a0-686f6b15baf6.png"><img src="https://cloud.githubusercontent.com/assets/129028/2705472/9dd6310a-c47e-11e3-98a0-686f6b15baf6.png" alt="atomregex copy" style="max-width: 100%;"></a><br> Mac OS X Mavericks</p>
1
<p dir="auto">There should be a mode of Deno that is maximum sandbox -<br> -No file system access at all (including modules, etc) except for the initial deno command. Put the onus on the developer to package all js/ts in a single file.<br> -No network at all, except for the ability to respond to http requests from localhost on a single port. no call-out of any kind.<br> -No console access at all.<br> -Any error should just successfully exit the process, no error reporting into the OS?<br> -No command execution at all (except for the initial Deno)<br> -No nothing of anything else. Just CPU, Memory, the ability to read a single file on startup, and the ability to respond to a single http response to another process on localhost.<br> -Would be nice to limit the request/response size of the http request</p> <p dir="auto">The OS/public facing process will handle<br> -if the process runs too long<br> -if Deno attempts to use too much ram or cpu time or use multiple cores</p>
<p dir="auto">This consists of</p> <ol dir="auto"> <li>Setting the random number generator seed. We have this already.</li> <li>Disabling all I/O - so turn off allow-read, allow-write, allow-net, allow-run, allow-plugin - etc.</li> <li>Controlling the Date object</li> <li>need a custom v8::Platform which will allow us to control the date precisely. Then we can add some APIs to allow people to change it. (Probably from the command line would be ideal?)<br> <a href="https://github.com/v8/v8/blob/cc1b741ef34b56d1b29cb24cb391ef38a1172ce8/include/v8-platform.h#L532-L545">https://github.com/v8/v8/blob/cc1b741ef34b56d1b29cb24cb391ef38a1172ce8/include/v8-platform.h#L532-L545</a> So the fix is really in rusty_v8 - we need to expose those primatives</li> </ol>
1
<p dir="auto">Hi,</p> <p dir="auto">I have created HiddenEntityType (<a href="https://gist.github.com/kl3ryk/5781916">https://gist.github.com/kl3ryk/5781916</a>), to transform value of hidden field into Entity. I was using FormBuilderInterface::getParent() to get Entity class. But in Symfony 2.3 function FormBuilderInterface::getParent was removed. So is there any way to retreive parent form data_class name (<a href="https://gist.github.com/kl3ryk/5781916#file-hiddenentitytype-php-L36">https://gist.github.com/kl3ryk/5781916#file-hiddenentitytype-php-L36</a>)?</p>
<p dir="auto">Hi,</p> <p dir="auto">I thought about a new type of field type which can solve several problems i met on the user group.</p> <p dir="auto">The idea is to create an "hidden_entity" type which is just an hidden id in the form, and an entity fetched in the database by the DataTransformer. Here are two example of use:</p> <h1 dir="auto">The transport entity case</h1> <p dir="auto">Imagine you have a comment which should be attached to an article. In the page, you'll maybe have your form posting to a special URL like /addComment/{article_id}, and then fetch back the article from the URL.</p> <p dir="auto">With hidden_entity, this would be way simplied since you'd just have to put the following on your comment form:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$builder-&gt;add('article', 'hidden_entity');"><pre class="notranslate"><span class="pl-s1">$builder</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span><span class="pl-en">add</span><span class="pl-kos">(</span><span class="pl-s">'article'</span><span class="pl-kos">,</span> <span class="pl-s">'hidden_entity'</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">And populate if from the controller when rendering the form:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$comment-&gt;setArticle($current_viewing_article); $form = $this-&gt;createForm(new CommentType(), $comment);"><pre class="notranslate"><span class="pl-s1">$comment</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span><span class="pl-en">setArticle</span><span class="pl-kos">(</span><span class="pl-s1">$current_viewing_article</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">$form</span> <span class="pl-c1">=</span> <span class="pl-s1">$this</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span><span class="pl-en">createForm</span><span class="pl-kos">(</span><span class="pl-k">new</span> <span class="pl-v">CommentType</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">$comment</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <h1 dir="auto">The "JS-UI" case</h1> <p dir="auto">Just imagine you want your user to select something among a <em>very</em> large set of data, like a city, and use some complex JavaScript UI like autocompletion, dynamic map etc. The current symfony's entity will generate a containing the whole entries from the database, which is not acceptable in this case. Using hidden_entity, you can easily add an hidden id to your form and your free to do whatever you want to fill it. Hoping for feedbacks about this idea, I already wrote a prototype of this : https://github.com/Gregwar/FormBundle</p>
1
<p dir="auto">02:51:36 I0406 09:51:35.674250 2857 fs_resource_analyzer.go:66] Starting FS ResourceAnalyzer<br> 02:51:36 I0406 09:51:35.674261 2857 manager.go:123] Starting to sync pod status with apiserver<br> 02:51:36 I0406 09:51:35.674271 2857 kubelet.go:2361] Starting kubelet main sync loop.<br> 02:51:36 I0406 09:51:35.674281 2857 kubelet.go:2370] skipping pod synchronization - [container runtime is down]<br> 02:51:36 I0406 09:51:35.674456 2857 server.go:108] Starting to listen on 0.0.0.0:10250<br> 02:51:36 F0406 09:51:35.676767 2857 server.go:117] listen tcp 0.0.0.0:10250: bind: address already in use<br> 02:51:36 %!s(int=0) %!s(bytes.readOp=0)}<br> 02:51:36<br> 02:51:36 /var/lib/jenkins/workspace/kubelet-gce-e2e-ci/go/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:68<br> 02:51:36 ------------------------------<br> 02:51:36 I0406 09:51:35.681039 2769 e2e_node_suite_test.go:79] Stopping node services...<br> 02:51:36 E0406 09:51:35.681079 2769 e2e_service.go:89] Failed to stop be-apiserver.<br> 02:51:36 operation not permitted</p>
<p dir="auto">Link: <a href="https://storage.cloud.google.com/kubernetes-jenkins/pr-logs/pull/24701/node-pull-build-e2e-test/4637/build-log.txt" rel="nofollow">https://storage.cloud.google.com/kubernetes-jenkins/pr-logs/pull/24701/node-pull-build-e2e-test/4637/build-log.txt</a></p> <p dir="auto">The bytespam decodes to:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="W0506 02:20:11.087804 2761 server.go:449] Could not load kubeconfig file /var/lib/kubelet/kubeconfig: stat /var/lib/kubelet/kubeconfig: no such file or directory. Trying auth path instead. W0506 02:20:11.087949 2761 server.go:410] Could not load kubernetes auth path /var/lib/kubelet/kubernetes_auth: stat /var/lib/kubelet/kubernetes_auth: no such file or directory. Continuing with defaults. I0506 02:20:11.088449 2761 plugins.go:71] No cloud provider specified. I0506 02:20:11.088484 2761 server.go:316] Successfully initialized cloud provider: &quot;&quot; from the config file: &quot;&quot; I0506 02:20:11.088664 2761 manager.go:133] cAdvisor running in container: &quot;/&quot; W0506 02:20:11.093906 2761 W0506 02:20:11.087804 2761 server.go:449] Could not load kubeconfig file /var/lib/kubelet/kubeconfig: stat /var/lib/kubelet/kubeconfig: no such file or directory. Trying auth path instead. W0506 02:20:11.087949 2761 server.go:410] Could not load kubernetes auth path /var/lib/kubelet/kubernetes_auth: stat /var/lib/kubelet/kubernetes_auth: no such file or directory. Continuing with defaults. I0506 02:20:11.088449 2761 plugins.go:71] No cloud provider specified. I0506 02:20:11.088484 2761 server.go:316] Successfully initialized cloud provider: &quot;&quot; from the config file: &quot;&quot; I0506 02:20:11.088664 2761 manager.go:133] cAdvisor running in container: &quot;/&quot; W0506 02:20:11.093906 2761 manager.go:141] unable to connect to Rkt api service: rkt: cannot tcp Dial rkt api service: dial tcp 127.0.0.1:15441: getsockopt: connection refused I0506 02:20:11.094413 2761 fs.go:116] Filesystem partitions: map[/dev/disk/by-uuid/6be8ff15-205a-4019-99e0-92d9c347301b:{mountpoint:/var/lib/docker/aufs major:8 minor:1 fsType:ext4 blockSize:0}] I0506 02:20:11.097619 2761 machine.go:50] Couldn't collect info from any of the files in &quot;/etc/machine-id,/var/lib/dbus/machine-id&quot; I0506 02:20:11.097720 2761 manager.go:182] Machine: {NumCores:1 CpuFrequency:2499998 MemoryCapacity:3892248576 MachineID: SystemUUID:BF0F6769-4533-3DF9-2DBE-5AC6DF4969C2 BootID:93695221-9b2e-48f9-a160-637d6991d270 Filesystems:[{Device:/dev/disk/by-uuid/6be8ff15-205a-4019-99e0-92d9c347301b Capacity:10432602112 Type:vfs Inodes:655360}] DiskMap:map[8:0:{Name:sda Major:8 Minor:0 Size:10737418240 Scheduler:cfq}] NetworkDevices:[{Name:eth0 MacAddress:42:01:0a:f0:00:37 Speed:0 Mtu:1460}] Topology:[{Id:0 Memory:3892248576 Cores:[{Id:0 Threads:[0] Caches:[{Size:32768 Type:Data Level:1} {Size:32768 Type:Instruction Level:1} {Size:262144 Type:Unified Level:2}]}] Caches:[{Size:31457280 Type:Unified Level:3}]}] CloudProvider:GCE InstanceType:n1-standard-1 InstanceID:3068827927132389825} I0506 02:20:11.098632 2761 manager.go:188] Version: {KernelVersion:3.16.0-4-amd64 ContainerOsVersion:Debian GNU/Linux 7 (wheezy) DockerVersion:1.8.3 CadvisorVersion: CadvisorRevision:} I0506 02:20:11.099587 2761 server.go:348] Using root directory: /var/lib/kubelet I0506 02:20:11.099838 2761 server.go:678] Adding manifest file: /tmp/node-e2e-pod023749862 I0506 02:20:11.099884 2761 file.go:47] Watching path &quot;/tmp/node-e2e-pod023749862&quot; I0506 02:20:11.099912 2761 server.go:688] Watching apiserver I0506 02:20:11.101276 2761 cadvisor_linux.go:127] Failed to register cAdvisor on port 4194, retrying. Error: listen tcp :4194: bind: address already in use I0506 02:20:11.111720 2761 iptables.go:177] Could not connect to D-Bus system bus: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory W0506 02:20:11.113356 2761 kubelet.go:518] Hairpin mode set to &quot;promiscuous-bridge&quot; but configureCBR0 is false, falling back to &quot;hairpin-veth&quot; I0506 02:20:11.113385 2761 kubelet.go:381] Hairpin mode set to &quot;hairpin-veth&quot; I0506 02:20:11.116864 2761 manager.go:227] Setting dockerRoot to /var/lib/docker I0506 02:20:11.120464 2761 config.go:156] body of failing http response: &amp;{0xc8202a0b40 {0 0} false &lt;nil&gt; 0x666fe0 0x666f80} I0506 02:20:11.121233 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/aws-ebs&quot; I0506 02:20:11.121296 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/empty-dir&quot; I0506 02:20:11.121338 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/gce-pd&quot; I0506 02:20:11.121385 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/git-repo&quot; I0506 02:20:11.121417 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/host-path&quot; I0506 02:20:11.121471 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/nfs&quot; I0506 02:20:11.121495 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/secret&quot; I0506 02:20:11.121537 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/iscsi&quot; I0506 02:20:11.121572 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/glusterfs&quot; I0506 02:20:11.121618 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/persistent-claim&quot; I0506 02:20:11.121644 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/rbd&quot; I0506 02:20:11.121670 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/cinder&quot; I0506 02:20:11.121715 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/cephfs&quot; I0506 02:20:11.121747 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/downward-api&quot; I0506 02:20:11.121790 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/fc&quot; I0506 02:20:11.121819 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/flocker&quot; I0506 02:20:11.121920 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/azure-file&quot; I0506 02:20:11.121969 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/configmap&quot; I0506 02:20:11.122081 2761 server.go:650] Started kubelet v1.3.0-alpha.3.299+1badf7bcb52d0a-dirty E0506 02:20:11.127426 2761 server.go:365] Starting health server failed: listen tcp 127.0.0.1:10248: bind: address already in use E0506 02:20:11.131665 2761 kubelet.go:879] Image garbage collection failed: unable to find data for container / I0506 02:20:11.132416 2761 container_manager_linux.go:207] Updating kernel flag: kernel/panic_on_oops, expected value: 1, actual value: 0 I0506 02:20:11.132490 2761 fs_resource_analyzer.go:66] Starting FS ResourceAnalyzer I0506 02:20:11.132541 2761 manager.go:123] Starting to sync pod status with apiserver I0506 02:20:11.132581 2761 kubelet.go:2376] Starting kubelet main sync loop. I0506 02:20:11.132643 2761 kubelet.go:2385] skipping pod synchronization - [network state unknown container runtime is down] I0506 02:20:11.133084 2761 server.go:117] Starting to listen on 0.0.0.0:10250 F0506 02:20:11.136563 2761 server.go:126] listen tcp 0.0.0.0:10250: bind: address already in use :141] unable to connect to Rkt api service: rkt: cannot tcp Dial rkt api service: dial tcp 127.0.0.1:15441: getsockopt: connection refused I0506 02:20:11.094413 2761 fs.go:116] Filesystem partitions: map[/dev/disk/by-uuid/6be8ff15-205a-4019-99e0-92d9c347301b:{mountpoint:/var/lib/docker/aufs major:8 minor:1 fsType:ext4 blockSize:0}] I0506 02:20:11.097619 2761 machine.go:50] Couldn't collect info from any of the files in &quot;/etc/machine-id,/var/lib/dbus/machine-id&quot; I0506 02:20:11.097720 2761 manager.go:182] Machine: {NumCores:1 CpuFrequency:2499998 MemoryCapacity:3892248576 MachineID: SystemUUID:BF0F6769-4533-3DF9-2DBE-5AC6DF4969C2 BootID:93695221-9b2e-48f9-a160-637d6991d270 Filesystems:[{Device:/dev/disk/by-uuid/6be8ff15-205a-4019-99e0-92d9c347301b Capacity:10432602112 Type:vfs Inodes:655360}] DiskMap:map[8:0:{Name:sda Major:8 Minor:0 Size:10737418240 Scheduler:cfq}] NetworkDevices:[{Name:eth0 MacAddress:42:01:0a:f0:00:37 Speed:0 Mtu:1460}] Topology:[{Id:0 Memory:3892248576 Cores:[{Id:0 Threads:[0] Caches:[{Size:32768 Type:Data Level:1} {Size:32768 Type:Instruction Level:1} {Size:262144 Type:Unified Level:2}]}] Caches:[{Size:31457280 Type:Unified Level:3}]}] CloudProvider:GCE InstanceType:n1-standard-1 InstanceID:3068827927132389825} I0506 02:20:11.098632 2761 manager.go:188] Version: {KernelVersion:3.16.0-4-amd64 ContainerOsVersion:Debian GNU/Linux 7 (wheezy) DockerVersion:1.8.3 CadvisorVersion: CadvisorRevision:} I0506 02:20:11.099587 2761 server.go:348] Using root directory: /var/lib/kubelet I0506 02:20:11.099838 2761 server.go:678] Adding manifest file: /tmp/node-e2e-pod023749862 I0506 02:20:11.099884 2761 file.go:47] Watching path &quot;/tmp/node-e2e-pod023749862&quot; I0506 02:20:11.099912 2761 server.go:688] Watching apiserver I0506 02:20:11.101276 2761 cadvisor_linux.go:127] Failed to register cAdvisor on port 4194, retrying. Error: listen tcp :4194: bind: address already in use I0506 02:20:11.111720 2761 iptables.go:177] Could not connect to D-Bus system bus: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory W0506 02:20:11.113356 2761 kubelet.go:518] Hairpin mode set to &quot;promiscuous-bridge&quot; but configureCBR0 is false, falling back to &quot;hairpin-veth&quot; I0506 02:20:11.113385 2761 kubelet.go:381] Hairpin mode set to &quot;hairpin-veth&quot; I0506 02:20:11.116864 2761 manager.go:227] Setting dockerRoot to /var/lib/docker I0506 02:20:11.120464 2761 config.go:156] body of failing http response: &amp;{0xc8202a0b40 {0 0} false &lt;nil&gt; 0x666fe0 0x666f80} I0506 02:20:11.121233 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/aws-ebs&quot; I0506 02:20:11.121296 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/empty-dir&quot; I0506 02:20:11.121338 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/gce-pd&quot; I0506 02:20:11.121385 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/git-repo&quot; I0506 02:20:11.121417 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/host-path&quot; I0506 02:20:11.121471 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/nfs&quot; I0506 02:20:11.121495 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/secret&quot; I0506 02:20:11.121537 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/iscsi&quot; I0506 02:20:11.121572 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/glusterfs&quot; I0506 02:20:11.121618 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/persistent-claim&quot; I0506 02:20:11.121644 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/rbd&quot; I0506 02:20:11.121670 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/cinder&quot; I0506 02:20:11.121715 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/cephfs&quot; I0506 02:20:11.121747 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/downward-api&quot; I0506 02:20:11.121790 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/fc&quot; I0506 02:20:11.121819 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/flocker&quot; I0506 02:20:11.121920 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/azure-file&quot; I0506 02:20:11.121969 2761 plugins.go:291] Loaded volume plugin &quot;kubernetes.io/configmap&quot; I0506 02:20:11.122081 2761 server.go:650] Started kubelet v1.3.0-alpha.3.299+1badf7bcb52d0a-dirty E0506 02:20:11.127426 2761 server.go:365] Starting health server failed: listen tcp 127.0.0.1:10248: bind: address already in use E0506 02:20:11.131665 2761 kubelet.go:879] Image garbage collection failed: unable to find data for container / I0506 02:20:11.132416 2761 container_manager_linux.go:207] Updating kernel flag: kernel/panic_on_oops, expected value: 1, actual value: 0 I0506 02:20:11.132490 2761 fs_resource_analyzer.go:66] Starting FS ResourceAnalyzer I0506 02:20:11.132541 2761 manager.go:123] Starting to sync pod status with apiserver I0506 02:20:11.132581 2761 kubelet.go:2376] Starting kubelet main sync loop. I0506 02:20:11.132643 2761 kubelet.go:2385] skipping pod synchronization - [network state unknown container runtime is down] I0506 02:20:11.133084 2761 server.go:117] Starting to listen on 0.0.0.0:10250 F0506 02:20:11.136563 2761 server.go:126] listen tcp 0.0.0.0:10250: bind: address already in use"><pre class="notranslate"><code class="notranslate">W0506 02:20:11.087804 2761 server.go:449] Could not load kubeconfig file /var/lib/kubelet/kubeconfig: stat /var/lib/kubelet/kubeconfig: no such file or directory. Trying auth path instead. W0506 02:20:11.087949 2761 server.go:410] Could not load kubernetes auth path /var/lib/kubelet/kubernetes_auth: stat /var/lib/kubelet/kubernetes_auth: no such file or directory. Continuing with defaults. I0506 02:20:11.088449 2761 plugins.go:71] No cloud provider specified. I0506 02:20:11.088484 2761 server.go:316] Successfully initialized cloud provider: "" from the config file: "" I0506 02:20:11.088664 2761 manager.go:133] cAdvisor running in container: "/" W0506 02:20:11.093906 2761 W0506 02:20:11.087804 2761 server.go:449] Could not load kubeconfig file /var/lib/kubelet/kubeconfig: stat /var/lib/kubelet/kubeconfig: no such file or directory. Trying auth path instead. W0506 02:20:11.087949 2761 server.go:410] Could not load kubernetes auth path /var/lib/kubelet/kubernetes_auth: stat /var/lib/kubelet/kubernetes_auth: no such file or directory. Continuing with defaults. I0506 02:20:11.088449 2761 plugins.go:71] No cloud provider specified. I0506 02:20:11.088484 2761 server.go:316] Successfully initialized cloud provider: "" from the config file: "" I0506 02:20:11.088664 2761 manager.go:133] cAdvisor running in container: "/" W0506 02:20:11.093906 2761 manager.go:141] unable to connect to Rkt api service: rkt: cannot tcp Dial rkt api service: dial tcp 127.0.0.1:15441: getsockopt: connection refused I0506 02:20:11.094413 2761 fs.go:116] Filesystem partitions: map[/dev/disk/by-uuid/6be8ff15-205a-4019-99e0-92d9c347301b:{mountpoint:/var/lib/docker/aufs major:8 minor:1 fsType:ext4 blockSize:0}] I0506 02:20:11.097619 2761 machine.go:50] Couldn't collect info from any of the files in "/etc/machine-id,/var/lib/dbus/machine-id" I0506 02:20:11.097720 2761 manager.go:182] Machine: {NumCores:1 CpuFrequency:2499998 MemoryCapacity:3892248576 MachineID: SystemUUID:BF0F6769-4533-3DF9-2DBE-5AC6DF4969C2 BootID:93695221-9b2e-48f9-a160-637d6991d270 Filesystems:[{Device:/dev/disk/by-uuid/6be8ff15-205a-4019-99e0-92d9c347301b Capacity:10432602112 Type:vfs Inodes:655360}] DiskMap:map[8:0:{Name:sda Major:8 Minor:0 Size:10737418240 Scheduler:cfq}] NetworkDevices:[{Name:eth0 MacAddress:42:01:0a:f0:00:37 Speed:0 Mtu:1460}] Topology:[{Id:0 Memory:3892248576 Cores:[{Id:0 Threads:[0] Caches:[{Size:32768 Type:Data Level:1} {Size:32768 Type:Instruction Level:1} {Size:262144 Type:Unified Level:2}]}] Caches:[{Size:31457280 Type:Unified Level:3}]}] CloudProvider:GCE InstanceType:n1-standard-1 InstanceID:3068827927132389825} I0506 02:20:11.098632 2761 manager.go:188] Version: {KernelVersion:3.16.0-4-amd64 ContainerOsVersion:Debian GNU/Linux 7 (wheezy) DockerVersion:1.8.3 CadvisorVersion: CadvisorRevision:} I0506 02:20:11.099587 2761 server.go:348] Using root directory: /var/lib/kubelet I0506 02:20:11.099838 2761 server.go:678] Adding manifest file: /tmp/node-e2e-pod023749862 I0506 02:20:11.099884 2761 file.go:47] Watching path "/tmp/node-e2e-pod023749862" I0506 02:20:11.099912 2761 server.go:688] Watching apiserver I0506 02:20:11.101276 2761 cadvisor_linux.go:127] Failed to register cAdvisor on port 4194, retrying. Error: listen tcp :4194: bind: address already in use I0506 02:20:11.111720 2761 iptables.go:177] Could not connect to D-Bus system bus: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory W0506 02:20:11.113356 2761 kubelet.go:518] Hairpin mode set to "promiscuous-bridge" but configureCBR0 is false, falling back to "hairpin-veth" I0506 02:20:11.113385 2761 kubelet.go:381] Hairpin mode set to "hairpin-veth" I0506 02:20:11.116864 2761 manager.go:227] Setting dockerRoot to /var/lib/docker I0506 02:20:11.120464 2761 config.go:156] body of failing http response: &amp;{0xc8202a0b40 {0 0} false &lt;nil&gt; 0x666fe0 0x666f80} I0506 02:20:11.121233 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/aws-ebs" I0506 02:20:11.121296 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/empty-dir" I0506 02:20:11.121338 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/gce-pd" I0506 02:20:11.121385 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/git-repo" I0506 02:20:11.121417 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/host-path" I0506 02:20:11.121471 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/nfs" I0506 02:20:11.121495 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/secret" I0506 02:20:11.121537 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/iscsi" I0506 02:20:11.121572 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/glusterfs" I0506 02:20:11.121618 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/persistent-claim" I0506 02:20:11.121644 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/rbd" I0506 02:20:11.121670 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/cinder" I0506 02:20:11.121715 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/cephfs" I0506 02:20:11.121747 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/downward-api" I0506 02:20:11.121790 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/fc" I0506 02:20:11.121819 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/flocker" I0506 02:20:11.121920 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/azure-file" I0506 02:20:11.121969 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/configmap" I0506 02:20:11.122081 2761 server.go:650] Started kubelet v1.3.0-alpha.3.299+1badf7bcb52d0a-dirty E0506 02:20:11.127426 2761 server.go:365] Starting health server failed: listen tcp 127.0.0.1:10248: bind: address already in use E0506 02:20:11.131665 2761 kubelet.go:879] Image garbage collection failed: unable to find data for container / I0506 02:20:11.132416 2761 container_manager_linux.go:207] Updating kernel flag: kernel/panic_on_oops, expected value: 1, actual value: 0 I0506 02:20:11.132490 2761 fs_resource_analyzer.go:66] Starting FS ResourceAnalyzer I0506 02:20:11.132541 2761 manager.go:123] Starting to sync pod status with apiserver I0506 02:20:11.132581 2761 kubelet.go:2376] Starting kubelet main sync loop. I0506 02:20:11.132643 2761 kubelet.go:2385] skipping pod synchronization - [network state unknown container runtime is down] I0506 02:20:11.133084 2761 server.go:117] Starting to listen on 0.0.0.0:10250 F0506 02:20:11.136563 2761 server.go:126] listen tcp 0.0.0.0:10250: bind: address already in use :141] unable to connect to Rkt api service: rkt: cannot tcp Dial rkt api service: dial tcp 127.0.0.1:15441: getsockopt: connection refused I0506 02:20:11.094413 2761 fs.go:116] Filesystem partitions: map[/dev/disk/by-uuid/6be8ff15-205a-4019-99e0-92d9c347301b:{mountpoint:/var/lib/docker/aufs major:8 minor:1 fsType:ext4 blockSize:0}] I0506 02:20:11.097619 2761 machine.go:50] Couldn't collect info from any of the files in "/etc/machine-id,/var/lib/dbus/machine-id" I0506 02:20:11.097720 2761 manager.go:182] Machine: {NumCores:1 CpuFrequency:2499998 MemoryCapacity:3892248576 MachineID: SystemUUID:BF0F6769-4533-3DF9-2DBE-5AC6DF4969C2 BootID:93695221-9b2e-48f9-a160-637d6991d270 Filesystems:[{Device:/dev/disk/by-uuid/6be8ff15-205a-4019-99e0-92d9c347301b Capacity:10432602112 Type:vfs Inodes:655360}] DiskMap:map[8:0:{Name:sda Major:8 Minor:0 Size:10737418240 Scheduler:cfq}] NetworkDevices:[{Name:eth0 MacAddress:42:01:0a:f0:00:37 Speed:0 Mtu:1460}] Topology:[{Id:0 Memory:3892248576 Cores:[{Id:0 Threads:[0] Caches:[{Size:32768 Type:Data Level:1} {Size:32768 Type:Instruction Level:1} {Size:262144 Type:Unified Level:2}]}] Caches:[{Size:31457280 Type:Unified Level:3}]}] CloudProvider:GCE InstanceType:n1-standard-1 InstanceID:3068827927132389825} I0506 02:20:11.098632 2761 manager.go:188] Version: {KernelVersion:3.16.0-4-amd64 ContainerOsVersion:Debian GNU/Linux 7 (wheezy) DockerVersion:1.8.3 CadvisorVersion: CadvisorRevision:} I0506 02:20:11.099587 2761 server.go:348] Using root directory: /var/lib/kubelet I0506 02:20:11.099838 2761 server.go:678] Adding manifest file: /tmp/node-e2e-pod023749862 I0506 02:20:11.099884 2761 file.go:47] Watching path "/tmp/node-e2e-pod023749862" I0506 02:20:11.099912 2761 server.go:688] Watching apiserver I0506 02:20:11.101276 2761 cadvisor_linux.go:127] Failed to register cAdvisor on port 4194, retrying. Error: listen tcp :4194: bind: address already in use I0506 02:20:11.111720 2761 iptables.go:177] Could not connect to D-Bus system bus: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory W0506 02:20:11.113356 2761 kubelet.go:518] Hairpin mode set to "promiscuous-bridge" but configureCBR0 is false, falling back to "hairpin-veth" I0506 02:20:11.113385 2761 kubelet.go:381] Hairpin mode set to "hairpin-veth" I0506 02:20:11.116864 2761 manager.go:227] Setting dockerRoot to /var/lib/docker I0506 02:20:11.120464 2761 config.go:156] body of failing http response: &amp;{0xc8202a0b40 {0 0} false &lt;nil&gt; 0x666fe0 0x666f80} I0506 02:20:11.121233 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/aws-ebs" I0506 02:20:11.121296 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/empty-dir" I0506 02:20:11.121338 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/gce-pd" I0506 02:20:11.121385 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/git-repo" I0506 02:20:11.121417 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/host-path" I0506 02:20:11.121471 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/nfs" I0506 02:20:11.121495 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/secret" I0506 02:20:11.121537 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/iscsi" I0506 02:20:11.121572 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/glusterfs" I0506 02:20:11.121618 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/persistent-claim" I0506 02:20:11.121644 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/rbd" I0506 02:20:11.121670 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/cinder" I0506 02:20:11.121715 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/cephfs" I0506 02:20:11.121747 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/downward-api" I0506 02:20:11.121790 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/fc" I0506 02:20:11.121819 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/flocker" I0506 02:20:11.121920 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/azure-file" I0506 02:20:11.121969 2761 plugins.go:291] Loaded volume plugin "kubernetes.io/configmap" I0506 02:20:11.122081 2761 server.go:650] Started kubelet v1.3.0-alpha.3.299+1badf7bcb52d0a-dirty E0506 02:20:11.127426 2761 server.go:365] Starting health server failed: listen tcp 127.0.0.1:10248: bind: address already in use E0506 02:20:11.131665 2761 kubelet.go:879] Image garbage collection failed: unable to find data for container / I0506 02:20:11.132416 2761 container_manager_linux.go:207] Updating kernel flag: kernel/panic_on_oops, expected value: 1, actual value: 0 I0506 02:20:11.132490 2761 fs_resource_analyzer.go:66] Starting FS ResourceAnalyzer I0506 02:20:11.132541 2761 manager.go:123] Starting to sync pod status with apiserver I0506 02:20:11.132581 2761 kubelet.go:2376] Starting kubelet main sync loop. I0506 02:20:11.132643 2761 kubelet.go:2385] skipping pod synchronization - [network state unknown container runtime is down] I0506 02:20:11.133084 2761 server.go:117] Starting to listen on 0.0.0.0:10250 F0506 02:20:11.136563 2761 server.go:126] listen tcp 0.0.0.0:10250: bind: address already in use </code></pre></div> <p dir="auto">Looks like tests might have been stomping on each other with the various "address already in use" and kubeconfig issues.</p>
1
<h1 dir="auto">Colors</h1> <p dir="auto">While I was in the process of writing some colormap manipulation scripts, I went into the MPL code on 'colors' to find out how exactly it handles the conversion between the normalized RGBA tuples that MPL uses, and the actual 8-bit RGBA tuples that are used for colors in general.</p> <p dir="auto">Looking at the <a href="https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/colors.py">colors</a> module, I noticed that the conversion from normalized to 8-bit tuples is inconsistent in several places.</p> <p dir="auto">For example, when one requests some colors from a <code class="notranslate">Colormap</code> object in their 8-bit forms by using <code class="notranslate">bytes=True</code>, the normalized values are multiplied by <code class="notranslate">255</code> and then rounded down, as shown in </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/matplotlib/matplotlib/blob/8bddf0a885384b60864be278917ade792d92674e/lib/matplotlib/colors.py#L575-L583">matplotlib/lib/matplotlib/colors.py</a> </p> <p class="mb-0 color-fg-muted"> Lines 575 to 583 in <a data-pjax="true" class="commit-tease-sha" href="/matplotlib/matplotlib/commit/8bddf0a885384b60864be278917ade792d92674e">8bddf0a</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L575" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="575"></td> <td id="LC575" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-s1">bytes</span>: </td> </tr> <tr class="border-0"> <td id="L576" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="576"></td> <td id="LC576" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">lut</span> <span class="pl-c1">=</span> (<span class="pl-s1">self</span>.<span class="pl-s1">_lut</span> <span class="pl-c1">*</span> <span class="pl-c1">255</span>).<span class="pl-en">astype</span>(<span class="pl-s1">np</span>.<span class="pl-s1">uint8</span>) </td> </tr> <tr class="border-0"> <td id="L577" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="577"></td> <td id="LC577" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">else</span>: </td> </tr> <tr class="border-0"> <td id="L578" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="578"></td> <td id="LC578" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">lut</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_lut</span>.<span class="pl-en">copy</span>() <span class="pl-c"># Don't let alpha modify original _lut.</span> </td> </tr> <tr class="border-0"> <td id="L579" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="579"></td> <td id="LC579" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td> </tr> <tr class="border-0"> <td id="L580" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="580"></td> <td id="LC580" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-s1">alpha</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-c1">None</span>: </td> </tr> <tr class="border-0"> <td id="L581" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="581"></td> <td id="LC581" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">alpha</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">clip</span>(<span class="pl-s1">alpha</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>) </td> </tr> <tr class="border-0"> <td id="L582" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="582"></td> <td id="LC582" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-s1">bytes</span>: </td> </tr> <tr class="border-0"> <td id="L583" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="583"></td> <td id="LC583" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">alpha</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-s1">alpha</span> <span class="pl-c1">*</span> <span class="pl-c1">255</span>) </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">However, if I were to convert a normalized RGBA-tuple into an RGBA-hex (which should be the same as an 8-bit RGBA-tuple) using the <code class="notranslate">to_hex</code> function, then the normalized values are multiplied by <code class="notranslate">255</code> and rounded to nearest, as shown in<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/matplotlib/matplotlib/blob/8bddf0a885384b60864be278917ade792d92674e/lib/matplotlib/colors.py#L333-L343">matplotlib/lib/matplotlib/colors.py</a> </p> <p class="mb-0 color-fg-muted"> Lines 333 to 343 in <a data-pjax="true" class="commit-tease-sha" href="/matplotlib/matplotlib/commit/8bddf0a885384b60864be278917ade792d92674e">8bddf0a</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L333" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="333"></td> <td id="LC333" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">def</span> <span class="pl-en">to_hex</span>(<span class="pl-s1">c</span>, <span class="pl-s1">keep_alpha</span><span class="pl-c1">=</span><span class="pl-c1">False</span>): </td> </tr> <tr class="border-0"> <td id="L334" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="334"></td> <td id="LC334" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">"""</span> </td> </tr> <tr class="border-0"> <td id="L335" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="335"></td> <td id="LC335" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> Convert *c* to a hex color.</span> </td> </tr> <tr class="border-0"> <td id="L336" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="336"></td> <td id="LC336" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"></span> </td> </tr> <tr class="border-0"> <td id="L337" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="337"></td> <td id="LC337" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> Uses the ``#rrggbb`` format if *keep_alpha* is False (the default),</span> </td> </tr> <tr class="border-0"> <td id="L338" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="338"></td> <td id="LC338" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> ``#rrggbbaa`` otherwise.</span> </td> </tr> <tr class="border-0"> <td id="L339" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="339"></td> <td id="LC339" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> """</span> </td> </tr> <tr class="border-0"> <td id="L340" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="340"></td> <td id="LC340" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-en">to_rgba</span>(<span class="pl-s1">c</span>) </td> </tr> <tr class="border-0"> <td id="L341" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="341"></td> <td id="LC341" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">keep_alpha</span>: </td> </tr> <tr class="border-0"> <td id="L342" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="342"></td> <td id="LC342" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-s1">c</span>[:<span class="pl-c1">3</span>] </td> </tr> <tr class="border-0"> <td id="L343" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="343"></td> <td id="LC343" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-s">"#"</span> <span class="pl-c1">+</span> <span class="pl-s">""</span>.<span class="pl-en">join</span>(<span class="pl-en">format</span>(<span class="pl-en">int</span>(<span class="pl-en">round</span>(<span class="pl-s1">val</span> <span class="pl-c1">*</span> <span class="pl-c1">255</span>)), <span class="pl-s">"02x"</span>) <span class="pl-k">for</span> <span class="pl-s1">val</span> <span class="pl-c1">in</span> <span class="pl-s1">c</span>) </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">If I go over the several other modules that deal with this conversion, I see that rounding down is much more common than rounding to nearest, even though I would have expected the latter (picking the closest corresponding color makes much more sense than picking the closest darker color).<br> The latter would also ensure that doing <code class="notranslate">8-bit -&gt; normalized -&gt; 8-bit</code> always gives the same values back, regardless of potential floating point errors.<br> Is there a reason why there are two different conversions for the same thing, and why the (in my opinion) worse conversion is much more common?</p> <h1 dir="auto">Colormaps</h1> <p dir="auto">I also found a similar peculiarity for picking colors from a <code class="notranslate">Colormap</code> object, shown in </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/matplotlib/matplotlib/blob/8bddf0a885384b60864be278917ade792d92674e/lib/matplotlib/colors.py#L558-L568">matplotlib/lib/matplotlib/colors.py</a> </p> <p class="mb-0 color-fg-muted"> Lines 558 to 568 in <a data-pjax="true" class="commit-tease-sha" href="/matplotlib/matplotlib/commit/8bddf0a885384b60864be278917ade792d92674e">8bddf0a</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L558" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="558"></td> <td id="LC558" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-s1">xa</span>.<span class="pl-s1">dtype</span>.<span class="pl-s1">kind</span> <span class="pl-c1">==</span> <span class="pl-s">"f"</span>: </td> </tr> <tr class="border-0"> <td id="L559" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="559"></td> <td id="LC559" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">with</span> <span class="pl-s1">np</span>.<span class="pl-en">errstate</span>(<span class="pl-s1">invalid</span><span class="pl-c1">=</span><span class="pl-s">"ignore"</span>): </td> </tr> <tr class="border-0"> <td id="L560" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="560"></td> <td id="LC560" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">xa</span> <span class="pl-c1">*=</span> <span class="pl-s1">self</span>.<span class="pl-v">N</span> </td> </tr> <tr class="border-0"> <td id="L561" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="561"></td> <td id="LC561" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"># Negative values are out of range, but astype(int) would</span> </td> </tr> <tr class="border-0"> <td id="L562" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="562"></td> <td id="LC562" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"># truncate them towards zero.</span> </td> </tr> <tr class="border-0"> <td id="L563" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="563"></td> <td id="LC563" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">xa</span>[<span class="pl-s1">xa</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">0</span>] <span class="pl-c1">=</span> <span class="pl-c1">-</span><span class="pl-c1">1</span> </td> </tr> <tr class="border-0"> <td id="L564" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="564"></td> <td id="LC564" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"># xa == 1 (== N after multiplication) is not out of range.</span> </td> </tr> <tr class="border-0"> <td id="L565" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="565"></td> <td id="LC565" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">xa</span>[<span class="pl-s1">xa</span> <span class="pl-c1">==</span> <span class="pl-s1">self</span>.<span class="pl-v">N</span>] <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-v">N</span> <span class="pl-c1">-</span> <span class="pl-c1">1</span> </td> </tr> <tr class="border-0"> <td id="L566" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="566"></td> <td id="LC566" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"># Avoid converting large positive values to negative integers.</span> </td> </tr> <tr class="border-0"> <td id="L567" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="567"></td> <td id="LC567" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">np</span>.<span class="pl-en">clip</span>(<span class="pl-s1">xa</span>, <span class="pl-c1">-</span><span class="pl-c1">1</span>, <span class="pl-s1">self</span>.<span class="pl-v">N</span>, <span class="pl-s1">out</span><span class="pl-c1">=</span><span class="pl-s1">xa</span>) </td> </tr> <tr class="border-0"> <td id="L568" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="568"></td> <td id="LC568" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">xa</span> <span class="pl-c1">=</span> <span class="pl-s1">xa</span>.<span class="pl-en">astype</span>(<span class="pl-s1">int</span>) </td> </tr> </tbody></table> </div> </div> <br> I would have expected here that the nearest color in the colormap is selected when a fraction is given, i.e., <code class="notranslate">xa</code> is calculated as<p></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="xa = np.rint(xa*(self.N-1))"><pre class="notranslate"><span class="pl-s1">xa</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">rint</span>(<span class="pl-s1">xa</span><span class="pl-c1">*</span>(<span class="pl-s1">self</span>.<span class="pl-v">N</span><span class="pl-c1">-</span><span class="pl-c1">1</span>))</pre></div> <p dir="auto">instead of</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="xa *= self.N"><pre class="notranslate"><span class="pl-s1">xa</span> <span class="pl-c1">*=</span> <span class="pl-s1">self</span>.<span class="pl-v">N</span></pre></div>
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">imsave saves some pixels wrong to output image, or possibly it is always mapping certain values of the input array to the wrong output values. Colormap values appear correct, but actual data saved does not match colormap.</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="#!/usr/bin/env python3 &quot;&quot;&quot;Test imsave using gray colormap &quot;&quot;&quot; import numpy as np import matplotlib.pyplot as plt import matplotlib import PIL def print_arrays_cols(*args): for i in range(len(args[1])): row_vals = [] for (j, arg) in enumerate(args): print(&quot;%.3f&quot;%(arg[i]), end=&quot;&quot;) if j &lt; len(args)-1: print(&quot;\t\t&quot;, end=&quot;&quot;) row_vals.append(arg[i]) if all([x==row_vals[0] for x in row_vals]): print(&quot;&quot;) else: print(&quot; ****&quot;) def main(): plt.gray() test_array = np.vstack((np.arange(0,256), np.arange(0,256))) test_array_cm_gray = matplotlib.cm.gray(test_array) # scale max to 255 test_array_cm_gray = test_array_cm_gray * 255 # save test_array to png plt.imsave('testme.png', test_array, format='png') # save test_array to tiff plt.imsave('testme.tif', test_array, format='tiff') # imread from png test_png_load = plt.imread('testme.png') # scale max to 255 test_png_load = test_png_load * 255 # imread from tiff test_tiff_load = plt.imread('testme.tif') # pil open from png pil_png_image = PIL.Image.open('testme.png') test_png_pil_load = list(pil_png_image.getdata()) # just get first row, and R of RGBA test_png_pil_load = [x[0] for x in test_png_pil_load[0:256]] # pil open from tiff pil_tiff_image = PIL.Image.open('testme.tif') test_tiff_pil_load = list(pil_tiff_image.getdata()) # just get first row test_tiff_pil_load = test_png_pil_load[0:256] # print orig, colormap, and 2 methods of loading png image data print(&quot;test_array\tcm.gray()\tpng_pil_load\tpng_imread_load&quot;) print(&quot;----------\t---------\t------------\t---------------&quot;) print_arrays_cols( test_array[0,:].flatten(), test_array_cm_gray[0,:,0].flatten(), test_png_pil_load, test_png_load[0,:,0].flatten(), ) # print orig, colormap, and 2 methods of loading tiff image data print(&quot;&quot;) print(&quot;test_array\tcm.gray()\ttiff_pil_load\ttiff_imread_load&quot;) print(&quot;----------\t---------\t-------------\t----------------&quot;) print_arrays_cols( test_array[0,:].flatten(), test_array_cm_gray[0,:,0].flatten(), test_tiff_pil_load, test_tiff_load[0,:,0].flatten(), ) if __name__ == '__main__': main()"><pre class="notranslate"><span class="pl-c">#!/usr/bin/env python3</span> <span class="pl-s">"""Test imsave using gray colormap</span> <span class="pl-s">"""</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-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-v">PIL</span> <span class="pl-k">def</span> <span class="pl-en">print_arrays_cols</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>): <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-en">len</span>(<span class="pl-s1">args</span>[<span class="pl-c1">1</span>])): <span class="pl-s1">row_vals</span> <span class="pl-c1">=</span> [] <span class="pl-k">for</span> (<span class="pl-s1">j</span>, <span class="pl-s1">arg</span>) <span class="pl-c1">in</span> <span class="pl-en">enumerate</span>(<span class="pl-s1">args</span>): <span class="pl-en">print</span>(<span class="pl-s">"%.3f"</span><span class="pl-c1">%</span>(<span class="pl-s1">arg</span>[<span class="pl-s1">i</span>]), <span class="pl-s1">end</span><span class="pl-c1">=</span><span class="pl-s">""</span>) <span class="pl-k">if</span> <span class="pl-s1">j</span> <span class="pl-c1">&lt;</span> <span class="pl-en">len</span>(<span class="pl-s1">args</span>)<span class="pl-c1">-</span><span class="pl-c1">1</span>: <span class="pl-en">print</span>(<span class="pl-s">"<span class="pl-cce">\t</span><span class="pl-cce">\t</span>"</span>, <span class="pl-s1">end</span><span class="pl-c1">=</span><span class="pl-s">""</span>) <span class="pl-s1">row_vals</span>.<span class="pl-en">append</span>(<span class="pl-s1">arg</span>[<span class="pl-s1">i</span>]) <span class="pl-k">if</span> <span class="pl-en">all</span>([<span class="pl-s1">x</span><span class="pl-c1">==</span><span class="pl-s1">row_vals</span>[<span class="pl-c1">0</span>] <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-s1">row_vals</span>]): <span class="pl-en">print</span>(<span class="pl-s">""</span>) <span class="pl-k">else</span>: <span class="pl-en">print</span>(<span class="pl-s">" ****"</span>) <span class="pl-k">def</span> <span class="pl-en">main</span>(): <span class="pl-s1">plt</span>.<span class="pl-en">gray</span>() <span class="pl-s1">test_array</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">vstack</span>((<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>,<span class="pl-c1">256</span>), <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>,<span class="pl-c1">256</span>))) <span class="pl-s1">test_array_cm_gray</span> <span class="pl-c1">=</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">cm</span>.<span class="pl-en">gray</span>(<span class="pl-s1">test_array</span>) <span class="pl-c"># scale max to 255</span> <span class="pl-s1">test_array_cm_gray</span> <span class="pl-c1">=</span> <span class="pl-s1">test_array_cm_gray</span> <span class="pl-c1">*</span> <span class="pl-c1">255</span> <span class="pl-c"># save test_array to png</span> <span class="pl-s1">plt</span>.<span class="pl-en">imsave</span>(<span class="pl-s">'testme.png'</span>, <span class="pl-s1">test_array</span>, <span class="pl-s1">format</span><span class="pl-c1">=</span><span class="pl-s">'png'</span>) <span class="pl-c"># save test_array to tiff</span> <span class="pl-s1">plt</span>.<span class="pl-en">imsave</span>(<span class="pl-s">'testme.tif'</span>, <span class="pl-s1">test_array</span>, <span class="pl-s1">format</span><span class="pl-c1">=</span><span class="pl-s">'tiff'</span>) <span class="pl-c"># imread from png</span> <span class="pl-s1">test_png_load</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">imread</span>(<span class="pl-s">'testme.png'</span>) <span class="pl-c"># scale max to 255</span> <span class="pl-s1">test_png_load</span> <span class="pl-c1">=</span> <span class="pl-s1">test_png_load</span> <span class="pl-c1">*</span> <span class="pl-c1">255</span> <span class="pl-c"># imread from tiff</span> <span class="pl-s1">test_tiff_load</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">imread</span>(<span class="pl-s">'testme.tif'</span>) <span class="pl-c"># pil open from png</span> <span class="pl-s1">pil_png_image</span> <span class="pl-c1">=</span> <span class="pl-v">PIL</span>.<span class="pl-v">Image</span>.<span class="pl-en">open</span>(<span class="pl-s">'testme.png'</span>) <span class="pl-s1">test_png_pil_load</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s1">pil_png_image</span>.<span class="pl-en">getdata</span>()) <span class="pl-c"># just get first row, and R of RGBA</span> <span class="pl-s1">test_png_pil_load</span> <span class="pl-c1">=</span> [<span class="pl-s1">x</span>[<span class="pl-c1">0</span>] <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-s1">test_png_pil_load</span>[<span class="pl-c1">0</span>:<span class="pl-c1">256</span>]] <span class="pl-c"># pil open from tiff</span> <span class="pl-s1">pil_tiff_image</span> <span class="pl-c1">=</span> <span class="pl-v">PIL</span>.<span class="pl-v">Image</span>.<span class="pl-en">open</span>(<span class="pl-s">'testme.tif'</span>) <span class="pl-s1">test_tiff_pil_load</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s1">pil_tiff_image</span>.<span class="pl-en">getdata</span>()) <span class="pl-c"># just get first row</span> <span class="pl-s1">test_tiff_pil_load</span> <span class="pl-c1">=</span> <span class="pl-s1">test_png_pil_load</span>[<span class="pl-c1">0</span>:<span class="pl-c1">256</span>] <span class="pl-c"># print orig, colormap, and 2 methods of loading png image data</span> <span class="pl-en">print</span>(<span class="pl-s">"test_array<span class="pl-cce">\t</span>cm.gray()<span class="pl-cce">\t</span>png_pil_load<span class="pl-cce">\t</span>png_imread_load"</span>) <span class="pl-en">print</span>(<span class="pl-s">"----------<span class="pl-cce">\t</span>---------<span class="pl-cce">\t</span>------------<span class="pl-cce">\t</span>---------------"</span>) <span class="pl-en">print_arrays_cols</span>( <span class="pl-s1">test_array</span>[<span class="pl-c1">0</span>,:].<span class="pl-en">flatten</span>(), <span class="pl-s1">test_array_cm_gray</span>[<span class="pl-c1">0</span>,:,<span class="pl-c1">0</span>].<span class="pl-en">flatten</span>(), <span class="pl-s1">test_png_pil_load</span>, <span class="pl-s1">test_png_load</span>[<span class="pl-c1">0</span>,:,<span class="pl-c1">0</span>].<span class="pl-en">flatten</span>(), ) <span class="pl-c"># print orig, colormap, and 2 methods of loading tiff image data</span> <span class="pl-en">print</span>(<span class="pl-s">""</span>) <span class="pl-en">print</span>(<span class="pl-s">"test_array<span class="pl-cce">\t</span>cm.gray()<span class="pl-cce">\t</span>tiff_pil_load<span class="pl-cce">\t</span>tiff_imread_load"</span>) <span class="pl-en">print</span>(<span class="pl-s">"----------<span class="pl-cce">\t</span>---------<span class="pl-cce">\t</span>-------------<span class="pl-cce">\t</span>----------------"</span>) <span class="pl-en">print_arrays_cols</span>( <span class="pl-s1">test_array</span>[<span class="pl-c1">0</span>,:].<span class="pl-en">flatten</span>(), <span class="pl-s1">test_array_cm_gray</span>[<span class="pl-c1">0</span>,:,<span class="pl-c1">0</span>].<span class="pl-en">flatten</span>(), <span class="pl-s1">test_tiff_pil_load</span>, <span class="pl-s1">test_tiff_load</span>[<span class="pl-c1">0</span>,:,<span class="pl-c1">0</span>].<span class="pl-en">flatten</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"><strong>Actual outcome</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_array cm.gray() png_pil_load png_imread_load ---------- --------- ------------ --------------- 0.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 2.000 2.000 2.000 2.000 3.000 3.000 3.000 3.000 4.000 4.000 4.000 4.000 5.000 5.000 5.000 5.000 6.000 6.000 6.000 6.000 7.000 7.000 7.000 7.000 8.000 8.000 8.000 8.000 9.000 9.000 9.000 9.000 10.000 10.000 10.000 10.000 11.000 11.000 11.000 11.000 12.000 12.000 12.000 12.000 13.000 13.000 13.000 13.000 14.000 14.000 14.000 14.000 15.000 15.000 15.000 15.000 16.000 16.000 16.000 16.000 17.000 17.000 17.000 17.000 18.000 18.000 18.000 18.000 19.000 19.000 19.000 19.000 20.000 20.000 20.000 20.000 21.000 21.000 21.000 21.000 22.000 22.000 22.000 22.000 23.000 23.000 23.000 23.000 24.000 24.000 24.000 24.000 25.000 25.000 25.000 25.000 26.000 26.000 26.000 26.000 27.000 27.000 27.000 27.000 28.000 28.000 28.000 28.000 29.000 29.000 29.000 29.000 30.000 30.000 30.000 30.000 31.000 31.000 31.000 31.000 32.000 32.000 32.000 32.000 33.000 33.000 32.000 32.000 **** 34.000 34.000 34.000 34.000 35.000 35.000 35.000 35.000 36.000 36.000 36.000 36.000 37.000 37.000 36.000 36.000 **** 38.000 38.000 38.000 38.000 39.000 39.000 39.000 39.000 40.000 40.000 40.000 40.000 41.000 41.000 40.000 40.000 **** 42.000 42.000 42.000 42.000 43.000 43.000 43.000 43.000 44.000 44.000 44.000 44.000 45.000 45.000 44.000 44.000 **** 46.000 46.000 46.000 46.000 47.000 47.000 47.000 47.000 48.000 48.000 48.000 48.000 49.000 49.000 48.000 48.000 **** 50.000 50.000 50.000 50.000 51.000 51.000 51.000 51.000 52.000 52.000 52.000 52.000 53.000 53.000 52.000 52.000 **** 54.000 54.000 54.000 54.000 55.000 55.000 55.000 55.000 56.000 56.000 56.000 56.000 57.000 57.000 56.000 56.000 **** 58.000 58.000 58.000 58.000 59.000 59.000 59.000 59.000 60.000 60.000 60.000 60.000 61.000 61.000 60.000 60.000 **** 62.000 62.000 62.000 62.000 63.000 63.000 63.000 63.000 64.000 64.000 64.000 64.000 65.000 65.000 65.000 65.000 66.000 66.000 65.000 65.000 **** 67.000 67.000 67.000 67.000 68.000 68.000 68.000 68.000 69.000 69.000 69.000 69.000 70.000 70.000 70.000 70.000 71.000 71.000 71.000 71.000 72.000 72.000 72.000 72.000 73.000 73.000 73.000 73.000 74.000 74.000 73.000 73.000 **** 75.000 75.000 75.000 75.000 76.000 76.000 76.000 76.000 77.000 77.000 77.000 77.000 78.000 78.000 78.000 78.000 79.000 79.000 79.000 79.000 80.000 80.000 80.000 80.000 81.000 81.000 81.000 81.000 82.000 82.000 81.000 81.000 **** 83.000 83.000 83.000 83.000 84.000 84.000 84.000 84.000 85.000 85.000 85.000 85.000 86.000 86.000 86.000 86.000 87.000 87.000 87.000 87.000 88.000 88.000 88.000 88.000 89.000 89.000 89.000 89.000 90.000 90.000 89.000 89.000 **** 91.000 91.000 91.000 91.000 92.000 92.000 92.000 92.000 93.000 93.000 93.000 93.000 94.000 94.000 94.000 94.000 95.000 95.000 95.000 95.000 96.000 96.000 96.000 96.000 97.000 97.000 97.000 97.000 98.000 98.000 97.000 97.000 **** 99.000 99.000 99.000 99.000 100.000 100.000 100.000 100.000 101.000 101.000 101.000 101.000 102.000 102.000 102.000 102.000 103.000 103.000 103.000 103.000 104.000 104.000 104.000 104.000 105.000 105.000 105.000 105.000 106.000 106.000 105.000 105.000 **** 107.000 107.000 107.000 107.000 108.000 108.000 108.000 108.000 109.000 109.000 109.000 109.000 110.000 110.000 110.000 110.000 111.000 111.000 111.000 111.000 112.000 112.000 112.000 112.000 113.000 113.000 113.000 113.000 114.000 114.000 113.000 113.000 **** 115.000 115.000 115.000 115.000 116.000 116.000 116.000 116.000 117.000 117.000 117.000 117.000 118.000 118.000 118.000 118.000 119.000 119.000 119.000 119.000 120.000 120.000 120.000 120.000 121.000 121.000 121.000 121.000 122.000 122.000 121.000 121.000 **** 123.000 123.000 123.000 123.000 124.000 124.000 124.000 124.000 125.000 125.000 125.000 125.000 126.000 126.000 126.000 126.000 127.000 127.000 127.000 127.000 128.000 128.000 128.000 128.000 129.000 129.000 129.000 129.000 130.000 130.000 130.000 130.000 131.000 131.000 131.000 131.000 132.000 132.000 131.000 131.000 **** 133.000 133.000 133.000 133.000 134.000 134.000 134.000 134.000 135.000 135.000 135.000 135.000 136.000 136.000 136.000 136.000 137.000 137.000 137.000 137.000 138.000 138.000 138.000 138.000 139.000 139.000 139.000 139.000 140.000 140.000 140.000 140.000 141.000 141.000 141.000 141.000 142.000 142.000 142.000 142.000 143.000 143.000 143.000 143.000 144.000 144.000 144.000 144.000 145.000 145.000 145.000 145.000 146.000 146.000 146.000 146.000 147.000 147.000 147.000 147.000 148.000 148.000 147.000 147.000 **** 149.000 149.000 149.000 149.000 150.000 150.000 150.000 150.000 151.000 151.000 151.000 151.000 152.000 152.000 152.000 152.000 153.000 153.000 153.000 153.000 154.000 154.000 154.000 154.000 155.000 155.000 155.000 155.000 156.000 156.000 156.000 156.000 157.000 157.000 157.000 157.000 158.000 158.000 158.000 158.000 159.000 159.000 159.000 159.000 160.000 160.000 160.000 160.000 161.000 161.000 161.000 161.000 162.000 162.000 162.000 162.000 163.000 163.000 163.000 163.000 164.000 164.000 163.000 163.000 **** 165.000 165.000 165.000 165.000 166.000 166.000 166.000 166.000 167.000 167.000 167.000 167.000 168.000 168.000 168.000 168.000 169.000 169.000 169.000 169.000 170.000 170.000 170.000 170.000 171.000 171.000 171.000 171.000 172.000 172.000 172.000 172.000 173.000 173.000 173.000 173.000 174.000 174.000 174.000 174.000 175.000 175.000 175.000 175.000 176.000 176.000 176.000 176.000 177.000 177.000 177.000 177.000 178.000 178.000 178.000 178.000 179.000 179.000 179.000 179.000 180.000 180.000 179.000 179.000 **** 181.000 181.000 181.000 181.000 182.000 182.000 182.000 182.000 183.000 183.000 183.000 183.000 184.000 184.000 184.000 184.000 185.000 185.000 185.000 185.000 186.000 186.000 186.000 186.000 187.000 187.000 187.000 187.000 188.000 188.000 188.000 188.000 189.000 189.000 189.000 189.000 190.000 190.000 190.000 190.000 191.000 191.000 191.000 191.000 192.000 192.000 192.000 192.000 193.000 193.000 193.000 193.000 194.000 194.000 194.000 194.000 195.000 195.000 195.000 195.000 196.000 196.000 195.000 195.000 **** 197.000 197.000 197.000 197.000 198.000 198.000 198.000 198.000 199.000 199.000 199.000 199.000 200.000 200.000 200.000 200.000 201.000 201.000 201.000 201.000 202.000 202.000 202.000 202.000 203.000 203.000 203.000 203.000 204.000 204.000 204.000 204.000 205.000 205.000 205.000 205.000 206.000 206.000 206.000 206.000 207.000 207.000 207.000 207.000 208.000 208.000 208.000 208.000 209.000 209.000 209.000 209.000 210.000 210.000 210.000 210.000 211.000 211.000 211.000 211.000 212.000 212.000 211.000 211.000 **** 213.000 213.000 213.000 213.000 214.000 214.000 214.000 214.000 215.000 215.000 215.000 215.000 216.000 216.000 216.000 216.000 217.000 217.000 217.000 217.000 218.000 218.000 218.000 218.000 219.000 219.000 219.000 219.000 220.000 220.000 220.000 220.000 221.000 221.000 221.000 221.000 222.000 222.000 222.000 222.000 223.000 223.000 223.000 223.000 224.000 224.000 224.000 224.000 225.000 225.000 225.000 225.000 226.000 226.000 226.000 226.000 227.000 227.000 227.000 227.000 228.000 228.000 227.000 227.000 **** 229.000 229.000 229.000 229.000 230.000 230.000 230.000 230.000 231.000 231.000 231.000 231.000 232.000 232.000 232.000 232.000 233.000 233.000 233.000 233.000 234.000 234.000 234.000 234.000 235.000 235.000 235.000 235.000 236.000 236.000 236.000 236.000 237.000 237.000 237.000 237.000 238.000 238.000 238.000 238.000 239.000 239.000 239.000 239.000 240.000 240.000 240.000 240.000 241.000 241.000 241.000 241.000 242.000 242.000 242.000 242.000 243.000 243.000 243.000 243.000 244.000 244.000 243.000 243.000 **** 245.000 245.000 245.000 245.000 246.000 246.000 246.000 246.000 247.000 247.000 247.000 247.000 248.000 248.000 248.000 248.000 249.000 249.000 249.000 249.000 250.000 250.000 250.000 250.000 251.000 251.000 251.000 251.000 252.000 252.000 252.000 252.000 253.000 253.000 253.000 253.000 254.000 254.000 254.000 254.000 255.000 255.000 255.000 255.000 test_array cm.gray() tiff_pil_load tiff_imread_load ---------- --------- ------------- ---------------- 0.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 2.000 2.000 2.000 2.000 3.000 3.000 3.000 3.000 4.000 4.000 4.000 4.000 5.000 5.000 5.000 5.000 6.000 6.000 6.000 6.000 7.000 7.000 7.000 7.000 8.000 8.000 8.000 8.000 9.000 9.000 9.000 9.000 10.000 10.000 10.000 10.000 11.000 11.000 11.000 11.000 12.000 12.000 12.000 12.000 13.000 13.000 13.000 13.000 14.000 14.000 14.000 14.000 15.000 15.000 15.000 15.000 16.000 16.000 16.000 16.000 17.000 17.000 17.000 17.000 18.000 18.000 18.000 18.000 19.000 19.000 19.000 19.000 20.000 20.000 20.000 20.000 21.000 21.000 21.000 21.000 22.000 22.000 22.000 22.000 23.000 23.000 23.000 23.000 24.000 24.000 24.000 24.000 25.000 25.000 25.000 25.000 26.000 26.000 26.000 26.000 27.000 27.000 27.000 27.000 28.000 28.000 28.000 28.000 29.000 29.000 29.000 29.000 30.000 30.000 30.000 30.000 31.000 31.000 31.000 31.000 32.000 32.000 32.000 32.000 33.000 33.000 32.000 32.000 **** 34.000 34.000 34.000 34.000 35.000 35.000 35.000 35.000 36.000 36.000 36.000 36.000 37.000 37.000 36.000 36.000 **** 38.000 38.000 38.000 38.000 39.000 39.000 39.000 39.000 40.000 40.000 40.000 40.000 41.000 41.000 40.000 40.000 **** 42.000 42.000 42.000 42.000 43.000 43.000 43.000 43.000 44.000 44.000 44.000 44.000 45.000 45.000 44.000 44.000 **** 46.000 46.000 46.000 46.000 47.000 47.000 47.000 47.000 48.000 48.000 48.000 48.000 49.000 49.000 48.000 48.000 **** 50.000 50.000 50.000 50.000 51.000 51.000 51.000 51.000 52.000 52.000 52.000 52.000 53.000 53.000 52.000 52.000 **** 54.000 54.000 54.000 54.000 55.000 55.000 55.000 55.000 56.000 56.000 56.000 56.000 57.000 57.000 56.000 56.000 **** 58.000 58.000 58.000 58.000 59.000 59.000 59.000 59.000 60.000 60.000 60.000 60.000 61.000 61.000 60.000 60.000 **** 62.000 62.000 62.000 62.000 63.000 63.000 63.000 63.000 64.000 64.000 64.000 64.000 65.000 65.000 65.000 65.000 66.000 66.000 65.000 65.000 **** 67.000 67.000 67.000 67.000 68.000 68.000 68.000 68.000 69.000 69.000 69.000 69.000 70.000 70.000 70.000 70.000 71.000 71.000 71.000 71.000 72.000 72.000 72.000 72.000 73.000 73.000 73.000 73.000 74.000 74.000 73.000 73.000 **** 75.000 75.000 75.000 75.000 76.000 76.000 76.000 76.000 77.000 77.000 77.000 77.000 78.000 78.000 78.000 78.000 79.000 79.000 79.000 79.000 80.000 80.000 80.000 80.000 81.000 81.000 81.000 81.000 82.000 82.000 81.000 81.000 **** 83.000 83.000 83.000 83.000 84.000 84.000 84.000 84.000 85.000 85.000 85.000 85.000 86.000 86.000 86.000 86.000 87.000 87.000 87.000 87.000 88.000 88.000 88.000 88.000 89.000 89.000 89.000 89.000 90.000 90.000 89.000 89.000 **** 91.000 91.000 91.000 91.000 92.000 92.000 92.000 92.000 93.000 93.000 93.000 93.000 94.000 94.000 94.000 94.000 95.000 95.000 95.000 95.000 96.000 96.000 96.000 96.000 97.000 97.000 97.000 97.000 98.000 98.000 97.000 97.000 **** 99.000 99.000 99.000 99.000 100.000 100.000 100.000 100.000 101.000 101.000 101.000 101.000 102.000 102.000 102.000 102.000 103.000 103.000 103.000 103.000 104.000 104.000 104.000 104.000 105.000 105.000 105.000 105.000 106.000 106.000 105.000 105.000 **** 107.000 107.000 107.000 107.000 108.000 108.000 108.000 108.000 109.000 109.000 109.000 109.000 110.000 110.000 110.000 110.000 111.000 111.000 111.000 111.000 112.000 112.000 112.000 112.000 113.000 113.000 113.000 113.000 114.000 114.000 113.000 113.000 **** 115.000 115.000 115.000 115.000 116.000 116.000 116.000 116.000 117.000 117.000 117.000 117.000 118.000 118.000 118.000 118.000 119.000 119.000 119.000 119.000 120.000 120.000 120.000 120.000 121.000 121.000 121.000 121.000 122.000 122.000 121.000 121.000 **** 123.000 123.000 123.000 123.000 124.000 124.000 124.000 124.000 125.000 125.000 125.000 125.000 126.000 126.000 126.000 126.000 127.000 127.000 127.000 127.000 128.000 128.000 128.000 128.000 129.000 129.000 129.000 129.000 130.000 130.000 130.000 130.000 131.000 131.000 131.000 131.000 132.000 132.000 131.000 131.000 **** 133.000 133.000 133.000 133.000 134.000 134.000 134.000 134.000 135.000 135.000 135.000 135.000 136.000 136.000 136.000 136.000 137.000 137.000 137.000 137.000 138.000 138.000 138.000 138.000 139.000 139.000 139.000 139.000 140.000 140.000 140.000 140.000 141.000 141.000 141.000 141.000 142.000 142.000 142.000 142.000 143.000 143.000 143.000 143.000 144.000 144.000 144.000 144.000 145.000 145.000 145.000 145.000 146.000 146.000 146.000 146.000 147.000 147.000 147.000 147.000 148.000 148.000 147.000 147.000 **** 149.000 149.000 149.000 149.000 150.000 150.000 150.000 150.000 151.000 151.000 151.000 151.000 152.000 152.000 152.000 152.000 153.000 153.000 153.000 153.000 154.000 154.000 154.000 154.000 155.000 155.000 155.000 155.000 156.000 156.000 156.000 156.000 157.000 157.000 157.000 157.000 158.000 158.000 158.000 158.000 159.000 159.000 159.000 159.000 160.000 160.000 160.000 160.000 161.000 161.000 161.000 161.000 162.000 162.000 162.000 162.000 163.000 163.000 163.000 163.000 164.000 164.000 163.000 163.000 **** 165.000 165.000 165.000 165.000 166.000 166.000 166.000 166.000 167.000 167.000 167.000 167.000 168.000 168.000 168.000 168.000 169.000 169.000 169.000 169.000 170.000 170.000 170.000 170.000 171.000 171.000 171.000 171.000 172.000 172.000 172.000 172.000 173.000 173.000 173.000 173.000 174.000 174.000 174.000 174.000 175.000 175.000 175.000 175.000 176.000 176.000 176.000 176.000 177.000 177.000 177.000 177.000 178.000 178.000 178.000 178.000 179.000 179.000 179.000 179.000 180.000 180.000 179.000 179.000 **** 181.000 181.000 181.000 181.000 182.000 182.000 182.000 182.000 183.000 183.000 183.000 183.000 184.000 184.000 184.000 184.000 185.000 185.000 185.000 185.000 186.000 186.000 186.000 186.000 187.000 187.000 187.000 187.000 188.000 188.000 188.000 188.000 189.000 189.000 189.000 189.000 190.000 190.000 190.000 190.000 191.000 191.000 191.000 191.000 192.000 192.000 192.000 192.000 193.000 193.000 193.000 193.000 194.000 194.000 194.000 194.000 195.000 195.000 195.000 195.000 196.000 196.000 195.000 195.000 **** 197.000 197.000 197.000 197.000 198.000 198.000 198.000 198.000 199.000 199.000 199.000 199.000 200.000 200.000 200.000 200.000 201.000 201.000 201.000 201.000 202.000 202.000 202.000 202.000 203.000 203.000 203.000 203.000 204.000 204.000 204.000 204.000 205.000 205.000 205.000 205.000 206.000 206.000 206.000 206.000 207.000 207.000 207.000 207.000 208.000 208.000 208.000 208.000 209.000 209.000 209.000 209.000 210.000 210.000 210.000 210.000 211.000 211.000 211.000 211.000 212.000 212.000 211.000 211.000 **** 213.000 213.000 213.000 213.000 214.000 214.000 214.000 214.000 215.000 215.000 215.000 215.000 216.000 216.000 216.000 216.000 217.000 217.000 217.000 217.000 218.000 218.000 218.000 218.000 219.000 219.000 219.000 219.000 220.000 220.000 220.000 220.000 221.000 221.000 221.000 221.000 222.000 222.000 222.000 222.000 223.000 223.000 223.000 223.000 224.000 224.000 224.000 224.000 225.000 225.000 225.000 225.000 226.000 226.000 226.000 226.000 227.000 227.000 227.000 227.000 228.000 228.000 227.000 227.000 **** 229.000 229.000 229.000 229.000 230.000 230.000 230.000 230.000 231.000 231.000 231.000 231.000 232.000 232.000 232.000 232.000 233.000 233.000 233.000 233.000 234.000 234.000 234.000 234.000 235.000 235.000 235.000 235.000 236.000 236.000 236.000 236.000 237.000 237.000 237.000 237.000 238.000 238.000 238.000 238.000 239.000 239.000 239.000 239.000 240.000 240.000 240.000 240.000 241.000 241.000 241.000 241.000 242.000 242.000 242.000 242.000 243.000 243.000 243.000 243.000 244.000 244.000 243.000 243.000 **** 245.000 245.000 245.000 245.000 246.000 246.000 246.000 246.000 247.000 247.000 247.000 247.000 248.000 248.000 248.000 248.000 249.000 249.000 249.000 249.000 250.000 250.000 250.000 250.000 251.000 251.000 251.000 251.000 252.000 252.000 252.000 252.000 253.000 253.000 253.000 253.000 254.000 254.000 254.000 254.000 255.000 255.000 255.000 255.000"><pre class="notranslate"><code class="notranslate">test_array cm.gray() png_pil_load png_imread_load ---------- --------- ------------ --------------- 0.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 2.000 2.000 2.000 2.000 3.000 3.000 3.000 3.000 4.000 4.000 4.000 4.000 5.000 5.000 5.000 5.000 6.000 6.000 6.000 6.000 7.000 7.000 7.000 7.000 8.000 8.000 8.000 8.000 9.000 9.000 9.000 9.000 10.000 10.000 10.000 10.000 11.000 11.000 11.000 11.000 12.000 12.000 12.000 12.000 13.000 13.000 13.000 13.000 14.000 14.000 14.000 14.000 15.000 15.000 15.000 15.000 16.000 16.000 16.000 16.000 17.000 17.000 17.000 17.000 18.000 18.000 18.000 18.000 19.000 19.000 19.000 19.000 20.000 20.000 20.000 20.000 21.000 21.000 21.000 21.000 22.000 22.000 22.000 22.000 23.000 23.000 23.000 23.000 24.000 24.000 24.000 24.000 25.000 25.000 25.000 25.000 26.000 26.000 26.000 26.000 27.000 27.000 27.000 27.000 28.000 28.000 28.000 28.000 29.000 29.000 29.000 29.000 30.000 30.000 30.000 30.000 31.000 31.000 31.000 31.000 32.000 32.000 32.000 32.000 33.000 33.000 32.000 32.000 **** 34.000 34.000 34.000 34.000 35.000 35.000 35.000 35.000 36.000 36.000 36.000 36.000 37.000 37.000 36.000 36.000 **** 38.000 38.000 38.000 38.000 39.000 39.000 39.000 39.000 40.000 40.000 40.000 40.000 41.000 41.000 40.000 40.000 **** 42.000 42.000 42.000 42.000 43.000 43.000 43.000 43.000 44.000 44.000 44.000 44.000 45.000 45.000 44.000 44.000 **** 46.000 46.000 46.000 46.000 47.000 47.000 47.000 47.000 48.000 48.000 48.000 48.000 49.000 49.000 48.000 48.000 **** 50.000 50.000 50.000 50.000 51.000 51.000 51.000 51.000 52.000 52.000 52.000 52.000 53.000 53.000 52.000 52.000 **** 54.000 54.000 54.000 54.000 55.000 55.000 55.000 55.000 56.000 56.000 56.000 56.000 57.000 57.000 56.000 56.000 **** 58.000 58.000 58.000 58.000 59.000 59.000 59.000 59.000 60.000 60.000 60.000 60.000 61.000 61.000 60.000 60.000 **** 62.000 62.000 62.000 62.000 63.000 63.000 63.000 63.000 64.000 64.000 64.000 64.000 65.000 65.000 65.000 65.000 66.000 66.000 65.000 65.000 **** 67.000 67.000 67.000 67.000 68.000 68.000 68.000 68.000 69.000 69.000 69.000 69.000 70.000 70.000 70.000 70.000 71.000 71.000 71.000 71.000 72.000 72.000 72.000 72.000 73.000 73.000 73.000 73.000 74.000 74.000 73.000 73.000 **** 75.000 75.000 75.000 75.000 76.000 76.000 76.000 76.000 77.000 77.000 77.000 77.000 78.000 78.000 78.000 78.000 79.000 79.000 79.000 79.000 80.000 80.000 80.000 80.000 81.000 81.000 81.000 81.000 82.000 82.000 81.000 81.000 **** 83.000 83.000 83.000 83.000 84.000 84.000 84.000 84.000 85.000 85.000 85.000 85.000 86.000 86.000 86.000 86.000 87.000 87.000 87.000 87.000 88.000 88.000 88.000 88.000 89.000 89.000 89.000 89.000 90.000 90.000 89.000 89.000 **** 91.000 91.000 91.000 91.000 92.000 92.000 92.000 92.000 93.000 93.000 93.000 93.000 94.000 94.000 94.000 94.000 95.000 95.000 95.000 95.000 96.000 96.000 96.000 96.000 97.000 97.000 97.000 97.000 98.000 98.000 97.000 97.000 **** 99.000 99.000 99.000 99.000 100.000 100.000 100.000 100.000 101.000 101.000 101.000 101.000 102.000 102.000 102.000 102.000 103.000 103.000 103.000 103.000 104.000 104.000 104.000 104.000 105.000 105.000 105.000 105.000 106.000 106.000 105.000 105.000 **** 107.000 107.000 107.000 107.000 108.000 108.000 108.000 108.000 109.000 109.000 109.000 109.000 110.000 110.000 110.000 110.000 111.000 111.000 111.000 111.000 112.000 112.000 112.000 112.000 113.000 113.000 113.000 113.000 114.000 114.000 113.000 113.000 **** 115.000 115.000 115.000 115.000 116.000 116.000 116.000 116.000 117.000 117.000 117.000 117.000 118.000 118.000 118.000 118.000 119.000 119.000 119.000 119.000 120.000 120.000 120.000 120.000 121.000 121.000 121.000 121.000 122.000 122.000 121.000 121.000 **** 123.000 123.000 123.000 123.000 124.000 124.000 124.000 124.000 125.000 125.000 125.000 125.000 126.000 126.000 126.000 126.000 127.000 127.000 127.000 127.000 128.000 128.000 128.000 128.000 129.000 129.000 129.000 129.000 130.000 130.000 130.000 130.000 131.000 131.000 131.000 131.000 132.000 132.000 131.000 131.000 **** 133.000 133.000 133.000 133.000 134.000 134.000 134.000 134.000 135.000 135.000 135.000 135.000 136.000 136.000 136.000 136.000 137.000 137.000 137.000 137.000 138.000 138.000 138.000 138.000 139.000 139.000 139.000 139.000 140.000 140.000 140.000 140.000 141.000 141.000 141.000 141.000 142.000 142.000 142.000 142.000 143.000 143.000 143.000 143.000 144.000 144.000 144.000 144.000 145.000 145.000 145.000 145.000 146.000 146.000 146.000 146.000 147.000 147.000 147.000 147.000 148.000 148.000 147.000 147.000 **** 149.000 149.000 149.000 149.000 150.000 150.000 150.000 150.000 151.000 151.000 151.000 151.000 152.000 152.000 152.000 152.000 153.000 153.000 153.000 153.000 154.000 154.000 154.000 154.000 155.000 155.000 155.000 155.000 156.000 156.000 156.000 156.000 157.000 157.000 157.000 157.000 158.000 158.000 158.000 158.000 159.000 159.000 159.000 159.000 160.000 160.000 160.000 160.000 161.000 161.000 161.000 161.000 162.000 162.000 162.000 162.000 163.000 163.000 163.000 163.000 164.000 164.000 163.000 163.000 **** 165.000 165.000 165.000 165.000 166.000 166.000 166.000 166.000 167.000 167.000 167.000 167.000 168.000 168.000 168.000 168.000 169.000 169.000 169.000 169.000 170.000 170.000 170.000 170.000 171.000 171.000 171.000 171.000 172.000 172.000 172.000 172.000 173.000 173.000 173.000 173.000 174.000 174.000 174.000 174.000 175.000 175.000 175.000 175.000 176.000 176.000 176.000 176.000 177.000 177.000 177.000 177.000 178.000 178.000 178.000 178.000 179.000 179.000 179.000 179.000 180.000 180.000 179.000 179.000 **** 181.000 181.000 181.000 181.000 182.000 182.000 182.000 182.000 183.000 183.000 183.000 183.000 184.000 184.000 184.000 184.000 185.000 185.000 185.000 185.000 186.000 186.000 186.000 186.000 187.000 187.000 187.000 187.000 188.000 188.000 188.000 188.000 189.000 189.000 189.000 189.000 190.000 190.000 190.000 190.000 191.000 191.000 191.000 191.000 192.000 192.000 192.000 192.000 193.000 193.000 193.000 193.000 194.000 194.000 194.000 194.000 195.000 195.000 195.000 195.000 196.000 196.000 195.000 195.000 **** 197.000 197.000 197.000 197.000 198.000 198.000 198.000 198.000 199.000 199.000 199.000 199.000 200.000 200.000 200.000 200.000 201.000 201.000 201.000 201.000 202.000 202.000 202.000 202.000 203.000 203.000 203.000 203.000 204.000 204.000 204.000 204.000 205.000 205.000 205.000 205.000 206.000 206.000 206.000 206.000 207.000 207.000 207.000 207.000 208.000 208.000 208.000 208.000 209.000 209.000 209.000 209.000 210.000 210.000 210.000 210.000 211.000 211.000 211.000 211.000 212.000 212.000 211.000 211.000 **** 213.000 213.000 213.000 213.000 214.000 214.000 214.000 214.000 215.000 215.000 215.000 215.000 216.000 216.000 216.000 216.000 217.000 217.000 217.000 217.000 218.000 218.000 218.000 218.000 219.000 219.000 219.000 219.000 220.000 220.000 220.000 220.000 221.000 221.000 221.000 221.000 222.000 222.000 222.000 222.000 223.000 223.000 223.000 223.000 224.000 224.000 224.000 224.000 225.000 225.000 225.000 225.000 226.000 226.000 226.000 226.000 227.000 227.000 227.000 227.000 228.000 228.000 227.000 227.000 **** 229.000 229.000 229.000 229.000 230.000 230.000 230.000 230.000 231.000 231.000 231.000 231.000 232.000 232.000 232.000 232.000 233.000 233.000 233.000 233.000 234.000 234.000 234.000 234.000 235.000 235.000 235.000 235.000 236.000 236.000 236.000 236.000 237.000 237.000 237.000 237.000 238.000 238.000 238.000 238.000 239.000 239.000 239.000 239.000 240.000 240.000 240.000 240.000 241.000 241.000 241.000 241.000 242.000 242.000 242.000 242.000 243.000 243.000 243.000 243.000 244.000 244.000 243.000 243.000 **** 245.000 245.000 245.000 245.000 246.000 246.000 246.000 246.000 247.000 247.000 247.000 247.000 248.000 248.000 248.000 248.000 249.000 249.000 249.000 249.000 250.000 250.000 250.000 250.000 251.000 251.000 251.000 251.000 252.000 252.000 252.000 252.000 253.000 253.000 253.000 253.000 254.000 254.000 254.000 254.000 255.000 255.000 255.000 255.000 test_array cm.gray() tiff_pil_load tiff_imread_load ---------- --------- ------------- ---------------- 0.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 2.000 2.000 2.000 2.000 3.000 3.000 3.000 3.000 4.000 4.000 4.000 4.000 5.000 5.000 5.000 5.000 6.000 6.000 6.000 6.000 7.000 7.000 7.000 7.000 8.000 8.000 8.000 8.000 9.000 9.000 9.000 9.000 10.000 10.000 10.000 10.000 11.000 11.000 11.000 11.000 12.000 12.000 12.000 12.000 13.000 13.000 13.000 13.000 14.000 14.000 14.000 14.000 15.000 15.000 15.000 15.000 16.000 16.000 16.000 16.000 17.000 17.000 17.000 17.000 18.000 18.000 18.000 18.000 19.000 19.000 19.000 19.000 20.000 20.000 20.000 20.000 21.000 21.000 21.000 21.000 22.000 22.000 22.000 22.000 23.000 23.000 23.000 23.000 24.000 24.000 24.000 24.000 25.000 25.000 25.000 25.000 26.000 26.000 26.000 26.000 27.000 27.000 27.000 27.000 28.000 28.000 28.000 28.000 29.000 29.000 29.000 29.000 30.000 30.000 30.000 30.000 31.000 31.000 31.000 31.000 32.000 32.000 32.000 32.000 33.000 33.000 32.000 32.000 **** 34.000 34.000 34.000 34.000 35.000 35.000 35.000 35.000 36.000 36.000 36.000 36.000 37.000 37.000 36.000 36.000 **** 38.000 38.000 38.000 38.000 39.000 39.000 39.000 39.000 40.000 40.000 40.000 40.000 41.000 41.000 40.000 40.000 **** 42.000 42.000 42.000 42.000 43.000 43.000 43.000 43.000 44.000 44.000 44.000 44.000 45.000 45.000 44.000 44.000 **** 46.000 46.000 46.000 46.000 47.000 47.000 47.000 47.000 48.000 48.000 48.000 48.000 49.000 49.000 48.000 48.000 **** 50.000 50.000 50.000 50.000 51.000 51.000 51.000 51.000 52.000 52.000 52.000 52.000 53.000 53.000 52.000 52.000 **** 54.000 54.000 54.000 54.000 55.000 55.000 55.000 55.000 56.000 56.000 56.000 56.000 57.000 57.000 56.000 56.000 **** 58.000 58.000 58.000 58.000 59.000 59.000 59.000 59.000 60.000 60.000 60.000 60.000 61.000 61.000 60.000 60.000 **** 62.000 62.000 62.000 62.000 63.000 63.000 63.000 63.000 64.000 64.000 64.000 64.000 65.000 65.000 65.000 65.000 66.000 66.000 65.000 65.000 **** 67.000 67.000 67.000 67.000 68.000 68.000 68.000 68.000 69.000 69.000 69.000 69.000 70.000 70.000 70.000 70.000 71.000 71.000 71.000 71.000 72.000 72.000 72.000 72.000 73.000 73.000 73.000 73.000 74.000 74.000 73.000 73.000 **** 75.000 75.000 75.000 75.000 76.000 76.000 76.000 76.000 77.000 77.000 77.000 77.000 78.000 78.000 78.000 78.000 79.000 79.000 79.000 79.000 80.000 80.000 80.000 80.000 81.000 81.000 81.000 81.000 82.000 82.000 81.000 81.000 **** 83.000 83.000 83.000 83.000 84.000 84.000 84.000 84.000 85.000 85.000 85.000 85.000 86.000 86.000 86.000 86.000 87.000 87.000 87.000 87.000 88.000 88.000 88.000 88.000 89.000 89.000 89.000 89.000 90.000 90.000 89.000 89.000 **** 91.000 91.000 91.000 91.000 92.000 92.000 92.000 92.000 93.000 93.000 93.000 93.000 94.000 94.000 94.000 94.000 95.000 95.000 95.000 95.000 96.000 96.000 96.000 96.000 97.000 97.000 97.000 97.000 98.000 98.000 97.000 97.000 **** 99.000 99.000 99.000 99.000 100.000 100.000 100.000 100.000 101.000 101.000 101.000 101.000 102.000 102.000 102.000 102.000 103.000 103.000 103.000 103.000 104.000 104.000 104.000 104.000 105.000 105.000 105.000 105.000 106.000 106.000 105.000 105.000 **** 107.000 107.000 107.000 107.000 108.000 108.000 108.000 108.000 109.000 109.000 109.000 109.000 110.000 110.000 110.000 110.000 111.000 111.000 111.000 111.000 112.000 112.000 112.000 112.000 113.000 113.000 113.000 113.000 114.000 114.000 113.000 113.000 **** 115.000 115.000 115.000 115.000 116.000 116.000 116.000 116.000 117.000 117.000 117.000 117.000 118.000 118.000 118.000 118.000 119.000 119.000 119.000 119.000 120.000 120.000 120.000 120.000 121.000 121.000 121.000 121.000 122.000 122.000 121.000 121.000 **** 123.000 123.000 123.000 123.000 124.000 124.000 124.000 124.000 125.000 125.000 125.000 125.000 126.000 126.000 126.000 126.000 127.000 127.000 127.000 127.000 128.000 128.000 128.000 128.000 129.000 129.000 129.000 129.000 130.000 130.000 130.000 130.000 131.000 131.000 131.000 131.000 132.000 132.000 131.000 131.000 **** 133.000 133.000 133.000 133.000 134.000 134.000 134.000 134.000 135.000 135.000 135.000 135.000 136.000 136.000 136.000 136.000 137.000 137.000 137.000 137.000 138.000 138.000 138.000 138.000 139.000 139.000 139.000 139.000 140.000 140.000 140.000 140.000 141.000 141.000 141.000 141.000 142.000 142.000 142.000 142.000 143.000 143.000 143.000 143.000 144.000 144.000 144.000 144.000 145.000 145.000 145.000 145.000 146.000 146.000 146.000 146.000 147.000 147.000 147.000 147.000 148.000 148.000 147.000 147.000 **** 149.000 149.000 149.000 149.000 150.000 150.000 150.000 150.000 151.000 151.000 151.000 151.000 152.000 152.000 152.000 152.000 153.000 153.000 153.000 153.000 154.000 154.000 154.000 154.000 155.000 155.000 155.000 155.000 156.000 156.000 156.000 156.000 157.000 157.000 157.000 157.000 158.000 158.000 158.000 158.000 159.000 159.000 159.000 159.000 160.000 160.000 160.000 160.000 161.000 161.000 161.000 161.000 162.000 162.000 162.000 162.000 163.000 163.000 163.000 163.000 164.000 164.000 163.000 163.000 **** 165.000 165.000 165.000 165.000 166.000 166.000 166.000 166.000 167.000 167.000 167.000 167.000 168.000 168.000 168.000 168.000 169.000 169.000 169.000 169.000 170.000 170.000 170.000 170.000 171.000 171.000 171.000 171.000 172.000 172.000 172.000 172.000 173.000 173.000 173.000 173.000 174.000 174.000 174.000 174.000 175.000 175.000 175.000 175.000 176.000 176.000 176.000 176.000 177.000 177.000 177.000 177.000 178.000 178.000 178.000 178.000 179.000 179.000 179.000 179.000 180.000 180.000 179.000 179.000 **** 181.000 181.000 181.000 181.000 182.000 182.000 182.000 182.000 183.000 183.000 183.000 183.000 184.000 184.000 184.000 184.000 185.000 185.000 185.000 185.000 186.000 186.000 186.000 186.000 187.000 187.000 187.000 187.000 188.000 188.000 188.000 188.000 189.000 189.000 189.000 189.000 190.000 190.000 190.000 190.000 191.000 191.000 191.000 191.000 192.000 192.000 192.000 192.000 193.000 193.000 193.000 193.000 194.000 194.000 194.000 194.000 195.000 195.000 195.000 195.000 196.000 196.000 195.000 195.000 **** 197.000 197.000 197.000 197.000 198.000 198.000 198.000 198.000 199.000 199.000 199.000 199.000 200.000 200.000 200.000 200.000 201.000 201.000 201.000 201.000 202.000 202.000 202.000 202.000 203.000 203.000 203.000 203.000 204.000 204.000 204.000 204.000 205.000 205.000 205.000 205.000 206.000 206.000 206.000 206.000 207.000 207.000 207.000 207.000 208.000 208.000 208.000 208.000 209.000 209.000 209.000 209.000 210.000 210.000 210.000 210.000 211.000 211.000 211.000 211.000 212.000 212.000 211.000 211.000 **** 213.000 213.000 213.000 213.000 214.000 214.000 214.000 214.000 215.000 215.000 215.000 215.000 216.000 216.000 216.000 216.000 217.000 217.000 217.000 217.000 218.000 218.000 218.000 218.000 219.000 219.000 219.000 219.000 220.000 220.000 220.000 220.000 221.000 221.000 221.000 221.000 222.000 222.000 222.000 222.000 223.000 223.000 223.000 223.000 224.000 224.000 224.000 224.000 225.000 225.000 225.000 225.000 226.000 226.000 226.000 226.000 227.000 227.000 227.000 227.000 228.000 228.000 227.000 227.000 **** 229.000 229.000 229.000 229.000 230.000 230.000 230.000 230.000 231.000 231.000 231.000 231.000 232.000 232.000 232.000 232.000 233.000 233.000 233.000 233.000 234.000 234.000 234.000 234.000 235.000 235.000 235.000 235.000 236.000 236.000 236.000 236.000 237.000 237.000 237.000 237.000 238.000 238.000 238.000 238.000 239.000 239.000 239.000 239.000 240.000 240.000 240.000 240.000 241.000 241.000 241.000 241.000 242.000 242.000 242.000 242.000 243.000 243.000 243.000 243.000 244.000 244.000 243.000 243.000 **** 245.000 245.000 245.000 245.000 246.000 246.000 246.000 246.000 247.000 247.000 247.000 247.000 248.000 248.000 248.000 248.000 249.000 249.000 249.000 249.000 250.000 250.000 250.000 250.000 251.000 251.000 251.000 251.000 252.000 252.000 252.000 252.000 253.000 253.000 253.000 253.000 254.000 254.000 254.000 254.000 255.000 255.000 255.000 255.000 </code></pre></div> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">In the console output, lines with asterisks '****' indicate lines where the image read-back shows image has wrong value. This happens with both an imsave'd png or tiff output image. Image read-back is verified by reading back using two different packages (Pillow and maptlotlib) to eliminate the possibility of the image read being the issue.</p> <p dir="auto">In the code output I'm only comparing the 'R' byte of the RGBA data, because the other bytes appear to be consistent, i.e. R=G=B and A=255.</p> <p dir="auto">From the console output you can see:</p> <ul dir="auto"> <li>colormap always outputs the correct values based on the input array and 'gray' colormap</li> <li>image read back using imread shows some wrong values were saved</li> <li>image read back using PIL getdata() shows the same wrong values</li> </ul> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: <ul dir="auto"> <li>macOS 10.13.6</li> <li>Windows 10</li> </ul> </li> <li>Matplotlib version: <ul dir="auto"> <li>2.2.3 (macOS 10.13.6)</li> <li>2.2.3 (Windows 10)</li> </ul> </li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): and <ul dir="auto"> <li>'MacOSX' (macOS 10.13.6)</li> <li>'TkAgg' (Windows 10)</li> </ul> </li> <li>Python version: <ul dir="auto"> <li>3.7.0 (macOS 10.13.6)</li> <li>3.6.6 (Windows 10)</li> </ul> </li> <li>Jupyter version (if applicable): N/A</li> <li>Other libraries: <ul dir="auto"> <li>Pillow 5.2.0 (macOS 10.13.6)</li> <li>Pillow 5.2.0 (Windows 10)</li> </ul> </li> </ul> <ul dir="auto"> <li>matplotlib was installed on macOS using pip3 install into a homebrew python</li> <li>matplotlib was installed on Win10 using pip3 install --user</li> </ul>
1
<h1 dir="auto">Bug report</h1> <h2 dir="auto">Describe the bug</h2> <p dir="auto">Simple javascript function to Router.push("/") will not work correctly.</p> <p dir="auto">in <code class="notranslate">_app.js</code> has:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Router.events.on('routeChangeStart', url =&gt; { console.log(`Loading: ${url}`); });"><pre class="notranslate"><code class="notranslate">Router.events.on('routeChangeStart', url =&gt; { console.log(`Loading: ${url}`); }); </code></pre></div> <p dir="auto">which is working...</p> <p dir="auto">in my AppBar(Material-ui Toolbar) i have a simple onClick (i've also tried with <code class="notranslate">&lt;Link&gt;</code> to no avail)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;Avatar src=&quot;/static/img/favicon-96x96.png&quot; onClick={() =&gt; Router.push(ROUTE.LANDING)} /&gt;"><pre class="notranslate"><code class="notranslate">&lt;Avatar src="/static/img/favicon-96x96.png" onClick={() =&gt; Router.push(ROUTE.LANDING)} /&gt; </code></pre></div> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p> <p dir="auto">Create a new <code class="notranslate">&lt;Link&gt;</code> with href to <code class="notranslate">"/"</code> ....see if it redirects to your homepage from another page.<br> or<br> Create a new element with an onChange parameter. <code class="notranslate">onChange={Router.push("/")}</code> and see if it redirects to home page from another page.<br> The current page will stay rendered, however the <code class="notranslate">routeChangeStart</code> callback will fire...</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">I expect the home page (index.js) to be rendered within a few seconds of calling <code class="notranslate">Router.push</code> or clicking a <code class="notranslate">&lt;Link&gt;</code> with <code class="notranslate">href="/"</code></p> <h2 dir="auto">Screenshots</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/955269/64286999-8fd32180-cf2c-11e9-9724-b892bd61861b.png"><img src="https://user-images.githubusercontent.com/955269/64286999-8fd32180-cf2c-11e9-9724-b892bd61861b.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">image of the <code class="notranslate">routeChangeStart</code> consoling out in <code class="notranslate">_app.js</code></p> <h2 dir="auto">System information</h2> <ul dir="auto"> <li>OS: both macOS and Windows</li> <li>i've tested with Firefox, Chrome, and Safari.</li> <li><code class="notranslate"> "next": "^9.0.5"</code></li> </ul> <h2 dir="auto">Additional context</h2> <p dir="auto">Reopening from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="362980099" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/5264" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/5264/hovercard" href="https://github.com/vercel/next.js/issues/5264">#5264</a> .</p> <p dir="auto">Thank you!</p>
<h1 dir="auto">Bug report</h1> <p dir="auto">When attempting to navigate to some pages with a simple <code class="notranslate">&lt;Link href='...'/&gt;</code>, the page hangs and things break.</p> <ul dir="auto"> <li>Go to <a href="https://nozzleio-8f0sjfbt1.now.sh/" rel="nofollow">https://nozzleio-8f0sjfbt1.now.sh/</a></li> <li>Navigate around using the top nav bar</li> <li>Go to the footer and click on the three links that contain "API Docs"</li> <li>Observe the console and network tab</li> </ul> <h2 dir="auto">Expected behavior</h2> <p dir="auto">The navigation should succeed.</p> <h2 dir="auto">System information</h2> <ul dir="auto"> <li>OS: macOS</li> <li>Browser: Chrome</li> <li>Version of Next.js: 9@latest</li> </ul> <h2 dir="auto">More Information</h2> <p dir="auto">The repo for this website can be found at <a href="https://github.com/nozzle/nozzle.io">https://github.com/nozzle/nozzle.io</a> on the master branch.</p>
1
<p dir="auto">There seem to be some performance regressions in compile time of <code class="notranslate">NTuple</code> in 1.0. Note, for example,<br> 1.0:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="using StaticArrays julia&gt; @time @SMatrix rand(16,16) 11.440824 seconds (1.41 M allocations: 85.987 MiB, 0.24% gc time)"><pre class="notranslate"><span class="pl-k">using</span> StaticArrays julia<span class="pl-k">&gt;</span> <span class="pl-c1">@time</span> <span class="pl-c1">@SMatrix</span> <span class="pl-c1">rand</span>(<span class="pl-c1">16</span>,<span class="pl-c1">16</span>) <span class="pl-c1">11.440824</span> seconds (<span class="pl-c1">1.41</span> M allocations<span class="pl-k">:</span> <span class="pl-c1">85.987</span> MiB, <span class="pl-c1">0.24</span><span class="pl-k">%</span> gc time)</pre></div> <p dir="auto">0.6.4:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="using StaticArrays julia&gt; @time @SMatrix rand(16,16); 1.330479 seconds (356.50 k allocations: 13.710 MiB)"><pre class="notranslate"><span class="pl-k">using</span> StaticArrays julia<span class="pl-k">&gt;</span> <span class="pl-c1">@time</span> <span class="pl-c1">@SMatrix</span> <span class="pl-c1">rand</span>(<span class="pl-c1">16</span>,<span class="pl-c1">16</span>); <span class="pl-c1">1.330479</span> seconds (<span class="pl-c1">356.50</span> k allocations<span class="pl-k">:</span> <span class="pl-c1">13.710</span> MiB)</pre></div> <p dir="auto">We were speculating that this is due to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="328800340" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/27398" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/27398/hovercard" href="https://github.com/JuliaLang/julia/pull/27398">#27398</a>. While it doesn't seem unreasonable that the compiler really has to think about 256 type long signatures, we believe that the compiler may not know that all the types are guaranteed to be the same since (as far as I know) <code class="notranslate">NTuple</code> is nothing more than an alias.</p> <p dir="auto">Am I getting the story here correct? Would it be possible to make the compiler know that <code class="notranslate">NTuple</code> is promised to be homogeneous, but otherwise retain the current behavior?</p> <p dir="auto">I apologize if this is somehow duplicating or echoing existing issues, I wasn't able to find anything that addressed this directly.</p> <p dir="auto">(Thanks to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ChrisRackauckas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ChrisRackauckas">@ChrisRackauckas</a> for useful discussion on this.)</p>
<p dir="auto">I'd expect to be able to import with a depwarn, but get an error instead:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; import Base.Test: record WARNING: Base.Test is deprecated, run `using Test` instead. likely near no file:0 ERROR: invalid import path: &quot;Test&quot; does not name a module"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-k">import</span> Base<span class="pl-k">.</span>Test<span class="pl-k">:</span> record WARNING<span class="pl-k">:</span> Base<span class="pl-k">.</span>Test is deprecated, run <span class="pl-s"><span class="pl-pds">`</span>using Test<span class="pl-pds">`</span></span> instead. likely near no file<span class="pl-k">:</span><span class="pl-c1">0</span> ERROR<span class="pl-k">:</span> invalid <span class="pl-k">import</span> path<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>Test<span class="pl-pds">"</span></span> does not name a <span class="pl-k">module</span></pre></div>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.6</li> <li>Operating System version: Linux staging 4.4.0-63-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="42302365" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo/issues/84" data-hovercard-type="pull_request" data-hovercard-url="/apache/dubbo/pull/84/hovercard" href="https://github.com/apache/dubbo/pull/84">#84</a>~14.04.2-Ubuntu SMP Mon Feb 13 11:04:58 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux</li> <li>Java version: 1.8.0</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>start thrift provider with native-thrift, zookeeper is used for register</li> <li>start thrift consumer with native-thrift, zookeeper is used for register</li> <li>run for while, there will be exception as below. But not happen regularly but occasionally.</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?<br> no error.</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?<br> which happens occasionally. Not every time.</p> <p dir="auto">Failed to invoke the method getInstitute in the service thrift.java.institute.InstituteService$Iface. Tried 3 times of the providers [10.28.57.152:20886, 10.28.61.123:20886] (2/2) from the registry zookeeper.config.palmdrive.cn:2181 on the consumer 59.110.53.154 using the dubbo version 2.7.6. Last error is: Failed to invoke remote service: interface thrift.java.institute.InstituteService$Iface, method: getInstitute, cause: Expected protocol id ffffff82 but got c</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <p dir="auto">Failed to invoke the method getInstitute in the service thrift.java.institute.InstituteService$Iface. Tried 3 times of the providers [10.28.57.152:20886, 10.28.61.123:20886] (2/2) from the registry zookeeper.config.palmdrive.cn:2181 on the consumer 59.110.53.154 using the dubbo version 2.7.6. Last error is: Failed to invoke remote service: interface thrift.java.institute.InstituteService$Iface, method: getInstitute, cause: Expected protocol id ffffff82 but got c<br> org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:113)</p> <p dir="auto">org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:259)</p> <p dir="auto">org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47)</p> <p dir="auto">org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92)</p> <p dir="auto">org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:82)</p> <p dir="auto">org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:74)</p> <p dir="auto">org.apache.dubbo.common.bytecode.proxy0.getInstitute(proxy0.java)</p> <p dir="auto">model.institute.InstituteModel.getDubboInstitute(InstituteModel.java:100)</p> <p dir="auto">model.institute.InstituteModel.getInstitute(InstituteModel.java:60)</p> <p dir="auto">controllers.institute.InstitutesCtrl.getSchool(InstitutesCtrl.java:100)</p> <p dir="auto">Routes$$anonfun$routes$1$$anonfun$applyOrElse$446$$anonfun$apply$446.apply(routes_routing.scala:7672)</p> <p dir="auto">Routes$$anonfun$routes$1$$anonfun$applyOrElse$446$$anonfun$apply$446.apply(routes_routing.scala:7672)</p> <p dir="auto">play.core.Router$HandlerInvokerFactory$$anon$4.resultCall(Router.scala:264)</p> <p dir="auto">play.core.Router$HandlerInvokerFactory$JavaActionInvokerFactory$$anon$15$$anon$1.invocation(Router.scala:255)</p> <p dir="auto">play.core.j.JavaAction$$anon$1.call(JavaAction.scala:55)</p> <p dir="auto">play.core.j.JavaAction$$anonfun$11.apply(JavaAction.scala:82)</p> <p dir="auto">play.core.j.JavaAction$$anonfun$11.apply(JavaAction.scala:82)</p> <p dir="auto">scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)</p> <p dir="auto">scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)</p> <p dir="auto">play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:40)</p> <p dir="auto">play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:46)</p> <p dir="auto">play.core.j.HttpExecutionContext.execute(HttpExecutionContext.scala:32)</p> <p dir="auto">scala.concurrent.impl.Future$.apply(Future.scala:31)</p> <p dir="auto">scala.concurrent.Future$.apply(Future.scala:485)</p> <p dir="auto">play.core.j.JavaAction$class.apply(JavaAction.scala:82)</p> <p dir="auto">play.core.Router$HandlerInvokerFactory$JavaActionInvokerFactory$$anon$15$$anon$1.apply(Router.scala:252)</p> <p dir="auto">play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)</p> <p dir="auto">play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)</p> <p dir="auto">play.utils.Threads$.withContextClassLoader(Threads.scala:21)</p> <p dir="auto">play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:129)</p> <p dir="auto">play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:128)</p> <p dir="auto">scala.Option.map(Option.scala:145)</p> <p dir="auto">play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:128)</p> <p dir="auto">play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:121)</p> <p dir="auto">play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:483)</p> <p dir="auto">play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:483)</p> <p dir="auto">play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:519)</p> <p dir="auto">play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:519)</p> <p dir="auto">play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$14.apply(Iteratee.scala:496)</p> <p dir="auto">play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$14.apply(Iteratee.scala:496)</p> <p dir="auto">scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)</p> <p dir="auto">scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)</p> <p dir="auto">akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)</p> <p dir="auto">akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)</p> <p dir="auto">scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)</p> <p dir="auto">scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)</p> <p dir="auto">scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)</p> <p dir="auto">scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.1</li> <li>Operating System version: mac</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>xxx</li> <li>xxx</li> <li>xxx</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! </code></pre></div>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.0</li> <li>Operating System version: windows</li> <li>Java version: 1.8</li> <li>zookeeper version: 3.4.6</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <p dir="auto">使用zookeeper作为注册中心,开启ipv6的情况下,服务消费者始终找不到服务提供者,能帮忙给解决一下吗?</p> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! </code></pre></div>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.0</li> <li>Operating System version: Windows7</li> <li>Java version: jdk8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>stop dubbo service</li> <li>dubbo client set checked = true. do get cudbbo client for times.</li> <li>the size of list field [urls] in ReferenceConfig wil increase</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.<br> (project)[https://github.com/vio-lin/incubator-dubbo/tree/error-situation]<br> run java file<br> incubator-dubbo\dubbo-demo\dubbo-demo-xml\dubbo-demo-xml-consumer\src\main\java\org\apache\dubbo\demo\consumer\Application.java</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">the [urls] in ReferenceConfig will be updated.</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">the avalidable registery urls be add to [urls] in ReferenceConfig</p>
0
<p dir="auto">When using <code class="notranslate">scipy.signal.savgol_filter</code>, the filter will randomly throw an error. It usually happens after 6 calls to <code class="notranslate">savgol_filter</code>. I was not able to get a reproducing code unfortunately :( (I mean I have my huge code that replicates the issue, but I can't reduce this to a snipnet.)</p> <ul dir="auto"> <li>The error comes after a fixed number of calls to <code class="notranslate">savgol_filter</code> but calling them in a snipnet doesn't work. (It has to be in my code somehow)</li> <li>Using a debugger, I can call <code class="notranslate">lapack_func(a1, b1, lwork, iwork, cond, False, False)</code> after the error occurs. It will fail the first time but subsequent calls with the same parameter will suceed.</li> <li>I can fix the issue by adding in <code class="notranslate">scipy\linalg\basic.py</code> a second call to <code class="notranslate">lapack_func</code>:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" x, s, rank, info = lapack_func(a1, b1, lwork, iwork, cond, False, False) if info != 0: x, s, rank, info = lapack_func(a1, b1, lwork, iwork, cond, False, False)"><pre class="notranslate"><code class="notranslate"> x, s, rank, info = lapack_func(a1, b1, lwork, iwork, cond, False, False) if info != 0: x, s, rank, info = lapack_func(a1, b1, lwork, iwork, cond, False, False) </code></pre></div> <p dir="auto">What could I possibly do that would make <code class="notranslate">lapack_func</code> return different results for the same parameters? (the parameters are):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="IPdb [3]: a1, b1, lwork, iwork, cond (array([[ 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [ 25., 24., 23., 22., 21., 20., 19., 18., 17., 16., 15., 14., 13., 12., 11., 10., 9., 8., 7., 6., 5., 4., 3., 2., 1., 0., -1., -2., -3., -4., -5., -6., -7., -8., -9., -10., -11., -12., -13., -14., -15., -16., -17., -18., -19., -20., -21., -22., -23., -24., -25.]]), array([1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), 808, 22, 2.220446049250313e-16)"><pre class="notranslate"><code class="notranslate">IPdb [3]: a1, b1, lwork, iwork, cond (array([[ 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [ 25., 24., 23., 22., 21., 20., 19., 18., 17., 16., 15., 14., 13., 12., 11., 10., 9., 8., 7., 6., 5., 4., 3., 2., 1., 0., -1., -2., -3., -4., -5., -6., -7., -8., -9., -10., -11., -12., -13., -14., -15., -16., -17., -18., -19., -20., -21., -22., -23., -24., -25.]]), array([1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), 808, 22, 2.220446049250313e-16) </code></pre></div> <p dir="auto">What happens is:<br> I run the code. After 6 calls to <code class="notranslate">savgol_filter</code>, I get:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File &quot;C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\signal\_savitzky_golay.py&quot;, line 335, in savgol_filter coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta) File &quot;C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\signal\_savitzky_golay.py&quot;, line 137, in savgol_coeffs coeffs, _, _, _ = lstsq(A, y) File &quot;C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\linalg\basic.py&quot;, line 1228, in lstsq % (-info, lapack_driver)) ValueError: illegal value in 4-th argument of internal None"><pre class="notranslate"><code class="notranslate"> File "C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\signal\_savitzky_golay.py", line 335, in savgol_filter coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta) File "C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\signal\_savitzky_golay.py", line 137, in savgol_coeffs coeffs, _, _, _ = lstsq(A, y) File "C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\linalg\basic.py", line 1228, in lstsq % (-info, lapack_driver)) ValueError: illegal value in 4-th argument of internal None </code></pre></div> <p dir="auto">Trying to use <code class="notranslate">lstsq</code> after that leads to:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;C:\Users\Quentin.Peter\OneDrive - Fluidic Analytics\Desktop\untitled4.py&quot;, line 59, in &lt;module&gt; lstsq(A, y) File &quot;C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\linalg\basic.py&quot;, line 1224, in lstsq raise LinAlgError(&quot;SVD did not converge in Linear Least Squares&quot;) LinAlgError: SVD did not converge in Linear Least Squares"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "C:\Users\Quentin.Peter\OneDrive - Fluidic Analytics\Desktop\untitled4.py", line 59, in &lt;module&gt; lstsq(A, y) File "C:\Users\Quentin.Peter\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\linalg\basic.py", line 1224, in lstsq raise LinAlgError("SVD did not converge in Linear Least Squares") LinAlgError: SVD did not converge in Linear Least Squares </code></pre></div> <p dir="auto">Any repeat after that will work.</p> <h4 dir="auto">Scipy/Numpy/Python version information:</h4> <p dir="auto"><code class="notranslate">1.5.3 1.19.1 sys.version_info(major=3, minor=7, micro=6, releaselevel='final', serial=0)</code></p> <p dir="auto">PS: The calls to lstsq are as follow but this doesn't trigger the bug:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np from scipy.linalg import lstsq A = np.asarray([ np.fromstring(&quot;&quot;&quot;1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00&quot;&quot;&quot;, sep=' '), np.fromstring(&quot;&quot;&quot;4.800e+01 4.700e+01 4.600e+01 4.500e+01 4.400e+01 4.300e+01 4.200e+01 4.100e+01 4.000e+01 3.900e+01 3.800e+01 3.700e+01 3.600e+01 3.500e+01 3.400e+01 3.300e+01 3.200e+01 3.100e+01 3.000e+01 2.900e+01 2.800e+01 2.700e+01 2.600e+01 2.500e+01 2.400e+01 2.300e+01 2.200e+01 2.100e+01 2.000e+01 1.900e+01 1.800e+01 1.700e+01 1.600e+01 1.500e+01 1.400e+01 1.300e+01 1.200e+01 1.100e+01 1.000e+01 9.000e+00 8.000e+00 7.000e+00 6.000e+00 5.000e+00 4.000e+00 3.000e+00 2.000e+00 1.000e+00 0.000e+00 -1.000e+00 -2.000e+00 -3.000e+00 -4.000e+00 -5.000e+00 -6.000e+00 -7.000e+00 -8.000e+00 -9.000e+00 -1.000e+01 -1.100e+01 -1.200e+01 -1.300e+01 -1.400e+01 -1.500e+01 -1.600e+01 -1.700e+01 -1.800e+01 -1.900e+01 -2.000e+01 -2.100e+01 -2.200e+01 -2.300e+01 -2.400e+01 -2.500e+01 -2.600e+01 -2.700e+01 -2.800e+01 -2.900e+01 -3.000e+01 -3.100e+01 -3.200e+01 -3.300e+01 -3.400e+01 -3.500e+01 -3.600e+01 -3.700e+01 -3.800e+01 -3.900e+01 -4.000e+01 -4.100e+01 -4.200e+01 -4.300e+01 -4.400e+01 -4.500e+01 -4.600e+01 -4.700e+01 -4.800e+01&quot;&quot;&quot;, sep=' '), np.fromstring(&quot;&quot;&quot;2.304e+03 2.209e+03 2.116e+03 2.025e+03 1.936e+03 1.849e+03 1.764e+03 1.681e+03 1.600e+03 1.521e+03 1.444e+03 1.369e+03 1.296e+03 1.225e+03 1.156e+03 1.089e+03 1.024e+03 9.610e+02 9.000e+02 8.410e+02 7.840e+02 7.290e+02 6.760e+02 6.250e+02 5.760e+02 5.290e+02 4.840e+02 4.410e+02 4.000e+02 3.610e+02 3.240e+02 2.890e+02 2.560e+02 2.250e+02 1.960e+02 1.690e+02 1.440e+02 1.210e+02 1.000e+02 8.100e+01 6.400e+01 4.900e+01 3.600e+01 2.500e+01 1.600e+01 9.000e+00 4.000e+00 1.000e+00 0.000e+00 1.000e+00 4.000e+00 9.000e+00 1.600e+01 2.500e+01 3.600e+01 4.900e+01 6.400e+01 8.100e+01 1.000e+02 1.210e+02 1.440e+02 1.690e+02 1.960e+02 2.250e+02 2.560e+02 2.890e+02 3.240e+02 3.610e+02 4.000e+02 4.410e+02 4.840e+02 5.290e+02 5.760e+02 6.250e+02 6.760e+02 7.290e+02 7.840e+02 8.410e+02 9.000e+02 9.610e+02 1.024e+03 1.089e+03 1.156e+03 1.225e+03 1.296e+03 1.369e+03 1.444e+03 1.521e+03 1.600e+03 1.681e+03 1.764e+03 1.849e+03 1.936e+03 2.025e+03 2.116e+03 2.209e+03 2.304e+03&quot;&quot;&quot;, sep=' ') ]) y = np.asarray([1., 0., 0.]) lstsq(A, y) A = np.asarray([ np.fromstring(&quot;&quot;&quot; 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.&quot;&quot;&quot;, sep=' '), np.fromstring(&quot;&quot;&quot;25. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0. -1. -2. -3. -4. -5. -6. -7. -8. -9. -10. -11. -12. -13. -14. -15. -16. -17. -18. -19. -20. -21. -22. -23. -24. -25.&quot;&quot;&quot;, sep=' ') ]) y = np.asarray([1., 0.]) lstsq(A, y) A = np.asarray([ np.fromstring(&quot;&quot;&quot; 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.&quot;&quot;&quot;, sep=' '), np.fromstring(&quot;&quot;&quot; 25. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0. -1. -2. -3. -4. -5. -6. -7. -8. -9. -10. -11. -12. -13. -14. -15. -16. -17. -18. -19. -20. -21. -22. -23. -24. -25.&quot;&quot;&quot;, sep=' ') ]) y = np.asarray([1., 0.]) lstsq(A, y) A = np.asarray([ np.fromstring(&quot;&quot;&quot; 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.&quot;&quot;&quot;, sep=' '), np.fromstring(&quot;&quot;&quot;25. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0. -1. -2. -3. -4. -5. -6. -7. -8. -9. -10. -11. -12. -13. -14. -15. -16. -17. -18. -19. -20. -21. -22. -23. -24. -25.&quot;&quot;&quot;, sep=' ') ]) y = np.asarray([1., 0.]) lstsq(A, y) A = np.asarray([ np.fromstring(&quot;&quot;&quot; 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.&quot;&quot;&quot;, sep=' '), np.fromstring(&quot;&quot;&quot;25. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0. -1. -2. -3. -4. -5. -6. -7. -8. -9. -10. -11. -12. -13. -14. -15. -16. -17. -18. -19. -20. -21. -22. -23. -24. -25.&quot;&quot;&quot;, sep=' ') ]) y = np.asarray([1., 0.]) lstsq(A, y) A = np.asarray([ np.fromstring(&quot;&quot;&quot; 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.&quot;&quot;&quot;, sep=' '), np.fromstring(&quot;&quot;&quot;25. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0. -1. -2. -3. -4. -5. -6. -7. -8. -9. -10. -11. -12. -13. -14. -15. -16. -17. -18. -19. -20. -21. -22. -23. -24. -25.&quot;&quot;&quot;, sep=' ') ]) y = np.asarray([1., 0.]) lstsq(A, y)"><pre class="notranslate"><code class="notranslate">import numpy as np from scipy.linalg import lstsq A = np.asarray([ np.fromstring("""1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00 1.000e+00""", sep=' '), np.fromstring("""4.800e+01 4.700e+01 4.600e+01 4.500e+01 4.400e+01 4.300e+01 4.200e+01 4.100e+01 4.000e+01 3.900e+01 3.800e+01 3.700e+01 3.600e+01 3.500e+01 3.400e+01 3.300e+01 3.200e+01 3.100e+01 3.000e+01 2.900e+01 2.800e+01 2.700e+01 2.600e+01 2.500e+01 2.400e+01 2.300e+01 2.200e+01 2.100e+01 2.000e+01 1.900e+01 1.800e+01 1.700e+01 1.600e+01 1.500e+01 1.400e+01 1.300e+01 1.200e+01 1.100e+01 1.000e+01 9.000e+00 8.000e+00 7.000e+00 6.000e+00 5.000e+00 4.000e+00 3.000e+00 2.000e+00 1.000e+00 0.000e+00 -1.000e+00 -2.000e+00 -3.000e+00 -4.000e+00 -5.000e+00 -6.000e+00 -7.000e+00 -8.000e+00 -9.000e+00 -1.000e+01 -1.100e+01 -1.200e+01 -1.300e+01 -1.400e+01 -1.500e+01 -1.600e+01 -1.700e+01 -1.800e+01 -1.900e+01 -2.000e+01 -2.100e+01 -2.200e+01 -2.300e+01 -2.400e+01 -2.500e+01 -2.600e+01 -2.700e+01 -2.800e+01 -2.900e+01 -3.000e+01 -3.100e+01 -3.200e+01 -3.300e+01 -3.400e+01 -3.500e+01 -3.600e+01 -3.700e+01 -3.800e+01 -3.900e+01 -4.000e+01 -4.100e+01 -4.200e+01 -4.300e+01 -4.400e+01 -4.500e+01 -4.600e+01 -4.700e+01 -4.800e+01""", sep=' '), np.fromstring("""2.304e+03 2.209e+03 2.116e+03 2.025e+03 1.936e+03 1.849e+03 1.764e+03 1.681e+03 1.600e+03 1.521e+03 1.444e+03 1.369e+03 1.296e+03 1.225e+03 1.156e+03 1.089e+03 1.024e+03 9.610e+02 9.000e+02 8.410e+02 7.840e+02 7.290e+02 6.760e+02 6.250e+02 5.760e+02 5.290e+02 4.840e+02 4.410e+02 4.000e+02 3.610e+02 3.240e+02 2.890e+02 2.560e+02 2.250e+02 1.960e+02 1.690e+02 1.440e+02 1.210e+02 1.000e+02 8.100e+01 6.400e+01 4.900e+01 3.600e+01 2.500e+01 1.600e+01 9.000e+00 4.000e+00 1.000e+00 0.000e+00 1.000e+00 4.000e+00 9.000e+00 1.600e+01 2.500e+01 3.600e+01 4.900e+01 6.400e+01 8.100e+01 1.000e+02 1.210e+02 1.440e+02 1.690e+02 1.960e+02 2.250e+02 2.560e+02 2.890e+02 3.240e+02 3.610e+02 4.000e+02 4.410e+02 4.840e+02 5.290e+02 5.760e+02 6.250e+02 6.760e+02 7.290e+02 7.840e+02 8.410e+02 9.000e+02 9.610e+02 1.024e+03 1.089e+03 1.156e+03 1.225e+03 1.296e+03 1.369e+03 1.444e+03 1.521e+03 1.600e+03 1.681e+03 1.764e+03 1.849e+03 1.936e+03 2.025e+03 2.116e+03 2.209e+03 2.304e+03""", sep=' ') ]) y = np.asarray([1., 0., 0.]) lstsq(A, y) A = np.asarray([ np.fromstring(""" 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.""", sep=' '), np.fromstring("""25. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0. -1. -2. -3. -4. -5. -6. -7. -8. -9. -10. -11. -12. -13. -14. -15. -16. -17. -18. -19. -20. -21. -22. -23. -24. -25.""", sep=' ') ]) y = np.asarray([1., 0.]) lstsq(A, y) A = np.asarray([ np.fromstring(""" 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.""", sep=' '), np.fromstring(""" 25. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0. -1. -2. -3. -4. -5. -6. -7. -8. -9. -10. -11. -12. -13. -14. -15. -16. -17. -18. -19. -20. -21. -22. -23. -24. -25.""", sep=' ') ]) y = np.asarray([1., 0.]) lstsq(A, y) A = np.asarray([ np.fromstring(""" 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.""", sep=' '), np.fromstring("""25. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0. -1. -2. -3. -4. -5. -6. -7. -8. -9. -10. -11. -12. -13. -14. -15. -16. -17. -18. -19. -20. -21. -22. -23. -24. -25.""", sep=' ') ]) y = np.asarray([1., 0.]) lstsq(A, y) A = np.asarray([ np.fromstring(""" 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.""", sep=' '), np.fromstring("""25. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0. -1. -2. -3. -4. -5. -6. -7. -8. -9. -10. -11. -12. -13. -14. -15. -16. -17. -18. -19. -20. -21. -22. -23. -24. -25.""", sep=' ') ]) y = np.asarray([1., 0.]) lstsq(A, y) A = np.asarray([ np.fromstring(""" 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.""", sep=' '), np.fromstring("""25. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. 14. 13. 12. 11. 10. 9. 8. 7. 6. 5. 4. 3. 2. 1. 0. -1. -2. -3. -4. -5. -6. -7. -8. -9. -10. -11. -12. -13. -14. -15. -16. -17. -18. -19. -20. -21. -22. -23. -24. -25.""", sep=' ') ]) y = np.asarray([1., 0.]) lstsq(A, y) </code></pre></div>
<p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/opoplawski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/opoplawski">@opoplawski</a>: With Fedora Rawhide (but not Fedora 19) I'm seeing:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: test_fitpack.TestSplder.test_kink ---------------------------------------------------------------------- Traceback (most recent call last): File &quot;/usr/lib/python2.7/site-packages/nose/case.py&quot;, line 197, in runTest self.test(*self.arg) File &quot;/builddir/build/BUILDROOT/scipy-0.13.0-0.1.b1.fc21.x86_64/usr/lib64/python2.7/site-packages/scipy/interpolate/tests/test_fitpack.py&quot;, line 326, in test_kink splder(spl2, 2) # Should work File &quot;/builddir/build/BUILDROOT/scipy-0.13.0-0.1.b1.fc21.x86_64/usr/lib64/python2.7/site-packages/scipy/interpolate/fitpack.py&quot;, line 1186, in splder &quot;and is not differentiable %d times&quot;) % n) ValueError: The spline has internal repeated knots and is not differentiable 2 times"><pre class="notranslate"><code class="notranslate">ERROR: test_fitpack.TestSplder.test_kink ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/builddir/build/BUILDROOT/scipy-0.13.0-0.1.b1.fc21.x86_64/usr/lib64/python2.7/site-packages/scipy/interpolate/tests/test_fitpack.py", line 326, in test_kink splder(spl2, 2) # Should work File "/builddir/build/BUILDROOT/scipy-0.13.0-0.1.b1.fc21.x86_64/usr/lib64/python2.7/site-packages/scipy/interpolate/fitpack.py", line 1186, in splder "and is not differentiable %d times") % n) ValueError: The spline has internal repeated knots and is not differentiable 2 times </code></pre></div> <p dir="auto">and the same with python3.</p>
0
<p dir="auto">As you can see the CI was passing correctly before.</p> <p dir="auto"><a href="https://github.com/UltiRequiem/eloquent-javascript/commits/main">https://github.com/UltiRequiem/eloquent-javascript/commits/main</a></p> <p dir="auto">But since <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/UltiRequiem/eloquent-javascript/commit/a5f766e32333a6a7258d3a6d68717c03064acbc4/hovercard" href="https://github.com/UltiRequiem/eloquent-javascript/commit/a5f766e32333a6a7258d3a6d68717c03064acbc4">UltiRequiem/eloquent-javascript@<tt>a5f766e</tt></a></p> <p dir="auto">While creating code coverage I'm getting this errors:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno test --coverage=./cov"><pre class="notranslate">deno <span class="pl-c1">test</span> --coverage=./cov</pre></div> <blockquote> <p dir="auto">This step works as expected</p> </blockquote> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno coverage --unstable --lcov ./cov &gt; cov.lcov"><pre class="notranslate">deno coverage --unstable --lcov ./cov <span class="pl-k">&gt;</span> cov.lcov</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="============================================================ Deno has panicked. This is a bug in Deno. Please report this at https://github.com/denoland/deno/issues/new. If you can reliably reproduce this panic, include the reproduction steps and re-run with the RUST_BACKTRACE=1 env var set and include the backtrace in your report. Platform: linux x8[6](https://github.com/UltiRequiem/eloquent-javascript/runs/6168539434?check_suite_focus=true#step:8:6)_64 Version: 1.21.0 Args: [&quot;deno&quot;, &quot;coverage&quot;, &quot;--unstable&quot;, &quot;--lcov&quot;, &quot;./cov&quot;] thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BadJson(Error(&quot;invalid unicode code point&quot;, line: 1, column: 2043))', cli/tools/coverage/mod.rs:1[7](https://github.com/UltiRequiem/eloquent-javascript/runs/6168539434?check_suite_focus=true#step:8:7)5:57 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace"><pre class="notranslate"><code class="notranslate">============================================================ Deno has panicked. This is a bug in Deno. Please report this at https://github.com/denoland/deno/issues/new. If you can reliably reproduce this panic, include the reproduction steps and re-run with the RUST_BACKTRACE=1 env var set and include the backtrace in your report. Platform: linux x8[6](https://github.com/UltiRequiem/eloquent-javascript/runs/6168539434?check_suite_focus=true#step:8:6)_64 Version: 1.21.0 Args: ["deno", "coverage", "--unstable", "--lcov", "./cov"] thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BadJson(Error("invalid unicode code point", line: 1, column: 2043))', cli/tools/coverage/mod.rs:1[7](https://github.com/UltiRequiem/eloquent-javascript/runs/6168539434?check_suite_focus=true#step:8:7)5:57 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace </code></pre></div> <p dir="auto">But as far I can see on <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/UltiRequiem/eloquent-javascript/commit/a5f766e32333a6a7258d3a6d68717c03064acbc4/hovercard" href="https://github.com/UltiRequiem/eloquent-javascript/commit/a5f766e32333a6a7258d3a6d68717c03064acbc4">UltiRequiem/eloquent-javascript@<tt>a5f766e</tt></a> there isn't any invalid unicode?</p> <p dir="auto">You can see it here too 👇🏽<br> <a href="https://github.com/UltiRequiem/eloquent-javascript/runs/6168539434?check_suite_focus=true">https://github.com/UltiRequiem/eloquent-javascript/runs/6168539434?check_suite_focus=true</a></p>
<p dir="auto">Hi, I am having an issue where the output of <code class="notranslate">deno coverage</code> appears inaccurate. I was able to narrow it down to a minimal example; instructions below. I hope it is reproducible. The problem goes away if the emojis or the unused function <code class="notranslate">h</code> are removed. Removing a single emoji removes line 2 from the coverage report, but still inaccurately keeps line 3. I have not tested it with other emojis <g-emoji class="g-emoji" alias="relaxed" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/263a.png">☺️</g-emoji></p> <p dir="auto">This is the <code class="notranslate">mod.ts</code> file:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default function () { return &quot;📣❓&quot;; } function h() {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"📣❓"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-en">h</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 is the <code class="notranslate">mod_test.ts</code> file:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import f from &quot;./mod.ts&quot;; Deno.test(&quot;test&quot;, () =&gt; { f() });"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">f</span> <span class="pl-k">from</span> <span class="pl-s">"./mod.ts"</span><span class="pl-kos">;</span> <span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</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-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">f</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">These are the shell commands:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno test --coverage=.cov deno coverage .cov rm -rf .cov"><pre class="notranslate">deno <span class="pl-c1">test</span> --coverage=.cov deno coverage .cov rm -rf .cov</pre></div> <p dir="auto">This is the output of <code class="notranslate">deno coverage</code>. As far as I understand it, line 2 and 3 should be covered:</p> <div class="highlight highlight-text-adblock notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" cover file:///home/mod.ts ... 25.000% (1/4) 2 | return &quot;📣❓&quot;; 3 | } -----|----- 5 | function h() {}"><pre class="notranslate"> cover file:///home/mod.ts ... 25.000% (1/4) 2 | return "📣❓"; 3 | } -----|----- 5 | function h() {}</pre></div> <p dir="auto">This is the output of <code class="notranslate">deno --version</code>:</p> <div class="highlight highlight-text-adblock notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno 1.11.0 (release, x86_64-unknown-linux-gnu) v8 9.1.269.35 typescript 4.3.2"><pre class="notranslate">deno 1.11.0 (release, x86_64-unknown-linux-gnu) v8 9.1.269.35 typescript 4.3.2</pre></div>
1
<p dir="auto"><strong>Glide Version</strong>: 3.8.0-SNAPSHOT</p> <p dir="auto"><strong>Device/Android Version</strong>: Nexus 5, 5.0.1</p> <p dir="auto">I'm using a <code class="notranslate">PaletteBitmapTranscoder</code> to generate a palette, as demonstrated in the <a href="https://github.com/bumptech/glide/wiki/Custom-targets#palette-example">Custom targets</a> section of the Glide wiki.</p> <p dir="auto">However, when using <code class="notranslate">.thumbnail()</code> in cases where the thumbnail request finishes after the full request, it ends up using the palette that was generated for the thumbnail instead of the full image.</p> <p dir="auto">Since <code class="notranslate">Palette</code> generates very different color swatches as an image is resized, this can affect the results.</p> <p dir="auto">In my test, the thumbnail palette always gets used the first time the image is loaded, but the full image's palette is used for all subsequent loads. (I think that if the full request is in the cache, the thumbnail does not get generated?)</p> <p dir="auto">Is there a way to prevent transcoding of the thumbnail when using a transcoder for the full image request?</p> <p dir="auto">I've tried changing the order of where <code class="notranslate">.thumbnail()</code> is called when building the request, but didn't have any luck with that approach. Most of those attempts wouldn't compile because of type incompatibility, e.g. not having a compatible <code class="notranslate">TranscodeType</code> with the full request.</p> <p dir="auto">I also tried using an explicit thumbnail request with its own settings but that didn't work; the full request's resource transcoder still gets called for the thumbnail. Giving the thumbnail its own <code class="notranslate">PalletteBitmapNullTranscoder</code> that doesn't generate a palette didn't work either; it just resulted in additional <code class="notranslate">transcode()</code> calls (and additional <code class="notranslate">DecodeJobs</code> in the log output). The additional <code class="notranslate">transcode()</code> calls did what I wanted (namely, not generating a palette) but it didn't replace the original thumbnail <code class="notranslate">transcode()</code> call that I was trying to override.</p> <p dir="auto">At this point I've disabled thumbnail generation when using a PaletteBitmapTranscoder, but I'm still new to Glide so I wonder if there might be something obvious that I might be missing.</p> <p dir="auto">For instance, is there any way to create a thumbnail request that uses a different <code class="notranslate">TranscodeType</code>, or a different <code class="notranslate">ModelType</code> for that matter?</p> <p dir="auto">Or is there some way within a <code class="notranslate">ResourceTranscoder</code> to know whether <code class="notranslate">transcode()</code> is being called for the full request or the thumbnail request?</p>
<p dir="auto"><strong>Glide Version</strong>: glide:4.3.1</p> <p dir="auto"><strong>Integration libraries</strong>: okhttp3-integration:4.3.1</p> <p dir="auto"><strong>Device/Android Version</strong>: Various, reported from field. Stacktrace comes from Samsung Galaxy S5 (klteatt) Android 6.0</p> <p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:<br> The exception text is misleading as the problem is not occuring in my AppGlideModule implementation.</p> <p dir="auto">This is difficult to reproduce as it appears to be a timing issue. I'm getting several reports of crashes and the location varies. Possibly related to Kotlin coroutines, but this did not occur on Glide pre 4.0. The stacktrace indicates this is not inside a Kotlin coroutine.</p> <p dir="auto">I've tried adding a "dummy" Glide request of Uri.Empty at the beginning of onCreate() to init Glide, but this hasn't helped.</p> <div class="highlight highlight-source-kotlin notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" // force glide initialization try { if (!glideInitialized.getAndSet(true)) { debug { LOG.log(LogLevel.ERROR, &quot;Initialize Glide&quot;) } Glide.with(this).load(Uri.EMPTY).submit(10, 10) } } catch (e: Exception) { debug { LOG.caught(LogLevel.ERROR, e) } }"><pre class="notranslate"> <span class="pl-c"><span class="pl-c">//</span> force glide initialization</span> <span class="pl-k">try</span> { <span class="pl-k">if</span> (<span class="pl-k">!</span>glideInitialized.getAndSet(<span class="pl-c1">true</span>)) { debug { <span class="pl-en">LOG</span>.log(<span class="pl-en">LogLevel</span>.<span class="pl-en">ERROR</span>, <span class="pl-s"><span class="pl-pds">"</span>Initialize Glide<span class="pl-pds">"</span></span>) } <span class="pl-en">Glide</span>.<span class="pl-c1">with</span>(<span class="pl-c1">this</span>).load(<span class="pl-en">Uri</span>.<span class="pl-en">EMPTY</span>).submit(<span class="pl-c1">10</span>, <span class="pl-c1">10</span>) } } <span class="pl-k">catch</span> (e<span class="pl-k">:</span> <span class="pl-en">Exception</span>) { debug { <span class="pl-en">LOG</span>.caught(<span class="pl-en">LogLevel</span>.<span class="pl-en">ERROR</span>, e) } }</pre></div> <p dir="auto">Can I force Glide init in some other manner? While I appreciate lazy loading resources I may never use, my app will use Glide and my loaders when my first activity starts and I'm looking for a workaround. The code snippet is related to the included stack trace, however the problem occurs at many different Glide.with() invocations randomly. After a Glide.with() executes without error, the issue does not reoccur.</p> <div class="highlight highlight-source-kotlin notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" override fun onBindViewHolder(holder: ViewHolder, position: Int) { val image = imageList[position] val uri = Uri.parse(image.text) val options = RequestOptions() .diskCacheStrategy(DiskCacheStrategy.DATA) if (LastFm.IMAGE_SIZE_MEGA == image.size) { options.override(OVERRIDE_SIZE, OVERRIDE_SIZE) .fitCenter() } Glide.with(activity) .asBitmap() .load(uri) .apply(options) .listener(object : RequestListener&lt;Bitmap&gt; { override fun onResourceReady(p0: Bitmap?, p1: Any?, p2: Target&lt;Bitmap&gt;?, p3: DataSource?, p4: Boolean): Boolean { holder.progressBar.visibility = View.GONE return false } override fun onLoadFailed(p0: GlideException?, p1: Any?, p2: Target&lt;Bitmap&gt;?, p3: Boolean): Boolean { holder.progressBar.visibility = View.GONE return false } }) .into(holder.albumArtView)"><pre class="notranslate"> <span class="pl-k">override</span> <span class="pl-k">fun</span> <span class="pl-en">onBindViewHolder</span>(<span class="pl-smi">holder</span><span class="pl-k">:</span> <span class="pl-en">ViewHolder</span>, <span class="pl-smi">position</span><span class="pl-k">:</span> <span class="pl-c1">Int</span>) { <span class="pl-k">val</span> image <span class="pl-k">=</span> imageList[position] <span class="pl-k">val</span> uri <span class="pl-k">=</span> <span class="pl-en">Uri</span>.parse(image.text) <span class="pl-k">val</span> options <span class="pl-k">=</span> <span class="pl-en">RequestOptions</span>() .diskCacheStrategy(<span class="pl-en">DiskCacheStrategy</span>.<span class="pl-en">DATA</span>) <span class="pl-k">if</span> (<span class="pl-en">LastFm</span>.<span class="pl-en">IMAGE_SIZE_MEGA</span> <span class="pl-k">==</span> image.size) { options.<span class="pl-k">override</span>(<span class="pl-en">OVERRIDE_SIZE</span>, <span class="pl-en">OVERRIDE_SIZE</span>) .fitCenter() } <span class="pl-en">Glide</span>.<span class="pl-c1">with</span>(activity) .asBitmap() .load(uri) .<span class="pl-c1">apply</span>(options) .listener(<span class="pl-k">object</span> <span class="pl-k">:</span> <span class="pl-en">RequestListener</span>&lt;<span class="pl-en">Bitmap</span>&gt; { <span class="pl-k">override</span> <span class="pl-k">fun</span> <span class="pl-en">onResourceReady</span>(<span class="pl-smi">p0</span><span class="pl-k">:</span> <span class="pl-en">Bitmap</span><span class="pl-k">?</span>, <span class="pl-smi">p1</span><span class="pl-k">:</span> <span class="pl-c1">Any?</span>, <span class="pl-smi">p2</span><span class="pl-k">:</span> <span class="pl-en">Target</span>&lt;<span class="pl-en">Bitmap</span>&gt;<span class="pl-k">?</span>, <span class="pl-smi">p3</span><span class="pl-k">:</span> <span class="pl-en">DataSource</span><span class="pl-k">?</span>, <span class="pl-smi">p4</span><span class="pl-k">:</span> <span class="pl-c1">Boolean</span>): <span class="pl-c1">Boolean</span> { holder.progressBar.visibility <span class="pl-k">=</span> <span class="pl-en">View</span>.<span class="pl-en">GONE</span> <span class="pl-k">return</span> <span class="pl-c1">false</span> } <span class="pl-k">override</span> <span class="pl-k">fun</span> <span class="pl-en">onLoadFailed</span>(<span class="pl-smi">p0</span><span class="pl-k">:</span> <span class="pl-en">GlideException</span><span class="pl-k">?</span>, <span class="pl-smi">p1</span><span class="pl-k">:</span> <span class="pl-c1">Any?</span>, <span class="pl-smi">p2</span><span class="pl-k">:</span> <span class="pl-en">Target</span>&lt;<span class="pl-en">Bitmap</span>&gt;<span class="pl-k">?</span>, <span class="pl-smi">p3</span><span class="pl-k">:</span> <span class="pl-c1">Boolean</span>): <span class="pl-c1">Boolean</span> { holder.progressBar.visibility <span class="pl-k">=</span> <span class="pl-en">View</span>.<span class="pl-en">GONE</span> <span class="pl-k">return</span> <span class="pl-c1">false</span> } }) .into(holder.albumArtView)</pre></div> <p dir="auto"><strong>Layout XML</strong>:</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot; xmlns:tools=&quot;http://schemas.android.com/tools&quot; android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;match_parent&quot; android:padding=&quot;8dp&quot; &gt; &lt;android.support.v7.widget.CardView android:id=&quot;@+id/album_art_card&quot; android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;match_parent&quot; android:background=&quot;?attr/ap_secondaryBackground&quot; &gt; &lt;RelativeLayout android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;match_parent&quot; &gt; &lt;fr.castorflex.android.circularprogressbar.CircularProgressBar android:id=&quot;@+id/last_art_card_progress&quot; android:layout_width=&quot;40dp&quot; android:layout_height=&quot;40dp&quot; android:layout_centerInParent=&quot;true&quot; android:indeterminate=&quot;true&quot; app:cpb_color=&quot;?attr/ap_secondaryBackground&quot; app:cpb_colors=&quot;@array/gplus_colors&quot; app:cpb_rotation_speed=&quot;1.0&quot; app:cpb_sweep_speed=&quot;1.0&quot; app:cpb_stroke_width=&quot;4dp&quot; app:cpb_min_sweep_angle=&quot;10&quot; app:cpb_max_sweep_angle=&quot;300&quot; /&gt; &lt;ImageView android:id=&quot;@+id/album_art_image&quot; android:layout_width=&quot;156dp&quot; android:layout_height=&quot;156dp&quot; android:layout_alignParentTop=&quot;true&quot; android:layout_marginBottom=&quot;6dp&quot; android:layout_centerHorizontal=&quot;true&quot; tools:ignore=&quot;ContentDescription&quot; /&gt; &lt;TextView android:id=&quot;@+id/album_art_description&quot; android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;wrap_content&quot; android:layout_below=&quot;@+id/album_art_image&quot; android:gravity=&quot;center_horizontal&quot; android:textSize=&quot;18sp&quot; /&gt; &lt;/RelativeLayout&gt; &lt;/android.support.v7.widget.CardView&gt; &lt;/LinearLayout&gt; "><pre class="notranslate">&lt;?<span class="pl-ent">xml</span><span class="pl-e"> version</span>=<span class="pl-s"><span class="pl-pds">"</span>1.0<span class="pl-pds">"</span></span><span class="pl-e"> encoding</span>=<span class="pl-s"><span class="pl-pds">"</span>utf-8<span class="pl-pds">"</span></span>?&gt; &lt;<span class="pl-ent">LinearLayout</span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">android</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res/android<span class="pl-pds">"</span></span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">app</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res-auto<span class="pl-pds">"</span></span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">tools</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/tools<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">padding</span>=<span class="pl-s"><span class="pl-pds">"</span>8dp<span class="pl-pds">"</span></span> &gt; &lt;<span class="pl-ent">android</span>.support.v7.widget.CardView <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/album_art_card<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">background</span>=<span class="pl-s"><span class="pl-pds">"</span>?attr/ap_secondaryBackground<span class="pl-pds">"</span></span> &gt; &lt;<span class="pl-ent">RelativeLayout</span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span> &gt; &lt;<span class="pl-ent">fr</span>.castorflex.android.circularprogressbar.CircularProgressBar <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/last_art_card_progress<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>40dp<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>40dp<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_centerInParent</span>=<span class="pl-s"><span class="pl-pds">"</span>true<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">indeterminate</span>=<span class="pl-s"><span class="pl-pds">"</span>true<span class="pl-pds">"</span></span> <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">cpb_color</span>=<span class="pl-s"><span class="pl-pds">"</span>?attr/ap_secondaryBackground<span class="pl-pds">"</span></span> <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">cpb_colors</span>=<span class="pl-s"><span class="pl-pds">"</span>@array/gplus_colors<span class="pl-pds">"</span></span> <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">cpb_rotation_speed</span>=<span class="pl-s"><span class="pl-pds">"</span>1.0<span class="pl-pds">"</span></span> <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">cpb_sweep_speed</span>=<span class="pl-s"><span class="pl-pds">"</span>1.0<span class="pl-pds">"</span></span> <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">cpb_stroke_width</span>=<span class="pl-s"><span class="pl-pds">"</span>4dp<span class="pl-pds">"</span></span> <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">cpb_min_sweep_angle</span>=<span class="pl-s"><span class="pl-pds">"</span>10<span class="pl-pds">"</span></span> <span class="pl-e">app</span><span class="pl-e">:</span><span class="pl-e">cpb_max_sweep_angle</span>=<span class="pl-s"><span class="pl-pds">"</span>300<span class="pl-pds">"</span></span> /&gt; &lt;<span class="pl-ent">ImageView</span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/album_art_image<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>156dp<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>156dp<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_alignParentTop</span>=<span class="pl-s"><span class="pl-pds">"</span>true<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_marginBottom</span>=<span class="pl-s"><span class="pl-pds">"</span>6dp<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_centerHorizontal</span>=<span class="pl-s"><span class="pl-pds">"</span>true<span class="pl-pds">"</span></span> <span class="pl-e">tools</span><span class="pl-e">:</span><span class="pl-e">ignore</span>=<span class="pl-s"><span class="pl-pds">"</span>ContentDescription<span class="pl-pds">"</span></span> /&gt; &lt;<span class="pl-ent">TextView</span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/album_art_description<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>wrap_content<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_below</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/album_art_image<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">gravity</span>=<span class="pl-s"><span class="pl-pds">"</span>center_horizontal<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">textSize</span>=<span class="pl-s"><span class="pl-pds">"</span>18sp<span class="pl-pds">"</span></span> /&gt; &lt;/<span class="pl-ent">RelativeLayout</span>&gt; &lt;/<span class="pl-ent">android</span>.support.v7.widget.CardView&gt; &lt;/<span class="pl-ent">LinearLayout</span>&gt; </pre></div> <p dir="auto"><strong>Stack trace / LogCat</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IllegalStateException: at com.bumptech.glide.Glide.checkAndInitializeGlide (Glide.java:172) at com.bumptech.glide.Glide.get (Glide.java:160) at com.bumptech.glide.Glide.getRetriever (Glide.java:583) at com.bumptech.glide.Glide.with (Glide.java:620) at com.ealva.alvaplayer.ui.image.LastFmImageAdapter.onBindViewHolder (LastFmImageAdapter.java:83) at com.ealva.alvaplayer.ui.image.LastFmImageAdapter.onBindViewHolder (LastFmImageAdapter.java:48) at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder (RecyclerView.java:6508) at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder (RecyclerView.java:6541) at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline (RecyclerView.java:5484) at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline (RecyclerView.java:5750) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition (RecyclerView.java:5589) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition (RecyclerView.java:5585) at android.support.v7.widget.LinearLayoutManager$LayoutState.next (LinearLayoutManager.java:2231) at android.support.v7.widget.GridLayoutManager.layoutChunk (GridLayoutManager.java:556) at android.support.v7.widget.LinearLayoutManager.fill (LinearLayoutManager.java:1518) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren (LinearLayoutManager.java:610) at android.support.v7.widget.GridLayoutManager.onLayoutChildren (GridLayoutManager.java:170) at android.support.v7.widget.RecyclerView.dispatchLayoutStep2 (RecyclerView.java:3719) at android.support.v7.widget.RecyclerView.dispatchLayout (RecyclerView.java:3436) at android.support.v7.widget.RecyclerView.onLayout (RecyclerView.java:3988) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.RelativeLayout.onLayout (RelativeLayout.java:1080) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.support.design.widget.CoordinatorLayout.layoutChild (CoordinatorLayout.java:1171) at android.support.design.widget.CoordinatorLayout.onLayoutChild (CoordinatorLayout.java:856) at android.support.design.widget.CoordinatorLayout.onLayout (CoordinatorLayout.java:875) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.support.v4.widget.DrawerLayout.onLayout (DrawerLayout.java:1172) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.FrameLayout.layoutChildren (FrameLayout.java:344) at android.widget.FrameLayout.onLayout (FrameLayout.java:281) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1742) at android.widget.LinearLayout.layoutVertical (LinearLayout.java:1585) at android.widget.LinearLayout.onLayout (LinearLayout.java:1494) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.FrameLayout.layoutChildren (FrameLayout.java:344) at android.widget.FrameLayout.onLayout (FrameLayout.java:281) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1742) at android.widget.LinearLayout.layoutVertical (LinearLayout.java:1585) at android.widget.LinearLayout.onLayout (LinearLayout.java:1494) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.FrameLayout.layoutChildren (FrameLayout.java:344) at android.widget.FrameLayout.onLayout (FrameLayout.java:281) at com.android.internal.policy.PhoneWindow$DecorView.onLayout (PhoneWindow.java:3193) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.view.ViewRootImpl.performLayout (ViewRootImpl.java:2717) at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2418) at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1488) at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7451) at android.view.Choreographer$CallbackRecord.run (Choreographer.java:920) at android.view.Choreographer.doCallbacks (Choreographer.java:695) at android.view.Choreographer.doFrame (Choreographer.java:631) at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:906) at android.os.Handler.handleCallback (Handler.java:739) at android.os.Handler.dispatchMessage (Handler.java:95) at android.os.Looper.loop (Looper.java:158) at android.app.ActivityThread.main (ActivityThread.java:7224) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)"><pre class="notranslate"><code class="notranslate">java.lang.IllegalStateException: at com.bumptech.glide.Glide.checkAndInitializeGlide (Glide.java:172) at com.bumptech.glide.Glide.get (Glide.java:160) at com.bumptech.glide.Glide.getRetriever (Glide.java:583) at com.bumptech.glide.Glide.with (Glide.java:620) at com.ealva.alvaplayer.ui.image.LastFmImageAdapter.onBindViewHolder (LastFmImageAdapter.java:83) at com.ealva.alvaplayer.ui.image.LastFmImageAdapter.onBindViewHolder (LastFmImageAdapter.java:48) at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder (RecyclerView.java:6508) at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder (RecyclerView.java:6541) at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline (RecyclerView.java:5484) at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline (RecyclerView.java:5750) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition (RecyclerView.java:5589) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition (RecyclerView.java:5585) at android.support.v7.widget.LinearLayoutManager$LayoutState.next (LinearLayoutManager.java:2231) at android.support.v7.widget.GridLayoutManager.layoutChunk (GridLayoutManager.java:556) at android.support.v7.widget.LinearLayoutManager.fill (LinearLayoutManager.java:1518) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren (LinearLayoutManager.java:610) at android.support.v7.widget.GridLayoutManager.onLayoutChildren (GridLayoutManager.java:170) at android.support.v7.widget.RecyclerView.dispatchLayoutStep2 (RecyclerView.java:3719) at android.support.v7.widget.RecyclerView.dispatchLayout (RecyclerView.java:3436) at android.support.v7.widget.RecyclerView.onLayout (RecyclerView.java:3988) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.RelativeLayout.onLayout (RelativeLayout.java:1080) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.support.design.widget.CoordinatorLayout.layoutChild (CoordinatorLayout.java:1171) at android.support.design.widget.CoordinatorLayout.onLayoutChild (CoordinatorLayout.java:856) at android.support.design.widget.CoordinatorLayout.onLayout (CoordinatorLayout.java:875) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.support.v4.widget.DrawerLayout.onLayout (DrawerLayout.java:1172) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.FrameLayout.layoutChildren (FrameLayout.java:344) at android.widget.FrameLayout.onLayout (FrameLayout.java:281) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1742) at android.widget.LinearLayout.layoutVertical (LinearLayout.java:1585) at android.widget.LinearLayout.onLayout (LinearLayout.java:1494) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.FrameLayout.layoutChildren (FrameLayout.java:344) at android.widget.FrameLayout.onLayout (FrameLayout.java:281) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.LinearLayout.setChildFrame (LinearLayout.java:1742) at android.widget.LinearLayout.layoutVertical (LinearLayout.java:1585) at android.widget.LinearLayout.onLayout (LinearLayout.java:1494) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.widget.FrameLayout.layoutChildren (FrameLayout.java:344) at android.widget.FrameLayout.onLayout (FrameLayout.java:281) at com.android.internal.policy.PhoneWindow$DecorView.onLayout (PhoneWindow.java:3193) at android.view.View.layout (View.java:17945) at android.view.ViewGroup.layout (ViewGroup.java:5814) at android.view.ViewRootImpl.performLayout (ViewRootImpl.java:2717) at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2418) at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1488) at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7451) at android.view.Choreographer$CallbackRecord.run (Choreographer.java:920) at android.view.Choreographer.doCallbacks (Choreographer.java:695) at android.view.Choreographer.doFrame (Choreographer.java:631) at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:906) at android.os.Handler.handleCallback (Handler.java:739) at android.os.Handler.dispatchMessage (Handler.java:95) at android.os.Looper.loop (Looper.java:158) at android.app.ActivityThread.main (ActivityThread.java:7224) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120) </code></pre></div>
0
<p dir="auto">(Just logging the issue -- I haven't investigated if it's only about <code class="notranslate">custom_settings</code>)</p> <p dir="auto">To reproduce, start a project using the basic template (which create a <code class="notranslate">settings.py</code> with <code class="notranslate">ROBOTSTXT_OBEY=True</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ scrapy version -v Scrapy : 1.1.2 lxml : 3.6.3.0 libxml2 : 2.9.4 Twisted : 16.3.2 Python : 3.5.1+ (default, Mar 30 2016, 22:46:26) - [GCC 5.3.1 20160330] pyOpenSSL : 16.0.0 (OpenSSL 1.0.2g-fips 1 Mar 2016) Platform : Linux-4.4.0-34-generic-x86_64-with-Ubuntu-16.04-xenial $ scrapy startproject overriddensettings You can start your first spider with: cd overriddensettings scrapy genspider example example.com $ cd overriddensettings/ /overriddensettings$ scrapy genspider example example.com Created spider 'example' using template 'basic' in module: overriddensettings.spiders.example $ cat overriddensettings/settings.py |grep ROBOTS ROBOTSTXT_OBEY = True"><pre class="notranslate"><code class="notranslate">$ scrapy version -v Scrapy : 1.1.2 lxml : 3.6.3.0 libxml2 : 2.9.4 Twisted : 16.3.2 Python : 3.5.1+ (default, Mar 30 2016, 22:46:26) - [GCC 5.3.1 20160330] pyOpenSSL : 16.0.0 (OpenSSL 1.0.2g-fips 1 Mar 2016) Platform : Linux-4.4.0-34-generic-x86_64-with-Ubuntu-16.04-xenial $ scrapy startproject overriddensettings You can start your first spider with: cd overriddensettings scrapy genspider example example.com $ cd overriddensettings/ /overriddensettings$ scrapy genspider example example.com Created spider 'example' using template 'basic' in module: overriddensettings.spiders.example $ cat overriddensettings/settings.py |grep ROBOTS ROBOTSTXT_OBEY = True </code></pre></div> <p dir="auto">Then, set <code class="notranslate">ROBOTSTXT_OBEY</code> to <code class="notranslate">False</code> in the spider's custom settings</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat overriddensettings/spiders/example.py # -*- coding: utf-8 -*- import scrapy class ExampleSpider(scrapy.Spider): name = &quot;example&quot; allowed_domains = [&quot;example.com&quot;] start_urls = ( 'http://www.example.com/', ) custom_settings = {'ROBOTSTXT_OBEY': False} def parse(self, response): pass"><pre class="notranslate"><code class="notranslate">$ cat overriddensettings/spiders/example.py # -*- coding: utf-8 -*- import scrapy class ExampleSpider(scrapy.Spider): name = "example" allowed_domains = ["example.com"] start_urls = ( 'http://www.example.com/', ) custom_settings = {'ROBOTSTXT_OBEY': False} def parse(self, response): pass </code></pre></div> <p dir="auto">The console logs show <code class="notranslate">'ROBOTSTXT_OBEY': True</code> in overridden settings, while it's in fact <code class="notranslate">False</code> in this test spider</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ scrapy crawl example 2016-08-26 14:49:43 [scrapy] INFO: Scrapy 1.1.2 started (bot: overriddensettings) 2016-08-26 14:49:43 [scrapy] INFO: Overridden settings: {'BOT_NAME': 'overriddensettings', 'SPIDER_MODULES': ['overriddensettings.spiders'], 'NEWSPIDER_MODULE': 'overriddensettings.spiders', 'ROBOTSTXT_OBEY': True} 2016-08-26 14:49:43 [scrapy] INFO: Enabled extensions: ['scrapy.extensions.corestats.CoreStats', 'scrapy.extensions.logstats.LogStats'] 2016-08-26 14:49:43 [scrapy] INFO: Enabled downloader middlewares: ['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware', 'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware', 'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware', 'scrapy.downloadermiddlewares.retry.RetryMiddleware', 'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware', 'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware', 'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware', 'scrapy.downloadermiddlewares.redirect.RedirectMiddleware', 'scrapy.downloadermiddlewares.cookies.CookiesMiddleware', 'scrapy.downloadermiddlewares.chunked.ChunkedTransferMiddleware', 'scrapy.downloadermiddlewares.stats.DownloaderStats'] 2016-08-26 14:49:43 [scrapy] INFO: Enabled spider middlewares: ['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware', 'scrapy.spidermiddlewares.offsite.OffsiteMiddleware', 'scrapy.spidermiddlewares.referer.RefererMiddleware', 'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware', 'scrapy.spidermiddlewares.depth.DepthMiddleware'] 2016-08-26 14:49:43 [scrapy] INFO: Enabled item pipelines: [] 2016-08-26 14:49:43 [scrapy] INFO: Spider opened 2016-08-26 14:49:43 [scrapy] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min) 2016-08-26 14:49:43 [scrapy] DEBUG: Crawled (200) &lt;GET http://www.example.com/&gt; (referer: None) 2016-08-26 14:49:44 [scrapy] INFO: Closing spider (finished) 2016-08-26 14:49:44 [scrapy] INFO: Dumping Scrapy stats: {'downloader/request_bytes': 213, 'downloader/request_count': 1, 'downloader/request_method_count/GET': 1, 'downloader/response_bytes': 952, 'downloader/response_count': 1, 'downloader/response_status_count/200': 1, 'finish_reason': 'finished', 'finish_time': datetime.datetime(2016, 8, 26, 12, 49, 44, 49575), 'log_count/DEBUG': 1, 'log_count/INFO': 7, 'response_received_count': 1, 'scheduler/dequeued': 1, 'scheduler/dequeued/memory': 1, 'scheduler/enqueued': 1, 'scheduler/enqueued/memory': 1, 'start_time': datetime.datetime(2016, 8, 26, 12, 49, 43, 655150)} "><pre class="notranslate"><code class="notranslate">$ scrapy crawl example 2016-08-26 14:49:43 [scrapy] INFO: Scrapy 1.1.2 started (bot: overriddensettings) 2016-08-26 14:49:43 [scrapy] INFO: Overridden settings: {'BOT_NAME': 'overriddensettings', 'SPIDER_MODULES': ['overriddensettings.spiders'], 'NEWSPIDER_MODULE': 'overriddensettings.spiders', 'ROBOTSTXT_OBEY': True} 2016-08-26 14:49:43 [scrapy] INFO: Enabled extensions: ['scrapy.extensions.corestats.CoreStats', 'scrapy.extensions.logstats.LogStats'] 2016-08-26 14:49:43 [scrapy] INFO: Enabled downloader middlewares: ['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware', 'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware', 'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware', 'scrapy.downloadermiddlewares.retry.RetryMiddleware', 'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware', 'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware', 'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware', 'scrapy.downloadermiddlewares.redirect.RedirectMiddleware', 'scrapy.downloadermiddlewares.cookies.CookiesMiddleware', 'scrapy.downloadermiddlewares.chunked.ChunkedTransferMiddleware', 'scrapy.downloadermiddlewares.stats.DownloaderStats'] 2016-08-26 14:49:43 [scrapy] INFO: Enabled spider middlewares: ['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware', 'scrapy.spidermiddlewares.offsite.OffsiteMiddleware', 'scrapy.spidermiddlewares.referer.RefererMiddleware', 'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware', 'scrapy.spidermiddlewares.depth.DepthMiddleware'] 2016-08-26 14:49:43 [scrapy] INFO: Enabled item pipelines: [] 2016-08-26 14:49:43 [scrapy] INFO: Spider opened 2016-08-26 14:49:43 [scrapy] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min) 2016-08-26 14:49:43 [scrapy] DEBUG: Crawled (200) &lt;GET http://www.example.com/&gt; (referer: None) 2016-08-26 14:49:44 [scrapy] INFO: Closing spider (finished) 2016-08-26 14:49:44 [scrapy] INFO: Dumping Scrapy stats: {'downloader/request_bytes': 213, 'downloader/request_count': 1, 'downloader/request_method_count/GET': 1, 'downloader/response_bytes': 952, 'downloader/response_count': 1, 'downloader/response_status_count/200': 1, 'finish_reason': 'finished', 'finish_time': datetime.datetime(2016, 8, 26, 12, 49, 44, 49575), 'log_count/DEBUG': 1, 'log_count/INFO': 7, 'response_received_count': 1, 'scheduler/dequeued': 1, 'scheduler/dequeued/memory': 1, 'scheduler/enqueued': 1, 'scheduler/enqueued/memory': 1, 'start_time': datetime.datetime(2016, 8, 26, 12, 49, 43, 655150)} </code></pre></div>
<p dir="auto">How do I nest loaders into each parse function so that it returns everything from each method in a unique format? When I try to run the following, I get consistent duplicates. I thought the loader would retain the values from the xpath until the next parse method, and then return everything into the output processor but it seems to only grab the first item and create duplicates for the rest.</p> <p dir="auto">Here's the scraper:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import scrapy from scrapy.item import Field from scrapy.crawler import CrawlerProcess from itemloaders.processors import TakeFirst from scrapy.loader import ItemLoader import pandas as pd from collections import defaultdict class GsmItem(scrapy.Item): brandname = Field(output_processor = TakeFirst()) devicecount = Field(output_processor = TakeFirst()) mobiles = Field(output_processor = TakeFirst()) stuff = Field(output_processor = TakeFirst()) class GsmSpider(scrapy.Spider): name = 'gsm' def start_requests(self): yield scrapy.Request( url = &quot;https://www.gsmarena.com/makers.php3&quot;, callback = self.parse ) def parse(self, response): data = response.xpath(&quot;//div[@class='st-text']//tr&quot;) for devices in data: loader = ItemLoader(GsmItem(), selector = devices) loader.add_xpath('brandname', &quot;//div[@class='st-text']//tr//a//text()&quot;) loader.add_xpath('devicecount', &quot;//div[@class='st-text']//tr//a//span//text()&quot;) #yield loader.load_item() product_page = devices.xpath(&quot;//div[@class='st-text']//tr//a//@href&quot;).get() yield response.follow( product_page, callback = self.product_parse, cb_kwargs = { 'loader':loader } ) def product_parse(self, response, loader): container = response.xpath(&quot;//div[@class='makers']//li&quot;) for mobiles in container: loader.add_value(&quot;mobiles&quot;, mobiles.xpath(&quot;.//a//strong//text()&quot;).getall()) yield loader.load_item() next_page = response.xpath(&quot;//a[@title='Next page']//@href&quot;).get() if next_page: yield response.follow( response.urljoin(next_page), callback = self.parse_specs, cb_kwargs = { 'loader':loader } ) def parse_specs(self, response, loader): loader.add_value(&quot;stuff&quot;,response.xpath(&quot;//th[normalize-space()='Launch']&quot;).get()) yield loader.load_item() process = CrawlerProcess( settings={ &quot;CONCURRENT_REQUESTS&quot;: 64, &quot;FEED_URI&quot;:'test_scraper.jl', &quot;FEED_FORMAT&quot;:'jsonlines', } ) process.crawl(GsmSpider) process.start()"><pre class="notranslate"><code class="notranslate">import scrapy from scrapy.item import Field from scrapy.crawler import CrawlerProcess from itemloaders.processors import TakeFirst from scrapy.loader import ItemLoader import pandas as pd from collections import defaultdict class GsmItem(scrapy.Item): brandname = Field(output_processor = TakeFirst()) devicecount = Field(output_processor = TakeFirst()) mobiles = Field(output_processor = TakeFirst()) stuff = Field(output_processor = TakeFirst()) class GsmSpider(scrapy.Spider): name = 'gsm' def start_requests(self): yield scrapy.Request( url = "https://www.gsmarena.com/makers.php3", callback = self.parse ) def parse(self, response): data = response.xpath("//div[@class='st-text']//tr") for devices in data: loader = ItemLoader(GsmItem(), selector = devices) loader.add_xpath('brandname', "//div[@class='st-text']//tr//a//text()") loader.add_xpath('devicecount', "//div[@class='st-text']//tr//a//span//text()") #yield loader.load_item() product_page = devices.xpath("//div[@class='st-text']//tr//a//@href").get() yield response.follow( product_page, callback = self.product_parse, cb_kwargs = { 'loader':loader } ) def product_parse(self, response, loader): container = response.xpath("//div[@class='makers']//li") for mobiles in container: loader.add_value("mobiles", mobiles.xpath(".//a//strong//text()").getall()) yield loader.load_item() next_page = response.xpath("//a[@title='Next page']//@href").get() if next_page: yield response.follow( response.urljoin(next_page), callback = self.parse_specs, cb_kwargs = { 'loader':loader } ) def parse_specs(self, response, loader): loader.add_value("stuff",response.xpath("//th[normalize-space()='Launch']").get()) yield loader.load_item() process = CrawlerProcess( settings={ "CONCURRENT_REQUESTS": 64, "FEED_URI":'test_scraper.jl', "FEED_FORMAT":'jsonlines', } ) process.crawl(GsmSpider) process.start() </code></pre></div>
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 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"> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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> <p dir="auto">4.4.0</p> <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"> 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"> 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"> 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>:</p> <details> <summary><b><code class="notranslate">celery report</code> Output: Started app. <p dir="auto">software -&gt; celery:4.4.0 (cliffs) kombu:4.6.7 py:3.7.6<br> billiard:3.6.2.0 py-amqp:2.5.2<br> platform -&gt; system:Linux arch:64bit, ELF<br> kernel version:5.3.0-7625-generic imp:CPython<br> loader -&gt; celery.loaders.app.AppLoader<br> settings -&gt; transport:amqp results:redis://localhost:6379/0</p> </b><p dir="auto"><b>broker_url: 'amqp://guest:<strong><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/localhost/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/localhost">@localhost</a>:5672//'<br> result_backend: 'redis://localhost:6379/0'<br> task_routes: {<br> 'task.add': {'queue': 'add', 'routing_key': '</strong>'},<br> 'task.log': {'queue': 'log', 'routing_key': '<strong>'},<br> 'task.receipt': {'queue': 'receipt', 'routing_key': '</strong>'}}<br> task_annotations: {<br> 'task.log': {'rate_limit': '1/s'}}<br> </b></p></summary><p dir="auto"></p> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></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>: 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=""><pre class="notranslate"><code class="notranslate"></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"> The below example creates a simple task and 3 queues to receive callbacks when task is completed. The app is configured to use redis backend, yet when the callbacks are invoked within celery, it generates new queues in AMQP rather than using the configured results backend. </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="workers $ celery -A task worker -n log -Q log --loglevel=info -c 1 $ celery -A task worker -n receipt -Q receipt --loglevel=info -c 1 $ celery -A task worker -n &quot;worker&quot; -Q add --loglevel=info task.py =================== from celery import Celery CELERY_IGNORE_RESULT = True CELERY_STORE_ERRORS_EVEN_IF_IGNORED = False app = Celery('task', backend='redis://localhost:6379/0', broker='amqp://guest@localhost//') app.conf.task_routes = { 'task.add': { 'queue': 'add', 'routing_key': 'task.add', }, 'task.receipt': { 'queue': 'receipt', 'routing_key': 'task.receipt', 'task.log': { 'queue': 'log', 'routing_key': 'task.log' } } app.conf.update( task_annotations={ 'task.log': {'rate_limit': '1/s'} } ) print(&quot;Started app.&quot;) @app.task def add(x, y): return x + y @app.task def receipt(result,id): print(&quot;Got Result: &quot;,result) print(&quot;Add Receipt: &quot;,id) @app.task def log(result,id): print(&quot;LOG Got Result: &quot;,result) print(&quot;LOG Add Receipt: &quot;,id) run.py ====================== from celery import Celery from task import add from task import receipt from task import log for i in range(0,10): if i % 2: r = add.apply((i,i+10),queue=&quot;add&quot;,link=log.s(str(i)+&quot;,&quot;+str(i+10)).set(queue=&quot;log&quot;)) else: r = add.apply((i,i+10),queue=&quot;add&quot;,link=receipt.s(str(i)+&quot;,&quot;+str(i+10)).set(queue=&quot;receipt&quot;)) print(i,i+10,r.get()) r.forget() print(&quot;Done&quot;) "><pre class="notranslate"><code class="notranslate">workers $ celery -A task worker -n log -Q log --loglevel=info -c 1 $ celery -A task worker -n receipt -Q receipt --loglevel=info -c 1 $ celery -A task worker -n "worker" -Q add --loglevel=info task.py =================== from celery import Celery CELERY_IGNORE_RESULT = True CELERY_STORE_ERRORS_EVEN_IF_IGNORED = False app = Celery('task', backend='redis://localhost:6379/0', broker='amqp://guest@localhost//') app.conf.task_routes = { 'task.add': { 'queue': 'add', 'routing_key': 'task.add', }, 'task.receipt': { 'queue': 'receipt', 'routing_key': 'task.receipt', 'task.log': { 'queue': 'log', 'routing_key': 'task.log' } } app.conf.update( task_annotations={ 'task.log': {'rate_limit': '1/s'} } ) print("Started app.") @app.task def add(x, y): return x + y @app.task def receipt(result,id): print("Got Result: ",result) print("Add Receipt: ",id) @app.task def log(result,id): print("LOG Got Result: ",result) print("LOG Add Receipt: ",id) run.py ====================== from celery import Celery from task import add from task import receipt from task import log for i in range(0,10): if i % 2: r = add.apply((i,i+10),queue="add",link=log.s(str(i)+","+str(i+10)).set(queue="log")) else: r = add.apply((i,i+10),queue="add",link=receipt.s(str(i)+","+str(i+10)).set(queue="receipt")) print(i,i+10,r.get()) r.forget() print("Done") </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Callbacks provided in link= arguments in task signatures should respect the configured backend in the app.</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">Link callbacks are storing their results in amqp queues instead of the configured backend.</p>
<p dir="auto">Tested with the <code class="notranslate">4.2.0rc2</code> version.</p> <h2 dir="auto">Steps to reproduce</h2> <p dir="auto">Set the <code class="notranslate">link_error</code> of any task with a class based task and make sure the executed task will fail so the callback would be called.</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Work?</p> <h2 dir="auto">Actual behavior</h2> <p dir="auto">The callback is not executed and an exception is raised ( AttributeError ).<br> <code class="notranslate">object has no attribute '__header__'</code></p> <p dir="auto">Related to/duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="272481334" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4377" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/4377/hovercard" href="https://github.com/celery/celery/issues/4377">#4377</a></p>
0
<p dir="auto">I want <code class="notranslate">mymacro!(bar)</code> to expand to <code class="notranslate">fn foo_bar() { }</code>.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#[feature(macro_rules)]; macro_rules! mymacro( ($x:ident) =&gt; ( fn concat_idents!(foo_, $x)() { } )) mymacro!(bar) fn main() { foo_bar(); }"><pre lang=".rs" class="notranslate"><code class="notranslate">#[feature(macro_rules)]; macro_rules! mymacro( ($x:ident) =&gt; ( fn concat_idents!(foo_, $x)() { } )) mymacro!(bar) fn main() { foo_bar(); } </code></pre></div> <p dir="auto">gives</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="foo.rs:4:21: 4:22 error: expected `(` but found `!` foo.rs:4 fn concat_idents!(foo_, $x)() { }"><pre class="notranslate"><code class="notranslate">foo.rs:4:21: 4:22 error: expected `(` but found `!` foo.rs:4 fn concat_idents!(foo_, $x)() { } </code></pre></div> <p dir="auto">on</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 0.9 (d3b3c66 2014-01-12 19:44:26 -0700) host: x86_64-unknown-linux-gnu"><pre class="notranslate"><code class="notranslate">rustc 0.9 (d3b3c66 2014-01-12 19:44:26 -0700) host: x86_64-unknown-linux-gnu </code></pre></div>
<p dir="auto">All of the examples below fail to compile with an error similar to the following:<br> test.rs:1:16: 1:17 error: expected <code class="notranslate">(</code> but found <code class="notranslate">!</code><br> test.rs:1 fn concat_idents!(foo, bar) () {}<br> ^</p> <p dir="auto">fn concat_idents!(foo, bar) () {}<br> trait concat_idents!(foo, bar) {}<br> mod concat_idents!(foo, bar) {}<br> let concat_idents!(foo, bar) = 0;</p>
1
<p dir="auto">Directions say :Let's try this again, but with margin this time. Use Clockwise Notation to give an element a margin of <strong>40 pixels on its top and left side</strong>, but only 20 pixels on its bottom and right side.</p> <p dir="auto">But criteria say<br> Your green-box class should give the <strong>top of elements 20px of margin.</strong><br> Your green-box class should give the left of elements 40px of margin.<br> Your green-box class should give the bottom of elements 20px of margin.<br> Your green-box class should give the right of elements 20px of margin.</p> <p dir="auto">Accepts<br> margin:40px 20px 20px 40px;</p> <p dir="auto">So just need to correct the px in the criteria for match to 40px on top.<br> Cheers!</p>
<p dir="auto">In the instructions for the margin, you have the pixel setting for "Top" to 20px instead of 40px.</p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=kris2008" rel="nofollow">Harikrishna Kollli</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5876?redirect=false" rel="nofollow">SPR-5876</a></strong> and commented</p> <p dir="auto">The Inner tags not able to access the name of the command object via the PageContext in partial page rendering using the FormTag.MODEL_ATTRIBUTE_VARIABLE_NAME, DEFAULT_COMMAND_NAME attribute. I am putting the name of the command bean into the model.</p> <p dir="auto"><code class="notranslate">@RequestMapping</code>(value="/dashboard/hotels.action", method = RequestMethod.GET)<br> public String hotelsHandler(<code class="notranslate">@ModelAttribute</code>("command") DashboardPresentationModel command, Model model)<br> {</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" model.addAttribute(FormTag.MODEL_ATTRIBUTE_VARIABLE_NAME, DEFAULT_COMMAND_NAME); model.addAttribute(DEFAULT_COMMAND_NAME,command); return &quot;locationDependent&quot;; }"><pre class="notranslate"><code class="notranslate"> model.addAttribute(FormTag.MODEL_ATTRIBUTE_VARIABLE_NAME, DEFAULT_COMMAND_NAME); model.addAttribute(DEFAULT_COMMAND_NAME,command); return "locationDependent"; } </code></pre></div> <p dir="auto">I get the below exception on page refresh</p> <p dir="auto">java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'hotel' available as request attribute<br> at org.springframework.web.servlet.support.BindStatus .&lt;init&gt;(BindStatus.java:141)<br> at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getBindStatus(AbstractData BoundFormElementTag.java:175)<br> at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getPropertyPath(AbstractDa taBoundFormElementTag.java:195)<br> at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.getName(AbstractDataBoundF ormElementTag.java:161)<br> at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.autogenerateId(AbstractDat aBoundFormElementTag.java:148)<br> at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.resolveId(AbstractDataBoun dFormElementTag.java:139)<br> at org.springframework.web.servlet.tags.form.Abstract DataBoundFormElementTag.writeDefaultAttributes(Abs tractDataBoundFormElementTag.java:123)<br> at org.springframework.web.servlet.tags.form.Abstract HtmlElementTag.writeDefaultAttributes(AbstractHtml ElementTag.java:380)<br> at org.springframework.web.servlet.tags.form.SelectTa g.writeTagContent(SelectTag.java:199)</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0 M3</p> <p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?t=74021" rel="nofollow">http://forum.springsource.org/showthread.php?t=74021</a></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="398095921" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10544" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10544/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10544">#10544</a> Partial page refresh with form tag is not working (<em><strong>"duplicates"</strong></em>)</li> </ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=flicken" rel="nofollow">Noel Flicken</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4702?redirect=false" rel="nofollow">SPR-4702</a></strong> and commented</p> <p dir="auto">Expected behavior:<br> Context should be close()'d after end of test class execution</p> <p dir="auto">Observed behavior:<br> Context only closed when <code class="notranslate">@DirtiesContext</code> annotates method</p> <p dir="auto">Multiple test classes can re-use the same context, which allows for faster test execution, so automatically closing a context after test class execution is probably not the best mechanism.</p> <p dir="auto">However, there should be a way to annotate that a context should be close()'d after all tests in a test class are executed.</p> <p dir="auto">Suggested fix:</p> <ul dir="auto"> <li>allow <code class="notranslate">@DirtiesContext</code> to annotate class</li> <li>add TestExecutionListener#destroyTestInstance</li> </ul> <p dir="auto">Willing to implementing, if given approval of design.</p> <hr> <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="398092648" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10068" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10068/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10068">#10068</a> ApplicationContext not closed when using <code class="notranslate">@ContextConfiguration</code> to implement integration tests (<em><strong>"is duplicated by"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398092014" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9978" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9978/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9978">#9978</a> Add a setDirty method to AbstractTestNGSpringContextTests</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398094206" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10311" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10311/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10311">#10311</a> Reload the application context for each test in a class with a class level annotation</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398066033" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/6700" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/6700/hovercard" href="https://github.com/spring-projects/spring-framework/issues/6700">#6700</a> ANT does not call destroy-method after tests</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398092648" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10068" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10068/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10068">#10068</a> ApplicationContext not closed when using <code class="notranslate">@ContextConfiguration</code> to implement integration tests</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/2dee54b78abaccd0a0b63e2dc763ae634291bd71/hovercard" href="https://github.com/spring-projects/spring-framework/commit/2dee54b78abaccd0a0b63e2dc763ae634291bd71"><tt>2dee54b</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/e77e070e7a697752ab9181e74ead1beed5e4e6d3/hovercard" href="https://github.com/spring-projects/spring-framework/commit/e77e070e7a697752ab9181e74ead1beed5e4e6d3"><tt>e77e070</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/77821845a7bfdeb442f4a6ad132099d1ad85b9dc/hovercard" href="https://github.com/spring-projects/spring-framework/commit/77821845a7bfdeb442f4a6ad132099d1ad85b9dc"><tt>7782184</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/0483cb5a3d0a7ecb8aa491a24bc522637c4aa5d9/hovercard" href="https://github.com/spring-projects/spring-framework/commit/0483cb5a3d0a7ecb8aa491a24bc522637c4aa5d9"><tt>0483cb5</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/8dec6af03885a2486a249f208674eae1556886b7/hovercard" href="https://github.com/spring-projects/spring-framework/commit/8dec6af03885a2486a249f208674eae1556886b7"><tt>8dec6af</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/1f087b412d2fccd589633dd002e64cf7b8aa881e/hovercard" href="https://github.com/spring-projects/spring-framework/commit/1f087b412d2fccd589633dd002e64cf7b8aa881e"><tt>1f087b4</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/51b8b99dfc4d3cfcd0b8d73cb476f5c74af600be/hovercard" href="https://github.com/spring-projects/spring-framework/commit/51b8b99dfc4d3cfcd0b8d73cb476f5c74af600be"><tt>51b8b99</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/f26e2e3d7bbd6f6a9798e553235bc17979327861/hovercard" href="https://github.com/spring-projects/spring-framework/commit/f26e2e3d7bbd6f6a9798e553235bc17979327861"><tt>f26e2e3</tt></a></p> <p dir="auto">4 votes, 6 watchers</p>
0