text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="x = tf.zeros([10]) tf.gradients(tf.reduce_prod(x, 0), [x])"><pre class="notranslate"><code class="notranslate">x = tf.zeros([10]) tf.gradients(tf.reduce_prod(x, 0), [x]) </code></pre></div> <p dir="auto">Gives</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="more traceback /home/***/.local/lib/python2.7/site-packages/tensorflow/python/ops/math_grad.pyc in _ProdGrad(op, grad) 128 reduced = math_ops.cast(op.inputs[1], dtypes.int32) 129 idx = math_ops.range(0, array_ops.rank(op.inputs[0])) --&gt; 130 other, _ = array_ops.listdiff(idx, reduced) 131 perm = array_ops.concat(0, [reduced, other]) 132 reduced_num = math_ops.reduce_prod(array_ops.gather(input_shape, reduced)) more traceback"><pre class="notranslate"><code class="notranslate">more traceback /home/***/.local/lib/python2.7/site-packages/tensorflow/python/ops/math_grad.pyc in _ProdGrad(op, grad) 128 reduced = math_ops.cast(op.inputs[1], dtypes.int32) 129 idx = math_ops.range(0, array_ops.rank(op.inputs[0])) --&gt; 130 other, _ = array_ops.listdiff(idx, reduced) 131 perm = array_ops.concat(0, [reduced, other]) 132 reduced_num = math_ops.reduce_prod(array_ops.gather(input_shape, reduced)) more traceback </code></pre></div> <p dir="auto">In line 128, <code class="notranslate">op.inputs[1]</code> could be a scalar, which will cause a shape mismatch when passed to <code class="notranslate">array_ops.listdiff</code> in line 130.</p> <p dir="auto">TF version: master branch a week ago</p>
<p dir="auto">Installed TensorFlow using pip package for v0.10.0rc0 on Ubuntu with python 2.7</p> <p dir="auto">Pip package <a href="https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0rc0-cp27-none-linux_x86_64.whl" rel="nofollow">https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0rc0-cp27-none-linux_x86_64.whl</a></p> <p dir="auto">The same error appears in the GPU build.</p> <p dir="auto">The following minimal code example produces raise an exception at the definition of z</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="u = tf.placeholder(dtype=tf.float64, shape=(30,30)) v = tf.reduce_prod(u, reduction_indices=[0]) w = tf.gradients( v, u ) x = tf.placeholder(dtype=tf.float64, shape=(30,30)) y = tf.reduce_prod(x, reduction_indices=0) z = tf.gradients( y, x )"><pre class="notranslate"><code class="notranslate">u = tf.placeholder(dtype=tf.float64, shape=(30,30)) v = tf.reduce_prod(u, reduction_indices=[0]) w = tf.gradients( v, u ) x = tf.placeholder(dtype=tf.float64, shape=(30,30)) y = tf.reduce_prod(x, reduction_indices=0) z = tf.gradients( y, x ) </code></pre></div> <blockquote> <p dir="auto">z = tf.gradients( y, x )<br> File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gradients.py", line 478, in gradients<br> in_grads = _AsList(grad_fn(op, *out_grads))<br> File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/math_grad.py", line 130, in _ProdGrad<br> other, _ = array_ops.listdiff(idx, reduced)<br> File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1201, in list_diff<br> result = _op_def_lib.apply_op("ListDiff", x=x, y=y, name=name)<br> File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 703, in apply_op<br> op_def=op_def)<br> File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2312, in create_op<br> set_shapes_for_outputs(ret)<br> File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1704, in set_shapes_for_outputs<br> shapes = shape_func(op)<br> File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1981, in _ListDiffShape<br> op.inputs[1].get_shape().assert_has_rank(1)<br> File "HOME/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_shape.py", line 621, in assert_has_rank<br> raise ValueError("Shape %s must have rank %d" % (self, rank))<br> ValueError: Shape () must have rank 1</p> </blockquote> <p dir="auto">The top code for u,v and w does not raise an error but the similar code for x,y, and z does. It looks like the shape code for reduce_prod cannot cope with the case where the reduction_indices is a single integer rather than a list. If you replace reduce_prod with reduce_sum in the above snippet then it does not raise an error.</p>
1
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">When using the currency pipe to format a number specifying the valid ISO 4217 currency code for South Africa 'ZAR' and setting the SymbolDisplay to true the currency code is not replaced by the currency symbol, in this case 'R'.</p> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">The expected behavior is for the projected property to display the currency symbol instead of the currency code when symbolDisplay is true and currencyCode is set to 'ZAR'.</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p> <p dir="auto">{{someamount | currency:'ZAR':true:'1.2-2'}}</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto">We need to format currency with the South African currency symbol.</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <p dir="auto">macOS Sierra, webpack, ng serve (angular-cli: template used: 1.0.0-beta.11-webpack.9-4)</p> <ul dir="auto"> <li> <p dir="auto"><strong>Angular version:</strong> 2.0.0-rc.7</p> </li> <li> <p dir="auto"><strong>Browser:</strong> all</p> </li> <li> <p dir="auto"><strong>Language:</strong> all</p> </li> <li> <p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =</p> </li> </ul>
<p dir="auto">I'm using the currency pipe with beta.0, and with the following code inside ionic 2:</p> <blockquote> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;ion-card-content&gt; Total: {{ total | currency:'COP':true }} &lt;/ion-card-content&gt;"><pre class="notranslate"><code class="notranslate">&lt;ion-card-content&gt; Total: {{ total | currency:'COP':true }} &lt;/ion-card-content&gt; </code></pre></div> </blockquote> <p dir="auto">The output should be <code class="notranslate">Total: $ 110,000</code> but the actual output is this:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9698639/12625787/455a9142-c503-11e5-998d-42d18793691f.png"><img src="https://cloud.githubusercontent.com/assets/9698639/12625787/455a9142-c503-11e5-998d-42d18793691f.png" alt="image" style="max-width: 100%;"></a></p>
1
<p dir="auto">i want prevent atom-shell to start when had a atom-shell started, how can i do that?</p>
<p dir="auto">I want to disallow user to run the same app on running, and get the arguments from command line.<br> Is there any way implement this, just like use 'single-instance' configuration and 'open' event in node-webkit.</p>
1
<p dir="auto">by <strong>plnordahl</strong>:</p> <pre class="notranslate">Running Mavericks 10.9.2 and using the patch from <a href="https://groups.google.com/forum/#" rel="nofollow">https://groups.google.com/forum/#</a>!msg/golang-codereviews/it4yhth9fWM/TxcE1Yx6AUMJ (issue 7510) on release-branch.go1.2, I'm not seeing the variable names of int, string, float, or map variables in a simple program. I do however see names for slices, arrays, and struct/struct members in the output. Below is some code to reproduce the behavior. One program, which will be loaded for it's DWARF data: package main import "fmt" func main() { myInt := 42 mySecondInt := 41 fmt.Println(myInt, mySecondInt) myArray := [2]string{"hello", "world"} fmt.Println(myArray) myString := "foo" fmt.Println(myString) mySlice := []int{1, 2, 3} fmt.Println(mySlice) myFloat := 42.424242 fmt.Println(myFloat) myMap := make(map[string]string) fmt.Println(myMap) myStruct := myStructType{"bleh", 999, "hm"} fmt.Println(myStruct) } type myStructType struct { Bleh string Blerg int Foo string } ...and the second, which just loads the Mach-O binary and prints each entry's offset, tag, children, and fields (pipe the output of this program into grep to see the behavior I describe). package main import ( "debug/macho" "fmt" "log" ) func main() { m, err := macho.Open("&lt;put the path to where your test binary is located&gt;") if err != nil { log.Fatalf("Couldn't open MACH-O file: %s\n", err) } d, err := m.DWARF() if err != nil { log.Fatalf("Couldn't read DWARF info: %s\n", err) } r := d.Reader() for { entry, err := r.Next() if err != nil { log.Fatalf("Current offset is invalid or undecodable. %s", err) } if entry == nil { fmt.Println("Reached the end of the entry stream.") return } fmt.Println("Entry --- offset: ", entry.Offset, " tag: ", entry.Tag, " children: ", entry.Children, " field: ", entry.Field) } return }</pre>
<p dir="auto">by <strong>seanerussell</strong>:</p> <pre class="notranslate">What steps will reproduce the problem? 1. Compile the attached file (steps to compile listed below) 2. Execute on Windows 3. Watch the memory use with Resource Monitor The application memory use increases at a rate of about 1KB every 5s until it exceeds the stack (heap?) space and crashes. I'm using Go 6d7136d74b65 weekly/weekly.2011-10-18 and am compiling on Linux, cross-compiling for Windows using gb (go-gb.googlecode.com) via "GOOS=windows gb"; 6g/l are the compilers being used. The Linux machine is 2.6.32-32-generic #62-Ubuntu SMP, and the code is executing on Windows Server 2008 R2 Standard, 6-core AMD Opteron 2425 HE 2.1GHz x 2, 32GB RAM, 64-bit. I don't see similar behavior on Linux; the process memory use does grow very slowly for a while, but appears to eventually plateau after a few minutes. If this isn't a memory leak, but is explained by expected behavior, could I get a pointer to a document describing the cause?</pre> <p dir="auto">Attachments:</p> <ol dir="auto"> <li><a href="https://storage.googleapis.com/go-attachment/2385/0/memconsumer.go" rel="nofollow">memconsumer.go</a> (1308 bytes)</li> </ol>
0
<p dir="auto">It seems that <code class="notranslate">document.hidden</code> is not working once the browser is controlled by Playwright.</p> <p dir="auto">Given you open a browser tab (outside of playwright) and inject in the console the script :</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="setInterval(() =&gt; {console.log(`document.hidden = ${document.hidden}`)}, 1000)"><pre class="notranslate"><span class="pl-en">setInterval</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">`document.hidden = <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-c1">hidden</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">1000</span><span class="pl-kos">)</span></pre></div> <p dir="auto">When you open a new browser tab<br> And you wait a few seconds<br> And you come back to the previous tab<br> Then you have the following logs in the console:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9698924/153960323-cc3926de-360f-495f-8131-de4c13768983.png"><img src="https://user-images.githubusercontent.com/9698924/153960323-cc3926de-360f-495f-8131-de4c13768983.png" alt="Screen Shot 2022-02-14 at 23 51 53" style="max-width: 100%;"></a></p> <p dir="auto">When you do the same steps in a browser controlled by Playwright<br> Then you have the following logs in the console :<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9698924/153961181-d88ee59d-cf26-4cdb-8c08-95998750a31f.png"><img src="https://user-images.githubusercontent.com/9698924/153961181-d88ee59d-cf26-4cdb-8c08-95998750a31f.png" alt="Screen Shot 2022-02-15 at 00 00 38" style="max-width: 100%;"></a></p> <p dir="auto">Unless I am wrong, <code class="notranslate">document.hidden</code> should be handled by Playwright.<br> This missing feature prevents to test the front stops specific activities (for example the front stops to poll a rest API endpoint) when the user switches from one browser tab to another, and vice-versa: the front should, for example, restart it's polling activity when the browser tab becomes actif again.</p> <p dir="auto">Regards</p>
<p dir="auto">Presently Playwright treats all tabs as active. This can become an issue when a tab we're not currently focusing on is running a lot of work.<br> I'll use the site MakeUseOf.com as an example. When this tab is active, it can consume 25-30% CPU time on my brand new MBPro. Under normal Chromium, when the tab is not the current tab Chromium will throttle timers (and whatever else it may do) and the site will settle around 2% CPU.<br> Under Playwright, this inactive tab will continue to use full resources (25-30% CPU).</p> <p dir="auto">I'd like to see a flag or an API call (<code class="notranslate">page.goToBack()</code> was suggested) that would allow inactive tabs to sleep.</p> <p dir="auto">Here's a link to the <a href="https://playwright.slack.com/archives/CSUHZPVLM/p1597965643016100" rel="nofollow">original discussion</a>.</p> <p dir="auto">Thanks!</p>
1
<p dir="auto">When concatting two dataframes where there are a) there are duplicate columns in one of the dataframes, and b) there are non-overlapping column names in both, then you get a IndexError:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [9]: df1 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B1']) ...: df2 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B2']) In [10]: pd.concat([df1, df2]) Traceback (most recent call last): File &quot;&lt;ipython-input-10-f61a1ab4009e&gt;&quot;, line 1, in &lt;module&gt; pd.concat([df1, df2]) ... File &quot;c:\users\vdbosscj\scipy\pandas-joris\pandas\core\index.py&quot;, line 765, in take taken = self.view(np.ndarray).take(indexer) IndexError: index 3 is out of bounds for axis 0 with size 3"><pre class="notranslate"><code class="notranslate">In [9]: df1 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B1']) ...: df2 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B2']) In [10]: pd.concat([df1, df2]) Traceback (most recent call last): File "&lt;ipython-input-10-f61a1ab4009e&gt;", line 1, in &lt;module&gt; pd.concat([df1, df2]) ... File "c:\users\vdbosscj\scipy\pandas-joris\pandas\core\index.py", line 765, in take taken = self.view(np.ndarray).take(indexer) IndexError: index 3 is out of bounds for axis 0 with size 3 </code></pre></div> <p dir="auto">I don't know if it should work (although I suppose it should, as with only the duplicate columns it does work), but at least the error message is not really helpfull.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dti = pd.date_range('2016-09-23', periods=3, tz='US/Central') df = pd.DataFrame(dti) &gt;&gt;&gt; df.T Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;pandas/core/frame.py&quot;, line 1941, in transpose return super(DataFrame, self).transpose(1, 0, **kwargs) File &quot;pandas/core/generic.py&quot;, line 616, in transpose new_values = self.values.transpose(axes_numbers) File &quot;pandas/core/base.py&quot;, line 697, in transpose nv.validate_transpose(args, kwargs) File &quot;pandas/compat/numpy/function.py&quot;, line 54, in __call__ self.defaults) File &quot;pandas/util/_validators.py&quot;, line 218, in validate_args_and_kwargs validate_kwargs(fname, kwargs, compat_args) File &quot;pandas/util/_validators.py&quot;, line 157, in validate_kwargs _check_for_default_values(fname, kwds, compat_args) File &quot;pandas/util/_validators.py&quot;, line 69, in _check_for_default_values format(fname=fname, arg=key))) ValueError: the 'axes' parameter is not supported in the pandas implementation of transpose()"><pre class="notranslate"><code class="notranslate">dti = pd.date_range('2016-09-23', periods=3, tz='US/Central') df = pd.DataFrame(dti) &gt;&gt;&gt; df.T Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; File "pandas/core/frame.py", line 1941, in transpose return super(DataFrame, self).transpose(1, 0, **kwargs) File "pandas/core/generic.py", line 616, in transpose new_values = self.values.transpose(axes_numbers) File "pandas/core/base.py", line 697, in transpose nv.validate_transpose(args, kwargs) File "pandas/compat/numpy/function.py", line 54, in __call__ self.defaults) File "pandas/util/_validators.py", line 218, in validate_args_and_kwargs validate_kwargs(fname, kwargs, compat_args) File "pandas/util/_validators.py", line 157, in validate_kwargs _check_for_default_values(fname, kwds, compat_args) File "pandas/util/_validators.py", line 69, in _check_for_default_values format(fname=fname, arg=key))) ValueError: the 'axes' parameter is not supported in the pandas implementation of transpose() </code></pre></div> <p dir="auto">Looks like this is b/c <code class="notranslate">df.values</code> is a <code class="notranslate">DatetimeIndex</code></p>
0
<p dir="auto">CSS Grid layout excels at dividing a page into major regions, or defining the relationship in terms of size, position, and layer, between parts of a control built from HTML primitives.</p> <p dir="auto">Watched a youtube about CSS Grids: <a href="https://youtu.be/txZq7Laz7_4" rel="nofollow">https://youtu.be/txZq7Laz7_4</a></p> <p dir="auto">Nice concept that seems to play nice with component based development. Integration with Next.js may prove to solve CSS issues and the way we think about making apps.</p> <p dir="auto">Probably goes against providing options to the developer but could image a lean mean workflow.</p> <p dir="auto">Any thoughts?</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Standard &lt;style jsx&gt; with built in support for grid layouts/fallback support.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Currently CSS can be a mess and look quite ugly with multiple nested divs and leads to accessibility issues.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>To many options for front end CSS frameworks that don't work well with component based workflow.</li> <li>Heavy CSS frameworks in the global space.</li> <li>Incomplete CSS react libraries like Semantic UI.</li> <li>Doing things the old way.</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">Providing a rich UX is one of the most complicating parts of developing an app and Next.js definitely makes things easier and is also lightning fast. I believe something like "CSS Grid" could make layouts of the components where you want them easy while increasing performance.</p> <h2 dir="auto">Links</h2> <p dir="auto"><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout</a><br> <a href="https://css-tricks.com/snippets/css/complete-guide-grid/" rel="nofollow">https://css-tricks.com/snippets/css/complete-guide-grid/</a><br> <a href="https://www.w3.org/TR/css-grid-1/" rel="nofollow">https://www.w3.org/TR/css-grid-1/</a></p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Calling <code class="notranslate">Router.push({pathname: 'about'})</code> should work just as <code class="notranslate">&lt;Link href={{pathname: 'about'}}/&gt;</code> does, and as described <a href="https://github.com/zeit/next.js#with-url-object-1">here</a>.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Client side, it throws an error <code class="notranslate">Route name should start with a "/", got "page"</code> (thrown from <a href="https://github.com/zeit/next.js/blob/v3-beta/lib/page-loader.js#L22">https://github.com/zeit/next.js/blob/v3-beta/lib/page-loader.js#L22</a>)</p> <p dir="auto">It then immediately falls back to the server side route, which then loads the page as usual.</p> <p dir="auto">Depending on how long the server page takes to load, you may or may not see the error above.</p> <p dir="auto">Note that absolute pathnames (<code class="notranslate">/about</code>) work as normal.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li><a href="https://github.com/tmeasday/next-routing-bug">https://github.com/tmeasday/next-routing-bug</a> - <code class="notranslate">git clone https://github.com/tmeasday/next-routing-bug; cd next-routing bug; npm install; npm run dev</code></li> <li>Click the "Link" or "Leading Slash" tags, notice normal behaviour.</li> <li>Click the "No Leading Slash" tag, notice the error for 2 seconds (how long the "page" takes to load).</li> <li>Inspect the server console and note that the "page" page loaded from the server.</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">I think the issue here is that the <code class="notranslate">Link</code> calls <code class="notranslate">url.resolve</code> <a href="https://github.com/zeit/next.js/blob/v3-beta/lib/link.js#L58">here</a>, where as <code class="notranslate">Router.push</code> does not.</p> <p dir="auto">I suspect the <code class="notranslate">resolve</code> call should come somewhere deeper in the stack.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td>2 + 3 betas</td> </tr> <tr> <td>node</td> <td>8.1.0</td> </tr> <tr> <td>OS</td> <td>macOS 10.12.5</td> </tr> <tr> <td>browser</td> <td>Chrome</td> </tr> </tbody> </table>
0
<h4 dir="auto">Summary</h4> <p dir="auto"><code class="notranslate">maxBodyLength</code> is a option for <a href="https://www.npmjs.com/package/follow-redirects#options" rel="nofollow">follow-redirect</a> which is default transport for axios in node.js environment.</p> <p dir="auto">so, can't upload file &gt; 10M</p> <h4 dir="auto">Context</h4> <ul dir="auto"> <li>axios version: all version</li> <li>Environment: node all version</li> </ul>
<h4 dir="auto">Summary</h4> <p dir="auto"><code class="notranslate">follow-redirects</code> defaults to a <code class="notranslate">maxBodyLength</code> of 10mb. <code class="notranslate">axios</code> does not override this default, even when the config specifies a <code class="notranslate">maxContentLength</code> parameter greater than 10mb, thus capping <code class="notranslate">axios</code> at a maximum content length of 10mb no matter what is configured, and returning an error that does not make it obvious that <code class="notranslate">follow-redirects</code> is the cause.</p> <p dir="auto"><code class="notranslate">axios</code> should set the <code class="notranslate">maxBodyLength</code> option sent to <code class="notranslate">follow-redirects</code> to match the <code class="notranslate">maxContentLength</code> config property set on the <code class="notranslate">AxiosOptions</code> object.</p> <h4 dir="auto">Context</h4> <ul dir="auto"> <li>axios version: <em>v0.17.1</em></li> <li>Environment: <em>Electron v1.4.3 or Node v6.5.0 with XHR polyfill, macOS v10.13.2</em></li> </ul> <h4 dir="auto">Status</h4> <p dir="auto">Pull request: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="287796636" data-permission-text="Title is private" data-url="https://github.com/axios/axios/issues/1287" data-hovercard-type="pull_request" data-hovercard-url="/axios/axios/pull/1287/hovercard" href="https://github.com/axios/axios/pull/1287">#1287</a></p>
1
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function foo() try error(&quot;error in foo&quot;) catch e end end function bar() try error(&quot;error in bar&quot;) catch e foo() rethrow(e) end end bar()"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">foo</span>() <span class="pl-k">try</span> <span class="pl-c1">error</span>(<span class="pl-s"><span class="pl-pds">"</span>error in foo<span class="pl-pds">"</span></span>) <span class="pl-k">catch</span> e <span class="pl-k">end</span> <span class="pl-k">end</span> <span class="pl-k">function</span> <span class="pl-en">bar</span>() <span class="pl-k">try</span> <span class="pl-c1">error</span>(<span class="pl-s"><span class="pl-pds">"</span>error in bar<span class="pl-pds">"</span></span>) <span class="pl-k">catch</span> e <span class="pl-c1">foo</span>() <span class="pl-c1">rethrow</span>(e) <span class="pl-k">end</span> <span class="pl-k">end</span> <span class="pl-c1">bar</span>()</pre></div> <p dir="auto">produces the misleading</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ERROR: error in bar Stacktrace: [1] foo() at ./REPL[1]:3 [2] bar() at ./REPL[2]:5"><pre class="notranslate">ERROR<span class="pl-k">:</span> error <span class="pl-k">in</span> bar Stacktrace<span class="pl-k">:</span> [<span class="pl-c1">1</span>] <span class="pl-c1">foo</span>() at <span class="pl-k">./</span>REPL[<span class="pl-c1">1</span>]<span class="pl-k">:</span><span class="pl-c1">3</span> [<span class="pl-c1">2</span>] <span class="pl-c1">bar</span>() at <span class="pl-k">./</span>REPL[<span class="pl-c1">2</span>]<span class="pl-k">:</span><span class="pl-c1">5</span></pre></div> <p dir="auto">This just hit me in a really wicked situation: The stacktrace actually lead me to a line erroneously throwing the reported exception. I fixed it (to throw the correct exception), but the same error kept showing, leaving me completely puzzled for quite some time...</p>
<p dir="auto"><code class="notranslate">\varepsilon</code> is currently mapped to ɛ (U+025B latin small letter open e). This is wrong. The correct mapping is ε (U+03B5 greek small letter epsilon).</p>
0
<p dir="auto">If this is something that can't be added or isn't going to be supported, it wouldn't be a bad thing to support hierarchical data in forms (adjacency list model / nested set model).</p> <p dir="auto">Possibly having the option to force the selection of leafs without children only, etc, etc. Can lead to a very powerful feature. =)</p>
<table role="table"> <thead> <tr> <th>Q</th> <th>A</th> </tr> </thead> <tbody> <tr> <td>Bug report?</td> <td>yes</td> </tr> <tr> <td>Feature request?</td> <td>no</td> </tr> <tr> <td>BC Break report?</td> <td>no</td> </tr> <tr> <td>RFC?</td> <td>no</td> </tr> <tr> <td>Symfony version</td> <td>3.4.0-BETA1</td> </tr> </tbody> </table> <p dir="auto">Since upgrading to Symfony 3.4.0-BETA1 fom 3.3.10, suddenly all responses started receiving <code class="notranslate">Cache-Control</code> header with <code class="notranslate">private, max-age=10800, no-cache, private</code> value and a response code <code class="notranslate">304 Not Modified</code>, which means that responses are cached in browsers for 3 hours and only hard reload with <code class="notranslate">Ctrl+R</code> or <code class="notranslate">Shift+R</code> refreshes the page from backend.</p> <p dir="auto"><code class="notranslate">git bisect</code> says that the culprit is <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="264689355" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/24523" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/24523/hovercard" href="https://github.com/symfony/symfony/pull/24523">#24523</a>. And indeed, reverting the commit in that PR fixes the issue for me, meaning <code class="notranslate">Cache-Control</code> header is back to <code class="notranslate">no-cache, private</code> and the response is <code class="notranslate">200 OK</code>.</p>
0
<h3 dir="auto">Problem</h3> <p dir="auto">When going through the "Image tutorial" on Firefox or Edge, when you try downloading the image of the stinkbug, it will only download as a <code class="notranslate">webp</code> file and there is no option to download as <code class="notranslate">png</code>. That is even clicking the "View Image" and trying to save it. Below is trying to save the image in Firefox.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12010588/95612982-393eed80-0a32-11eb-8e68-3a3ceb85f0ae.png"><img src="https://user-images.githubusercontent.com/12010588/95612982-393eed80-0a32-11eb-8e68-3a3ceb85f0ae.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">This is a problem for introductory students, trying to use this tutorial and learning how to read tutorials. They believe they are doing something wrong and wouldn't be sure how to convert it. As a more advanced user, I still could not find out how to make it a <code class="notranslate">png</code> through the tutorial page.</p> <ul dir="auto"> <li>Tutorial Link: <a href="https://matplotlib.org/tutorials/introductory/images.html" rel="nofollow">https://matplotlib.org/tutorials/introductory/images.html</a></li> <li>Image Link: <a href="https://matplotlib.org/_images/stinkbug.png" rel="nofollow">https://matplotlib.org/_images/stinkbug.png</a> (may say <code class="notranslate">png</code> but downloading it is as <code class="notranslate">webg</code>)</li> </ul> <p dir="auto">Operating System: Windows 10 Pro</p> <h3 dir="auto">Suggested Improvement</h3> <p dir="auto">The image needs to be updated to a <code class="notranslate">png</code> and maybe a direct link to download the image (the latter is not as important).</p> <p dir="auto">If there is a way to do that with a module, that might be cool to include, but just an idea. I can provide more information if necessary.</p>
<p dir="auto">The <a href="https://matplotlib.org/users/image_tutorial.html" rel="nofollow">image tutorial on matplotlib.org</a> uses this sample image:</p> <p dir="auto"><a href="https://matplotlib.org/_images/stinkbug.png" rel="nofollow">https://matplotlib.org/_images/stinkbug.png</a></p> <p dir="auto">and notes that it is a "24-bit RGB PNG image (8 bits for each of R, G, B)". However, further inspection reveals that it is <em>not</em> a 24-bit RGB, but rather an 8-bit grayscale image.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -s 'https://matplotlib.org/_images/stinkbug.png' | file - /dev/stdin: PNG image data, 500 x 375, 8-bit grayscale, non-interlaced"><pre class="notranslate"><code class="notranslate">$ curl -s 'https://matplotlib.org/_images/stinkbug.png' | file - /dev/stdin: PNG image data, 500 x 375, 8-bit grayscale, non-interlaced </code></pre></div> <p dir="auto">However, the source image in the github repository <em>is</em> an RGB image:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -s 'https://raw.githubusercontent.com/matplotlib/matplotlib/master/doc/_static/stinkbug.png' | file - /dev/stdin: PNG image data, 500 x 375, 8-bit/color RGB, non-interlaced"><pre class="notranslate"><code class="notranslate">$ curl -s 'https://raw.githubusercontent.com/matplotlib/matplotlib/master/doc/_static/stinkbug.png' | file - /dev/stdin: PNG image data, 500 x 375, 8-bit/color RGB, non-interlaced </code></pre></div> <p dir="auto">I noticed this because when I tried to follow the tutorial on my own machine, I kept on getting this error in line 7:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [7]: lum_img = img[:,:,0] IndexError: too many indices for array"><pre class="notranslate"><code class="notranslate">In [7]: lum_img = img[:,:,0] IndexError: too many indices for array </code></pre></div> <p dir="auto">This is because <code class="notranslate">imread</code> stores a grayscale image as an ndarray with only two dimensions, not three, as documented here:</p> <blockquote> <p dir="auto">For grayscale images, the return array is MxN. For RGB images, the return value is MxNx3. For RGBA images the return value is MxNx4.</p> </blockquote> <p dir="auto"><a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imread.html" rel="nofollow">https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imread.html</a></p> <p dir="auto">So <code class="notranslate">img.shape</code> ends up as <code class="notranslate">(375, 500)</code> when it should be <code class="notranslate">(375, 500, 3)</code>.</p> <p dir="auto">Let me know if I should file this here instead:</p> <p dir="auto"><a href="https://github.com/matplotlib/matplotlib.github.com/issues">https://github.com/matplotlib/matplotlib.github.com/issues</a></p>
1
<ol dir="auto"> <li>Does Code support showing vertical indent level line?</li> <li>now <code class="notranslate">editor.renderWhitespace</code> only have <code class="notranslate">true</code> or <code class="notranslate">false</code>, can we have a option to only render whitespace when selection?</li> </ol>
<p dir="auto">Hi, is there any chance we can get indent guides (the vertical lines that run down to matching indents). Could not find reference to them anywhere in VS code or the gallery. Thanks - Adolfo</p>
1
<p dir="auto"><a href="https://github.com/lifthrasiir/rust-encoding/tree/3af92a299757bcb07e64ae326dbeef4cdbfaa80f">rust-encoding</a> builds fine in the previous nightly, but it triggers an ICE in rustc 1.2.0-nightly (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/0fc0476e6ae2bcc5cce75d78548cf037b6692a97/hovercard" href="https://github.com/rust-lang/rust/commit/0fc0476e6ae2bcc5cce75d78548cf037b6692a97"><tt>0fc0476</tt></a> 2015-05-24) (built 2015-05-24)</p> <p dir="auto">This looks similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="69698390" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/24644" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/24644/hovercard" href="https://github.com/rust-lang/rust/issues/24644">#24644</a>, but it started more recently.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 cargo build --verbose Fresh encoding_index_tests v0.1.4 (file:///home/simon/projects/rust-encoding) Compiling encoding v0.2.32 (file:///home/simon/projects/rust-encoding) Running `rustc src/lib.rs --crate-name encoding --crate-type lib -g --out-dir /home/simon/projects/rust-encoding/target/debug --emit=dep-info,link -L dependency=/home/simon/projects/rust-encoding/target/debug -L dependency=/home/simon/projects/rust-encoding/target/debug/deps --extern encoding_index_tradchinese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_tradchinese-9031d0a206975cd9.rlib --extern encoding_index_singlebyte=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_singlebyte-80fddc2d153c158e.rlib --extern encoding_index_simpchinese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_simpchinese-06c5fe5964f3071e.rlib --extern encoding_index_korean=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_korean-bb2701334d42f010.rlib --extern encoding_index_japanese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_japanese-5e92eb13c020e4d8.rlib` Fresh libc v0.1.6 Fresh encoding-index-singlebyte v1.20141219.5 (file:///home/simon/projects/rust-encoding) Fresh encoding-index-simpchinese v1.20141219.5 (file:///home/simon/projects/rust-encoding) Fresh encoding-index-korean v1.20141219.5 (file:///home/simon/projects/rust-encoding) Fresh encoding-index-japanese v1.20141219.5 (file:///home/simon/projects/rust-encoding) Fresh encoding-index-tradchinese v1.20141219.5 (file:///home/simon/projects/rust-encoding) Fresh log v0.3.1 Fresh getopts v0.2.10 error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'assertion failed: prev_const.is_none() || prev_const == Some(llconst)', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_trans/trans/consts.rs:291 stack backtrace: 1: 0x7f38ec7687e9 - sys::backtrace::write::he19dad14fe2b97b1w6r 2: 0x7f38ec7707a9 - panicking::on_panic::h330377024750b34dHMw 3: 0x7f38ec731482 - rt::unwind::begin_unwind_inner::h7703fc192c11eec8Rrw 4: 0x7f38eb4d782e - rt::unwind::begin_unwind::h7587717121668466740 5: 0x7f38eb549830 - trans::consts::const_expr::h6a02570a980db0cdhNs 6: 0x7f38eb5a1aea - trans::consts::get_const_expr_as_global::h8d682e42aa0c00a1pKs 7: 0x7f38eb51bf3f - trans::expr::trans::h063786072022aec6izA 8: 0x7f38eb5b80ce - trans::expr::trans_into::h0995470e7b548e00ZsA 9: 0x7f38eb53d9d2 - trans::expr::trans_adt::h7fc068c005b70b7fv8B 10: 0x7f38eb5e38b2 - trans::expr::trans_rvalue_dps_unadjusted::he15a7fa64af631b8MCB 11: 0x7f38eb5b831c - trans::expr::trans_into::h0995470e7b548e00ZsA 12: 0x7f38eb53ba66 - trans::controlflow::trans_block::h6757ec40476ddde4slv 13: 0x7f38eb5e3bbd - trans::expr::trans_rvalue_dps_unadjusted::he15a7fa64af631b8MCB 14: 0x7f38eb5b831c - trans::expr::trans_into::h0995470e7b548e00ZsA 15: 0x7f38eb53ba66 - trans::controlflow::trans_block::h6757ec40476ddde4slv 16: 0x7f38eb53a381 - trans::base::trans_closure::hdcc3c01c9bca642e7Uh 17: 0x7f38eb53c05a - trans::base::trans_fn::hf52d8c0c091fdef5P5h 18: 0x7f38eb53ee27 - trans::base::trans_item::he4dc60caaf1684eajui 19: 0x7f38eb53f738 - trans::base::trans_item::he4dc60caaf1684eajui 20: 0x7f38eb54ccfc - trans::base::trans_crate::hb11747a7cf1143a4sjj 21: 0x7f38eccc14a4 - driver::phase_4_translate_to_llvm::h29a0d7314fcd3b41nOa 22: 0x7f38ecc9d226 - driver::compile_input::h16cddbb7992cbbbaQba 23: 0x7f38ecd52f21 - run_compiler::h74084e004617dcdcb6b 24: 0x7f38ecd50772 - boxed::F.FnBox&lt;A&gt;::call_box::h10784738899208612549 25: 0x7f38ecd4ff49 - rt::unwind::try::try_fn::h5235027869346842134 26: 0x7f38ec7e9498 - rust_try_inner 27: 0x7f38ec7e9485 - rust_try 28: 0x7f38ec75c247 - rt::unwind::try::inner_try::hb6f04bd1baacc20eKnw 29: 0x7f38ecd5017a - boxed::F.FnBox&lt;A&gt;::call_box::h17245911238432039576 30: 0x7f38ec76f471 - sys::thread::Thread::new::thread_start::h285dd80d49b81cf50xv 31: 0x7f38e6798373 - start_thread 32: 0x7f38ec3c127c - clone 33: 0x0 - &lt;unknown&gt; Could not compile `encoding`. Caused by: Process didn't exit successfully: `rustc src/lib.rs --crate-name encoding --crate-type lib -g --out-dir /home/simon/projects/rust-encoding/target/debug --emit=dep-info,link -L dependency=/home/simon/projects/rust-encoding/target/debug -L dependency=/home/simon/projects/rust-encoding/target/debug/deps --extern encoding_index_tradchinese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_tradchinese-9031d0a206975cd9.rlib --extern encoding_index_singlebyte=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_singlebyte-80fddc2d153c158e.rlib --extern encoding_index_simpchinese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_simpchinese-06c5fe5964f3071e.rlib --extern encoding_index_korean=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_korean-bb2701334d42f010.rlib --extern encoding_index_japanese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_japanese-5e92eb13c020e4d8.rlib` (exit code: 101)"><pre class="notranslate"><code class="notranslate">$ RUST_BACKTRACE=1 cargo build --verbose Fresh encoding_index_tests v0.1.4 (file:///home/simon/projects/rust-encoding) Compiling encoding v0.2.32 (file:///home/simon/projects/rust-encoding) Running `rustc src/lib.rs --crate-name encoding --crate-type lib -g --out-dir /home/simon/projects/rust-encoding/target/debug --emit=dep-info,link -L dependency=/home/simon/projects/rust-encoding/target/debug -L dependency=/home/simon/projects/rust-encoding/target/debug/deps --extern encoding_index_tradchinese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_tradchinese-9031d0a206975cd9.rlib --extern encoding_index_singlebyte=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_singlebyte-80fddc2d153c158e.rlib --extern encoding_index_simpchinese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_simpchinese-06c5fe5964f3071e.rlib --extern encoding_index_korean=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_korean-bb2701334d42f010.rlib --extern encoding_index_japanese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_japanese-5e92eb13c020e4d8.rlib` Fresh libc v0.1.6 Fresh encoding-index-singlebyte v1.20141219.5 (file:///home/simon/projects/rust-encoding) Fresh encoding-index-simpchinese v1.20141219.5 (file:///home/simon/projects/rust-encoding) Fresh encoding-index-korean v1.20141219.5 (file:///home/simon/projects/rust-encoding) Fresh encoding-index-japanese v1.20141219.5 (file:///home/simon/projects/rust-encoding) Fresh encoding-index-tradchinese v1.20141219.5 (file:///home/simon/projects/rust-encoding) Fresh log v0.3.1 Fresh getopts v0.2.10 error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'assertion failed: prev_const.is_none() || prev_const == Some(llconst)', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_trans/trans/consts.rs:291 stack backtrace: 1: 0x7f38ec7687e9 - sys::backtrace::write::he19dad14fe2b97b1w6r 2: 0x7f38ec7707a9 - panicking::on_panic::h330377024750b34dHMw 3: 0x7f38ec731482 - rt::unwind::begin_unwind_inner::h7703fc192c11eec8Rrw 4: 0x7f38eb4d782e - rt::unwind::begin_unwind::h7587717121668466740 5: 0x7f38eb549830 - trans::consts::const_expr::h6a02570a980db0cdhNs 6: 0x7f38eb5a1aea - trans::consts::get_const_expr_as_global::h8d682e42aa0c00a1pKs 7: 0x7f38eb51bf3f - trans::expr::trans::h063786072022aec6izA 8: 0x7f38eb5b80ce - trans::expr::trans_into::h0995470e7b548e00ZsA 9: 0x7f38eb53d9d2 - trans::expr::trans_adt::h7fc068c005b70b7fv8B 10: 0x7f38eb5e38b2 - trans::expr::trans_rvalue_dps_unadjusted::he15a7fa64af631b8MCB 11: 0x7f38eb5b831c - trans::expr::trans_into::h0995470e7b548e00ZsA 12: 0x7f38eb53ba66 - trans::controlflow::trans_block::h6757ec40476ddde4slv 13: 0x7f38eb5e3bbd - trans::expr::trans_rvalue_dps_unadjusted::he15a7fa64af631b8MCB 14: 0x7f38eb5b831c - trans::expr::trans_into::h0995470e7b548e00ZsA 15: 0x7f38eb53ba66 - trans::controlflow::trans_block::h6757ec40476ddde4slv 16: 0x7f38eb53a381 - trans::base::trans_closure::hdcc3c01c9bca642e7Uh 17: 0x7f38eb53c05a - trans::base::trans_fn::hf52d8c0c091fdef5P5h 18: 0x7f38eb53ee27 - trans::base::trans_item::he4dc60caaf1684eajui 19: 0x7f38eb53f738 - trans::base::trans_item::he4dc60caaf1684eajui 20: 0x7f38eb54ccfc - trans::base::trans_crate::hb11747a7cf1143a4sjj 21: 0x7f38eccc14a4 - driver::phase_4_translate_to_llvm::h29a0d7314fcd3b41nOa 22: 0x7f38ecc9d226 - driver::compile_input::h16cddbb7992cbbbaQba 23: 0x7f38ecd52f21 - run_compiler::h74084e004617dcdcb6b 24: 0x7f38ecd50772 - boxed::F.FnBox&lt;A&gt;::call_box::h10784738899208612549 25: 0x7f38ecd4ff49 - rt::unwind::try::try_fn::h5235027869346842134 26: 0x7f38ec7e9498 - rust_try_inner 27: 0x7f38ec7e9485 - rust_try 28: 0x7f38ec75c247 - rt::unwind::try::inner_try::hb6f04bd1baacc20eKnw 29: 0x7f38ecd5017a - boxed::F.FnBox&lt;A&gt;::call_box::h17245911238432039576 30: 0x7f38ec76f471 - sys::thread::Thread::new::thread_start::h285dd80d49b81cf50xv 31: 0x7f38e6798373 - start_thread 32: 0x7f38ec3c127c - clone 33: 0x0 - &lt;unknown&gt; Could not compile `encoding`. Caused by: Process didn't exit successfully: `rustc src/lib.rs --crate-name encoding --crate-type lib -g --out-dir /home/simon/projects/rust-encoding/target/debug --emit=dep-info,link -L dependency=/home/simon/projects/rust-encoding/target/debug -L dependency=/home/simon/projects/rust-encoding/target/debug/deps --extern encoding_index_tradchinese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_tradchinese-9031d0a206975cd9.rlib --extern encoding_index_singlebyte=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_singlebyte-80fddc2d153c158e.rlib --extern encoding_index_simpchinese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_simpchinese-06c5fe5964f3071e.rlib --extern encoding_index_korean=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_korean-bb2701334d42f010.rlib --extern encoding_index_japanese=/home/simon/projects/rust-encoding/target/debug/deps/libencoding_index_japanese-5e92eb13c020e4d8.rlib` (exit code: 101) </code></pre></div>
<h2 dir="auto">Code</h2> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait Trait {} struct Bar; impl Trait for Bar {} fn main() { let x: &amp;[&amp;Trait] = &amp;[{ &amp;Bar }]; }"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">Trait</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">struct</span> <span class="pl-smi">Bar</span><span class="pl-kos">;</span> <span class="pl-k">impl</span> <span class="pl-smi">Trait</span> <span class="pl-k">for</span> <span class="pl-smi">Bar</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-k">let</span> x<span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-kos">[</span><span class="pl-c1">&amp;</span><span class="pl-smi">Trait</span><span class="pl-kos">]</span> = <span class="pl-c1">&amp;</span><span class="pl-kos">[</span><span class="pl-kos">{</span> <span class="pl-c1">&amp;</span><span class="pl-v">Bar</span> <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <h2 dir="auto">Output</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="main.rs:7:9: 7:10 warning: unused variable: `x`, #[warn(unused_variables)] on by default main.rs:7 let x: &amp;[&amp;Trait] = &amp;[{ &amp;Bar }]; ^ error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'assertion failed: prev_const.is_none() || prev_const == Some(llconst)', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/librustc_trans/trans/consts.rs:321 stack backtrace: 1: 0x1054eb5cf - sys::backtrace::write::h9137c695ab290a14WRs 2: 0x1054f3b82 - panicking::on_panic::h0ae3cf09aff03bc05Pw 3: 0x1054a9d15 - rt::unwind::begin_unwind_inner::h36b4206cb80fb108Oxw 4: 0x102149fcf - rt::unwind::begin_unwind::h6767503471583286242 5: 0x1021c082c - trans::consts::const_expr::h1bbfa5560b941f32nvs 6: 0x102224922 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h7466739370638199104 7: 0x10221baea - trans::consts::const_expr_unadjusted::hd675727493ff08eezLs 8: 0x1021bfff7 - trans::consts::const_expr::h1bbfa5560b941f32nvs 9: 0x10221dc67 - trans::consts::const_expr_unadjusted::hd675727493ff08eezLs 10: 0x1021bfff7 - trans::consts::const_expr::h1bbfa5560b941f32nvs 11: 0x10221a9f9 - trans::consts::get_const_expr_as_global::h2f40511a988c5876yss 12: 0x10218f6ca - trans::expr::trans::h959669806b495bbffdA 13: 0x1022314e0 - trans::expr::trans_into::h43738e587d521f35W6z 14: 0x1022b4e21 - trans::_match::mk_binding_alloca::h2459388509959927399 15: 0x1021a09b9 - trans::base::init_local::h8acf9c70632535fdNVg 16: 0x1021b1453 - trans::controlflow::trans_block::hb872ebbfd195606cZ2u 17: 0x1021b0105 - trans::base::trans_closure::hbf7fcb6cfae5e775KCh 18: 0x1021b1d9e - trans::base::trans_fn::hb08e54207cb8d8e6sNh 19: 0x1021b5308 - trans::base::trans_item::h15647b08683789dbEbi 20: 0x1021c40f0 - trans::base::trans_crate::hdfbb43ad3281f84dE0i 21: 0x101c4fdde - driver::phase_4_translate_to_llvm::he9458af7df85ffb8lOa 22: 0x101c28344 - driver::compile_input::h3c162f55ed6be3a5Qba 23: 0x101cef853 - run_compiler::hae39edbb343296d3D4b 24: 0x101ced37a - boxed::F.FnBox&lt;A&gt;::call_box::h1927805197202631788 25: 0x101cec817 - rt::unwind::try::try_fn::h7355792964568869981 26: 0x10557d998 - rust_try_inner 27: 0x10557d985 - rust_try 28: 0x101cecaf0 - boxed::F.FnBox&lt;A&gt;::call_box::h2359980489235781969 29: 0x1054f26cd - sys::thread::create::thread_start::hfa406746e663ba1bNUv 30: 0x7fff81be3267 - _pthread_body 31: 0x7fff81be31e4 - _pthread_start "><pre class="notranslate"><code class="notranslate">main.rs:7:9: 7:10 warning: unused variable: `x`, #[warn(unused_variables)] on by default main.rs:7 let x: &amp;[&amp;Trait] = &amp;[{ &amp;Bar }]; ^ error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'assertion failed: prev_const.is_none() || prev_const == Some(llconst)', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/librustc_trans/trans/consts.rs:321 stack backtrace: 1: 0x1054eb5cf - sys::backtrace::write::h9137c695ab290a14WRs 2: 0x1054f3b82 - panicking::on_panic::h0ae3cf09aff03bc05Pw 3: 0x1054a9d15 - rt::unwind::begin_unwind_inner::h36b4206cb80fb108Oxw 4: 0x102149fcf - rt::unwind::begin_unwind::h6767503471583286242 5: 0x1021c082c - trans::consts::const_expr::h1bbfa5560b941f32nvs 6: 0x102224922 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h7466739370638199104 7: 0x10221baea - trans::consts::const_expr_unadjusted::hd675727493ff08eezLs 8: 0x1021bfff7 - trans::consts::const_expr::h1bbfa5560b941f32nvs 9: 0x10221dc67 - trans::consts::const_expr_unadjusted::hd675727493ff08eezLs 10: 0x1021bfff7 - trans::consts::const_expr::h1bbfa5560b941f32nvs 11: 0x10221a9f9 - trans::consts::get_const_expr_as_global::h2f40511a988c5876yss 12: 0x10218f6ca - trans::expr::trans::h959669806b495bbffdA 13: 0x1022314e0 - trans::expr::trans_into::h43738e587d521f35W6z 14: 0x1022b4e21 - trans::_match::mk_binding_alloca::h2459388509959927399 15: 0x1021a09b9 - trans::base::init_local::h8acf9c70632535fdNVg 16: 0x1021b1453 - trans::controlflow::trans_block::hb872ebbfd195606cZ2u 17: 0x1021b0105 - trans::base::trans_closure::hbf7fcb6cfae5e775KCh 18: 0x1021b1d9e - trans::base::trans_fn::hb08e54207cb8d8e6sNh 19: 0x1021b5308 - trans::base::trans_item::h15647b08683789dbEbi 20: 0x1021c40f0 - trans::base::trans_crate::hdfbb43ad3281f84dE0i 21: 0x101c4fdde - driver::phase_4_translate_to_llvm::he9458af7df85ffb8lOa 22: 0x101c28344 - driver::compile_input::h3c162f55ed6be3a5Qba 23: 0x101cef853 - run_compiler::hae39edbb343296d3D4b 24: 0x101ced37a - boxed::F.FnBox&lt;A&gt;::call_box::h1927805197202631788 25: 0x101cec817 - rt::unwind::try::try_fn::h7355792964568869981 26: 0x10557d998 - rust_try_inner 27: 0x10557d985 - rust_try 28: 0x101cecaf0 - boxed::F.FnBox&lt;A&gt;::call_box::h2359980489235781969 29: 0x1054f26cd - sys::thread::create::thread_start::hfa406746e663ba1bNUv 30: 0x7fff81be3267 - _pthread_body 31: 0x7fff81be31e4 - _pthread_start </code></pre></div> <h2 dir="auto">Rust Version</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 1.0.0-nightly (1284be404 2015-04-18) (built 2015-04-17) binary: rustc commit-hash: 1284be4044420bc4c41767284ae26be61a38d331 commit-date: 2015-04-18 build-date: 2015-04-17 host: x86_64-apple-darwin release: 1.0.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 1.0.0-nightly (1284be404 2015-04-18) (built 2015-04-17) binary: rustc commit-hash: 1284be4044420bc4c41767284ae26be61a38d331 commit-date: 2015-04-18 build-date: 2015-04-17 host: x86_64-apple-darwin release: 1.0.0-nightly </code></pre></div>
1
<p dir="auto">You get a confusing error message when trying to concat on non-unique (but also non-exactly-equal) indices. Small example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [57]: df1 = pd.DataFrame({'col1': [1, 2, 3]}, index=[0, 0, 1]) ...: df2 = pd.DataFrame({'col2': [1, 2, 3]}, index=[0, 1, 2]) In [59]: pd.concat([df1, df2], axis=1) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-59-756087e4d415&gt; in &lt;module&gt;() ----&gt; 1 pd.concat([df1, df2], axis=1) /home/joris/scipy/pandas/pandas/tools/concat.py in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity, copy) 205 verify_integrity=verify_integrity, 206 copy=copy) --&gt; 207 return op.get_result() 208 209 /home/joris/scipy/pandas/pandas/tools/concat.py in get_result(self) 405 new_data = concatenate_block_managers( 406 mgrs_indexers, self.new_axes, concat_axis=self.axis, --&gt; 407 copy=self.copy) 408 if not self.copy: 409 new_data._consolidate_inplace() /home/joris/scipy/pandas/pandas/core/internals.py in concatenate_block_managers(mgrs_indexers, axes, concat_axis, copy) 4849 placement=placement) for placement, join_units in concat_plan] 4850 -&gt; 4851 return BlockManager(blocks, axes) 4852 4853 /home/joris/scipy/pandas/pandas/core/internals.py in __init__(self, blocks, axes, do_integrity_check, fastpath) 2784 2785 if do_integrity_check: -&gt; 2786 self._verify_integrity() 2787 2788 self._consolidate_check() /home/joris/scipy/pandas/pandas/core/internals.py in _verify_integrity(self) 2994 for block in self.blocks: 2995 if block._verify_integrity and block.shape[1:] != mgr_shape[1:]: -&gt; 2996 construction_error(tot_items, block.shape[1:], self.axes) 2997 if len(self.items) != tot_items: 2998 raise AssertionError('Number of manager items must equal union of ' /home/joris/scipy/pandas/pandas/core/internals.py in construction_error(tot_items, block_shape, axes, e) 4258 raise ValueError(&quot;Empty data passed with indices specified.&quot;) 4259 raise ValueError(&quot;Shape of passed values is {0}, indices imply {1}&quot;.format( -&gt; 4260 passed, implied)) 4261 4262 ValueError: Shape of passed values is (2, 6), indices imply (2, 4) "><pre class="notranslate"><code class="notranslate">In [57]: df1 = pd.DataFrame({'col1': [1, 2, 3]}, index=[0, 0, 1]) ...: df2 = pd.DataFrame({'col2': [1, 2, 3]}, index=[0, 1, 2]) In [59]: pd.concat([df1, df2], axis=1) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-59-756087e4d415&gt; in &lt;module&gt;() ----&gt; 1 pd.concat([df1, df2], axis=1) /home/joris/scipy/pandas/pandas/tools/concat.py in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity, copy) 205 verify_integrity=verify_integrity, 206 copy=copy) --&gt; 207 return op.get_result() 208 209 /home/joris/scipy/pandas/pandas/tools/concat.py in get_result(self) 405 new_data = concatenate_block_managers( 406 mgrs_indexers, self.new_axes, concat_axis=self.axis, --&gt; 407 copy=self.copy) 408 if not self.copy: 409 new_data._consolidate_inplace() /home/joris/scipy/pandas/pandas/core/internals.py in concatenate_block_managers(mgrs_indexers, axes, concat_axis, copy) 4849 placement=placement) for placement, join_units in concat_plan] 4850 -&gt; 4851 return BlockManager(blocks, axes) 4852 4853 /home/joris/scipy/pandas/pandas/core/internals.py in __init__(self, blocks, axes, do_integrity_check, fastpath) 2784 2785 if do_integrity_check: -&gt; 2786 self._verify_integrity() 2787 2788 self._consolidate_check() /home/joris/scipy/pandas/pandas/core/internals.py in _verify_integrity(self) 2994 for block in self.blocks: 2995 if block._verify_integrity and block.shape[1:] != mgr_shape[1:]: -&gt; 2996 construction_error(tot_items, block.shape[1:], self.axes) 2997 if len(self.items) != tot_items: 2998 raise AssertionError('Number of manager items must equal union of ' /home/joris/scipy/pandas/pandas/core/internals.py in construction_error(tot_items, block_shape, axes, e) 4258 raise ValueError("Empty data passed with indices specified.") 4259 raise ValueError("Shape of passed values is {0}, indices imply {1}".format( -&gt; 4260 passed, implied)) 4261 4262 ValueError: Shape of passed values is (2, 6), indices imply (2, 4) </code></pre></div> <hr> <p dir="auto">Original reported issue by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gregsifr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gregsifr">@gregsifr</a> :</p> <details> I am working with a large dataframe of customers which I was unable to concat. After spending some time I narrowed the problem area down to the below (pickled) dataframes and code. <p dir="auto">When trying to concat the dataframes using the following code the error shown below is returned:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd import pickle df1 = pickle.loads('ccopy_reg\n_reconstructor\np1\n(cpandas.core.frame\nDataFrame\np2\nc__builtin__\nobject\np3\nNtRp4\n(dp5\nS\'_metadata\'\np6\n(lp7\nsS\'_typ\'\np8\nS\'dataframe\'\np9\nsS\'_data\'\np10\ng1\n(cpandas.core.internals\nBlockManager\np11\ng3\nNtRp12\n((lp13\ncpandas.core.index\n_new_Index\np14\n(cpandas.core.index\nMultiIndex\np15\n(dp16\nS\'labels\'\np17\n(lp18\ncnumpy.core.multiarray\n_reconstruct\np19\n(cpandas.core.base\nFrozenNDArray\np20\n(I0\ntS\'b\'\ntRp21\n(I1\n(L2L\ntcnumpy\ndtype\np22\n(S\'i1\'\nI0\nI1\ntRp23\n(I3\nS\'|\'\nNNNI-1\nI-1\nI0\ntbI00\nS\'\\x00\\x00\'\ntbag19\n(g20\n(I0\ntS\'b\'\ntRp24\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x01\'\ntbasS\'names\'\np25\n(lp26\nNaNasS\'levels\'\np27\n(lp28\ng14\n(cpandas.core.index\nIndex\np29\n(dp30\nS\'data\'\np31\ng19\n(cnumpy\nndarray\np32\n(I0\ntS\'b\'\ntRp33\n(I1\n(L1L\ntg22\n(S\'O8\'\nI0\nI1\ntRp34\n(I3\nS\'|\'\nNNNI-1\nI-1\nI63\ntbI00\n(lp35\nVCUSTOMER_A\np36\natbsS\'name\'\np37\nNstRp38\nag14\n(g29\n(dp39\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp40\n(I1\n(L2L\ntg34\nI00\n(lp41\nVVISIT_DT\np42\naVPURCHASE\np43\natbsg37\nNstRp44\nasS\'sortorder\'\np45\nNstRp46\nacpandas.tseries.index\n_new_DatetimeIndex\np47\n(cpandas.tseries.index\nDatetimeIndex\np48\n(dp49\nS\'tz\'\np50\nNsS\'freq\'\np51\nNsg31\ng19\n(g32\n(I0\ntS\'b\'\ntRp52\n(I1\n(L22L\ntg22\n(S\'M8\'\nI0\nI1\ntRp53\n(I4\nS\'&lt;\'\nNNNI-1\nI-1\nI0\n((d(S\'ns\'\nI1\nI1\nI1\ntttbI00\nS\'\\x00\\x00\\x1c\\xca\\xf9\\xceO\\x10\\x00\\x00k[\\x8e\\x1dP\\x10\\x00\\x00\\xba\\xec&quot;lP\\x10\\x00\\x00\\t~\\xb7\\xbaP\\x10\\x00\\x00X\\x0fL\\tQ\\x10\\x00\\x00\\xa7\\xa0\\xe0WQ\\x10\\x00\\x00\\x94T\\x9eCR\\x10\\x00\\x00\\xe3\\xe52\\x92R\\x10\\x00\\x002w\\xc7\\xe0R\\x10\\x00\\x00\\x81\\x08\\\\/S\\x10\\x00\\x00\\xd0\\x99\\xf0}S\\x10\\x00\\x00\\xbdM\\xaeiT\\x10\\x00\\x00\\x0c\\xdfB\\xb8T\\x10\\x00\\x00[p\\xd7\\x06U\\x10\\x00\\x00\\xaa\\x01lUU\\x10\\x00\\x00\\xf9\\x92\\x00\\xa4U\\x10\\x00\\x00\\xe6F\\xbe\\x8fV\\x10\\x00\\x005\\xd8R\\xdeV\\x10\\x00\\x00\\x84i\\xe7,W\\x10\\x00\\x00\\xd3\\xfa{{W\\x10\\x00\\x00&quot;\\x8c\\x10\\xcaW\\x10\\x00\\x00\\x0f@\\xce\\xb5X\\x10\'\ntbsg37\nS\'date\'\np54\nstRp55\na(lp56\ng19\n(g32\n(I0\ntS\'b\'\ntRp57\n(I1\n(L2L\nL22L\ntg22\n(S\'f8\'\nI0\nI1\ntRp58\n(I3\nS\'&lt;\'\nNNNI-1\nI-1\nI0\ntbI00\nS\'\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\'\ntba(lp59\ng14\n(g15\n(dp60\ng17\n(lp61\ng19\n(g20\n(I0\ntS\'b\'\ntRp62\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x00\'\ntbag19\n(g20\n(I0\ntS\'b\'\ntRp63\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x01\'\ntbasg25\n(lp64\nNaNasg27\n(lp65\ng14\n(g29\n(dp66\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp67\n(I1\n(L1L\ntg34\nI00\n(lp68\ng36\natbsg37\nNstRp69\nag14\n(g29\n(dp70\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp71\n(I1\n(L2L\ntg34\nI00\n(lp72\ng42\nag43\natbsg37\nNstRp73\nasg45\nNstRp74\na(dp75\nS\'0.14.1\'\np76\n(dp77\nS\'axes\'\np78\ng13\nsS\'blocks\'\np79\n(lp80\n(dp81\nS\'mgr_locs\'\np82\nc__builtin__\nslice\np83\n(I0\nI2\nL1L\ntRp84\nsS\'values\'\np85\ng57\nsasstbsb.') df2 = pickle.loads('ccopy_reg\n_reconstructor\np1\n(cpandas.core.frame\nDataFrame\np2\nc__builtin__\nobject\np3\nNtRp4\n(dp5\nS\'_metadata\'\np6\n(lp7\nsS\'_typ\'\np8\nS\'dataframe\'\np9\nsS\'_data\'\np10\ng1\n(cpandas.core.internals\nBlockManager\np11\ng3\nNtRp12\n((lp13\ncpandas.core.index\n_new_Index\np14\n(cpandas.core.index\nMultiIndex\np15\n(dp16\nS\'labels\'\np17\n(lp18\ncnumpy.core.multiarray\n_reconstruct\np19\n(cpandas.core.base\nFrozenNDArray\np20\n(I0\ntS\'b\'\ntRp21\n(I1\n(L2L\ntcnumpy\ndtype\np22\n(S\'i1\'\nI0\nI1\ntRp23\n(I3\nS\'|\'\nNNNI-1\nI-1\nI0\ntbI00\nS\'\\x00\\x00\'\ntbag19\n(g20\n(I0\ntS\'b\'\ntRp24\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x01\'\ntbasS\'names\'\np25\n(lp26\nNaNasS\'levels\'\np27\n(lp28\ng14\n(cpandas.core.index\nIndex\np29\n(dp30\nS\'data\'\np31\ng19\n(cnumpy\nndarray\np32\n(I0\ntS\'b\'\ntRp33\n(I1\n(L1L\ntg22\n(S\'O8\'\nI0\nI1\ntRp34\n(I3\nS\'|\'\nNNNI-1\nI-1\nI63\ntbI00\n(lp35\nVCUSTOMER_B\np36\natbsS\'name\'\np37\nNstRp38\nag14\n(g29\n(dp39\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp40\n(I1\n(L2L\ntg34\nI00\n(lp41\nVVISIT_DT\np42\naVPURCHASE\np43\natbsg37\nNstRp44\nasS\'sortorder\'\np45\nNstRp46\nacpandas.tseries.index\n_new_DatetimeIndex\np47\n(cpandas.tseries.index\nDatetimeIndex\np48\n(dp49\nS\'tz\'\np50\nNsS\'freq\'\np51\nNsg31\ng19\n(g32\n(I0\ntS\'b\'\ntRp52\n(I1\n(L24L\ntg22\n(S\'M8\'\nI0\nI1\ntRp53\n(I4\nS\'&lt;\'\nNNNI-1\nI-1\nI0\n((d(S\'ns\'\nI1\nI1\nI1\ntttbI00\nS\'\\x00\\x00k[\\x8e\\x1dP\\x10\\x00\\x00\\xba\\xec&quot;lP\\x10\\x00\\x00\\t~\\xb7\\xbaP\\x10\\x00\\x00X\\x0fL\\tQ\\x10\\x00\\x00\\xa7\\xa0\\xe0WQ\\x10\\x00\\x00\\x94T\\x9eCR\\x10\\x00\\x00\\xe3\\xe52\\x92R\\x10\\x00\\x002w\\xc7\\xe0R\\x10\\x00\\x00\\x81\\x08\\\\/S\\x10\\x00\\x00\\xd0\\x99\\xf0}S\\x10\\x00\\x00\\xbdM\\xaeiT\\x10\\x00\\x00\\x0c\\xdfB\\xb8T\\x10\\x00\\x00[p\\xd7\\x06U\\x10\\x00\\x00\\xaa\\x01lUU\\x10\\x00\\x00\\xf9\\x92\\x00\\xa4U\\x10\\x00\\x00\\xe6F\\xbe\\x8fV\\x10\\x00\\x005\\xd8R\\xdeV\\x10\\x00\\x00\\x84i\\xe7,W\\x10\\x00\\x00\\xd3\\xfa{{W\\x10\\x00\\x00&quot;\\x8c\\x10\\xcaW\\x10\\x00\\x00\\xc0\\xae9gX\\x10\\x00\\x00\\xc0\\xae9gX\\x10\\x00\\x00\\xc0\\xae9gX\\x10\\x00\\x00\\x0f@\\xce\\xb5X\\x10\'\ntbsg37\nS\'date\'\np54\nstRp55\na(lp56\ng19\n(g32\n(I0\ntS\'b\'\ntRp57\n(I1\n(L2L\nL24L\ntg22\n(S\'f8\'\nI0\nI1\ntRp58\n(I3\nS\'&lt;\'\nNNNI-1\nI-1\nI0\ntbI00\nS\'\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\xf0\\x0c$sA\\x00\\x00\\x00\\xf0\\x0c$sA\\x00\\x00\\x00\\xf0\\x0c$sA\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\'\ntba(lp59\ng14\n(g15\n(dp60\ng17\n(lp61\ng19\n(g20\n(I0\ntS\'b\'\ntRp62\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x00\'\ntbag19\n(g20\n(I0\ntS\'b\'\ntRp63\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x01\'\ntbasg25\n(lp64\nNaNasg27\n(lp65\ng14\n(g29\n(dp66\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp67\n(I1\n(L1L\ntg34\nI00\n(lp68\ng36\natbsg37\nNstRp69\nag14\n(g29\n(dp70\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp71\n(I1\n(L2L\ntg34\nI00\n(lp72\ng42\nag43\natbsg37\nNstRp73\nasg45\nNstRp74\na(dp75\nS\'0.14.1\'\np76\n(dp77\nS\'axes\'\np78\ng13\nsS\'blocks\'\np79\n(lp80\n(dp81\nS\'mgr_locs\'\np82\nc__builtin__\nslice\np83\n(I0\nI2\nL1L\ntRp84\nsS\'values\'\np85\ng57\nsasstbsb.') customers, tables = ['CUSTOMER_A', 'CUSTOMER_B'], [df1.iloc[:], df2.iloc[:]] tables = pd.concat(tables, keys=customers, axis=1)"><pre class="notranslate"><code class="notranslate">import pandas as pd import pickle df1 = pickle.loads('ccopy_reg\n_reconstructor\np1\n(cpandas.core.frame\nDataFrame\np2\nc__builtin__\nobject\np3\nNtRp4\n(dp5\nS\'_metadata\'\np6\n(lp7\nsS\'_typ\'\np8\nS\'dataframe\'\np9\nsS\'_data\'\np10\ng1\n(cpandas.core.internals\nBlockManager\np11\ng3\nNtRp12\n((lp13\ncpandas.core.index\n_new_Index\np14\n(cpandas.core.index\nMultiIndex\np15\n(dp16\nS\'labels\'\np17\n(lp18\ncnumpy.core.multiarray\n_reconstruct\np19\n(cpandas.core.base\nFrozenNDArray\np20\n(I0\ntS\'b\'\ntRp21\n(I1\n(L2L\ntcnumpy\ndtype\np22\n(S\'i1\'\nI0\nI1\ntRp23\n(I3\nS\'|\'\nNNNI-1\nI-1\nI0\ntbI00\nS\'\\x00\\x00\'\ntbag19\n(g20\n(I0\ntS\'b\'\ntRp24\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x01\'\ntbasS\'names\'\np25\n(lp26\nNaNasS\'levels\'\np27\n(lp28\ng14\n(cpandas.core.index\nIndex\np29\n(dp30\nS\'data\'\np31\ng19\n(cnumpy\nndarray\np32\n(I0\ntS\'b\'\ntRp33\n(I1\n(L1L\ntg22\n(S\'O8\'\nI0\nI1\ntRp34\n(I3\nS\'|\'\nNNNI-1\nI-1\nI63\ntbI00\n(lp35\nVCUSTOMER_A\np36\natbsS\'name\'\np37\nNstRp38\nag14\n(g29\n(dp39\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp40\n(I1\n(L2L\ntg34\nI00\n(lp41\nVVISIT_DT\np42\naVPURCHASE\np43\natbsg37\nNstRp44\nasS\'sortorder\'\np45\nNstRp46\nacpandas.tseries.index\n_new_DatetimeIndex\np47\n(cpandas.tseries.index\nDatetimeIndex\np48\n(dp49\nS\'tz\'\np50\nNsS\'freq\'\np51\nNsg31\ng19\n(g32\n(I0\ntS\'b\'\ntRp52\n(I1\n(L22L\ntg22\n(S\'M8\'\nI0\nI1\ntRp53\n(I4\nS\'&lt;\'\nNNNI-1\nI-1\nI0\n((d(S\'ns\'\nI1\nI1\nI1\ntttbI00\nS\'\\x00\\x00\\x1c\\xca\\xf9\\xceO\\x10\\x00\\x00k[\\x8e\\x1dP\\x10\\x00\\x00\\xba\\xec"lP\\x10\\x00\\x00\\t~\\xb7\\xbaP\\x10\\x00\\x00X\\x0fL\\tQ\\x10\\x00\\x00\\xa7\\xa0\\xe0WQ\\x10\\x00\\x00\\x94T\\x9eCR\\x10\\x00\\x00\\xe3\\xe52\\x92R\\x10\\x00\\x002w\\xc7\\xe0R\\x10\\x00\\x00\\x81\\x08\\\\/S\\x10\\x00\\x00\\xd0\\x99\\xf0}S\\x10\\x00\\x00\\xbdM\\xaeiT\\x10\\x00\\x00\\x0c\\xdfB\\xb8T\\x10\\x00\\x00[p\\xd7\\x06U\\x10\\x00\\x00\\xaa\\x01lUU\\x10\\x00\\x00\\xf9\\x92\\x00\\xa4U\\x10\\x00\\x00\\xe6F\\xbe\\x8fV\\x10\\x00\\x005\\xd8R\\xdeV\\x10\\x00\\x00\\x84i\\xe7,W\\x10\\x00\\x00\\xd3\\xfa{{W\\x10\\x00\\x00"\\x8c\\x10\\xcaW\\x10\\x00\\x00\\x0f@\\xce\\xb5X\\x10\'\ntbsg37\nS\'date\'\np54\nstRp55\na(lp56\ng19\n(g32\n(I0\ntS\'b\'\ntRp57\n(I1\n(L2L\nL22L\ntg22\n(S\'f8\'\nI0\nI1\ntRp58\n(I3\nS\'&lt;\'\nNNNI-1\nI-1\nI0\ntbI00\nS\'\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\'\ntba(lp59\ng14\n(g15\n(dp60\ng17\n(lp61\ng19\n(g20\n(I0\ntS\'b\'\ntRp62\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x00\'\ntbag19\n(g20\n(I0\ntS\'b\'\ntRp63\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x01\'\ntbasg25\n(lp64\nNaNasg27\n(lp65\ng14\n(g29\n(dp66\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp67\n(I1\n(L1L\ntg34\nI00\n(lp68\ng36\natbsg37\nNstRp69\nag14\n(g29\n(dp70\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp71\n(I1\n(L2L\ntg34\nI00\n(lp72\ng42\nag43\natbsg37\nNstRp73\nasg45\nNstRp74\na(dp75\nS\'0.14.1\'\np76\n(dp77\nS\'axes\'\np78\ng13\nsS\'blocks\'\np79\n(lp80\n(dp81\nS\'mgr_locs\'\np82\nc__builtin__\nslice\np83\n(I0\nI2\nL1L\ntRp84\nsS\'values\'\np85\ng57\nsasstbsb.') df2 = pickle.loads('ccopy_reg\n_reconstructor\np1\n(cpandas.core.frame\nDataFrame\np2\nc__builtin__\nobject\np3\nNtRp4\n(dp5\nS\'_metadata\'\np6\n(lp7\nsS\'_typ\'\np8\nS\'dataframe\'\np9\nsS\'_data\'\np10\ng1\n(cpandas.core.internals\nBlockManager\np11\ng3\nNtRp12\n((lp13\ncpandas.core.index\n_new_Index\np14\n(cpandas.core.index\nMultiIndex\np15\n(dp16\nS\'labels\'\np17\n(lp18\ncnumpy.core.multiarray\n_reconstruct\np19\n(cpandas.core.base\nFrozenNDArray\np20\n(I0\ntS\'b\'\ntRp21\n(I1\n(L2L\ntcnumpy\ndtype\np22\n(S\'i1\'\nI0\nI1\ntRp23\n(I3\nS\'|\'\nNNNI-1\nI-1\nI0\ntbI00\nS\'\\x00\\x00\'\ntbag19\n(g20\n(I0\ntS\'b\'\ntRp24\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x01\'\ntbasS\'names\'\np25\n(lp26\nNaNasS\'levels\'\np27\n(lp28\ng14\n(cpandas.core.index\nIndex\np29\n(dp30\nS\'data\'\np31\ng19\n(cnumpy\nndarray\np32\n(I0\ntS\'b\'\ntRp33\n(I1\n(L1L\ntg22\n(S\'O8\'\nI0\nI1\ntRp34\n(I3\nS\'|\'\nNNNI-1\nI-1\nI63\ntbI00\n(lp35\nVCUSTOMER_B\np36\natbsS\'name\'\np37\nNstRp38\nag14\n(g29\n(dp39\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp40\n(I1\n(L2L\ntg34\nI00\n(lp41\nVVISIT_DT\np42\naVPURCHASE\np43\natbsg37\nNstRp44\nasS\'sortorder\'\np45\nNstRp46\nacpandas.tseries.index\n_new_DatetimeIndex\np47\n(cpandas.tseries.index\nDatetimeIndex\np48\n(dp49\nS\'tz\'\np50\nNsS\'freq\'\np51\nNsg31\ng19\n(g32\n(I0\ntS\'b\'\ntRp52\n(I1\n(L24L\ntg22\n(S\'M8\'\nI0\nI1\ntRp53\n(I4\nS\'&lt;\'\nNNNI-1\nI-1\nI0\n((d(S\'ns\'\nI1\nI1\nI1\ntttbI00\nS\'\\x00\\x00k[\\x8e\\x1dP\\x10\\x00\\x00\\xba\\xec"lP\\x10\\x00\\x00\\t~\\xb7\\xbaP\\x10\\x00\\x00X\\x0fL\\tQ\\x10\\x00\\x00\\xa7\\xa0\\xe0WQ\\x10\\x00\\x00\\x94T\\x9eCR\\x10\\x00\\x00\\xe3\\xe52\\x92R\\x10\\x00\\x002w\\xc7\\xe0R\\x10\\x00\\x00\\x81\\x08\\\\/S\\x10\\x00\\x00\\xd0\\x99\\xf0}S\\x10\\x00\\x00\\xbdM\\xaeiT\\x10\\x00\\x00\\x0c\\xdfB\\xb8T\\x10\\x00\\x00[p\\xd7\\x06U\\x10\\x00\\x00\\xaa\\x01lUU\\x10\\x00\\x00\\xf9\\x92\\x00\\xa4U\\x10\\x00\\x00\\xe6F\\xbe\\x8fV\\x10\\x00\\x005\\xd8R\\xdeV\\x10\\x00\\x00\\x84i\\xe7,W\\x10\\x00\\x00\\xd3\\xfa{{W\\x10\\x00\\x00"\\x8c\\x10\\xcaW\\x10\\x00\\x00\\xc0\\xae9gX\\x10\\x00\\x00\\xc0\\xae9gX\\x10\\x00\\x00\\xc0\\xae9gX\\x10\\x00\\x00\\x0f@\\xce\\xb5X\\x10\'\ntbsg37\nS\'date\'\np54\nstRp55\na(lp56\ng19\n(g32\n(I0\ntS\'b\'\ntRp57\n(I1\n(L2L\nL24L\ntg22\n(S\'f8\'\nI0\nI1\ntRp58\n(I3\nS\'&lt;\'\nNNNI-1\nI-1\nI0\ntbI00\nS\'\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\xf0\\x0c$sA\\x00\\x00\\x00\\xf0\\x0c$sA\\x00\\x00\\x00\\xf0\\x0c$sA\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\\x00\\x00\\x00\\x00\\x00\\x00\\xf8\\x7f\'\ntba(lp59\ng14\n(g15\n(dp60\ng17\n(lp61\ng19\n(g20\n(I0\ntS\'b\'\ntRp62\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x00\'\ntbag19\n(g20\n(I0\ntS\'b\'\ntRp63\n(I1\n(L2L\ntg23\nI00\nS\'\\x00\\x01\'\ntbasg25\n(lp64\nNaNasg27\n(lp65\ng14\n(g29\n(dp66\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp67\n(I1\n(L1L\ntg34\nI00\n(lp68\ng36\natbsg37\nNstRp69\nag14\n(g29\n(dp70\ng31\ng19\n(g32\n(I0\ntS\'b\'\ntRp71\n(I1\n(L2L\ntg34\nI00\n(lp72\ng42\nag43\natbsg37\nNstRp73\nasg45\nNstRp74\na(dp75\nS\'0.14.1\'\np76\n(dp77\nS\'axes\'\np78\ng13\nsS\'blocks\'\np79\n(lp80\n(dp81\nS\'mgr_locs\'\np82\nc__builtin__\nslice\np83\n(I0\nI2\nL1L\ntRp84\nsS\'values\'\np85\ng57\nsasstbsb.') customers, tables = ['CUSTOMER_A', 'CUSTOMER_B'], [df1.iloc[:], df2.iloc[:]] tables = pd.concat(tables, keys=customers, axis=1) </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-22-8096f8962dec&gt; in &lt;module&gt;() 6 7 customers, tables = ['CUSTOMER_A', 'CUSTOMER_B'], [df1.iloc[:], df2.iloc[:]] ----&gt; 8 tables = pd.concat(tables, keys=customers, axis=1) /home/code/anaconda2/lib/python2.7/site-packages/pandas/tools/merge.pyc in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity, copy) 833 verify_integrity=verify_integrity, 834 copy=copy) --&gt; 835 return op.get_result() 836 837 /home/code/anaconda2/lib/python2.7/site-packages/pandas/tools/merge.pyc in get_result(self) 1023 new_data = concatenate_block_managers( 1024 mgrs_indexers, self.new_axes, -&gt; 1025 concat_axis=self.axis, copy=self.copy) 1026 if not self.copy: 1027 new_data._consolidate_inplace() /home/code/anaconda2/lib/python2.7/site-packages/pandas/core/internals.pyc in concatenate_block_managers(mgrs_indexers, axes, concat_axis, copy) 4474 for placement, join_units in concat_plan] 4475 -&gt; 4476 return BlockManager(blocks, axes) 4477 4478 /home/code/anaconda2/lib/python2.7/site-packages/pandas/core/internals.pyc in __init__(self, blocks, axes, do_integrity_check, fastpath) 2535 2536 if do_integrity_check: -&gt; 2537 self._verify_integrity() 2538 2539 self._consolidate_check() /home/code/anaconda2/lib/python2.7/site-packages/pandas/core/internals.pyc in _verify_integrity(self) 2745 for block in self.blocks: 2746 if block._verify_integrity and block.shape[1:] != mgr_shape[1:]: -&gt; 2747 construction_error(tot_items, block.shape[1:], self.axes) 2748 if len(self.items) != tot_items: 2749 raise AssertionError('Number of manager items must equal union of ' /home/code/anaconda2/lib/python2.7/site-packages/pandas/core/internals.pyc in construction_error(tot_items, block_shape, axes, e) 3897 raise ValueError(&quot;Empty data passed with indices specified.&quot;) 3898 raise ValueError(&quot;Shape of passed values is {0}, indices imply {1}&quot;.format( -&gt; 3899 passed, implied)) 3900 3901 ValueError: Shape of passed values is (4, 31), indices imply (4, 25)"><pre class="notranslate"><code class="notranslate">--------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-22-8096f8962dec&gt; in &lt;module&gt;() 6 7 customers, tables = ['CUSTOMER_A', 'CUSTOMER_B'], [df1.iloc[:], df2.iloc[:]] ----&gt; 8 tables = pd.concat(tables, keys=customers, axis=1) /home/code/anaconda2/lib/python2.7/site-packages/pandas/tools/merge.pyc in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity, copy) 833 verify_integrity=verify_integrity, 834 copy=copy) --&gt; 835 return op.get_result() 836 837 /home/code/anaconda2/lib/python2.7/site-packages/pandas/tools/merge.pyc in get_result(self) 1023 new_data = concatenate_block_managers( 1024 mgrs_indexers, self.new_axes, -&gt; 1025 concat_axis=self.axis, copy=self.copy) 1026 if not self.copy: 1027 new_data._consolidate_inplace() /home/code/anaconda2/lib/python2.7/site-packages/pandas/core/internals.pyc in concatenate_block_managers(mgrs_indexers, axes, concat_axis, copy) 4474 for placement, join_units in concat_plan] 4475 -&gt; 4476 return BlockManager(blocks, axes) 4477 4478 /home/code/anaconda2/lib/python2.7/site-packages/pandas/core/internals.pyc in __init__(self, blocks, axes, do_integrity_check, fastpath) 2535 2536 if do_integrity_check: -&gt; 2537 self._verify_integrity() 2538 2539 self._consolidate_check() /home/code/anaconda2/lib/python2.7/site-packages/pandas/core/internals.pyc in _verify_integrity(self) 2745 for block in self.blocks: 2746 if block._verify_integrity and block.shape[1:] != mgr_shape[1:]: -&gt; 2747 construction_error(tot_items, block.shape[1:], self.axes) 2748 if len(self.items) != tot_items: 2749 raise AssertionError('Number of manager items must equal union of ' /home/code/anaconda2/lib/python2.7/site-packages/pandas/core/internals.pyc in construction_error(tot_items, block_shape, axes, e) 3897 raise ValueError("Empty data passed with indices specified.") 3898 raise ValueError("Shape of passed values is {0}, indices imply {1}".format( -&gt; 3899 passed, implied)) 3900 3901 ValueError: Shape of passed values is (4, 31), indices imply (4, 25) </code></pre></div> <p dir="auto">However if the dataframes are sliced e.g. [:10] OR [10:], the concat works:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="customers, tables = ['CUSTOMER_A', 'CUSTOMER_B'], [df1.iloc[:20], df2.iloc[:20]] tables = pd.concat(tables, keys=customers, axis=1) tables"><pre class="notranslate"><code class="notranslate">customers, tables = ['CUSTOMER_A', 'CUSTOMER_B'], [df1.iloc[:20], df2.iloc[:20]] tables = pd.concat(tables, keys=customers, axis=1) tables </code></pre></div> <p dir="auto">Output of <code class="notranslate">pd.show_versions()</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INSTALLED VERSIONS ------------------ commit: None python: 2.7.11.final.0 python-bits: 64 OS: Linux OS-release: 3.19.0-58-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_AU.UTF-8 pandas: 0.18.0 nose: 1.3.7 pip: 8.1.1 setuptools: 20.6.7 Cython: 0.24 numpy: 1.10.4 scipy: 0.17.0 statsmodels: 0.6.1 xarray: None IPython: 4.1.2 sphinx: 1.4.1 patsy: 0.4.1 dateutil: 2.5.2 pytz: 2016.3 blosc: None bottleneck: 1.0.0 tables: 3.2.2 numexpr: 2.5.2 matplotlib: 1.5.1 openpyxl: 2.3.2 xlrd: 0.9.4 xlwt: 1.0.0 xlsxwriter: 0.8.4 lxml: 3.6.0 bs4: 4.4.1 html5lib: None httplib2: None apiclient: None sqlalchemy: 1.0.12 pymysql: None psycopg2: 2.6.1 (dt dec pq3 ext) jinja2: 2.8 boto: 2.39.0"><pre class="notranslate"><code class="notranslate">INSTALLED VERSIONS ------------------ commit: None python: 2.7.11.final.0 python-bits: 64 OS: Linux OS-release: 3.19.0-58-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_AU.UTF-8 pandas: 0.18.0 nose: 1.3.7 pip: 8.1.1 setuptools: 20.6.7 Cython: 0.24 numpy: 1.10.4 scipy: 0.17.0 statsmodels: 0.6.1 xarray: None IPython: 4.1.2 sphinx: 1.4.1 patsy: 0.4.1 dateutil: 2.5.2 pytz: 2016.3 blosc: None bottleneck: 1.0.0 tables: 3.2.2 numexpr: 2.5.2 matplotlib: 1.5.1 openpyxl: 2.3.2 xlrd: 0.9.4 xlwt: 1.0.0 xlsxwriter: 0.8.4 lxml: 3.6.0 bs4: 4.4.1 html5lib: None httplib2: None apiclient: None sqlalchemy: 1.0.12 pymysql: None psycopg2: 2.6.1 (dt dec pq3 ext) jinja2: 2.8 boto: 2.39.0 </code></pre></div> </details>
<p dir="auto">When concatting two dataframes where there are a) there are duplicate columns in one of the dataframes, and b) there are non-overlapping column names in both, then you get a IndexError:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [9]: df1 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B1']) ...: df2 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B2']) In [10]: pd.concat([df1, df2]) Traceback (most recent call last): File &quot;&lt;ipython-input-10-f61a1ab4009e&gt;&quot;, line 1, in &lt;module&gt; pd.concat([df1, df2]) ... File &quot;c:\users\vdbosscj\scipy\pandas-joris\pandas\core\index.py&quot;, line 765, in take taken = self.view(np.ndarray).take(indexer) IndexError: index 3 is out of bounds for axis 0 with size 3"><pre class="notranslate"><code class="notranslate">In [9]: df1 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B1']) ...: df2 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B2']) In [10]: pd.concat([df1, df2]) Traceback (most recent call last): File "&lt;ipython-input-10-f61a1ab4009e&gt;", line 1, in &lt;module&gt; pd.concat([df1, df2]) ... File "c:\users\vdbosscj\scipy\pandas-joris\pandas\core\index.py", line 765, in take taken = self.view(np.ndarray).take(indexer) IndexError: index 3 is out of bounds for axis 0 with size 3 </code></pre></div> <p dir="auto">I don't know if it should work (although I suppose it should, as with only the duplicate columns it does work), but at least the error message is not really helpfull.</p>
1
<p dir="auto">This log is showing frequently if a gif image in Recyclerview is not visible yet. But if gif image is visible the log stop? I use it without specifying it if its asBitmap or asGif because I want to allow the user to be able to put jpg or gif and load it to recyclerview.</p>
<p dir="auto"><strong>Glide Version/Integration library (if any)</strong>:3.6.1 with okhttp-integration:1.3.1@aar<br> <strong>Device/Android Version</strong>: Nexus 5X, v.6.0.<br> <strong>Issue details/Repro steps/Use case background</strong>:</p> <p dir="auto">I'm using Glide for displaying images in RecyclerView and in FragmentStatePagerAdapter. On pre M versions of Android everything is going as expected. I did not faced any issues mentioned in <a href="https://github.com/bumptech/glide/wiki/Resource-re-use-in-Glide">https://github.com/bumptech/glide/wiki/Resource-re-use-in-Glide</a>. But on the Android 6 i'm getting this warning when scrolling the RecyclerView or FragmentPages.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="W/Bitmap: Called reconfigure on a bitmap that is in use! This may cause graphical corruption!"><pre class="notranslate"><code class="notranslate">W/Bitmap: Called reconfigure on a bitmap that is in use! This may cause graphical corruption! </code></pre></div> <p dir="auto">I put a method onViewRecycled to the RecyclerView adapter, and increased RV pool size. It seems to be helping, but not completely. I'm still have this problem in the FragmentPager, and when I return to the RecyclerView by pressing back button, the warnings are back (I guess that can probably be fixed by increasing RV pool size in onResume).</p> <p dir="auto">I'm loading the images from device as bitmaps. Can this be the source of the issue?</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="Glide.with(context) .load(Uri.parse(filepath)) .asBitmap() .centerCrop() .diskCacheStrategy(DiskCacheStrategy.ALL) .into(holder.guideCover);"><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-smi">Uri</span>.<span class="pl-en">parse</span>(<span class="pl-s1">filepath</span>)) .<span class="pl-en">asBitmap</span>() .<span class="pl-en">centerCrop</span>() .<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">ALL</span>) .<span class="pl-en">into</span>(<span class="pl-s1">holder</span>.<span class="pl-s1">guideCover</span>);</pre></div> <p dir="auto">I love to use Glide because is super fast. The application is running as expected, hoverer I'm a bit nervous of those warning messages.</p> <p dir="auto">What I'm doing wrong?</p>
1
<p dir="auto">The following code snippet emits a very odd error message (requires the GSL library):</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type gsl_error_handler_t end custom_gsl_error_handler = convert(Ptr{gsl_error_handler_t}, cfunction(error, Void, ())) function set_error_handler(new_handler::Ptr{gsl_error_handler_t}) output_ptr = ccall( (:gsl_set_error_handler, :libgsl), Ref{gsl_error_handler_t}, #&lt;--- User error: should be Ptr{...} (Ptr{gsl_error_handler_t}, ), new_handler ) end set_error_handler(custom_gsl_error_handler)"><pre class="notranslate">type gsl_error_handler_t <span class="pl-k">end</span> custom_gsl_error_handler <span class="pl-k">=</span> <span class="pl-c1">convert</span>(Ptr{gsl_error_handler_t}, <span class="pl-c1">cfunction</span>(error, Void, ())) <span class="pl-k">function</span> <span class="pl-en">set_error_handler</span>(new_handler<span class="pl-k">::</span><span class="pl-c1">Ptr{gsl_error_handler_t}</span>) output_ptr <span class="pl-k">=</span> <span class="pl-c1">ccall</span>( (<span class="pl-c1">:gsl_set_error_handler</span>, <span class="pl-c1">:libgsl</span>), Ref{gsl_error_handler_t}, <span class="pl-c"><span class="pl-c">#</span>&lt;--- User error: should be Ptr{...}</span> (Ptr{gsl_error_handler_t}, ), new_handler ) <span class="pl-k">end</span> <span class="pl-c1">set_error_handler</span>(custom_gsl_error_handler)</pre></div> <p dir="auto">Result:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: UndefVarError: result not defined in include_from_node1 at ./loading.jl:316 in process_options at ./client.jl:275 in _start at ./client.jl:375"><pre class="notranslate"><code class="notranslate">ERROR: UndefVarError: result not defined in include_from_node1 at ./loading.jl:316 in process_options at ./client.jl:275 in _start at ./client.jl:375 </code></pre></div> <p dir="auto"><code class="notranslate">result</code> is not defined in this code, nor is it ever used at the user level, so this error is rather cryptic.</p> <p dir="auto">Observed on release-0.4 and master.</p>
<h3 dir="auto">TL;DR</h3> <p dir="auto">This is a runtime debug option proposed by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/carnaval/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/carnaval">@carnaval</a> to catch common misuse of <code class="notranslate">ccall</code> which could otherwise cause corruption that's hard to debug.</p> <h3 dir="auto">The problem</h3> <blockquote> <p dir="auto">...... when someone trashed a tag. Often happens in pools with OOB stores, ...... Unfortunately it's<br> the only "downside" of having an almost too easy C FFI.<br>         -- Oscar Blumberg (<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/carnaval/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/carnaval">@carnaval</a>) at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="91967127" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/11945" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/11945/hovercard?comment_id=117165822&amp;comment_type=issue_comment" href="https://github.com/JuliaLang/julia/issues/11945#issuecomment-117165822">#11945 (comment)</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="91967127" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/11945" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/11945/hovercard?comment_id=117172936&amp;comment_type=issue_comment" href="https://github.com/JuliaLang/julia/issues/11945#issuecomment-117172936">#11945 (comment)</a></p> </blockquote> <p dir="auto">The issue here is that it is very/too easy to pass a pointer to an object to a C function with <code class="notranslate">ccall</code>. This is one of the awesomeness of Julia. However, if the user makes a mistake about the C api, commonly not allocating enough memory, the c function might write to memory that is not meant to be written which could corrupt the GC managed memory and crashes with spectacular backtrace (pages of <code class="notranslate">push_root</code>).</p> <p dir="auto">This happens surprisingly often. It can be caused by making mistake on the c-interface or <code class="notranslate">ccall</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="91967127" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/11945" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/11945/hovercard" href="https://github.com/JuliaLang/julia/issues/11945">#11945</a>), upstream abi breakage (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="89377105" data-permission-text="Title is private" data-url="https://github.com/JuliaInterop/ZMQ.jl/issues/83" data-hovercard-type="issue" data-hovercard-url="/JuliaInterop/ZMQ.jl/issues/83/hovercard" href="https://github.com/JuliaInterop/ZMQ.jl/issues/83">JuliaInterop/ZMQ.jl#83</a>) or just not careful enough on refactoring (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="95061324" data-permission-text="Title is private" data-url="https://github.com/JuliaGPU/OpenCL.jl/issues/65" data-hovercard-type="pull_request" data-hovercard-url="/JuliaGPU/OpenCL.jl/pull/65/hovercard" href="https://github.com/JuliaGPU/OpenCL.jl/pull/65">JuliaGPU/OpenCL.jl#65</a>) (I'm only aware of these but there's probably more...).</p> <p dir="auto">This kind of issue is also relatively hard to debug as they happens randomly and usually crashes in totally unrelated places. With <a href="https://github.com/JuliaLang/julia/issues/11313#issuecomment-102833790" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/11313/hovercard">@carnaval 's guide</a> on GC debugging, it is not impossibly to figure out the issue but is nontheless much harder than using <code class="notranslate">ccall</code> (unless, of course, if <a href="https://github.com/keno/">someone</a> can <a href="https://github.com/Keno/Cxx.jl">somehow</a> integrate lldb (or sth else) in julia).</p> <h3 dir="auto">Solution</h3> <p dir="auto">It's very hard (if not impossible) to detect this issue ahead of time but it would really help debugging and fixing the issue if the error is raised as early as possible (at the <code class="notranslate">ccall</code> site). One way to do that, proposed by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/carnaval/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/carnaval">@carnaval</a> , is to allocate some extra memory with known random content for each object and check after each ccall to make sure the c function didn't modify them.</p> <h3 dir="auto">Implementation</h3> <p dir="auto">AFAICT, one (only?) missing part for implementing this is to figure out on which objects/memory regions this check should be performed. There are several possibilities that I can think of:</p> <ol dir="auto"> <li> <p dir="auto">Do it statically in codegen.</p> <p dir="auto">This is hard because <code class="notranslate">ccall</code> only see the pointer after <code class="notranslate">unsafe_convert</code> (or the user may even convert using <code class="notranslate">pointer</code> directly).</p> </li> <li> <p dir="auto">Scan every objects.</p> <p dir="auto">This should be doable and should be relatively easy to implement (just add an extra call into the GC after each <code class="notranslate">ccall</code> site). The obvious problem would be performance. This can probably be implemented as a more aggressive mode to catch corner cases but should probably not be the default one.</p> </li> <li> <p dir="auto">Let the GC figure out if the pointer should be sanitized.</p> <p dir="auto">I think this is the best compromise between performance and implementation difficulty. The idea is to use the machinery for conservative stack scan to figure out if a pointer is pointing to a GC object. The codegen will just pass all pointer arguments to the GC and do all the work there. An additional benefit of this is that it can be used to verify that the object is properly rooted.</p> </li> </ol> <h3 dir="auto">Other concern</h3> <ul dir="auto"> <li> <p dir="auto">Stack allocated memory</p> <p dir="auto">Currently only limited to the <code class="notranslate">&amp;</code> <code class="notranslate">ccall</code> operator and can be special cased. If we have more general stack allocation of mutable object, we can probably keep track of them in this mode the same way we keep the gc frame.</p> </li> <li> <p dir="auto">Concurrency</p> <p dir="auto">In order to support multiple thread using the same object, the random data in the padding should probably be assigned at allocation time and never changes afterword (i.e. cannot be filled just before <code class="notranslate">ccall</code>).</p> </li> <li> <p dir="auto">Mixing generated code with and without option (e.g. running in this mode with sysimg generated without such option)</p> <p dir="auto">The GC should keep track of whether each object has padding allocated (heap allocated ones should be consistent, stack allocation might need more detail tracking) and do the check accordingly.</p> </li> </ul>
1
<p dir="auto">Running TensorBoard r0.9 results in graph visualizations as expected but all events and histograms that successfully displayed in r0.8 <a href="http://stackoverflow.com/q/37684739/656912" rel="nofollow">are not</a>.</p> <p dir="auto">Has r0.9 introduced a change to the command line that should be used to launch TensorBoard, or to the code needed to generate events and histograms for TensorBoard to display?</p> <p dir="auto">Note that neither new summaries and histograms written with recent runs using r0.9 TensorFlow, nor existing ones written (and displayed) in the past, are displayed. Graphs generated with both releases display as expected.</p> <h3 dir="auto">Environment info</h3> <p dir="auto">Operating System: OS X 10.11.5<br> TensorFlow: .9.0rc0</p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto"><code class="notranslate">tensorboard --logdir ./tflog --purge_orphaned_data</code></p> <h3 dir="auto">What have you tried?</h3> <p dir="auto">Reverting to r0.8, which works as it originally did, displaying all events and histograms present in the <code class="notranslate">tflog</code>directory provided as the <code class="notranslate">logdir</code>. Reinstalling r0.9, which reproduces the error. A second attempt at reinstalling r0.8 resulted in a TensorBoard that displays jus the menu (no content) and uses a different style (a serif face).</p>
<p dir="auto">Since about a week now there seems something wrong with the TensorBoard demo at <a href="https://www.tensorflow.org/tensorboard/index.html#events" rel="nofollow">https://www.tensorflow.org/tensorboard/index.html#events</a>. The graph shows nicely, but neither events nor histograms show up. This problem seems to be only with the demo -- everything shows up just fine when I run the corresponding code (<code class="notranslate">mnist_tensorboard.py</code>) locally.</p>
1
<h2 dir="auto">Steps to Reproduce</h2> <p dir="auto">I have a project when I try to run a drive test, I get</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" [drive-test] flutter drive -t test_driver/all.dart Using device Pixel XL. Starting application: test_driver/all.dart Initializing gradle... Resolving dependencies... Installing build/app/outputs/apk/app.apk... Running 'gradlew assembleDebug'... FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformClassesWithJarMergingForDebug'. &gt; com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/internal/zzq.class * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Gradle build failed: 1 failed with exit code 1"><pre class="notranslate"><code class="notranslate"> [drive-test] flutter drive -t test_driver/all.dart Using device Pixel XL. Starting application: test_driver/all.dart Initializing gradle... Resolving dependencies... Installing build/app/outputs/apk/app.apk... Running 'gradlew assembleDebug'... FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformClassesWithJarMergingForDebug'. &gt; com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/internal/zzq.class * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Gradle build failed: 1 failed with exit code 1 </code></pre></div> <p dir="auto">I haven't found a <code class="notranslate">--stacktrace</code> option.</p> <p dir="auto">Perhaps</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" --[no-]trace-startup Start tracing during startup."><pre class="notranslate"><code class="notranslate"> --[no-]trace-startup Start tracing during startup. </code></pre></div> <p dir="auto">from <code class="notranslate">flutter drive -h</code> is meant?</p> <h2 dir="auto">Logs</h2> <p dir="auto">Run your application with <code class="notranslate">flutter run</code> and attach all the log output.</p> <p dir="auto">Run <code class="notranslate">flutter analyze</code> and attach any output of that command also.</p> <h2 dir="auto">Flutter Doctor</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" (issue376_save_image) $ flutter doctor [✓] Flutter (on Mac OS X 10.13.1 17B48, locale en-AT, channel alpha) • Flutter at /Users/zoechi/flutter/flutter • Framework revision e8aa40eddd (5 weeks ago), 2017-10-17 15:42:40 -0700 • Engine revision 7c4142808c • Tools Dart version 1.25.0-dev.11.0 [✓] Android toolchain - develop for Android devices (Android SDK 27.0.1) • Android SDK at /usr/local/opt/android-sdk • Platform android-27, build-tools 27.0.1 • ANDROID_HOME = /usr/local/opt/android-sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] iOS toolchain - develop for iOS devices (Xcode 9.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.1, Build version 9B55 • ios-deploy 1.9.2 • CocoaPods version 1.3.1 [✓] Android Studio (version 3.0) • Android Studio at /Applications/Android Studio.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] IntelliJ IDEA Ultimate Edition (version 2017.2.6) • Flutter plugin version 19.1 • Dart plugin version 172.4343.25 [✓] Connected devices • Pixel XL • HT69V0203649 • android-arm • Android 8.0.0 (API 26)"><pre class="notranslate"><code class="notranslate"> (issue376_save_image) $ flutter doctor [✓] Flutter (on Mac OS X 10.13.1 17B48, locale en-AT, channel alpha) • Flutter at /Users/zoechi/flutter/flutter • Framework revision e8aa40eddd (5 weeks ago), 2017-10-17 15:42:40 -0700 • Engine revision 7c4142808c • Tools Dart version 1.25.0-dev.11.0 [✓] Android toolchain - develop for Android devices (Android SDK 27.0.1) • Android SDK at /usr/local/opt/android-sdk • Platform android-27, build-tools 27.0.1 • ANDROID_HOME = /usr/local/opt/android-sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] iOS toolchain - develop for iOS devices (Xcode 9.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.1, Build version 9B55 • ios-deploy 1.9.2 • CocoaPods version 1.3.1 [✓] Android Studio (version 3.0) • Android Studio at /Applications/Android Studio.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] IntelliJ IDEA Ultimate Edition (version 2017.2.6) • Flutter plugin version 19.1 • Dart plugin version 172.4343.25 [✓] Connected devices • Pixel XL • HT69V0203649 • android-arm • Android 8.0.0 (API 26) </code></pre></div>
<p dir="auto"><a href="https://github.com/afandria"><img src="https://avatars.githubusercontent.com/u/2432033?v=3" align="left" width="96" height="96" hspace="10" style="max-width: 100%;"></a> <strong>Issue by <a href="https://github.com/afandria">afandria</a></strong><br> <em>Tuesday Aug 11, 2015 at 18:32 GMT</em><br> <em>Originally opened as <a href="https://github.com/flutter/engine/issues/559">https://github.com/flutter/engine/issues/559</a></em></p> <hr> <p dir="auto"><a href="https://github.com/domokit/sky_engine/blob/master/sky/packages/sky/README.md#building-a-standalone-apk">Building a Standalone APK</a> instructions are not clear enough.</p> <p dir="auto">It has been inconvenient to only be able to start my Sky app via <code class="notranslate">sky_tool</code>, so I wanted to build my own APK. Unfortunately, the link to the stocks/example does not have a <code class="notranslate">README.md</code> for how to build it. It appears that the <code class="notranslate">BUILD.gn</code>, <code class="notranslate">sky.yaml</code>, and <code class="notranslate">apk/AndroidManifest.xml</code> files are important to the process, but I am not sure what command(s) are needed to produce the APK.</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 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" 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" checked=""> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>:</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="[root@shiny ~]# celery report software -&gt; celery:4.4.0rc2 (cliffs) kombu:4.6.3 py:3.6.8 billiard:3.6.0.0 py-amqp:2.5.0 platform -&gt; system:Linux arch:64bit kernel version:4.19.13-200.fc28.x86_64 imp:CPython loader -&gt; celery.loaders.default.Loader settings -&gt; transport:amqp results:disabled "><pre class="notranslate"><code class="notranslate">[root@shiny ~]# celery report software -&gt; celery:4.4.0rc2 (cliffs) kombu:4.6.3 py:3.6.8 billiard:3.6.0.0 py-amqp:2.5.0 platform -&gt; system:Linux arch:64bit kernel version:4.19.13-200.fc28.x86_64 imp:CPython loader -&gt; celery.loaders.default.Loader settings -&gt; transport:amqp results:disabled </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: N/A or Unknown</li> <li><strong>Minimal Celery Version</strong>: 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="[root@shiny ~]# pip3 freeze amqp==2.5.0 anymarkup==0.7.0 anymarkup-core==0.7.1 billiard==3.6.0.0 celery==4.4.0rc2 configobj==5.0.6 gpg==1.10.0 iniparse==0.4 json5==0.8.4 kombu==4.6.3 pygobject==3.28.3 python-qpid-proton==0.28.0 pytz==2019.1 PyYAML==5.1.1 pyzmq==18.0.1 redis==3.2.1 rpm==4.14.2 six==1.11.0 smartcols==0.3.0 toml==0.10.0 ucho==0.1.0 vine==1.3.0 xmltodict==0.12.0"><pre class="notranslate"><code class="notranslate">[root@shiny ~]# pip3 freeze amqp==2.5.0 anymarkup==0.7.0 anymarkup-core==0.7.1 billiard==3.6.0.0 celery==4.4.0rc2 configobj==5.0.6 gpg==1.10.0 iniparse==0.4 json5==0.8.4 kombu==4.6.3 pygobject==3.28.3 python-qpid-proton==0.28.0 pytz==2019.1 PyYAML==5.1.1 pyzmq==18.0.1 redis==3.2.1 rpm==4.14.2 six==1.11.0 smartcols==0.3.0 toml==0.10.0 ucho==0.1.0 vine==1.3.0 xmltodict==0.12.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> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Updating task_routes during runtime is possible and has effect</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">Updating <code class="notranslate">task_routes</code> during runtime does not have effect - the config is updated but the <code class="notranslate">router</code> in <code class="notranslate">send_task</code> seems to be reusing old configuration.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import celery c = celery.Celery(broker='redis://localhost:6379/0', backend='redis://localhost:6379/0') c.conf.update(task_routes={'task.create_pr': 'queue.betka'}) c.send_task('task.create_pr') print(c.conf.get('task_routes')) c.conf.update(task_routes={'task.create_pr': 'queue.ferdinand'}) c.send_task('task.create_pr') print(c.conf.get('task_routes'))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">celery</span> <span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-s1">celery</span>.<span class="pl-v">Celery</span>(<span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">'redis://localhost:6379/0'</span>, <span class="pl-s1">backend</span><span class="pl-c1">=</span><span class="pl-s">'redis://localhost:6379/0'</span>) <span class="pl-s1">c</span>.<span class="pl-s1">conf</span>.<span class="pl-en">update</span>(<span class="pl-s1">task_routes</span><span class="pl-c1">=</span>{<span class="pl-s">'task.create_pr'</span>: <span class="pl-s">'queue.betka'</span>}) <span class="pl-s1">c</span>.<span class="pl-en">send_task</span>(<span class="pl-s">'task.create_pr'</span>) <span class="pl-en">print</span>(<span class="pl-s1">c</span>.<span class="pl-s1">conf</span>.<span class="pl-en">get</span>(<span class="pl-s">'task_routes'</span>)) <span class="pl-s1">c</span>.<span class="pl-s1">conf</span>.<span class="pl-en">update</span>(<span class="pl-s1">task_routes</span><span class="pl-c1">=</span>{<span class="pl-s">'task.create_pr'</span>: <span class="pl-s">'queue.ferdinand'</span>}) <span class="pl-s1">c</span>.<span class="pl-en">send_task</span>(<span class="pl-s">'task.create_pr'</span>) <span class="pl-en">print</span>(<span class="pl-s1">c</span>.<span class="pl-s1">conf</span>.<span class="pl-en">get</span>(<span class="pl-s">'task_routes'</span>))</pre></div> <p dir="auto">Output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[root@shiny ~]# python3 repr.py {'task.create_pr': 'queue.betka'} {'task.create_pr': 'queue.ferdinand'}"><pre class="notranslate"><code class="notranslate">[root@shiny ~]# python3 repr.py {'task.create_pr': 'queue.betka'} {'task.create_pr': 'queue.ferdinand'} </code></pre></div> <p dir="auto">So the configuration is updated but it seems the routes are still pointing to queue.betka, since both tasks are sent to queue.betka and queue.ferdinand didn't receive anything.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="betka_1 | [2019-06-24 14:50:41,386: INFO/MainProcess] Received task: task.create_pr[54b28121-28cf-4301-b6f2-185d2e7c50cb] betka_1 | [2019-06-24 14:50:41,386: DEBUG/MainProcess] TaskPool: Apply &lt;function _fast_trace_task at 0x7fca7f4d6a60&gt; (args:('task.create_pr', '54b28121-28cf-4301-b6f2-185d2e7c50cb', {'lang': 'py', 'task': 'task.create_pr', 'id': '54b28121-28cf-4301-b6f2-185d2e7c50cb', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'retries': 0, 'timelimit': [None, None], 'root_id': '54b28121-28cf-4301-b6f2-185d2e7c50cb', 'parent_id': None, 'argsrepr': '()', 'kwargsrepr': '{}', 'origin': 'gen68@shiny', 'reply_to': 'b7be085a-b1f8-3738-b65f-963a805f2513', 'correlation_id': '54b28121-28cf-4301-b6f2-185d2e7c50cb', 'delivery_info': {'exchange': '', 'routing_key': 'queue.betka', 'priority': 0, 'redelivered': None}}, b'[[], {}, {&quot;callbacks&quot;: null, &quot;errbacks&quot;: null, &quot;chain&quot;: null, &quot;chord&quot;: null}]', 'application/json', 'utf-8') kwargs:{}) betka_1 | [2019-06-24 14:50:41,387: INFO/MainProcess] Received task: task.create_pr[3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0] betka_1 | [2019-06-24 14:50:41,388: DEBUG/MainProcess] Task accepted: task.create_pr[54b28121-28cf-4301-b6f2-185d2e7c50cb] pid:12 betka_1 | [2019-06-24 14:50:41,390: INFO/ForkPoolWorker-1] Task task.create_pr[54b28121-28cf-4301-b6f2-185d2e7c50cb] succeeded in 0.002012896991800517s: 'Maybe later :)' betka_1 | [2019-06-24 14:50:41,390: DEBUG/MainProcess] TaskPool: Apply &lt;function _fast_trace_task at 0x7fca7f4d6a60&gt; (args:('task.create_pr', '3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0', {'lang': 'py', 'task': 'task.create_pr', 'id': '3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'retries': 0, 'timelimit': [None, None], 'root_id': '3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0', 'parent_id': None, 'argsrepr': '()', 'kwargsrepr': '{}', 'origin': 'gen68@shiny', 'reply_to': 'b7be085a-b1f8-3738-b65f-963a805f2513', 'correlation_id': '3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0', 'delivery_info': {'exchange': '', 'routing_key': 'queue.betka', 'priority': 0, 'redelivered': None}}, b'[[], {}, {&quot;callbacks&quot;: null, &quot;errbacks&quot;: null, &quot;chain&quot;: null, &quot;chord&quot;: null}]', 'application/json', 'utf-8') kwargs:{}) betka_1 | [2019-06-24 14:50:41,391: DEBUG/MainProcess] Task accepted: task.create_pr[3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0] pid:12 betka_1 | [2019-06-24 14:50:41,391: INFO/ForkPoolWorker-1] Task task.create_pr[3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0] succeeded in 0.0006862019945401698s: 'Maybe later :)'"><pre class="notranslate"><code class="notranslate">betka_1 | [2019-06-24 14:50:41,386: INFO/MainProcess] Received task: task.create_pr[54b28121-28cf-4301-b6f2-185d2e7c50cb] betka_1 | [2019-06-24 14:50:41,386: DEBUG/MainProcess] TaskPool: Apply &lt;function _fast_trace_task at 0x7fca7f4d6a60&gt; (args:('task.create_pr', '54b28121-28cf-4301-b6f2-185d2e7c50cb', {'lang': 'py', 'task': 'task.create_pr', 'id': '54b28121-28cf-4301-b6f2-185d2e7c50cb', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'retries': 0, 'timelimit': [None, None], 'root_id': '54b28121-28cf-4301-b6f2-185d2e7c50cb', 'parent_id': None, 'argsrepr': '()', 'kwargsrepr': '{}', 'origin': 'gen68@shiny', 'reply_to': 'b7be085a-b1f8-3738-b65f-963a805f2513', 'correlation_id': '54b28121-28cf-4301-b6f2-185d2e7c50cb', 'delivery_info': {'exchange': '', 'routing_key': 'queue.betka', 'priority': 0, 'redelivered': None}}, b'[[], {}, {"callbacks": null, "errbacks": null, "chain": null, "chord": null}]', 'application/json', 'utf-8') kwargs:{}) betka_1 | [2019-06-24 14:50:41,387: INFO/MainProcess] Received task: task.create_pr[3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0] betka_1 | [2019-06-24 14:50:41,388: DEBUG/MainProcess] Task accepted: task.create_pr[54b28121-28cf-4301-b6f2-185d2e7c50cb] pid:12 betka_1 | [2019-06-24 14:50:41,390: INFO/ForkPoolWorker-1] Task task.create_pr[54b28121-28cf-4301-b6f2-185d2e7c50cb] succeeded in 0.002012896991800517s: 'Maybe later :)' betka_1 | [2019-06-24 14:50:41,390: DEBUG/MainProcess] TaskPool: Apply &lt;function _fast_trace_task at 0x7fca7f4d6a60&gt; (args:('task.create_pr', '3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0', {'lang': 'py', 'task': 'task.create_pr', 'id': '3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'retries': 0, 'timelimit': [None, None], 'root_id': '3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0', 'parent_id': None, 'argsrepr': '()', 'kwargsrepr': '{}', 'origin': 'gen68@shiny', 'reply_to': 'b7be085a-b1f8-3738-b65f-963a805f2513', 'correlation_id': '3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0', 'delivery_info': {'exchange': '', 'routing_key': 'queue.betka', 'priority': 0, 'redelivered': None}}, b'[[], {}, {"callbacks": null, "errbacks": null, "chain": null, "chord": null}]', 'application/json', 'utf-8') kwargs:{}) betka_1 | [2019-06-24 14:50:41,391: DEBUG/MainProcess] Task accepted: task.create_pr[3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0] pid:12 betka_1 | [2019-06-24 14:50:41,391: INFO/ForkPoolWorker-1] Task task.create_pr[3bf8b0fb-cb4a-412b-84d4-1a52b794b4e0] succeeded in 0.0006862019945401698s: 'Maybe later :)' </code></pre></div> <p dir="auto">Note: I managed to workaround it by adding <code class="notranslate">del c.amqp</code> right after update for now</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 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">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>: celery==4.2.1</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=" job.save(backend=tasks.cel.backend) File &quot;/Users/shaunak/instabase-repo/instabase/venv/lib/python2.7/site-packages/celery/result.py&quot;, line 887, in save return (backend or self.app.backend).save_group(self.id, self) File &quot;/Users/shaunak/instabase-repo/instabase/venv/lib/python2.7/site-packages/celery/backends/base.py&quot;, line 399, in save_group return self._save_group(group_id, result) AttributeError: 'CassandraBackend' object has no attribute '_save_group'"><pre class="notranslate"><code class="notranslate"> job.save(backend=tasks.cel.backend) File "/Users/shaunak/instabase-repo/instabase/venv/lib/python2.7/site-packages/celery/result.py", line 887, in save return (backend or self.app.backend).save_group(self.id, self) File "/Users/shaunak/instabase-repo/instabase/venv/lib/python2.7/site-packages/celery/backends/base.py", line 399, in save_group return self._save_group(group_id, result) AttributeError: 'CassandraBackend' object has no attribute '_save_group' </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <ol dir="auto"> <li>Start celery with Cassandra as a backend</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import celery import time cel = celery.Celery( 'experiments', backend='cassandra://', broker='amqp://localhost:5672' ) cel.conf.update( CELERYD_PREFETCH_MULTIPLIER = 1, CELERY_REJECT_ON_WORKER_LOST=True, CELERY_TASK_REJECT_ON_WORKER_LOST=True, CASSANDRA_SERVERS=['localhost'], )"><pre class="notranslate"><code class="notranslate">import celery import time cel = celery.Celery( 'experiments', backend='cassandra://', broker='amqp://localhost:5672' ) cel.conf.update( CELERYD_PREFETCH_MULTIPLIER = 1, CELERY_REJECT_ON_WORKER_LOST=True, CELERY_TASK_REJECT_ON_WORKER_LOST=True, CASSANDRA_SERVERS=['localhost'], ) </code></pre></div> <ol start="2" dir="auto"> <li>Create a group and try to save the result</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" job = group_sig.delay() job.save(backend=tasks.cel.backend)"><pre class="notranslate"><code class="notranslate"> job = group_sig.delay() job.save(backend=tasks.cel.backend) </code></pre></div> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">We expect that the result will be saved without throwing an error.</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">We see the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" job.save(backend=tasks.cel.backend) File &quot;/Users/shaunak/instabase-repo/instabase/venv/lib/python2.7/site-packages/celery/result.py&quot;, line 887, in save return (backend or self.app.backend).save_group(self.id, self) File &quot;/Users/shaunak/instabase-repo/instabase/venv/lib/python2.7/site-packages/celery/backends/base.py&quot;, line 399, in save_group return self._save_group(group_id, result) AttributeError: 'CassandraBackend' object has no attribute '_save_group'"><pre class="notranslate"><code class="notranslate"> job.save(backend=tasks.cel.backend) File "/Users/shaunak/instabase-repo/instabase/venv/lib/python2.7/site-packages/celery/result.py", line 887, in save return (backend or self.app.backend).save_group(self.id, self) File "/Users/shaunak/instabase-repo/instabase/venv/lib/python2.7/site-packages/celery/backends/base.py", line 399, in save_group return self._save_group(group_id, result) AttributeError: 'CassandraBackend' object has no attribute '_save_group' </code></pre></div>
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">Bug</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">DevTools extension does not persist state. For example, the “Welcome” dialog displays upon every refresh.</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. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (<a href="https://jsfiddle.net/Luktwrdm/" rel="nofollow">https://jsfiddle.net/Luktwrdm/</a>) or CodeSandbox (<a href="https://codesandbox.io/s/new" rel="nofollow">https://codesandbox.io/s/new</a>) example below:</strong></p> <ol dir="auto"> <li>Open React DevTools in a React app.</li> <li>Change DevTools settings.</li> <li>Refresh app in browser.</li> </ol> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">Settings should be changed.</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></p> <p dir="auto">This is in a corporate install of Chrome 71. It’s possible that it blocks whichever persistence API React DevTools is using (Chrome DevTools itself persists settings successfully).</p>
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br> Bug</p> <p dir="auto"><strong>What is the current behavior?</strong><br> “Welcome to the new React DevTools!” message blocks the devtool panel every time the it is opened.</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. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (<a href="https://jsfiddle.net/Luktwrdm/" rel="nofollow">https://jsfiddle.net/Luktwrdm/</a>) or CodeSandbox (<a href="https://codesandbox.io/s/new" rel="nofollow">https://codesandbox.io/s/new</a>) example below:</strong></p> <ol dir="auto"> <li>Open a website with React with DevTools installed.</li> <li>Open the Component tab.</li> <li>Dismiss the welcome screen.</li> <li>Close the devtools and open it again.</li> </ol> <p dir="auto"><strong>What is the expected behavior?</strong><br> Dismissing the “Welcome to the new React DevTools!” message should be permanent.</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> DevTools: 4.0.5<br> Chrome: 77.0.3865.35</p>
1
<p dir="auto">Getting the following error upon loading:<br> <code class="notranslate">Uncaught SyntaxError: Duplicate data property in object literal not allowed in strict mode -- From line ... in .../bundle.js</code></p> <p dir="auto">App runs well in modern browsers on PC/Mac, iOS UIWebview, mobile Safari, Android (also 4.x) Chrome, and Android &gt;5.x.</p> <p dir="auto">Consulting <a href="http://kangax.github.io/compat-table/es5/#android44" rel="nofollow">this table</a> shows Android 4.4 supports ES5 well and should run React.js applications just fine.</p> <p dir="auto">Any ideas?</p>
<p dir="auto">React / ReactDOM: 16.4.2</p> <p dir="auto">I'm having trouble reproducing this, but I'm raising it in the hope that someone can give me some clues as to the cause. I have a large application which is using <code class="notranslate">Fragment</code> in a few places, like so:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;React.Fragment&gt; &lt;div&gt;Child 1-1&lt;/div&gt; &lt;div&gt;Child 1-2&lt;/div&gt; &lt;/React.Fragment&gt; &lt;React.Fragment&gt; &lt;div&gt;Child 2-1&lt;/div&gt; &lt;div&gt;Child 2-2&lt;/div&gt; &lt;/React.Fragment&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-v">Fragment</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span>Child 1-1<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-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span>Child 1-2<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-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-v">Fragment</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Fragment</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span>Child 2-1<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-c1">&lt;</span><span class="pl-s1">div</span><span class="pl-c1">&gt;</span><span class="pl-v">Child</span> <span class="pl-c1">2</span><span class="pl-c1">-</span><span class="pl-c1">2</span><span class="pl-c1">&lt;</span><span class="pl-pds"><span class="pl-c1">/</span>div&gt;</span><span class="pl-c1"></span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span>React.Fragment&gt;</pre></div> <p dir="auto">In everything but Internet Explorer, this renders as you'd expect:</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;div&gt;Child 1-1&lt;/div&gt; &lt;div&gt;Child 1-2&lt;/div&gt; &lt;div&gt;Child 2-1&lt;/div&gt; &lt;div&gt;Child 2-2&lt;/div&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>Child 1-1<span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>Child 1-2<span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>Child 2-1<span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span>Child 2-2<span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span></pre></div> <p dir="auto">However, for some reason in Internet Explorer 11, these are being rendered as some weird tags:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;jscomp_symbol_react.fragment16&gt; &lt;div&gt;Child 1-1&lt;/div&gt; &lt;div&gt;Child 1-2&lt;/div&gt; &lt;/jscomp_symbol_react.fragment16&gt; &lt;jscomp_symbol_react.fragment16&gt; &lt;div&gt;Child 2-1&lt;/div&gt; &lt;div&gt;Child 2-2&lt;/div&gt; &lt;/jscomp_symbol_react.fragment16&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-s1">jscomp_symbol_react</span><span class="pl-kos">.</span><span class="pl-s1">fragment16</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span>Child 1-1<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-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span>Child 1-2<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-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-s1">jscomp_symbol_react</span><span class="pl-kos">.</span><span class="pl-s1">fragment16</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-s1">jscomp_symbol_react</span><span class="pl-kos">.</span><span class="pl-c1">fragment16</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span>Child 2-1<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-c1">&lt;</span><span class="pl-s1">div</span><span class="pl-c1">&gt;</span><span class="pl-v">Child</span> <span class="pl-c1">2</span><span class="pl-c1">-</span><span class="pl-c1">2</span><span class="pl-c1">&lt;</span><span class="pl-pds"><span class="pl-c1">/</span>div&gt;</span><span class="pl-c1"></span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span>jscomp_symbol_react.fragment16&gt;</pre></div> <p dir="auto">I've tried pausing the code at the transpiled <code class="notranslate">_react.createElement(_react.Fragment)</code> line, and the <code class="notranslate">_react.Fragment</code> export is a string with the same name as the tag (<code class="notranslate">jscomp_symbol_react.fragment16</code>). I think this is just the correct way in which the symbol polyfill works and that React should recognize it as something other than an HTML tag.</p> <p dir="auto">What's even weirder is that this only happens sometimes. If two components in my app are using fragments, the first one to render may have the above issue, the second may not. If an affected component re-renders, the rendered DOM will be corrected. I haven't found a solid pattern to this yet.</p> <p dir="auto">I have a fairly typical webpack + babel setup, and using the babel-polyfill for symbol support. I'm really not sure what parts of my setup are relevant to this so please let me know if you need any extra info. Again, I'm trying to create a reproduction outside of my application but if anyone can offer me some clues in the meantime I'd be incredibly grateful.</p>
0
<p dir="auto"></p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/axios/axios/blob/16b5718954d88fbefe17f0b91101d742b63209c7/lib/core/mergeConfig.js#L19">axios/lib/core/mergeConfig.js</a> </p> <p class="mb-0 color-fg-muted"> Line 19 in <a data-pjax="true" class="commit-tease-sha" href="/axios/axios/commit/16b5718954d88fbefe17f0b91101d742b63209c7">16b5718</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="L19" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="19"></td> <td id="LC19" 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">mergeDeepPropertiesKeys</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">'headers'</span><span class="pl-kos">,</span> <span class="pl-s">'auth'</span><span class="pl-kos">,</span> <span class="pl-s">'proxy'</span><span class="pl-kos">,</span> <span class="pl-s">'params'</span><span class="pl-kos">]</span><span class="pl-kos">;</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">keys in mergeDeepPropertiesKeys will be merged by utils.deepMerge but utils.deepMerge can only merge objects. Array type field will be converted like {‘0’: 'a', '1': 'b'}, no longer an array.</p>
<h3 dir="auto">Describe the issue</h3> <p dir="auto">When I read the 'Axios' source code, I found that' utils. deepMerge() 'will convert arrays to objects, which is unreasonable.<br> <a href="https://github.com/axios/axios/blob/master/lib/utils.js#L286">https://github.com/axios/axios/blob/master/lib/utils.js#L286</a></p> <h3 dir="auto">Code</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var deepMerge = require('./lib/utils').deepMerge; var a = {foo: {bar: 111}, hnd: [444, 555, 666]}; var b = {foo: {baz: 456}, hnd: [456, 789]}; console.log(deepMerge(a, b));"><pre class="notranslate"><code class="notranslate">var deepMerge = require('./lib/utils').deepMerge; var a = {foo: {bar: 111}, hnd: [444, 555, 666]}; var b = {foo: {baz: 456}, hnd: [456, 789]}; console.log(deepMerge(a, b)); </code></pre></div> <h3 dir="auto">result</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ foo: { bar: 111, baz: 456 }, hnd: { '0': 456, '1': 789, '2': 666 } }"><pre class="notranslate"><code class="notranslate">{ foo: { bar: 111, baz: 456 }, hnd: { '0': 456, '1': 789, '2': 666 } } </code></pre></div> <h3 dir="auto">Expected behavior</h3> <p dir="auto">Executing 'utils.deepMerge()' does not change the data type.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ foo: { bar: 111, baz: 456 }, hnd: [ 456, 789, 666 ] }"><pre class="notranslate"><code class="notranslate">{ foo: { bar: 111, baz: 456 }, hnd: [ 456, 789, 666 ] } </code></pre></div> <h3 dir="auto">Environment:</h3> <p dir="auto">Axios Version 0.19.0</p>
1
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.19042.330] PowerToys version: v0.19.1 PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.19042.330] PowerToys version: v0.19.1 PowerToy module for which you are reporting the bug (if applicable): FancyZones </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Requires 2 monitors<br> 1a. May require using a non-admin account</li> <li>Show taskbar buttons on: Taskbar where window is open</li> <li>Open Windows Terminal and use FancyZones to "snap" to zone on non-default monitor</li> <li>Reboot computer (or possibly just sign out and back in)</li> <li>Open Windows Terminal</li> </ol> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Windows Terminal taskbar button and window will both appear on the non-default monitor. Window will be "snapped" to same zone as before.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Windows Terminal taskber button appears on the default monitor while the window will be "snapped" to the correct zone on the non-default monitor.</p>
<p dir="auto">By default new windows are opened on primary monitor (some application introduce their own special positioning). If we have zone history for some application on secondary monitor, and that monitor is active, application window will be opened there, otherwise we fallback to default windows behavior and that window is opened on primary monitor.<br> Even if we don't have app history for that application on active monitor, we should open it there, with respect of window width and height.</p>
1
<p dir="auto">Operating system:XP W7-32<br> 用bootstrap框架开发出的页面,在浏览器上下拉,翻页等都能实现,用electron不能,这是为什么,请教</p>
<p dir="auto">jQuery contains something along this lines:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if ( typeof module === &quot;object&quot; &amp;&amp; typeof module.exports === &quot;object&quot; ) { // set jQuery in `module` } else { // set jQuery in `window` }"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-k">typeof</span> <span class="pl-smi">module</span> <span class="pl-c1">===</span> <span class="pl-s">"object"</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-k">typeof</span> <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">===</span> <span class="pl-s">"object"</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// set jQuery in `module`</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-c">// set jQuery in `window`</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">module is defined, even in the browser-side scripts. This causes jQuery to ignore the <code class="notranslate">window</code> object and use <code class="notranslate">module</code>, so the other scripts won't find <code class="notranslate">$</code> nor <code class="notranslate">jQuery</code> in global scope..</p> <p dir="auto">I am not sure if this is a jQuery or atom-shell bug, but I wanted to put this on the web, so others won't search as long as I did.</p>
1
<p dir="auto">In the same vein as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="579268133" data-permission-text="Title is private" data-url="https://github.com/tiangolo/fastapi/issues/1107" data-hovercard-type="issue" data-hovercard-url="/tiangolo/fastapi/issues/1107/hovercard" href="https://github.com/tiangolo/fastapi/issues/1107">#1107</a>, it would be super useful (at least to me) to have the openapi models be available outside of FastAPI. I've been working on a Python client generator (built with Typer!) which will hopefully be much cleaner than the openapi-generator version, and I already use FastAPI for some testing.</p> <p dir="auto">I don't want to ship a copy of FastAPI with my tool just to get the openapi module, but it also feels silly to be rewriting a lot of what you already have when I could just parse a spec into your models and work from there. So what I'll probably do is extract a copy of the openapi module and use it (with proper attribution of course), but it would be much cleaner to add your module as a pip dependency.</p> <p dir="auto"><a href="https://github.com/triaxtec/openapi-python-client">https://github.com/triaxtec/openapi-python-client</a> is the project in question, just FYI.</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="###This API takes id in request , creates temp path in container , searches path for this id in database and copies file from AWS s3b for this id in temp created path, does ML processing and deletes the temp path then returns the predicted data from datetime import datetime import uvicorn from fastapi import Depends, FastAPI, HTTPException, Request from starlette.middleware.cors import CORSMiddleware # initializing FastAPI from fastapi import FastAPI, Response, status from fastapi.responses import JSONResponse from pydantic import BaseModel from fastapi import Security ,HTTPException from fastapi.security.api_key import APIKeyHeader import pathlib temp = pathlib.PosixPath #pathlib.PosixPath = pathlib.WindowsPath import torch # Logging import logging, logging.config logging.config.dictConfig( { 'version': 1, 'disable_existing_loggers': True, } ) global logger # logging.basicConfig(filename='app.log', filemode='w',format='%(asctime)s:%(levelname)s:%(message)s', level=logging.DEBUG) app = FastAPI(docs_url=&quot;/&quot;, redoc_url=None, title=&quot;First ML API&quot;, description=&quot;First ML API&quot;, version=&quot;V 1.0&quot;, ) # FileDownload() # SMBConnectionDownload() config = readconfig() API_KEY = config.API_KEY API_KEY_NAME = config.API_KEY_NAME api_key_header_auth = APIKeyHeader(name=API_KEY_NAME, auto_error=True) async def get_api_key(api_key_header: str = Security(api_key_header_auth)): if api_key_header != API_KEY: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail=&quot;Invalid API Key&quot;, ) origins = [ &quot;http://localhost.tiangolo.com&quot;, &quot;https://localhost.tiangolo.com&quot;, &quot;http://localhost&quot;, &quot;http://localhost:8080&quot;, &quot;http://localhost:4200&quot;, ] app.add_middleware( CORSMiddleware, allow_origins=origins, allow_credentials=True, allow_methods=[&quot;*&quot;], allow_headers=[&quot;*&quot;], ) class Item(BaseModel): id : str logging.config.dictConfig( { 'version': 1, 'disable_existing_loggers': True, } ) global logger logger = logging.getLogger(&quot;main&quot;) logger.setLevel(logging.INFO) # create the logging file handler fh = logging.FileHandler(&quot;app.log&quot;) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') fh.setFormatter(formatter) ch.setFormatter(formatter) while logger.handlers: logger.handlers.pop() # add handler to logger object logger.addHandler(fh) logger.addHandler(ch) logger.propagate = False @app.get(&quot;/&quot;) async def root(): return {&quot;message&quot;: &quot;Hello Bigger Applications!&quot;} @app.get(&quot;/heartbeat&quot;) def heartbeat(): return &quot;Success&quot; @app.get('/predictdata',dependencies=[Security(get_api_key)]) def predictdata(id: str): try: res = {&quot;id&quot; : id , &quot;prediction&quot;: &quot;&quot; , &quot;StatusCode&quot; : &quot;200&quot;, &quot;Validations&quot; : []} if not id.isdigit(): res[&quot;Validations&quot;].append({&quot;Type&quot; : &quot;Validation&quot;, &quot;Description&quot; : &quot;id must be a integer&quot;}) raise TypeError(&quot;id must be an integer&quot;) logger.info(&quot;*** ML prediction API started for Id : {} ***&quot;.format(id)) logger.info(&quot;########################&quot;) data = ML_Process(id, res) res = data logger.info(res) return JSONResponse(status_code=int(res[&quot;StatusCode&quot;]), content=res) except Exception as ex: traceback.print_exc() error_trace = traceback.format_exc() res[&quot;Validations&quot;].append({&quot;Type&quot; : &quot;Error&quot;,&quot;Description&quot; : error_trace}) res[&quot;StatusCode&quot;] = str(500) logger.exception(&quot;Exception in my ML API&quot;) logger.error(ex,exc_info=True) return JSONResponse(status_code=500, content=res) def ML_Process(id, res): #get docpath from db by id , copy doc to temp path from s3b and run ML model on the doc #after processing it deletes temp path and returns predicted data # this is a long running process takes avg 25 second but can take sometime 1-2 minutes. # Issue is observed only when it's a long running requests e.g Model takes more time to do inference if __name__ == &quot;__main__&quot;: uvicorn.run( app, host=&quot;0.0.0.0&quot;, port=8422 ) ------------------------------------- Dockerfile FROM python:3 WORKDIR /app COPY requirements.txt requirements.txt RUN pip install -r requirements.txt RUN apt-get update RUN apt-get install poppler-utils -y &amp;&amp; \ apt install ghostscript -y &amp;&amp; \ apt-get install -y tesseract-ocr &amp;&amp; \ COPY . . WORKDIR /app CMD uvicorn app:app --host 0.0.0.0 --port 5057 ------------------------------------------- Kubernetes pod logs of application which shows same request getting processed multiple times i sent the request of id - 12 only once through the swagger and nobody else was using it log :- 2022-08-11 04:27:22,070 - main - INFO - *** ML prediction API started for id : 12 *** 2022-08-11 04:27:22,071 - main - INFO - ######################## 2022-08-11 04:27:22,072 - main - INFO - Temp folder structure created : /app/12_20220811042722071864 2022-08-11 04:27:22,104 - main - INFO - File existing in this id folder in S3B folder . 2022-08-11 04:27:22,105 - main - INFO - File existing in this id folder in S3B folder .. 2022-08-11 04:27:22,105 - main - INFO - File existing in this id folder in S3B folder 278692642.pdf 2022-08-11 04:27:22,591 - main - INFO - &quot;278692642.pdf&quot; file copied in temp directory 2022-08-11 04:27:27,518 - main - INFO - 278692642.pdf 2022-08-11 04:27:27,706 - main - INFO - /app/12_20220811042722071864/278692642.pdf 2022-08-11 04:28:56,711 - main - INFO - prediction = done 2022-08-11 04:28:56,711 - main - INFO - ----------------------------------------------------------------------------- 2022-08-11 04:28:22,078 - main - INFO - *** ML prediction API started for id : 12 *** 2022-08-11 04:28:22,080 - main - INFO - ######################## 2022-08-11 04:28:22,080 - main - INFO - Temp folder structure created : /app/12_20220811042822080625 2022-08-11 04:28:22,292 - main - INFO - File existing in this id folder in S3B folder . 2022-08-11 04:28:22,292 - main - INFO - File existing in this id folder in S3B folder .. 2022-08-11 04:28:22,292 - main - INFO - File existing in this id folder in S3B folder 278692642.pdf 2022-08-11 04:28:24,784 - main - INFO - &quot;278692642.pdf&quot; file copied in temp directory 2022-08-11 04:28:38,689 - main - INFO - 278692642.pdf 2022-08-11 04:28:39,986 - main - INFO - /app/12_20220811042822080625/278692642.pdf 2022-08-11 04:28:56,711 - main - INFO - prediction = done 2022-08-11 04:28:56,711 - main - INFO - ----------------------------------------------------------------------------- █ |----------------------------------------| 0.00% [0/1 00:00&lt;?] |████████████████████████████████████████| 100.00% [1/1 00:16&lt;00:00] █ |----------------------------------------| 0.00% [0/1 00:00&lt;?] |████████████████████████████████████████| 100.00% [1/1 00:14&lt;00:00] 2022-08-11 04:29:22,145 - main - INFO - Deleted Temp folder : /app/12_20220811042722071864 2022-08-11 04:29:22,145 - main - INFO - ML prediction Done!!! 2022-08-11 04:29:22,145 - main - INFO - {&quot;id&quot; : 12,'prediction': 'predicted value here', 'StatusCode': '200', 'Validations': []} 2022-08-11 04:29:22,077 - main - INFO - *** ML prediction API started for id : 12 *** 2022-08-11 04:29:22,077 - main - INFO - ######################## 2022-08-11 04:29:22,077 - main - INFO - Temp folder structure created : /app/12_20220811042922077785 2022-08-11 04:29:22,100 - main - INFO - File existing in this id folder in S3B folder . 2022-08-11 04:29:22,101 - main - INFO - File existing in this id folder in S3B folder .. 2022-08-11 04:29:22,101 - main - INFO - File existing in this id folder in S3B folder 278692642.pdf 2022-08-11 04:29:22,145 - main - INFO - Deleted Temp folder : /app/12_20220811042822080625 2022-08-11 04:29:22,145 - main - INFO - ML prediction Done!!! 2022-08-11 04:29:22,145 - main - INFO - {&quot;id&quot; : 12,'prediction': 'predicted value here', 'StatusCode': '200', 'Validations': []} 2022-08-11 04:28:38,689 - main - INFO - 278692642.pdf 2022-08-11 04:28:39,986 - main - INFO - /app/12_20220811042922077785/278692642.pdf 2022-08-11 04:28:56,711 - main - INFO - prediction = done 2022-08-11 04:28:56,711 - main - INFO - ----------------------------------------------------------------------------- ----------------------| 0.00% [0/1 00:00&lt;?] |████████████████████████████████████████| 100.00% [1/1 00:00&lt;00:00] 2022-08-11 04:29:40,316 - main - INFO - Deleted Temp folder : /app/12_20220811042922077785 2022-08-11 04:29:40,316 - main - INFO - ML prediction Done!!! 2022-08-11 04:29:40,318 - main - INFO - {&quot;id&quot; : 12,'prediction': 'predicted value here', 'StatusCode': '200', 'Validations': []} ---- here for first time, it took the request id started processing but before completing i.e before deleting temp path, second process/thread is initiated as i see this log again **ML prediction API started for id : 12 and a new temp path is also created 2022-08-11 04:28:22,080 - main - INFO - Temp folder structure created : /app/12_20220811042822080625** and starts processes same request again before first one is complete then again after few seconds third process/thread is initiated and starts processing on same request. it shouldn't process same request again and again. I don't have any multiprocessing or multithreading concept then why its processing same request again and again. plz guide"><pre class="notranslate"><span class="pl-c">###This API takes id in request , creates temp path in container , searches path for this id in database and copies file from AWS s3b for this id in temp created path, does ML processing and deletes the temp path then returns the predicted data</span> <span class="pl-k">from</span> <span class="pl-s1">datetime</span> <span class="pl-k">import</span> <span class="pl-s1">datetime</span> <span class="pl-k">import</span> <span class="pl-s1">uvicorn</span> <span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">Depends</span>, <span class="pl-v">FastAPI</span>, <span class="pl-v">HTTPException</span>, <span class="pl-v">Request</span> <span class="pl-k">from</span> <span class="pl-s1">starlette</span>.<span class="pl-s1">middleware</span>.<span class="pl-s1">cors</span> <span class="pl-k">import</span> <span class="pl-v">CORSMiddleware</span> <span class="pl-c"># initializing FastAPI</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">Response</span>, <span class="pl-s1">status</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-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">Security</span> ,<span class="pl-v">HTTPException</span> <span class="pl-k">from</span> <span class="pl-s1">fastapi</span>.<span class="pl-s1">security</span>.<span class="pl-s1">api_key</span> <span class="pl-k">import</span> <span class="pl-v">APIKeyHeader</span> <span class="pl-k">import</span> <span class="pl-s1">pathlib</span> <span class="pl-s1">temp</span> <span class="pl-c1">=</span> <span class="pl-s1">pathlib</span>.<span class="pl-v">PosixPath</span> <span class="pl-c">#pathlib.PosixPath = pathlib.WindowsPath</span> <span class="pl-k">import</span> <span class="pl-s1">torch</span> <span class="pl-c"># Logging</span> <span class="pl-k">import</span> <span class="pl-s1">logging</span>, <span class="pl-s1">logging</span>.<span class="pl-s1">config</span> <span class="pl-s1">logging</span>.<span class="pl-s1">config</span>.<span class="pl-en">dictConfig</span>( { <span class="pl-s">'version'</span>: <span class="pl-c1">1</span>, <span class="pl-s">'disable_existing_loggers'</span>: <span class="pl-c1">True</span>, } ) <span class="pl-k">global</span> <span class="pl-s1">logger</span> <span class="pl-c"># logging.basicConfig(filename='app.log', filemode='w',format='%(asctime)s:%(levelname)s:%(message)s', level=logging.DEBUG)</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>(<span class="pl-s1">docs_url</span><span class="pl-c1">=</span><span class="pl-s">"/"</span>, <span class="pl-s1">redoc_url</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-s">"First ML API"</span>, <span class="pl-s1">description</span><span class="pl-c1">=</span><span class="pl-s">"First ML API"</span>, <span class="pl-s1">version</span><span class="pl-c1">=</span><span class="pl-s">"V 1.0"</span>, ) <span class="pl-c"># FileDownload()</span> <span class="pl-c"># SMBConnectionDownload()</span> <span class="pl-s1">config</span> <span class="pl-c1">=</span> <span class="pl-en">readconfig</span>() <span class="pl-v">API_KEY</span> <span class="pl-c1">=</span> <span class="pl-s1">config</span>.<span class="pl-v">API_KEY</span> <span class="pl-v">API_KEY_NAME</span> <span class="pl-c1">=</span> <span class="pl-s1">config</span>.<span class="pl-v">API_KEY_NAME</span> <span class="pl-s1">api_key_header_auth</span> <span class="pl-c1">=</span> <span class="pl-v">APIKeyHeader</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-v">API_KEY_NAME</span>, <span class="pl-s1">auto_error</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">get_api_key</span>(<span class="pl-s1">api_key_header</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-v">Security</span>(<span class="pl-s1">api_key_header_auth</span>)): <span class="pl-k">if</span> <span class="pl-s1">api_key_header</span> <span class="pl-c1">!=</span> <span class="pl-v">API_KEY</span>: <span class="pl-k">raise</span> <span class="pl-v">HTTPException</span>( <span class="pl-s1">status_code</span><span class="pl-c1">=</span><span class="pl-s1">status</span>.<span class="pl-v">HTTP_401_UNAUTHORIZED</span>, <span class="pl-s1">detail</span><span class="pl-c1">=</span><span class="pl-s">"Invalid API Key"</span>, ) <span class="pl-s1">origins</span> <span class="pl-c1">=</span> [ <span class="pl-s">"http://localhost.tiangolo.com"</span>, <span class="pl-s">"https://localhost.tiangolo.com"</span>, <span class="pl-s">"http://localhost"</span>, <span class="pl-s">"http://localhost:8080"</span>, <span class="pl-s">"http://localhost:4200"</span>, ] <span class="pl-s1">app</span>.<span class="pl-en">add_middleware</span>( <span class="pl-v">CORSMiddleware</span>, <span class="pl-s1">allow_origins</span><span class="pl-c1">=</span><span class="pl-s1">origins</span>, <span class="pl-s1">allow_credentials</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">allow_methods</span><span class="pl-c1">=</span>[<span class="pl-s">"*"</span>], <span class="pl-s1">allow_headers</span><span class="pl-c1">=</span>[<span class="pl-s">"*"</span>], ) <span class="pl-k">class</span> <span class="pl-v">Item</span>(<span class="pl-v">BaseModel</span>): <span class="pl-s1">id</span> : <span class="pl-s1">str</span> <span class="pl-s1">logging</span>.<span class="pl-s1">config</span>.<span class="pl-en">dictConfig</span>( { <span class="pl-s">'version'</span>: <span class="pl-c1">1</span>, <span class="pl-s">'disable_existing_loggers'</span>: <span class="pl-c1">True</span>, } ) <span class="pl-k">global</span> <span class="pl-s1">logger</span> <span class="pl-s1">logger</span> <span class="pl-c1">=</span> <span class="pl-s1">logging</span>.<span class="pl-en">getLogger</span>(<span class="pl-s">"main"</span>) <span class="pl-s1">logger</span>.<span class="pl-en">setLevel</span>(<span class="pl-s1">logging</span>.<span class="pl-v">INFO</span>) <span class="pl-c"># create the logging file handler</span> <span class="pl-s1">fh</span> <span class="pl-c1">=</span> <span class="pl-s1">logging</span>.<span class="pl-v">FileHandler</span>(<span class="pl-s">"app.log"</span>) <span class="pl-s1">ch</span> <span class="pl-c1">=</span> <span class="pl-s1">logging</span>.<span class="pl-v">StreamHandler</span>() <span class="pl-s1">ch</span>.<span class="pl-en">setLevel</span>(<span class="pl-s1">logging</span>.<span class="pl-v">DEBUG</span>) <span class="pl-s1">formatter</span> <span class="pl-c1">=</span> <span class="pl-s1">logging</span>.<span class="pl-v">Formatter</span>(<span class="pl-s">'%(asctime)s - %(name)s - %(levelname)s - %(message)s'</span>) <span class="pl-s1">fh</span>.<span class="pl-en">setFormatter</span>(<span class="pl-s1">formatter</span>) <span class="pl-s1">ch</span>.<span class="pl-en">setFormatter</span>(<span class="pl-s1">formatter</span>) <span class="pl-k">while</span> <span class="pl-s1">logger</span>.<span class="pl-s1">handlers</span>: <span class="pl-s1">logger</span>.<span class="pl-s1">handlers</span>.<span class="pl-en">pop</span>() <span class="pl-c"># add handler to logger object</span> <span class="pl-s1">logger</span>.<span class="pl-en">addHandler</span>(<span class="pl-s1">fh</span>) <span class="pl-s1">logger</span>.<span class="pl-en">addHandler</span>(<span class="pl-s1">ch</span>) <span class="pl-s1">logger</span>.<span class="pl-s1">propagate</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span> <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">"/"</span>)</span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">root</span>(): <span class="pl-k">return</span> {<span class="pl-s">"message"</span>: <span class="pl-s">"Hello Bigger Applications!"</span>} <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">"/heartbeat"</span>)</span> <span class="pl-k">def</span> <span class="pl-en">heartbeat</span>(): <span class="pl-k">return</span> <span class="pl-s">"Success"</span> <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">'/predictdata'</span>,<span class="pl-s1">dependencies</span><span class="pl-c1">=</span>[<span class="pl-v">Security</span>(<span class="pl-s1">get_api_key</span>)])</span> <span class="pl-k">def</span> <span class="pl-en">predictdata</span>(<span class="pl-s1">id</span>: <span class="pl-s1">str</span>): <span class="pl-k">try</span>: <span class="pl-s1">res</span> <span class="pl-c1">=</span> {<span class="pl-s">"id"</span> : <span class="pl-s1">id</span> , <span class="pl-s">"prediction"</span>: <span class="pl-s">""</span> , <span class="pl-s">"StatusCode"</span> : <span class="pl-s">"200"</span>, <span class="pl-s">"Validations"</span> : []} <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">id</span>.<span class="pl-en">isdigit</span>(): <span class="pl-s1">res</span>[<span class="pl-s">"Validations"</span>].<span class="pl-en">append</span>({<span class="pl-s">"Type"</span> : <span class="pl-s">"Validation"</span>, <span class="pl-s">"Description"</span> : <span class="pl-s">"id must be a integer"</span>}) <span class="pl-k">raise</span> <span class="pl-v">TypeError</span>(<span class="pl-s">"id must be an integer"</span>) <span class="pl-s1">logger</span>.<span class="pl-en">info</span>(<span class="pl-s">"*** ML prediction API started for Id : {} ***"</span>.<span class="pl-en">format</span>(<span class="pl-s1">id</span>)) <span class="pl-s1">logger</span>.<span class="pl-en">info</span>(<span class="pl-s">"########################"</span>) <span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-v">ML_Process</span>(<span class="pl-s1">id</span>, <span class="pl-s1">res</span>) <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">data</span> <span class="pl-s1">logger</span>.<span class="pl-en">info</span>(<span class="pl-s1">res</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-en">int</span>(<span class="pl-s1">res</span>[<span class="pl-s">"StatusCode"</span>]), <span class="pl-s1">content</span><span class="pl-c1">=</span><span class="pl-s1">res</span>) <span class="pl-k">except</span> <span class="pl-v">Exception</span> <span class="pl-k">as</span> <span class="pl-s1">ex</span>: <span class="pl-s1">traceback</span>.<span class="pl-en">print_exc</span>() <span class="pl-s1">error_trace</span> <span class="pl-c1">=</span> <span class="pl-s1">traceback</span>.<span class="pl-en">format_exc</span>() <span class="pl-s1">res</span>[<span class="pl-s">"Validations"</span>].<span class="pl-en">append</span>({<span class="pl-s">"Type"</span> : <span class="pl-s">"Error"</span>,<span class="pl-s">"Description"</span> : <span class="pl-s1">error_trace</span>}) <span class="pl-s1">res</span>[<span class="pl-s">"StatusCode"</span>] <span class="pl-c1">=</span> <span class="pl-en">str</span>(<span class="pl-c1">500</span>) <span class="pl-s1">logger</span>.<span class="pl-en">exception</span>(<span class="pl-s">"Exception in my ML API"</span>) <span class="pl-s1">logger</span>.<span class="pl-en">error</span>(<span class="pl-s1">ex</span>,<span class="pl-s1">exc_info</span><span class="pl-c1">=</span><span class="pl-c1">True</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-c1">500</span>, <span class="pl-s1">content</span><span class="pl-c1">=</span><span class="pl-s1">res</span>) <span class="pl-k">def</span> <span class="pl-v">ML_Process</span>(<span class="pl-s1">id</span>, <span class="pl-s1">res</span>): <span class="pl-c">#get docpath from db by id , copy doc to temp path from s3b and run ML model on the doc</span> <span class="pl-c">#after processing it deletes temp path and returns predicted data</span> <span class="pl-c"># this is a long running process takes avg 25 second but can take sometime 1-2 minutes.</span> <span class="pl-c"># Issue is observed only when it's a long running requests e.g Model takes more time to do inference</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>, <span class="pl-s1">port</span><span class="pl-c1">=</span><span class="pl-c1">8422</span> ) <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">Dockerfile</span> <span class="pl-v">FROM</span> <span class="pl-s1">python</span>:<span class="pl-c1">3</span> <span class="pl-v">WORKDIR</span> <span class="pl-c1">/</span><span class="pl-s1">app</span> <span class="pl-v">COPY</span> <span class="pl-s1">requirements</span>.<span class="pl-s1">txt</span> <span class="pl-s1">requirements</span>.<span class="pl-s1">txt</span> <span class="pl-v">RUN</span> <span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-c1">-</span><span class="pl-s1">r</span> <span class="pl-s1">requirements</span>.<span class="pl-s1">txt</span> <span class="pl-v">RUN</span> <span class="pl-s1">apt</span><span class="pl-c1">-</span><span class="pl-s1">get</span> <span class="pl-s1">update</span> <span class="pl-v">RUN</span> <span class="pl-s1">apt</span><span class="pl-c1">-</span><span class="pl-s1">get</span> <span class="pl-s1">install</span> <span class="pl-s1">poppler</span><span class="pl-c1">-</span><span class="pl-s1">utils</span> <span class="pl-c1">-</span><span class="pl-s1">y</span> <span class="pl-c1">&amp;</span><span class="pl-c1">&amp;</span> \ <span class="pl-s1">apt</span> <span class="pl-s1">install</span> <span class="pl-s1">ghostscript</span> <span class="pl-c1">-</span><span class="pl-s1">y</span> <span class="pl-c1">&amp;</span><span class="pl-c1">&amp;</span> \ <span class="pl-s1">apt</span><span class="pl-c1">-</span><span class="pl-s1">get</span> <span class="pl-s1">install</span> <span class="pl-c1">-</span><span class="pl-s1">y</span> <span class="pl-s1">tesseract</span><span class="pl-c1">-</span><span class="pl-s1">ocr</span> <span class="pl-c1">&amp;</span><span class="pl-c1">&amp;</span> \ <span class="pl-v">COPY</span> . . <span class="pl-v">WORKDIR</span> <span class="pl-c1">/</span><span class="pl-s1">app</span> <span class="pl-v">CMD</span> <span class="pl-s1">uvicorn</span> <span class="pl-s1">app</span>:<span class="pl-s1">app</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">host</span> <span class="pl-c1">0.0</span><span class="pl-c1">.0</span><span class="pl-c1">.0</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">port</span> <span class="pl-c1">5057</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">Kubernetes</span> <span class="pl-s1">pod</span> <span class="pl-s1">logs</span> <span class="pl-s1">of</span> <span class="pl-s1">application</span> <span class="pl-s1">which</span> <span class="pl-s1">shows</span> <span class="pl-s1">same</span> <span class="pl-s1">request</span> <span class="pl-s1">getting</span> <span class="pl-s1">processed</span> <span class="pl-s1">multiple</span> <span class="pl-s1">times</span> <span class="pl-s1">i</span> <span class="pl-s1">sent</span> <span class="pl-s1">the</span> <span class="pl-s1">request</span> <span class="pl-s1">of</span> <span class="pl-s1">id</span> <span class="pl-c1">-</span> <span class="pl-c1">12</span> <span class="pl-s1">only</span> <span class="pl-s1">once</span> <span class="pl-s1">through</span> <span class="pl-s1">the</span> <span class="pl-s1">swagger</span> <span class="pl-c1">and</span> <span class="pl-s1">nobody</span> <span class="pl-s1">else</span> <span class="pl-s1">was</span> <span class="pl-s1">using</span> <span class="pl-s1">it</span> <span class="pl-s1">log</span> :<span class="pl-c1">-</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">27</span>:<span class="pl-c1">22</span>,<span class="pl-c1">070</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">**</span><span class="pl-c1">*</span> <span class="pl-v">ML</span> <span class="pl-s1">prediction</span> <span class="pl-v">API</span> <span class="pl-s1">started</span> <span class="pl-k">for</span> <span class="pl-s1">id</span> : <span class="pl-c1">12</span> <span class="pl-c1">**</span><span class="pl-c1">*</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">27</span>:<span class="pl-c1">22</span>,<span class="pl-c1">071</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c">########################</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">27</span>:<span class="pl-c1">22</span>,<span class="pl-c1">072</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">Temp</span> <span class="pl-s1">folder</span> <span class="pl-s1">structure</span> <span class="pl-s1">created</span> : <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-c1">12_20220811042722071864</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">27</span>:<span class="pl-c1">22</span>,<span class="pl-c1">104</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">File</span> <span class="pl-s1">existing</span> <span class="pl-c1">in</span> <span class="pl-s1">this</span> <span class="pl-s1">id</span> <span class="pl-s1">folder</span> <span class="pl-c1">in</span> <span class="pl-v">S3B</span> <span class="pl-s1">folder</span> . <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">27</span>:<span class="pl-c1">22</span>,<span class="pl-c1">105</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">File</span> <span class="pl-s1">existing</span> <span class="pl-c1">in</span> <span class="pl-s1">this</span> <span class="pl-s1">id</span> <span class="pl-s1">folder</span> <span class="pl-c1">in</span> <span class="pl-v">S3B</span> <span class="pl-s1">folder</span> .. <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">27</span>:<span class="pl-c1">22</span>,<span class="pl-c1">105</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">File</span> <span class="pl-s1">existing</span> <span class="pl-c1">in</span> <span class="pl-s1">this</span> <span class="pl-s1">id</span> <span class="pl-s1">folder</span> <span class="pl-c1">in</span> <span class="pl-v">S3B</span> <span class="pl-s1">folder</span> <span class="pl-c1">278692642.</span><span class="pl-s1">pdf</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">27</span>:<span class="pl-c1">22</span>,<span class="pl-c1">591</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-s">"278692642.pdf"</span> <span class="pl-s1">file</span> <span class="pl-s1">copied</span> <span class="pl-c1">in</span> <span class="pl-s1">temp</span> <span class="pl-s1">directory</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">27</span>:<span class="pl-c1">27</span>,<span class="pl-c1">518</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">278692642.</span><span class="pl-s1">pdf</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">27</span>:<span class="pl-c1">27</span>,<span class="pl-c1">706</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-c1">12_20220811042722071864</span><span class="pl-c1">/</span><span class="pl-c1">278692642.</span><span class="pl-s1">pdf</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">56</span>,<span class="pl-c1">711</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-s1">prediction</span> <span class="pl-c1">=</span> <span class="pl-s1">done</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">56</span>,<span class="pl-c1">711</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">22</span>,<span class="pl-c1">078</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">**</span><span class="pl-c1">*</span> <span class="pl-v">ML</span> <span class="pl-s1">prediction</span> <span class="pl-v">API</span> <span class="pl-s1">started</span> <span class="pl-k">for</span> <span class="pl-s1">id</span> : <span class="pl-c1">12</span> <span class="pl-c1">**</span><span class="pl-c1">*</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">22</span>,<span class="pl-c1">080</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c">########################</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">22</span>,<span class="pl-c1">080</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">Temp</span> <span class="pl-s1">folder</span> <span class="pl-s1">structure</span> <span class="pl-s1">created</span> : <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-c1">12_20220811042822080625</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">22</span>,<span class="pl-c1">292</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">File</span> <span class="pl-s1">existing</span> <span class="pl-c1">in</span> <span class="pl-s1">this</span> <span class="pl-s1">id</span> <span class="pl-s1">folder</span> <span class="pl-c1">in</span> <span class="pl-v">S3B</span> <span class="pl-s1">folder</span> . <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">22</span>,<span class="pl-c1">292</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">File</span> <span class="pl-s1">existing</span> <span class="pl-c1">in</span> <span class="pl-s1">this</span> <span class="pl-s1">id</span> <span class="pl-s1">folder</span> <span class="pl-c1">in</span> <span class="pl-v">S3B</span> <span class="pl-s1">folder</span> .. <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">22</span>,<span class="pl-c1">292</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">File</span> <span class="pl-s1">existing</span> <span class="pl-c1">in</span> <span class="pl-s1">this</span> <span class="pl-s1">id</span> <span class="pl-s1">folder</span> <span class="pl-c1">in</span> <span class="pl-v">S3B</span> <span class="pl-s1">folder</span> <span class="pl-c1">278692642.</span><span class="pl-s1">pdf</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">24</span>,<span class="pl-c1">784</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-s">"278692642.pdf"</span> <span class="pl-s1">file</span> <span class="pl-s1">copied</span> <span class="pl-c1">in</span> <span class="pl-s1">temp</span> <span class="pl-s1">directory</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">38</span>,<span class="pl-c1">689</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">278692642.</span><span class="pl-s1">pdf</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">39</span>,<span class="pl-c1">986</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-c1">12_20220811042822080625</span><span class="pl-c1">/</span><span class="pl-c1">278692642.</span><span class="pl-s1">pdf</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">56</span>,<span class="pl-c1">711</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-s1">prediction</span> <span class="pl-c1">=</span> <span class="pl-s1">done</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">56</span>,<span class="pl-c1">711</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> █ <span class="pl-c1">|</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">|</span> <span class="pl-c1">0.00</span><span class="pl-c1">%</span> [<span class="pl-c1">0</span><span class="pl-c1">/</span><span class="pl-c1">1</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">&lt;</span>?] <span class="pl-c1">|</span>████████████████████████████████████████<span class="pl-c1">|</span> <span class="pl-c1">100.00</span><span class="pl-c1">%</span> [<span class="pl-c1">1</span><span class="pl-c1">/</span><span class="pl-c1">1</span> <span class="pl-c1">00</span>:<span class="pl-c1">16</span><span class="pl-c1">&lt;</span><span class="pl-c1">00</span>:<span class="pl-c1">00</span>] █ <span class="pl-c1">|</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">|</span> <span class="pl-c1">0.00</span><span class="pl-c1">%</span> [<span class="pl-c1">0</span><span class="pl-c1">/</span><span class="pl-c1">1</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">&lt;</span>?] <span class="pl-c1">|</span>████████████████████████████████████████<span class="pl-c1">|</span> <span class="pl-c1">100.00</span><span class="pl-c1">%</span> [<span class="pl-c1">1</span><span class="pl-c1">/</span><span class="pl-c1">1</span> <span class="pl-c1">00</span>:<span class="pl-c1">14</span><span class="pl-c1">&lt;</span><span class="pl-c1">00</span>:<span class="pl-c1">00</span>] <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">145</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">Deleted</span> <span class="pl-v">Temp</span> <span class="pl-s1">folder</span> : <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-c1">12_20220811042722071864</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">145</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">ML</span> <span class="pl-s1">prediction</span> <span class="pl-v">Done</span>!!! <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">145</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> {<span class="pl-s">"id"</span> : <span class="pl-c1">12</span>,<span class="pl-s">'prediction'</span>: <span class="pl-s">'predicted value here'</span>, <span class="pl-s">'StatusCode'</span>: <span class="pl-s">'200'</span>, <span class="pl-s">'Validations'</span>: []} <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">077</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">**</span><span class="pl-c1">*</span> <span class="pl-v">ML</span> <span class="pl-s1">prediction</span> <span class="pl-v">API</span> <span class="pl-s1">started</span> <span class="pl-k">for</span> <span class="pl-s1">id</span> : <span class="pl-c1">12</span> <span class="pl-c1">**</span><span class="pl-c1">*</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">077</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c">########################</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">077</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">Temp</span> <span class="pl-s1">folder</span> <span class="pl-s1">structure</span> <span class="pl-s1">created</span> : <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-c1">12_20220811042922077785</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">100</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">File</span> <span class="pl-s1">existing</span> <span class="pl-c1">in</span> <span class="pl-s1">this</span> <span class="pl-s1">id</span> <span class="pl-s1">folder</span> <span class="pl-c1">in</span> <span class="pl-v">S3B</span> <span class="pl-s1">folder</span> . <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">101</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">File</span> <span class="pl-s1">existing</span> <span class="pl-c1">in</span> <span class="pl-s1">this</span> <span class="pl-s1">id</span> <span class="pl-s1">folder</span> <span class="pl-c1">in</span> <span class="pl-v">S3B</span> <span class="pl-s1">folder</span> .. <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">101</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">File</span> <span class="pl-s1">existing</span> <span class="pl-c1">in</span> <span class="pl-s1">this</span> <span class="pl-s1">id</span> <span class="pl-s1">folder</span> <span class="pl-c1">in</span> <span class="pl-v">S3B</span> <span class="pl-s1">folder</span> <span class="pl-c1">278692642.</span><span class="pl-s1">pdf</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">145</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">Deleted</span> <span class="pl-v">Temp</span> <span class="pl-s1">folder</span> : <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-c1">12_20220811042822080625</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">145</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">ML</span> <span class="pl-s1">prediction</span> <span class="pl-v">Done</span>!!! <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">22</span>,<span class="pl-c1">145</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> {<span class="pl-s">"id"</span> : <span class="pl-c1">12</span>,<span class="pl-s">'prediction'</span>: <span class="pl-s">'predicted value here'</span>, <span class="pl-s">'StatusCode'</span>: <span class="pl-s">'200'</span>, <span class="pl-s">'Validations'</span>: []} <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">38</span>,<span class="pl-c1">689</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">278692642.</span><span class="pl-s1">pdf</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">39</span>,<span class="pl-c1">986</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-c1">12_20220811042922077785</span><span class="pl-c1">/</span><span class="pl-c1">278692642.</span><span class="pl-s1">pdf</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">56</span>,<span class="pl-c1">711</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-s1">prediction</span> <span class="pl-c1">=</span> <span class="pl-s1">done</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">56</span>,<span class="pl-c1">711</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">|</span> <span class="pl-c1">0.00</span><span class="pl-c1">%</span> [<span class="pl-c1">0</span><span class="pl-c1">/</span><span class="pl-c1">1</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">&lt;</span>?] <span class="pl-c1">|</span>████████████████████████████████████████<span class="pl-c1">|</span> <span class="pl-c1">100.00</span><span class="pl-c1">%</span> [<span class="pl-c1">1</span><span class="pl-c1">/</span><span class="pl-c1">1</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">&lt;</span><span class="pl-c1">00</span>:<span class="pl-c1">00</span>] <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">40</span>,<span class="pl-c1">316</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">Deleted</span> <span class="pl-v">Temp</span> <span class="pl-s1">folder</span> : <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-c1">12_20220811042922077785</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">40</span>,<span class="pl-c1">316</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">ML</span> <span class="pl-s1">prediction</span> <span class="pl-v">Done</span>!!! <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">29</span>:<span class="pl-c1">40</span>,<span class="pl-c1">318</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> {<span class="pl-s">"id"</span> : <span class="pl-c1">12</span>,<span class="pl-s">'prediction'</span>: <span class="pl-s">'predicted value here'</span>, <span class="pl-s">'StatusCode'</span>: <span class="pl-s">'200'</span>, <span class="pl-s">'Validations'</span>: []} <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-s1">here</span> <span class="pl-s1">for</span> <span class="pl-s1">first</span> <span class="pl-s1">time</span>, <span class="pl-s1">it</span> <span class="pl-s1">took</span> <span class="pl-s1">the</span> <span class="pl-s1">request</span> <span class="pl-s1">id</span> <span class="pl-s1">started</span> <span class="pl-s1">processing</span> <span class="pl-s1">but</span> <span class="pl-s1">before</span> <span class="pl-s1">completing</span> <span class="pl-s1">i</span>.<span class="pl-s1">e</span> <span class="pl-s1">before</span> <span class="pl-s1">deleting</span> <span class="pl-s1">temp</span> <span class="pl-s1">path</span>, <span class="pl-s1">second</span> <span class="pl-s1">process</span><span class="pl-c1">/</span><span class="pl-s1">thread</span> <span class="pl-c1">is</span> <span class="pl-s1">initiated</span> <span class="pl-k">as</span> <span class="pl-s1">i</span> <span class="pl-s1">see</span> <span class="pl-s1">this</span> <span class="pl-s1">log</span> <span class="pl-s1">again</span> <span class="pl-c1">**</span><span class="pl-v">ML</span> <span class="pl-s1">prediction</span> <span class="pl-v">API</span> <span class="pl-s1">started</span> <span class="pl-k">for</span> <span class="pl-s1">id</span> : <span class="pl-c1">12</span> <span class="pl-c1">and</span> <span class="pl-s1">a</span> <span class="pl-s1">new</span> <span class="pl-s1">temp</span> <span class="pl-s1">path</span> <span class="pl-s1">is</span> <span class="pl-s1">also</span> <span class="pl-s1">created</span> <span class="pl-c1">2022</span><span class="pl-c1">-</span><span class="pl-c1">08</span><span class="pl-c1">-</span><span class="pl-c1">11</span> <span class="pl-c1">04</span>:<span class="pl-c1">28</span>:<span class="pl-c1">22</span>,<span class="pl-c1">080</span> <span class="pl-c1">-</span> <span class="pl-s1">main</span> <span class="pl-c1">-</span> <span class="pl-v">INFO</span> <span class="pl-c1">-</span> <span class="pl-v">Temp</span> <span class="pl-s1">folder</span> <span class="pl-s1">structure</span> <span class="pl-s1">created</span> : <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-c1">12_20220811042822080625</span><span class="pl-c1">**</span> <span class="pl-s1">and</span> <span class="pl-s1">starts</span> <span class="pl-s1">processes</span> <span class="pl-s1">same</span> <span class="pl-s1">request</span> <span class="pl-s1">again</span> <span class="pl-s1">before</span> <span class="pl-s1">first</span> <span class="pl-s1">one</span> <span class="pl-c1">is</span> <span class="pl-s1">complete</span> <span class="pl-s1">then</span> <span class="pl-s1">again</span> <span class="pl-s1">after</span> <span class="pl-s1">few</span> <span class="pl-s1">seconds</span> <span class="pl-s1">third</span> <span class="pl-s1">process</span><span class="pl-c1">/</span><span class="pl-s1">thread</span> <span class="pl-c1">is</span> <span class="pl-s1">initiated</span> <span class="pl-c1">and</span> <span class="pl-s1">starts</span> <span class="pl-s1">processing</span> <span class="pl-s1">on</span> <span class="pl-s1">same</span> <span class="pl-s1">request</span>. <span class="pl-s1">it</span> <span class="pl-s1">shouldn</span><span class="pl-s">'t process same request again and again. I don'</span><span class="pl-s1">t</span> <span class="pl-s1">have</span> <span class="pl-s1">any</span> <span class="pl-s1">multiprocessing</span> <span class="pl-c1">or</span> <span class="pl-s1">multithreading</span> <span class="pl-s1">concept</span> <span class="pl-s1">then</span> <span class="pl-s1">why</span> <span class="pl-s1">its</span> <span class="pl-s1">processing</span> <span class="pl-s1">same</span> <span class="pl-s1">request</span> <span class="pl-s1">again</span> <span class="pl-c1">and</span> <span class="pl-s1">again</span>. <span class="pl-s1">plz</span> <span class="pl-s1">guide</span></pre></div> <h3 dir="auto">Description</h3> <p dir="auto">I don't have any multiprocessing or multithreading concept in my Fast API Application then why its processing same request again and again. Its a simple ML Processing Application</p> <h3 dir="auto">Operating System</h3> <p dir="auto">Linux</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">fastapi-0.68.2</p> <h3 dir="auto">Python Version</h3> <p dir="auto">3.8.5</p> <h3 dir="auto">Additional Context</h3> <p dir="auto"><em>No response</em></p>
0
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong><br> I have a pcolormesh that has shading='gouraud', and I am trying to save it to an .eps. Saving it to a pdf works fine, but trying to save to an eps gives an error.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt import numpy as np plt.pcolormesh(np.random.randn(10,10), shading='gouraud') plt.gcf().savefig('test.eps')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-s1">plt</span>.<span class="pl-en">pcolormesh</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randn</span>(<span class="pl-c1">10</span>,<span class="pl-c1">10</span>), <span class="pl-s1">shading</span><span class="pl-c1">=</span><span class="pl-s">'gouraud'</span>) <span class="pl-s1">plt</span>.<span class="pl-en">gcf</span>().<span class="pl-en">savefig</span>(<span class="pl-s">'test.eps'</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=" 168 def quote_ps_string(s): 169 &quot;Quote dangerous characters of S for use in a PostScript string constant.&quot; --&gt; 170 s=s.replace(&quot;\\&quot;, &quot;\\\\&quot;) 171 s=s.replace(&quot;(&quot;, &quot;\\(&quot;) 172 s=s.replace(&quot;)&quot;, &quot;\\)&quot;) TypeError: a bytes-like object is required, not 'str'"><pre class="notranslate"><code class="notranslate"> 168 def quote_ps_string(s): 169 "Quote dangerous characters of S for use in a PostScript string constant." --&gt; 170 s=s.replace("\\", "\\\\") 171 s=s.replace("(", "\\(") 172 s=s.replace(")", "\\)") TypeError: a bytes-like object is required, not 'str' </code></pre></div> <p dir="auto"><strong>Matplotlib version</strong><br> matplotlib 1.5.1<br> '3.5.1 |Anaconda 2.4.1 (x86_64)| (default, Dec 7 2015, 11:24:55) \n[GCC 4.2.1 (Apple Inc. build 5577)]'<br> OS X</p> <p dir="auto">I fixing this might just require adding a 'b' before these strings.</p>
<p dir="auto">I'm running python 3.4 on Debian 8.3, and am using the Qt5Agg backend. When I call savefig() or use the toolbar widget to save a figure that has a gouraud shaded triangulation, I get the following stacktrace:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/home/tps/PyCharmProjects/test/test_PlotWindow.py&quot;, line 323, in saveFigRButtonClicked savefig(fname) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/pyplot.py&quot;, line 688, in savefig res = fig.savefig(*args, **kwargs) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/figure.py&quot;, line 1565, in savefig self.canvas.print_figure(*args, **kwargs) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_qt5agg.py&quot;, line 196, in print_figure FigureCanvasAgg.print_figure(self, *args, **kwargs) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/backend_bases.py&quot;, line 2232, in print_figure **kwargs) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py&quot;, line 995, in print_eps return self._print_ps(outfile, 'eps', *args, **kwargs) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py&quot;, line 1023, in _print_ps **kwargs) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py&quot;, line 1113, in _print_figure self.figure.draw(renderer) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/artist.py&quot;, line 61, in draw_wrapper draw(artist, renderer, *args, **kwargs) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/figure.py&quot;, line 1159, in draw func(*args) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/artist.py&quot;, line 61, in draw_wrapper draw(artist, renderer, *args, **kwargs) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/axes/_base.py&quot;, line 2324, in draw a.draw(renderer) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/artist.py&quot;, line 61, in draw_wrapper draw(artist, renderer, *args, **kwargs) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/collections.py&quot;, line 1694, in draw renderer.draw_gouraud_triangles(gc, verts, colors, transform.frozen()) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py&quot;, line 867, in draw_gouraud_triangles stream = quote_ps_string(streamarr.tostring()) File &quot;/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py&quot;, line 170, in quote_ps_string s=s.replace(&quot;\\&quot;, &quot;\\\\&quot;) TypeError: expected bytes, bytearray or buffer compatible object"><pre class="notranslate"><span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"/home/tps/PyCharmProjects/test/test_PlotWindow.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">323</span>, <span class="pl-s1">in</span> <span class="pl-s1">saveFigRButtonClicked</span> <span class="pl-en">savefig</span>(<span class="pl-s1">fname</span>) <span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/pyplot.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">688</span>, <span class="pl-s1">in</span> <span class="pl-s1">savefig</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">savefig</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-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/figure.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1565</span>, <span class="pl-s1">in</span> <span class="pl-s1">savefig</span> <span class="pl-s1">self</span>.<span class="pl-s1">canvas</span>.<span class="pl-en">print_figure</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-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_qt5agg.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">196</span>, <span class="pl-s1">in</span> <span class="pl-s1">print_figure</span> <span class="pl-v">FigureCanvasAgg</span>.<span class="pl-en">print_figure</span>(<span class="pl-s1">self</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-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/backend_bases.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">2232</span>, <span class="pl-s1">in</span> <span class="pl-s1">print_figure</span> <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">995</span>, <span class="pl-s1">in</span> <span class="pl-s1">print_eps</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_print_ps</span>(<span class="pl-s1">outfile</span>, <span class="pl-s">'eps'</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-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1023</span>, <span class="pl-s1">in</span> <span class="pl-s1">_print_ps</span> <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1113</span>, <span class="pl-s1">in</span> <span class="pl-s1">_print_figure</span> <span class="pl-s1">self</span>.<span class="pl-s1">figure</span>.<span class="pl-en">draw</span>(<span class="pl-s1">renderer</span>) <span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/artist.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">61</span>, <span class="pl-s1">in</span> <span class="pl-s1">draw_wrapper</span> <span class="pl-en">draw</span>(<span class="pl-s1">artist</span>, <span class="pl-s1">renderer</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-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/figure.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1159</span>, <span class="pl-s1">in</span> <span class="pl-s1">draw</span> <span class="pl-en">func</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>) <span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/artist.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">61</span>, <span class="pl-s1">in</span> <span class="pl-s1">draw_wrapper</span> <span class="pl-en">draw</span>(<span class="pl-s1">artist</span>, <span class="pl-s1">renderer</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-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/axes/_base.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">2324</span>, <span class="pl-s1">in</span> <span class="pl-s1">draw</span> <span class="pl-s1">a</span>.<span class="pl-en">draw</span>(<span class="pl-s1">renderer</span>) <span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/artist.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">61</span>, <span class="pl-s1">in</span> <span class="pl-s1">draw_wrapper</span> <span class="pl-en">draw</span>(<span class="pl-s1">artist</span>, <span class="pl-s1">renderer</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-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/collections.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1694</span>, <span class="pl-s1">in</span> <span class="pl-s1">draw</span> <span class="pl-s1">renderer</span>.<span class="pl-en">draw_gouraud_triangles</span>(<span class="pl-s1">gc</span>, <span class="pl-s1">verts</span>, <span class="pl-s1">colors</span>, <span class="pl-s1">transform</span>.<span class="pl-en">frozen</span>()) <span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">867</span>, <span class="pl-s1">in</span> <span class="pl-s1">draw_gouraud_triangles</span> <span class="pl-s1">stream</span> <span class="pl-c1">=</span> <span class="pl-en">quote_ps_string</span>(<span class="pl-s1">streamarr</span>.<span class="pl-en">tostring</span>()) <span class="pl-v">File</span> <span class="pl-s">"/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">170</span>, <span class="pl-s1">in</span> <span class="pl-s1">quote_ps_string</span> <span class="pl-s1">s</span><span class="pl-c1">=</span><span class="pl-s1">s</span>.<span class="pl-en">replace</span>(<span class="pl-s">"<span class="pl-cce">\\</span>"</span>, <span class="pl-s">"<span class="pl-cce">\\</span><span class="pl-cce">\\</span>"</span>) <span class="pl-v">TypeError</span>: <span class="pl-s1">expected</span> <span class="pl-s1">bytes</span>, <span class="pl-s1">bytearray</span> <span class="pl-c1">or</span> <span class="pl-s1">buffer</span> <span class="pl-s1">compatible</span> <span class="pl-s1">object</span></pre></div>
1
<p dir="auto">I get very very strange numerical inconsistencies like these:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1093567/40580834-df8b364e-6147-11e8-9b4d-4f6aa0300643.png"><img width="789" alt="screen shot 2018-05-27 at 0 29 08" src="https://user-images.githubusercontent.com/1093567/40580834-df8b364e-6147-11e8-9b4d-4f6aa0300643.png" style="max-width: 100%;"></a><br> I could reproduce this in ipython and jupyter notebook but only on macOS, not on Linux. Here is a gist with <a href="https://gist.github.com/cod3licious/d2926e0bdc1355f0a921ac083d2799eb">code to reproduce the error</a> (Note that you need to download and unzip a file first and then appropriately copy your value of <code class="notranslate">vec_x</code> to <code class="notranslate">a</code>.) The error also happens for <code class="notranslate">np.dot</code> and possibly other functions.</p> <p dir="auto">My system specs:<br> macOS 10.13.4 (17E202)<br> Python 3.6.4 :: Anaconda custom (64-bit)<br> jupyter-notebook 5.4.0<br> ipython 6.2.1<br> numpy 1.14.2<br> gensim 3.4.0</p> <p dir="auto">This is a cross post from this <a href="https://github.com/jupyter/notebook/issues/3641" data-hovercard-type="issue" data-hovercard-url="/jupyter/notebook/issues/3641/hovercard">jupyter notebook issue</a> (as I really don't know who's the culprit in the end).</p>
<p dir="auto">Running numpy.dot normally produces the expected answer:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -c &quot;import numpy ; f=numpy.ones(2,dtype=numpy.float32);print f.dot(f)&quot; 2.0"><pre class="notranslate"><code class="notranslate">$ python -c "import numpy ; f=numpy.ones(2,dtype=numpy.float32);print f.dot(f)" 2.0 </code></pre></div> <p dir="auto">If I import a PyQt5 module first, I get a different answer:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -c &quot;import PyQt5.QtWidgets ; import numpy ; f=numpy.ones(2,dtype=numpy.float32);print f.dot(f)&quot; 0.0"><pre class="notranslate"><code class="notranslate">$ python -c "import PyQt5.QtWidgets ; import numpy ; f=numpy.ones(2,dtype=numpy.float32);print f.dot(f)" 0.0 </code></pre></div> <p dir="auto">Other folks appear to have found the issue <a href="https://support.enthought.com/hc/en-us/articles/204469560--RESOLVED-OSX-Numpy-float32-linear-algebra-bug" rel="nofollow">here</a>, with an implied implication of the Accelerate library being loaded first. I could not discover the resolution they used, and I would prefer one that did not require fixing python import order.</p>
1
<p dir="auto">When using <code class="notranslate">pd.DataFrame.describe</code>, if your percentiles are different only at the 4th decimal place, a <code class="notranslate">ValueError</code> is thrown because the the percentiles that vary at the 4th decimal place become the same value.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: s = Series(np.random.randn(10)) In [2]: s.describe() Out[2]: count 10.000000 mean 0.291571 std 1.057143 min -1.453547 25% -0.614614 50% 0.637435 75% 0.968905 max 1.823964 dtype: float64 In [3]: s.describe(percentiles=[0.0001, 0.0005, 0.001, 0.999, 0.9995, 0.9999]) Out[3]: count 10.000000 mean 0.291571 std 1.057143 min -1.453547 0.0% -1.453107 0.1% -1.451348 0.1% -1.449149 50% 0.637435 99.9% 1.817201 100.0% 1.820583 100.0% 1.823288 max 1.823964 dtype: float64"><pre class="notranslate"><code class="notranslate">In [1]: s = Series(np.random.randn(10)) In [2]: s.describe() Out[2]: count 10.000000 mean 0.291571 std 1.057143 min -1.453547 25% -0.614614 50% 0.637435 75% 0.968905 max 1.823964 dtype: float64 In [3]: s.describe(percentiles=[0.0001, 0.0005, 0.001, 0.999, 0.9995, 0.9999]) Out[3]: count 10.000000 mean 0.291571 std 1.057143 min -1.453547 0.0% -1.453107 0.1% -1.451348 0.1% -1.449149 50% 0.637435 99.9% 1.817201 100.0% 1.820583 100.0% 1.823288 max 1.823964 dtype: float64 </code></pre></div>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas a = pandas.DataFrame({'a': ['0'], 'b': ['str']}) print('---') print(a) a.iloc[:, 0] = [int(v) for v in a.iloc[:, 0]] print('---') print(a) b = pandas.concat([a, pandas.DataFrame({'b': ['str2']})], axis=1) print('---') print(b) b.iloc[:, 2] = ['str3'] print('---') print(b)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'a'</span>: [<span class="pl-s">'0'</span>], <span class="pl-s">'b'</span>: [<span class="pl-s">'str'</span>]}) <span class="pl-en">print</span>(<span class="pl-s">'---'</span>) <span class="pl-en">print</span>(<span class="pl-s1">a</span>) <span class="pl-s1">a</span>.<span class="pl-s1">iloc</span>[:, <span class="pl-c1">0</span>] <span class="pl-c1">=</span> [<span class="pl-en">int</span>(<span class="pl-s1">v</span>) <span class="pl-k">for</span> <span class="pl-s1">v</span> <span class="pl-c1">in</span> <span class="pl-s1">a</span>.<span class="pl-s1">iloc</span>[:, <span class="pl-c1">0</span>]] <span class="pl-en">print</span>(<span class="pl-s">'---'</span>) <span class="pl-en">print</span>(<span class="pl-s1">a</span>) <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">concat</span>([<span class="pl-s1">a</span>, <span class="pl-s1">pandas</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'b'</span>: [<span class="pl-s">'str2'</span>]})], <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>) <span class="pl-en">print</span>(<span class="pl-s">'---'</span>) <span class="pl-en">print</span>(<span class="pl-s1">b</span>) <span class="pl-s1">b</span>.<span class="pl-s1">iloc</span>[:, <span class="pl-c1">2</span>] <span class="pl-c1">=</span> [<span class="pl-s">'str3'</span>] <span class="pl-en">print</span>(<span class="pl-s">'---'</span>) <span class="pl-en">print</span>(<span class="pl-s1">b</span>)</pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">The issue seems to be that if there is a DataFrame with duplicate column names and mixed dtypes, if I try to replace one column with another value, using <code class="notranslate">iloc</code>, another column with same name is replaced as well.</p> <h4 dir="auto">Expected Output</h4> <p dir="auto">The final print should be:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" a b b 0 0 str str3"><pre class="notranslate"><code class="notranslate"> a b b 0 0 str str3 </code></pre></div> <p dir="auto">And not:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" a b b 0 0 str3 str3"><pre class="notranslate"><code class="notranslate"> a b b 0 0 str3 str3 </code></pre></div> <p dir="auto">It is interesting that if I change concat line to (see renaming of column <code class="notranslate">b</code> to <code class="notranslate">c</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="b = pandas.concat([a, pandas.DataFrame({'c': ['str2']})], axis=1)"><pre class="notranslate"><code class="notranslate">b = pandas.concat([a, pandas.DataFrame({'c': ['str2']})], axis=1) </code></pre></div> <p dir="auto">Then the output is correctly:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" a b c 0 0 str str3"><pre class="notranslate"><code class="notranslate"> a b c 0 0 str str3 </code></pre></div> <p dir="auto">Also, if <code class="notranslate">a.iloc[:, 0] = [int(v) for v in a.iloc[:, 0]]</code> is commented out, it works also correctly.</p> <p dir="auto">Moreover, the following also work correctly (see the change of <code class="notranslate">0</code> column index into <code class="notranslate">[0]</code> column index, and similar for <code class="notranslate">2</code> (this latter change is not really necessary to make it work)):</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas a = pandas.DataFrame({'a': ['0'], 'b': ['str']}) print('---') print(a) a.iloc[:, [0]] = [int(v) for v in a.iloc[:, 0]] print('---') print(a) b = pandas.concat([a, pandas.DataFrame({'b': ['str2']})], axis=1) print('---') print(b) b.iloc[:, [2]] = ['str3'] print('---') print(b)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'a'</span>: [<span class="pl-s">'0'</span>], <span class="pl-s">'b'</span>: [<span class="pl-s">'str'</span>]}) <span class="pl-en">print</span>(<span class="pl-s">'---'</span>) <span class="pl-en">print</span>(<span class="pl-s1">a</span>) <span class="pl-s1">a</span>.<span class="pl-s1">iloc</span>[:, [<span class="pl-c1">0</span>]] <span class="pl-c1">=</span> [<span class="pl-en">int</span>(<span class="pl-s1">v</span>) <span class="pl-k">for</span> <span class="pl-s1">v</span> <span class="pl-c1">in</span> <span class="pl-s1">a</span>.<span class="pl-s1">iloc</span>[:, <span class="pl-c1">0</span>]] <span class="pl-en">print</span>(<span class="pl-s">'---'</span>) <span class="pl-en">print</span>(<span class="pl-s1">a</span>) <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">concat</span>([<span class="pl-s1">a</span>, <span class="pl-s1">pandas</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'b'</span>: [<span class="pl-s">'str2'</span>]})], <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>) <span class="pl-en">print</span>(<span class="pl-s">'---'</span>) <span class="pl-en">print</span>(<span class="pl-s1">b</span>) <span class="pl-s1">b</span>.<span class="pl-s1">iloc</span>[:, [<span class="pl-c1">2</span>]] <span class="pl-c1">=</span> [<span class="pl-s">'str3'</span>] <span class="pl-en">print</span>(<span class="pl-s">'---'</span>) <span class="pl-en">print</span>(<span class="pl-s1">b</span>)</pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.6.3.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.13.0-46-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8<br> LOCALE: en_US.UTF-8</p> <p dir="auto">pandas: 0.23.3<br> pytest: None<br> pip: 18.0<br> setuptools: 40.0.0<br> Cython: None<br> numpy: 1.15.0<br> scipy: None<br> pyarrow: None<br> xarray: None<br> IPython: None<br> sphinx: None<br> patsy: None<br> dateutil: 2.7.3<br> pytz: 2018.5<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> feather: None<br> matplotlib: None<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: None<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: None<br> s3fs: None<br> fastparquet: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
0
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; master</li> <li>Operating System / Platform =&gt; Windows 64 Bit</li> <li>Compiler =&gt; Visual Studio 15 2017 Win64</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">When doing Configure on master branch in Windows with CV_DISABLE_OPTIMIZATION checked, it causes the CMake configuration process to fail on errors like these:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CMake Error at cmake/OpenCVUtils.cmake:331 (target_include_directories): Cannot specify include directories for target &quot;opencv_test_core_SSE4_1&quot; which is not built by this project. Call Stack (most recent call first): cmake/OpenCVModule.cmake:675 (ocv_target_include_directories) cmake/OpenCVModule.cmake:1239 (ocv_target_include_modules) modules/core/CMakeLists.txt:97 (ocv_add_accuracy_tests) CMake Error at cmake/OpenCVUtils.cmake:331 (target_include_directories): Cannot specify include directories for target &quot;opencv_test_core_SSE4_2&quot; which is not built by this project. Call Stack (most recent call first): cmake/OpenCVModule.cmake:675 (ocv_target_include_directories) cmake/OpenCVModule.cmake:1239 (ocv_target_include_modules) modules/core/CMakeLists.txt:97 (ocv_add_accuracy_tests) ....."><pre class="notranslate"><code class="notranslate">CMake Error at cmake/OpenCVUtils.cmake:331 (target_include_directories): Cannot specify include directories for target "opencv_test_core_SSE4_1" which is not built by this project. Call Stack (most recent call first): cmake/OpenCVModule.cmake:675 (ocv_target_include_directories) cmake/OpenCVModule.cmake:1239 (ocv_target_include_modules) modules/core/CMakeLists.txt:97 (ocv_add_accuracy_tests) CMake Error at cmake/OpenCVUtils.cmake:331 (target_include_directories): Cannot specify include directories for target "opencv_test_core_SSE4_2" which is not built by this project. Call Stack (most recent call first): cmake/OpenCVModule.cmake:675 (ocv_target_include_directories) cmake/OpenCVModule.cmake:1239 (ocv_target_include_modules) modules/core/CMakeLists.txt:97 (ocv_add_accuracy_tests) ..... </code></pre></div> <p dir="auto">and many more of the same error for the various components that are selected for building.</p> <h5 dir="auto">Steps to reproduce</h5> <p dir="auto">In Windows 10 x64, CMake (v3.7.2), clone the repo, checkout <code class="notranslate">master</code> branch, and run CMake Configure with <em>Visual Studio 15 2017 Win64</em> as the compiler.</p>
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 4.1.2</li> <li>Operating System / Platform =&gt; Linux / Ubuntu 18.04</li> <li>Compiler =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">When running the code below that call <code class="notranslate">solvePnPGeneric</code> from Python the program crashes because the C++ code expect a different type for <code class="notranslate">reprojectionError</code> from the one passed by <code class="notranslate">solvePnPGeneric</code> by default. The argument is however <a href="https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga624af8a6641b9bdb487f63f694e8bb90" rel="nofollow">documented</a> as optional. Passing the argument with the correct type avoid the error.</p> <p dir="auto">I suspect that the binding of the <code class="notranslate">solvePnPGeneric</code> function do not pass the correct argument type for <code class="notranslate">reprojectionError</code> by default.</p> <p dir="auto">The error:</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;error.py&quot;, line 15, in &lt;module&gt; obj_points, img_points, cameraMatrix, distCoeffs #, reprojectionError=r cv2.error: OpenCV(4.1.2) /io/opencv/modules/calib3d/src/solvepnp.cpp:1017: error: (-2:Unspecified error) in function 'int cv::solvePnPGeneric(cv::InputArray, cv::InputArray, cv::InputArray, cv::InputArray, cv::OutputArrayOfArrays, cv::OutputArrayOfArrays, bool, cv::SolvePnPMethod, cv::InputArray, cv::InputArray, cv::OutputArray)' &gt; Type of reprojectionError must be CV_32FC1 or CV_64FC1!: &gt; 'type == CV_32FC1 || type == CV_64FC1' &gt; where &gt; 'reprojectionError.type()' is 0 (CV_8UC1)"><pre class="notranslate">Traceback (most recent call last): File <span class="pl-s"><span class="pl-pds">"</span>error.py<span class="pl-pds">"</span></span>, line 15, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span> obj_points, img_points, cameraMatrix, distCoeffs <span class="pl-c"><span class="pl-c">#</span>, reprojectionError=r</span> cv2.error: OpenCV(4.1.2) /io/opencv/modules/calib3d/src/solvepnp.cpp:1017: error: (-2:Unspecified error) <span class="pl-k">in</span> <span class="pl-k">function</span> <span class="pl-en">'int</span> cv::solvePnPGeneric(cv::InputArray, cv::InputArray, cv::InputArray, cv::InputArray, cv::OutputArrayOfArrays, cv::OutputArrayOfArrays, bool, cv::SolvePnPMethod, cv::InputArray, cv::InputArray, cv::OutputArray)<span class="pl-s"><span class="pl-pds">'</span></span> <span class="pl-s">&gt; Type of reprojectionError must be CV_32FC1 or CV_64FC1!:</span> <span class="pl-s">&gt; <span class="pl-pds">'</span></span>type == CV_32FC1 <span class="pl-k">||</span> <span class="pl-c1">type</span> == CV_64FC1<span class="pl-s"><span class="pl-pds">'</span></span> <span class="pl-s">&gt; where</span> <span class="pl-s">&gt; <span class="pl-pds">'</span></span>reprojectionError.type()<span class="pl-s"><span class="pl-pds">'</span> is 0 (CV_8UC1)</span></pre></div> <p dir="auto">This might be closely linked to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="531627180" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv/issues/16040" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv/issues/16040/hovercard" href="https://github.com/opencv/opencv/issues/16040">#16040</a> which is about Java binding of solvePnPGeneric</p> <h5 dir="auto">Steps to reproduce</h5> <p dir="auto">Run this code (OpenCV 4.1.2 / Python 3.6.8)</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import cv2 obj_points = np.array([[0, 0, 0], [0, 1, 0], [1, 1, 0], [1, 0, 0]], dtype=np.float32) img_points = np.array( [[700, 400], [700, 600], [900, 600], [900, 400]], dtype=np.float32 ) cameraMatrix = np.array( [[712.0634, 0, 800], [0, 712.540, 500], [0, 0, 1]], dtype=np.float32 ) distCoeffs = np.array([[0, 0, 0, 0]], dtype=np.float32) #r = np.array([], dtype=np.float32) x, r, t, e = cv2.solvePnPGeneric( obj_points, img_points, cameraMatrix, distCoeffs #, reprojectionError=r ) print(e) print(t)"><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">cv2</span> <span class="pl-s1">obj_points</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([[<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>]], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">float32</span>) <span class="pl-s1">img_points</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>( [[<span class="pl-c1">700</span>, <span class="pl-c1">400</span>], [<span class="pl-c1">700</span>, <span class="pl-c1">600</span>], [<span class="pl-c1">900</span>, <span class="pl-c1">600</span>], [<span class="pl-c1">900</span>, <span class="pl-c1">400</span>]], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">float32</span> ) <span class="pl-s1">cameraMatrix</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>( [[<span class="pl-c1">712.0634</span>, <span class="pl-c1">0</span>, <span class="pl-c1">800</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">712.540</span>, <span class="pl-c1">500</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>]], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">float32</span> ) <span class="pl-s1">distCoeffs</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([[<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>]], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">float32</span>) <span class="pl-c">#r = np.array([], dtype=np.float32)</span> <span class="pl-s1">x</span>, <span class="pl-s1">r</span>, <span class="pl-s1">t</span>, <span class="pl-s1">e</span> <span class="pl-c1">=</span> <span class="pl-s1">cv2</span>.<span class="pl-en">solvePnPGeneric</span>( <span class="pl-s1">obj_points</span>, <span class="pl-s1">img_points</span>, <span class="pl-s1">cameraMatrix</span>, <span class="pl-s1">distCoeffs</span> <span class="pl-c">#, reprojectionError=r</span> ) <span class="pl-en">print</span>(<span class="pl-s1">e</span>) <span class="pl-en">print</span>(<span class="pl-s1">t</span>)</pre></div> <p dir="auto">The error can be bypassed by uncommenting the <code class="notranslate">#r = np.array([], dtype=np.float32)</code> lines.</p> <p dir="auto">Thanks for the amazing work and happy to help or provide more information!</p>
0
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p> <p dir="auto">This problem occurs in sqlalchemy 4.7.1, using oracle 9.</p> <p dir="auto">Case scenario:<br> I had a job table, and a task task, and a jabs2tasks table to create a many to many relation. I created a job and a task, and added the job twice to the task (using a relation that have a secondary). len(task.jobs) returned 2. Then I saved the task and commited.<br> I was expecting that an exception would be thrown, but it didn't. When I looked in at jobs2tasks in my SQLNavigator, I saw that only one entry was enetered.</p> <p dir="auto">The problem is, that this behaviour is not expected. When I try to enter, for example, a task that already exists in the db (the same task_id), sqlalchemy throw a constraint exception. I think that this is exactly the same case, but with a complex primary key.</p> <p dir="auto">Reported by Kobi Perl.</p>
<h3 dir="auto">Describe the bug</h3> <p dir="auto">The <code class="notranslate">CreateSchema</code> DDL construct accepts a parameter <code class="notranslate">if_not_exists</code> via its base class, <code class="notranslate">_CreateDropBase</code>. However, this parameter is ignored: for example, <code class="notranslate">CreateSchema("myschema", if_not_exists=True)</code> produces <code class="notranslate">CREATE SCHEMA myschema</code> rather than <code class="notranslate">CREATE SCHEMA myschema IF NOT EXISTS</code>.</p> <h3 dir="auto">To Reproduce</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Assuming a Postgres server serving on localhost:5432 from sqlalchemy import create_engine from sqlalchemy.engine import url from sqlalchemy.sql.ddl import CreateSchema db_url = url.URL.create( &quot;postgresql&quot;, username=&quot;postgres&quot;, password=&quot;postgres&quot;, host=&quot;localhost&quot;, port=5432, database=&quot;postgres&quot;, ) engine = create_engine(db_url) engine.execute(CreateSchema(&quot;myschema&quot;, if_not_exists=True)) engine.execute(CreateSchema(&quot;myschema&quot;, if_not_exists=True))"><pre class="notranslate"><span class="pl-c"># Assuming a Postgres server serving on localhost:5432</span> <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">create_engine</span> <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">engine</span> <span class="pl-k">import</span> <span class="pl-s1">url</span> <span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">ddl</span> <span class="pl-k">import</span> <span class="pl-v">CreateSchema</span> <span class="pl-s1">db_url</span> <span class="pl-c1">=</span> <span class="pl-s1">url</span>.<span class="pl-v">URL</span>.<span class="pl-en">create</span>( <span class="pl-s">"postgresql"</span>, <span class="pl-s1">username</span><span class="pl-c1">=</span><span class="pl-s">"postgres"</span>, <span class="pl-s1">password</span><span class="pl-c1">=</span><span class="pl-s">"postgres"</span>, <span class="pl-s1">host</span><span class="pl-c1">=</span><span class="pl-s">"localhost"</span>, <span class="pl-s1">port</span><span class="pl-c1">=</span><span class="pl-c1">5432</span>, <span class="pl-s1">database</span><span class="pl-c1">=</span><span class="pl-s">"postgres"</span>, ) <span class="pl-s1">engine</span> <span class="pl-c1">=</span> <span class="pl-en">create_engine</span>(<span class="pl-s1">db_url</span>) <span class="pl-s1">engine</span>.<span class="pl-en">execute</span>(<span class="pl-v">CreateSchema</span>(<span class="pl-s">"myschema"</span>, <span class="pl-s1">if_not_exists</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)) <span class="pl-s1">engine</span>.<span class="pl-en">execute</span>(<span class="pl-v">CreateSchema</span>(<span class="pl-s">"myschema"</span>, <span class="pl-s1">if_not_exists</span><span class="pl-c1">=</span><span class="pl-c1">True</span>))</pre></div> <h3 dir="auto">Error</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/.../python &quot;/.../scratch_13.py&quot; Traceback (most recent call last): File &quot;/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py&quot;, line 1771, in _execute_context self.dialect.do_execute( File &quot;/.../lib/python3.10/site-packages/sqlalchemy/engine/default.py&quot;, line 717, in do_execute cursor.execute(statement, parameters) psycopg2.errors.DuplicateSchema: schema &quot;myschema&quot; already exists The above exception was the direct cause of the following exception: Traceback (most recent call last): File &quot;/.../scratch_13.py&quot;, line 16, in &lt;module&gt; engine.execute(CreateSchema(&quot;myschema&quot;, if_not_exists=True)) File &quot;&lt;string&gt;&quot;, line 2, in execute File &quot;/.../lib/python3.10/site-packages/sqlalchemy/util/deprecations.py&quot;, line 390, in warned return fn(*args, **kwargs) File &quot;/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py&quot;, line 3108, in execute return connection.execute(statement, *multiparams, **params) File &quot;/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py&quot;, line 1263, in execute return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS) File &quot;/.../lib/python3.10/site-packages/sqlalchemy/sql/ddl.py&quot;, line 77, in _execute_on_connection return connection._execute_ddl( File &quot;/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py&quot;, line 1353, in _execute_ddl ret = self._execute_context( File &quot;/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py&quot;, line 1814, in _execute_context self._handle_dbapi_exception( File &quot;/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py&quot;, line 1995, in _handle_dbapi_exception util.raise_( File &quot;/.../lib/python3.10/site-packages/sqlalchemy/util/compat.py&quot;, line 207, in raise_ raise exception File &quot;/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py&quot;, line 1771, in _execute_context self.dialect.do_execute( File &quot;/.../lib/python3.10/site-packages/sqlalchemy/engine/default.py&quot;, line 717, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.errors.DuplicateSchema) schema &quot;myschema&quot; already exists [SQL: CREATE SCHEMA myschema] (Background on this error at: https://sqlalche.me/e/14/f405)"><pre class="notranslate"><code class="notranslate">/.../python "/.../scratch_13.py" Traceback (most recent call last): File "/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1771, in _execute_context self.dialect.do_execute( File "/.../lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 717, in do_execute cursor.execute(statement, parameters) psycopg2.errors.DuplicateSchema: schema "myschema" already exists The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/.../scratch_13.py", line 16, in &lt;module&gt; engine.execute(CreateSchema("myschema", if_not_exists=True)) File "&lt;string&gt;", line 2, in execute File "/.../lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 390, in warned return fn(*args, **kwargs) File "/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3108, in execute return connection.execute(statement, *multiparams, **params) File "/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1263, in execute return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS) File "/.../lib/python3.10/site-packages/sqlalchemy/sql/ddl.py", line 77, in _execute_on_connection return connection._execute_ddl( File "/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1353, in _execute_ddl ret = self._execute_context( File "/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1814, in _execute_context self._handle_dbapi_exception( File "/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1995, in _handle_dbapi_exception util.raise_( File "/.../lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 207, in raise_ raise exception File "/.../lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1771, in _execute_context self.dialect.do_execute( File "/.../lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 717, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.errors.DuplicateSchema) schema "myschema" already exists [SQL: CREATE SCHEMA myschema] (Background on this error at: https://sqlalche.me/e/14/f405) </code></pre></div> <h3 dir="auto">Versions</h3> <ul dir="auto"> <li>OS: OSX 12.0.1</li> <li>Python: 3.10.2</li> <li>SQLAlchemy: 1.4.22</li> <li>Database: PostgreSQL 13.4</li> <li>DBAPI (eg: psycopg, cx_oracle, mysqlclient): psycopg</li> </ul> <h3 dir="auto">Additional context</h3> <p dir="auto">From inspection of the source, it seems that <code class="notranslate">CreateTable</code> and <code class="notranslate">CreateIndex</code> are the only subclasses of <code class="notranslate">_CreateDropBase</code> that make use of the parameter; from this it is not clear why the parameter exists on the base class instead of the specific subclasses that actually use it.</p> <p dir="auto">I appreciate that implementing support for this might be confounded by different support for this feature in different database engines. However I see that it is supported for indices even though MySQL doesn't support that syntax as far as I can see (and the <code class="notranslate">IF NOT EXISTS</code> is even added in the <code class="notranslate">MySQLDDLCompiler</code>, strangely). If support is not feasible, it might be worthwhile moving the <code class="notranslate">if_not_exists</code> parameters onto just the classes that support it.</p> <p dir="auto">All of these observations also apply to the <code class="notranslate">if_exists</code> parameter too.</p>
0
<p dir="auto">This was found during training using the core developer training dataset:</p> <p dir="auto">Getting all the term suggestions for framework</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="GET stack/_suggest { &quot;mysuggest&quot; : { &quot;text&quot; : &quot;framework&quot;, &quot;term&quot; : { &quot;field&quot; : &quot;title&quot;, &quot;suggest_mode&quot; : &quot;always&quot;, &quot;sort&quot; : &quot;score&quot;, &quot;size&quot; : 20 } } }"><pre class="notranslate"><span class="pl-ii">GET stack/_suggest</span> { <span class="pl-ent">"mysuggest"</span> : { <span class="pl-ent">"text"</span> : <span class="pl-s"><span class="pl-pds">"</span>framework<span class="pl-pds">"</span></span>, <span class="pl-ent">"term"</span> : { <span class="pl-ent">"field"</span> : <span class="pl-s"><span class="pl-pds">"</span>title<span class="pl-pds">"</span></span>, <span class="pl-ent">"suggest_mode"</span> : <span class="pl-s"><span class="pl-pds">"</span>always<span class="pl-pds">"</span></span>, <span class="pl-ent">"sort"</span> : <span class="pl-s"><span class="pl-pds">"</span>score<span class="pl-pds">"</span></span>, <span class="pl-ent">"size"</span> : <span class="pl-c1">20</span> } } }</pre></div> <p dir="auto">yields:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[{ &quot;text&quot;: &quot;frameworks&quot;, &quot;score&quot;: 0.8888889, &quot;freq&quot;: 16 }, { &quot;text&quot;: &quot;framework2&quot;, &quot;score&quot;: 0.8888889, &quot;freq&quot;: 1 }, { &quot;text&quot;: &quot;framwork&quot;, &quot;score&quot;: 0.875, &quot;freq&quot;: 5 }, { &quot;text&quot;: &quot;framewok&quot;, &quot;score&quot;: 0.875, &quot;freq&quot;: 2 }, { &quot;text&quot;: &quot;famework&quot;, &quot;score&quot;: 0.875, &quot;freq&quot;: 1 }, { &quot;text&quot;: &quot;framework's&quot;, &quot;score&quot;: 0.7777778, &quot;freq&quot;: 1 }, { &quot;text&quot;: &quot;freamwork&quot;, &quot;score&quot;: 0.7777778, &quot;freq&quot;: 1 }]"><pre class="notranslate">[{ <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>frameworks<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.8888889</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">16</span> }, { <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>framework2<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.8888889</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">1</span> }, { <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>framwork<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.875</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">5</span> }, { <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>framewok<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.875</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">2</span> }, { <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>famework<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.875</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">1</span> }, { <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>framework's<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.7777778</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">1</span> }, { <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>freamwork<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.7777778</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">1</span> }]</pre></div> <p dir="auto">if we then pick any of the of these terms, except the most popular <code class="notranslate">frameworks</code> and feed it to the term suggester using the missing option:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="GET stack/_suggest { &quot;mysuggest&quot; : { &quot;text&quot; : &quot;framwork&quot;, &quot;term&quot; : { &quot;field&quot; : &quot;title&quot;, &quot;suggest_mode&quot; : &quot;missing&quot;, &quot;sort&quot; : &quot;score&quot;, &quot;size&quot; : 20 } } }"><pre class="notranslate"><span class="pl-ii">GET stack/_suggest</span> { <span class="pl-ent">"mysuggest"</span> : { <span class="pl-ent">"text"</span> : <span class="pl-s"><span class="pl-pds">"</span>framwork<span class="pl-pds">"</span></span>, <span class="pl-ent">"term"</span> : { <span class="pl-ent">"field"</span> : <span class="pl-s"><span class="pl-pds">"</span>title<span class="pl-pds">"</span></span>, <span class="pl-ent">"suggest_mode"</span> : <span class="pl-s"><span class="pl-pds">"</span>missing<span class="pl-pds">"</span></span>, <span class="pl-ent">"sort"</span> : <span class="pl-s"><span class="pl-pds">"</span>score<span class="pl-pds">"</span></span>, <span class="pl-ent">"size"</span> : <span class="pl-c1">20</span> } } }</pre></div> <p dir="auto">We still get back suggestions:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[{ &quot;text&quot;: &quot;framework&quot;, &quot;score&quot;: 0.875, &quot;freq&quot;: 197 }, { &quot;text&quot;: &quot;frameworks&quot;, &quot;score&quot;: 0.75, &quot;freq&quot;: 9 }, { &quot;text&quot;: &quot;framewok&quot;, &quot;score&quot;: 0.75, &quot;freq&quot;: 1 }, { &quot;text&quot;: &quot;framework2&quot;, &quot;score&quot;: 0.75, &quot;freq&quot;: 1 }]"><pre class="notranslate">[{ <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>framework<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.875</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">197</span> }, { <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>frameworks<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.75</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">9</span> }, { <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>framewok<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.75</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">1</span> }, { <span class="pl-ent">"text"</span>: <span class="pl-s"><span class="pl-pds">"</span>framework2<span class="pl-pds">"</span></span>, <span class="pl-ent">"score"</span>: <span class="pl-c1">0.75</span>, <span class="pl-ent">"freq"</span>: <span class="pl-c1">1</span> }]</pre></div> <p dir="auto">Only for the most <code class="notranslate">popular</code> term do we get back no suggestions.</p> <p dir="auto">For full reference here is how <code class="notranslate">framwork</code> gets analyzed:</p> <p dir="auto"><code class="notranslate">GET stack/_analyze?field=title&amp;text=framwork</code></p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;tokens&quot;: [ { &quot;token&quot;: &quot;framwork&quot;, &quot;start_offset&quot;: 0, &quot;end_offset&quot;: 8, &quot;type&quot;: &quot;&lt;ALPHANUM&gt;&quot;, &quot;position&quot;: 0 } ] }"><pre class="notranslate">{ <span class="pl-ent">"tokens"</span>: [ { <span class="pl-ent">"token"</span>: <span class="pl-s"><span class="pl-pds">"</span>framwork<span class="pl-pds">"</span></span>, <span class="pl-ent">"start_offset"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"end_offset"</span>: <span class="pl-c1">8</span>, <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>&lt;ALPHANUM&gt;<span class="pl-pds">"</span></span>, <span class="pl-ent">"position"</span>: <span class="pl-c1">0</span> } ] }</pre></div>
<p dir="auto">I have found a few odd cases where the phrase suggester with suggest_mode: "missing" generates a suggestion even though the query returns results. I am querying across two indexes but the query term only exists in one of the indexes. I get the search results I expect, but I do not expect to get a suggestion.</p> <p dir="auto">I am trying to come up with a curl recreation but I haven't been able to reproduce it yet in a smaller corpus.</p> <p dir="auto">I believe what is happening is that the phrase suggestions are getting merged together in the same way the query results are merged together across multiple indexes. If I have query results from test_1 and no results from test_2, then I expect to see results from test_1. But if I have a suggestion from test_1 and no suggestion from test_2 (due to suggest_mode: "missing"), I do not expect to see a suggestion.</p>
1
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/fchollet/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/fchollet">@fchollet</a> and other kerasors,<br> We all know that if we are dealing with large scale of data such as ImageNet, we could write a customized generator which produces batch data (often as numpy.array) from disk. Then we could train our model with <code class="notranslate">model.fit_generator()</code>. But, if we want to use <code class="notranslate">ImageDataGenerator</code> to do the online data augmentation at the same time, what is the simplest way to implement? Note that I would like to use its <code class="notranslate">flow()</code> method instead of <code class="notranslate">flow_from_directory()</code> method.</p>
<p dir="auto">Hello everyone, I have a tricky programming question. I want to implement an exponentially moving average of centroids on hidden layers inputs activations of an AutoEncoder to maximize ICC over several class in keras<br> (adding a loss penalizing this term).<br> It would require to know the final output of the classification for calculating the centroids. I could do it by adding the output of this layer as an extra output of neural network. But it would duplicate data. And it won t be nice to work with in the case if I haven t to apply this on any hidden layers.<br> Do you have any ideas how to do so ? Thank you</p>
0
<h2 dir="auto">Expected Behavior</h2> <p dir="auto">After installing example and running <code class="notranslate">yarn test</code> the test should pass</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">After running <code class="notranslate">yarn test</code> we are getting an error</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Plugin 0 specified in &quot;/with-jest-app/node_modules/next/babel.js&quot; provided an invalid property of &quot;default&quot; (While processing preset: &quot;/with-jest-app/node_modules/next/babel.js&quot;)"><pre class="notranslate"><code class="notranslate">Plugin 0 specified in "/with-jest-app/node_modules/next/babel.js" provided an invalid property of "default" (While processing preset: "/with-jest-app/node_modules/next/babel.js") </code></pre></div> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">go to <a href="https://github.com/zeit/next.js/tree/canary/examples/with-jest">https://github.com/zeit/next.js/tree/canary/examples/with-jest</a> and follow readme installation steps</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td>v6</td> </tr> <tr> <td>node</td> <td>v8.9.4</td> </tr> <tr> <td>OS</td> <td>High Sierra</td> </tr> </tbody> </table>
<p dir="auto">when i run test from npm scripts i have error</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" C:\with-jest-app\jest.setup.js:1 ({&quot;Object.&lt;anonymous&gt;&quot;:function(module,exports,require,__dirname,__filename,global,jest){import { configure } from 'enzyme'; ^ SyntaxError: Unexpected token { at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17)"><pre class="notranslate"><code class="notranslate"> C:\with-jest-app\jest.setup.js:1 ({"Object.&lt;anonymous&gt;":function(module,exports,require,__dirname,__filename,global,jest){import { configure } from 'enzyme'; ^ SyntaxError: Unexpected token { at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17) </code></pre></div> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td>5.1.0</td> </tr> <tr> <td>node</td> <td>10.0.0</td> </tr> </tbody> </table>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=rauar" rel="nofollow">Alex Rau</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7842?redirect=false" rel="nofollow">SPR-7842</a></strong> and commented</p> <p dir="auto">DataBinder which is used by WebRequestDataBinder and ServletRequestDataBinder grows automatically collections when "autoGrowNestedPaths" is on (AFAIK this is the default for the DataBinder).</p> <p dir="auto">The behaviour of DataBinder when "autoGrowNestedPaths" is that a property with a given index N will result in growing a collection to size N if the collection is not large enough. Collection elements with index &lt; N will be initialized with default objects of the collection's type.</p> <p dir="auto">Based on WebRequestDataBinder it's therefore easily possible to DoS a web application if it's allowed to bind against a collection property and the client POSTs a single property using a very large index.</p> <p dir="auto">Sending a single request containing a parameter for a collection property with index 99999999 caused an OOM on a JVM on MacOsX with default memory settings (64MB?). The list type in this case contained 7 String properties and 2 Longs.</p> <p dir="auto">I think there are several things to follow-up:</p> <ol dir="auto"> <li> <p dir="auto">It would be safer to set autoGrowNestedPaths to false by default. Use of DataBinder and autoGrowNestedPaths then would be more restrictive by default and require explicit action to enable autoGrowing.</p> </li> <li> <p dir="auto">The creation of "default" values in BeanWrapperImpl should be more flexible. A strategy for creating default values would allow clients to define how such default values should be created. In the case of WebRequestDataBinder creating empty (null) collection elements instead of default objects is certainly safer to fill the gaps in the collection - especially for exposed applications to the public. Furthermore this does not expose unwanted restrictions like a maximum allowed index limitation etc.</p> </li> <li> <p dir="auto">Presumably this could be solved with CustomPropertyEditors. However the majority of developers probably tries to stick with what is available out-of-the box and as the DataBinding in general for "standard" use-cases works fine dealing with the described issue is not obvious and could lead to wide-spread holes.</p> </li> </ol> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.5</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="398112536" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13022" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13022/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13022">#13022</a> Can make an OutOfMemoryException by sending a modified form list property with an high index (<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="398097010" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10702" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10702/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10702">#10702</a> Data Binder: Auto-grow collections as needed to support nested property binding</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398156797" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14862" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14862/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14862">#14862</a> Limit auto grow collection size when using SpEL</li> </ul> <p dir="auto">7 votes, 7 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=colin.sampaleanu" rel="nofollow">Colin Sampaleanu</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-1319?redirect=false" rel="nofollow">SPR-1319</a></strong> and commented</p> <p dir="auto">If you try to use one bean factory post-processor it can't actually modify the definion of a 2nd post-processor, even if that one has yet to run. This is because the appcontext as a one time process builds up two lists (ordered and non-ordered) of all the post-processors, and actually creates the objects then. Any modified bean definition past that point will be irrelevant.</p> <p dir="auto">I'm not sure this can be resolved without some painful code, but I'm putting the issue here so it can be either marked 'won't resolve' or 'working as intended', or actually fixed, and people can find it when searching.</p> <p dir="auto">Here's a snippet of config that shows the problem. In this case, one PropertyPlaceHolderConfigurer modifies the 2nd:</p> <p dir="auto">&lt;bean id="fixProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;<br> &lt;property name="location" value="classpath:remote-sync-client.properties"/&gt;<br> &lt;property name="ignoreUnresolvablePlaceholders" value="true"&gt;&lt;/property&gt;<br> &lt;/bean&gt;</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;bean id=&quot;variableProperties&quot; class=&quot;org.springframework.beans.factory.config.PropertyPlaceholderConfigurer&quot; depends-on=&quot;fixProperties&quot;&gt; &lt;property name=&quot;location&quot; value=&quot;file:${remote.sync.data.dir}/client.config&quot;/&gt; &lt;/bean&gt; &lt;bean id=&quot;pathProperties&quot; class=&quot;org.springframework.beans.factory.config.PropertiesFactoryBean&quot; depends-on=&quot;variableProperties&quot;&gt; &lt;property name=&quot;location&quot; value=&quot;file:${remote.sync.data.dir}/path.config&quot;/&gt; &lt;/bean&gt; &lt;bean id=&quot;clientConfiguration&quot; class=&quot;com.tirawireless.remotesync.client.impl.ClientConfiguration&quot; depends-on=&quot;pathProperties&quot;&gt; &lt;property name=&quot;id&quot; value=&quot;${client.id}&quot;&gt;&lt;/property&gt; &lt;property name=&quot;password&quot; value=&quot;${client.password}&quot;&gt;&lt;/property&gt; &lt;property name=&quot;serverHost&quot; value=&quot;${remote.sync.server.host}&quot;&gt;&lt;/property&gt; &lt;property name=&quot;serverPort&quot; value=&quot;${remote.sync.server.port}&quot;&gt;&lt;/property&gt; &lt;property name=&quot;dataDirectory&quot; value=&quot;${remote.sync.data.dir}&quot;&gt;&lt;/property&gt; &lt;property name=&quot;syncDirectories&quot;&gt; &lt;ref local=&quot;pathProperties&quot;/&gt; &lt;/property&gt; &lt;/bean&gt;"><pre class="notranslate"><code class="notranslate">&lt;bean id="variableProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" depends-on="fixProperties"&gt; &lt;property name="location" value="file:${remote.sync.data.dir}/client.config"/&gt; &lt;/bean&gt; &lt;bean id="pathProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean" depends-on="variableProperties"&gt; &lt;property name="location" value="file:${remote.sync.data.dir}/path.config"/&gt; &lt;/bean&gt; &lt;bean id="clientConfiguration" class="com.tirawireless.remotesync.client.impl.ClientConfiguration" depends-on="pathProperties"&gt; &lt;property name="id" value="${client.id}"&gt;&lt;/property&gt; &lt;property name="password" value="${client.password}"&gt;&lt;/property&gt; &lt;property name="serverHost" value="${remote.sync.server.host}"&gt;&lt;/property&gt; &lt;property name="serverPort" value="${remote.sync.server.port}"&gt;&lt;/property&gt; &lt;property name="dataDirectory" value="${remote.sync.data.dir}"&gt;&lt;/property&gt; &lt;property name="syncDirectories"&gt; &lt;ref local="pathProperties"/&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre></div> <hr> <p dir="auto"><strong>Affects:</strong> 1.2.4</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="398057957" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/5782" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/5782/hovercard" href="https://github.com/spring-projects/spring-framework/issues/5782">#5782</a> AbstractApplicationContext shouldn't eagerly instantiate all BeanFactoryPostProcessors (<em><strong>"duplicates"</strong></em>)</li> </ul>
0
<p dir="auto"><a href="http://kubekins.dls.corp.google.com:8081/job/kubernetes-pull-build-test-e2e-gce/45191/consoleFull" rel="nofollow">http://kubekins.dls.corp.google.com:8081/job/kubernetes-pull-build-test-e2e-gce/45191/consoleFull</a></p> <p dir="auto">Unfortunately we don't have logs.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/fejta/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/fejta">@fejta</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ixdy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ixdy">@ixdy</a> - can you please take care of uploading logs in case of timeout?</p>
<p dir="auto">The kubernetes tarball is extracted inside the container in dockerized e2e, which gives us <code class="notranslate">kubernetes/cluster/log-dump.sh</code>. On timeout, we try to call <code class="notranslate">log-dump.sh</code>, but do so outside the container, so it's no longer available.</p> <p dir="auto">We should probably move the timeout handling inside the dockerized e2e container.</p>
1
<h4 dir="auto">Describe the bug</h4> <p dir="auto">This bugreport very similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="153338313" data-permission-text="Title is private" data-url="https://github.com/axios/axios/issues/315" data-hovercard-type="issue" data-hovercard-url="/axios/axios/issues/315/hovercard" href="https://github.com/axios/axios/issues/315">#315</a> which was implemented and fixed, however I think this is not solved yet. When the query params parsing process itself fails (before the request even started), the resulting error object does not contain request information, making it hard to debug, especially with as error reports.</p> <h4 dir="auto">To Reproduce</h4> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="axios.get(&quot;&quot;, { params: { someParam: new Date(undefined) } }).catch((e) =&gt; { console.log(e); })"><pre class="notranslate"><span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">""</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">params</span>: <span class="pl-kos">{</span> <span class="pl-c1">someParam</span>: <span class="pl-k">new</span> <span class="pl-v">Date</span><span class="pl-kos">(</span><span class="pl-c1">undefined</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">catch</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">e</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">Only prints</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RangeError: Invalid time value at Date.toISOString (&lt;anonymous&gt;) at parseValue (buildURL.js:53) at Object.forEach (utils.js:219) at serialize (buildURL.js:51) at Object.forEach (utils.js:225) at buildURL (buildURL.js:38) at dispatchXhrRequest (xhr.js:45) at new Promise (&lt;anonymous&gt;) at xhrAdapter (xhr.js:13) at dispatchRequest (dispatchRequest.js:53)"><pre class="notranslate"><code class="notranslate">RangeError: Invalid time value at Date.toISOString (&lt;anonymous&gt;) at parseValue (buildURL.js:53) at Object.forEach (utils.js:219) at serialize (buildURL.js:51) at Object.forEach (utils.js:225) at buildURL (buildURL.js:38) at dispatchXhrRequest (xhr.js:45) at new Promise (&lt;anonymous&gt;) at xhrAdapter (xhr.js:13) at dispatchRequest (dispatchRequest.js:53) </code></pre></div> <h4 dir="auto">Expected behavior</h4> <p dir="auto">I would expect the error to have information about the request (uri, config, etc) just like when the error is thrown on server response error.</p> <h4 dir="auto">Environment</h4> <ul dir="auto"> <li>Axios Version 0.21.1</li> <li>Adapter http</li> <li>Browser chromium</li> <li>Browser Version 87.0.4280.141</li> <li>Node.js Version 12.20.0</li> <li>OS: Manjaro 20.2.1</li> <li>Additional Library Versions none</li> </ul> <h4 dir="auto">Additional context/Screenshots</h4> <p dir="auto">dont have any. – I dont think that omitting this category should result in the automatic closing of an issue :-/</p> <p dir="auto">Cheers</p>
<p dir="auto">Would be useful if <code class="notranslate">responseType</code> could be set to <code class="notranslate">stream</code> in the browser. Right now, it only works in node.</p>
0
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; Pkg.checkout(&quot;DataStreams&quot;, &quot;0.0.6&quot;) INFO: Checking out DataStreams 0.0.6... ERROR: GitError(Code:ERROR, Class:Merge, There is no tracking information for the current branch.) in #123 at .\libgit2\libgit2.jl:414 [inlined] in with(::Base.LibGit2.##123#128{Base.LibGit2.GitRepo}, ::Void) at .\libgit2\types.jl:638 in (::Base.LibGit2.##119#124{String,String,Bool,Base.LibGit2.MergeOptions,Base.LibGit2.CheckoutOptions,Base.LibGit2.GitRepo})(::Base.LibGit2.GitReference) at .\libgit2\libgit2.jl:412 in with(::Base.LibGit2.##119#124{String,String,Bool,Base.LibGit2.MergeOptions,Base.LibGit2.CheckoutOptions,Base.LibGit2.GitRepo}, ::Base.LibGit2.GitReference) at .\libgit2\types.jl:638 in (::Base.#kw##merge!)(::Array{Any,1}, ::Base.#merge!, ::Base.LibGit2.GitRepo) at .\&lt;missing&gt;:0 in (::Base.Pkg.Entry.##18#20{String,String,Bool,Bool})(::Base.LibGit2.GitRepo) at .\pkg\entry.jl:231 in transact(::Base.Pkg.Entry.##18#20{String,String,Bool,Bool}, ::Base.LibGit2.GitRepo) at .\libgit2\libgit2.jl:520 in with(::Base.Pkg.Entry.##17#19{String,String,Bool,Bool}, ::Base.LibGit2.GitRepo) at .\libgit2\types.jl:638 in checkout(::String, ::String, ::Bool, ::Bool) at .\pkg\entry.jl:227 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#checkout,Tuple{String,String,Bool,Bool}})() at .\pkg\dir.jl:31 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#checkout,Tuple{String,String,Bool,Bool}}, ::String) at .\file.jl:48 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at .\pkg\dir.jl:31 in checkout(::String, ::String) at .\pkg\pkg.jl:170 julia&gt; Pkg.status() 6 required packages: - ExcelReaders 0.6.0 - Gallium 0.0.3 - Lora 0.5.4 - Mimi 0.2.0 - NamedTuples 1.0.0 - TypedTables 0.1.1+ julia-0-5 59 additional packages: - ASTInterpreter 0.0.3 - AbstractTrees 0.0.3 - ArgParse 0.3.1 - BinDeps 0.4.2 - COFF 0.0.1 - CRC 1.1.1 - Calculus 0.1.15 - CategoricalArrays 0.0.2 - ColorTypes 0.2.5 - Colors 0.6.6 - Compat 0.8.6 - Conda 0.2.3 - DWARF 0.0.3 - DataArrays 0.3.8 - DataFrames 0.7.4+ nl/nullable - DataStreams 0.0.7 0.0.6 - DataStructures 0.4.5 - Dates 0.4.4 - Distributions 0.10.2 - DocStringExtensions 0.1.0 - Docile 0.5.23 - Documenter 0.2.0 - ELF 0.0.3 - FileIO 0.1.0 - FixedPointNumbers 0.1.4 - Formatting 0.1.5 - ForwardDiff 0.2.2 - FunctionWrappers 0.0.0- master (unregistered) - GZip 0.2.20 - Graphs 0.6.0 - JSON 0.6.0 - JuliaParser 0.7.4 - LegacyStrings 0.1.1 - LibExpat 0.2.0 - MachO 0.0.3 - MacroTools 0.3.2 master - NaNMath 0.2.1 - NullableArrays 0.0.7 - ObjFileBase 0.0.3 - PDMats 0.4.2 - PyCall 1.7.0 - Query 0.0.0- master (unregistered) - Reactive 0.3.4 - Reexport 0.0.3 - ReverseDiffSource 0.2.3 - Rmath 0.1.2 - SHA 0.2.0 - SQLite 0.3.3+ master - SortingAlgorithms 0.1.0 - StatsBase 0.9.0 - StatsFuns 0.3.0 - StructIO 0.0.2 - TerminalUI 0.0.2 - TextWrap 0.1.6 - URIParser 0.1.6 - VT100 0.0.2 - WeakRefStrings 0.1.2 - WinRPM 0.2.0 - Zlib 0.1.12 julia&gt;"><pre class="notranslate"><code class="notranslate">julia&gt; Pkg.checkout("DataStreams", "0.0.6") INFO: Checking out DataStreams 0.0.6... ERROR: GitError(Code:ERROR, Class:Merge, There is no tracking information for the current branch.) in #123 at .\libgit2\libgit2.jl:414 [inlined] in with(::Base.LibGit2.##123#128{Base.LibGit2.GitRepo}, ::Void) at .\libgit2\types.jl:638 in (::Base.LibGit2.##119#124{String,String,Bool,Base.LibGit2.MergeOptions,Base.LibGit2.CheckoutOptions,Base.LibGit2.GitRepo})(::Base.LibGit2.GitReference) at .\libgit2\libgit2.jl:412 in with(::Base.LibGit2.##119#124{String,String,Bool,Base.LibGit2.MergeOptions,Base.LibGit2.CheckoutOptions,Base.LibGit2.GitRepo}, ::Base.LibGit2.GitReference) at .\libgit2\types.jl:638 in (::Base.#kw##merge!)(::Array{Any,1}, ::Base.#merge!, ::Base.LibGit2.GitRepo) at .\&lt;missing&gt;:0 in (::Base.Pkg.Entry.##18#20{String,String,Bool,Bool})(::Base.LibGit2.GitRepo) at .\pkg\entry.jl:231 in transact(::Base.Pkg.Entry.##18#20{String,String,Bool,Bool}, ::Base.LibGit2.GitRepo) at .\libgit2\libgit2.jl:520 in with(::Base.Pkg.Entry.##17#19{String,String,Bool,Bool}, ::Base.LibGit2.GitRepo) at .\libgit2\types.jl:638 in checkout(::String, ::String, ::Bool, ::Bool) at .\pkg\entry.jl:227 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#checkout,Tuple{String,String,Bool,Bool}})() at .\pkg\dir.jl:31 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#checkout,Tuple{String,String,Bool,Bool}}, ::String) at .\file.jl:48 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at .\pkg\dir.jl:31 in checkout(::String, ::String) at .\pkg\pkg.jl:170 julia&gt; Pkg.status() 6 required packages: - ExcelReaders 0.6.0 - Gallium 0.0.3 - Lora 0.5.4 - Mimi 0.2.0 - NamedTuples 1.0.0 - TypedTables 0.1.1+ julia-0-5 59 additional packages: - ASTInterpreter 0.0.3 - AbstractTrees 0.0.3 - ArgParse 0.3.1 - BinDeps 0.4.2 - COFF 0.0.1 - CRC 1.1.1 - Calculus 0.1.15 - CategoricalArrays 0.0.2 - ColorTypes 0.2.5 - Colors 0.6.6 - Compat 0.8.6 - Conda 0.2.3 - DWARF 0.0.3 - DataArrays 0.3.8 - DataFrames 0.7.4+ nl/nullable - DataStreams 0.0.7 0.0.6 - DataStructures 0.4.5 - Dates 0.4.4 - Distributions 0.10.2 - DocStringExtensions 0.1.0 - Docile 0.5.23 - Documenter 0.2.0 - ELF 0.0.3 - FileIO 0.1.0 - FixedPointNumbers 0.1.4 - Formatting 0.1.5 - ForwardDiff 0.2.2 - FunctionWrappers 0.0.0- master (unregistered) - GZip 0.2.20 - Graphs 0.6.0 - JSON 0.6.0 - JuliaParser 0.7.4 - LegacyStrings 0.1.1 - LibExpat 0.2.0 - MachO 0.0.3 - MacroTools 0.3.2 master - NaNMath 0.2.1 - NullableArrays 0.0.7 - ObjFileBase 0.0.3 - PDMats 0.4.2 - PyCall 1.7.0 - Query 0.0.0- master (unregistered) - Reactive 0.3.4 - Reexport 0.0.3 - ReverseDiffSource 0.2.3 - Rmath 0.1.2 - SHA 0.2.0 - SQLite 0.3.3+ master - SortingAlgorithms 0.1.0 - StatsBase 0.9.0 - StatsFuns 0.3.0 - StructIO 0.0.2 - TerminalUI 0.0.2 - TextWrap 0.1.6 - URIParser 0.1.6 - VT100 0.0.2 - WeakRefStrings 0.1.2 - WinRPM 0.2.0 - Zlib 0.1.12 julia&gt; </code></pre></div> <p dir="auto">Looking at the repo itself, there also seems some data corruption, in particular the upstream info seems to be deleted:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="C:\Users\anthoff\.julia\v0.5\DataStreams [0.0.6]&gt; git status On branch 0.0.6 Your branch is based on 'origin/0.0.6', but the upstream is gone. (use &quot;git branch --unset-upstream&quot; to fixup) nothing to commit, working directory clean C:\Users\anthoff\.julia\v0.5\DataStreams [0.0.6]&gt;"><pre class="notranslate"><code class="notranslate">C:\Users\anthoff\.julia\v0.5\DataStreams [0.0.6]&gt; git status On branch 0.0.6 Your branch is based on 'origin/0.0.6', but the upstream is gone. (use "git branch --unset-upstream" to fixup) nothing to commit, working directory clean C:\Users\anthoff\.julia\v0.5\DataStreams [0.0.6]&gt; </code></pre></div>
<p dir="auto">Starting from a tagged version:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; Pkg.checkout(&quot;TaylorSeries&quot;, &quot;warningsv05&quot;) INFO: Checking out TaylorSeries warningsv05... ERROR: GitError(Code:ERROR, Class:Merge, There is no tracking information for the current branch.)"><pre class="notranslate"><code class="notranslate">julia&gt; Pkg.checkout("TaylorSeries", "warningsv05") INFO: Checking out TaylorSeries warningsv05... ERROR: GitError(Code:ERROR, Class:Merge, There is no tracking information for the current branch.) </code></pre></div> <p dir="auto">but this works if <code class="notranslate">master</code> is <code class="notranslate">checkout</code>ed first.</p>
1
<p dir="auto"><strong>Migrated issue, originally created by Michał Szczepański (<a href="https://github.com/vane">@vane</a>)</strong></p> <p dir="auto">When I'm trying to join two tables using String values that are duplicating in each column I get less rows then expected</p> <p dir="auto">The query from database returns 10 rows but filtered is set to True and after</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" if filtered: rows = util.unique_list(rows, filter_fn) "><pre class="notranslate"><code class="notranslate"> if filtered: rows = util.unique_list(rows, filter_fn) </code></pre></div> <p dir="auto">in sqlalchemy.orm.loading.py one row is left.</p> <p dir="auto">I think it's a problem with hashing.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" def filter_fn(row): return tuple(fn(x) for x, fn in zip(row, filter_fns)) "><pre class="notranslate"><code class="notranslate"> def filter_fn(row): return tuple(fn(x) for x, fn in zip(row, filter_fns)) </code></pre></div> <p dir="auto">Exist with 1.0.6 and below.</p> <p dir="auto">Script with full example in attachment with workaround.<br> Script create tables then execute bugged query and workaround query.<br> You can vary result number from bugged query by changing result_rows to number from 1 to 10</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="s = Scaffold(db, result_rows=2) "><pre class="notranslate"><code class="notranslate">s = Scaffold(db, result_rows=2) </code></pre></div> <p dir="auto">Test script deletes the database file after run so it's always fresh start.</p> <p dir="auto">I tried it on 1.0.6 on debian and 0.9.8 on windows same results</p> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/3477/join_bug.py">join_bug.py</a></p>
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p> <p dir="auto">It appears that INSERTs and UPDATEs do not work under the following conditions:</p> <ol dir="auto"> <li>Table with composite primary key.</li> <li>A hierarchy of classes polymorphically mapped to the table (single inheritance)</li> <li>The polymorphic discriminator column is part of the primary key.</li> </ol> <p dir="auto">Also, while the 'insert' problem can be worked around (see bellow), fixing the 'update' requires patching SQLAlchemy's code.</p> <p dir="auto">Here's a test case:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import * from sqlalchemy.orm import * engine = create_engine('sqlite://') metadata = MetaData() test_table = Table(&quot;test&quot;, metadata, Column(&quot;id1&quot;, Integer, primary_key=True), Column(&quot;id2&quot;, UnicodeText, primary_key=True), Column(&quot;data&quot;, UnicodeText) ) class TestBase(object): pass class TestDeriv(TestBase): pass mapper(TestBase, test_table, polymorphic_on=test_table.c.id2, polymorphic_identity=u&quot;base&quot;) mapper(TestDeriv, inherits=TestBase, polymorphic_on=test_table.c.id2, polymorphic_identity=u&quot;deriv&quot;) metadata.create_all(bind=engine) session = sessionmaker(bind=engine, autoflush=False)() t1 = TestDeriv() t1.id1 = 0 # id2 is implied by instance's type, but we still # have to assign it explicitly in order the insert to work t1.id2 = u&quot;deriv&quot; session.add(t1) session.commit() session.clear() del t1 t1 = session.query(TestDeriv).get((0, u&quot;deriv&quot;)) t1.data = u&quot;foo bar&quot; # The following line raises ConcurrentModificationError # Logged SQL shows that id2 is bound to None session.commit()"><pre class="notranslate"><code class="notranslate">from sqlalchemy import * from sqlalchemy.orm import * engine = create_engine('sqlite://') metadata = MetaData() test_table = Table("test", metadata, Column("id1", Integer, primary_key=True), Column("id2", UnicodeText, primary_key=True), Column("data", UnicodeText) ) class TestBase(object): pass class TestDeriv(TestBase): pass mapper(TestBase, test_table, polymorphic_on=test_table.c.id2, polymorphic_identity=u"base") mapper(TestDeriv, inherits=TestBase, polymorphic_on=test_table.c.id2, polymorphic_identity=u"deriv") metadata.create_all(bind=engine) session = sessionmaker(bind=engine, autoflush=False)() t1 = TestDeriv() t1.id1 = 0 # id2 is implied by instance's type, but we still # have to assign it explicitly in order the insert to work t1.id2 = u"deriv" session.add(t1) session.commit() session.clear() del t1 t1 = session.query(TestDeriv).get((0, u"deriv")) t1.data = u"foo bar" # The following line raises ConcurrentModificationError # Logged SQL shows that id2 is bound to None session.commit() </code></pre></div> <p dir="auto">The fix (see the attached file, works against rev. 5098) is next to trivial (it only modifies two lines), but I have no way to be sure that it won't break something else.</p> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/1162/sqla1.diff">sqla1.diff</a></p>
0
<p dir="auto">Not sure if this means I shouldn't use it, or if we just haven't documented it yet :)</p> <p dir="auto"><a href="https://docs.flutter.io/flutter/widgets/Scrollable-class.html" rel="nofollow">https://docs.flutter.io/flutter/widgets/Scrollable-class.html</a></p>
<p dir="auto">I think we need some high level documentation of all the list and viewport classes, including a class hierarchy diagram showing inheritance, mixins, ownership, and who creates whom. It should probably lean on some other documentation explaining the purpose of custom Element subclasses, too.</p>
1
<p dir="auto">Given the use case of dynamically instantiating content children using the NgFor of NgIf directives I've found this not working in alpha.52. I thought this was working before in alpha.44 but after testing it seems this was never working.</p> <p dir="auto">I'd expect this to work and I thought this was the reason for content children being represented with a <code class="notranslate">QueryList</code> in the first place.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Component, Input, NgFor, NgIf} from 'angular2/angular2'; @Component({ selector: 'child' template: ` &lt;p&gt;{{text}}&lt;/p&gt; ` }) export class Child { @Input() text; } @Component({ selector: 'parent' template: ` &lt;section&gt; &lt;strong&gt;Content children:&lt;/strong&gt; &lt;ng-content select=&quot;child&quot;&gt;&lt;/ng-content&gt; &lt;/section&gt; ` }) export class Parent {} @Component({ selector: 'app' template: ` &lt;section&gt; &lt;strong&gt;Outside of parent&lt;/strong&gt; &lt;child *ngIf=&quot;true&quot; text=&quot;Child in the wild&quot;&gt;&lt;/child&gt; &lt;child *ngFor=&quot;#t of text&quot; [text]=&quot;t&quot;&gt;&lt;/child&gt; &lt;/section&gt; &lt;parent&gt; &lt;child *ngIf=&quot;true&quot; text=&quot;Child in the wild&quot;&gt;&lt;/child&gt; &lt;child *ngFor=&quot;#t of text&quot; [text]=&quot;t&quot;&gt;&lt;/child&gt; &lt;/parent&gt; `, directives: [Parent, Child, NgFor, NgIf] }) export class App { text = ['Child 1', 'Child 2', 'Child 3'] }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">Component</span><span class="pl-kos">,</span> <span class="pl-v">Input</span><span class="pl-kos">,</span> <span class="pl-v">NgFor</span><span class="pl-kos">,</span> <span class="pl-v">NgIf</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/angular2'</span><span class="pl-kos">;</span> @<span class="pl-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">selector</span>: <span class="pl-s">'child'</span> <span class="pl-s1">template</span>: <span class="pl-s">`</span> <span class="pl-s"> &lt;p&gt;{{text}}&lt;/p&gt;</span> <span class="pl-s"> `</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">Child</span> <span class="pl-kos">{</span> @<span class="pl-v">Input</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">text</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> @<span class="pl-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">selector</span>: <span class="pl-s">'parent'</span> <span class="pl-s1">template</span>: <span class="pl-s">`</span> <span class="pl-s"> &lt;section&gt;</span> <span class="pl-s"> &lt;strong&gt;Content children:&lt;/strong&gt;</span> <span class="pl-s"> &lt;ng-content select="child"&gt;&lt;/ng-content&gt;</span> <span class="pl-s"> &lt;/section&gt;</span> <span class="pl-s"> `</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">Parent</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> @<span class="pl-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">selector</span>: <span class="pl-s">'app'</span> <span class="pl-s1">template</span>: <span class="pl-s">`</span> <span class="pl-s"> &lt;section&gt;</span> <span class="pl-s"> &lt;strong&gt;Outside of parent&lt;/strong&gt;</span> <span class="pl-s"> &lt;child *ngIf="true" text="Child in the wild"&gt;&lt;/child&gt;</span> <span class="pl-s"> &lt;child *ngFor="#t of text" [text]="t"&gt;&lt;/child&gt;</span> <span class="pl-s"> &lt;/section&gt;</span> <span class="pl-s"></span> <span class="pl-s"> &lt;parent&gt;</span> <span class="pl-s"> &lt;child *ngIf="true" text="Child in the wild"&gt;&lt;/child&gt;</span> <span class="pl-s"> &lt;child *ngFor="#t of text" [text]="t"&gt;&lt;/child&gt;</span> <span class="pl-s"> &lt;/parent&gt;</span> <span class="pl-s"> `</span><span class="pl-kos">,</span> <span class="pl-c1">directives</span>: <span class="pl-kos">[</span><span class="pl-v">Parent</span><span class="pl-kos">,</span> <span class="pl-v">Child</span><span class="pl-kos">,</span> <span class="pl-v">NgFor</span><span class="pl-kos">,</span> <span class="pl-v">NgIf</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">App</span> <span class="pl-kos">{</span> <span class="pl-c1">text</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">'Child 1'</span><span class="pl-kos">,</span> <span class="pl-s">'Child 2'</span><span class="pl-kos">,</span> <span class="pl-s">'Child 3'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><a href="http://plnkr.co/edit/aUSkWPQmT3XHf6QLqif5?p=preview" rel="nofollow">http://plnkr.co/edit/aUSkWPQmT3XHf6QLqif5?p=preview</a></p>
<p dir="auto">We have a Component template that looks like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;ng-content select=&quot;item-left&quot;&gt;&lt;/ng-content&gt; &lt;ion-item-content&gt; &lt;ng-content&gt;&lt;/ng-content&gt; &lt;/ion-item-content&gt; "><pre class="notranslate"><code class="notranslate">&lt;ng-content select="item-left"&gt;&lt;/ng-content&gt; &lt;ion-item-content&gt; &lt;ng-content&gt;&lt;/ng-content&gt; &lt;/ion-item-content&gt; </code></pre></div> <p dir="auto">But if you add <code class="notranslate">*ng-if="true"</code> on the <code class="notranslate">item-left</code> element it places this element inside of the <code class="notranslate">ion-item-content</code> like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;ion-item-content&gt; &lt;script&gt;&lt;/script&gt; &lt;item-left&gt;&lt;/item-left&gt; &lt;/ion-item-content&gt;"><pre class="notranslate"><code class="notranslate">&lt;ion-item-content&gt; &lt;script&gt;&lt;/script&gt; &lt;item-left&gt;&lt;/item-left&gt; &lt;/ion-item-content&gt; </code></pre></div> <p dir="auto">Removing the <code class="notranslate">*ng-if</code> places it in the proper place</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;item-left&gt;&lt;/item-left&gt; &lt;ion-item-content&gt;&lt;/ion-item-content&gt;"><pre class="notranslate"><code class="notranslate">&lt;item-left&gt;&lt;/item-left&gt; &lt;ion-item-content&gt;&lt;/ion-item-content&gt; </code></pre></div> <p dir="auto">Is there something we need to improve for this?</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/IgorMinar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/IgorMinar">@IgorMinar</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/adamdbradley/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/adamdbradley">@adamdbradley</a></p>
1
<p dir="auto">I use <strong>Pinyin - Simplified</strong> to input Chinese character .</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/344283/11520152/a4c67190-98db-11e5-99ec-d1ed8b85226f.png"><img width="718" alt="Pinyin - Simplified Input Source" src="https://cloud.githubusercontent.com/assets/344283/11520152/a4c67190-98db-11e5-99ec-d1ed8b85226f.png" style="max-width: 100%;"></a></p> <p dir="auto">When I begin typing, the input sources panel positioned unexpectedly.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/344283/11520226/64285f44-98dc-11e5-8854-4ef9b94d85cd.gif"><img src="https://cloud.githubusercontent.com/assets/344283/11520226/64285f44-98dc-11e5-8854-4ef9b94d85cd.gif" alt="input-panel-error" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">It should perform like Sublime Text.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/344283/11520263/cb3e7fec-98dc-11e5-8e36-c9098ec3930c.gif"><img src="https://cloud.githubusercontent.com/assets/344283/11520263/cb3e7fec-98dc-11e5-8e36-c9098ec3930c.gif" alt="input-panel-correct" data-animated-image="" style="max-width: 100%;"></a></p>
<ul dir="auto"> <li>Doing the vscode express smoke test I now get errors when I open any .js file that has a require</li> <li>e.g www/bin</li> <li>is there some setting I am missing</li> </ul> <p dir="auto">As for the node experience we seem to have worse support than before (what is described in the smoke test)</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1926584/13356786/71ebd2f0-dca7-11e5-8ad6-07320f45b6bf.png"><img src="https://cloud.githubusercontent.com/assets/1926584/13356786/71ebd2f0-dca7-11e5-8ad6-07320f45b6bf.png" alt="screen shot 2016-02-26 at 16 38 18" style="max-width: 100%;"></a></p>
0
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life" rel="nofollow">http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">Hi!</p> <p dir="auto">When I'm working on this way point I can only get as far as entering $($('.slot')[0]).html(slotOne) before it freezes up and crashes. I tried making it work on Safari and Google but they both crashed.</p>
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life" rel="nofollow">http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">after typing "$($", chrome crashes.</p>
1
<h3 dir="auto">Version</h3> <p dir="auto">2.5.13</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://jsfiddle.net/1m5vx6dc/1/" rel="nofollow">https://jsfiddle.net/1m5vx6dc/1/</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Say we have an array <code class="notranslate">list</code> <code class="notranslate">['a', 'b', 'c', 'd', 'e', 'f', 'g', ...]</code> and a computed property <code class="notranslate">filtered</code> that extracts 4 items from that list based on a start <code class="notranslate">index</code>. Then we run a <code class="notranslate">v-for</code> on the <code class="notranslate">filtered</code> computed list and increase / decrease the <code class="notranslate">index</code>. We use the item value as the <code class="notranslate">:key</code>. If we inspect the resulting DOM in chrome, we can see that if the filtered list is moved to the right (index increased), all DOM nodes are replaced. If the index is moved to the left, only the first node is replaced.</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">I would expect that increasing or decreasing the index would yield the same DOM patch, either re-creating only the first or the last node in the list.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">Increasing the index causes a full DOM refresh, decreasing the index yields the expected behaviour.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2785983/35117214-3ae74d44-fc8e-11e7-9cbf-fb8007175cf5.gif"><img src="https://user-images.githubusercontent.com/2785983/35117214-3ae74d44-fc8e-11e7-9cbf-fb8007175cf5.gif" alt="vdom" data-animated-image="" style="max-width: 100%;"></a></p>
<h3 dir="auto">Version</h3> <p dir="auto">2.5.2</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://codesandbox.io/s/mzvkppmvo8" rel="nofollow">https://codesandbox.io/s/mzvkppmvo8</a></p> <h3 dir="auto">Steps to reproduce</h3> <ol dir="auto"> <li>I created component with scoped slot (AppSwitcher.vue)</li> <li>Then I use it in another component with their own slot (HelloWorld.vue with slot "subtext")</li> <li>Add some element to slot (div in App.vue)</li> </ol> <h3 dir="auto">What is expected?</h3> <p dir="auto">It should work without errors</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">Changes in AppSwitcher.vue caus "Duplicate presence of slot "subtext" found in the same render tree" error but there are no duplicates.</p> <hr> <p dir="auto">Also, adding <code class="notranslate">slot-scope</code> to div in App.vue solves problem and no error there, but why it happens without <code class="notranslate">slot-scope</code>?</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: 10.0.18999.1 Windows Terminal version (if applicable): Version: 0.5.2762.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18999.1 Windows Terminal version (if applicable): Version: 0.5.2762.0 </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Start Windows Terminal in Ubuntu 18.04. Install Vim. Start Vim. Type a sentence then move the cursor over a letter. See that the letter is obscured.</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">I'd expect the text underneath the cursor to be inverse of the cursor, or something that isn't the same as the cursor color making it invisible. I've tried almost every Vim setting for changing cursor color etc but it has no effect. Changing the <code class="notranslate">cursorColor</code> in the profile has no effect.</p> <p dir="auto">Running the same test in Fluent Terminal (while having a blinking cursor by default) does the right thing.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">The cursor obscures the text underneath it:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/237175/67057800-f68c5300-f106-11e9-9db6-5b9fe108f3e5.png"><img src="https://user-images.githubusercontent.com/237175/67057800-f68c5300-f106-11e9-9db6-5b9fe108f3e5.png" alt="Annotation 2019-10-17 175016" style="max-width: 100%;"></a></p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">When <code class="notranslate">cursorShape</code> is set to <code class="notranslate">filledBox</code>, it hides the character under it:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/652769/59292879-c271c480-8c32-11e9-8a58-5d151e6886b0.png"><img src="https://user-images.githubusercontent.com/652769/59292879-c271c480-8c32-11e9-8a58-5d151e6886b0.png" alt="image" style="max-width: 100%;"></a><br> (The command is <code class="notranslate">cat /etc/os-release</code>)</p> <p dir="auto">This is a bit annoying. It will be helpful if the character can still be visible when the cursor is moved to its position.</p>
1
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class A(Base): __tablename__ = 'a' id = Column(Integer, primary_key=True) a = Column(Integer) b = Column(Integer) aplusb = column_property( a + b, deferred=True ) e = create_engine(&quot;sqlite://&quot;, echo=True) Base.metadata.create_all(e) s = Session(e) s.add(A(a=1, b=2)) s.commit() a1 = s.query(A).first() assert 'aplusb' not in a1.__dict__ a1.b = 5 s.flush() s.commit() a1.b assert 'aplusb' not in a1.__dict__ "><pre class="notranslate"><code class="notranslate">from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class A(Base): __tablename__ = 'a' id = Column(Integer, primary_key=True) a = Column(Integer) b = Column(Integer) aplusb = column_property( a + b, deferred=True ) e = create_engine("sqlite://", echo=True) Base.metadata.create_all(e) s = Session(e) s.add(A(a=1, b=2)) s.commit() a1 = s.query(A).first() assert 'aplusb' not in a1.__dict__ a1.b = 5 s.flush() s.commit() a1.b assert 'aplusb' not in a1.__dict__ </code></pre></div>
<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p> <p dir="auto">Hi,</p> <p dir="auto">I noticed that the update() usage in /orm/extensions/sqlsoup.html is outdated:</p> <blockquote> <blockquote> <blockquote> <p dir="auto">db.loans.update(db.loans.book_id==2, book_id=1)</p> </blockquote> </blockquote> </blockquote> <p dir="auto">This doesn't work anymore. There may be more out-of-date code in there, I haven't checked.</p>
0
<p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-serial/1916/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-serial/1916/</a></p> <p dir="auto">Failed: [k8s.io] Nodes [Disruptive] [k8s.io] Resize [Slow] should be able to add nodes {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/resize_nodes.go:479 Expected error: &lt;*errors.errorString | 0xc8214da3b0&gt;: { s: &quot;failed to wait for pods responding: timed out waiting for the condition&quot;, } failed to wait for pods responding: timed out waiting for the condition not to have occurred /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/resize_nodes.go:464"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/resize_nodes.go:479 Expected error: &lt;*errors.errorString | 0xc8214da3b0&gt;: { s: "failed to wait for pods responding: timed out waiting for the condition", } failed to wait for pods responding: timed out waiting for the condition not to have occurred /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/resize_nodes.go:464 </code></pre></div> <p dir="auto">Previous issues for this test: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="160513595" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27470" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/27470/hovercard" href="https://github.com/kubernetes/kubernetes/issues/27470">#27470</a></p>
<p dir="auto">Quite a few tests flake with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="an error on the server has prevented the request from succeeding (put replicasets.extensions frontend- 88237173); Current resource version 493"><pre class="notranslate"><code class="notranslate">an error on the server has prevented the request from succeeding (put replicasets.extensions frontend- 88237173); Current resource version 493 </code></pre></div> <p dir="auto">This seems to indicate:</p> <ul dir="auto"> <li>test should retry</li> <li>that's a lot of flake on GKE</li> </ul> <p dir="auto">eg: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="166209576" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/29149" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/29149/hovercard" href="https://github.com/kubernetes/kubernetes/issues/29149">#29149</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="169668085" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/30156" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/30156/hovercard" href="https://github.com/kubernetes/kubernetes/issues/30156">#30156</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="170381730" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/30352" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/30352/hovercard?comment_id=243299162&amp;comment_type=issue_comment" href="https://github.com/kubernetes/kubernetes/issues/30352#issuecomment-243299162">#30352 (comment)</a>, pretty much all the failures in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="172579508" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/31188" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/31188/hovercard" href="https://github.com/kubernetes/kubernetes/issues/31188">#31188</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="173205462" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/31429" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/31429/hovercard" href="https://github.com/kubernetes/kubernetes/issues/31429#issue-173205462">#31429 (comment)</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="173576613" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/31575" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/31575/hovercard" href="https://github.com/kubernetes/kubernetes/issues/31575">#31575</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="173107321" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/31408" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/31408/hovercard" href="https://github.com/kubernetes/kubernetes/issues/31408">#31408</a></p>
1
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-add-borders-around-your-elements" rel="nofollow">http://freecodecamp.com/challenges/waypoint-add-borders-around-your-elements</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/12666833/9706232/c9a89316-54ad-11e5-8aca-90703339e3ca.png"><img src="https://cloud.githubusercontent.com/assets/12666833/9706232/c9a89316-54ad-11e5-8aca-90703339e3ca.png" alt="screen shot 2015-09-06 at 3 39 40 pm" style="max-width: 100%;"></a></p>
<p dir="auto">Waypoint hints do not always appear after the page has loaded. Refreshing the page does not always seem to work. Closed &amp; reopened browser does not seem to change behaviour. Issue is not specific to certain waypoints but started to occur in the jQuery section.</p> <p dir="auto">Issue experienced on Chrome 44.0.2403.55 on Windows 8.1. Attached screenshot for clarity.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/14047456/9572289/72b58b36-4f7b-11e5-98ed-a44133dd9331.png"><img src="https://cloud.githubusercontent.com/assets/14047456/9572289/72b58b36-4f7b-11e5-98ed-a44133dd9331.png" alt="image" style="max-width: 100%;"></a></p>
1
<p dir="auto">I have installed tensorflow and keras. I have used virtualenviroment given in tensorflow website. It is showing the below error when I try to import keras with tensorflow as backend</p> <p dir="auto">CPU_COUNT = psutil.cpu_count()<br> AttributeError: 'module' object has no attribute 'cpu_count'</p> <p dir="auto">tensorflow version = Version: 1.3.0</p> <p dir="auto">keras = Version: 2.0.7</p> <p dir="auto">dask = Version: 0.15.0</p> <p dir="auto">pandas = Version: 0.20.3</p> <p dir="auto">For detailed error, attaching the image<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18217467/29738791-2213765e-8a4b-11e7-8305-b3fa516097f1.png"><img src="https://user-images.githubusercontent.com/18217467/29738791-2213765e-8a4b-11e7-8305-b3fa516097f1.png" alt="untitled" style="max-width: 100%;"></a></p>
<h3 dir="auto">What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?</h3> <p dir="auto">Some people report having similar problems with 'module' objects having no attribute something-or-other and claim they were solved by upgrading.</p> <h3 dir="auto">Environment info</h3> <p dir="auto">Operating System:<br> Ubuntu 17.04 x64<br> Installed version of CUDA and cuDNN:<br> (please attach the output of <code class="notranslate">ls -l /path/to/cuda/lib/libcud*</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-rw-r--r-- 1 root root 558720 сен 15 02:02 /usr/local/cuda/lib64/libcudadevrt.a -rw-r--r-- 1 root root 383336 дек 23 01:26 /usr/local/cuda/lib64/libcudart.so -rw-r--r-- 1 root root 383336 дек 23 01:25 /usr/local/cuda/lib64/libcudart.so.7.5 lrwxrwxrwx 1 root root 19 дек 23 02:17 /usr/local/cuda/lib64/libcudart.so.8.0 -&gt; libcudart.so.8.0.44 -rw-r--r-- 1 root root 415432 сен 15 02:02 /usr/local/cuda/lib64/libcudart.so.8.0.44 -rw-r--r-- 1 root root 775162 сен 15 02:02 /usr/local/cuda/lib64/libcudart_static.a lrwxrwxrwx 1 root root 13 дек 23 02:17 /usr/local/cuda/lib64/libcudnn.so -&gt; libcudnn.so.5 lrwxrwxrwx 1 root root 17 дек 23 02:17 /usr/local/cuda/lib64/libcudnn.so.5 -&gt; libcudnn.so.5.1.5 -rwxr-xr-x 1 root root 79337624 дек 22 04:25 /usr/local/cuda/lib64/libcudnn.so.5.1.5 -rw-r--r-- 1 root root 69756172 дек 22 04:25 /usr/local/cuda/lib64/libcudnn_static.a "><pre class="notranslate"><code class="notranslate">-rw-r--r-- 1 root root 558720 сен 15 02:02 /usr/local/cuda/lib64/libcudadevrt.a -rw-r--r-- 1 root root 383336 дек 23 01:26 /usr/local/cuda/lib64/libcudart.so -rw-r--r-- 1 root root 383336 дек 23 01:25 /usr/local/cuda/lib64/libcudart.so.7.5 lrwxrwxrwx 1 root root 19 дек 23 02:17 /usr/local/cuda/lib64/libcudart.so.8.0 -&gt; libcudart.so.8.0.44 -rw-r--r-- 1 root root 415432 сен 15 02:02 /usr/local/cuda/lib64/libcudart.so.8.0.44 -rw-r--r-- 1 root root 775162 сен 15 02:02 /usr/local/cuda/lib64/libcudart_static.a lrwxrwxrwx 1 root root 13 дек 23 02:17 /usr/local/cuda/lib64/libcudnn.so -&gt; libcudnn.so.5 lrwxrwxrwx 1 root root 17 дек 23 02:17 /usr/local/cuda/lib64/libcudnn.so.5 -&gt; libcudnn.so.5.1.5 -rwxr-xr-x 1 root root 79337624 дек 22 04:25 /usr/local/cuda/lib64/libcudnn.so.5.1.5 -rw-r--r-- 1 root root 69756172 дек 22 04:25 /usr/local/cuda/lib64/libcudnn_static.a </code></pre></div> <p dir="auto">(yes, it's an unholy mess, with russian date format. sorry)</p> <p dir="auto">If installed from binary pip package, provide:</p> <ol dir="auto"> <li>A link to the pip package you installed:<br> <a href="https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.0-cp27-none-linux_x86_64.whl" rel="nofollow">https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.0-cp27-none-linux_x86_64.whl</a><br> as per<a href="https://www.tensorflow.org/get_started/os_setup" rel="nofollow"> instructions</a></li> <li>The output from <code class="notranslate">python -c "import tensorflow; print(tensorflow.__version__)"</code>.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally 0.12.0"><pre class="notranslate"><code class="notranslate">I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally 0.12.0 </code></pre></div> <h3 dir="auto">If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cd example; python /usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/tensorboard.py --logdir=/home/myname/example/log_simple_graph"><pre class="notranslate"><code class="notranslate">cd example; python /usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/tensorboard.py --logdir=/home/myname/example/log_simple_graph </code></pre></div> <h3 dir="auto">What other attempted solutions have you tried?</h3> <p dir="auto">See above; I've tried to run the actual <code class="notranslate">tensorboard.py</code> instead of just <code class="notranslate">tensorboard --logdir=</code></p> <h3 dir="auto">Logs or other output that would be helpful</h3> <p dir="auto">Running <code class="notranslate">cd example; python /usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/tensorboard.py --logdir=/home/myname/example/log_simple_graph</code> results in:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally Traceback (most recent call last): File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/tensorboard.py&quot;, line 34, in &lt;module&gt; from tensorflow.tensorboard.backend import server File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/backend/server.py&quot;, line 37, in &lt;module&gt; from tensorflow.tensorboard.backend import handler File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/backend/handler.py&quot;, line 43, in &lt;module&gt; from tensorflow.tensorboard.plugins import REGISTERED_PLUGINS File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/plugins/__init__.py&quot;, line 20, in &lt;module&gt; from tensorflow.tensorboard.plugins.projector.plugin import ProjectorPlugin File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/plugins/projector/plugin.py&quot;, line 27, in &lt;module&gt; from tensorflow.contrib.tensorboard.plugins.projector import PROJECTOR_FILENAME File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/__init__.py&quot;, line 27, in &lt;module&gt; from tensorflow.contrib import factorization File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/factorization/__init__.py&quot;, line 24, in &lt;module&gt; from tensorflow.contrib.factorization.python.ops.gmm import * File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/factorization/python/ops/gmm.py&quot;, line 30, in &lt;module&gt; from tensorflow.contrib.learn.python.learn.estimators import estimator File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/__init__.py&quot;, line 66, in &lt;module&gt; from tensorflow.contrib.learn.python.learn import * File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/__init__.py&quot;, line 23, in &lt;module&gt; from tensorflow.contrib.learn.python.learn import * File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/__init__.py&quot;, line 27, in &lt;module&gt; from tensorflow.contrib.learn.python.learn import estimators File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/__init__.py&quot;, line 269, in &lt;module&gt; from tensorflow.contrib.learn.python.learn.estimators.classifier import Classifier File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/classifier.py&quot;, line 25, in &lt;module&gt; from tensorflow.contrib.learn.python.learn.estimators import estimator File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py&quot;, line 52, in &lt;module&gt; from tensorflow.contrib.learn.python.learn.learn_io import data_feeder File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/learn_io/__init__.py&quot;, line 22, in &lt;module&gt; from tensorflow.contrib.learn.python.learn.learn_io.dask_io import extract_dask_data File &quot;/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/learn_io/dask_io.py&quot;, line 26, in &lt;module&gt; import dask.dataframe as dd File &quot;/usr/local/lib/python2.7/dist-packages/dask/dataframe/__init__.py&quot;, line 5, in &lt;module&gt; from .io import (from_array, from_pandas, from_bcolz, File &quot;/usr/local/lib/python2.7/dist-packages/dask/dataframe/io/__init__.py&quot;, line 6, in &lt;module&gt; from .csv import read_csv, to_csv, read_table File &quot;/usr/local/lib/python2.7/dist-packages/dask/dataframe/io/csv.py&quot;, line 147, in &lt;module&gt; CPU_COUNT = psutil.cpu_count() AttributeError: 'module' object has no attribute 'cpu_count' "><pre class="notranslate"><code class="notranslate">I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/tensorboard.py", line 34, in &lt;module&gt; from tensorflow.tensorboard.backend import server File "/usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/backend/server.py", line 37, in &lt;module&gt; from tensorflow.tensorboard.backend import handler File "/usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/backend/handler.py", line 43, in &lt;module&gt; from tensorflow.tensorboard.plugins import REGISTERED_PLUGINS File "/usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/plugins/__init__.py", line 20, in &lt;module&gt; from tensorflow.tensorboard.plugins.projector.plugin import ProjectorPlugin File "/usr/local/lib/python2.7/dist-packages/tensorflow/tensorboard/plugins/projector/plugin.py", line 27, in &lt;module&gt; from tensorflow.contrib.tensorboard.plugins.projector import PROJECTOR_FILENAME File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/__init__.py", line 27, in &lt;module&gt; from tensorflow.contrib import factorization File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/factorization/__init__.py", line 24, in &lt;module&gt; from tensorflow.contrib.factorization.python.ops.gmm import * File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/factorization/python/ops/gmm.py", line 30, in &lt;module&gt; from tensorflow.contrib.learn.python.learn.estimators import estimator File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/__init__.py", line 66, in &lt;module&gt; from tensorflow.contrib.learn.python.learn import * File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/__init__.py", line 23, in &lt;module&gt; from tensorflow.contrib.learn.python.learn import * File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/__init__.py", line 27, in &lt;module&gt; from tensorflow.contrib.learn.python.learn import estimators File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/__init__.py", line 269, in &lt;module&gt; from tensorflow.contrib.learn.python.learn.estimators.classifier import Classifier File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/classifier.py", line 25, in &lt;module&gt; from tensorflow.contrib.learn.python.learn.estimators import estimator File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 52, in &lt;module&gt; from tensorflow.contrib.learn.python.learn.learn_io import data_feeder File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/learn_io/__init__.py", line 22, in &lt;module&gt; from tensorflow.contrib.learn.python.learn.learn_io.dask_io import extract_dask_data File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/learn_io/dask_io.py", line 26, in &lt;module&gt; import dask.dataframe as dd File "/usr/local/lib/python2.7/dist-packages/dask/dataframe/__init__.py", line 5, in &lt;module&gt; from .io import (from_array, from_pandas, from_bcolz, File "/usr/local/lib/python2.7/dist-packages/dask/dataframe/io/__init__.py", line 6, in &lt;module&gt; from .csv import read_csv, to_csv, read_table File "/usr/local/lib/python2.7/dist-packages/dask/dataframe/io/csv.py", line 147, in &lt;module&gt; CPU_COUNT = psutil.cpu_count() AttributeError: 'module' object has no attribute 'cpu_count' </code></pre></div> <p dir="auto">I've been following <a href="https://www.oreilly.com/learning/hello-tensorflow" rel="nofollow">this</a> intro, and the code from there worked perfectly for me (apart from some warnings about deprecations).</p>
1
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 4.5.5</li> <li>Operating System / Platform =&gt; Fedora 36</li> <li>Compiler =&gt; GCC 12</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">The version is not building in the debug mode because of the <code class="notranslate">Werror=return-type</code> warning.</p> <div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" /home/user/.conan/data/opencv/4.5.5/_/_/build/c2ecc42c4fd20695e9185b38647d6dcb62ef4a3a/source_subfolder/modules/gapi/src/compiler/gislandmodel.cpp: In member function 'ade::NodeHandle cv::gimpl::GIsland::producer(const ade::Graph&amp;, const ade::NodeHandle&amp;) const': /home/user/.conan/data/opencv/4.5.5/_/_/build/c2ecc42c4fd20695e9185b38647d6dcb62ef4a3a/source_subfolder/modules/gapi/src/compiler/gislandmodel.cpp:124:1: error: control reaches end of non-void function [-Werror=return-type] 124 | } | ^ "><pre class="notranslate">/home/user/.conan/data/opencv/<span class="pl-c1">4.5.5</span>/_/_/build/c2ecc42c4fd20695e9185b38647d6dcb62ef4a3a/source_subfolder/modules/gapi/src/compiler/gislandmodel.cpp: In member function <span class="pl-s"><span class="pl-pds">'</span>ade::NodeHandle cv::gimpl::GIsland::producer(const ade::Graph&amp;, const ade::NodeHandle&amp;) const<span class="pl-pds">'</span></span>: /home/user/.conan/data/opencv/<span class="pl-c1">4.5.5</span>/_/_/build/c2ecc42c4fd20695e9185b38647d6dcb62ef4a3a/source_subfolder/modules/gapi/src/compiler/gislandmodel.cpp:<span class="pl-c1">124</span>:<span class="pl-c1">1</span>: error: control reaches end of non-<span class="pl-k">void</span> function [-Werror=<span class="pl-k">return</span>-type] <span class="pl-c1">124</span> | } | ^ </pre></div> <h5 dir="auto">Steps to reproduce</h5> <p dir="auto">Just compile with conan with <code class="notranslate">build_type</code> being <code class="notranslate">Debug</code>.</p> <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"> I checked the problem with documentation, FAQ, open issues,<br> forum.opencv.org, Stack Overflow, etc and have not found any solution </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I updated to the 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"> There is reproducer code and related data files: videos, images, onnx, etc </li> </ul>
<p dir="auto">Compiler: GCC 12.1<br> Warnings are related to <code class="notranslate">GAPI_Assert(false ...);</code> code.<br> <code class="notranslate">GAPI_Error()</code> with "noreturn" attribute should be used instead.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2464/3435] Building CXX object modules/gapi/CMakeFiles/opencv_gapi.dir/src/compiler/gislandmodel.cpp.o /home/alalek/projects/opencv/dev/modules/gapi/src/compiler/gislandmodel.cpp: In member function ‘ade::NodeHandle cv::gimpl::GIsland::producer(const ade::Graph&amp;, const ade::NodeHandle&amp;) const’: /home/alalek/projects/opencv/dev/modules/gapi/src/compiler/gislandmodel.cpp:124:1: warning: control reaches end of non-void function [-Wreturn-type] 124 | } | ^ [2483/3435] Building CXX object modules/gapi/CMakeFiles/opencv_gapi.dir/src/executor/gstreamingexecutor.cpp.o /home/alalek/projects/opencv/dev/modules/gapi/src/executor/gstreamingexecutor.cpp: In member function ‘bool cv::gimpl::GStreamingExecutor::pull(cv::GRunArgsP&amp;&amp;)’: /home/alalek/projects/opencv/dev/modules/gapi/src/executor/gstreamingexecutor.cpp:1832:1: warning: control reaches end of non-void function [-Wreturn-type] 1832 | } | ^ /home/alalek/projects/opencv/dev/modules/gapi/src/executor/gstreamingexecutor.cpp: In member function ‘bool cv::gimpl::GStreamingExecutor::pull(cv::GOptRunArgsP&amp;&amp;)’: /home/alalek/projects/opencv/dev/modules/gapi/src/executor/gstreamingexecutor.cpp:1863:1: warning: control reaches end of non-void function [-Wreturn-type] 1863 | } | ^ [2491/3435] Building CXX object modules/gapi/CMakeFiles/opencv_gapi.dir/src/backends/cpu/gcpustereo.cpp.o In file included from /home/alalek/projects/opencv/dev/modules/core/include/opencv2/core/matx.hpp:52, from /home/alalek/projects/opencv/dev/modules/core/include/opencv2/core/mat.hpp:51, from /home/alalek/projects/opencv/dev/modules/gapi/include/opencv2/gapi/opencv_includes.hpp:13, from /home/alalek/projects/opencv/dev/modules/gapi/include/opencv2/gapi/gmat.hpp:14, from /home/alalek/projects/opencv/dev/modules/gapi/include/opencv2/gapi/stereo.hpp:10, from /home/alalek/projects/opencv/dev/modules/gapi/src/backends/cpu/gcpustereo.cpp:7: /home/alalek/projects/opencv/dev/modules/gapi/src/backends/cpu/gcpustereo.cpp: In static member function ‘static void GCPUStereo::run(const cv::Mat&amp;, const cv::Mat&amp;, cv::gapi::StereoOutputFormat, cv::Mat&amp;, const StereoSetup&amp;)’: /home/alalek/projects/opencv/dev/modules/core/include/opencv2/core/base.hpp:342:32: warning: this statement may fall through [-Wimplicit-fallthrough=] 342 | #define CV_Assert( expr ) do { if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ ); } while(0) | ^~ /home/alalek/projects/opencv/dev/modules/gapi/include/opencv2/gapi/own/assert.hpp:20:21: note: in expansion of macro ‘CV_Assert’ 20 | #define GAPI_Assert CV_Assert | ^~~~~~~~~ /home/alalek/projects/opencv/dev/modules/gapi/src/backends/cpu/gcpustereo.cpp:66:17: note: in expansion of macro ‘GAPI_Assert’ 66 | GAPI_Assert(false &amp;&amp; &quot;This case may be supported in future.&quot;); | ^~~~~~~~~~~ /home/alalek/projects/opencv/dev/modules/gapi/src/backends/cpu/gcpustereo.cpp:67:13: note: here 67 | default: | ^~~~~~~"><pre class="notranslate"><code class="notranslate">[2464/3435] Building CXX object modules/gapi/CMakeFiles/opencv_gapi.dir/src/compiler/gislandmodel.cpp.o /home/alalek/projects/opencv/dev/modules/gapi/src/compiler/gislandmodel.cpp: In member function ‘ade::NodeHandle cv::gimpl::GIsland::producer(const ade::Graph&amp;, const ade::NodeHandle&amp;) const’: /home/alalek/projects/opencv/dev/modules/gapi/src/compiler/gislandmodel.cpp:124:1: warning: control reaches end of non-void function [-Wreturn-type] 124 | } | ^ [2483/3435] Building CXX object modules/gapi/CMakeFiles/opencv_gapi.dir/src/executor/gstreamingexecutor.cpp.o /home/alalek/projects/opencv/dev/modules/gapi/src/executor/gstreamingexecutor.cpp: In member function ‘bool cv::gimpl::GStreamingExecutor::pull(cv::GRunArgsP&amp;&amp;)’: /home/alalek/projects/opencv/dev/modules/gapi/src/executor/gstreamingexecutor.cpp:1832:1: warning: control reaches end of non-void function [-Wreturn-type] 1832 | } | ^ /home/alalek/projects/opencv/dev/modules/gapi/src/executor/gstreamingexecutor.cpp: In member function ‘bool cv::gimpl::GStreamingExecutor::pull(cv::GOptRunArgsP&amp;&amp;)’: /home/alalek/projects/opencv/dev/modules/gapi/src/executor/gstreamingexecutor.cpp:1863:1: warning: control reaches end of non-void function [-Wreturn-type] 1863 | } | ^ [2491/3435] Building CXX object modules/gapi/CMakeFiles/opencv_gapi.dir/src/backends/cpu/gcpustereo.cpp.o In file included from /home/alalek/projects/opencv/dev/modules/core/include/opencv2/core/matx.hpp:52, from /home/alalek/projects/opencv/dev/modules/core/include/opencv2/core/mat.hpp:51, from /home/alalek/projects/opencv/dev/modules/gapi/include/opencv2/gapi/opencv_includes.hpp:13, from /home/alalek/projects/opencv/dev/modules/gapi/include/opencv2/gapi/gmat.hpp:14, from /home/alalek/projects/opencv/dev/modules/gapi/include/opencv2/gapi/stereo.hpp:10, from /home/alalek/projects/opencv/dev/modules/gapi/src/backends/cpu/gcpustereo.cpp:7: /home/alalek/projects/opencv/dev/modules/gapi/src/backends/cpu/gcpustereo.cpp: In static member function ‘static void GCPUStereo::run(const cv::Mat&amp;, const cv::Mat&amp;, cv::gapi::StereoOutputFormat, cv::Mat&amp;, const StereoSetup&amp;)’: /home/alalek/projects/opencv/dev/modules/core/include/opencv2/core/base.hpp:342:32: warning: this statement may fall through [-Wimplicit-fallthrough=] 342 | #define CV_Assert( expr ) do { if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ ); } while(0) | ^~ /home/alalek/projects/opencv/dev/modules/gapi/include/opencv2/gapi/own/assert.hpp:20:21: note: in expansion of macro ‘CV_Assert’ 20 | #define GAPI_Assert CV_Assert | ^~~~~~~~~ /home/alalek/projects/opencv/dev/modules/gapi/src/backends/cpu/gcpustereo.cpp:66:17: note: in expansion of macro ‘GAPI_Assert’ 66 | GAPI_Assert(false &amp;&amp; "This case may be supported in future."); | ^~~~~~~~~~~ /home/alalek/projects/opencv/dev/modules/gapi/src/backends/cpu/gcpustereo.cpp:67:13: note: here 67 | default: | ^~~~~~~ </code></pre></div>
1
<p dir="auto">Json retrieved from API never contains Date objects. Instead dates are transported as strings. When I run a DatePipe over a string it gives me <code class="notranslate">Invalid argument '2014-11-20T05:11:03.277+00:00' for pipe 'DatePipe'</code></p> <p dir="auto">Please note that angular 1 date filter worked just fine with strings.</p>
<p dir="auto">The new date pipe only supports date objects or numbers but not ISO strings. In ng1 this was valid and made displaying simple JSON from api's to the UI very easy with little conversion process.</p> <p dir="auto">Plunker with ng1 behavior date filter <a href="http://plnkr.co/edit/P0P0VKhmnYyJNdBcVcvM?p=preview" rel="nofollow">ng1 iso</a></p>
1
<h3 dir="auto">Version</h3> <p dir="auto">2.5.9</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://codepen.io/maple-leaf/pen/BmgaqG" rel="nofollow">https://codepen.io/maple-leaf/pen/BmgaqG</a></p> <h3 dir="auto">Steps to reproduce</h3> <ol dir="auto"> <li>open the <a href="https://codepen.io/maple-leaf/pen/BmgaqG" rel="nofollow">codepen demo</a></li> <li>open devtool if u are on chrome</li> <li>click <code class="notranslate">change data which will raise error</code> button</li> <li>now you should see an error like this: <code class="notranslate">TypeError: Cannot read property 'key' of undefined</code>.</li> <li>refresh demo page</li> <li>click <code class="notranslate">safe to change data here</code> button</li> <li>now you should not see an error like before, and data being updated correctly</li> </ol> <h3 dir="auto">What is expected?</h3> <p dir="auto">maybe same behavior like both should raise an error, but if raise error, maybe <code class="notranslate">duplicate key</code> error should be showed too <strong>which will help developer easier to find what data is killing page</strong>.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">both data have duplicate keys, but behavior is different</p> <hr> <p dir="auto">why error being raise when you click <code class="notranslate">change data which will raise error</code> button?</p> <p dir="auto">Because the data will raise error has some special changes. It remove all keys except duplicate key 'b' compared to initial data and the order is different.</p> <p dir="auto">This will make <code class="notranslate">updateChildren</code> function in <code class="notranslate">vdom/patch.js</code> hit <a href="https://github.com/vuejs/vue/blob/dev/src/core/vdom/patch.js#L421">this code section</a>, which will create a <code class="notranslate">oldKeyToIdx</code>. And then when first key 'b' comes, it will set value of <code class="notranslate">b</code> in <code class="notranslate">oldKeyToIdx</code> to <code class="notranslate">undefined</code>, and then next key <code class="notranslate">b</code> comes, it will compare old node and new node via function <a href="https://github.com/vuejs/vue/blob/dev/src/core/vdom/patch.js#L436">sameNode</a>. But this time, index of old node which key is <code class="notranslate">b</code> is undefined now. So a js error is being raised.</p>
<p dir="auto">I want to load the template for a VueJS component dynamically. I'd like to make an AJAX call using jQuery, and whatever the server returns should be the template of the VueJS component. Here's a simplified version of the code with the AJAX call removed since it's irrelevant where the data is coming from:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="BoardFeed = Vue.extend template: '&lt;div&gt;This should be replaced&lt;/div&gt;' data: -&gt; return items: null created: -&gt; @template = &quot;&lt;div&gt;Template returned from server, what I really want&lt;/div&gt;&quot;"><pre class="notranslate"><code class="notranslate">BoardFeed = Vue.extend template: '&lt;div&gt;This should be replaced&lt;/div&gt;' data: -&gt; return items: null created: -&gt; @template = "&lt;div&gt;Template returned from server, what I really want&lt;/div&gt;" </code></pre></div> <p dir="auto">In the above example I'm using the created hook which I thought would be suitable for this, but the newer template is never rendered, only the older one.</p> <p dir="auto">Is it possible to achieve this?</p>
0
<p dir="auto">I am getting an "access to undefined reference" in code that used to work, and that I believe is valid. It takes a very specific combination of details to trigger the problem, so I think it is related to optimization.</p> <p dir="auto">As far as I can tell from Travis (assuming they update 0.3 regularly) this behaviour started in the last day or two.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="andrew@laptop:~/project/CRC&gt; julia _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_) | Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type &quot;help()&quot; to list help topics | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.3.0-prerelease+2697 (2014-04-22 02:46 UTC) _/ |\__'_|_|_|\__'_| | Commit 9dc5e3f* (0 days old master) |__/ | x86_64-suse-linux julia&gt; type Single{A} table::Vector{A} Single() = new() end julia&gt; julia&gt; function crc(tables=Single) make_tables(tables{Uint8}()) end crc (generic function with 2 methods) julia&gt; julia&gt; function make_tables(tables::Single) tables.table = Array(Uint8, 256) tables.table[1] = 0x0 end make_tables (generic function with 1 method) julia&gt; julia&gt; crc() ERROR: access to undefined reference in crc at none:2"><pre class="notranslate"><code class="notranslate">andrew@laptop:~/project/CRC&gt; julia _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_) | Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "help()" to list help topics | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.3.0-prerelease+2697 (2014-04-22 02:46 UTC) _/ |\__'_|_|_|\__'_| | Commit 9dc5e3f* (0 days old master) |__/ | x86_64-suse-linux julia&gt; type Single{A} table::Vector{A} Single() = new() end julia&gt; julia&gt; function crc(tables=Single) make_tables(tables{Uint8}()) end crc (generic function with 2 methods) julia&gt; julia&gt; function make_tables(tables::Single) tables.table = Array(Uint8, 256) tables.table[1] = 0x0 end make_tables (generic function with 1 method) julia&gt; julia&gt; crc() ERROR: access to undefined reference in crc at none:2 </code></pre></div> <p dir="auto">I believe this is valid code - undefined members of a type seem to be supported in general, as long as they are created before reading.</p> <p dir="auto">Note that much of the "mess" above is necessary in order to trigger this. Below I'll add some minimally modified versions that work to illustrate this:</p> <p dir="auto">The type parameterization is needed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; type Single table::Vector{Uint8} Single() = new() end julia&gt; julia&gt; function crc(tables=Single) make_tables(tables()) end crc (generic function with 2 methods) julia&gt; julia&gt; function make_tables(tables::Single) tables.table = Array(Uint8, 256) tables.table[1] = 0x0 end make_tables (generic function with 1 method) julia&gt; julia&gt; crc() 0x00"><pre class="notranslate"><code class="notranslate">julia&gt; type Single table::Vector{Uint8} Single() = new() end julia&gt; julia&gt; function crc(tables=Single) make_tables(tables()) end crc (generic function with 2 methods) julia&gt; julia&gt; function make_tables(tables::Single) tables.table = Array(Uint8, 256) tables.table[1] = 0x0 end make_tables (generic function with 1 method) julia&gt; julia&gt; crc() 0x00 </code></pre></div> <p dir="auto">The default argument is needed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; type Single{A} table::Vector{A} Single() = new() end julia&gt; julia&gt; function crc(tables) make_tables(tables{Uint8}()) end crc (generic function with 1 method) julia&gt; julia&gt; function make_tables(tables::Single) tables.table = Array(Uint8, 256) tables.table[1] = 0x0 end make_tables (generic function with 1 method) julia&gt; julia&gt; crc(Single) 0x00"><pre class="notranslate"><code class="notranslate">julia&gt; type Single{A} table::Vector{A} Single() = new() end julia&gt; julia&gt; function crc(tables) make_tables(tables{Uint8}()) end crc (generic function with 1 method) julia&gt; julia&gt; function make_tables(tables::Single) tables.table = Array(Uint8, 256) tables.table[1] = 0x0 end make_tables (generic function with 1 method) julia&gt; julia&gt; crc(Single) 0x00 </code></pre></div> <p dir="auto">The separate routine to set the value is needed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; type Single{A} table::Vector{A} Single() = new() end julia&gt; julia&gt; function crc(tables=Single) t = tables{Uint8}() t.table = Array(Uint8, 256) t.table[1] = 0x0 end crc (generic function with 2 methods) julia&gt; julia&gt; crc() 0x00"><pre class="notranslate"><code class="notranslate">julia&gt; type Single{A} table::Vector{A} Single() = new() end julia&gt; julia&gt; function crc(tables=Single) t = tables{Uint8}() t.table = Array(Uint8, 256) t.table[1] = 0x0 end crc (generic function with 2 methods) julia&gt; julia&gt; crc() 0x00 </code></pre></div> <p dir="auto">Finally, the example to cut+paste:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type Single{A} table::Vector{A} Single() = new() end function crc(tables=Single) make_tables(tables{Uint8}()) end function make_tables(tables::Single) tables.table = Array(Uint8, 256) tables.table[1] = 0x0 end crc()"><pre class="notranslate"><code class="notranslate">type Single{A} table::Vector{A} Single() = new() end function crc(tables=Single) make_tables(tables{Uint8}()) end function make_tables(tables::Single) tables.table = Array(Uint8, 256) tables.table[1] = 0x0 end crc() </code></pre></div>
<p dir="auto">I'm moving the discussion from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="346340046" data-permission-text="Title is private" data-url="https://github.com/JuliaPy/pyjulia/issues/173" data-hovercard-type="issue" data-hovercard-url="/JuliaPy/pyjulia/issues/173/hovercard" href="https://github.com/JuliaPy/pyjulia/issues/173">JuliaPy/pyjulia#173</a> to gather more attention. I also describe in the last paragraphs how it may help not only PyJulia users but also other Julia users.</p> <p dir="auto">(<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/stevengj/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/stevengj">@stevengj</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Keno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Keno">@Keno</a>, please correct me or add more details if I'm missing something)</p> <p dir="auto">Prior to Julia 0.7, PyJulia users could use multiple Python interpreters without rebuilding PyCall.jl (PyJulia depends heavily on PyCall.jl) against each Python interpreters. Considering it's a common practice to have multiple Python virtual environments (with venv/virtualenv/conda), being able to use PyJulia without recompiling PyCall.jl every time is an important feature. However, supporting this feature in Julia ≥ 0.7 seems hard.</p> <p dir="auto">(Some details: Just to be clear, not all PyJulia users will notice this effect. Notably, Windows or macOS users only using Python 3 (or only using Python 2...) are unaffected. Linux users only using dynamically linked Python 3 (or 2) are also fine. However, Linux users using statically linked Python, such as the ones distributed by Ubuntu and Anaconda, will not be able to use PyJulia. I think those platforms are popular enough to pay a special attention.)</p> <p dir="auto">PyJulia relies on <code class="notranslate">Base.LOAD_CACHE_PATH</code> in Julia 0.6 to separate the cache of PyCall.jl. It inserts a private path to <code class="notranslate">Base.LOAD_CACHE_PATH[1]</code> if the Python interpreter in which PyJulia is loaded is incompatible with the Python interpreter with which PyCall.jl is configured:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Add a private cache directory. PyCall needs a different # configuration and so do any packages that depend on it. self._call(u&quot;unshift!(Base.LOAD_CACHE_PATH, abspath(Pkg.Dir._pkgroot(),&quot; + &quot;\&quot;lib\&quot;, \&quot;pyjulia%s-v$(VERSION.major).$(VERSION.minor)\&quot;))&quot; % sys.version_info[0])"><pre class="notranslate"><span class="pl-c"># Add a private cache directory. PyCall needs a different</span> <span class="pl-c"># configuration and so do any packages that depend on it.</span> <span class="pl-s1">self</span>.<span class="pl-en">_call</span>(<span class="pl-s">u"unshift!(Base.LOAD_CACHE_PATH, abspath(Pkg.Dir._pkgroot(),"</span> <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\"</span>lib<span class="pl-cce">\"</span>, <span class="pl-cce">\"</span>pyjulia%s-v$(VERSION.major).$(VERSION.minor)<span class="pl-cce">\"</span>))"</span> <span class="pl-c1">%</span> <span class="pl-s1">sys</span>.<span class="pl-s1">version_info</span>[<span class="pl-c1">0</span>])</pre></div> <p dir="auto">--- <a href="https://github.com/JuliaPy/pyjulia/blob/18d98e5b1b616a4d663273cc36cdd835ab0b33da/julia/core.py#L357-L360">https://github.com/JuliaPy/pyjulia/blob/18d98e5b1b616a4d663273cc36cdd835ab0b33da/julia/core.py#L357-L360</a></p> <p dir="auto">This "hack" doesn't work in Julia ≥ 0.7 as <code class="notranslate">Base.LOAD_CACHE_PATH</code> is gone now. Also, reading how <code class="notranslate">cache_file_entry</code> is used to locate the <code class="notranslate">.ji</code> files, I couldn't find a way to implement a new "hack" other than duplicating the whole <code class="notranslate">DEPOT_PATH[1]</code>.</p> <p dir="auto"></p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/JuliaLang/julia/blob/d038f2f4997e4a4544c790d05a7f54d316200bd6/base/loading.jl#L594-L608">julia/base/loading.jl</a> </p> <p class="mb-0 color-fg-muted"> Lines 594 to 608 in <a data-pjax="true" class="commit-tease-sha" href="/JuliaLang/julia/commit/d038f2f4997e4a4544c790d05a7f54d316200bd6">d038f2f</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="L594" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="594"></td> <td id="LC594" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-en">cache_file_entry</span>(pkg<span class="pl-k">::</span><span class="pl-c1">PkgId</span>) <span class="pl-k">=</span> <span class="pl-c1">joinpath</span>( </td> </tr> <tr class="border-0"> <td id="L595" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="595"></td> <td id="LC595" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"><span class="pl-pds">"</span>compiled<span class="pl-pds">"</span></span>, </td> </tr> <tr class="border-0"> <td id="L596" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="596"></td> <td id="LC596" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"><span class="pl-pds">"</span>v<span class="pl-v">$(<span class="pl-c1">VERSION</span><span class="pl-k">.</span>major)</span>.<span class="pl-v">$(<span class="pl-c1">VERSION</span><span class="pl-k">.</span>minor)</span><span class="pl-pds">"</span></span>, </td> </tr> <tr class="border-0"> <td id="L597" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="597"></td> <td id="LC597" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> pkg<span class="pl-k">.</span>uuid <span class="pl-k">===</span> <span class="pl-c1">nothing</span> <span class="pl-k">?</span> <span class="pl-s"><span class="pl-pds">"</span><span class="pl-v">$(pkg<span class="pl-k">.</span>name)</span>.ji<span class="pl-pds">"</span></span> <span class="pl-k">:</span> <span class="pl-c1">joinpath</span>(pkg<span class="pl-k">.</span>name, <span class="pl-s"><span class="pl-pds">"</span><span class="pl-v">$(<span class="pl-c1">package_slug</span>(pkg<span class="pl-k">.</span>uuid))</span>.ji<span class="pl-pds">"</span></span>) </td> </tr> <tr class="border-0"> <td id="L598" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="598"></td> <td id="LC598" 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="L599" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="599"></td> <td id="LC599" 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="L600" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="600"></td> <td id="LC600" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">function</span> <span class="pl-en">find_all_in_cache_path</span>(pkg<span class="pl-k">::</span><span class="pl-c1">PkgId</span>) </td> </tr> <tr class="border-0"> <td id="L601" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="601"></td> <td id="LC601" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> paths <span class="pl-k">=</span> String[] </td> </tr> <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"> entry <span class="pl-k">=</span> <span class="pl-c1">cache_file_entry</span>(pkg) </td> </tr> <tr class="border-0"> <td id="L603" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="603"></td> <td id="LC603" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">for</span> depot <span class="pl-k">in</span> <span class="pl-c1">DEPOT_PATH</span> </td> </tr> <tr class="border-0"> <td id="L604" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="604"></td> <td id="LC604" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> path <span class="pl-k">=</span> <span class="pl-c1">joinpath</span>(depot, entry) </td> </tr> <tr class="border-0"> <td id="L605" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="605"></td> <td id="LC605" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c1">isfile_casesensitive</span>(path) <span class="pl-k">&amp;&amp;</span> <span class="pl-c1">push!</span>(paths, path) </td> </tr> <tr class="border-0"> <td id="L606" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="606"></td> <td id="LC606" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">end</span> </td> </tr> <tr class="border-0"> <td id="L607" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="607"></td> <td id="LC607" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> paths </td> </tr> <tr class="border-0"> <td id="L608" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="608"></td> <td id="LC608" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">end</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">But creating a new <code class="notranslate">DEPOT_PATH[1]</code> for each incompatible Python interpreter type is rather overkill and ignores Pkg3 working hard to de-duplicate resources. It would be really nice to have a direct support from Julia and Pkg3, if it is feasible.</p> <h3 dir="auto">An idea: "build option" support</h3> <p dir="auto">I think one way to directly support it is to add "build option" support in Julia and Pkg3. What I mean by "build option" is something that altering it changes the precompilation cache. Currently Julia packages do this via environment variables. Concrete examples are <code class="notranslate">PYTHON</code> of PyCall.jl and <code class="notranslate">CONDA_JL_HOME</code> of Conda.jl. If those options can be directly configured by <code class="notranslate">Project.toml</code> file, and if compilation cache paths depend on such options, PyJulia can just create a new <code class="notranslate">Project.toml</code> with appropriate options and launch a new Julia interpreter. Importantly, the compilation cache path of a package has to depend also on the build options of all its (direct and indirect) dependencies.</p> <p dir="auto">I think the "build option" support can help other Julia users (who do not use PyJulia) too. For example, you can change <code class="notranslate">CONDA_JL_HOME</code> for a particular <code class="notranslate">Project.toml</code> to tweak versions of external libraries provided via <code class="notranslate">Conda.jl</code> without contaminating other projects. (Maybe similar benefits can be gained via BinaryProvider.jl too?) I think supporting 32-bit and 64-bit Julia <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="285225439" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/Pkg.jl/issues/93" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/Pkg.jl/issues/93/hovercard" href="https://github.com/JuliaLang/Pkg.jl/issues/93">JuliaLang/Pkg.jl#93</a> can also be done by changing "build option" of the "root" <code class="notranslate">julia</code> package. I suppose then it makes sense for <code class="notranslate">deps</code> directories to depend on "build options" too (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="285225439" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/Pkg.jl/issues/93" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/Pkg.jl/issues/93/hovercard?comment_id=354577967&amp;comment_type=issue_comment" href="https://github.com/JuliaLang/Pkg.jl/issues/93#issuecomment-354577967">JuliaLang/Pkg.jl#93 (comment)</a>).</p>
0
<p dir="auto">Describe what you were doing when the bug occurred:</p> <ol dir="auto"> <li>React dev tools profiler crashed when changing from "anonymous" to "overlay" and asked to report the issue</li> </ol> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.1.1-a9cd9a765</p> <p dir="auto">Call stack: at n.value (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:162685)<br> at m (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:331467)<br> at sc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:331684)<br> at oi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:58733)<br> at Ri (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:66060)<br> at Jl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:104557)<br> at vc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:89163)<br> at Ac (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:89088)<br> at ac (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:86037)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:45275</p> <p dir="auto">Component stack: in sc<br> in div<br> in div<br> in _o<br> in Unknown<br> in n<br> in Unknown<br> in div<br> in div<br> in zi<br> in Ge<br> in un<br> in ba<br> in Rc</p>
<p dir="auto">PLEASE INCLUDE REPRO INSTRUCTIONS AND EXAMPLE CODE</p> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.0.4-3c6a219</p> <p dir="auto">Call stack: at n.value (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:16721)<br> at m (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:293207)<br> at pl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:293442)<br> at Ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:55890)<br> at bi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:62939)<br> at Xl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:99535)<br> at Hl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:84255)<br> at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:81285)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:25363<br> at n.unstable_runWithPriority (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:4368)</p> <p dir="auto">Component stack: in pl<br> in div<br> in div<br> in Or<br> in Unknown<br> in n<br> in Unknown<br> in div<br> in div<br> in Ha<br> in le<br> in ve<br> in ko<br> in Ul</p>
1
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18362.418] Windows Terminal version (if applicable): All"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.418] Windows Terminal version (if applicable): All </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Write some characters with linefeed in the notepad, such as:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a b c d e"><pre class="notranslate"><code class="notranslate">a b c d e </code></pre></div> <ol start="2" dir="auto"> <li>Copy them</li> <li>Open Windows Terminal and launch WSL</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="wsl"><pre class="notranslate"><code class="notranslate">wsl </code></pre></div> <ol start="4" dir="auto"> <li>use <code class="notranslate">cat</code> command to write into a text file:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cat &gt; test.txt &lt;&lt; EOF"><pre class="notranslate"><code class="notranslate">cat &gt; test.txt &lt;&lt; EOF </code></pre></div> <ol start="5" dir="auto"> <li>Paste the copied characters into the terminal</li> </ol> <h1 dir="auto">Expected behavior</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PS C:\Users\hez20&gt; wsl hez2010@DESKTOP-CD2C52F:/mnt/c/Users/hez20$ cd ~ hez2010@DESKTOP-CD2C52F:~$ cat &gt; test.txt &lt;&lt; EOF &gt; a &gt; b &gt; c &gt; d &gt; e &gt; f"><pre class="notranslate"><code class="notranslate">PS C:\Users\hez20&gt; wsl hez2010@DESKTOP-CD2C52F:/mnt/c/Users/hez20$ cd ~ hez2010@DESKTOP-CD2C52F:~$ cat &gt; test.txt &lt;&lt; EOF &gt; a &gt; b &gt; c &gt; d &gt; e &gt; f </code></pre></div> <h1 dir="auto">Actual behavior</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PS C:\Users\hez20&gt; wsl hez2010@DESKTOP-CD2C52F:/mnt/c/Users/hez20$ cd ~ hez2010@DESKTOP-CD2C52F:~$ cat &gt; test.txt &lt;&lt; EOF &gt; a &gt; &gt; b &gt; &gt; c &gt; &gt; d &gt; &gt; e &gt; &gt; f"><pre class="notranslate"><code class="notranslate">PS C:\Users\hez20&gt; wsl hez2010@DESKTOP-CD2C52F:/mnt/c/Users/hez20$ cd ~ hez2010@DESKTOP-CD2C52F:~$ cat &gt; test.txt &lt;&lt; EOF &gt; a &gt; &gt; b &gt; &gt; c &gt; &gt; d &gt; &gt; e &gt; &gt; f </code></pre></div> <p dir="auto">Each linefeed was repeated twice.</p>
<p dir="auto">Multiline text pasted from the clipboard includes CRLF pairs in all cases; this is inappropriate for "Unix-space" sessions, such as WSL.</p> <h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18362.145] Windows Terminal version (if applicable): 71e19cd82528d66a0a7867cbed85990cfc1685f1"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.145] Windows Terminal version (if applicable): 71e19cd82528d66a0a7867cbed85990cfc1685f1 </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Select multiline text in Terminal.<br> Copy it (via right-click, ostensibly)<br> Paste it (again via right-click)</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">When pasting into a Unix-space session -- such as WSL -- pasted text should have a reasonable set of line-ending characters.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Line endings are "doubled" on text paste to Unix-space sessions.</p>
1
<p dir="auto">To reproduce:</p> <ul dir="auto"> <li>Launch the "Drop Down Button" from the material_gallery example</li> <li>Press the menu button</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="android: I/flutter : Exception caught while building _DropDownMenu android: I/flutter : 'packages/flutter/src/widgets/basic.dart': Failed assertion: line 749: '() { android: I/flutter : &quot;Positioned must placed inside a Stack&quot;; android: I/flutter : return ancestor is Stack; android: I/flutter : }' is not true. android: I/flutter : Stack trace: android: I/flutter : #0 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:27) android: I/flutter : #1 Positioned.debugValidateAncestor (packages/flutter/src/widgets/basic.dart:749) android: I/flutter : #2 ParentDataElement.mount.&lt;anonymous closure&gt; (packages/flutter/src/widgets/framework.dart:1226) android: I/flutter : #3 ParentDataElement.mount (packages/flutter/src/widgets/framework.dart:1216) android: I/flutter : #4 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #5 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #6 ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1082) android: I/flutter : #7 BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:1011) android: I/flutter : #8 ComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1057) android: I/flutter : #9 StatefulComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1151) android: I/flutter : #10 ComponentElement.mount (packages/flutter/src/widgets/framework.dart:1052) android: I/flutter : #11 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #12 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #13 ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1082) android: I/flutter : #14 BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:1011) android: I/flutter : #15 ComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1057) android: I/flutter : #16 ComponentElement.mount (packages/flutter/src/widgets/framework.dart:1052) android: I/flutter : #17 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #18 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #19 ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1082) android: I/flutter : #20 BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:1011) android: I/flutter : #21 ComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1057) android: I/flutter : #22 ComponentElement.mount (packages/flutter/src/widgets/framework.dart:1052) android: I/flutter : #23 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #24 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #25 OneChildRenderObjectElement.mount (packages/flutter/src/widgets/framework.dart:1572) android: I/flutter : #26 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #27 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #28 ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1082) android: I/flutter : #29 BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:1011) android: I/flutter : #30 ComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1057) android: I/flutter : #31 ComponentElement.mount (packages/flutter/src/widgets/framework.dart:1052) android: I/flutter : #32 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #33 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #34 ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1082) android: I/flutter : #35 BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:1011) android: I/flutter : #36 ComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1057) android: I/flutter : #37 StatefulComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1151) android: I/flutter : #38 ComponentElement.mount (packages/flutter/src/widgets/framework.dart:1052) android: I/flutter : #39 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #40 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #41 OneChildRenderObjectElement.mount (packages/flutter/src/widgets/framework.dart:1572) android: I/flutter : #42 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #43 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) "><pre class="notranslate"><code class="notranslate">android: I/flutter : Exception caught while building _DropDownMenu android: I/flutter : 'packages/flutter/src/widgets/basic.dart': Failed assertion: line 749: '() { android: I/flutter : "Positioned must placed inside a Stack"; android: I/flutter : return ancestor is Stack; android: I/flutter : }' is not true. android: I/flutter : Stack trace: android: I/flutter : #0 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:27) android: I/flutter : #1 Positioned.debugValidateAncestor (packages/flutter/src/widgets/basic.dart:749) android: I/flutter : #2 ParentDataElement.mount.&lt;anonymous closure&gt; (packages/flutter/src/widgets/framework.dart:1226) android: I/flutter : #3 ParentDataElement.mount (packages/flutter/src/widgets/framework.dart:1216) android: I/flutter : #4 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #5 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #6 ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1082) android: I/flutter : #7 BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:1011) android: I/flutter : #8 ComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1057) android: I/flutter : #9 StatefulComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1151) android: I/flutter : #10 ComponentElement.mount (packages/flutter/src/widgets/framework.dart:1052) android: I/flutter : #11 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #12 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #13 ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1082) android: I/flutter : #14 BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:1011) android: I/flutter : #15 ComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1057) android: I/flutter : #16 ComponentElement.mount (packages/flutter/src/widgets/framework.dart:1052) android: I/flutter : #17 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #18 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #19 ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1082) android: I/flutter : #20 BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:1011) android: I/flutter : #21 ComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1057) android: I/flutter : #22 ComponentElement.mount (packages/flutter/src/widgets/framework.dart:1052) android: I/flutter : #23 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #24 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #25 OneChildRenderObjectElement.mount (packages/flutter/src/widgets/framework.dart:1572) android: I/flutter : #26 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #27 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #28 ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1082) android: I/flutter : #29 BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:1011) android: I/flutter : #30 ComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1057) android: I/flutter : #31 ComponentElement.mount (packages/flutter/src/widgets/framework.dart:1052) android: I/flutter : #32 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #33 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #34 ComponentElement.performRebuild (packages/flutter/src/widgets/framework.dart:1082) android: I/flutter : #35 BuildableElement.rebuild (packages/flutter/src/widgets/framework.dart:1011) android: I/flutter : #36 ComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1057) android: I/flutter : #37 StatefulComponentElement._firstBuild (packages/flutter/src/widgets/framework.dart:1151) android: I/flutter : #38 ComponentElement.mount (packages/flutter/src/widgets/framework.dart:1052) android: I/flutter : #39 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #40 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) android: I/flutter : #41 OneChildRenderObjectElement.mount (packages/flutter/src/widgets/framework.dart:1572) android: I/flutter : #42 Element._inflateWidget (packages/flutter/src/widgets/framework.dart:770) android: I/flutter : #43 Element.updateChild (packages/flutter/src/widgets/framework.dart:649) </code></pre></div>
1
<p dir="auto"><strong>Describe the bug</strong></p> <p dir="auto">The <code class="notranslate">openapi.json</code> generated from the docs is not valid OpenAPI 3.0 schema and doesn't pass validation. Can be checked against few available validators:</p> <ul dir="auto"> <li><a href="https://apidevtools.org/swagger-parser/online/" rel="nofollow">https://apidevtools.org/swagger-parser/online/</a></li> <li><a href="https://editor.swagger.io/" rel="nofollow">https://editor.swagger.io/</a></li> </ul> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">Passes validation.</p> <p dir="auto"><strong>Environment:</strong></p> <ul dir="auto"> <li>OS: macOS</li> <li>FastAPI Version: 0.33.0</li> <li>Python version: 3.7.3</li> </ul> <p dir="auto"><strong>Additional context</strong></p> <p dir="auto">After looking at the schema I found some noticeable parts:</p> <ul dir="auto"> <li>Security definitions are duplicated multiple times is there are some dependencies with shared sub dependencies. In the schema it looks like:</li> </ul> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;security&quot;: [ { &quot;My Auth&quot;: [] }, { &quot;My Auth&quot;: [] } ]"><pre class="notranslate"><span class="pl-ent">"security"</span>: [ { <span class="pl-ent">"My Auth"</span>: [] }, { <span class="pl-ent">"My Auth"</span>: [] } ]</pre></div> <ul dir="auto"> <li>For numeric values min/max validation flags should be boolean values instead of integers:</li> </ul> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;schema&quot;: { &quot;title&quot;: &quot;Size&quot;, &quot;maximum&quot;: 100, &quot;exclusiveMinimum&quot;: 0, &quot;type&quot;: &quot;integer&quot;, &quot;description&quot;: &quot;Number of records to return&quot;, &quot;default&quot;: 10 }"><pre class="notranslate"><span class="pl-ent">"schema"</span>: { <span class="pl-ent">"title"</span>: <span class="pl-s"><span class="pl-pds">"</span>Size<span class="pl-pds">"</span></span>, <span class="pl-ent">"maximum"</span>: <span class="pl-c1">100</span>, <span class="pl-ent">"exclusiveMinimum"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>integer<span class="pl-pds">"</span></span>, <span class="pl-ent">"description"</span>: <span class="pl-s"><span class="pl-pds">"</span>Number of records to return<span class="pl-pds">"</span></span>, <span class="pl-ent">"default"</span>: <span class="pl-c1">10</span> }</pre></div> <p dir="auto">The <code class="notranslate">"exclusiveMinimum": 0,</code> should be in fact <code class="notranslate">"exclusiveMinimum": false,</code></p> <ul dir="auto"> <li>Path parameters is referenced in multiple dependencies for a route get duplicated:</li> </ul> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;parameters&quot;: [ { &quot;required&quot;: true, &quot;schema&quot;: { &quot;title&quot;: &quot;User_Id&quot;, &quot;type&quot;: &quot;string&quot;, &quot;format&quot;: &quot;uuid&quot; }, &quot;name&quot;: &quot;user_id&quot;, &quot;in&quot;: &quot;path&quot; }, { &quot;required&quot;: true, &quot;schema&quot;: { &quot;title&quot;: &quot;User_Id&quot;, &quot;type&quot;: &quot;string&quot;, &quot;format&quot;: &quot;uuid&quot; }, &quot;name&quot;: &quot;user_id&quot;, &quot;in&quot;: &quot;path&quot; } ]"><pre class="notranslate"><span class="pl-ent">"parameters"</span>: [ { <span class="pl-ent">"required"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"schema"</span>: { <span class="pl-ent">"title"</span>: <span class="pl-s"><span class="pl-pds">"</span>User_Id<span class="pl-pds">"</span></span>, <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>string<span class="pl-pds">"</span></span>, <span class="pl-ent">"format"</span>: <span class="pl-s"><span class="pl-pds">"</span>uuid<span class="pl-pds">"</span></span> }, <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>user_id<span class="pl-pds">"</span></span>, <span class="pl-ent">"in"</span>: <span class="pl-s"><span class="pl-pds">"</span>path<span class="pl-pds">"</span></span> }, { <span class="pl-ent">"required"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"schema"</span>: { <span class="pl-ent">"title"</span>: <span class="pl-s"><span class="pl-pds">"</span>User_Id<span class="pl-pds">"</span></span>, <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>string<span class="pl-pds">"</span></span>, <span class="pl-ent">"format"</span>: <span class="pl-s"><span class="pl-pds">"</span>uuid<span class="pl-pds">"</span></span> }, <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>user_id<span class="pl-pds">"</span></span>, <span class="pl-ent">"in"</span>: <span class="pl-s"><span class="pl-pds">"</span>path<span class="pl-pds">"</span></span> } ]</pre></div> <ul dir="auto"> <li>References are not properly defined and thus resolved, resulting in multiple errors such as:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Missing required property: $ref at #/user/roles"><pre class="notranslate"><code class="notranslate">Missing required property: $ref at #/user/roles </code></pre></div>
<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 import threading from typing import Optional from datetime import datetime from passlib.context import CryptContext from beanie import Document, init_beanie from motor.motor_asyncio import AsyncIOMotorClient from fastapi import FastAPI lock = threading.Lock() app = FastAPI() pwd_context = CryptContext(schemes=[&quot;bcrypt&quot;], deprecated=&quot;auto&quot;) class User(Document): username: str full_name: Optional[str] = None email: Optional[str] = None class Settings: name = &quot;users&quot; def __repr__(self) -&gt; str: return f&quot;&lt;User {self.username}&gt;&quot; def __str__(self) -&gt; str: return self.username def __hash__(self) -&gt; int: return hash(self.username) def __eq__(self, other: object) -&gt; bool: if isinstance(other, User): return self.username == other.username return False @property def created(self) -&gt; datetime: return self.id.generation_time @classmethod async def by_username(cls, username: str) -&gt; &quot;User&quot;: &quot;&quot;&quot;Get a user by username&quot;&quot;&quot; return await cls.find_one(cls.username == username) class UserPW(User): password: str def hash_password(password: str) -&gt; str: return pwd_context.hash(password.encode()) async def create_admin_user( username: str = &quot;test&quot;, password: str = &quot;test&quot; ): # lock not working, still create 4 users with lock: found_user = await User.by_username(username) if found_user is not None: print(&quot;admin user already exists, pass!&quot;) else: user = UserPW( username=username, password=password ) hashed = hash_password(user.password) user.password = hashed await user.create() return User(**user.dict()) async def init_db(app: FastAPI): app.db = AsyncIOMotorClient(&quot;mongodb://test:test@127.0.0.1:27017/pml_dev?authSource=admin&quot;) col = getattr(app.db, &quot;pml_dev&quot;) await init_beanie(col, document_models=[ User ]) @app.on_event(&quot;startup&quot;) async def init(): # init database await init_db(app) # create admin user if not exists await create_admin_user() # create 4 duplicate users # uvicorn main:app --host=0.0.0.0 --port 5000 --workers 4 # only create 1 user on single worker # uvicorn main:app --host=0.0.0.0 --port 5000"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">uvicorn</span> <span class="pl-k">import</span> <span class="pl-s1">threading</span> <span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">Optional</span> <span class="pl-k">from</span> <span class="pl-s1">datetime</span> <span class="pl-k">import</span> <span class="pl-s1">datetime</span> <span class="pl-k">from</span> <span class="pl-s1">passlib</span>.<span class="pl-s1">context</span> <span class="pl-k">import</span> <span class="pl-v">CryptContext</span> <span class="pl-k">from</span> <span class="pl-s1">beanie</span> <span class="pl-k">import</span> <span class="pl-v">Document</span>, <span class="pl-s1">init_beanie</span> <span class="pl-k">from</span> <span class="pl-s1">motor</span>.<span class="pl-s1">motor_asyncio</span> <span class="pl-k">import</span> <span class="pl-v">AsyncIOMotorClient</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-s1">lock</span> <span class="pl-c1">=</span> <span class="pl-s1">threading</span>.<span class="pl-v">Lock</span>() <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>() <span class="pl-s1">pwd_context</span> <span class="pl-c1">=</span> <span class="pl-v">CryptContext</span>(<span class="pl-s1">schemes</span><span class="pl-c1">=</span>[<span class="pl-s">"bcrypt"</span>], <span class="pl-s1">deprecated</span><span class="pl-c1">=</span><span class="pl-s">"auto"</span>) <span class="pl-k">class</span> <span class="pl-v">User</span>(<span class="pl-v">Document</span>): <span class="pl-s1">username</span>: <span class="pl-s1">str</span> <span class="pl-s1">full_name</span>: <span class="pl-v">Optional</span>[<span class="pl-s1">str</span>] <span class="pl-c1">=</span> <span class="pl-c1">None</span> <span class="pl-s1">email</span>: <span class="pl-v">Optional</span>[<span class="pl-s1">str</span>] <span class="pl-c1">=</span> <span class="pl-c1">None</span> <span class="pl-k">class</span> <span class="pl-v">Settings</span>: <span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s">"users"</span> <span class="pl-k">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>) <span class="pl-c1">-&gt;</span> <span class="pl-s1">str</span>: <span class="pl-k">return</span> <span class="pl-s">f"&lt;User <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">username</span><span class="pl-kos">}</span></span>&gt;"</span> <span class="pl-k">def</span> <span class="pl-en">__str__</span>(<span class="pl-s1">self</span>) <span class="pl-c1">-&gt;</span> <span class="pl-s1">str</span>: <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-s1">username</span> <span class="pl-k">def</span> <span class="pl-en">__hash__</span>(<span class="pl-s1">self</span>) <span class="pl-c1">-&gt;</span> <span class="pl-s1">int</span>: <span class="pl-k">return</span> <span class="pl-en">hash</span>(<span class="pl-s1">self</span>.<span class="pl-s1">username</span>) <span class="pl-k">def</span> <span class="pl-en">__eq__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">other</span>: <span class="pl-s1">object</span>) <span class="pl-c1">-&gt;</span> <span class="pl-s1">bool</span>: <span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">other</span>, <span class="pl-v">User</span>): <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-s1">username</span> <span class="pl-c1">==</span> <span class="pl-s1">other</span>.<span class="pl-s1">username</span> <span class="pl-k">return</span> <span class="pl-c1">False</span> <span class="pl-en">@<span class="pl-s1">property</span></span> <span class="pl-k">def</span> <span class="pl-en">created</span>(<span class="pl-s1">self</span>) <span class="pl-c1">-&gt;</span> <span class="pl-s1">datetime</span>: <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-s1">id</span>.<span class="pl-s1">generation_time</span> <span class="pl-en">@<span class="pl-s1">classmethod</span></span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">by_username</span>(<span class="pl-s1">cls</span>, <span class="pl-s1">username</span>: <span class="pl-s1">str</span>) <span class="pl-c1">-&gt;</span> <span class="pl-s">"User"</span>: <span class="pl-s">"""Get a user by username"""</span> <span class="pl-k">return</span> <span class="pl-k">await</span> <span class="pl-s1">cls</span>.<span class="pl-en">find_one</span>(<span class="pl-s1">cls</span>.<span class="pl-s1">username</span> <span class="pl-c1">==</span> <span class="pl-s1">username</span>) <span class="pl-k">class</span> <span class="pl-v">UserPW</span>(<span class="pl-v">User</span>): <span class="pl-s1">password</span>: <span class="pl-s1">str</span> <span class="pl-k">def</span> <span class="pl-en">hash_password</span>(<span class="pl-s1">password</span>: <span class="pl-s1">str</span>) <span class="pl-c1">-&gt;</span> <span class="pl-s1">str</span>: <span class="pl-k">return</span> <span class="pl-s1">pwd_context</span>.<span class="pl-en">hash</span>(<span class="pl-s1">password</span>.<span class="pl-en">encode</span>()) <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">create_admin_user</span>( <span class="pl-s1">username</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-s">"test"</span>, <span class="pl-s1">password</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-s">"test"</span> ): <span class="pl-c"># lock not working, still create 4 users</span> <span class="pl-k">with</span> <span class="pl-s1">lock</span>: <span class="pl-s1">found_user</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-v">User</span>.<span class="pl-en">by_username</span>(<span class="pl-s1">username</span>) <span class="pl-k">if</span> <span class="pl-s1">found_user</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-c1">None</span>: <span class="pl-en">print</span>(<span class="pl-s">"admin user already exists, pass!"</span>) <span class="pl-k">else</span>: <span class="pl-s1">user</span> <span class="pl-c1">=</span> <span class="pl-v">UserPW</span>( <span class="pl-s1">username</span><span class="pl-c1">=</span><span class="pl-s1">username</span>, <span class="pl-s1">password</span><span class="pl-c1">=</span><span class="pl-s1">password</span> ) <span class="pl-s1">hashed</span> <span class="pl-c1">=</span> <span class="pl-en">hash_password</span>(<span class="pl-s1">user</span>.<span class="pl-s1">password</span>) <span class="pl-s1">user</span>.<span class="pl-s1">password</span> <span class="pl-c1">=</span> <span class="pl-s1">hashed</span> <span class="pl-k">await</span> <span class="pl-s1">user</span>.<span class="pl-en">create</span>() <span class="pl-k">return</span> <span class="pl-v">User</span>(<span class="pl-c1">**</span><span class="pl-s1">user</span>.<span class="pl-en">dict</span>()) <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">init_db</span>(<span class="pl-s1">app</span>: <span class="pl-v">FastAPI</span>): <span class="pl-s1">app</span>.<span class="pl-s1">db</span> <span class="pl-c1">=</span> <span class="pl-v">AsyncIOMotorClient</span>(<span class="pl-s">"mongodb://test:test@127.0.0.1:27017/pml_dev?authSource=admin"</span>) <span class="pl-s1">col</span> <span class="pl-c1">=</span> <span class="pl-en">getattr</span>(<span class="pl-s1">app</span>.<span class="pl-s1">db</span>, <span class="pl-s">"pml_dev"</span>) <span class="pl-k">await</span> <span class="pl-en">init_beanie</span>(<span class="pl-s1">col</span>, <span class="pl-s1">document_models</span><span class="pl-c1">=</span>[ <span class="pl-v">User</span> ]) <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">on_event</span>(<span class="pl-s">"startup"</span>)</span> <span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">init</span>(): <span class="pl-c"># init database</span> <span class="pl-k">await</span> <span class="pl-en">init_db</span>(<span class="pl-s1">app</span>) <span class="pl-c"># create admin user if not exists</span> <span class="pl-k">await</span> <span class="pl-en">create_admin_user</span>() <span class="pl-c"># create 4 duplicate users</span> <span class="pl-c"># uvicorn main:app --host=0.0.0.0 --port 5000 --workers 4</span> <span class="pl-c"># only create 1 user on single worker</span> <span class="pl-c"># uvicorn main:app --host=0.0.0.0 --port 5000</span></pre></div> <h3 dir="auto">Description</h3> <ul dir="auto"> <li>I am current immigrate <code class="notranslate">flask</code> project to <code class="notranslate">fastapi</code>.</li> <li>on <code class="notranslate">startup</code> it will to <code class="notranslate">setup mongodb database</code> and <code class="notranslate">create 1 admin user</code> to provide <code class="notranslate">security</code> feature.</li> <li>some <code class="notranslate">api router</code> is sync due to <code class="notranslate">compatibility</code>, to improve performance so i run it on <code class="notranslate">4 workers</code>.</li> <li>but due to multiple workers threads, it create <code class="notranslate">4 users</code> instead of 1.</li> <li>I tried add <code class="notranslate">threading lock</code> or <code class="notranslate">async lock</code> and it's not working, how can we add lock on <code class="notranslate">startup event</code> to make sure only 1 event execute in multiple threading?</li> </ul> <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.86.0</p> <h3 dir="auto">Python Version</h3> <p dir="auto">3.10</p> <h3 dir="auto">Additional Context</h3> <p dir="auto"><em>No response</em></p>
0
<p dir="auto">I have a problem with scheduler memory that continue to increase when i am using docker image.<br> I am using Celery Executor<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14239278/121222326-bf902580-c886-11eb-851f-dd78ea5fa43d.png"><img src="https://user-images.githubusercontent.com/14239278/121222326-bf902580-c886-11eb-851f-dd78ea5fa43d.png" alt="image" style="max-width: 100%;"></a><br> Any solution ??<br> Thanks in advance</p>
<p dir="auto"><strong>Apache Airflow version</strong>: 2.0.1</p> <p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>): v1.17.4</p> <p dir="auto"><strong>Environment</strong>: Dev</p> <ul dir="auto"> <li><strong>OS</strong> (e.g. from /etc/os-release): RHEL7</li> </ul> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">After running fine for some time my airflow tasks got stuck in scheduled state with below error in Task Instance Details:<br> "All dependencies are met but the task instance is not running. In most cases this just means that the task will probably be scheduled soon unless: - The scheduler is down or under heavy load If this task instance does not start soon please contact your Airflow administrator for assistance."</p> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">I restarted the scheduler then it started working fine. When i checked my metrics i realized the scheduler has a memory leak and over past 4 days it has reached up to 6GB of memory utilization</p> <p dir="auto">In version &gt;2.0 we don't even have the run_duration config option to restart scheduler periodically to avoid this issue until it is resolved.</p> <p dir="auto"><strong>How to reproduce it</strong>:<br> I saw this issue in multiple dev instances of mine all running Airflow 2.0.1 on kubernetes with KubernetesExecutor.<br> Below are the configs that i changed from the default config.<br> max_active_dag_runs_per_dag=32<br> parallelism=64<br> dag_concurrency=32<br> sql_Alchemy_pool_size=50<br> sql_Alchemy_max_overflow=30</p> <p dir="auto"><strong>Anything else we need to know</strong>:</p> <p dir="auto">The scheduler memory leaks occurs consistently in all instances i have been running. The memory utilization keeps growing for scheduler.</p>
1
<p dir="auto">This bug is present in Bootstrap's docs: <a href="http://twbs.github.io/bootstrap/javascript/#modals" rel="nofollow">http://twbs.github.io/bootstrap/javascript/#modals</a></p> <ol dir="auto"> <li>Launch the demo modal</li> <li>Close the modal</li> <li>Open the same modal again</li> <li>The x button at the top and the close button at the bottom don't work</li> </ol> <p dir="auto">Clicking outside still works and pressing the escape key still works, so this appears to be isolated to elements that use data-dismiss="modal".</p> <p dir="auto">Tested in Chrome 28.0.1500.95 and Safari 6.0.5.</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">Challenge <a href="http://freecodecamp.com/challenges/bonfire-search-and-replace" rel="nofollow">Bonfire: Search and Replace</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/45.0.2454.101 Safari/537.36</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.</p> <p dir="auto">The default code uses a "myReplace" function name, however the assertions by default run against a "replace" function name. Thus either the default assertions or the default boilerplate code must be altered to run against the correct default function name.</p> <p dir="auto">My code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function myReplace(str, before, after) { return str; } myReplace(&quot;A quick brown fox jumped over the lazy dog&quot;, &quot;jumped&quot;, &quot;leaped&quot;); "><pre class="notranslate"><code class="notranslate">function myReplace(str, before, after) { return str; } myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped"); </code></pre></div>
<p dir="auto">I noticed that a couple weeks ago, someone raised an issue about the function being called replace, and the issue was dealt with and renamed to myReplace. It seems the tests are still running on the old-named function replace and aren't accounting for the myReplace function.</p> <p dir="auto">The issue can be circumvented by simply renaming the function to replace, but it might not be obvious right away to some campers. It would be best to modify the tests to reflect the new name change.</p>
1
<h2 dir="auto">Steps to Reproduce</h2> <ol dir="auto"> <li>Navigate to flutter_gallery and run with <code class="notranslate">flutter run</code></li> <li>Navigate to the Icons demo page within the app</li> <li>Notice the size 48.0 Icon displays incorrectly for certain colors.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16725750/28852134-fdd3a318-76f4-11e7-8b01-c4deb7992ffb.png"><img src="https://user-images.githubusercontent.com/16725750/28852134-fdd3a318-76f4-11e7-8b01-c4deb7992ffb.png" alt="flutter_01" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16725750/28852133-fdd0ccb0-76f4-11e7-85c1-7a1f1619aed4.png"><img src="https://user-images.githubusercontent.com/16725750/28852133-fdd0ccb0-76f4-11e7-85c1-7a1f1619aed4.png" alt="flutter_02" style="max-width: 100%;"></a></li> </ol> <p dir="auto">The problem seems to be apparent for any Icon sizes between 40.5 -&gt; 96.0, inclusively.<br> Please note, I've only tested this on a Samsung S6.</p>
<p dir="auto">Ensure Android architecture works with deep linking:</p> <p dir="auto"><a href="https://docs.google.com/document/d/1AKPWL50wzQFTSaEz2AbGZm5Fkm01uvunZH8AEoLJMRI/edit" rel="nofollow">https://docs.google.com/document/d/1AKPWL50wzQFTSaEz2AbGZm5Fkm01uvunZH8AEoLJMRI/edit</a></p>
0
<p dir="auto">Both <strong>.dropdown-menu</strong> and <strong>.navbar</strong> have same z-index:1000 so navbar overriding dropdown menus.</p> <p dir="auto">Example:<br> <a href="http://getbootstrap.com/examples/theme/" rel="nofollow">http://getbootstrap.com/examples/theme/</a><br> Just click to first navbar's dropdown menu in Navbars section.</p>
<p dir="auto">In the example at <a href="http://getbootstrap.com/examples/theme/" rel="nofollow">http://getbootstrap.com/examples/theme/</a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/73a849eaa4ec901b31e0f5b56444818ad93a4f2e33c8c22e55625a53145de11c/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353139333839322f3938393930322f31623534643035652d303931652d313165332d383335662d3566363663386330393136362e706e67"><img src="https://camo.githubusercontent.com/73a849eaa4ec901b31e0f5b56444818ad93a4f2e33c8c22e55625a53145de11c/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353139333839322f3938393930322f31623534643035652d303931652d313165332d383335662d3566363663386330393136362e706e67" alt="screen shot 2013-08-19 at 5 22 34 pm" data-canonical-src="https://f.cloud.github.com/assets/5193892/989902/1b54d05e-091e-11e3-835f-5f66c8c09166.png" style="max-width: 100%;"></a> the dropdown appears below the other menu.</p> <p dir="auto">Firefox 23.0.1</p>
1
<p dir="auto"><code class="notranslate">with-external-scoped-css</code> is not perfect.<br> In a slightly larger system, doing so will add a lot of work.<br> I think <code class="notranslate">style jsx</code> is not a good idea, it can not and other open source UI framework very good integration.</p> <p dir="auto">Have you considered using <code class="notranslate">sass</code> + <code class="notranslate">css modules</code> as the main technical point</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Is it possible to detect reliably if a next.js app is running from server or via <code class="notranslate">next export</code> in <code class="notranslate">getInitialProps</code> and hence client side?</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Currently, I am using the presence of <code class="notranslate">res</code> in <code class="notranslate">getIntialProps</code> to find out but I realized that it won't be present for client-side navigation.</p> <h2 dir="auto">Context</h2> <p dir="auto">I am working on an app and testing the scenario where my backend is down. In an exported site, I should have all the data available already but my JS code calls backend in <code class="notranslate">getInitialProps</code> and crashes.</p> <p dir="auto">In the place where I am catching this error, I can trigger a <code class="notranslate">location.reload()</code> to render the content statically and serve users without the backend being up.</p> <p dir="auto">This is one of a few use cases.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td>v4.2.3</td> </tr> <tr> <td>node</td> <td>v8.4.0</td> </tr> <tr> <td>OS</td> <td>MacOS high sierra 10.13.3</td> </tr> <tr> <td>browser</td> <td>63.0.3239.132</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behaviour</h2> <p dir="auto">When on a mobile device, touching the ToolTip should activate it, showing the configured text</p> <h2 dir="auto">Current Behaviour</h2> <p dir="auto">Chrome Device Emulator -&gt; clicking on the icon itself does not activate the ToolTip, only a small area to the right consistently activates it</p> <p dir="auto">iPhone 7 -&gt; the ToolTip occasionally fires, it's hard to get is consistently as the hit area isn't registering every touch.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">This can be reproduced by testing the demo page in device emulation or on an actual device:<br> <a href="https://material-ui.com/demos/tooltips/" rel="nofollow">https://material-ui.com/demos/tooltips/</a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/15785861/35367207-40bc3756-01a3-11e8-8e49-c4c151af0fbb.gif"><img src="https://user-images.githubusercontent.com/15785861/35367207-40bc3756-01a3-11e8-8e49-c4c151af0fbb.gif" alt="tooltip-bug" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">Start of the gif i'm clicking directly on the icon, after a couple of attempts i find the hit area below the icon</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.30</td> </tr> <tr> <td>React</td> <td>16.02</td> </tr> </tbody> </table>
<ul dir="auto"> <li>[ x ] I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">I do not use any Subheader elements in my project. Bundling the project should throw no errors.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Bundling the project folder, without Subheaders being used anywhere, throws the below error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/..../node_modules/material-ui/List/List.js:47:25: Cannot resolve dependency '../Subheader' at '/..../node_modules/material-ui/Subheader'"><pre class="notranslate"><code class="notranslate">/..../node_modules/material-ui/List/List.js:47:25: Cannot resolve dependency '../Subheader' at '/..../node_modules/material-ui/Subheader' </code></pre></div> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto"><code class="notranslate">yarn add material-ui@next</code><br> <code class="notranslate">yarn start</code> // which runs <code class="notranslate">parcel index.html</code></p> <h2 dir="auto">Context</h2> <p dir="auto">I am working on a prototype React App, where <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/latest/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/latest">@latest</a> was installed. I wanted to upgrade to the beta to start using the grid.</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 / 1.0.0-beta.32</td> </tr> <tr> <td>React</td> <td>^15.4</td> </tr> <tr> <td>browser</td> <td>Brave, Chrome, others / N/A - happens in the command line</td> </tr> <tr> <td>bundler</td> <td>Parcel</td> </tr> </tbody> </table>
0
<p dir="auto">Say you have some some incomplete data on weirdly growing plants, and want to plot it as below. You might want to explicitly exclude the <em>tree</em> data for <em>outdoor</em>, as you just didn't test it and do not want to confuse anyone. How can this be done? I would have expected <code class="notranslate">sharex=False</code> to accomplish this, but apparently it does not. I this intended and can this be done in another way? (In my real example I also have set <code class="notranslate">hue='other_attribute'</code> but it probably does not play a role in this discussion.)</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import seaborn as sns from matplotlib import pyplot as plt from pandas import DataFrame data = DataFrame( data=[ ['grass', 'indoor', 30], ['bushes', 'indoor', 80], ['tree', 'indoor', 100], ['grass', 'outdoor', 50], ['bushes', 'outdoor', 120] # this does not exist: ['tree', 'outdoor', 300], ], columns=[ 'type', 'where', 'height' ]) graph = sns.catplot(x=&quot;type&quot;, y=&quot;height&quot;, col=&quot;where&quot;, data=data, kind=&quot;bar&quot;, orient=&quot;v&quot;) plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">seaborn</span> <span class="pl-k">as</span> <span class="pl-s1">sns</span> <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">from</span> <span class="pl-s1">pandas</span> <span class="pl-k">import</span> <span class="pl-v">DataFrame</span> <span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-v">DataFrame</span>( <span class="pl-s1">data</span><span class="pl-c1">=</span>[ [<span class="pl-s">'grass'</span>, <span class="pl-s">'indoor'</span>, <span class="pl-c1">30</span>], [<span class="pl-s">'bushes'</span>, <span class="pl-s">'indoor'</span>, <span class="pl-c1">80</span>], [<span class="pl-s">'tree'</span>, <span class="pl-s">'indoor'</span>, <span class="pl-c1">100</span>], [<span class="pl-s">'grass'</span>, <span class="pl-s">'outdoor'</span>, <span class="pl-c1">50</span>], [<span class="pl-s">'bushes'</span>, <span class="pl-s">'outdoor'</span>, <span class="pl-c1">120</span>] <span class="pl-c"># this does not exist: ['tree', 'outdoor', 300],</span> ], <span class="pl-s1">columns</span><span class="pl-c1">=</span>[ <span class="pl-s">'type'</span>, <span class="pl-s">'where'</span>, <span class="pl-s">'height'</span> ]) <span class="pl-s1">graph</span> <span class="pl-c1">=</span> <span class="pl-s1">sns</span>.<span class="pl-en">catplot</span>(<span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s">"type"</span>, <span class="pl-s1">y</span><span class="pl-c1">=</span><span class="pl-s">"height"</span>, <span class="pl-s1">col</span><span class="pl-c1">=</span><span class="pl-s">"where"</span>, <span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">data</span>, <span class="pl-s1">kind</span><span class="pl-c1">=</span><span class="pl-s">"bar"</span>, <span class="pl-s1">orient</span><span class="pl-c1">=</span><span class="pl-s">"v"</span>) <span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4403130/66123784-1c800680-e5e3-11e9-9d89-c1403134c673.png"><img src="https://user-images.githubusercontent.com/4403130/66123784-1c800680-e5e3-11e9-9d89-c1403134c673.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I would have expected that I can visualize different categorical variables in a count plot using <code class="notranslate">catplot</code> and <code class="notranslate">melt</code>.<br> However, it looks like the data is converted to categorical before grouping for the columns, and so the categories are shared among all the count plots. That doesn't really make sense if the different columns correspond to different categories.<br> Am I overlooking something or is there a different way of doing this?</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd import seaborn as sns ames = pd.read_excel(&quot;http://www.amstat.org/publications/jse/v19n3/decock/AmesHousing.xls&quot;) cat_cols = ['MS Zoning', 'Street', 'Alley', 'Lot Shape', 'Land Contour', 'Utilities', 'Lot Config', 'Land Slope', 'Neighborhood', 'Condition 1', 'Condition 2', 'Bldg Type', 'House Style', 'Roof Style', 'Roof Matl', 'Exterior 1st', 'Exterior 2nd', 'Mas Vnr Type', 'Exter Qual', 'Exter Cond', 'Foundation', 'Bsmt Qual', 'Bsmt Cond', 'Bsmt Exposure', 'BsmtFin Type 1', 'BsmtFin Type 2', 'Heating', 'Heating QC', 'Central Air', 'Electrical', 'Kitchen Qual', 'Functional', 'Fireplace Qu', 'Garage Type', 'Garage Finish', 'Garage Qual', 'Garage Cond', 'Paved Drive', 'Pool QC', 'Fence', 'Misc Feature', 'Sale Type', 'Sale Condition'] ames_cat = ames[cat_cols] sns.catplot(x='value', col='variable', data=ames_cat.melt(), sharex=False, sharey=False, col_wrap=5, kind='count')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-k">import</span> <span class="pl-s1">seaborn</span> <span class="pl-k">as</span> <span class="pl-s1">sns</span> <span class="pl-s1">ames</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_excel</span>(<span class="pl-s">"http://www.amstat.org/publications/jse/v19n3/decock/AmesHousing.xls"</span>) <span class="pl-s1">cat_cols</span> <span class="pl-c1">=</span> [<span class="pl-s">'MS Zoning'</span>, <span class="pl-s">'Street'</span>, <span class="pl-s">'Alley'</span>, <span class="pl-s">'Lot Shape'</span>, <span class="pl-s">'Land Contour'</span>, <span class="pl-s">'Utilities'</span>, <span class="pl-s">'Lot Config'</span>, <span class="pl-s">'Land Slope'</span>, <span class="pl-s">'Neighborhood'</span>, <span class="pl-s">'Condition 1'</span>, <span class="pl-s">'Condition 2'</span>, <span class="pl-s">'Bldg Type'</span>, <span class="pl-s">'House Style'</span>, <span class="pl-s">'Roof Style'</span>, <span class="pl-s">'Roof Matl'</span>, <span class="pl-s">'Exterior 1st'</span>, <span class="pl-s">'Exterior 2nd'</span>, <span class="pl-s">'Mas Vnr Type'</span>, <span class="pl-s">'Exter Qual'</span>, <span class="pl-s">'Exter Cond'</span>, <span class="pl-s">'Foundation'</span>, <span class="pl-s">'Bsmt Qual'</span>, <span class="pl-s">'Bsmt Cond'</span>, <span class="pl-s">'Bsmt Exposure'</span>, <span class="pl-s">'BsmtFin Type 1'</span>, <span class="pl-s">'BsmtFin Type 2'</span>, <span class="pl-s">'Heating'</span>, <span class="pl-s">'Heating QC'</span>, <span class="pl-s">'Central Air'</span>, <span class="pl-s">'Electrical'</span>, <span class="pl-s">'Kitchen Qual'</span>, <span class="pl-s">'Functional'</span>, <span class="pl-s">'Fireplace Qu'</span>, <span class="pl-s">'Garage Type'</span>, <span class="pl-s">'Garage Finish'</span>, <span class="pl-s">'Garage Qual'</span>, <span class="pl-s">'Garage Cond'</span>, <span class="pl-s">'Paved Drive'</span>, <span class="pl-s">'Pool QC'</span>, <span class="pl-s">'Fence'</span>, <span class="pl-s">'Misc Feature'</span>, <span class="pl-s">'Sale Type'</span>, <span class="pl-s">'Sale Condition'</span>] <span class="pl-s1">ames_cat</span> <span class="pl-c1">=</span> <span class="pl-s1">ames</span>[<span class="pl-s1">cat_cols</span>] <span class="pl-s1">sns</span>.<span class="pl-en">catplot</span>(<span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s">'value'</span>, <span class="pl-s1">col</span><span class="pl-c1">=</span><span class="pl-s">'variable'</span>, <span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">ames_cat</span>.<span class="pl-en">melt</span>(), <span class="pl-s1">sharex</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">sharey</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">col_wrap</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">kind</span><span class="pl-c1">=</span><span class="pl-s">'count'</span>)</pre></div>
1
<pre class="notranslate">Current tip (13699:21130d62eeb0), linux/386, run enough times on a parallel machine: $ GOARCH=386 GOMAXPROCS=32 go test std panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x8073d94] goroutine 50 [running]: testing.func·003(0xf7756fd4, 0xf7756100) /usr/local/google/home/dvyukov/go_vanilla/src/pkg/testing/testing.go:268 +0x123 ----- stack segment boundary ----- runtime_test.TestStopTheWorldDeadlock(0x18855200, 0xe) /usr/local/google/home/dvyukov/go_vanilla/src/pkg/runtime/proc_test.go:25 +0x24 testing.tRunner(0x18855200, 0x82b3dd4, 0x0) /usr/local/google/home/dvyukov/go_vanilla/src/pkg/testing/testing.go:273 +0x71 created by testing.RunTests /usr/local/google/home/dvyukov/go_vanilla/src/pkg/testing/testing.go:349 +0x711 The culprit is: // mgc0.c static struct { uint64 full; // lock-free list of full blocks uint64 empty; // lock-free list of empty blocks ... } work; 8c does not align uint64 on 8-bytes, occasionally full/empty crosses cache-line boundary and then TEXT runtime·atomicload64(SB), 7, $0 MOVL 4(SP), BX MOVL 8(SP), AX // MOVQ (%EAX), %MM0 BYTE $0x0f; BYTE $0x6f; BYTE $0x00 // MOVQ %MM0, 0(%EBX) BYTE $0x0f; BYTE $0x7f; BYTE $0x03 // EMMS BYTE $0x0F; BYTE $0x77 RET becomes not particularly atomic. There are 2 ways to fix it: 1. Fix the compilers to properly align uint64 (I am not sure why they do not align it now). 2. Just patch the GC to manually align the vars.</pre>
<pre class="notranslate">[This may be a duplicate of <a href="https://golang.org/issue/770" rel="nofollow">issue #770</a>] package main import ( "reflect" "fmt" ) type X int func (_ X) Foo() { } func main() { v := reflect.NewValue(X(0)) fmt.Printf("%d\n", v.Type().Method(0).Type.NumIn()) fmt.Printf("%d\n", v.Method(0).Type().(*reflect.FuncType).NumIn()) v.Method(0).Call([]reflect.Value{reflect.NewValue(X(0))}) } this prints: 1 1 panic: FuncValue: wrong argument count The type of the method should return the argument count that the method is expected to be called with. 6g darwin 6d3022dfb42b+ tip</pre>
0
<p dir="auto">Anyway to make it so on a Desktop you can hover the menu rather than click?</p>
<p dir="auto">Hi all, there is one issue I have with twbs, I really wish the dropdown menu can drop on mouseover instead of on click.</p> <p dir="auto">Any help on this?</p>
1
<p dir="auto">I am trying to use seaborn in a python standard shell environment , but I always get an error when I use the basis palette function</p> <p dir="auto">sns.palplot(sns.diverging_palette(240, 10, n=9))</p> <p dir="auto">any Idea from where this could come from ???</p> <p dir="auto">Traceback (most recent call last):<br> File "C:\Users\meyringer\AppData\Local\Programs\Python\Python37-32\lib\site-packages\numpy\core\function_base.py", line 117, in linspace<br> num = operator.index(num)<br> TypeError: 'float' object cannot be interpreted as an integer</p> <p dir="auto">During handling of the above exception, another exception occurred:</p> <p dir="auto">Traceback (most recent call last):<br> File "C:/Users/meyringer/AppData/Local/Programs/Python/Python37-32/seabornpalette.py", line 3, in <br> sns.palplot(sns.diverging_palette(240, 10, n=9))<br> File "C:\Users\meyringer\AppData\Local\Programs\Python\Python37-32\lib\site-packages\seaborn\palettes.py", line 744, in diverging_palette<br> neg = palfunc((h_neg, s, l), 128 - (sep / 2), reverse=True, input="husl")<br> File "C:\Users\meyringer\AppData\Local\Programs\Python\Python37-32\lib\site-packages\seaborn\palettes.py", line 641, in light_palette<br> return blend_palette(colors, n_colors, as_cmap)<br> File "C:\Users\meyringer\AppData\Local\Programs\Python\Python37-32\lib\site-packages\seaborn\palettes.py", line 777, in blend_palette<br> pal = _ColorPalette(pal(np.linspace(0, 1, n_colors)))<br> File "&lt;<strong>array_function</strong> internals&gt;", line 6, in linspace<br> File "C:\Users\meyringer\AppData\Local\Programs\Python\Python37-32\lib\site-packages\numpy\core\function_base.py", line 121, in linspace<br> .format(type(num)))<br> TypeError: object of type &lt;class 'float'&gt; cannot be safely interpreted as an integer.</p>
<p dir="auto">When using <code class="notranslate">row_template</code> on FactorGrid when <code class="notranslate">margin_titles=True</code>, row_template will not render correctly as the earlier call to finalize_grid already creates an annotated text for the row margin (See: <a href="https://github.com/mwaskom/seaborn/blob/v0.7.1/seaborn/axisgrid.py#L731">https://github.com/mwaskom/seaborn/blob/v0.7.1/seaborn/axisgrid.py#L731</a>)</p> <p dir="auto">I think a fix will be to add a switch to map function which will ask if titles need to created. Another, option will be to keep track of the created row titles and edit their text (as they are created using ax.annotate <a href="https://github.com/mwaskom/seaborn/blob/v0.7.1/seaborn/axisgrid.py#L939">https://github.com/mwaskom/seaborn/blob/v0.7.1/seaborn/axisgrid.py#L939</a>)</p> <p dir="auto">Code for replication:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df = pd.DataFrame(np.random.choice([&quot;a&quot;, &quot;b&quot;, &quot;c&quot;], size=(10,2)), columns=[&quot;col1&quot;, &quot;col2&quot;]) df[&quot;col_value&quot;]=np.random.randint(10, size=df.shape[0]) g = (sns.FacetGrid(row=&quot;col1&quot;, col=&quot;col2&quot;, aspect=1.5, margin_titles=True, data=df) g = g.map(plt.hist, &quot;col_value&quot;, bins=range(10)) g = g.set_titles(template=&quot;&quot;, col_template=&quot;{col_name}&quot;, row_template=&quot;{row_name}&quot;) g.fig.tight_layout()"><pre class="notranslate"><code class="notranslate">df = pd.DataFrame(np.random.choice(["a", "b", "c"], size=(10,2)), columns=["col1", "col2"]) df["col_value"]=np.random.randint(10, size=df.shape[0]) g = (sns.FacetGrid(row="col1", col="col2", aspect=1.5, margin_titles=True, data=df) g = g.map(plt.hist, "col_value", bins=range(10)) g = g.set_titles(template="", col_template="{col_name}", row_template="{row_name}") g.fig.tight_layout() </code></pre></div>
0
<p dir="auto">Fiddle: <a href="http://jsfiddle.net/adobi/hMvxQ/" rel="nofollow">http://jsfiddle.net/adobi/hMvxQ/</a></p> <p dir="auto">The modal's hidden event gets executed on tooltips hidden event. Is this the correct behaviour?</p> <p dir="auto">I know I can block the tooltip's event to be propagated, but wouldn't be a nicer solution to namespance these event?</p> <p dir="auto">Thank you for your answer!</p>
<p dir="auto">The triggered show and hide event bubbles to the modal dialog when using tooltips in modal dialog. So, the show and hide of the modal dialog will also be triggered.</p> <p dir="auto">Following should work as workaround:<br> $('[rel="tooltip"','.modal').tooltip().on('show', function(e) {e.stopPropagation();}).on('hide', function(e) {e.stopPropagation();});</p> <p dir="auto">Possible fix:<br> Namespacing the triggered event to 'show.tooltip', to prevent bubbling to 'show.modal'.</p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=desmethans" rel="nofollow">Hans Desmet</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6871?redirect=false" rel="nofollow">SPR-6871</a></strong> and commented</p> <p dir="auto">When you submit a form, with databinding on a command object with indexed properties, the indexed properties of the command object are not filled in.<br> I think this bug is related to the correction that happened in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398102921" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11506" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11506/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11506">#11506</a>.<br> The characters [ and ] are not only removed from the id attrbute of the HTML elements, but also (unnessesary) from the name attribute of the HTML elements.</p> <p dir="auto">You can see it happening via next example.<br> When you type 10 and 20 in the input fields, the output to the console is: {Belgium=null, Switzerland=null}<br> while the output should have been {Belgium=10, Switzerland=20}</p> <p dir="auto">The class that acts as command object:</p> <hr> <p dir="auto">package org.example.entities;</p> <p dir="auto">import java.util.LinkedHashMap;<br> import java.util.Map;</p> <p dir="auto">public class Continent {<br> // key = name of country<br> // Integer= number of inhabitants<br> private Map&lt;String, Integer&gt; countries = new LinkedHashMap&lt;String, Integer&gt;();</p> <p dir="auto">public Continent() {<br> countries.put("Belgium", null);<br> countries.put("Switzerland", null);<br> }</p> <p dir="auto">public void setCountries(Map&lt;String, Integer&gt; countries) {<br> this.countries = countries;<br> }</p> <p dir="auto">public Map&lt;String, Integer&gt; getCountries() {<br> return countries;<br> }<br> }</p> <p dir="auto">The Controller class:</p> <hr> <p dir="auto">package org.example.web;</p> <p dir="auto">import org.example.entities.Continent;<br> import org.springframework.stereotype.Controller;<br> import org.springframework.ui.Model;<br> import org.springframework.validation.BindingResult;<br> import org.springframework.web.bind.annotation.ModelAttribute;<br> import org.springframework.web.bind.annotation.RequestMapping;<br> import org.springframework.web.bind.annotation.RequestMethod;</p> <p dir="auto"><code class="notranslate">@Controller</code><br> public class ContinentController {<br> <code class="notranslate">@RequestMapping</code>(value = "/continent.htm", method = RequestMethod.GET)<br> public String continentForm(Model model) {<br> Continent continent = new Continent();<br> model.addAttribute(continent);<br> return "continent.jsp";<br> }</p> <p dir="auto"><code class="notranslate">@RequestMapping</code>(value = "/continent.htm", method = RequestMethod.POST)<br> public String continentForm(<code class="notranslate">@ModelAttribute</code> Continent continent,<br> BindingResult bindingResult) {<br> System.out.println(continent.getCountries()); // Here you can see the bug<br> return "continent.jsp";<br> }<br> }</p> <p dir="auto">continent.jsp</p> <hr> <p dir="auto">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</p> <p dir="auto">&lt;%<code class="notranslate">@page</code> contentType="text/html" pageEncoding="UTF-8" session="false"%&gt;<br> &lt;%<code class="notranslate">@taglib</code> prefix="c" uri="<a href="http://java.sun.com/jsp/jstl/core%22%%3E" rel="nofollow">http://java.sun.com/jsp/jstl/core"%&gt;</a><br> &lt;%<code class="notranslate">@taglib</code> prefix="form" uri="<a href="http://www.springframework.org/tags/form%22%%3E" rel="nofollow">http://www.springframework.org/tags/form"%&gt;</a></p> <p dir="auto">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br> "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd%22%3E" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</a><br> &lt;html xmlns="<a href="http://www.w3.org/1999/xhtml" rel="nofollow">http://www.w3.org/1999/xhtml</a>" xml:lang="nl" lang="nl"&gt;<br> &lt;head&gt;<br> &lt;title&gt;Continent example&lt;/title&gt;<br> &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;<br> &lt;/head&gt;<br> &lt;body&gt;<br> &lt;form:form commandName="continent"&gt;<br> &lt;c:forEach items="${continent.countries}" var="entry"&gt;<br> &lt;div&gt;<br> &lt;form:label path="countries[${entry.key}]"&gt;${entry.key}&lt;/form:label&gt;<br> &lt;form:input path="countries[${entry.key}]" /&gt;<br> &lt;form:errors path="countries[${entry.key}]" /&gt;<br> &lt;/div&gt;<br> &lt;/c:forEach&gt;<br> &lt;div&gt;&lt;input type="submit" /&gt;&lt;/div&gt;<br> &lt;/form:form&gt;<br> &lt;/body&gt;<br> &lt;/html&gt;</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.1</p> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398103429" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11586" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11586/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11586">#11586</a> Indexed properties not set correctly in form tags (<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="398104153" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11702" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11702/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11702">#11702</a> form:select 3.0.1 regression bug when binding to a map (<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="398102921" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11506" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11506/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11506">#11506</a> form:checkbox tag creates invalid HTML id when bound to indexed property</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398092545" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10055" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10055/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10055">#10055</a> org.springframework.web.servlet.tags.form.TagIdGenerator doesn't remove characters [] and double-quotes</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/67b342d923c900323df169c32e27d9aa80fb8108/hovercard" href="https://github.com/spring-projects/spring-framework/commit/67b342d923c900323df169c32e27d9aa80fb8108"><tt>67b342d</tt></a></p> <p dir="auto">3 votes, 8 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=koen.serneels" rel="nofollow">Koen Serneels</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9480?redirect=false" rel="nofollow">SPR-9480</a></strong> and commented</p> <h4 dir="auto">Overview</h4> <p dir="auto">There seems yet again another issue when using the Spring 3.1 - Hibernate4(.1.3) integration.</p> <p dir="auto">This issue pops up so late since it only occurs in special circumstances: it has to do with the hibernate "smart" flushing which is not working.</p> <p dir="auto">Hibernate guarantees that every modification you make (CUD) is flushed to the database prior any other operation that can possibly be related to the outstanding queries. This is to ensure that you don't work with stale data within the same transaction.</p> <p dir="auto">For example:</p> <ol dir="auto"> <li>Save an entity</li> <li>Update the property of an entity</li> <li>Query the entity using the value of the property changed in the previous step in the where clause</li> </ol> <p dir="auto">Hibernate will make sure that the changes by step2 (and possibly also the insert of step1 - if not done already) are flushed before step3 is executed (smart flush). If this didn't happen we would never be able to retrieve the entity in step3.</p> <p dir="auto">The problem is that this smart flushing is not happening any more, since Hibernate does not detect that it is in a transaction.</p> <p dir="auto">Taken from <code class="notranslate">SessionImpl</code> L1178:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="protected boolean autoFlushIfRequired(Set querySpaces) throws HibernateException { errorIfClosed(); if ( ! isTransactionInProgress() ) { // do not auto-flush while outside a transaction return false; } AutoFlushEvent event = new AutoFlushEvent( querySpaces, this ); for ( AutoFlushEventListener listener : listeners( EventType.AUTO_FLUSH ) ) { listener.onAutoFlush( event ); } return event.isFlushRequired(); }"><pre class="notranslate"><code class="notranslate">protected boolean autoFlushIfRequired(Set querySpaces) throws HibernateException { errorIfClosed(); if ( ! isTransactionInProgress() ) { // do not auto-flush while outside a transaction return false; } AutoFlushEvent event = new AutoFlushEvent( querySpaces, this ); for ( AutoFlushEventListener listener : listeners( EventType.AUTO_FLUSH ) ) { listener.onAutoFlush( event ); } return event.isFlushRequired(); } </code></pre></div> <p dir="auto">What happens is before step3 is excecuted 'autoFlushIfRequired' is called (good). However isTransactionInProgress() will returns false. If you drill down in the code, you will see that it will call: <code class="notranslate">transactionCoordinator.isTransactionInProgress()</code> which will then call <code class="notranslate">getTransaction().isActive()</code>, which delegates to <code class="notranslate">JtaTransaction</code> L237:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" @Override public boolean isActive() throws HibernateException { if ( getLocalStatus() != LocalStatus.ACTIVE ) { return false; } final int status; try { status = userTransaction.getStatus(); } catch ( SystemException se ) { throw new TransactionException( &quot;Could not determine transaction status: &quot;, se ); } return JtaStatusHelper.isActive( status ); }"><pre class="notranslate"><code class="notranslate"> @Override public boolean isActive() throws HibernateException { if ( getLocalStatus() != LocalStatus.ACTIVE ) { return false; } final int status; try { status = userTransaction.getStatus(); } catch ( SystemException se ) { throw new TransactionException( "Could not determine transaction status: ", se ); } return JtaStatusHelper.isActive( status ); } </code></pre></div> <p dir="auto">The LocalStatus will be "NOT_ACTIVE" and the userTransaction is null. Why? Because no one called "begin" on the JtaTransaction.</p> <p dir="auto">In case of the HibernateTransactionManager it will call begin() once a transaction is started (in that case it will be JdbcTransaction rather then JtaTransaction).</p> <p dir="auto">So while there is a transaction started and everything is working nicely there is still a part of Hibernate which is unaware that a transaction is indeed active, which results in strange behavior like illustrated here. Note that everything else is working OK, the session will get flushed before transaction completion and everything will be in the database.</p> <p dir="auto">However, within the transactions we now have a stale data problem. AFAIK this is a bug in the integration, since there are no more secret properties we can use to fix this one on hibernate level.</p> <hr> <h4 dir="auto">Examples</h4> <p dir="auto">I supplied again 2 sample applications, one with hibernate3 and the same with hibernate4 to illustrate the issue.</p> <p dir="auto">You can deploy the apps under context root hibernate3/hibernate4 and then point the browser to <code class="notranslate">http://&lt;host&gt;:&lt;port&gt;/hibernate3/Persist</code> or <code class="notranslate">http://&lt;host&gt;:&lt;port&gt;/hibernate4/Persist</code>.</p> <p dir="auto">The Servlet looks up a bean from the application context. It will then call two transactional methods on the bean.</p> <h6 dir="auto">Method 1</h6> <ul dir="auto"> <li>Start transaction 1</li> <li>Save an entity of type 'TestEntity'</li> <li>Change the property 'value' to literal 'SomeValue' on the saved entity</li> <li>Perform a query which selects all entities of type 'TestEntity' where their 'value' property matches 'SomeValue'</li> <li>return result</li> <li>display result</li> <li>End transaction 1</li> </ul> <h6 dir="auto">Method 2</h6> <ul dir="auto"> <li>Start transaction 2</li> <li>Perform a query which selects all entities of type 'TestEntity' where their 'value' property matches 'SomeValue'</li> <li>return result</li> <li>display result</li> <li>End transaction 2</li> </ul> <p dir="auto">With hibernate3 you will see this output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Saving... Done. Result from read in TX: 1 Value:SomeValue Read from table in separate TX: 1 Value:SomeValue "><pre class="notranslate"><code class="notranslate">Saving... Done. Result from read in TX: 1 Value:SomeValue Read from table in separate TX: 1 Value:SomeValue </code></pre></div> <p dir="auto">Which means that both in the same transaction and in the new transaction the data was found in database after saving/updating.</p> <p dir="auto">In hibernate4 however:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Saving... Done. Result from read in TX: Read from table in separate TX: 1 Value:SomeValue "><pre class="notranslate"><code class="notranslate">Saving... Done. Result from read in TX: Read from table in separate TX: 1 Value:SomeValue </code></pre></div> <p dir="auto">You see that in the same transaction the query did not return any results in the second output line. This is because the save of the entity and/or the update of the property where not flushed to database prior executing the query.</p> <p dir="auto">Note: in the output we show two properties of the 'TestEntity'.</p> <ul dir="auto"> <li>The value '1' in the output is the value of the 'id' property which is the PK of the entity and auto-increment.</li> <li>'SomeValue' is the literal value we assigned to the 'value' property of the entity after we saved the entity.</li> </ul> <hr> <p dir="auto"><strong>Affects:</strong> 3.1.1</p> <p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?126363-Session-not-flushed-with-Hibernate-4-1-3-JTA-and-Spring-transaction-management-integ&amp;highlight=koen+serneels" rel="nofollow">http://forum.springsource.org/showthread.php?126363-Session-not-flushed-with-Hibernate-4-1-3-JTA-and-Spring-transaction-management-integ&amp;highlight=koen+serneels</a></p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/19824/hibernate3.zip" rel="nofollow">hibernate3.zip</a> (<em>7.31 kB</em>)</li> <li><a href="https://jira.spring.io/secure/attachment/19823/hibernate4.zip" rel="nofollow">hibernate4.zip</a> (<em>7.36 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="398150499" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14040" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14040/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14040">#14040</a> Session not flushed with Hibernate 4.1.3, JTA and Spring transaction management integration (<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="398188500" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/18421" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/18421/hovercard" href="https://github.com/spring-projects/spring-framework/issues/18421">#18421</a> Hibernate 4 Autoflush does not work with Spring OpenSessionInViewInterceptor</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/efabc6bf18f791b050ed2e082040aa4ce3bb1aa6/hovercard" href="https://github.com/spring-projects/spring-framework/commit/efabc6bf18f791b050ed2e082040aa4ce3bb1aa6"><tt>efabc6b</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/dda3197c77a0b66576ebccd629c5076c0403eaf5/hovercard" href="https://github.com/spring-projects/spring-framework/commit/dda3197c77a0b66576ebccd629c5076c0403eaf5"><tt>dda3197</tt></a></p> <p dir="auto">5 votes, 8 watchers</p>
0
<p dir="auto">Hi all,</p> <p dir="auto">I have a collection of TypeScript files that, on Windows, compile under tsc when run under node, but throw bogus errors (I can clearly see the source contradicts them) when compiled via the Visual Studio TypeScript 1.7.6.0 extension which uses tsc.exe. I implemented a very temporary workaround by creating my own <code class="notranslate">tsc.exe</code> which simply invokes the compiler via node and overrwrote the default <code class="notranslate">tsc.exe</code>, found in <code class="notranslate">c:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\</code> with my own.</p> <p dir="auto">It would be great if the Visual Studio extension allowed the user the option to specify the compiler implementation to use, Node or tsc.exe.</p>
<p dir="auto">Consider this implmentation of a ORM-like Model class:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" class Model { public static tableName: string; public static findById(id: number): this { // error: a this type is only available in a non-static member of a class or interface const rows = db.query(`SELECT * FROM ${this.tableName} WHERE id = ?`, [id]); const instance = new this(); for (const column of rows[0]) { instance[column] = rows[0][column]; } return instance; } } class User extends Model { public static tableName = 'users'; public username: string; } const user = User.findById(1); // user instanceof User"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Model</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-c1">tableName</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-en">findById</span><span class="pl-kos">(</span><span class="pl-s1">id</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span>: this <span class="pl-kos">{</span> <span class="pl-c">// error: a this type is only available in a non-static member of a class or interface </span> <span class="pl-k">const</span> <span class="pl-s1">rows</span> <span class="pl-c1">=</span> <span class="pl-s1">db</span><span class="pl-kos">.</span><span class="pl-en">query</span><span class="pl-kos">(</span><span class="pl-s">`SELECT * FROM <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">tableName</span><span class="pl-kos">}</span></span> WHERE id = ?`</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s1">id</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">instance</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">this</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">column</span> <span class="pl-k">of</span> <span class="pl-s1">rows</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">instance</span><span class="pl-kos">[</span><span class="pl-s1">column</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">rows</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-s1">column</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">instance</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">User</span> <span class="pl-k">extends</span> <span class="pl-smi">Model</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-c1">tableName</span> <span class="pl-c1">=</span> <span class="pl-s">'users'</span><span class="pl-kos">;</span> <span class="pl-k">public</span> <span class="pl-c1">username</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">const</span> <span class="pl-s1">user</span> <span class="pl-c1">=</span> <span class="pl-smi">User</span><span class="pl-kos">.</span><span class="pl-en">findById</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// user instanceof User</span></pre></div> <p dir="auto">Currently, this is not possible, because TypeScript does not allow <code class="notranslate">this</code> in static members. There is no reason for this limitation: <code class="notranslate">this</code> inside a static method is simply the class in JavaScript (aka <code class="notranslate">typeof Model</code> or <code class="notranslate">typeof User</code>, depending on what class this is called on).</p>
0
<p dir="auto">To reproduce:</p> <p dir="auto"><a href="https://github.com/PlasmaSheep/flask-bug">https://github.com/PlasmaSheep/flask-bug</a></p> <p dir="auto">Clone repo and install flask (python2)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export FLASK_APP=/path/to/repo/flask-bug/autoapp.py flask run"><pre class="notranslate"><code class="notranslate">export FLASK_APP=/path/to/repo/flask-bug/autoapp.py flask run </code></pre></div> <p dir="auto">Notice the output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[$]&gt;&gt;&gt; flask run Using config: development Debug is: True * Serving Flask app &quot;autoapp&quot; * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)"><pre class="notranslate"><code class="notranslate">[$]&gt;&gt;&gt; flask run Using config: development Debug is: True * Serving Flask app "autoapp" * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) </code></pre></div> <p dir="auto">So debug is enabled in the config, but the debugger is not actually active.</p> <p dir="auto">This does work if you set the <code class="notranslate">FLASK_DEBUG</code> env variable:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[$]&gt;&gt;&gt; flask run * Serving Flask app &quot;autoapp&quot; * Forcing debug mode on Using config: development Debug is: True * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) * Restarting with stat Using config: development Debug is: True * Debugger is active! * Debugger pin code: 155-859-497"><pre class="notranslate"><code class="notranslate">[$]&gt;&gt;&gt; flask run * Serving Flask app "autoapp" * Forcing debug mode on Using config: development Debug is: True * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) * Restarting with stat Using config: development Debug is: True * Debugger is active! * Debugger pin code: 155-859-497 </code></pre></div> <p dir="auto">However I think that the debug parameter should be specified in only one place, and that place should be the application config file so that you don't have to worry about setting environment variables for things you already specified in the config.</p>
<p dir="auto">I submitted a patch for this but learned that it was incomplete with further testing. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="120596757" data-permission-text="Title is private" data-url="https://github.com/pallets/flask/issues/1640" data-hovercard-type="pull_request" data-hovercard-url="/pallets/flask/pull/1640/hovercard" href="https://github.com/pallets/flask/pull/1640">#1640</a></p> <p dir="auto">Basically, it would be nice to allow <code class="notranslate">DEBUG</code> on the application to control the activation of the debugger and reloader when running the CLI like <code class="notranslate">app.run</code> does.</p>
1
<p dir="auto">Our Weather Zipline example is now broken. Aparently the API <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/AdventureBear/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/AdventureBear">@AdventureBear</a> used on her Zipline no longer works. <a href="https://www.evernote.com/l/AlwSsfX2kblJYoOSp9uAq-BKFosOSCg8-aAB/image.png" rel="nofollow">https://www.evernote.com/l/AlwSsfX2kblJYoOSp9uAq-BKFosOSCg8-aAB/image.png</a></p> <p dir="auto">We need to find an API that works and doesn't require adding an API key, or we need to make an API endpoint on Free Code Camp that campers can use (we don't want people exposing API keys on CodePen).</p> <p dir="auto">Thanks to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/martoncsikos/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/martoncsikos">@martoncsikos</a> for spotting this issue.</p>
<p dir="auto">Less of a bug in that the student can just erase the commented code and pass the challenge. That said, if you comment out the second if statement, you will be met with the "You should have only one if statement" even though the code effectively has only one if statement.</p> <p dir="auto">Maybe the pattern matching doesn't take into account commented code.</p> <p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/comparisons-with-the-logical-or-operator#?solution=%0Afunction%20testLogicalOr(val)%20%7B%0A%20%20%2F%2F%20Only%20change%20code%20below%20this%20line%0A%0A%20%20if%20(val%20%3E%2020%20%7C%7C%20val%20%3C%2010)%20%7B%0A%20%20%20%20return%20%22Outside%22%3B%0A%20%20%7D%0A%2F*%0A%20%20if%20(val)%20%7B%0A%20%20%20%20return%20%22Outside%22%3B%0A%20%20%7D%0A*%2F%0A%20%20%2F%2F%20Only%20change%20code%20above%20this%20line%0A%20%20return%20%22Inside%22%3B%0A%7D%0A%0A%2F%2F%20Change%20this%20value%20to%20test%0AtestLogicalOr(15)%3B%0A" rel="nofollow">Comparisons with the Logical Or Operator</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/55.0.2883.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=" function testLogicalOr(val) { // Only change code below this line if (val &gt; 20 || val &lt; 10) { return &quot;Outside&quot;; } /* if (val) { return &quot;Outside&quot;; } */ // Only change code above this line return &quot;Inside&quot;; } // Change this value to test testLogicalOr(15); "><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">testLogicalOr</span><span class="pl-kos">(</span><span class="pl-s1">val</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">if</span> <span class="pl-kos">(</span><span class="pl-s1">val</span> <span class="pl-c1">&gt;</span> <span class="pl-c1">20</span> <span class="pl-c1">||</span> <span class="pl-s1">val</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">10</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"Outside"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c">/*</span> <span class="pl-c"> if (val) {</span> <span class="pl-c"> return "Outside";</span> <span class="pl-c"> }</span> <span class="pl-c">*/</span> <span class="pl-c">// Only change code above this line</span> <span class="pl-k">return</span> <span class="pl-s">"Inside"</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c">// Change this value to test</span> <span class="pl-en">testLogicalOr</span><span class="pl-kos">(</span><span class="pl-c1">15</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
0
<p dir="auto">Browsersync not launching in beta.11</p> <p dir="auto">package.json:<br> ...<br> "scripts": {<br> "postinstall": "npm run typings install",<br> "tsc": "tsc",<br> "tsc:w": "tsc -w",<br> "lite": "lite-server",<br> "start": "concurrent "npm run tsc:w" "npm run lite" ",<br> "typings": "typings"<br> },</p> <p dir="auto">"dependencies": {<br> "angular2": "^2.0.0-beta.11",<br> "es6-promise": "^3.1.2",<br> "es6-shim": "^0.35.0",<br> "reflect-metadata": "^0.1.3",<br> "rxjs": "^5.0.0-beta.2",<br> "systemjs": "^0.19.23",<br> "zone.js": "^0.6.2"<br> },<br> .....</p> <p dir="auto">Environment:<br> MAC/Chrome</p> <p dir="auto">"Issue":<br> When executing npm start, browsersyc does not appear to be starting. Changes are detected but not refreshed in browser.</p> <p dir="auto">"Resolution:<br> Changing entry in package.json from "angular2": "^2.0.0-beta.11" to ("angular2": "^2.0.0-beta.9" or "angular2": "^2.0.0-beta.8") browsersyc works as expected.</p>
<p dir="auto">Directives like {If, Foreach, For ... etc.) are often used in many templates. To simplify the process and in the spirit of writing less code and for the sake of maintainability, It might be a good idea to have a <code class="notranslate">pre_loader</code> API where the project can pass in the common directives in and on startup all templates are pre-injected with the common directives.</p> <p dir="auto"><strong>Example:</strong><br> import {pre_loader, If, For, Foreach} from 'angular2/angular2';<br> pre_loader('directives', [IF, For, Foreach]);</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/template/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/template">@template</a>({<br> url: 'templates/main.html',<br> directives: [MyOwnDirective]<br> })</p> <p dir="auto">With the above approach, the directives passed into the template would be IF, For, Foreach &amp; MyOwnDirective.<br> The catch is to have <code class="notranslate">pre_loader('directives', [IF, For, Foreach]);</code> executed before anything else.</p> <p dir="auto">The <code class="notranslate">pre_loader()</code> function can also be used for configs other than directives.</p>
0
<p dir="auto">It is dangerous to assume a number that has a distance unit omitted from it, should be pixel-based.</p> <p dir="auto">Working within the <a href="http://www.w3.org/TR/SVG/coords.html#SVGInitialUserCoordinateSystem" rel="nofollow">SVG user space</a>, it is sometimes required that <a href="http://www.w3.org/TR/SVG/coords.html#LengthsInSVG" rel="nofollow">number values are left unitless</a>, so that they're proportionate to the user-defined matrix.</p> <p dir="auto">The is also the additional overhead in maintaining a property (that accepts a unitless number value) <a href="https://github.com/facebook/react/blob/a8fc3b940dbe20c0c7decd19b028215b236c50a6/src/browser/ui/dom/CSSProperty.js#L24">whitelist</a>, instead of just allowing a pass-through.</p>
<p dir="auto">It's weird that <code class="notranslate">style={{margin: '42'}}</code> gets turned into <code class="notranslate">margin: 42px;</code>. I think we should only add <code class="notranslate">px</code> if the value is an actual number.</p>
1
<h2 dir="auto">System:</h2> <ul dir="auto"> <li>OS: macOS Mojave 10.14.6</li> <li>CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz</li> <li>Memory: 169.37 MB / 16.00 GB</li> <li>Shell: 3.2.57 - /bin/bash</li> </ul> <h2 dir="auto">Binaries:</h2> <ul dir="auto"> <li>Node: 11.14.0 - ~/.nvm/versions/node/v11.14.0/bin/node</li> <li>Yarn: 1.17.3 - /usr/local/bin/yarn</li> <li>npm: 6.7.0 - ~/.nvm/versions/node/v11.14.0/bin/npm</li> </ul> <h2 dir="auto">npmPackages:</h2> <ul dir="auto"> <li>styled-components: ^4.4.0 =&gt; 4.4.0</li> <li>jest: ^24.9.0</li> <li>react-test-renderer: ^16.10.1</li> <li>ts-jest: ^24.1.0</li> <li>typescript: 3.6.3</li> </ul> <h2 dir="auto">Reproduction</h2> <p dir="auto">Run <code class="notranslate">yarn test</code> on my example repo and look at the output from Demo.test.tsx.<br> <a href="https://github.com/Swazimodo/demo-broken-styled-components">https://github.com/Swazimodo/demo-broken-styled-components</a></p> <h2 dir="auto">Steps to reproduce</h2> <ul dir="auto"> <li>set a data tag for UI testing on a styled-component div</li> <li>render the component with react-test-renderer</li> <li>take the output and find all by props</li> <li>check the length of the selection</li> </ul> <h2 dir="auto">Expected Behavior</h2> <ul dir="auto"> <li>get one result for each rendered item</li> </ul> <h2 dir="auto">Actual Behavior</h2> <ul dir="auto"> <li>get 3x the results</li> </ul> <h2 dir="auto">notes</h2> <ul dir="auto"> <li>This works for regular react nodes but seems to blow up when you use styled-components</li> <li>I have created a snapshot with the rendered result to look at it and I do not see any duplicates <g-emoji class="g-emoji" alias="man_shrugging" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f937-2642.png">🤷‍♂</g-emoji></li> </ul>
<p dir="auto">Describe what you were doing when the bug occurred:</p> <ol dir="auto"> <li>Collapsed one component in the React devtools (tab 'components')</li> <li>This error message is shown</li> <li></li> </ol> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.11.0-39713716aa</p> <p dir="auto">Call stack: at store_Store.getIndexOfElementID (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22245:24)<br> at getCurrentValue (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29244:29)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25898:23<br> at Yh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13305:36)<br> at Zh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13343:53)<br> at Object.useState (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13795:12)<br> at exports.useState (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:5320:20)<br> at useSubscription (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25871:54)<br> at SelectedTreeHighlight_SelectedTreeHighlight (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29268:16)<br> at Rh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13245:7)</p> <p dir="auto">Component stack: at SelectedTreeHighlight_SelectedTreeHighlight (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29213:34)<br> at div<br> at InnerElementType (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29953:3)<br> at div<br> at List (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23588:30)<br> at div<br> at AutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:3111:5)<br> at div<br> at div<br> at Tree_Tree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29531:47)<br> at div<br> at div<br> at OwnersListContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28680:3)<br> at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29121:3)<br> at Components_Components (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34645:52)<br> at ErrorBoundary_ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30035:5)<br> at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30157:5)<br> at div<br> at div<br> at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34264:3)<br> at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25356:3)<br> at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25963:3)<br> at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30300:3)<br> at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37639:3)</p>
0
<ul dir="auto"> <li>Electron version: 1.4</li> <li>Operating system: MacOS 10.12</li> </ul> <h3 dir="auto">Expected behavior</h3> <p dir="auto">The output image area should be the same as the area of the rectangle passed into the <code class="notranslate">capturePage</code> method instead of the squeeze the currently visible area of WebContent into the rectangle size.</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">The rectangle object is the output image size instead of the intended capture area.</p> <p dir="auto">Read more detailed info. and screenshots at <a href="http://stackoverflow.com/questions/42036126/how-to-capture-entire-webcontent-inside-currentwindow" rel="nofollow">http://stackoverflow.com/questions/42036126/how-to-capture-entire-webcontent-inside-currentwindow</a></p> <h3 dir="auto">How to reproduce</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" const remote = require('electron').remote; const webContents = remote.getCurrentWebContents(); webContents.capturePage({ x: 0, y: 0, width: 1000, height: 2000 }, (img) =&gt; { remote.require('fs') .writeFile(TEMP_URL, img.toPng()); });"><pre class="notranslate"><code class="notranslate"> const remote = require('electron').remote; const webContents = remote.getCurrentWebContents(); webContents.capturePage({ x: 0, y: 0, width: 1000, height: 2000 }, (img) =&gt; { remote.require('fs') .writeFile(TEMP_URL, img.toPng()); }); </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3349406/22615515/da19d088-ead0-11e6-864d-9014ccda3ae9.png"><img src="https://cloud.githubusercontent.com/assets/3349406/22615515/da19d088-ead0-11e6-864d-9014ccda3ae9.png" alt="1" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3349406/22615529/1f91c738-ead1-11e6-9861-0ee312d3e32e.png"><img src="https://cloud.githubusercontent.com/assets/3349406/22615529/1f91c738-ead1-11e6-9861-0ee312d3e32e.png" alt="2" style="max-width: 100%;"></a></p>
<ul dir="auto"> <li>Electron version: 1.4.13</li> <li>Operating system: MacOS 10.12.2 running on MacBook Pro (Retina, 13-inch, Early 2015)</li> </ul> <h3 dir="auto">Expected behavior</h3> <p dir="auto">webview.capturePage() without specifying a dimension should return an image with the full viewable area on a Retina display. The dimensions of the resulting image should be either the actual pixels of the viewable area or perhaps the actual pixels * the device scale factor.</p> <p dir="auto">Specifying a dimension should return the viewable area of that dimension with the resulting image being sized correctly (and consistently with the use case of no rect specified).</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">Calling webview.capturePage() without specifying a dimension returns in image that is the pixel size of the viewable area * the scale factor the area covered by the viewable area divided by the scale factor.</p> <p dir="auto">For example, on a webview that is 524 pixels wide, the resulting image of capturePage() is 1048 pixels wide, but only contains the image data from the first 262 pixels. That image is then upsized by the scale factor twice to get to the 1048 width. Not only does this not capture the full viewable page, it also introduces significant scaling artifacts.</p> <p dir="auto">Similar results occur if a rect is specified to capturePage.</p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">On a Retina display, create a page with a webview that loads some web site:<br> <code class="notranslate">&lt;webview id="webview" src="http://www.msn.com/" &gt;&lt;/webview&gt;</code></p> <p dir="auto">Capture the page:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// used to get the viewable dimensions of the webview function getWebviewMeta(cb) { var code = &quot;var r = {}; \ r.totalHeight = document.body.offsetHeight; \ r.pageHeight = window.innerHeight; \ r.pageWidth = window.innerWidth; \ r;&quot;; webview.executeJavaScript(code, false, function(r) { let webviewMeta = {}; webviewMeta.captureHeight = r.pageHeight; webviewMeta.captureWidth = r.pageWidth; cb(webviewMeta); }); } getWebviewMeta(function(webviewMeta) { let captureRect = { x: 0, y: 0, width: webviewMeta.captureWidth, height: webviewMeta.captureHeight }; webview.capturePage((img) =&gt; { console.log(&quot;image size: &quot;, img.getSize()); let jpgFile = img.toJPEG(90); // save file as testDefault.jpg, I used jetpack.writeAsync }); webview.capturePage(captureRect, (img) =&gt; { console.log(&quot;image size: &quot;, img.getSize()); let jpgFile = img.toJPEG(90); // save file as testSetViewSize.jpg, I used jetpack.writeAsync }); captureRect.width = +captureRect.width * electron.screen.getPrimaryDisplay().scaleFactor; captureRect.height = +captureRect.height * electron.screen.getPrimaryDisplay().scaleFactor; webview.capturePage(captureRect, (img) =&gt; { console.log(&quot;image size: &quot;, img.getSize()); let jpgFile = img.toJPEG(90); // save file as testScaled.jpg, I used jetpack.writeAsync }); });"><pre class="notranslate"><code class="notranslate">// used to get the viewable dimensions of the webview function getWebviewMeta(cb) { var code = "var r = {}; \ r.totalHeight = document.body.offsetHeight; \ r.pageHeight = window.innerHeight; \ r.pageWidth = window.innerWidth; \ r;"; webview.executeJavaScript(code, false, function(r) { let webviewMeta = {}; webviewMeta.captureHeight = r.pageHeight; webviewMeta.captureWidth = r.pageWidth; cb(webviewMeta); }); } getWebviewMeta(function(webviewMeta) { let captureRect = { x: 0, y: 0, width: webviewMeta.captureWidth, height: webviewMeta.captureHeight }; webview.capturePage((img) =&gt; { console.log("image size: ", img.getSize()); let jpgFile = img.toJPEG(90); // save file as testDefault.jpg, I used jetpack.writeAsync }); webview.capturePage(captureRect, (img) =&gt; { console.log("image size: ", img.getSize()); let jpgFile = img.toJPEG(90); // save file as testSetViewSize.jpg, I used jetpack.writeAsync }); captureRect.width = +captureRect.width * electron.screen.getPrimaryDisplay().scaleFactor; captureRect.height = +captureRect.height * electron.screen.getPrimaryDisplay().scaleFactor; webview.capturePage(captureRect, (img) =&gt; { console.log("image size: ", img.getSize()); let jpgFile = img.toJPEG(90); // save file as testScaled.jpg, I used jetpack.writeAsync }); }); </code></pre></div> <p dir="auto">The first two results, testDefault.jpg and testSetViewSize.jpg will be identical. They will be captureRect * scale factor in size but will only contain captureRect / scale factor from the webview.</p> <p dir="auto">The third result, testScaled.jpg, will contain the captureRect data from the webview but will be captureRect * scale factor * scale factor in size.</p> <p dir="auto">All images have upscaling artifacts in them.</p> <h3 dir="auto">Note</h3> <p dir="auto">On non-retina displays (where the scale factor is 1), capturePage works as expected.</p> <p dir="auto">Also, using webview.capturePage or webview.getWebContents().capturePage makes no difference. It also does not matter if the code is executed in the main or renderer process. I wouldn't expect there to be a difference in either, but I did test both to make sure.</p> <p dir="auto">I have a discussion started about this but decided to enter an issue here because I believe there is a bug in how the scale factor is used. <a href="https://discuss.atom.io/t/webview-capturepage-doesnt-capture-full-page-on-retina-display/37560" rel="nofollow">https://discuss.atom.io/t/webview-capturepage-doesnt-capture-full-page-on-retina-display/37560</a></p>
1
<p dir="auto">i try run my project , and i getting this error after i upgrade to deno v.1.0.4<br> in deno version 1.0.2 this works.<br> I'm really stuck.</p> <p dir="auto"><strong>Error :</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'main' panicked at 'already borrowed: BorrowMutError', /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libcore/cell.rs:878:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace fatal runtime error: failed to initiate panic, error 5 [1] 4387 abort deno run -A -c tsconfig.json app.ts"><pre class="notranslate"><code class="notranslate">thread 'main' panicked at 'already borrowed: BorrowMutError', /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libcore/cell.rs:878:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace fatal runtime error: failed to initiate panic, error 5 [1] 4387 abort deno run -A -c tsconfig.json app.ts </code></pre></div> <p dir="auto"><strong>i run :</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno run -A -c tsconfig.json app.ts"><pre class="notranslate"><code class="notranslate">deno run -A -c tsconfig.json app.ts </code></pre></div> <p dir="auto"><strong>in this my configuration file :</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;compilerOptions&quot;: { &quot;experimentalDecorators&quot;: true, &quot;emitDecoratorMetadata&quot;: true } }"><pre class="notranslate"><code class="notranslate">{ "compilerOptions": { "experimentalDecorators": true, "emitDecoratorMetadata": true } } </code></pre></div>
<p dir="auto">Received this error. For some additional info, I am only using the <code class="notranslate">std/path</code> module and some function from the <code class="notranslate">Deno</code> global.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'main' panicked at 'already borrowed: BorrowMutError', /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libcore/cell.rs:878:9 stack backtrace: 0: backtrace::backtrace::libunwind::trace at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/libunwind.rs:86 1: backtrace::backtrace::trace_unsynchronized at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/mod.rs:66 2: std::sys_common::backtrace::_print_fmt at src/libstd/sys_common/backtrace.rs:78 3: &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt at src/libstd/sys_common/backtrace.rs:59 4: core::fmt::write at src/libcore/fmt/mod.rs:1063 5: std::io::Write::write_fmt at src/libstd/io/mod.rs:1426 6: std::sys_common::backtrace::_print at src/libstd/sys_common/backtrace.rs:62 7: std::sys_common::backtrace::print at src/libstd/sys_common/backtrace.rs:49 8: std::panicking::default_hook::{{closure}} at src/libstd/panicking.rs:204 9: std::panicking::default_hook at src/libstd/panicking.rs:224 10: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:470 11: rust_begin_unwind at src/libstd/panicking.rs:378 12: core::panicking::panic_fmt at src/libcore/panicking.rs:85 13: core::option::expect_none_failed at src/libcore/option.rs:1211 14: deno_core::bindings::send 15: &lt;extern &quot;C&quot; fn(A0) .&gt; R as rusty_v8::support::CFnFrom&lt;F&gt;&gt;::mapping::c_fn 16: _ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE 17: _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE 18: _ZN2v88internalL26Builtin_Impl_HandleApiCallENS0_16BuiltinArgumentsEPNS0_7IsolateE 19: Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. fatal runtime error: failed to initiate panic, error 5 Aborted"><pre class="notranslate"><code class="notranslate">thread 'main' panicked at 'already borrowed: BorrowMutError', /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libcore/cell.rs:878:9 stack backtrace: 0: backtrace::backtrace::libunwind::trace at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/libunwind.rs:86 1: backtrace::backtrace::trace_unsynchronized at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/mod.rs:66 2: std::sys_common::backtrace::_print_fmt at src/libstd/sys_common/backtrace.rs:78 3: &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt at src/libstd/sys_common/backtrace.rs:59 4: core::fmt::write at src/libcore/fmt/mod.rs:1063 5: std::io::Write::write_fmt at src/libstd/io/mod.rs:1426 6: std::sys_common::backtrace::_print at src/libstd/sys_common/backtrace.rs:62 7: std::sys_common::backtrace::print at src/libstd/sys_common/backtrace.rs:49 8: std::panicking::default_hook::{{closure}} at src/libstd/panicking.rs:204 9: std::panicking::default_hook at src/libstd/panicking.rs:224 10: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:470 11: rust_begin_unwind at src/libstd/panicking.rs:378 12: core::panicking::panic_fmt at src/libcore/panicking.rs:85 13: core::option::expect_none_failed at src/libcore/option.rs:1211 14: deno_core::bindings::send 15: &lt;extern "C" fn(A0) .&gt; R as rusty_v8::support::CFnFrom&lt;F&gt;&gt;::mapping::c_fn 16: _ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE 17: _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE 18: _ZN2v88internalL26Builtin_Impl_HandleApiCallENS0_16BuiltinArgumentsEPNS0_7IsolateE 19: Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. fatal runtime error: failed to initiate panic, error 5 Aborted </code></pre></div>
1
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-manipulate-arrays-with-pop" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-manipulate-arrays-with-pop</a> has an issue.</p> <p dir="auto">The directions (including the comments) for this challenge are confusing. It does not mention that the <code class="notranslate">var removed</code> should be changed in any way.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/8263430/9311573/0a3935f8-44e5-11e5-9c1e-71e1fbeb1a57.png"><img src="https://cloud.githubusercontent.com/assets/8263430/9311573/0a3935f8-44e5-11e5-9c1e-71e1fbeb1a57.png" alt="image" style="max-width: 100%;"></a><br> The end of this should probably read 'removed should contain the last value' or something of the sort.</p>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-manipulate-arrays-with-pop" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-manipulate-arrays-with-pop</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">The comments in the code instruct to only change code below line 9. This is misleading, as the solution requires changing</p> <p dir="auto">var removed = myArray</p> <p dir="auto">to</p> <p dir="auto">var removed = myArray.pop()</p>
1
<p dir="auto">I know there is an externalHelpers option, but I don't want to add things to my global environment. I want my code to simply import helpers as needed, just like with runtime, but without runtime's other feature of importing things like Map and Set from core-js.</p> <p dir="auto">As far as I can tell this isn't possible?</p>
<p dir="auto">I'm currently using <strong>babelify</strong> to transform my source code + global shimming <strong>babel-core/browser-polyfill.js</strong> through a vendor file.</p> <p dir="auto">I noticed redefinitions of _createClass [et al] and the docs mentioned to use <code class="notranslate">{ optional: 'runtime' }</code>, but this has the unfortunate side effect of also including <strong>regenerator/core-js</strong>, extending the dev build time.</p> <p dir="auto">It would be nice if I can define <code class="notranslate">{ optional: 'runtime.helpers' }</code> and have it include only the helpers.</p>
1
<p dir="auto">Add keyword argument to HTML parser to take an integer / list for the rows to interpret as header rows. If more than one, interpret as hierarchical columns / MultiIndex.</p> <p dir="auto">Presumably this would also allow you to round-trip Data Frame with hierarchical columns.</p> <p dir="auto">I don't think this already exists.</p> <p dir="auto">related <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17655872" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/4468" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/4468/hovercard" href="https://github.com/pandas-dev/pandas/issues/4468">#4468</a><br> related <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="18575759" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/4679" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/4679/hovercard" href="https://github.com/pandas-dev/pandas/issues/4679">#4679</a><br> related <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="18532079" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/4673" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/4673/hovercard" href="https://github.com/pandas-dev/pandas/pull/4673">#4673</a></p> <p dir="auto">See for example: <a href="http://www.sec.gov/Archives/edgar/data/47217/000104746913006802/a2215416z10-q.htm#CCSCI" rel="nofollow">http://www.sec.gov/Archives/edgar/data/47217/000104746913006802/a2215416z10-q.htm#CCSCI</a></p>
<p dir="auto">related <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17655872" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/4468" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/4468/hovercard" href="https://github.com/pandas-dev/pandas/issues/4468">#4468</a></p> <p dir="auto">Add keyword argument to ExcelFile parser to take an integer / list for the rows to interpret as header rows. If more than one, interpret as hierarchical columns / MultiIndex.</p> <p dir="auto">Presumably this would also allow you to round-trip Data Frame with hierarchical columns.</p> <p dir="auto">Basically, if you have something spanning two columns, just converts to two cells with the data in the original cell, ending up just like what you need for csv reader.</p>
1
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd import numpy as np a = pd.DataFrame({'numbers': np.arange(10), 'categories': list('abcabcabcd')}) a['categories'] = a['categories'].astype('category') b = pd.DataFrame({'numbers': np.arange(10)}) print a.dtypes print a.categories.cat.categories print merged = pd.merge(a, b, left_index=True, right_index=True) print merged.dtypes print merged['categories'].cat.categories print 'Merge ok!' print merged = pd.merge(a, b, on=['numbers'], how='left') print merged.dtypes try: print merged['categories'].cat.categories #crashes except: print 'Merge not ok!' print"><pre class="notranslate"><code class="notranslate">import pandas as pd import numpy as np a = pd.DataFrame({'numbers': np.arange(10), 'categories': list('abcabcabcd')}) a['categories'] = a['categories'].astype('category') b = pd.DataFrame({'numbers': np.arange(10)}) print a.dtypes print a.categories.cat.categories print merged = pd.merge(a, b, left_index=True, right_index=True) print merged.dtypes print merged['categories'].cat.categories print 'Merge ok!' print merged = pd.merge(a, b, on=['numbers'], how='left') print merged.dtypes try: print merged['categories'].cat.categories #crashes except: print 'Merge not ok!' print </code></pre></div> <h4 dir="auto">Expected Output</h4> <p dir="auto">The try block should print "categories" 's categories the same way as above, with:<br> <code class="notranslate">Index([u'a', u'b', u'c', u'd'], dtype='object')</code></p> <p dir="auto">However, the data type is replaced to object/string.</p> <p dir="auto">This is not fixed by the v0.18.2 release, which fixes some of the merge issues where int's would get casted to floats when merging.</p> <h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 2.7.11.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 2.6.32-431.23.3.el6.x86_64<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8</p> <p dir="auto">pandas: 0.17.1<br> nose: 1.3.7<br> pip: 7.1.2<br> setuptools: 20.3.1<br> Cython: 0.23.4<br> numpy: 1.10.4<br> scipy: 0.16.0<br> statsmodels: 0.6.1<br> IPython: 4.0.1<br> sphinx: 1.3.1<br> patsy: 0.4.0<br> dateutil: 2.4.2<br> pytz: 2015.7<br> blosc: None<br> bottleneck: 1.0.0<br> tables: 3.2.2<br> numexpr: 2.4.4<br> matplotlib: 1.5.0<br> openpyxl: 2.2.6<br> xlrd: 0.9.4<br> xlwt: 1.0.0<br> xlsxwriter: 0.7.7<br> lxml: 3.4.4<br> bs4: 4.4.1<br> html5lib: None<br> httplib2: None<br> apiclient: None<br> sqlalchemy: 1.0.9<br> pymysql: None<br> psycopg2: None<br> Jinja2: None</p>
<p dir="auto">xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="181085993" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/14351" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/14351/hovercard" href="https://github.com/pandas-dev/pandas/issues/14351">#14351</a></p> <p dir="auto">None of the following merge operations retain the <code class="notranslate">category</code> types. Is this expected? How can I keep them?</p> <h4 dir="auto">Merging on a <code class="notranslate">category</code> type:</h4> <p dir="auto">Consider the following:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="A = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)), 'Y': np.random.choice(['one', 'two', 'three'], size=(10,))}) A['X'] = A['X'].astype('category') B = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)), 'Z': np.random.choice(['jjj', 'kkk', 'sss'], size=(10,))}) B['X'] = B['X'].astype('category')"><pre class="notranslate"><code class="notranslate">A = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)), 'Y': np.random.choice(['one', 'two', 'three'], size=(10,))}) A['X'] = A['X'].astype('category') B = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)), 'Z': np.random.choice(['jjj', 'kkk', 'sss'], size=(10,))}) B['X'] = B['X'].astype('category') </code></pre></div> <p dir="auto">if I do the merge, we end up with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; pd.merge(A, B, on='X').dtypes X object Y object Z object dtype: object"><pre class="notranslate"><code class="notranslate">&gt; pd.merge(A, B, on='X').dtypes X object Y object Z object dtype: object </code></pre></div> <h4 dir="auto">Merging on a <code class="notranslate">non-category</code> type:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="A = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)), 'Y': np.random.choice(['one', 'two', 'three'], size=(10,))}) A['Y'] = A['Y'].astype('category') B = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)), 'Z': np.random.choice(['jjj', 'kkk', 'sss'], size=(10,))}) B['Z'] = B['Z'].astype('category')"><pre class="notranslate"><code class="notranslate">A = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)), 'Y': np.random.choice(['one', 'two', 'three'], size=(10,))}) A['Y'] = A['Y'].astype('category') B = pd.DataFrame({'X': np.random.choice(['foo', 'bar'],size=(10,)), 'Z': np.random.choice(['jjj', 'kkk', 'sss'], size=(10,))}) B['Z'] = B['Z'].astype('category') </code></pre></div> <p dir="auto">if I do the merge, we end up with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pd.merge(A, B, on='X').dtypes X object Y object Z object dtype: object"><pre class="notranslate"><code class="notranslate">pd.merge(A, B, on='X').dtypes X object Y object Z object dtype: object </code></pre></div>
1
<p dir="auto">I am unable to install Playwright. This is what happens:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="12:25:15 tmp % mkdir playwright 12:25:21 tmp % cd playwright 12:25:22 playwright % uname -a Darwin IM00276.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:51:50 PDT 2023; root:xnu-8796.121.2~5/RELEASE_X86_64 x86_64 12:25:24 playwright % npm doctor Check Value Recommendation/Notes npm ping ok npm -v ok current: v9.6.7, latest: v9.6.7 node -v ok current: v18.16.0, recommended: v18.16.0 npm config get registry ok using default registry (https://registry.npmjs.org/) git executable in PATH ok /usr/local/bin/git global bin folder in PATH ok /Users/.../.nvm/versions/node/v18.16.0/bin Perms check on cached files ok Perms check on local node_modules ok Perms check on global node_modules ok Perms check on local bin folder ok Perms check on global bin folder ok Verify cache contents ok verified 6 tarballs 12:25:32 playwright % npm list -g /Users/.../.nvm/versions/node/v18.16.0/lib ├── corepack@0.17.0 └── npm@9.6.7 12:25:35 playwright % npm list /Users/.../tmp/playwright └── (empty) 12:25:40 playwright % npm install playwright npm ERR! code 1 npm ERR! path /Users/.../tmp/playwright/node_modules/playwright npm ERR! command failed npm ERR! command sh -c node install.js npm ERR! Removing unused browser at /Users/.../Library/Caches/ms-playwright/chromium-1064 npm ERR! Downloading Chromium 114.0.5735.35 (playwright build v1064) from https://playwright.azureedge.net/builds/chromium/1064/chromium-mac.zip npm ERR! | | 0% of 129.1 Mb npm ERR! |■■■■■■■■ | 10% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■ | 20% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■ | 30% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 40% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 50% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 60% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 70% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 80% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 90% of 129.1 Mb npm ERR! /Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:651 npm ERR! throw new Error(`Failed to download ${title}, caused by\n${e.stack}`); npm ERR! ^ npm ERR! npm ERR! Error: Failed to download Chromium 114.0.5735.35 (playwright build v1064), caused by npm ERR! Error: end of central directory record signature not found npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/zipBundleImpl.js:1:24033 npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/zipBundleImpl.js:1:31712 npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/zipBundleImpl.js:1:17288 npm ERR! at FSReqCallback.wrapper [as oncomplete] (node:fs:682:5) npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:651:13 npm ERR! at async Registry._downloadExecutable (/Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:650:5) npm ERR! at async Registry.install (/Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:614:9) npm ERR! at async installBrowsersForNpmInstall (/Users/...tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:790:3) npm ERR! npm ERR! Node.js v18.16.0"><pre class="notranslate"><code class="notranslate">12:25:15 tmp % mkdir playwright 12:25:21 tmp % cd playwright 12:25:22 playwright % uname -a Darwin IM00276.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:51:50 PDT 2023; root:xnu-8796.121.2~5/RELEASE_X86_64 x86_64 12:25:24 playwright % npm doctor Check Value Recommendation/Notes npm ping ok npm -v ok current: v9.6.7, latest: v9.6.7 node -v ok current: v18.16.0, recommended: v18.16.0 npm config get registry ok using default registry (https://registry.npmjs.org/) git executable in PATH ok /usr/local/bin/git global bin folder in PATH ok /Users/.../.nvm/versions/node/v18.16.0/bin Perms check on cached files ok Perms check on local node_modules ok Perms check on global node_modules ok Perms check on local bin folder ok Perms check on global bin folder ok Verify cache contents ok verified 6 tarballs 12:25:32 playwright % npm list -g /Users/.../.nvm/versions/node/v18.16.0/lib ├── corepack@0.17.0 └── npm@9.6.7 12:25:35 playwright % npm list /Users/.../tmp/playwright └── (empty) 12:25:40 playwright % npm install playwright npm ERR! code 1 npm ERR! path /Users/.../tmp/playwright/node_modules/playwright npm ERR! command failed npm ERR! command sh -c node install.js npm ERR! Removing unused browser at /Users/.../Library/Caches/ms-playwright/chromium-1064 npm ERR! Downloading Chromium 114.0.5735.35 (playwright build v1064) from https://playwright.azureedge.net/builds/chromium/1064/chromium-mac.zip npm ERR! | | 0% of 129.1 Mb npm ERR! |■■■■■■■■ | 10% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■ | 20% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■ | 30% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 40% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 50% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 60% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 70% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 80% of 129.1 Mb npm ERR! |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | 90% of 129.1 Mb npm ERR! /Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:651 npm ERR! throw new Error(`Failed to download ${title}, caused by\n${e.stack}`); npm ERR! ^ npm ERR! npm ERR! Error: Failed to download Chromium 114.0.5735.35 (playwright build v1064), caused by npm ERR! Error: end of central directory record signature not found npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/zipBundleImpl.js:1:24033 npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/zipBundleImpl.js:1:31712 npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/zipBundleImpl.js:1:17288 npm ERR! at FSReqCallback.wrapper [as oncomplete] (node:fs:682:5) npm ERR! at /Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:651:13 npm ERR! at async Registry._downloadExecutable (/Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:650:5) npm ERR! at async Registry.install (/Users/.../tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:614:9) npm ERR! at async installBrowsersForNpmInstall (/Users/...tmp/playwright/node_modules/playwright-core/lib/server/registry/index.js:790:3) npm ERR! npm ERR! Node.js v18.16.0 </code></pre></div> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">The browsers should download and install.</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">The downloaded file is truncated and so the zip file is missing the central directory record.</p> <p dir="auto">All browsers are affected.</p> <p dir="auto">The issue repeats every time.</p> <p dir="auto">I can download the ZIP files manually without problem.</p> <p dir="auto">Running the 'oopDownloadMain.js' file directly produces the same failure.</p>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: 1.31.2</li> <li>Operating System: Windows Server 2016</li> <li>Browser: N/A</li> <li>Other info:</li> </ul> <h3 dir="auto">Source code</h3> <ul dir="auto"> <li>[X ] I provided exact source code that allows reproducing the issue locally.</li> </ul> <p dir="auto">Teamcity build with the following build steps and a Windows server 2016 build agent.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cinst python3 nodejs.install -y PATH=%env.Path%;C:\Python39;C:\Program Files\nodejs python.exe -m pip install --upgrade pip pip install -U -r ./requirements.txt rfbrowser init robot --variable environment:%env.testenvironment% --variable browser:%env.browser% ./robot-framework-docker-MyDimensional/tests/%env.testapplication% "><pre class="notranslate"><code class="notranslate">cinst python3 nodejs.install -y PATH=%env.Path%;C:\Python39;C:\Program Files\nodejs python.exe -m pip install --upgrade pip pip install -U -r ./requirements.txt rfbrowser init robot --variable environment:%env.testenvironment% --variable browser:%env.browser% ./robot-framework-docker-MyDimensional/tests/%env.testapplication% </code></pre></div> <p dir="auto"><strong>Steps</strong></p> <ul dir="auto"> <li>Run the build</li> </ul> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">rfbrowser init should complete without errors.</p> <p dir="auto"><strong>Actual</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[15:18:53] [Step 2/3] 2023-03-28 15:18:53,966 [INFO ] Downloading Chromium playwright build v1050 from https://playwright.azureedge.net/builds/chromium/1050/chromium-win64.zip [15:18:53] [Step 2/3] [15:18:54] [Step 2/3] 2023-03-28 15:18:54,329 [INFO ] | | 0% of 113.3 Mb [15:18:54] [Step 2/3] [15:18:55] [Step 2/3] --- Logging error --- [15:18:55] [Step 2/3] Traceback (most recent call last): [15:18:55] [Step 2/3] File &quot;C:\Python37\lib\logging\__init__.py&quot;, line 1037, in emit [15:18:55] [Step 2/3] stream.write(msg + self.terminator) [15:18:55] [Step 2/3] File &quot;C:\Python37\lib\encodings\cp1252.py&quot;, line 19, in encode [15:18:55] [Step 2/3] return codecs.charmap_encode(input,self.errors,encoding_table)[0] [15:18:55] [Step 2/3] UnicodeEncodeError: 'charmap' codec can't encode characters in position 36-43: character maps to &lt;undefined&gt; [15:18:55] [Step 2/3] Call stack: [15:18:55] [Step 2/3] File &quot;C:\Python37\lib\runpy.py&quot;, line 193, in _run_module_as_main [15:18:55] [Step 2/3] &quot;__main__&quot;, mod_spec) [15:18:55] [Step 2/3] File &quot;C:\Python37\lib\runpy.py&quot;, line 85, in _run_code [15:18:55] [Step 2/3] exec(code, run_globals) [15:18:55] [Step 2/3] File &quot;C:\Python37\Scripts\rfbrowser.exe\__main__.py&quot;, line 7, in &lt;module&gt; [15:18:55] [Step 2/3] sys.exit(main()) [15:18:55] [Step 2/3] File &quot;C:\Python37\lib\site-packages\Browser\entry.py&quot;, line 298, in main [15:18:55] [Step 2/3] runner(command, skip_browsers, trace_file) [15:18:55] [Step 2/3] File &quot;C:\Python37\lib\site-packages\Browser\entry.py&quot;, line 240, in runner [15:18:55] [Step 2/3] rfbrowser_init(skip_browsers) [15:18:55] [Step 2/3] File &quot;C:\Python37\lib\site-packages\Browser\entry.py&quot;, line 62, in rfbrowser_init [15:18:55] [Step 2/3] _rfbrowser_init(skip_browser_install) [15:18:55] [Step 2/3] File &quot;C:\Python37\lib\site-packages\Browser\entry.py&quot;, line 172, in _rfbrowser_init [15:18:55] [Step 2/3] logging.info(output) [15:18:55] [Step 2/3] Message: '|\u25a0\u25a0\u25a0\u25a0\u25a0\u25a0\u25a0\u25a0 | 10% of 113.3 Mb\n'"><pre class="notranslate"><code class="notranslate">[15:18:53] [Step 2/3] 2023-03-28 15:18:53,966 [INFO ] Downloading Chromium playwright build v1050 from https://playwright.azureedge.net/builds/chromium/1050/chromium-win64.zip [15:18:53] [Step 2/3] [15:18:54] [Step 2/3] 2023-03-28 15:18:54,329 [INFO ] | | 0% of 113.3 Mb [15:18:54] [Step 2/3] [15:18:55] [Step 2/3] --- Logging error --- [15:18:55] [Step 2/3] Traceback (most recent call last): [15:18:55] [Step 2/3] File "C:\Python37\lib\logging\__init__.py", line 1037, in emit [15:18:55] [Step 2/3] stream.write(msg + self.terminator) [15:18:55] [Step 2/3] File "C:\Python37\lib\encodings\cp1252.py", line 19, in encode [15:18:55] [Step 2/3] return codecs.charmap_encode(input,self.errors,encoding_table)[0] [15:18:55] [Step 2/3] UnicodeEncodeError: 'charmap' codec can't encode characters in position 36-43: character maps to &lt;undefined&gt; [15:18:55] [Step 2/3] Call stack: [15:18:55] [Step 2/3] File "C:\Python37\lib\runpy.py", line 193, in _run_module_as_main [15:18:55] [Step 2/3] "__main__", mod_spec) [15:18:55] [Step 2/3] File "C:\Python37\lib\runpy.py", line 85, in _run_code [15:18:55] [Step 2/3] exec(code, run_globals) [15:18:55] [Step 2/3] File "C:\Python37\Scripts\rfbrowser.exe\__main__.py", line 7, in &lt;module&gt; [15:18:55] [Step 2/3] sys.exit(main()) [15:18:55] [Step 2/3] File "C:\Python37\lib\site-packages\Browser\entry.py", line 298, in main [15:18:55] [Step 2/3] runner(command, skip_browsers, trace_file) [15:18:55] [Step 2/3] File "C:\Python37\lib\site-packages\Browser\entry.py", line 240, in runner [15:18:55] [Step 2/3] rfbrowser_init(skip_browsers) [15:18:55] [Step 2/3] File "C:\Python37\lib\site-packages\Browser\entry.py", line 62, in rfbrowser_init [15:18:55] [Step 2/3] _rfbrowser_init(skip_browser_install) [15:18:55] [Step 2/3] File "C:\Python37\lib\site-packages\Browser\entry.py", line 172, in _rfbrowser_init [15:18:55] [Step 2/3] logging.info(output) [15:18:55] [Step 2/3] Message: '|\u25a0\u25a0\u25a0\u25a0\u25a0\u25a0\u25a0\u25a0 | 10% of 113.3 Mb\n' </code></pre></div>
0
<h5 dir="auto">Issue Type:</h5> <p dir="auto">Bug Report</p> <h5 dir="auto">Ansible Version:</h5> <p dir="auto">ansible 1.6.6</p> <h5 dir="auto">Environment:</h5> <p dir="auto">Host OS: OSX 10.9.4<br> Target OS: Oracle Linux Server release 6.5</p> <h5 dir="auto">Summary:</h5> <p dir="auto">Installing a package with the yum module and option 'enablerepo' with 2 repo's fails with the message:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="failed: [localhost] =&gt; {&quot;failed&quot;: true} msg: Error setting/accessing repo puppetlabs-deps: Error getting repository data for puppetlabs-deps, repository not found"><pre class="notranslate"><code class="notranslate">failed: [localhost] =&gt; {"failed": true} msg: Error setting/accessing repo puppetlabs-deps: Error getting repository data for puppetlabs-deps, repository not found </code></pre></div> <h5 dir="auto">Steps To Reproduce:</h5> <p dir="auto">After adding a new repo file to the /etc/yum.repos.d directory with all repo's in there disabled, this snippet is used to install the package:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Install puppet-server package yum: name=puppet-server enablerepo=puppetlabs-products,puppetlabs-deps"><pre class="notranslate"><code class="notranslate">- name: Install puppet-server package yum: name=puppet-server enablerepo=puppetlabs-products,puppetlabs-deps </code></pre></div> <h5 dir="auto">Expected Results:</h5> <p dir="auto">The package is installed</p> <h5 dir="auto">Actual Results:</h5> <p dir="auto">The error described above is shown.<br> This works fine on CentOS 6.5</p> <p dir="auto">The yum module splits the enablerepo values and generates multiple <code class="notranslate">--enablerepo</code> tags. This works fine on CentOS 6.5 but not on Oracle Linux 6.5. For Oracle Linux only one <code class="notranslate">--enablerepo</code> must be specified where multiple repo's must be separated with a comma.</p>
<h5 dir="auto">Issue Type:</h5> <p dir="auto">"Bug Report:"</p> <h5 dir="auto">Ansible Version:</h5> <p dir="auto">ansible 1.4.3, 1.5.3</p> <h5 dir="auto">Environment:</h5> <p dir="auto">Oracle Enterprise Linux 6.4</p> <h5 dir="auto">Summary:</h5> <p dir="auto">yum module enablerepo won't do multiple repositories</p> <h5 dir="auto">Steps to Reproduce:</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible server1 -s -K -m yum -a &quot;name=pkgname enablerepo=repo1,repo2 state=latest&quot;"><pre class="notranslate"><code class="notranslate">ansible server1 -s -K -m yum -a "name=pkgname enablerepo=repo1,repo2 state=latest" </code></pre></div> <p dir="auto">repo1 and repo2 are intentionally disabled by default in the yum.repo.d configuration files and are enabled as required when installing packages</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[repo1] name=Repository 1 baseurl=http://reposerver/repository1 gpgkey=http://reposerver//RPM-GPG-KEY-repo1 gpgcheck=1 enabled=0 [repo2] name=Repository 2 baseurl=http://reposerver/repository2 gpgkey=http://reposerver//RPM-GPG-KEY-repo2 gpgcheck=1 enabled=0"><pre class="notranslate"><code class="notranslate">[repo1] name=Repository 1 baseurl=http://reposerver/repository1 gpgkey=http://reposerver//RPM-GPG-KEY-repo1 gpgcheck=1 enabled=0 [repo2] name=Repository 2 baseurl=http://reposerver/repository2 gpgkey=http://reposerver//RPM-GPG-KEY-repo2 gpgcheck=1 enabled=0 </code></pre></div> <h5 dir="auto">Expected Results:</h5> <p dir="auto">The specified package and any dependencies it requires are successfully installed on the target servers.</p> <h5 dir="auto">Actual Results:</h5> <p dir="auto">ansible on the Ansible server outputs that it cannot find repository data for the second specified repository (repo2). Swapping the order of the repository names in the command line simply changes which repository data cannot be located.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="server1 | FAILED &gt;&gt; { &quot;failed&quot;: true, &quot;msg&quot;: &quot;Error setting/accessing repo repo2: Error getting repository data for repo2, repository not found&quot;"><pre class="notranslate"><code class="notranslate">server1 | FAILED &gt;&gt; { "failed": true, "msg": "Error setting/accessing repo repo2: Error getting repository data for repo2, repository not found" </code></pre></div> <p dir="auto">If I run ansible with '-vvv', the following is output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;server1&gt; ESTABLISH CONNECTION FOR USER: ansible on PORT 22 TO server1 &lt;server1&gt; REMOTE_MODULE yum name=ansible enablerepo=repo1,repo2 state=latest &lt;server1&gt; EXEC /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236' &lt;server1&gt; PUT /tmp/tmpqjd93P TO /home/ansible/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236/yum &lt;server1&gt; EXEC /bin/sh -c 'sudo -k &amp;&amp; sudo -H -S -p &quot;[sudo via ansible, key=ymortmfovnpsvcpoojkrmqfchlzqzlfm] password: &quot; -u root /bin/sh -c '&quot;'&quot;'echo SUDO-SUCCESS-ymortmfovnpsvcpoojkrmqfchlzqzlfm; /usr/bin/python -tt /home/server1/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236/yum; rm -rf /home/server1/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236/ &gt;/dev/null 2&gt;&amp;1'&quot;'&quot;'' I have checked the log files on the repository server and used tcpdump to monitor traffic to and from the target server and I can see that the yum module is never reaching out to the repository server. It appears to be stuck at reading the yum.repos.d configuration files. I have five Ansible servers, each in different data centers, I get the same results on on all five servers. I have tried different packages and different repositories, and it is always the same: the yum module fails on the second repository."><pre class="notranslate"><code class="notranslate">&lt;server1&gt; ESTABLISH CONNECTION FOR USER: ansible on PORT 22 TO server1 &lt;server1&gt; REMOTE_MODULE yum name=ansible enablerepo=repo1,repo2 state=latest &lt;server1&gt; EXEC /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236' &lt;server1&gt; PUT /tmp/tmpqjd93P TO /home/ansible/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236/yum &lt;server1&gt; EXEC /bin/sh -c 'sudo -k &amp;&amp; sudo -H -S -p "[sudo via ansible, key=ymortmfovnpsvcpoojkrmqfchlzqzlfm] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-ymortmfovnpsvcpoojkrmqfchlzqzlfm; /usr/bin/python -tt /home/server1/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236/yum; rm -rf /home/server1/.ansible/tmp/ansible-tmp-1398273878.46-183006336271236/ &gt;/dev/null 2&gt;&amp;1'"'"'' I have checked the log files on the repository server and used tcpdump to monitor traffic to and from the target server and I can see that the yum module is never reaching out to the repository server. It appears to be stuck at reading the yum.repos.d configuration files. I have five Ansible servers, each in different data centers, I get the same results on on all five servers. I have tried different packages and different repositories, and it is always the same: the yum module fails on the second repository. </code></pre></div>
1
<pre class="notranslate">The new pollster should probably handle out of fds more gracefully. Fixing an unrelated fd leak, I wrote a test to intentionally run out of file descriptors. With the new scheduler, you get pages of this ~forever, EBADF from epoll_wait, I believe: epollwait failed with epollwait failed with 99 epollwait failed with 9epollwait failed with 9 epollwait failed with 9 epollwait failed with epollwait failed with 9 9 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 9 9 epollwait failed with 9epollwait failed with 9 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 99 epollwait failed with 9epollwait failed with 9 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 99 epollwait failed with 9epollwait failed with epollwait failed with 9 9 epollwait failed with 9epollwait failed with 9 epollwait failed with epollwait failed with 9 9epollwait failed with epollwait failed with 9 9 epollwait failed with epollwait failed with 99 epollwait failed with 9 epollwait failed with 9 epollwait failed with 9 epollwait failed with 9 epollwait failed with 9epollwait failed with 9 epollwait failed with epollwait failed with 9 9epollwait failed with 9 epollwait failed with epollwait failed with 9 9epollwait failed with 9 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 9 9epollwait failed with epollwait failed with 9 9epollwait failed with 9 epollwait failed with epollwait failed with 9 9epollwait failed with 9 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 9 9epollwait failed with 9 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 9 9epollwait failed with 9 epollwait failed with epollwait failed with 9 9epollwait failed with 9 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 9 9epollwait failed with 9 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 99 epollwait failed with epollwait failed with 9 9epollwait failed with 9 epollwait failed with epollwait failed with 9 9epollwait failed with 9</pre>
<p dir="auto"><code class="notranslate">docker -v</code> works only on Linux and silently fails if you run a docker client on a non-Linux machine. It creates confusion for those who are using the following command as instructed as on the README to build their packages.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="docker run -v $GOPATH/src:/src mobile /bin/bash -c 'cd /src/your/project &amp;&amp; ./make.bash'"><pre class="notranslate"><code class="notranslate">docker run -v $GOPATH/src:/src mobile /bin/bash -c 'cd /src/your/project &amp;&amp; ./make.bash' </code></pre></div> <p dir="auto">We should copy the package to be built and its dependencies from the host to the container. But, Docker provides no additional tools to help us with this issue.</p> <p dir="auto">One alternative is to vendor the dependencies and use ONBUILD ADD to build an app builder image. It will only work if all dependencies are vendored under the Dockerfile's directory, because Docker rejects to add files from outer contexts. <a href="https://docs.docker.com/reference/builder/#add" rel="nofollow">https://docs.docker.com/reference/builder/#add</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="FROM mobile:latest ONBUILD ADD . /src/your/project/ RUN cd /src/your/project/ &amp;&amp; ./all.bash"><pre class="notranslate"><code class="notranslate">FROM mobile:latest ONBUILD ADD . /src/your/project/ RUN cd /src/your/project/ &amp;&amp; ./all.bash </code></pre></div> <p dir="auto">Then the user can do a docker cp to retrieve the apk.</p>
0
<p dir="auto">Describe what you were doing when the bug occurred:</p> <p dir="auto">Profiled the new FB. Scrolled down to tail loads.</p> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.6.0-a2fb84beb</p> <p dir="auto">Call stack: at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:345591<br> at Array.map ()<br> at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:345397<br> at Ai (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:62580)<br> at zl (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:112694)<br> at jc (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:104789)<br> at Oc (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:104717)<br> at Tc (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:104585)<br> at gc (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:101042)<br> at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:32:47376</p> <p dir="auto">Component stack: at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:344679<br> at div<br> at div<br> at n (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:194307)<br> at div<br> at Cc (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:346311)<br> at div<br> at n (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:3:8163)<br> at div<br> at bc<br> at div<br> at div<br> at div<br> at Do (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:262081)<br> at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:364048<br> at n (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:274563)<br> at chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:277138<br> at div<br> at div<br> at ol (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:323458)<br> at Ze (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:205764)<br> at pn (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:215038)<br> at $a (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:292153)<br> at ws (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:40:369231)</p>
<p dir="auto">Describe what you were doing when the bug occurred:</p> <ol dir="auto"> <li>Add interaction tracing with unstable_trace</li> <li>Record a profile, navigate to Profiler &gt; Profiled Interactions</li> <li>Error appears when scrolling view or immediately</li> </ol> <h2 dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/131928/80805899-3688c400-8b87-11ea-88ca-3a7ae7de3589.gif"><img src="https://user-images.githubusercontent.com/131928/80805899-3688c400-8b87-11ea-88ca-3a7ae7de3589.gif" alt="Kapture 2020-05-01 at 8 37 44" data-animated-image="" style="max-width: 100%;"></a></h2> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.6.0-6cceaeb67</p> <p dir="auto">Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:344360<br> at Array.map ()<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:344166<br> at ci (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59620)<br> at Ll (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:109960)<br> at qc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102381)<br> at Hc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102306)<br> at Vc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102171)<br> at Tc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:98781)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:46014</p> <p dir="auto">Component stack: in Unknown<br> in Unknown<br> in div<br> in div<br> in n<br> in div<br> in bc<br> in div<br> in n<br> in div<br> in vc<br> in div<br> in div<br> in div<br> in So<br> in Unknown<br> in n<br> in Unknown<br> in div<br> in div<br> in rl<br> in Ze<br> in fn<br> in Ga<br> in _s</p>
1
<p dir="auto"><strong>Apache Airflow version</strong>: 2.0.0b2</p> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Others</strong>: No K8S</li> </ul> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">In the The <em>Logs</em> and <em>All Instances</em> buttons in the task model in the web UI are inoperative when <em>not</em> using Kubernetes.</p> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">The buttons to have working links.</p> <p dir="auto">The <code class="notranslate">dag.html</code> <code class="notranslate">updateModalUrls()</code> function <a href="https://github.com/apache/airflow/blob/7d5d334857114903783390333e23e07bc9df2e2e/airflow/www/templates/airflow/dag.html#L428-L434">assumes that <code class="notranslate">buttons.rendered_k8s</code> is set</a>, which is not the case when not using K8S.</p> <p dir="auto">This then results in an error and the buttons initialised after this point are not wired up:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="18:28:17.990 Uncaught TypeError: elm is undefined updateButtonUrl http://.../tree?dag_id=full_pipeline:1595 updateModalUrls http://.../tree?dag_id=full_pipeline:1616 call_modal http://.../tree?dag_id=full_pipeline:1665 update http://.../tree?dag_id=full_pipeline:1427 $/&lt; http://.../static/dist/d3.min.js:1 i http://.../static/dist/d3.min.js:1 each http://.../static/dist/d3.min.js:3 Y http://.../static/dist/d3.min.js:1 each http://158.101.169.4:8080/static/dist/d3.min.js:3 on http://158.101.169.4:8080/static/dist/d3.min.js:3 update http://158.101.169.4:8080/tree?dag_id=full_pipeline:1420 &lt;anonymous&gt; http://158.101.169.4:8080/tree?dag_id=full_pipeline:1339 tree:1595:7"><pre class="notranslate"><span class="pl-c1">18</span>:<span class="pl-c1">28</span>:<span class="pl-c1">17.990</span> <span class="pl-v">Uncaught</span> TypeError: <span class="pl-s1">elm</span> <span class="pl-s1">is</span> <span class="pl-c1">undefined</span> <span class="pl-s1">updateButtonUrl</span> <span class="pl-s1">http</span>:<span class="pl-c">//.../tree?dag_id=full_pipeline:1595</span> <span class="pl-s1">updateModalUrls</span> <span class="pl-s1">http</span>:<span class="pl-c">//.../tree?dag_id=full_pipeline:1616</span> <span class="pl-s1">call_modal</span> <span class="pl-s1">http</span>:<span class="pl-c">//.../tree?dag_id=full_pipeline:1665</span> <span class="pl-s1">update</span> <span class="pl-s1">http</span>:<span class="pl-c">//.../tree?dag_id=full_pipeline:1427</span> <span class="pl-s1">$</span><span class="pl-c1">/</span><span class="pl-c1">&lt;</span> <span class="pl-s1">http</span>:<span class="pl-c">//.../static/dist/d3.min.js:1</span> <span class="pl-s1">i</span> <span class="pl-s1">http</span>:<span class="pl-c">//.../static/dist/d3.min.js:1</span> <span class="pl-s1">each</span> <span class="pl-s1">http</span>:<span class="pl-c">//.../static/dist/d3.min.js:3</span> <span class="pl-v">Y</span> <span class="pl-s1">http</span>:<span class="pl-c">//.../static/dist/d3.min.js:1</span> <span class="pl-s1">each</span> <span class="pl-s1">http</span>:<span class="pl-c">//158.101.169.4:8080/static/dist/d3.min.js:3</span> <span class="pl-s1">on</span> <span class="pl-s1">http</span>:<span class="pl-c">//158.101.169.4:8080/static/dist/d3.min.js:3</span> <span class="pl-s1">update</span> <span class="pl-s1">http</span>:<span class="pl-c">//158.101.169.4:8080/tree?dag_id=full_pipeline:1420</span> <span class="pl-c1">&lt;</span><span class="pl-s1">anonymous</span><span class="pl-c1">&gt;</span> http://158.101.169.4:8080/tree?dag_id=full_pipeline:1339 tree:1595:7</pre></div> <p dir="auto">The call needs to be protected by a <code class="notranslate">k8s_or_k8scelery_executor</code> check.</p>
<p dir="auto"><strong>Apache Airflow version</strong>:2.0.0b2</p> <p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>): NA</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): macOS</li> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li> <li><strong>Install tools</strong>:</li> <li><strong>Others</strong>:</li> </ul> <p dir="auto"><strong>What happened</strong>:<br> Clicking on the "Log" button in the popup for task instance in graph view doesn't link to the logs view.</p> <p dir="auto"><strong>What you expected to happen</strong>:<br> The log view should show up.</p> <p dir="auto"><strong>How to reproduce it</strong>:</p> <ol dir="auto"> <li>Run any dag.</li> <li>Open Graph VIew.</li> <li>Click on any task.</li> <li>Click on the "Log" button.</li> </ol> <p dir="auto"><strong>Anything else we need to know</strong>:<br> Check this in action <a href="https://youtu.be/fXEQ-yOwMrM" rel="nofollow">here</a>.</p>
1
<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.21.1</li> <li>PowerToy Utility: FancyZones</li> <li>Running PowerToys as Admin: No</li> <li>Windows build number: 20H2 19042.541</li> </ul> <h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide detailed reproduction steps (if any)</h2> <ol dir="auto"> <li>Open the fancyZones' setting interface</li> <li>Pick the Zone highlight color and click in the color value in hexadecimal</li> <li>Click the cross button in the typing block</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">The hexadecimal value been cleaned and allow users to type.</p> <h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">❌</g-emoji> Actual result</h3> <p dir="auto">The setting interface crushed</p> <h2 dir="auto"><g-emoji class="g-emoji" alias="camera" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png">📷</g-emoji> Screenshots</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/57782331/94088192-6a1fff80-fe42-11ea-9443-54bf49f03517.png"><img src="https://user-images.githubusercontent.com/57782331/94088192-6a1fff80-fe42-11ea-9443-54bf49f03517.png" alt="PowerToys_FancyZones_issue" 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: 0.20.1</li> <li>PowerToy Utility: Fancy Zones</li> <li>Running PowerToys as Admin: yes</li> <li>Windows build number: 10.0.19041.388</li> </ul> <h2 dir="auto">📝 Provide detailed reproduction steps (if any)</h2> <ol dir="auto"> <li>Open Settings: Fancy Zones</li> <li>Go to edit one of the zone colors</li> <li>In the color picker window, delete the #HEX value (ether manually or via the X button)</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"><em>What is the expected result of the above steps?</em><br> I think nothing? Similar to clearing one of the RGB boxes.</p> <h3 dir="auto">❌ Actual result</h3> <p dir="auto"><em>What is the actual result of the above steps?</em><br> UI freezes for one to five seconds and then closes.<br> PowerToys itself does not close all together.</p> <h2 dir="auto"><g-emoji class="g-emoji" alias="camera" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png">📷</g-emoji> Screenshots</h2> <p dir="auto"><em>Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form</em><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/65828559/90505260-9a44f600-e152-11ea-8863-982346eaadaa.png"><img src="https://user-images.githubusercontent.com/65828559/90505260-9a44f600-e152-11ea-8863-982346eaadaa.png" alt="image" style="max-width: 100%;"></a></p>
1
<p dir="auto">As far as I know, polyfill functions are repeated in each file they are needed, resulting in lot of duplicate code.</p> <p dir="auto">I suggest to optionally emit them as a module, so that they appear once in a bundled project.</p> <p dir="auto">E.g. instead of:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var __extends = (this &amp;&amp; this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var myclass= (function (_super) { __extends(myclass, _super); // ..."><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">__extends</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-smi">this</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">__extends</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">d</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">p</span> <span class="pl-k">in</span> <span class="pl-s1">b</span><span class="pl-kos">)</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-en">hasOwnProperty</span><span class="pl-kos">(</span><span class="pl-s1">p</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-s1">d</span><span class="pl-kos">[</span><span class="pl-s1">p</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">b</span><span class="pl-kos">[</span><span class="pl-s1">p</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-c1">__</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">constructor</span> <span class="pl-c1">=</span> <span class="pl-s1">d</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-s1">d</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-c1">=</span> <span class="pl-s1">b</span> <span class="pl-c1">===</span> <span class="pl-c1">null</span> ? <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">)</span> : <span class="pl-kos">(</span><span class="pl-c1">__</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-c1">=</span> <span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-c1">__</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">myclass</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">_super</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">__extends</span><span class="pl-kos">(</span><span class="pl-s1">myclass</span><span class="pl-kos">,</span> <span class="pl-s1">_super</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// ...</span></pre></div> <p dir="auto">emit this:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var __extends = require(&quot;typescript-polyfills&quot;).extends; var myclass= (function (_super) { __extends(myclass, _super); // ..."><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">__extends</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"typescript-polyfills"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">extends</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">myclass</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">_super</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">__extends</span><span class="pl-kos">(</span><span class="pl-s1">myclass</span><span class="pl-kos">,</span> <span class="pl-s1">_super</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// ...</span></pre></div>
<p dir="auto">I request a runtime type checking system that perhaps looks something like this:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function square(x: number!) { return x * x; }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">square</span><span class="pl-kos">(</span><span class="pl-s1">x</span>: <span class="pl-smi">number</span><span class="pl-c1">!</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Where the <code class="notranslate">!</code> tells the compiler to generate a runtime type check for a number, something akin to <a href="http://gcanti.github.io/tcomb/index.html" rel="nofollow">tcomb.js</a>.</p> <p dir="auto">Of course, this gets much more complicated with interfaces, but you get the idea.</p>
0
<p dir="auto">the following does not work</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; let global @inline function foo(x::T) where {T} T end end"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-k">let</span> <span class="pl-k">global</span> <span class="pl-c1">@inline</span> <span class="pl-k">function</span> <span class="pl-en">foo</span>(x<span class="pl-k">::</span><span class="pl-c1">T</span>) <span class="pl-k">where</span> {T} T <span class="pl-k">end</span> <span class="pl-k">end</span></pre></div> <p dir="auto">but the following does work</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; let global @inline function foo{T}(x::T) T end end"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-k">let</span> <span class="pl-k">global</span> <span class="pl-c1">@inline</span> <span class="pl-k">function</span> <span class="pl-en">foo</span><span class="pl-c1">{T}</span>(x<span class="pl-k">::</span><span class="pl-c1">T</span>) T <span class="pl-k">end</span> <span class="pl-k">end</span></pre></div>
<p dir="auto">According the the <a href="https://docs.julialang.org/en/stable/manual/profile/" rel="nofollow">manual</a><br> <code class="notranslate">Profile.print</code> should take a kwarg saying how many columns to print.<br> This is a useful feature I would like to use.</p> <p dir="auto">Here is what happens when I run the example code:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="s = open(&quot;/tmp/prof.txt&quot;,&quot;w&quot;) Profile.print(s,cols = 500) close(s) MethodError: no method matching print(::IOStream, ::Array{UInt64,1}, ::Dict{UInt64,Array{StackFrame,1}}; cols=500) you may have intended to import Base.print Closest candidates are: print{T&lt;:Unsigned}(::IO, ::Array{T&lt;:Unsigned,1}, ::Dict{K,V}; format, C, combine, sortedby, maxdepth) at profile.jl:88 got unsupported keyword argument &quot;cols&quot; print{T&lt;:Unsigned}(::IO, ::Array{T&lt;:Unsigned,1}) at profile.jl:88 got unsupported keyword argument &quot;cols&quot; print(::IO) at profile.jl:88 got unsupported keyword argument &quot;cols&quot; in (::Base.Profile.#kw##print)(::Array{Any,1}, ::Base.Profile.#print, ::IOStream, ::Array{UInt64,1}, ::Dict{UInt64,Array{StackFrame,1}}) at &lt;missing&gt;:0 in (::Base.Profile.#kw##print)(::Array{Any,1}, ::Base.Profile.#print, ::IOStream) at &lt;missing&gt;:0 in include_string(::String, ::String) at loading.jl:441 in eval(::Module, ::Any) at boot.jl:234 in (::Atom.##65#68)() at eval.jl:40 in withpath(::Atom.##65#68, ::Void) at utils.jl:30 in withpath(::Function, ::Void) at eval.jl:46 in macro expansion at eval.jl:109 [inlined] in (::Atom.##64#67{Dict{String,Any}})() at task.jl:60"><pre class="notranslate">s <span class="pl-k">=</span> <span class="pl-c1">open</span>(<span class="pl-s"><span class="pl-pds">"</span>/tmp/prof.txt<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>w<span class="pl-pds">"</span></span>) Profile<span class="pl-k">.</span><span class="pl-c1">print</span>(s,cols <span class="pl-k">=</span> <span class="pl-c1">500</span>) <span class="pl-c1">close</span>(s) MethodError<span class="pl-k">:</span> no method matching <span class="pl-c1">print</span>(<span class="pl-k">::</span><span class="pl-c1">IOStream</span>, <span class="pl-k">::</span><span class="pl-c1">Array{UInt64,1}</span>, <span class="pl-k">::</span><span class="pl-c1">Dict{UInt64,Array{StackFrame,1}}</span>; cols<span class="pl-k">=</span><span class="pl-c1">500</span>) you may have intended to <span class="pl-k">import</span> Base<span class="pl-k">.</span>print Closest candidates are<span class="pl-k">:</span> <span class="pl-c1">print</span><span class="pl-c1">{T&lt;:Unsigned}</span>(<span class="pl-k">::</span><span class="pl-c1">IO</span>, <span class="pl-k">::</span><span class="pl-c1">Array{T&lt;:Unsigned,1}</span>, <span class="pl-k">::</span><span class="pl-c1">Dict{K,V}</span>; format, C, combine, sortedby, maxdepth) at profile<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">88</span> got unsupported keyword argument <span class="pl-s"><span class="pl-pds">"</span>cols<span class="pl-pds">"</span></span> <span class="pl-c1">print</span><span class="pl-c1">{T&lt;:Unsigned}</span>(<span class="pl-k">::</span><span class="pl-c1">IO</span>, <span class="pl-k">::</span><span class="pl-c1">Array{T&lt;:Unsigned,1}</span>) at profile<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">88</span> got unsupported keyword argument <span class="pl-s"><span class="pl-pds">"</span>cols<span class="pl-pds">"</span></span> <span class="pl-c1">print</span>(<span class="pl-k">::</span><span class="pl-c1">IO</span>) at profile<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">88</span> got unsupported keyword argument <span class="pl-s"><span class="pl-pds">"</span>cols<span class="pl-pds">"</span></span> <span class="pl-k">in</span> (<span class="pl-k">::</span><span class="pl-c1">Base.Profile.</span><span class="pl-c"><span class="pl-c">#</span>kw##print)(::Array{Any,1}, ::Base.Profile.#print, ::IOStream, ::Array{UInt64,1}, ::Dict{UInt64,Array{StackFrame,1}}) at &lt;missing&gt;:0</span> <span class="pl-k">in</span> (<span class="pl-k">::</span><span class="pl-c1">Base.Profile.</span><span class="pl-c"><span class="pl-c">#</span>kw##print)(::Array{Any,1}, ::Base.Profile.#print, ::IOStream) at &lt;missing&gt;:0</span> <span class="pl-k">in</span> <span class="pl-c1">include_string</span>(<span class="pl-k">::</span><span class="pl-c1">String</span>, <span class="pl-k">::</span><span class="pl-c1">String</span>) at loading<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">441</span> <span class="pl-k">in</span> <span class="pl-c1">eval</span>(<span class="pl-k">::</span><span class="pl-c1">Module</span>, <span class="pl-k">::</span><span class="pl-c1">Any</span>) at boot<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">234</span> <span class="pl-k">in</span> (<span class="pl-k">::</span><span class="pl-c1">Atom.</span><span class="pl-c"><span class="pl-c">#</span>#65#68)() at eval.jl:40</span> <span class="pl-k">in</span> <span class="pl-c1">withpath</span>(<span class="pl-k">::</span><span class="pl-c1">Atom.</span><span class="pl-c"><span class="pl-c">#</span>#65#68, ::Void) at utils.jl:30</span> <span class="pl-k">in</span> <span class="pl-c1">withpath</span>(<span class="pl-k">::</span><span class="pl-c1">Function</span>, <span class="pl-k">::</span><span class="pl-c1">Void</span>) at eval<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">46</span> <span class="pl-k">in</span> <span class="pl-k">macro</span> expansion at eval<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">109</span> [inlined] <span class="pl-k">in</span> (<span class="pl-k">::</span><span class="pl-c1">Atom.</span><span class="pl-c"><span class="pl-c">#</span>#64#67{Dict{String,Any}})() at task.jl:60</span></pre></div> <p dir="auto">Looking in the <a href="https://github.com/JuliaLang/julia/blob/98414b9a8bfd0708a03a711cf22f87fd03dd789d/base/profile.jl#L142">source</a><br> it seems that now the number of columns is being determined by the displaysize.<br> Which has serveral problems:</p> <ul dir="auto"> <li>Doesn't match docs</li> <li>Not at all useful for deeply nestested code. I know my code, which isn't even that deep, is down to just a few letters for each function name, before it is cut-off, which makes it nearly useless</li> <li>displaysize doesn't make sense when the output is not going to STDOUT anyway.</li> </ul>
0
<p dir="auto">I recently purchased new Mac Pro w/ Mac Os X 11.0.1 &amp; Apple Silicon M1.</p> <p dir="auto">I installed homebrew (when enabling Rosetta) and managed to install python3.9 and other packages through brew (numpy==1.19.5 &amp; scipy==1.6.0, amongst others).</p> <p dir="auto">However, executing my one-liner script yields a "bus error". That happens when I try to import curve_fit from scipy.optimize. Any ideas how to solve that?</p> <p dir="auto">I believe this is hardware related and is due to non optimal compilation of scipy for the M1 architecture (data are lost somewhere on the memory bus? <a href="https://www.quora.com/Why-there-is-a-bus-error-in-the-Python-program-when-it-recurs-over-18-713-times" rel="nofollow">https://www.quora.com/Why-there-is-a-bus-error-in-the-Python-program-when-it-recurs-over-18-713-times</a> ).</p> <p dir="auto">Python code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from scipy.optimize import curve_fit"><pre class="notranslate"><code class="notranslate">from scipy.optimize import curve_fit </code></pre></div> <p dir="auto">Error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="zsh: bus error"><pre class="notranslate"><code class="notranslate">zsh: bus error </code></pre></div> <p dir="auto">Tail lines when running this code in python3.9 with -v option.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import 'scipy.sparse.linalg.dsolve' # &lt;_frozen_importlib_external.SourceFileLoader object at 0x1182ad040&gt; # /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/__pycache__/__init__.cpython-39.pyc matches /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/__init__.py # code object from '/opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/__pycache__/__init__.cpython-39.pyc' # /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/__pycache__/__init__.cpython-39.pyc matches /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/__init__.py # code object from '/opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/__pycache__/__init__.cpython-39.pyc' # /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/__pycache__/arpack.cpython-39.pyc matches /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py # code object from '/opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/__pycache__/arpack.cpython-39.pyc' zsh: bus error python3.9 -v debug.py"><pre class="notranslate"><code class="notranslate">import 'scipy.sparse.linalg.dsolve' # &lt;_frozen_importlib_external.SourceFileLoader object at 0x1182ad040&gt; # /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/__pycache__/__init__.cpython-39.pyc matches /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/__init__.py # code object from '/opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/__pycache__/__init__.cpython-39.pyc' # /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/__pycache__/__init__.cpython-39.pyc matches /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/__init__.py # code object from '/opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/__pycache__/__init__.cpython-39.pyc' # /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/__pycache__/arpack.cpython-39.pyc matches /opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py # code object from '/opt/homebrew/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/arpack/__pycache__/arpack.cpython-39.pyc' zsh: bus error python3.9 -v debug.py </code></pre></div> <p dir="auto">I also posted this question on stack overflow: <a href="https://stackoverflow.com/questions/65838231/importing-scipy-in-python-3-9-1-yields-zsh-bus-error-apple-silicon-m1-mac-os-1" rel="nofollow">https://stackoverflow.com/questions/65838231/importing-scipy-in-python-3-9-1-yields-zsh-bus-error-apple-silicon-m1-mac-os-1</a></p>
<p dir="auto">My issue is about NaNs produced using scipy.interpolate.griddata.</p> <p dir="auto">Consider that the values from <code class="notranslate">values.csv</code> are defined for each point from <code class="notranslate">points.csv</code>.<br> We would like to get interpolated values for points from <code class="notranslate">xi.csv</code>.<br> In the following code snippet I check whether the interpolated values contain any NaNs.</p> <h3 dir="auto">Reproducing code example:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from scipy.interpolate import griddata import numpy as np import pandas as pd points = pd.read_csv('points.csv').values values = pd.read_csv('values.csv').values xi = pd.read_csv('xi.csv').values interpolated = griddata(points, values, xi, method='linear', rescale=True) idx_nan = np.where(np.isnan(interpolated))[0] if idx_nan.any(): print('NaNs are present') print(xi[idx_nan]) else: print('Success') "><pre class="notranslate"><code class="notranslate">from scipy.interpolate import griddata import numpy as np import pandas as pd points = pd.read_csv('points.csv').values values = pd.read_csv('values.csv').values xi = pd.read_csv('xi.csv').values interpolated = griddata(points, values, xi, method='linear', rescale=True) idx_nan = np.where(np.isnan(interpolated))[0] if idx_nan.any(): print('NaNs are present') print(xi[idx_nan]) else: print('Success') </code></pre></div> <p dir="auto">I used two sets of inputs for points and values: <code class="notranslate">with_duplicates</code> and <code class="notranslate">no_duplicates</code>.<br> In the former ones there are points with the duplicate coordinates, while in the other one they are eliminated.</p> <h3 dir="auto">Outputs</h3> <h4 dir="auto">With Duplicates</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="NaNs are present [[ 2. 0. 0. 30. ] [ 2. 0. 0. 50. ] [ 2. 0. 0. 70. ] [ 2.5 0. 0. 30. ] [ 2.5 0. 0. 50. ] [ 2.5 0. 0. 70. ] [ 3. 0. 0. 30. ] [ 3. 0. 0. 50. ] [ 3. 0. 0. 70. ] [ 3.5 0. 0. 30. ] [ 3.5 0. 0. 50. ] [ 3.5 0. 0. 70. ] [ 4. 0. 0. 30. ] [ 4. 0. 0. 50. ] [ 4. 0. 0. 70. ] [ 4.5 0. 0. 30. ] [ 4.5 0. 0. 50. ] [ 4.5 0. 0. 70. ] [ 5. 0. 0. 30. ] [ 5. 0. 0. 50. ] [ 5. 0. 0. 70. ]] "><pre class="notranslate"><code class="notranslate">NaNs are present [[ 2. 0. 0. 30. ] [ 2. 0. 0. 50. ] [ 2. 0. 0. 70. ] [ 2.5 0. 0. 30. ] [ 2.5 0. 0. 50. ] [ 2.5 0. 0. 70. ] [ 3. 0. 0. 30. ] [ 3. 0. 0. 50. ] [ 3. 0. 0. 70. ] [ 3.5 0. 0. 30. ] [ 3.5 0. 0. 50. ] [ 3.5 0. 0. 70. ] [ 4. 0. 0. 30. ] [ 4. 0. 0. 50. ] [ 4. 0. 0. 70. ] [ 4.5 0. 0. 30. ] [ 4.5 0. 0. 50. ] [ 4.5 0. 0. 70. ] [ 5. 0. 0. 30. ] [ 5. 0. 0. 50. ] [ 5. 0. 0. 70. ]] </code></pre></div> <p dir="auto">I wonder why the NaNs were generated not for all points.<br> Note, that there were no NaNs for <code class="notranslate">[1 0 0 30]</code> point, for example.</p> <p dir="auto">The points, where we have NaNs as a results on interpolation are actually present in <code class="notranslate">points.csv</code>, for example <code class="notranslate">[5, 0, 0, 30]</code> is there.<br> Thus, it is surprising why interpolation led to NaNs even if there is a perfect match in the <code class="notranslate">points</code> array.</p> <h4 dir="auto">No Duplicates</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Success"><pre class="notranslate"><code class="notranslate">Success </code></pre></div> <p dir="auto">I removed duplicate points and re-ran the code snippet. Now it was a success.</p> <p dir="auto">It is not clear, though, why there would be such a behavior with <code class="notranslate">with_duplicates</code>. If the point from <code class="notranslate">xi</code> matches point from <code class="notranslate">points</code> array, then it seems that the algorithm should just pick the corresponding value.</p> <h3 dir="auto">Scipy/Numpy/Python version information:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info) 1.2.1 1.16.3 sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info) 1.2.1 1.16.3 sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0) </code></pre></div> <h2 dir="auto">Files with data</h2> <p dir="auto"><a href="https://github.com/scipy/scipy/files/3321221/xi.zip">xi.zip</a><br> <a href="https://github.com/scipy/scipy/files/3321213/with_duplicates.zip">with_duplicates.zip</a><br> <a href="https://github.com/scipy/scipy/files/3321225/no_duplicates.zip">no_duplicates.zip</a></p>
0
<p dir="auto"><strong>Symfony version(s) affected</strong>: 4.1.0</p> <p dir="auto"><strong>Description</strong></p> <p dir="auto">Symfony does not throw an exception <code class="notranslate">Circular reference detected for service "%s", path: "%s".</code> whenever I am using <code class="notranslate">!tagged</code> syntax.</p> <p dir="auto"><strong>How to reproduce</strong></p> <ol dir="auto"> <li>Create the following class:</li> </ol> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;?php namespace App\Services; class MyService { private $services; public function __construct(iterable $services) { $this-&gt;services = $services; } }"><pre class="notranslate"><span class="pl-ent">&lt;?php</span> <span class="pl-k">namespace</span> <span class="pl-v">App</span>\<span class="pl-v">Services</span>; <span class="pl-k">class</span> <span class="pl-v">MyService</span> { <span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>services</span>; <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">__construct</span>(<span class="pl-smi">iterable</span> <span class="pl-s1"><span class="pl-c1">$</span>services</span>) { <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">services</span> = <span class="pl-s1"><span class="pl-c1">$</span>services</span>; } }</pre></div> <ol start="2" dir="auto"> <li>Create the following configuration:</li> </ol> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" App\Services\MyService: arguments: ['@App\Services\MyService']"><pre class="notranslate"> <span class="pl-ent">App\Services\MyService</span>: <span class="pl-ent">arguments</span>: <span class="pl-s">['@App\Services\MyService']</span></pre></div> <p dir="auto">Now we will get <code class="notranslate">Circular reference detected for service "App\Services\MyService", path: "App\Services\MyService -&gt; App\Services\MyService".</code>, it is fine.</p> <ol start="3" dir="auto"> <li>Replace the configuration by the following code:</li> </ol> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" App\Services\MyService: arguments: - !tagged my-service tags: - {name: 'my-service'}"><pre class="notranslate"> <span class="pl-ent">App\Services\MyService</span>: <span class="pl-ent">arguments</span>: - <span class="pl-k">!tagged</span> <span class="pl-s">my-service</span> <span class="pl-ent">tags</span>: - <span class="pl-s">{name: 'my-service'}</span></pre></div> <p dir="auto">Symfony does not warn by exception about circular dependency. My real example was much more complex and actually it was my bug, but anyway would be nice to be informed about bug by semantic exception.</p> <p dir="auto"><strong>Possible Solution</strong></p> <p dir="auto">Throw <code class="notranslate">Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException</code> in such cases, or add simple console commend to check if we have circular dependency.</p>
<table role="table"> <thead> <tr> <th>Q</th> <th>A</th> </tr> </thead> <tbody> <tr> <td>Bug report?</td> <td>yes/no</td> </tr> <tr> <td>Feature request?</td> <td>no</td> </tr> <tr> <td>BC Break report?</td> <td>no</td> </tr> <tr> <td>RFC?</td> <td>no</td> </tr> <tr> <td>Symfony version</td> <td>3.4.3</td> </tr> </tbody> </table> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class SomeInterface { public function supports(object $obj); } class ChainSome implements SomeInterface { /* * @var SomeInterface[] */ private $somes; public function __construct(iterable $somes) { $this-&gt;somes = $somes; } public function supports(object $obj) { foreach ($this-&gt;somes as $some) { if ($some-&gt;supports($obj)) { return true; } } } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">SomeInterface</span> { <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">supports</span>(<span class="pl-smi"><span class="pl-smi">object</span></span> <span class="pl-s1"><span class="pl-c1">$</span>obj</span>); } <span class="pl-k">class</span> <span class="pl-v">ChainSome</span> <span class="pl-k">implements</span> <span class="pl-v">SomeInterface</span> { <span class="pl-c">/*</span> <span class="pl-c"> * @var SomeInterface[]</span> <span class="pl-c"> */</span> <span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>somes</span>; <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">__construct</span>(<span class="pl-smi">iterable</span> <span class="pl-s1"><span class="pl-c1">$</span>somes</span>) { <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">somes</span> = <span class="pl-s1"><span class="pl-c1">$</span>somes</span>; } <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">supports</span>(<span class="pl-smi"><span class="pl-smi">object</span></span> <span class="pl-s1"><span class="pl-c1">$</span>obj</span>) { <span class="pl-k">foreach</span> (<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">somes</span> <span class="pl-k">as</span> <span class="pl-s1"><span class="pl-c1">$</span>some</span>) { <span class="pl-k">if</span> (<span class="pl-s1"><span class="pl-c1">$</span>some</span>-&gt;<span class="pl-en">supports</span>(<span class="pl-s1"><span class="pl-c1">$</span>obj</span>)) { <span class="pl-k">return</span> <span class="pl-c1">true</span>; } } } }</pre></div> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="services: _instanceof: SomeInterface: tags: - { name: 'app.some' } ChainSome: arguments: $somes: !tagged app.some"><pre class="notranslate"><span class="pl-ent">services</span>: <span class="pl-ent">_instanceof</span>: <span class="pl-ent">SomeInterface</span>: <span class="pl-ent">tags</span>: - <span class="pl-s">{ name: 'app.some' }</span> <span class="pl-ent">ChainSome</span>: <span class="pl-ent">arguments</span>: <span class="pl-ent">$somes</span>: <span class="pl-s">!tagged app.some</span></pre></div> <p dir="auto">In this example <code class="notranslate">ChainSome</code> receive instance of self and code reach infinity loop.<br> Is this behavior is valid?<br> Maybe possible exclude self injection?</p>
1
<h3 dir="auto">version</h3> <p dir="auto">current latest master (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/denoland/deno/commit/bfce376c685694569be2cbf0716dd58f898c111e/hovercard" href="https://github.com/denoland/deno/commit/bfce376c685694569be2cbf0716dd58f898c111e"><tt>bfce376</tt></a>)</p> <h3 dir="auto">How to reproduce</h3> <ol dir="auto"> <li>create a file named <code class="notranslate">main.js</code>with the following content:</li> </ol> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="console.log('hello');"><pre class="notranslate"><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">'hello'</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <ol start="2" dir="auto"> <li>start running deno watcher by <code class="notranslate">cargo run -- run --watch --unstable main.js</code>. At this point we can see an output like:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="hello Watcher Process terminated! Restarting on file change..."><pre class="notranslate"><code class="notranslate">hello Watcher Process terminated! Restarting on file change... </code></pre></div> <ol start="3" dir="auto"> <li>create a new file named <code class="notranslate">new.js</code>. Nothing happens on the terminal.</li> </ol> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export const world = 'world';"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">world</span> <span class="pl-c1">=</span> <span class="pl-s">'world'</span><span class="pl-kos">;</span></pre></div> <ol start="4" dir="auto"> <li>edit <code class="notranslate">main.js</code> to the following and save it:</li> </ol> <div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="+import { world } from &quot;./new.js&quot;; console.log(&quot;hello&quot;); +console.log(world);"><pre class="notranslate"><span class="pl-mi1"><span class="pl-mi1">+</span>import { world } from "./new.js";</span> console.log("hello"); <span class="pl-mi1"><span class="pl-mi1">+</span>console.log(world);</span></pre></div> <p dir="auto">When saving it, we get:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Watcher File change detected! Restarting! hello world Watcher Process terminated! Restarting on file change..."><pre class="notranslate"><code class="notranslate">Watcher File change detected! Restarting! hello world Watcher Process terminated! Restarting on file change... </code></pre></div> <ol start="5" dir="auto"> <li>edit the value of <code class="notranslate">world</code> in <code class="notranslate">new.js</code> and save it:</li> </ol> <div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="-export const world = &quot;world&quot;; +export const world = &quot;Deno!&quot;;"><pre class="notranslate"><span class="pl-md"><span class="pl-md">-</span>export const world = "world";</span> <span class="pl-mi1"><span class="pl-mi1">+</span>export const world = "Deno!";</span></pre></div> <p dir="auto">When saving it, nothing happens although we expect <code class="notranslate">hello\nDeno!</code> to be printed.</p> <p dir="auto">I've already found the cause of this problem in the watcher implementation. This is because module resolution is done only once at the starting of the watcher. Basically we should resolve module every time any event is detected.</p> <p dir="auto">I'll look into this problem deeply and try to elabolate a solution.</p>
<p dir="auto">to reproduce:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="watching A.ts creating B.ts editing A.ts to import B editing B.ts watcher doesn't restart"><pre class="notranslate"><code class="notranslate">watching A.ts creating B.ts editing A.ts to import B editing B.ts watcher doesn't restart </code></pre></div>
1
<p dir="auto">Like this:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { prefixes } from &quot;https://ip-ranges.amazonaws.com/ip-ranges.json&quot; assert {type: &quot;json&quot;}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">prefixes</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"https://ip-ranges.amazonaws.com/ip-ranges.json"</span> <span class="pl-s1">assert</span> <span class="pl-kos">{</span><span class="pl-s1">type</span>: "<span class="pl-s1">json</span>"<span class="pl-kos">}</span></pre></div> <blockquote> <p dir="auto">error: Uncaught SyntaxError: The requested module '<a href="https://ip-ranges.amazonaws.com/ip-ranges.json" rel="nofollow">https://ip-ranges.amazonaws.com/ip-ranges.json</a>' does not provide an export named 'prefixes'</p> </blockquote> <p dir="auto">But you can look <code class="notranslate">deno</code> hints for <code class="notranslate">deno</code> plugins. And in fact, this json has <code class="notranslate">prefixes</code> fields.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/82551626/243170252-c331a022-083b-42bf-a9a1-b81f76cb5fcb.png"><img src="https://user-images.githubusercontent.com/82551626/243170252-c331a022-083b-42bf-a9a1-b81f76cb5fcb.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">This is my deno version</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno --version ─╯ deno 1.34.1 (release, x86_64-unknown-linux-gnu) v8 11.5.150.2 typescript 5.0.4"><pre class="notranslate"><code class="notranslate">deno --version ─╯ deno 1.34.1 (release, x86_64-unknown-linux-gnu) v8 11.5.150.2 typescript 5.0.4 </code></pre></div>
<p dir="auto">Hi, I'm really curious about this behavior; when importing a json in this way:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7959437/230442781-4ee63881-00ee-40ec-a3ba-fb6d39abb19f.png"><img src="https://user-images.githubusercontent.com/7959437/230442781-4ee63881-00ee-40ec-a3ba-fb6d39abb19f.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Works good. However this way:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7959437/230442894-b29c02f4-b642-47c5-b9d6-fd235c088510.png"><img src="https://user-images.githubusercontent.com/7959437/230442894-b29c02f4-b642-47c5-b9d6-fd235c088510.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">It breaks.</p> <p dir="auto">I'm not sure about the standard about this but if the latest is not supported, the Deno lsp should inform this is an error.</p> <p dir="auto">Thanks.</p>
1
<p dir="auto"><strong>TypeScript Version:</strong> 1.8.0-beta</p> <p dir="auto">VS Code's Javascript Salsa language service seems to break down as soon as I type a dynamic require into the buffer. I lose all language features: intellisense, mark occurrences, etc. I can only get out of that state by reloading Code's window.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require('' + '');"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">''</span> <span class="pl-c1">+</span> <span class="pl-s">''</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/22350/13171194/b87f0ff4-d6f1-11e5-9da7-7213791dfbd6.gif"><img src="https://cloud.githubusercontent.com/assets/22350/13171194/b87f0ff4-d6f1-11e5-9da7-7213791dfbd6.gif" alt="bug2" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">So I was googling and asking on StackOverflow. For now no clear answer. So decided to ask here as for me it is a blocker.</p> <p dir="auto">How can use the newest methods for existing JS types (like Array, Number)?</p> <p dir="auto"><code class="notranslate">Array.from(someIterable)</code> throws an error: <code class="notranslate">error TS2339: Property 'from' does not exist on type 'ArrayConstructor'</code></p> <p dir="auto">I would appreciate any tip, how to make it work.</p>
0
<p dir="auto">When overriding an unknown style the following warning is logged: <code class="notranslate">You are trying to overrides a style that do not exist.</code>.<br> Apart from the obvious typing error in the warning message, which should be fixed, I would like to suggest that the warning message also shows the respective style key.</p> <p dir="auto">Source file: <a href="https://github.com/callemall/material-ui/blob/fb8bcd94abf9f33e27bc60cda6d9e74d166f699e/src/styles/getStylesCreator.js#L18">https://github.com/callemall/material-ui/blob/fb8bcd94abf9f33e27bc60cda6d9e74d166f699e/src/styles/getStylesCreator.js#L18</a></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">When overriding a style which does not exist, I would like to know <em>which</em> style, which key respectively, does not exist.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">The shown warning in the console does not give any information about the wrong style key.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Create a theme override with an invalid style key, e.g.:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const theme = createMuiTheme({ overrides: { invalidKey : { } });"><pre class="notranslate"><code class="notranslate">const theme = createMuiTheme({ overrides: { invalidKey : { } }); </code></pre></div> <ol start="2" dir="auto"> <li>Open the <em>JavaScript</em> console.</li> <li>The console shows <code class="notranslate">bundle.js:6820 Warning: You are trying to overrides a style that do not exist.</code></li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">I recently updated to the most recent beta version and it seems that some style overrides are not longer available. I would like to track down the wrong style key without searching for it one-by-one.</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><a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/next/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/next">@next</a></td> </tr> </tbody> </table>
<h3 dir="auto">Checkbox value as number</h3> <p dir="auto">Right now i will get an error if I try to pass number as value in Checkbox.<br> I don't think that there should be any restriction only on string?<br> <code class="notranslate">Warning: Failed prop type: Invalid prop `value` of type `number` supplied to `Checkbox`, expected `string`.</code></p> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>v1.0.0-beta.24</td> </tr> <tr> <td>React</td> <td>16.2.0</td> </tr> <tr> <td>browser</td> <td>Any</td> </tr> </tbody> </table>
0
<p dir="auto">Are there any plans to add type stubs for PEP484-compliant static typing?</p>
<p dir="auto">I am trying to set up a flask application on my new machine. First I checked out the sources from our server - I am pretty sure the application directory structure is correct, as we are using it exactly like this on other machines.</p> <p dir="auto">However, when I try to run the app on my new computer I get the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ FLASK_ENV=&quot;development&quot; FLASK_APP=&quot;run.py&quot; flask run * Serving Flask app 'run.py' (lazy loading) * Environment: development * Debug mode: on Usage: flask run [OPTIONS] Try 'flask run --help' for help. Error: While importing 'run', an ImportError was raised."><pre class="notranslate"><code class="notranslate">$ FLASK_ENV="development" FLASK_APP="run.py" flask run * Serving Flask app 'run.py' (lazy loading) * Environment: development * Debug mode: on Usage: flask run [OPTIONS] Try 'flask run --help' for help. Error: While importing 'run', an ImportError was raised. </code></pre></div> <p dir="auto">Problem is: No more output is printed, in particular no stack trace. So I don't know what exactly the problem is. How can I tell flask to print the stack trace?</p> <p dir="auto">Environment:</p> <ul dir="auto"> <li>Python version: 3.8.10</li> <li>Flask version: 2.0.2</li> </ul>
0
<ul dir="auto"> <li>[x ] I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">NextJS sample application should load without any issue.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">v1.0.0-beta.28 broke something in theming. My code still works fine with v1.0.0-beta.27. Getting the following error in v1.0.0-beta.28<br> TypeError: Cannot read property 'charAt' of undefined<br> at decomposeColor (/user_code/node_modules/material-ui/styles/colorManipulator.js:80:12)<br> at lighten (/user_code/node_modules/material-ui/styles/colorManipulator.js:226:11)<br> at createPalette (/user_code/node_modules/material-ui/styles/createPalette.js:144:51)<br> at createMuiTheme (/user_code/node_modules/material-ui/styles/createMuiTheme.js:71:45)<br> at Object. (/user_code/next/dist/components/getPageContext.js:31:40)<br> at Module._compile (module.js:570:32)<br> at Object.Module._extensions..js (module.js:579:10)<br> at Module.load (module.js:487:32)<br> at tryModuleLoad (module.js:446:12)<br> at Function.Module._load (module.js:438:3)</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">Run the sample NextJS app with v1.0.0-beta.28 and v1.0.0-beta.27. In v1.0.0-beta.28, you'll get the above error.</p> <h2 dir="auto">Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> </table> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;next&quot;: &quot;^4.2.1&quot;, &quot;react&quot;: &quot;^16.2.0&quot;, &quot;react-dom&quot;: &quot;^16.2.0&quot;, &quot;material-ui&quot;: &quot;v1.0.0-beta.28&quot;,"><pre class="notranslate"><code class="notranslate"> "next": "^4.2.1", "react": "^16.2.0", "react-dom": "^16.2.0", "material-ui": "v1.0.0-beta.28", </code></pre></div>
<p dir="auto">I am using the latest "v1.0.0-beta.20".</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const theme = createMuiTheme({ palette: { primary: grey[100], secondary: blue['A400'] }, }); "><pre class="notranslate"><code class="notranslate">const theme = createMuiTheme({ palette: { primary: grey[100], secondary: blue['A400'] }, }); </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Cannot read property 'charAt' of undefined decomposeColor node_modules/material-ui/styles/colorManipulator.js:106 103 | * @returns {{type: string, values: number[]}} A MUI color object 104 | */ 105 | function decomposeColor(color) { &gt; 106 | if (color.charAt(0) === '#') { 107 | return decomposeColor(convertHexToRGB(color)); 108 | } 109 | "><pre class="notranslate"><code class="notranslate">TypeError: Cannot read property 'charAt' of undefined decomposeColor node_modules/material-ui/styles/colorManipulator.js:106 103 | * @returns {{type: string, values: number[]}} A MUI color object 104 | */ 105 | function decomposeColor(color) { &gt; 106 | if (color.charAt(0) === '#') { 107 | return decomposeColor(convertHexToRGB(color)); 108 | } 109 | </code></pre></div> <p dir="auto">where as this works, Any idea whats happening here ?</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const theme = createMuiTheme({ palette: { primary: grey, secondary: blue }, }); "><pre class="notranslate"><code class="notranslate">const theme = createMuiTheme({ palette: { primary: grey, secondary: blue }, }); </code></pre></div>
1
<p dir="auto">by <strong><a href="mailto:alexandru@mosoi.ro">alexandru@mosoi.ro</a></strong>:</p> <pre class="notranslate">What steps will reproduce the problem? If possible, include a link to a program on play.golang.org. 1. This bug is a duplicate of bug 3511 which was not correctly fixed <a href="https://golang.org/issue/3511" rel="nofollow">https://golang.org/issue/3511</a> If req.Method == 'POST' (anything other than GET and HEAD) the bug can be still reproduced. 2. Here is how to patch test to reproduce the failure. diff -r 1e84edee3397 src/pkg/net/http/client_test.go --- a/src/pkg/net/http/client_test.go Tue Aug 21 20:59:02 2012 +1000 +++ b/src/pkg/net/http/client_test.go Tue Aug 21 22:45:37 2012 +0200 @@ -284,6 +284,10 @@ req, _ := NewRequest("GET", us, nil) client.Do(req) // Note: doesn't hit network matchReturnedCookies(t, expectedCookies, tr.req.Cookies()) + + req, _ = NewRequest("POST", us, nil) + client.Do(req) // Note: doesn't hit network + matchReturnedCookies(t, expectedCookies, tr.req.Cookies()) } // Just enough correctness for our redirect tests. Uses the URL.Host as the 3. Currently if req.Method == 'POST', send() is invoked which doesn't set the cookies. The fix to bug 3511 did not set the cookies on all possible code paths. What is the expected output? HTTP cookies set for all methods. What do you see instead? HTTP cookies are not set for POST, PUT, etc. Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? Ubuntu 12.04 LTS (with custom go installation). Which version are you using? (run 'go version') go version weekly.2012-03-27 +1e84edee3397</pre>
<p dir="auto">by <strong>parenthephobia</strong>:</p> <pre class="notranslate">What steps will reproduce the problem? package main func main () { a := make(map[int] int); b := make(map[int] int); c := make(map[int] int); k := 1; a[k], b[k], c[k] = 1, 2, 3; } I expected: No output, but successful compilation. But instead got: The compiler segfaults without comment. What is your $GOOS? $GOARCH? linux, 386 Which revision are you using? (hg identify) I don't know at the moment. I did hg pull -u before reporting the bug, but unfortunately the build is broken on my current revision. Please provide any additional information below. Presumably this is caused by the way maps are handled. It looks like Go doesn't handle parallel assignments when some of the places being assigned to are maps.</pre>
0
<p dir="auto">Any plan to support redis-cluster?</p> <p dir="auto">I think redis-cluster can be simply implement by inheriting <code class="notranslate">celery.backend.redis.RedisBackend</code>, Is there any plan to do that?</p>
<p dir="auto">The python Redis Cluster lib <strong>Grokzen/redis-py-cluster</strong> is considered production ready, therefore suitable for integrating Redis Cluster into Celery (in the future <em>redis-py-cluster</em> will be integrated in <em>redis-py</em>, currently used by Celery).</p> <p dir="auto">As far as I can understand, Redis Cluster should be integrated in Kombu first (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="110934480" data-permission-text="Title is private" data-url="https://github.com/celery/kombu/issues/526" data-hovercard-type="issue" data-hovercard-url="/celery/kombu/issues/526/hovercard" href="https://github.com/celery/kombu/issues/526">celery/kombu#526</a>)</p>
1
<h3 dir="auto">Bug summary</h3> <p dir="auto">distutils is deprecated in Python 3.10: <a href="https://docs.python.org/3/library/distutils.html" rel="nofollow">https://docs.python.org/3/library/distutils.html</a></p> <p dir="auto">Matplotlib (as of 3.4.3) currently uses <code class="notranslate">distutils</code>, so users are met with <code class="notranslate">DeprecationWarning</code>s when using on Python 3.10.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" from matplotlib import pyplot .tox/py/lib/python3.10/site-packages/matplotlib/__init__.py:88: in &lt;module&gt; from distutils.version import LooseVersion /usr/local/lib/python3.10/distutils/__init__.py:19: in &lt;module&gt; warnings.warn(_DEPRECATION_MESSAGE, E DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives"><pre class="notranslate"><code class="notranslate"> from matplotlib import pyplot .tox/py/lib/python3.10/site-packages/matplotlib/__init__.py:88: in &lt;module&gt; from distutils.version import LooseVersion /usr/local/lib/python3.10/distutils/__init__.py:19: in &lt;module&gt; warnings.warn(_DEPRECATION_MESSAGE, E DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives </code></pre></div> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from matplotlib import pyplot"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span></pre></div> <h3 dir="auto">Actual outcome</h3> <p dir="auto"><code class="notranslate">DeprecationWarning</code> raised per summary.</p> <h3 dir="auto">Expected outcome</h3> <p dir="auto">No <code class="notranslate">DeprecationWarning</code>s raised</p> <h3 dir="auto">Additional information</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Operating system</h3> <p dir="auto">macOS</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">3.4.3</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Python version</h3> <p dir="auto">Python 3.10.0</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">pip</p>
<h3 dir="auto">Bug summary</h3> <p dir="auto"><a href="https://www.python.org/dev/peps/pep-0632/" rel="nofollow">Python 3.10 formally deprecated distutils.</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives"><pre class="notranslate"><code class="notranslate">DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives </code></pre></div> <p dir="auto">matplotlib still contains a few occurrences which should probably be removed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="setup.py:from distutils.errors import CompileError setup.py:from distutils.dist import Distribution setup.py:setup( # Finally, pass this all along to distutils to do the heavy lifting. setupext.py:from distutils import ccompiler, sysconfig setupext.py:from distutils.core import Extension setupext.py: Return or yield a list of C extensions (`distutils.core.Extension`"><pre class="notranslate"><code class="notranslate">setup.py:from distutils.errors import CompileError setup.py:from distutils.dist import Distribution setup.py:setup( # Finally, pass this all along to distutils to do the heavy lifting. setupext.py:from distutils import ccompiler, sysconfig setupext.py:from distutils.core import Extension setupext.py: Return or yield a list of C extensions (`distutils.core.Extension` </code></pre></div> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="-"><pre class="notranslate"><span class="pl-c1">-</span></pre></div> <h3 dir="auto">Actual outcome</h3> <ul dir="auto"> <li></li> </ul> <h3 dir="auto">Expected outcome</h3> <ul dir="auto"> <li></li> </ul> <h3 dir="auto">Operating system</h3> <p dir="auto">Ubuntu</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">master</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Python version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Other libraries</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Conda channel</h3> <p dir="auto"><em>No response</em></p>
1