text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<p dir="auto">Hi, I'm trying to build a model with functional API. But I got some error only when I use BatchNorm layer . A toy example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
from keras.layers import Input, BatchNormalization, Dense
from keras.models import Model
# model1:
input1 = Input((10,))
bn1 = BatchNormalization()(input1)
out1 = Dense(2, activation='softmax')(bn1)
model1 = Model(input1, out1)
# model2:
input2 = Input((10,))
out2 = Dense(10, activation='relu')(input2)
model2 = Model(input2, out2)
# model3 is just a simple stack of model1 and model2:
input3 = Input((10,))
out3 = model1(model2(input3))
model3 = Model(input3, out3)
# compile and train:
model1.compile(loss='categorical_crossentropy',
optimizer='adam',
metrics=['accuracy'])
y = np.zeros((10, 2))
x = np.zeros((10, 10))
model1.train_on_batch(x, y)"><pre class="notranslate"><code class="notranslate">import numpy as np
from keras.layers import Input, BatchNormalization, Dense
from keras.models import Model
# model1:
input1 = Input((10,))
bn1 = BatchNormalization()(input1)
out1 = Dense(2, activation='softmax')(bn1)
model1 = Model(input1, out1)
# model2:
input2 = Input((10,))
out2 = Dense(10, activation='relu')(input2)
model2 = Model(input2, out2)
# model3 is just a simple stack of model1 and model2:
input3 = Input((10,))
out3 = model1(model2(input3))
model3 = Model(input3, out3)
# compile and train:
model1.compile(loss='categorical_crossentropy',
optimizer='adam',
metrics=['accuracy'])
y = np.zeros((10, 2))
x = np.zeros((10, 10))
model1.train_on_batch(x, y)
</code></pre></div>
<p dir="auto">Then I get <code class="notranslate">InvalidArgumentError: You must feed a value for placeholder tensor 'input_3' with dtype float</code>. But model1 has nothing to do with input3 if I train it separately. The weird thing is that if I remove bn1 of model1 or change it to layers like Dense, this error will disappear.</p>
<p dir="auto">I use tensorflow backend and both tensorflow and keras are updated. Do I use functional API in the wrong way or it is a potential bug?</p> | <p dir="auto">The problem I am facing is that the input size is variable and I don't know how to get a symbolic shape in the middle of the graph.</p>
<p dir="auto">Is there a way to:</p>
<ol dir="auto">
<li>Get the <em>symbolic</em> shape of a layer</li>
<li>Specify a <em>symbolic</em> (i.e. variable at run time) <code class="notranslate">target_shape</code> in <code class="notranslate">Reshape(target_shape)</code></li>
</ol>
<p dir="auto">At the moment I came up with this ugly workaround. Is there something better?</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="x_shape = [10, None, None, None, 3] # batch + 4 axes
model = models.Sequential()
model.add(Convolution2D(64, 3, 3, border_mode='same', input_shape=x_shape[1:]))
# Will this cause the theano graph to be duplicated??
sh = model.get_output().shape
# Is there an easier way with core.Reshape??
model.add(Lambda(lambda x: x.flatten(ndim=2), output_shape=flattened_shape))
model.add(Activation(K.softmax))
reshape = Lambda(lambda x: x.reshape((sh[0], sh[1], T.prod(sh[2:]))))
# this is what I'd like to do instead
# model.add(Reshape((x.shape[0], x.shape[1], x.shape[2]*x.shape[3])))"><pre class="notranslate"><span class="pl-s1">x_shape</span> <span class="pl-c1">=</span> [<span class="pl-c1">10</span>, <span class="pl-c1">None</span>, <span class="pl-c1">None</span>, <span class="pl-c1">None</span>, <span class="pl-c1">3</span>] <span class="pl-c"># batch + 4 axes</span>
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-s1">models</span>.<span class="pl-v">Sequential</span>()
<span class="pl-s1">model</span>.<span class="pl-en">add</span>(<span class="pl-v">Convolution2D</span>(<span class="pl-c1">64</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-s1">border_mode</span><span class="pl-c1">=</span><span class="pl-s">'same'</span>, <span class="pl-s1">input_shape</span><span class="pl-c1">=</span><span class="pl-s1">x_shape</span>[<span class="pl-c1">1</span>:]))
<span class="pl-c"># Will this cause the theano graph to be duplicated??</span>
<span class="pl-s1">sh</span> <span class="pl-c1">=</span> <span class="pl-s1">model</span>.<span class="pl-en">get_output</span>().<span class="pl-s1">shape</span>
<span class="pl-c"># Is there an easier way with core.Reshape??</span>
<span class="pl-s1">model</span>.<span class="pl-en">add</span>(<span class="pl-v">Lambda</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-s1">x</span>.<span class="pl-en">flatten</span>(<span class="pl-s1">ndim</span><span class="pl-c1">=</span><span class="pl-c1">2</span>), <span class="pl-s1">output_shape</span><span class="pl-c1">=</span><span class="pl-s1">flattened_shape</span>))
<span class="pl-s1">model</span>.<span class="pl-en">add</span>(<span class="pl-v">Activation</span>(<span class="pl-v">K</span>.<span class="pl-s1">softmax</span>))
<span class="pl-s1">reshape</span> <span class="pl-c1">=</span> <span class="pl-v">Lambda</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-s1">x</span>.<span class="pl-en">reshape</span>((<span class="pl-s1">sh</span>[<span class="pl-c1">0</span>], <span class="pl-s1">sh</span>[<span class="pl-c1">1</span>], <span class="pl-v">T</span>.<span class="pl-en">prod</span>(<span class="pl-s1">sh</span>[<span class="pl-c1">2</span>:]))))
<span class="pl-c"># this is what I'd like to do instead</span>
<span class="pl-c"># model.add(Reshape((x.shape[0], x.shape[1], x.shape[2]*x.shape[3])))</span></pre></div> | 0 |
<p dir="auto">Consider:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Apple {
private size: number;
constructor(size: number) {
this.size = size;
}
get Size(): number {
return this.size;
}
}
let a: Apple = new Apple(4);
console.log(a.Size);
a.Size = 5; // should this should throw a compile time error?"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Apple</span> <span class="pl-kos">{</span>
<span class="pl-k">private</span> <span class="pl-c1">size</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">size</span>: <span class="pl-smi">number</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">size</span> <span class="pl-c1">=</span> <span class="pl-s1">size</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">get</span> <span class="pl-en">Size</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">size</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">let</span> <span class="pl-s1">a</span>: <span class="pl-smi">Apple</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Apple</span><span class="pl-kos">(</span><span class="pl-c1">4</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-c1">Size</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-c1">Size</span> <span class="pl-c1">=</span> <span class="pl-c1">5</span><span class="pl-kos">;</span> <span class="pl-c">// should this should throw a compile time error?</span></pre></div>
<p dir="auto">It strikes me that the attempted assignment to <code class="notranslate">a.Size</code> should produce a compile time error.</p>
<p dir="auto">Instead we learn about it at runtime (target <code class="notranslate">es6</code> with <code class="notranslate">v1.6.0-dev.20150806</code>)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[Error: Cannot set property Size of #<Apple> which has only a getter]"><pre class="notranslate"><code class="notranslate">[Error: Cannot set property Size of #<Apple> which has only a getter]
</code></pre></div>
<p dir="auto">Thoughts?</p> | <p dir="auto">If a property has a getter but no setter (or vice versa) than perhaps the attempt to set or get should be flagged as an error:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Fields{
get ReadOnly(){
return 10;
}
public written:number;
set WriteOnly(value:number){
this.written = value;
}
}
var obj = new Fields();
console.log(obj.ReadOnly); // 10
obj.ReadOnly = 20; // cannot set but no error
console.log(obj.ReadOnly) // 10
obj.WriteOnly = 20;
console.log(obj.written) // 20
console.log(obj.WriteOnly); // cannot read but no error "><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Fields</span><span class="pl-kos">{</span>
<span class="pl-k">get</span> <span class="pl-en">ReadOnly</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-c1">10</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">public</span> <span class="pl-c1">written</span>:<span class="pl-smi">number</span><span class="pl-kos">;</span>
<span class="pl-k">set</span> <span class="pl-en">WriteOnly</span><span class="pl-kos">(</span><span class="pl-s1">value</span>:<span class="pl-smi">number</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">written</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Fields</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">ReadOnly</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// 10</span>
<span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">ReadOnly</span> <span class="pl-c1">=</span> <span class="pl-c1">20</span><span class="pl-kos">;</span> <span class="pl-c">// cannot set but no error </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">obj</span><span class="pl-kos">.</span><span class="pl-c1">ReadOnly</span><span class="pl-kos">)</span> <span class="pl-c">// 10 </span>
<span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">WriteOnly</span> <span class="pl-c1">=</span> <span class="pl-c1">20</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">obj</span><span class="pl-kos">.</span><span class="pl-c1">written</span><span class="pl-kos">)</span> <span class="pl-c">// 20 </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">obj</span><span class="pl-kos">.</span><span class="pl-c1">WriteOnly</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// cannot read but no error </span></pre></div>
<p dir="auto">No biggie. But something to be aware of. (ported from <a href="http://typescript.codeplex.com/workitem/834" rel="nofollow">http://typescript.codeplex.com/workitem/834</a>)</p> | 1 |
<h1 dir="auto">Feature request</h1>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto">Amazon API Gateways have a stage in their URLs:</p>
<p dir="auto">E.g. <a href="https://vbe6aad5c.execute-api.us-east-1.amazonaws.com/prod/home" rel="nofollow">https://vbe6aad5c.execute-api.us-east-1.amazonaws.com/prod/home</a></p>
<p dir="auto">This breaks next8 serverless page deployments routing because there doesn't seem to be a way to configure nextjs with a basePath (/prod in this case).</p>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">I would like to be able to configure nextjs with a uri <code class="notranslate">basePath</code> which works with next's routing.</p>
<p dir="auto">Could be something like:</p>
<p dir="auto"><em>next.config.js</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = {
uriBasePath: '/prod'
}"><pre class="notranslate"><code class="notranslate">module.exports = {
uriBasePath: '/prod'
}
</code></pre></div>
<p dir="auto">Note <code class="notranslate">assetPrefix</code> doesn't work here because it applies only to static files AFAIK.</p>
<h2 dir="auto">Describe alternatives you've considered</h2>
<p dir="auto">Using a custom domain for the AWS API GW would solve the problem as it removes the /{stage} from the URL.</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">Following the README.md instructions on cloning and running the app should result in a running app, compiled correctly.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Running <code class="notranslate">npm i && npm run dev</code>:</p>
<ol dir="auto">
<li>Fails to build the app. Reason is, package.json specifies older react version but latest next.js</li>
<li>After upgrading react to 16, runtime error occurs due to missing "Transform Decorators Legacy" babel plugin.</li>
<li>After running<code class="notranslate">npm install babel-plugin-transform-decorators-legacy</code> the app loads without errors.</li>
</ol>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Clone the repo in a clean environment.</li>
<li>Run <code class="notranslate">npm i && npm run dev</code></li>
<li>Update React dependencies, and repeat (2)</li>
<li>Open the browser to <a href="http://localhost:3000/" rel="nofollow">http://localhost:3000/</a></li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">Attempting to learn how to integrate ant design into next.js app.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>4.1.3</td>
</tr>
<tr>
<td>node</td>
<td>7.3.0</td>
</tr>
<tr>
<td>OS</td>
<td>MacOS Sierra 10.12.6</td>
</tr>
<tr>
<td>browser</td>
<td>Google Chrome</td>
</tr>
<tr>
<td>react</td>
<td>^16.0.0</td>
</tr>
<tr>
<td>react-dom</td>
<td>^16.0.0</td>
</tr>
</tbody>
</table>
<h2 dir="auto">Suggested fix:</h2>
<p dir="auto">In package.json, use the following dependencies:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""dependencies": {
"antd": "^2.10.2",
"babel-plugin-import": "^1.1.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"next": "latest",
"react": "^16.0.0",
"react-dom": "^16.0.0"
}"><pre class="notranslate"><span class="pl-ent">"dependencies"</span>: {
<span class="pl-ent">"antd"</span>: <span class="pl-s"><span class="pl-pds">"</span>^2.10.2<span class="pl-pds">"</span></span>,
<span class="pl-ent">"babel-plugin-import"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.1.1<span class="pl-pds">"</span></span>,
<span class="pl-ent">"babel-plugin-transform-decorators-legacy"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.3.4<span class="pl-pds">"</span></span>,
<span class="pl-ent">"next"</span>: <span class="pl-s"><span class="pl-pds">"</span>latest<span class="pl-pds">"</span></span>,
<span class="pl-ent">"react"</span>: <span class="pl-s"><span class="pl-pds">"</span>^16.0.0<span class="pl-pds">"</span></span>,
<span class="pl-ent">"react-dom"</span>: <span class="pl-s"><span class="pl-pds">"</span>^16.0.0<span class="pl-pds">"</span></span>
}</pre></div>
<p dir="auto">or, alternatively, fix next version. Note that with the above package.json, I see the following errors running <code class="notranslate">npm list</code> command:</p>
<p dir="auto"><code class="notranslate">npm ERR! peer dep missing: react@^0.14.0 || ^15.0.0-0, required by [email protected] npm ERR! peer dep missing: react@^0.14.0 || ^15.0.1, required by [email protected] npm ERR! peer dep missing: react-dom@^0.14.0 || ^15.0.0-0, required by [email protected] npm ERR! peer dep missing: react-dom@^0.14.0 || ^15.0.1, required by [email protected] npm ERR! peer dep missing: jquery@>=1.8.0, required by [email protected]</code></p> | 0 |
<h3 dir="auto">Description</h3>
<p dir="auto">Running scrapy bench in 2.6.1 gives AttributeError exception</p>
<h3 dir="auto">Steps to Reproduce</h3>
<ol dir="auto">
<li><code class="notranslate">pip install scrapy==2.6.1 --upgrade</code></li>
<li><code class="notranslate">scrapy bench</code></li>
</ol>
<p dir="auto"><strong>Expected behavior:</strong> [What you expect to happen]<br>
It works fine in 2.5.1:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2022-03-15 20:59:25 [scrapy.core.engine] INFO: Spider closed (closespider_timeout)"><pre class="notranslate"><code class="notranslate">2022-03-15 20:59:25 [scrapy.core.engine] INFO: Spider closed (closespider_timeout)
</code></pre></div>
<p dir="auto"><strong>Actual behavior:</strong> [What actually happens]</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2022-03-15 20:57:36 [scrapy.utils.log] INFO: Scrapy 2.6.1 started (bot: scrapybot)
2022-03-15 20:57:36 [scrapy.utils.log] INFO: Versions: lxml 4.8.0.0, libxml2 2.9.12, cssselect 1.1.0, parsel 1.6.0, w3lib 1.22.0, Twisted 22.2.0, Python 3.9.7 (default, Sep 16 2021, 13:09:58) - [GCC 7.5.0], pyOpenSSL 22.0.0 (OpenSSL 1.1.1m 14 Dec 2021), cryptography 36.0.1, Platform Linux-5.10.0-12-amd64-x86_64-with-glibc2.31
2022-03-15 20:57:37 [scrapy.crawler] INFO: Overridden settings:
{'CLOSESPIDER_TIMEOUT': 10, 'LOGSTATS_INTERVAL': 1, 'LOG_LEVEL': 'INFO'}
2022-03-15 20:57:37 [scrapy.extensions.telnet] INFO: Telnet Password: cd24a9fdad5af2a4
2022-03-15 20:57:37 [scrapy.middleware] INFO: Enabled extensions:
['scrapy.extensions.corestats.CoreStats',
'scrapy.extensions.telnet.TelnetConsole',
'scrapy.extensions.memusage.MemoryUsage',
'scrapy.extensions.closespider.CloseSpider',
'scrapy.extensions.logstats.LogStats']
2022-03-15 20:57:37 [scrapy.middleware] INFO: Enabled downloader middlewares:
['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware',
'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware',
'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware',
'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware',
'scrapy.downloadermiddlewares.retry.RetryMiddleware',
'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware',
'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware',
'scrapy.downloadermiddlewares.redirect.RedirectMiddleware',
'scrapy.downloadermiddlewares.cookies.CookiesMiddleware',
'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware',
'scrapy.downloadermiddlewares.stats.DownloaderStats']
2022-03-15 20:57:37 [scrapy.middleware] INFO: Enabled spider middlewares:
['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware',
'scrapy.spidermiddlewares.offsite.OffsiteMiddleware',
'scrapy.spidermiddlewares.referer.RefererMiddleware',
'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware',
'scrapy.spidermiddlewares.depth.DepthMiddleware']
2022-03-15 20:57:37 [scrapy.middleware] INFO: Enabled item pipelines:
[]
2022-03-15 20:57:37 [scrapy.core.engine] INFO: Spider opened
2022-03-15 20:57:37 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:37 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023
2022-03-15 20:57:38 [scrapy.extensions.logstats] INFO: Crawled 61 pages (at 3660 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:39 [scrapy.extensions.logstats] INFO: Crawled 117 pages (at 3360 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:40 [scrapy.extensions.logstats] INFO: Crawled 165 pages (at 2880 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:41 [scrapy.extensions.logstats] INFO: Crawled 214 pages (at 2940 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:42 [scrapy.extensions.logstats] INFO: Crawled 269 pages (at 3300 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:43 [scrapy.extensions.logstats] INFO: Crawled 317 pages (at 2880 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:44 [scrapy.extensions.logstats] INFO: Crawled 358 pages (at 2460 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:45 [scrapy.extensions.logstats] INFO: Crawled 406 pages (at 2880 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:46 [scrapy.extensions.logstats] INFO: Crawled 453 pages (at 2820 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:47 [scrapy.core.engine] INFO: Closing spider (closespider_timeout)
2022-03-15 20:57:47 [scrapy.extensions.logstats] INFO: Crawled 486 pages (at 1980 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:48 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{'downloader/request_bytes': 215773,
'downloader/request_count': 501,
'downloader/request_method_count/GET': 501,
'downloader/response_bytes': 1458919,
'downloader/response_count': 501,
'downloader/response_status_count/200': 501,
'elapsed_time_seconds': 10.63502,
'finish_reason': 'closespider_timeout',
'finish_time': datetime.datetime(2022, 3, 15, 19, 57, 48, 193820),
'log_count/INFO': 20,
'memusage/max': 62078976,
'memusage/startup': 62078976,
'request_depth_max': 19,
'response_received_count': 501,
'scheduler/dequeued': 501,
'scheduler/dequeued/memory': 501,
'scheduler/enqueued': 10021,
'scheduler/enqueued/memory': 10021,
'start_time': datetime.datetime(2022, 3, 15, 19, 57, 37, 558800)}
2022-03-15 20:57:48 [scrapy.core.engine] INFO: Spider closed (closespider_timeout)
2022-03-15 20:57:48 [scrapy.core.engine] INFO: Error while scheduling new request
Traceback (most recent call last):
File "/home/nordange/anaconda3/envs/scraping/lib/python3.9/site-packages/twisted/internet/task.py", line 526, in _oneWorkUnit
result = next(self._iterator)
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nordange/anaconda3/envs/scraping/lib/python3.9/site-packages/twisted/internet/defer.py", line 857, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/home/nordange/anaconda3/envs/scraping/lib/python3.9/site-packages/scrapy/core/engine.py", line 187, in <lambda>
d.addBoth(lambda _: self.slot.nextcall.schedule())
AttributeError: 'NoneType' object has no attribute 'nextcall'
"><pre class="notranslate"><code class="notranslate">2022-03-15 20:57:36 [scrapy.utils.log] INFO: Scrapy 2.6.1 started (bot: scrapybot)
2022-03-15 20:57:36 [scrapy.utils.log] INFO: Versions: lxml 4.8.0.0, libxml2 2.9.12, cssselect 1.1.0, parsel 1.6.0, w3lib 1.22.0, Twisted 22.2.0, Python 3.9.7 (default, Sep 16 2021, 13:09:58) - [GCC 7.5.0], pyOpenSSL 22.0.0 (OpenSSL 1.1.1m 14 Dec 2021), cryptography 36.0.1, Platform Linux-5.10.0-12-amd64-x86_64-with-glibc2.31
2022-03-15 20:57:37 [scrapy.crawler] INFO: Overridden settings:
{'CLOSESPIDER_TIMEOUT': 10, 'LOGSTATS_INTERVAL': 1, 'LOG_LEVEL': 'INFO'}
2022-03-15 20:57:37 [scrapy.extensions.telnet] INFO: Telnet Password: cd24a9fdad5af2a4
2022-03-15 20:57:37 [scrapy.middleware] INFO: Enabled extensions:
['scrapy.extensions.corestats.CoreStats',
'scrapy.extensions.telnet.TelnetConsole',
'scrapy.extensions.memusage.MemoryUsage',
'scrapy.extensions.closespider.CloseSpider',
'scrapy.extensions.logstats.LogStats']
2022-03-15 20:57:37 [scrapy.middleware] INFO: Enabled downloader middlewares:
['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware',
'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware',
'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware',
'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware',
'scrapy.downloadermiddlewares.retry.RetryMiddleware',
'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware',
'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware',
'scrapy.downloadermiddlewares.redirect.RedirectMiddleware',
'scrapy.downloadermiddlewares.cookies.CookiesMiddleware',
'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware',
'scrapy.downloadermiddlewares.stats.DownloaderStats']
2022-03-15 20:57:37 [scrapy.middleware] INFO: Enabled spider middlewares:
['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware',
'scrapy.spidermiddlewares.offsite.OffsiteMiddleware',
'scrapy.spidermiddlewares.referer.RefererMiddleware',
'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware',
'scrapy.spidermiddlewares.depth.DepthMiddleware']
2022-03-15 20:57:37 [scrapy.middleware] INFO: Enabled item pipelines:
[]
2022-03-15 20:57:37 [scrapy.core.engine] INFO: Spider opened
2022-03-15 20:57:37 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:37 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023
2022-03-15 20:57:38 [scrapy.extensions.logstats] INFO: Crawled 61 pages (at 3660 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:39 [scrapy.extensions.logstats] INFO: Crawled 117 pages (at 3360 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:40 [scrapy.extensions.logstats] INFO: Crawled 165 pages (at 2880 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:41 [scrapy.extensions.logstats] INFO: Crawled 214 pages (at 2940 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:42 [scrapy.extensions.logstats] INFO: Crawled 269 pages (at 3300 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:43 [scrapy.extensions.logstats] INFO: Crawled 317 pages (at 2880 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:44 [scrapy.extensions.logstats] INFO: Crawled 358 pages (at 2460 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:45 [scrapy.extensions.logstats] INFO: Crawled 406 pages (at 2880 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:46 [scrapy.extensions.logstats] INFO: Crawled 453 pages (at 2820 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:47 [scrapy.core.engine] INFO: Closing spider (closespider_timeout)
2022-03-15 20:57:47 [scrapy.extensions.logstats] INFO: Crawled 486 pages (at 1980 pages/min), scraped 0 items (at 0 items/min)
2022-03-15 20:57:48 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{'downloader/request_bytes': 215773,
'downloader/request_count': 501,
'downloader/request_method_count/GET': 501,
'downloader/response_bytes': 1458919,
'downloader/response_count': 501,
'downloader/response_status_count/200': 501,
'elapsed_time_seconds': 10.63502,
'finish_reason': 'closespider_timeout',
'finish_time': datetime.datetime(2022, 3, 15, 19, 57, 48, 193820),
'log_count/INFO': 20,
'memusage/max': 62078976,
'memusage/startup': 62078976,
'request_depth_max': 19,
'response_received_count': 501,
'scheduler/dequeued': 501,
'scheduler/dequeued/memory': 501,
'scheduler/enqueued': 10021,
'scheduler/enqueued/memory': 10021,
'start_time': datetime.datetime(2022, 3, 15, 19, 57, 37, 558800)}
2022-03-15 20:57:48 [scrapy.core.engine] INFO: Spider closed (closespider_timeout)
2022-03-15 20:57:48 [scrapy.core.engine] INFO: Error while scheduling new request
Traceback (most recent call last):
File "/home/nordange/anaconda3/envs/scraping/lib/python3.9/site-packages/twisted/internet/task.py", line 526, in _oneWorkUnit
result = next(self._iterator)
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nordange/anaconda3/envs/scraping/lib/python3.9/site-packages/twisted/internet/defer.py", line 857, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/home/nordange/anaconda3/envs/scraping/lib/python3.9/site-packages/scrapy/core/engine.py", line 187, in <lambda>
d.addBoth(lambda _: self.slot.nextcall.schedule())
AttributeError: 'NoneType' object has no attribute 'nextcall'
</code></pre></div>
<p dir="auto"><strong>Reproduces how often:</strong> [What percentage of the time does it reproduce?]<br>
100%</p>
<h3 dir="auto">Versions</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Scrapy : 2.6.1
lxml : 4.8.0.0
libxml2 : 2.9.12
cssselect : 1.1.0
parsel : 1.6.0
w3lib : 1.22.0
Twisted : 22.2.0
Python : 3.9.7 (default, Sep 16 2021, 13:09:58) - [GCC 7.5.0]
pyOpenSSL : 22.0.0 (OpenSSL 1.1.1m 14 Dec 2021)
cryptography : 36.0.1
Platform : Linux-5.10.0-12-amd64-x86_64-with-glibc2.31"><pre class="notranslate"><code class="notranslate">Scrapy : 2.6.1
lxml : 4.8.0.0
libxml2 : 2.9.12
cssselect : 1.1.0
parsel : 1.6.0
w3lib : 1.22.0
Twisted : 22.2.0
Python : 3.9.7 (default, Sep 16 2021, 13:09:58) - [GCC 7.5.0]
pyOpenSSL : 22.0.0 (OpenSSL 1.1.1m 14 Dec 2021)
cryptography : 36.0.1
Platform : Linux-5.10.0-12-amd64-x86_64-with-glibc2.31
</code></pre></div> | <h3 dir="auto">Description</h3>
<p dir="auto">When switching from version 2.5.1 to 2.6.1, there was a problem with the parser terminating if the shutdown condition was CLOSESPIDER_TIMEOUT.</p>
<h3 dir="auto">Steps to Reproduce</h3>
<ol dir="auto">
<li>pip install -U scrapy</li>
<li>scrapy crawl --set 'CLOSESPIDER_TIMEOUT=1' some_crawler</li>
</ol>
<p dir="auto"><strong>Expected behavior:</strong> [What you expect to happen]</p>
<p dir="auto">2022-03-03 16:09:30 [scrapy.core.engine] INFO: Spider closed (closespider_timeout)</p>
<p dir="auto"><strong>Actual behavior:</strong> [What actually happens]</p>
<p dir="auto">2022-03-03 16:09:30 [scrapy.core.engine] INFO: Spider closed (closespider_timeout)<br>
2022-03-03 16:09:30 [scrapy.core.engine] INFO: Error while scheduling new request<br>
Traceback (most recent call last):<br>
File "c:\users\onedrive\python\scrapy_test\venv\lib\site-packages\twisted\internet\task.py", line 528, in _oneWorkUnit<br>
result = next(self._iterator)<br>
StopIteration</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\onedrive\python\scrapy_test\venv\lib\site-packages\twisted\internet\defer.py", line 858, in _runCallbacks<br>
current.result = callback( # type: ignore[misc]<br>
File "c:\users\onedrive\python\scrapy_test\venv\lib\site-packages\scrapy\core\engine.py", line 187, in <br>
d.addBoth(lambda _: self.slot.nextcall.schedule())<br>
AttributeError: 'NoneType' object has no attribute 'nextcall'</p>
<p dir="auto"><strong>Reproduces how often:</strong> [What percentage of the time does it reproduce?]</p>
<p dir="auto">It always reproduce</p>
<h3 dir="auto">Versions</h3>
<p dir="auto">Scrapy : 2.6.1<br>
lxml : 4.7.1.0<br>
libxml2 : 2.9.12<br>
cssselect : 1.1.0<br>
parsel : 1.6.0<br>
w3lib : 1.22.0<br>
Twisted : 21.7.0<br>
Python : 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)]<br>
pyOpenSSL : 22.0.0 (OpenSSL 1.1.1m 14 Dec 2021)<br>
cryptography : 36.0.1<br>
Platform : Windows-10-10.0.19044-SP0</p> | 1 |
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">After migrating to Webpack 5 my CSS doesn't get extracted into a single file. It is chunked across multiple files. I do feel all my issues are caused by the same source.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/963776/96571192-8a20d280-12cb-11eb-9e63-1e043da11b0a.png"><img src="https://user-images.githubusercontent.com/963776/96571192-8a20d280-12cb-11eb-9e63-1e043da11b0a.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/963776/96571294-aae92800-12cb-11eb-9314-8194c936ec96.png"><img src="https://user-images.githubusercontent.com/963776/96571294-aae92800-12cb-11eb-9314-8194c936ec96.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Another issue is if I give <code class="notranslate">name: 'styles'</code> for <code class="notranslate">cacheGroup.styles</code> I'll get an error. This happens with any cacheGroup if I give <code class="notranslate">name</code> (which I had previously for WP4).</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/963776/96570281-745edd80-12ca-11eb-84c8-7349090cf028.png"><img src="https://user-images.githubusercontent.com/963776/96570281-745edd80-12ca-11eb-84c8-7349090cf028.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I have a third problem. It seems like <code class="notranslate">css-minimizer-webpack-plugin</code> is being ignored. If you take a look on the second picture, the plugin supposed to remove the duplicates. One note to add here that I migrated from <code class="notranslate">optimize-css-assets-webpack-plugin</code>.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto">Here are my CSS related configs.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
plugins: [
new MiniCssExtractPlugin({
filename: '[contenthash].css',
ignoreOrder: true
})
],
optimization: {
runtimeChunk: 'single',
splitChunks: {
maxAsyncRequests: 25,
maxInitialRequests: 25,
automaticNameDelimiter: '~',
maxSize: 800000,
cacheGroups: {
commons: {
chunks: 'all',
test: /node_modules/,
priority: -10,
minSize: 100000
},
styles: {
test: /\.s?css$/,
chunks: 'all',
enforce: true,
reuseExistingChunk: true,
priority: 10
}
}
},
minimize: true,
minimizer: [
new CSSMinimizerWebpackPlugin({
sourceMap: true,
test: /\.css$/g,
minify: data => {
const [[filename, input]] = Object.entries(data)
// cssnano will remove duplicates
return (
require('cssnano')
.process(input, {
preset: ['default', { discardComments: { removeAll: true } }],
from: filename
})
// mqpacker will merge media queries and moves to the end
.then(function (cssnanoResult) {
return require('mqpacker').process(cssnanoResult, {
sort: true,
from: filename
})
})
.then(result => {
return {
css: result.css,
map: result.map,
warnings: result.warnings()
}
})
)
}
})
]
}
}"><pre class="notranslate"><code class="notranslate">{
plugins: [
new MiniCssExtractPlugin({
filename: '[contenthash].css',
ignoreOrder: true
})
],
optimization: {
runtimeChunk: 'single',
splitChunks: {
maxAsyncRequests: 25,
maxInitialRequests: 25,
automaticNameDelimiter: '~',
maxSize: 800000,
cacheGroups: {
commons: {
chunks: 'all',
test: /node_modules/,
priority: -10,
minSize: 100000
},
styles: {
test: /\.s?css$/,
chunks: 'all',
enforce: true,
reuseExistingChunk: true,
priority: 10
}
}
},
minimize: true,
minimizer: [
new CSSMinimizerWebpackPlugin({
sourceMap: true,
test: /\.css$/g,
minify: data => {
const [[filename, input]] = Object.entries(data)
// cssnano will remove duplicates
return (
require('cssnano')
.process(input, {
preset: ['default', { discardComments: { removeAll: true } }],
from: filename
})
// mqpacker will merge media queries and moves to the end
.then(function (cssnanoResult) {
return require('mqpacker').process(cssnanoResult, {
sort: true,
from: filename
})
})
.then(result => {
return {
css: result.css,
map: result.map,
warnings: result.warnings()
}
})
)
}
})
]
}
}
</code></pre></div>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">All CSS is extracted into a single file and <code class="notranslate">css-minimizer-webpack-plugin</code> is running through fine.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 5.1.3</p> | <h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong><br>
If <a href="https://github.com/AprilArcus/webpack-sri-workers-contenthash-repro/blob/main/webpack.config.js#L15">using contenthash</a> with a <a href="https://github.com/AprilArcus/webpack-sri-workers-contenthash-repro/blob/main/index.js#L1">WebWorker</a> and any plugin is calling <a href="https://github.com/AprilArcus/webpack-sri-workers-contenthash-repro/blob/main/minimalplugin.js#L22">Maintemplate.prototype.hook.localVars</a> such as the <a href="https://github.com/waysact/webpack-subresource-integrity/blob/main/webpack-subresource-integrity/index.ts#L168">webpack-subresource-integrity plugin</a>, the runtime starts requesting for undefined when it tries to load the web worker chunk both observed in the console and from <a href="https://github.com/webpack/webpack/blob/main/lib/runtime/GetChunkFilenameRuntimeModule.js#L240">adding logging in webpacks source</a> .</p>
<p dir="auto">Since this is happening as a sideeffect of calling .tap, I think the issue lies downstream of </p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/webpack/webpack/blob/c181294865dca01b28e6e316636fef5f2aad4eb6/lib/RuntimePlugin.js#L365">webpack/lib/RuntimePlugin.js</a>
</p>
<p class="mb-0 color-fg-muted">
Line 365
in
<a data-pjax="true" class="commit-tease-sha" href="/webpack/webpack/commit/c181294865dca01b28e6e316636fef5f2aad4eb6">c181294</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="L365" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="365"></td>
<td id="LC365" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">mainTemplate</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">.</span><span class="pl-c1">localVars</span><span class="pl-kos">.</span><span class="pl-en">isUsed</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> </td>
</tr>
</tbody></table>
</div>
</div>
but I'm not sure.<p></p>
<p dir="auto">This is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="967970393" data-permission-text="Title is private" data-url="https://github.com/waysact/webpack-subresource-integrity/issues/165" data-hovercard-type="issue" data-hovercard-url="/waysact/webpack-subresource-integrity/issues/165/hovercard" href="https://github.com/waysact/webpack-subresource-integrity/issues/165">waysact/webpack-subresource-integrity#165</a><br>
This is also possibly related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="945535628" data-permission-text="Title is private" data-url="https://github.com/webpack/webpack/issues/13801" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/13801/hovercard" href="https://github.com/webpack/webpack/issues/13801">#13801</a></p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
Minimal Reproduction: <a href="https://github.com/AprilArcus/webpack-sri-workers-contenthash-repro">https://github.com/AprilArcus/webpack-sri-workers-contenthash-repro</a></p>
<ol dir="auto">
<li>Use a worker with the new webpack 5 worker API</li>
<li>Use contentHash in output.chunkFileName</li>
<li>Create a plugin that simply taps into maintemplate.hook.localVars</li>
</ol>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
Expected Behavior: It shouldn't be putting undefined in the runtime for this chunk</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 5.50.0<br>
Node.js version: 16.6.0<br>
Operating System: macos / ubuntu<br>
Additional tools: none</p> | 0 |
<ol dir="auto">
<li>Right click on a file in tree view.</li>
</ol>
<p dir="auto"><strong>Atom Version</strong>: 0.210.0<br>
<strong>System</strong>: Microsoft Windows 10 Home Insider Preview<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: Cannot find module './context-menu'<br>
Error: Cannot find module './context-menu'<br>
at Function.Module._resolveFilename (module.js:328:15)<br>
at Function.Module._load (module.js:270:25)<br>
at Module.require (module.js:357:17)<br>
at require (module.js:376:17)<br>
at BrowserWindow. (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\src\browser\atom-window.js:152:27)<br>
at emitOne (events.js:77:13)<br>
at BrowserWindow.emit (events.js:166:7)<br>
at callFunction (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br>
at EventEmitter. (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br>
at emitMany (events.js:108:13)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\src\window-event-handler.js:150:33)
at HTMLDocument.handler (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)"><pre class="notranslate"><code class="notranslate">At C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\src\window-event-handler.js:150:33)
at HTMLDocument.handler (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\Tierney\AppData\Local\atom\app-0.210.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -1:05.5.0 core:backspace (atom-text-editor.editor.is-focused)
-1:03.3.0 core:save (atom-text-editor.editor.is-focused)
-1:00.0 core:undo (atom-text-editor.editor.is-focused)
4x -0:57.2.0 core:backspace (atom-text-editor.editor.is-focused)
-0:48.6.0 core:save (atom-text-editor.editor.is-focused)"><pre class="notranslate"><code class="notranslate"> -1:05.5.0 core:backspace (atom-text-editor.editor.is-focused)
-1:03.3.0 core:save (atom-text-editor.editor.is-focused)
-1:00.0 core:undo (atom-text-editor.editor.is-focused)
4x -0:57.2.0 core:backspace (atom-text-editor.editor.is-focused)
-0:48.6.0 core:save (atom-text-editor.editor.is-focused)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"autoHideMenuBar": true,
"projectHome": "C:\\Users\\Tierney\\code\\personal"
},
"editor": {
"invisibles": {},
"scrollPastEnd": true,
"scrollSensitivity": 60,
"softWrap": true,
"softWrapAtPreferredLineLength": true,
"tabLength": 4,
"zoomFontWhenCtrlScrolling": false
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"autoHideMenuBar"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"projectHome"</span>: <span class="pl-s"><span class="pl-pds">"</span>C:<span class="pl-cce">\\</span>Users<span class="pl-cce">\\</span>Tierney<span class="pl-cce">\\</span>code<span class="pl-cce">\\</span>personal<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"invisibles"</span>: {},
<span class="pl-ent">"scrollPastEnd"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"scrollSensitivity"</span>: <span class="pl-c1">60</span>,
<span class="pl-ent">"softWrap"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"softWrapAtPreferredLineLength"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"tabLength"</span>: <span class="pl-c1">4</span>,
<span class="pl-ent">"zoomFontWhenCtrlScrolling"</span>: <span class="pl-c1">false</span>
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
file-type-icons, v0.7.0
flex-tool-bar, v0.4.2
minimap, v4.10.0
new-tab, v0.3.0
pain-split, v1.4.0
project-manager, v1.15.10
symbols-tree-view, v0.9.3
tool-bar, v0.1.7
tool-bar-main, v0.0.8
tree-view-git-status, v0.1.1
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
file<span class="pl-k">-</span>type<span class="pl-k">-</span>icons, v0.<span class="pl-ii">7</span>.<span class="pl-ii">0</span>
flex<span class="pl-k">-</span>tool<span class="pl-k">-</span>bar, v0.<span class="pl-ii">4</span>.<span class="pl-ii">2</span>
minimap, v4.<span class="pl-ii">10</span>.<span class="pl-ii">0</span>
<span class="pl-k">new</span><span class="pl-k">-</span>tab, v0.<span class="pl-ii">3</span>.<span class="pl-ii">0</span>
pain<span class="pl-k">-</span>split, v1.<span class="pl-ii">4</span>.<span class="pl-ii">0</span>
project<span class="pl-k">-</span>manager, v1.<span class="pl-ii">15</span>.<span class="pl-ii">10</span>
symbols<span class="pl-k">-</span>tree<span class="pl-k">-</span>view, v0.<span class="pl-ii">9</span>.<span class="pl-ii">3</span>
tool<span class="pl-k">-</span>bar, v0.<span class="pl-ii">1</span>.<span class="pl-ii">7</span>
tool<span class="pl-k">-</span>bar<span class="pl-k">-</span>main, v0.<span class="pl-ii">0</span>.<span class="pl-ii">8</span>
tree<span class="pl-k">-</span>view<span class="pl-k">-</span>git<span class="pl-k">-</span>status, v0.<span class="pl-ii">1</span>.<span class="pl-ii">1</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | <p dir="auto">I right-clicked on a folder in the tree view</p>
<p dir="auto"><strong>Atom Version</strong>: 0.194.0<br>
<strong>System</strong>: Windows 7 Entreprise<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: Cannot find module './context-menu'<br>
Error: Cannot find module './context-menu'<br>
at Function.Module._resolveFilename (module.js:328:15)<br>
at Function.Module._load (module.js:270:25)<br>
at Module.require (module.js:357:17)<br>
at require (module.js:376:17)<br>
at BrowserWindow. (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)<br>
at emitOne (events.js:77:13)<br>
at BrowserWindow.emit (events.js:166:7)<br>
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br>
at EventEmitter. (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br>
at emitMany (events.js:108:13)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\window-event-handler.js:149:33)
at HTMLDocument.handler (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
"><pre class="notranslate"><code class="notranslate">At C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\window-event-handler.js:149:33)
at HTMLDocument.handler (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -4:55.5.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused)
2x -3:41.6.0 window:focus-pane-on-right (atom-text-editor.editor)
-3:17.5.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-2:47.4.0 editor:newline (atom-text-editor.editor.is-focused)
-2:38.2.0 core:cut (atom-text-editor.editor)
-2:36.5.0 core:paste (atom-text-editor.editor.is-focused)
-2:26.6.0 core:save (atom-text-editor.editor.is-focused)
-2:20.6.0 core:move-down (atom-text-editor.editor)
-2:20.4.0 autocomplete-plus:confirm (atom-text-editor.editor)
-2:15.8.0 core:save (atom-text-editor.editor)
-2:08.7.0 core:copy (atom-text-editor.editor.is-focused)
-2:01.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:59.7.0 core:save (atom-text-editor.editor.is-focused)
-1:52.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:51.6.0 core:save (atom-text-editor.editor.is-focused)
-1:30.6.0 core:backspace (atom-text-editor.editor)"><pre class="notranslate"><code class="notranslate"> -4:55.5.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused)
2x -3:41.6.0 window:focus-pane-on-right (atom-text-editor.editor)
-3:17.5.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-2:47.4.0 editor:newline (atom-text-editor.editor.is-focused)
-2:38.2.0 core:cut (atom-text-editor.editor)
-2:36.5.0 core:paste (atom-text-editor.editor.is-focused)
-2:26.6.0 core:save (atom-text-editor.editor.is-focused)
-2:20.6.0 core:move-down (atom-text-editor.editor)
-2:20.4.0 autocomplete-plus:confirm (atom-text-editor.editor)
-2:15.8.0 core:save (atom-text-editor.editor)
-2:08.7.0 core:copy (atom-text-editor.editor.is-focused)
-2:01.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:59.7.0 core:save (atom-text-editor.editor.is-focused)
-1:52.2.0 core:paste (atom-text-editor.editor.is-focused)
-1:51.6.0 core:save (atom-text-editor.editor.is-focused)
-1:30.6.0 core:backspace (atom-text-editor.editor)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"ignoredNames": [
"node_modules"
],
"themes": [
"atom-dark-ui",
"seti-syntax"
],
"disabledPackages": [
"Tern"
],
"projectHome": "Y:\\app-tfoumax"
},
"editor": {
"invisibles": {},
"softWrap": true,
"showIndentGuide": true
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"ignoredNames"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>node_modules<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"themes"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>seti-syntax<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"disabledPackages"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>Tern<span class="pl-pds">"</span></span>
],
<span class="pl-ent">"projectHome"</span>: <span class="pl-s"><span class="pl-pds">"</span>Y:<span class="pl-cce">\\</span>app-tfoumax<span class="pl-pds">"</span></span>
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"invisibles"</span>: {},
<span class="pl-ent">"softWrap"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"showIndentGuide"</span>: <span class="pl-c1">true</span>
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
autocomplete-plus, v2.12.0
autocomplete-snippets, v1.2.0
javascript-snippets, v1.0.0
jshint, v1.3.5
language-ejs, v0.1.0
linter, v0.12.1
pretty-json, v0.3.3
save-session, v0.14.0
Search, v0.4.0
seti-syntax, v0.4.0
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
autocomplete<span class="pl-k">-</span>plus, v2.<span class="pl-ii">12</span>.<span class="pl-ii">0</span>
autocomplete<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">2</span>.<span class="pl-ii">0</span>
javascript<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">0</span>.<span class="pl-ii">0</span>
jshint, v1.<span class="pl-ii">3</span>.<span class="pl-ii">5</span>
language<span class="pl-k">-</span>ejs, v0.<span class="pl-ii">1</span>.<span class="pl-ii">0</span>
linter, v0.<span class="pl-ii">12</span>.<span class="pl-ii">1</span>
pretty<span class="pl-k">-</span>json, v0.<span class="pl-ii">3</span>.<span class="pl-ii">3</span>
save<span class="pl-k">-</span>session, v0.<span class="pl-ii">14</span>.<span class="pl-ii">0</span>
Search, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span>
seti<span class="pl-k">-</span>syntax, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | 1 |
<p dir="auto">This suggestion has a few pieces:</p>
<ol dir="auto">
<li>Implement boolean literal types for <code class="notranslate">true</code> and <code class="notranslate">false</code>, in a fashion similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="47291043" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/1003" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/1003/hovercard" href="https://github.com/microsoft/TypeScript/issues/1003">#1003</a></li>
<li>Implement type guards for booleans. Essentially, control flow constructs like if-else, while, for, etc would be subject to a type guard if their guard expression is a boolean.</li>
<li>Now we can update generators to have a <code class="notranslate">next</code> method that returns <code class="notranslate">{ done: false; value: TYield; } | { done: true; value: TReturn; }</code>, where TYield is inferred from the yield expressions of a generator, and TReturn is inferred from the return expressions of a generator.</li>
<li>Iterators would return <code class="notranslate">{ done: false; value: TYield; } | { done: true; value: any; }</code> to be compatible with generators.</li>
<li>for-of, spread, array destructuring, and the type yielded by <code class="notranslate">yield*</code> would only pick the value associated with done being false.</li>
<li>The value of a <code class="notranslate">yield*</code> expression would pick the value associated with done being true.</li>
<li>Introduce a Generator type that can be used to track the desired type of a <code class="notranslate">yield</code> expression. This would be TNext, and would be the type of the parameter for the next method on a generator.</li>
</ol>
<p dir="auto">The generator type would look something like this:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Generator<TYield, TReturn, TNext> extends IterableIterator<TYield> {
next(value?: TNext): IteratorYieldResult<TYield> | IteratorReturnResult<TReturn>;
throw(exception: any): IteratorYieldResult<TYield> | IteratorReturnResult<TReturn>;
return(value: any): IteratorYieldResult<TYield> | IteratorReturnResult<TReturn>;
[Symbol.iterator](): Generator<TYield, TReturn, TNext>;
[Symbol.toStringTag]: string;
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Generator</span><span class="pl-c1"><</span><span class="pl-smi">TYield</span><span class="pl-kos">,</span> <span class="pl-smi">TReturn</span><span class="pl-kos">,</span> <span class="pl-smi">TNext</span><span class="pl-c1">></span> <span class="pl-k">extends</span> <span class="pl-smi">IterableIterator</span><span class="pl-kos"><</span><span class="pl-smi">TYield</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-c1">next</span><span class="pl-kos">(</span><span class="pl-s1">value</span>?: <span class="pl-smi">TNext</span><span class="pl-kos">)</span>: <span class="pl-smi">IteratorYieldResult</span><span class="pl-kos"><</span><span class="pl-smi">TYield</span><span class="pl-kos">></span> <span class="pl-c1">|</span> <span class="pl-smi">IteratorReturnResult</span><span class="pl-kos"><</span><span class="pl-smi">TReturn</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c1">throw</span><span class="pl-kos">(</span><span class="pl-s1">exception</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span>: <span class="pl-smi">IteratorYieldResult</span><span class="pl-kos"><</span><span class="pl-smi">TYield</span><span class="pl-kos">></span> <span class="pl-c1">|</span> <span class="pl-smi">IteratorReturnResult</span><span class="pl-kos"><</span><span class="pl-smi">TReturn</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-c1">return</span><span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span>: <span class="pl-smi">IteratorYieldResult</span><span class="pl-kos"><</span><span class="pl-smi">TYield</span><span class="pl-kos">></span> <span class="pl-c1">|</span> <span class="pl-smi">IteratorReturnResult</span><span class="pl-kos"><</span><span class="pl-smi">TReturn</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-kos">[</span><span class="pl-smi">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">iterator</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Generator</span><span class="pl-kos"><</span><span class="pl-smi">TYield</span><span class="pl-kos">,</span> <span class="pl-smi">TReturn</span><span class="pl-kos">,</span> <span class="pl-smi">TNext</span><span class="pl-kos">></span><span class="pl-kos">;</span>
<span class="pl-kos">[</span><span class="pl-smi">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">toStringTag</span><span class="pl-kos">]</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div> | <p dir="auto">If one try to set a property that hasn't any getter defined, the compiler doesn't emit any error or warning and the code silently fails à runtime.</p>
<p dir="auto">example:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Greeter {
private _greeting: string;
get greeting(): string { return this._greeting; }
constructor(message: string) {
this.greeting = message; //no error at compile time and silent failure at execution time
}
greet() {
return "Hello, " + this.greeting;
}
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Greeter</span> <span class="pl-kos">{</span>
<span class="pl-k">private</span> <span class="pl-c1">_greeting</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-k">get</span> <span class="pl-en">greeting</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">string</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">_greeting</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">message</span>: <span class="pl-smi">string</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">greeting</span> <span class="pl-c1">=</span> <span class="pl-s1">message</span><span class="pl-kos">;</span> <span class="pl-c">//no error at compile time and silent failure at execution time</span>
<span class="pl-kos">}</span>
<span class="pl-en">greet</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s">"Hello, "</span> <span class="pl-c1">+</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">greeting</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | 0 |
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li>Have I written custom code: no</li>
<li>OS Platform and Distribution: Windows 7, 64-bit</li>
<li>Tensorflow installed from: Anaconda 5.0.1 via pip 9.0.1<br>
(conda create -p C:\temp\tensorflow-gpu; pip install tensorflow-gpu)</li>
<li>Python 3.5.2</li>
<li>TensorFlow 1.5.0</li>
<li>CUDA 9.0</li>
<li>cuDNN 7.0</li>
<li>Bazel: N/A</li>
<li>GPU model and memory: NVIDIA Quadro K620, 2GB</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">Commands to reproduce:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="conda create -p C:\temp\tensorflow-gpu
activate C:\temp\tensorflow-gpu
pip install tensorflow-gpu
python
> import tensorflow"><pre class="notranslate"><code class="notranslate">conda create -p C:\temp\tensorflow-gpu
activate C:\temp\tensorflow-gpu
pip install tensorflow-gpu
python
> import tensorflow
</code></pre></div>
<p dir="auto">After installing all dependencies, tensorflow fails to import. Exactly the same error occurs with other Tf/CUDA/cuDNN versions (tried TF 1.4.0 + CUDA 7.0 + cuDNN 5.1 and TF 1.4.0 + CUDA 8.0 + cuDNN 6.0).</p>
<p dir="auto">While searching, I discovered a similar bug, but it contains a different error message: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="192386484" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/5949" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/5949/hovercard" href="https://github.com/tensorflow/tensorflow/issues/5949">#5949</a></p>
<h3 dir="auto">Source code / logs</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(C:\temp\tensorflow-gpu) C:\temp>python
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 5 2016, 11:41:13) [MSC v
.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\temp\tensorflow-gpu\lib\importlib\__init__.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\temp\tensorflow-gpu\lib\importlib\__init__.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\__init__.py", line 2
4, in <module>
from tensorflow.python import *
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\__init__.py",
line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\temp\tensorflow-gpu\lib\importlib\__init__.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\temp\tensorflow-gpu\lib\importlib\__init__.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_probl
ems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
>>>"><pre class="notranslate"><code class="notranslate">(C:\temp\tensorflow-gpu) C:\temp>python
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 5 2016, 11:41:13) [MSC v
.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\temp\tensorflow-gpu\lib\importlib\__init__.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\temp\tensorflow-gpu\lib\importlib\__init__.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\__init__.py", line 2
4, in <module>
from tensorflow.python import *
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\__init__.py",
line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\temp\tensorflow-gpu\lib\importlib\__init__.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\temp\tensorflow-gpu\lib\site-packages\tensorflow\python\pywrap_tensor
flow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\temp\tensorflow-gpu\lib\importlib\__init__.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_probl
ems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
>>>
</code></pre></div>
<p dir="auto">When doing "import tensorflow", these dlls are loaded:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="23:09:18,4934154 python.exe 4848 Load Image C:\temp\tensorflow-gpu\python.exe SUCCESS Image Base: 0x1ce20000, Image Size: 0xd000
23:09:18,4935443 python.exe 4848 Load Image C:\Windows\System32\ntdll.dll SUCCESS Image Base: 0x77190000, Image Size: 0x1aa000
23:09:18,4940523 python.exe 4848 Load Image C:\Windows\System32\kernel32.dll SUCCESS Image Base: 0x77070000, Image Size: 0x11f000
23:09:18,4942051 python.exe 4848 Load Image C:\Windows\System32\KernelBase.dll SUCCESS Image Base: 0x7fefd010000, Image Size: 0x6a000
23:09:18,4954354 python.exe 4848 Load Image C:\temp\tensorflow-gpu\python35.dll SUCCESS Image Base: 0x60840000, Image Size: 0x3e4000
23:09:18,4962254 python.exe 4848 Load Image C:\Windows\System32\ws2_32.dll SUCCESS Image Base: 0x7fefe860000, Image Size: 0x4d000
23:09:18,4963049 python.exe 4848 Load Image C:\Windows\System32\msvcrt.dll SUCCESS Image Base: 0x7fefec80000, Image Size: 0x9f000
23:09:18,4965005 python.exe 4848 Load Image C:\Windows\System32\rpcrt4.dll SUCCESS Image Base: 0x7fefe560000, Image Size: 0x12d000
23:09:18,4967902 python.exe 4848 Load Image C:\Windows\System32\nsi.dll SUCCESS Image Base: 0x7fefed20000, Image Size: 0x8000
23:09:18,4969281 python.exe 4848 Load Image C:\Windows\System32\advapi32.dll SUCCESS Image Base: 0x7fefed30000, Image Size: 0xdb000
23:09:18,4975579 python.exe 4848 Load Image C:\Windows\System32\sechost.dll SUCCESS Image Base: 0x7fefefc0000, Image Size: 0x1f000
23:09:18,4980934 python.exe 4848 Load Image C:\temp\tensorflow-gpu\vcruntime140.dll SUCCESS Image Base: 0x7fef9f20000, Image Size: 0x17000
23:09:18,4985102 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-runtime-l1-1-0.dll SUCCESS Image Base: 0x7fefae30000, Image Size: 0x4000
23:09:18,4990202 python.exe 4848 Load Image C:\temp\tensorflow-gpu\ucrtbase.dll SUCCESS Image Base: 0x7fef1980000, Image Size: 0xf6000
23:09:18,4993831 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-localization-l1-2-0.dll SUCCESS Image Base: 0x7fef9f10000, Image Size: 0x3000
23:09:18,4997199 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-processthreads-l1-1-1.dll SUCCESS Image Base: 0x7fef9f00000, Image Size: 0x3000
23:09:18,5000873 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-file-l1-2-0.dll SUCCESS Image Base: 0x7fef9c80000, Image Size: 0x3000
23:09:18,5004132 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-timezone-l1-1-0.dll SUCCESS Image Base: 0x7fef9c50000, Image Size: 0x3000
23:09:18,5007251 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-file-l2-1-0.dll SUCCESS Image Base: 0x7fef78f0000, Image Size: 0x3000
23:09:18,5010347 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-synch-l1-2-0.dll SUCCESS Image Base: 0x7fef78e0000, Image Size: 0x3000
23:09:18,5013723 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-string-l1-1-0.dll SUCCESS Image Base: 0x7fef7290000, Image Size: 0x4000
23:09:18,5017053 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-heap-l1-1-0.dll SUCCESS Image Base: 0x7fef5b80000, Image Size: 0x3000
23:09:18,5020326 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-stdio-l1-1-0.dll SUCCESS Image Base: 0x7fef5b20000, Image Size: 0x4000
23:09:18,5023556 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-convert-l1-1-0.dll SUCCESS Image Base: 0x7fef5a00000, Image Size: 0x4000
23:09:18,5027163 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-math-l1-1-0.dll SUCCESS Image Base: 0x7fef5680000, Image Size: 0x5000
23:09:18,5030972 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-locale-l1-1-0.dll SUCCESS Image Base: 0x7fef5670000, Image Size: 0x3000
23:09:18,5035867 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-time-l1-1-0.dll SUCCESS Image Base: 0x7fef5660000, Image Size: 0x3000
23:09:18,5040232 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-environment-l1-1-0.dll SUCCESS Image Base: 0x7fef5650000, Image Size: 0x3000
23:09:18,5043476 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-process-l1-1-0.dll SUCCESS Image Base: 0x7fef5640000, Image Size: 0x3000
23:09:18,5049748 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-conio-l1-1-0.dll SUCCESS Image Base: 0x7fef5630000, Image Size: 0x3000
23:09:18,5053460 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-filesystem-l1-1-0.dll SUCCESS Image Base: 0x7fef5620000, Image Size: 0x3000
23:09:18,5100964 python.exe 4848 Load Image C:\Windows\System32\cryptsp.dll SUCCESS Image Base: 0x7fefc6b0000, Image Size: 0x18000
23:09:18,5144867 python.exe 4848 Load Image C:\Windows\System32\rsaenh.dll SUCCESS Image Base: 0x7fefc3b0000, Image Size: 0x47000
23:09:18,5156094 python.exe 4848 Load Image C:\Windows\System32\cryptbase.dll SUCCESS Image Base: 0x7fefccc0000, Image Size: 0xf000
23:09:22,2812159 python.exe 4848 Load Image C:\temp\tensorflow-gpu\DLLs\_ctypes.pyd SUCCESS Image Base: 0x6dae0000, Image Size: 0x23000
23:09:22,2818451 python.exe 4848 Load Image C:\Windows\System32\ole32.dll SUCCESS Image Base: 0x7fefe1b0000, Image Size: 0x1fc000
23:09:22,2819936 python.exe 4848 Load Image C:\Windows\System32\gdi32.dll SUCCESS Image Base: 0x7fefee10000, Image Size: 0x67000
23:09:22,2821573 python.exe 4848 Load Image C:\Windows\System32\user32.dll SUCCESS Image Base: 0x76f70000, Image Size: 0xfa000
23:09:22,2823988 python.exe 4848 Load Image C:\Windows\System32\lpk.dll SUCCESS Image Base: 0x7fefef90000, Image Size: 0xe000
23:09:22,2825875 python.exe 4848 Load Image C:\Windows\System32\usp10.dll SUCCESS Image Base: 0x7fefe3b0000, Image Size: 0xcb000
23:09:22,2828244 python.exe 4848 Load Image C:\Windows\System32\oleaut32.dll SUCCESS Image Base: 0x7fefe480000, Image Size: 0xda000
23:09:22,2852213 python.exe 4848 Load Image C:\Windows\System32\imm32.dll SUCCESS Image Base: 0x7fefe7d0000, Image Size: 0x2e000
23:09:22,2854622 python.exe 4848 Load Image C:\Windows\System32\msctf.dll SUCCESS Image Base: 0x7fefee80000, Image Size: 0x109000
23:09:22,2873239 python.exe 4848 Load Image C:\Windows\System32\psapi.dll SUCCESS Image Base: 0x77350000, Image Size: 0x7000
23:09:22,3305458 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\core\multiarray.cp35-win_amd64.pyd SUCCESS Image Base: 0x7fee9230000, Image Size: 0x1a6000
23:09:22,3403641 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\.libs\libopenblas.BNVRK7633HSX7YVO2TADGR4A5KEKXJAW.gfortran-win_amd64.dll SUCCESS Image Base: 0x65600000, Image Size: 0x2457000
23:09:22,3413041 python.exe 4848 Load Image C:\Windows\System32\api-ms-win-crt-utility-l1-1-0.dll SUCCESS Image Base: 0x7fef5310000, Image Size: 0x3000
23:09:22,3504746 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\core\umath.cp35-win_amd64.pyd SUCCESS Image Base: 0x7fef1500000, Image Size: 0xcb000
23:09:22,4512966 python.exe 4848 Load Image C:\temp\tensorflow-gpu\DLLs\_bz2.pyd SUCCESS Image Base: 0x6da10000, Image Size: 0x1a000
23:09:22,4549442 python.exe 4848 Load Image C:\temp\tensorflow-gpu\DLLs\_lzma.pyd SUCCESS Image Base: 0x7fef43d0000, Image Size: 0x29000
23:09:22,4646128 python.exe 4848 Load Image C:\temp\tensorflow-gpu\DLLs\_hashlib.pyd SUCCESS Image Base: 0x7fee9c80000, Image Size: 0x167000
23:09:22,4963274 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\linalg\lapack_lite.cp35-win_amd64.pyd SUCCESS Image Base: 0x7fef4670000, Image Size: 0xb000
23:09:22,4978504 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\linalg\_umath_linalg.cp35-win_amd64.pyd SUCCESS Image Base: 0x7fef41a0000, Image Size: 0x21000
23:09:22,5099393 python.exe 4848 Load Image C:\temp\tensorflow-gpu\DLLs\_decimal.pyd SUCCESS Image Base: 0x6d930000, Image Size: 0x52000
23:09:22,5235329 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\fft\fftpack_lite.cp35-win_amd64.pyd SUCCESS Image Base: 0x7fef4620000, Image Size: 0x18000
23:09:22,5429263 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\random\mtrand.cp35-win_amd64.pyd SUCCESS Image Base: 0x7feef130000, Image Size: 0xaa000
23:09:22,5610733 python.exe 4848 Load Image C:\temp\tensorflow-gpu\msvcp140.dll SUCCESS Image Base: 0x7fef1460000, Image Size: 0x9e000
23:09:22,5617687 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-multibyte-l1-1-0.dll SUCCESS Image Base: 0x7fef4660000, Image Size: 0x5000
23:09:22,5628030 python.exe 4848 Load Image C:\Windows\System32\nvcuda.dll SUCCESS Image Base: 0x7fed7080000, Image Size: 0xd4c000
23:09:22,5629974 python.exe 4848 Load Image C:\Windows\System32\setupapi.dll SUCCESS Image Base: 0x7fefdfd0000, Image Size: 0x1d7000
23:09:22,5631437 python.exe 4848 Load Image C:\Windows\System32\cfgmgr32.dll SUCCESS Image Base: 0x7fefcfc0000, Image Size: 0x36000
23:09:22,5633367 python.exe 4848 Load Image C:\Windows\System32\devobj.dll SUCCESS Image Base: 0x7fefd210000, Image Size: 0x1a000
23:09:22,5634824 python.exe 4848 Load Image C:\Windows\System32\shell32.dll SUCCESS Image Base: 0x7fefd240000, Image Size: 0xd8a000
23:09:22,5636238 python.exe 4848 Load Image C:\Windows\System32\shlwapi.dll SUCCESS Image Base: 0x7fefeb80000, Image Size: 0x71000
23:09:22,5670519 python.exe 4848 Load Image C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\cudart64_90.dll SUCCESS Image Base: 0x7fef3320000, Image Size: 0x61000
23:09:22,5767031 python.exe 4848 Load Image C:\temp\cudnn\cuda\bin\cudnn64_7.dll SUCCESS Image Base: 0x7fec4ba0000, Image Size: 0x111e9000
23:09:22,5836291 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\tensorflow\python\_pywrap_tensorflow_internal.pyd SUCCESS Image Base: 0x7feb5630000, Image Size: 0xf564000
23:09:22,5848467 python.exe 4848 Load Image C:\Windows\System32\wsock32.dll SUCCESS Image Base: 0x7fef89d0000, Image Size: 0x9000"><pre class="notranslate"><code class="notranslate">23:09:18,4934154 python.exe 4848 Load Image C:\temp\tensorflow-gpu\python.exe SUCCESS Image Base: 0x1ce20000, Image Size: 0xd000
23:09:18,4935443 python.exe 4848 Load Image C:\Windows\System32\ntdll.dll SUCCESS Image Base: 0x77190000, Image Size: 0x1aa000
23:09:18,4940523 python.exe 4848 Load Image C:\Windows\System32\kernel32.dll SUCCESS Image Base: 0x77070000, Image Size: 0x11f000
23:09:18,4942051 python.exe 4848 Load Image C:\Windows\System32\KernelBase.dll SUCCESS Image Base: 0x7fefd010000, Image Size: 0x6a000
23:09:18,4954354 python.exe 4848 Load Image C:\temp\tensorflow-gpu\python35.dll SUCCESS Image Base: 0x60840000, Image Size: 0x3e4000
23:09:18,4962254 python.exe 4848 Load Image C:\Windows\System32\ws2_32.dll SUCCESS Image Base: 0x7fefe860000, Image Size: 0x4d000
23:09:18,4963049 python.exe 4848 Load Image C:\Windows\System32\msvcrt.dll SUCCESS Image Base: 0x7fefec80000, Image Size: 0x9f000
23:09:18,4965005 python.exe 4848 Load Image C:\Windows\System32\rpcrt4.dll SUCCESS Image Base: 0x7fefe560000, Image Size: 0x12d000
23:09:18,4967902 python.exe 4848 Load Image C:\Windows\System32\nsi.dll SUCCESS Image Base: 0x7fefed20000, Image Size: 0x8000
23:09:18,4969281 python.exe 4848 Load Image C:\Windows\System32\advapi32.dll SUCCESS Image Base: 0x7fefed30000, Image Size: 0xdb000
23:09:18,4975579 python.exe 4848 Load Image C:\Windows\System32\sechost.dll SUCCESS Image Base: 0x7fefefc0000, Image Size: 0x1f000
23:09:18,4980934 python.exe 4848 Load Image C:\temp\tensorflow-gpu\vcruntime140.dll SUCCESS Image Base: 0x7fef9f20000, Image Size: 0x17000
23:09:18,4985102 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-runtime-l1-1-0.dll SUCCESS Image Base: 0x7fefae30000, Image Size: 0x4000
23:09:18,4990202 python.exe 4848 Load Image C:\temp\tensorflow-gpu\ucrtbase.dll SUCCESS Image Base: 0x7fef1980000, Image Size: 0xf6000
23:09:18,4993831 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-localization-l1-2-0.dll SUCCESS Image Base: 0x7fef9f10000, Image Size: 0x3000
23:09:18,4997199 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-processthreads-l1-1-1.dll SUCCESS Image Base: 0x7fef9f00000, Image Size: 0x3000
23:09:18,5000873 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-file-l1-2-0.dll SUCCESS Image Base: 0x7fef9c80000, Image Size: 0x3000
23:09:18,5004132 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-timezone-l1-1-0.dll SUCCESS Image Base: 0x7fef9c50000, Image Size: 0x3000
23:09:18,5007251 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-file-l2-1-0.dll SUCCESS Image Base: 0x7fef78f0000, Image Size: 0x3000
23:09:18,5010347 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-core-synch-l1-2-0.dll SUCCESS Image Base: 0x7fef78e0000, Image Size: 0x3000
23:09:18,5013723 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-string-l1-1-0.dll SUCCESS Image Base: 0x7fef7290000, Image Size: 0x4000
23:09:18,5017053 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-heap-l1-1-0.dll SUCCESS Image Base: 0x7fef5b80000, Image Size: 0x3000
23:09:18,5020326 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-stdio-l1-1-0.dll SUCCESS Image Base: 0x7fef5b20000, Image Size: 0x4000
23:09:18,5023556 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-convert-l1-1-0.dll SUCCESS Image Base: 0x7fef5a00000, Image Size: 0x4000
23:09:18,5027163 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-math-l1-1-0.dll SUCCESS Image Base: 0x7fef5680000, Image Size: 0x5000
23:09:18,5030972 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-locale-l1-1-0.dll SUCCESS Image Base: 0x7fef5670000, Image Size: 0x3000
23:09:18,5035867 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-time-l1-1-0.dll SUCCESS Image Base: 0x7fef5660000, Image Size: 0x3000
23:09:18,5040232 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-environment-l1-1-0.dll SUCCESS Image Base: 0x7fef5650000, Image Size: 0x3000
23:09:18,5043476 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-process-l1-1-0.dll SUCCESS Image Base: 0x7fef5640000, Image Size: 0x3000
23:09:18,5049748 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-conio-l1-1-0.dll SUCCESS Image Base: 0x7fef5630000, Image Size: 0x3000
23:09:18,5053460 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-filesystem-l1-1-0.dll SUCCESS Image Base: 0x7fef5620000, Image Size: 0x3000
23:09:18,5100964 python.exe 4848 Load Image C:\Windows\System32\cryptsp.dll SUCCESS Image Base: 0x7fefc6b0000, Image Size: 0x18000
23:09:18,5144867 python.exe 4848 Load Image C:\Windows\System32\rsaenh.dll SUCCESS Image Base: 0x7fefc3b0000, Image Size: 0x47000
23:09:18,5156094 python.exe 4848 Load Image C:\Windows\System32\cryptbase.dll SUCCESS Image Base: 0x7fefccc0000, Image Size: 0xf000
23:09:22,2812159 python.exe 4848 Load Image C:\temp\tensorflow-gpu\DLLs\_ctypes.pyd SUCCESS Image Base: 0x6dae0000, Image Size: 0x23000
23:09:22,2818451 python.exe 4848 Load Image C:\Windows\System32\ole32.dll SUCCESS Image Base: 0x7fefe1b0000, Image Size: 0x1fc000
23:09:22,2819936 python.exe 4848 Load Image C:\Windows\System32\gdi32.dll SUCCESS Image Base: 0x7fefee10000, Image Size: 0x67000
23:09:22,2821573 python.exe 4848 Load Image C:\Windows\System32\user32.dll SUCCESS Image Base: 0x76f70000, Image Size: 0xfa000
23:09:22,2823988 python.exe 4848 Load Image C:\Windows\System32\lpk.dll SUCCESS Image Base: 0x7fefef90000, Image Size: 0xe000
23:09:22,2825875 python.exe 4848 Load Image C:\Windows\System32\usp10.dll SUCCESS Image Base: 0x7fefe3b0000, Image Size: 0xcb000
23:09:22,2828244 python.exe 4848 Load Image C:\Windows\System32\oleaut32.dll SUCCESS Image Base: 0x7fefe480000, Image Size: 0xda000
23:09:22,2852213 python.exe 4848 Load Image C:\Windows\System32\imm32.dll SUCCESS Image Base: 0x7fefe7d0000, Image Size: 0x2e000
23:09:22,2854622 python.exe 4848 Load Image C:\Windows\System32\msctf.dll SUCCESS Image Base: 0x7fefee80000, Image Size: 0x109000
23:09:22,2873239 python.exe 4848 Load Image C:\Windows\System32\psapi.dll SUCCESS Image Base: 0x77350000, Image Size: 0x7000
23:09:22,3305458 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\core\multiarray.cp35-win_amd64.pyd SUCCESS Image Base: 0x7fee9230000, Image Size: 0x1a6000
23:09:22,3403641 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\.libs\libopenblas.BNVRK7633HSX7YVO2TADGR4A5KEKXJAW.gfortran-win_amd64.dll SUCCESS Image Base: 0x65600000, Image Size: 0x2457000
23:09:22,3413041 python.exe 4848 Load Image C:\Windows\System32\api-ms-win-crt-utility-l1-1-0.dll SUCCESS Image Base: 0x7fef5310000, Image Size: 0x3000
23:09:22,3504746 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\core\umath.cp35-win_amd64.pyd SUCCESS Image Base: 0x7fef1500000, Image Size: 0xcb000
23:09:22,4512966 python.exe 4848 Load Image C:\temp\tensorflow-gpu\DLLs\_bz2.pyd SUCCESS Image Base: 0x6da10000, Image Size: 0x1a000
23:09:22,4549442 python.exe 4848 Load Image C:\temp\tensorflow-gpu\DLLs\_lzma.pyd SUCCESS Image Base: 0x7fef43d0000, Image Size: 0x29000
23:09:22,4646128 python.exe 4848 Load Image C:\temp\tensorflow-gpu\DLLs\_hashlib.pyd SUCCESS Image Base: 0x7fee9c80000, Image Size: 0x167000
23:09:22,4963274 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\linalg\lapack_lite.cp35-win_amd64.pyd SUCCESS Image Base: 0x7fef4670000, Image Size: 0xb000
23:09:22,4978504 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\linalg\_umath_linalg.cp35-win_amd64.pyd SUCCESS Image Base: 0x7fef41a0000, Image Size: 0x21000
23:09:22,5099393 python.exe 4848 Load Image C:\temp\tensorflow-gpu\DLLs\_decimal.pyd SUCCESS Image Base: 0x6d930000, Image Size: 0x52000
23:09:22,5235329 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\fft\fftpack_lite.cp35-win_amd64.pyd SUCCESS Image Base: 0x7fef4620000, Image Size: 0x18000
23:09:22,5429263 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\numpy\random\mtrand.cp35-win_amd64.pyd SUCCESS Image Base: 0x7feef130000, Image Size: 0xaa000
23:09:22,5610733 python.exe 4848 Load Image C:\temp\tensorflow-gpu\msvcp140.dll SUCCESS Image Base: 0x7fef1460000, Image Size: 0x9e000
23:09:22,5617687 python.exe 4848 Load Image C:\temp\tensorflow-gpu\api-ms-win-crt-multibyte-l1-1-0.dll SUCCESS Image Base: 0x7fef4660000, Image Size: 0x5000
23:09:22,5628030 python.exe 4848 Load Image C:\Windows\System32\nvcuda.dll SUCCESS Image Base: 0x7fed7080000, Image Size: 0xd4c000
23:09:22,5629974 python.exe 4848 Load Image C:\Windows\System32\setupapi.dll SUCCESS Image Base: 0x7fefdfd0000, Image Size: 0x1d7000
23:09:22,5631437 python.exe 4848 Load Image C:\Windows\System32\cfgmgr32.dll SUCCESS Image Base: 0x7fefcfc0000, Image Size: 0x36000
23:09:22,5633367 python.exe 4848 Load Image C:\Windows\System32\devobj.dll SUCCESS Image Base: 0x7fefd210000, Image Size: 0x1a000
23:09:22,5634824 python.exe 4848 Load Image C:\Windows\System32\shell32.dll SUCCESS Image Base: 0x7fefd240000, Image Size: 0xd8a000
23:09:22,5636238 python.exe 4848 Load Image C:\Windows\System32\shlwapi.dll SUCCESS Image Base: 0x7fefeb80000, Image Size: 0x71000
23:09:22,5670519 python.exe 4848 Load Image C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\cudart64_90.dll SUCCESS Image Base: 0x7fef3320000, Image Size: 0x61000
23:09:22,5767031 python.exe 4848 Load Image C:\temp\cudnn\cuda\bin\cudnn64_7.dll SUCCESS Image Base: 0x7fec4ba0000, Image Size: 0x111e9000
23:09:22,5836291 python.exe 4848 Load Image C:\temp\tensorflow-gpu\Lib\site-packages\tensorflow\python\_pywrap_tensorflow_internal.pyd SUCCESS Image Base: 0x7feb5630000, Image Size: 0xf564000
23:09:22,5848467 python.exe 4848 Load Image C:\Windows\System32\wsock32.dll SUCCESS Image Base: 0x7fef89d0000, Image Size: 0x9000
</code></pre></div> | <h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: NO</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Ubuntu 16.04</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: pip install</li>
<li><strong>TensorFlow version (use command below)</strong>: v1.9.0-rc0-35-g17d6639b55 1.9.0-rc1</li>
<li><strong>Python version</strong>: 3.6</li>
<li><strong>CUDA/cuDNN version</strong>: CUDA 9.0 / cuDNN 7</li>
<li><strong>GPU model and memory</strong>: GTX 1080</li>
<li><strong>Exact command to reproduce</strong>:</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import tensorflow as tf
def conv_block(inputs, filters, kernel_size, strides, scope):
'''Create a simple Conv --> BN --> ReLU6 block'''
with tf.variable_scope(scope):
x = tf.keras.layers.Conv2D(filters, kernel_size, strides, name='conv2d')(inputs)
x = tf.keras.layers.BatchNormalization(name='BN')(x)
x = tf.keras.layers.Activation(tf.nn.relu6)(x)
return x
def reproduce_keras_variable_scope_error():
# Construct a simple model
inputs = tf.keras.Input(shape=[224, 224, 3], batch_size=1, name='inputs')
hidden = conv_block(inputs, 32, 3, 2, scope='block_1')
outputs = conv_block(hidden, 64, 3, 2, scope='block_2')
# This is fine, the tensor scopes are matched as expected
for v in tf.trainable_variables():
print('{:20} {}'.format(v.name, v.shape))
# Problem happens here. Please consult the error output below.
model = tf.keras.Model(inputs, outputs)
model.summary()
if __name__ =='__main__':
reproduce_keras_variable_scope_error()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span>
<span class="pl-k">def</span> <span class="pl-en">conv_block</span>(<span class="pl-s1">inputs</span>, <span class="pl-s1">filters</span>, <span class="pl-s1">kernel_size</span>, <span class="pl-s1">strides</span>, <span class="pl-s1">scope</span>):
<span class="pl-s">'''Create a simple Conv --> BN --> ReLU6 block'''</span>
<span class="pl-k">with</span> <span class="pl-s1">tf</span>.<span class="pl-en">variable_scope</span>(<span class="pl-s1">scope</span>):
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-v">Conv2D</span>(<span class="pl-s1">filters</span>, <span class="pl-s1">kernel_size</span>, <span class="pl-s1">strides</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'conv2d'</span>)(<span class="pl-s1">inputs</span>)
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-v">BatchNormalization</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'BN'</span>)(<span class="pl-s1">x</span>)
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-v">Activation</span>(<span class="pl-s1">tf</span>.<span class="pl-s1">nn</span>.<span class="pl-s1">relu6</span>)(<span class="pl-s1">x</span>)
<span class="pl-k">return</span> <span class="pl-s1">x</span>
<span class="pl-k">def</span> <span class="pl-en">reproduce_keras_variable_scope_error</span>():
<span class="pl-c"># Construct a simple model</span>
<span class="pl-s1">inputs</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-v">Input</span>(<span class="pl-s1">shape</span><span class="pl-c1">=</span>[<span class="pl-c1">224</span>, <span class="pl-c1">224</span>, <span class="pl-c1">3</span>], <span class="pl-s1">batch_size</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'inputs'</span>)
<span class="pl-s1">hidden</span> <span class="pl-c1">=</span> <span class="pl-en">conv_block</span>(<span class="pl-s1">inputs</span>, <span class="pl-c1">32</span>, <span class="pl-c1">3</span>, <span class="pl-c1">2</span>, <span class="pl-s1">scope</span><span class="pl-c1">=</span><span class="pl-s">'block_1'</span>)
<span class="pl-s1">outputs</span> <span class="pl-c1">=</span> <span class="pl-en">conv_block</span>(<span class="pl-s1">hidden</span>, <span class="pl-c1">64</span>, <span class="pl-c1">3</span>, <span class="pl-c1">2</span>, <span class="pl-s1">scope</span><span class="pl-c1">=</span><span class="pl-s">'block_2'</span>)
<span class="pl-c"># This is fine, the tensor scopes are matched as expected</span>
<span class="pl-k">for</span> <span class="pl-s1">v</span> <span class="pl-c1">in</span> <span class="pl-s1">tf</span>.<span class="pl-en">trainable_variables</span>():
<span class="pl-en">print</span>(<span class="pl-s">'{:20} {}'</span>.<span class="pl-en">format</span>(<span class="pl-s1">v</span>.<span class="pl-s1">name</span>, <span class="pl-s1">v</span>.<span class="pl-s1">shape</span>))
<span class="pl-c"># Problem happens here. Please consult the error output below.</span>
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-v">Model</span>(<span class="pl-s1">inputs</span>, <span class="pl-s1">outputs</span>)
<span class="pl-s1">model</span>.<span class="pl-en">summary</span>()
<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span><span class="pl-s">'__main__'</span>:
<span class="pl-en">reproduce_keras_variable_scope_error</span>()</pre></div>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">The problem is Keras layers do not probably name its variables according the <code class="notranslate">variable_scope</code> . Therefore, I cannot call <code class="notranslate">conv_block</code> multiple times.</p>
<ul dir="auto">
<li>This problem occurs when calling <code class="notranslate">tf.layers</code> as well.</li>
<li>I would like to use <code class="notranslate">tf.keras.Model</code> because I might convert to <code class="notranslate">Estimator</code> later.</li>
</ul>
<h3 dir="auto">Source code / logs</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="block_1/conv2d/kernel:0 (3, 3, 3, 32)
block_1/conv2d/bias:0 (32,)
block_1/BN/gamma:0 (32,)
block_1/BN/beta:0 (32,)
block_2/conv2d/kernel:0 (3, 3, 32, 64)
block_2/conv2d/bias:0 (64,)
block_2/BN/gamma:0 (64,)
block_2/BN/beta:0 (64,)
Traceback (most recent call last):
File "tf_keras_layer.py", line 24, in <module>
reproduce_variable_scope_error()
File "tf_keras_layer.py", line 20, in reproduce_variable_scope_error
model = tf.keras.Model(inputs, outputs)
File "/home/dat/miniconda2/envs/portrait/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 112, in __init__
super(Model, self).__init__(*args, **kwargs)
File "/home/dat/miniconda2/envs/portrait/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 78, in __init__
self._init_graph_network(*args, **kwargs)
File "/home/dat/miniconda2/envs/portrait/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 244, in _init_graph_network
self.inputs, self.outputs)
File "/home/dat/miniconda2/envs/portrait/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 1689, in _map_graph_network
str(all_names.count(name)) + ' times in the model. '
ValueError: The name "conv2d" is used 2 times in the model. All layer names should be unique."><pre class="notranslate">block_1/conv2d/kernel:0 (3, 3, 3, 32)
block_1/conv2d/bias:0 (32,)
block_1/BN/gamma:0 (32,)
block_1/BN/beta:0 (32,)
block_2/conv2d/kernel:0 (3, 3, 32, 64)
block_2/conv2d/bias:0 (64,)
block_2/BN/gamma:0 (64,)
block_2/BN/beta:0 (64,)
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span>tf_keras_layer.py<span class="pl-pds">"</span></span>, line 24, <span class="pl-k">in</span> <span class="pl-k"><</span>module<span class="pl-k">></span>
<span class="pl-en">reproduce_variable_scope_error</span>()
File <span class="pl-s"><span class="pl-pds">"</span>tf_keras_layer.py<span class="pl-pds">"</span></span>, line 20, <span class="pl-k">in</span> reproduce_variable_scope_error
model = tf.keras.Model(inputs, outputs)
File <span class="pl-s"><span class="pl-pds">"</span>/home/dat/miniconda2/envs/portrait/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py<span class="pl-pds">"</span></span>, line 112, <span class="pl-k">in</span> __init__
super(Model, self).__init__(<span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
File <span class="pl-s"><span class="pl-pds">"</span>/home/dat/miniconda2/envs/portrait/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py<span class="pl-pds">"</span></span>, line 78, <span class="pl-k">in</span> __init__
self._init_graph_network(<span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
File <span class="pl-s"><span class="pl-pds">"</span>/home/dat/miniconda2/envs/portrait/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py<span class="pl-pds">"</span></span>, line 244, <span class="pl-k">in</span> _init_graph_network
self.inputs, self.outputs)
File <span class="pl-s"><span class="pl-pds">"</span>/home/dat/miniconda2/envs/portrait/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py<span class="pl-pds">"</span></span>, line 1689, <span class="pl-k">in</span> _map_graph_network
str(all_names.count(name)) + <span class="pl-s"><span class="pl-pds">'</span> times in the model. <span class="pl-pds">'</span></span>
ValueError: The name <span class="pl-s"><span class="pl-pds">"</span>conv2d<span class="pl-pds">"</span></span> is used 2 <span class="pl-c1">times</span> <span class="pl-k">in</span> the model. All layer names should be unique.</pre></div> | 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.18362.0
Windows Terminal version (if applicable): 0.5.2762.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.5.2762.0
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Resize the window to smaller, then back to about its original size or even bigger.</p>
<p dir="auto">Close the window.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The window should simply disappear.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">For a fraction of a second, tons of horizontal and vertical lines, which look like the border of the window at its previous sizes, are painted inside the window area.</p>
<p dir="auto">This suspiciously looks like some leftover widgets that don't get properly cleaned up during a resize, potentially consuming various resources (and maybe causing who knows what other problems).</p>
<p dir="auto">(Could be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="507385021" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/3207" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/3207/hovercard" href="https://github.com/microsoft/terminal/issues/3207">#3207</a>?)</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5750745/66922099-afc72c00-f026-11e9-8ef2-d568a8223cda.png"><img src="https://user-images.githubusercontent.com/5750745/66922099-afc72c00-f026-11e9-8ef2-d568a8223cda.png" alt="WT-closing" style="max-width: 100%;"></a></p> | <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17381223/64915108-20fa9180-d792-11e9-9ed4-8266c3307e0a.PNG"><img src="https://user-images.githubusercontent.com/17381223/64915108-20fa9180-d792-11e9-9ed4-8266c3307e0a.PNG" alt="3" style="max-width: 100%;"></a></p> | 0 |
<ul dir="auto">
<li>VSCode Version: 0.10.11</li>
<li>OS Version: Windows 7</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Set the "Language Mode" to "Javascript"</li>
<li>Write "variable", you'll see that the prefix "var" is highlighted</li>
</ol>
<p dir="auto">This doesn't happen when the word starting with "var" is part of a function argument, or inside strings<br>
*Tried with multiple themes, issues seems to be theme-agnostic (happens on all of them)</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5549335/13951630/ed72bd52-f03a-11e5-9131-cd55a0938c7f.png"><img src="https://cloud.githubusercontent.com/assets/5549335/13951630/ed72bd52-f03a-11e5-9131-cd55a0938c7f.png" alt="variables" style="max-width: 100%;"></a></p> | <p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/f111fei/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/f111fei">@f111fei</a> on February 23, 2016 6:14</em></p>
<p dir="auto">version: 0.10.10<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7069719/13243197/80630302-da37-11e5-9ccf-a63d6f23433d.png"><img src="https://cloud.githubusercontent.com/assets/7069719/13243197/80630302-da37-11e5-9ccf-a63d6f23433d.png" alt="2" style="max-width: 100%;"></a></p>
<p dir="auto"><code class="notranslate">letter</code></p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135646950" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3270" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3270/hovercard" href="https://github.com/microsoft/vscode/issues/3270">microsoft/vscode#3270</a></em></p> | 1 |
<p dir="auto">Traceback (most recent call last):<br>
File "/home/hsy/wh/license_plate/datasets/ccpd.py", line 6, in <br>
import pycocotools.coco as coco<br>
File "/home/hsy/.local/lib/python3.6/site-packages/pycocotools-2.0-py3.6-linux-x86_64.egg/pycocotools/coco.py", line 49, in <br>
import matplotlib.pyplot as plt<br>
File "/home/hsy/.local/lib/python3.6/site-packages/matplotlib-3.3.0-py3.6-linux-x86_64.egg/matplotlib/pyplot.py", line 43, in <br>
from matplotlib.figure import Figure, figaspect<br>
File "/home/hsy/.local/lib/python3.6/site-packages/matplotlib-3.3.0-py3.6-linux-x86_64.egg/matplotlib/figure.py", line 18, in <br>
from matplotlib import docstring, projections<br>
File "/home/hsy/.local/lib/python3.6/site-packages/matplotlib-3.3.0-py3.6-linux-x86_64.egg/matplotlib/projections/<strong>init</strong>.py", line 4, in <br>
from mpl_toolkits.mplot3d import Axes3D<br>
File "/home/hsy/anaconda3/envs/tf15_gpu/lib/python3.6/site-packages/mpl_toolkits/mplot3d/<strong>init</strong>.py", line 1, in <br>
from .axes3d import Axes3D<br>
File "/home/hsy/anaconda3/envs/tf15_gpu/lib/python3.6/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 24, in <br>
import matplotlib.projections as proj<br>
<strong>AttributeError: module 'matplotlib' has no attribute 'projections'</strong><br>
What does this question mean?(My matplotlib version is 3.3.0)</p> | <h1 dir="auto">Summary</h1>
<p dir="auto">Currently, when you plot several artists on the same axis and use the pyplot.legend(), the ordering of the entries is somewhat mysterious for the average user, see <a href="http://stackoverflow.com/questions/22263807/how-is-order-of-items-in-matplotlib-legend-determined" rel="nofollow">http://stackoverflow.com/questions/22263807/how-is-order-of-items-in-matplotlib-legend-determined</a>.</p>
<p dir="auto">Like many of my peers, I use matplotlib to make plots for science publications and regularly want to customize the order of the items in the legend when I polish plots. I argue that this is a common thing to do, and therefore it should be easy to do with the API.</p>
<p dir="auto">My request is to add a new keyword <code class="notranslate">lorder</code> to artist constructors, similar to <code class="notranslate">zorder</code>. While <code class="notranslate">zorder</code> handles the drawing order, <code class="notranslate">lorder</code> handles the order in which items appear in the legend.</p>
<h1 dir="auto">Current state</h1>
<p dir="auto">tacaswell explained on SO that the order of legend items is an implementation detail and that's fine. There are ways to re-order the items, but they are somewhat cumbersome. One recommended way is to use</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[...]
handles, labels = axis.get_legend_handles_labels()"><pre class="notranslate">[...]
<span class="pl-s1">handles</span>, <span class="pl-s1">labels</span> <span class="pl-c1">=</span> <span class="pl-s1">axis</span>.<span class="pl-en">get_legend_handles_labels</span>()</pre></div>
<p dir="auto">and then reorder to your hearts desire. This is ok when you want to reorder based on a rule, but it is not convenient when you want to re-order manually (because you first have to find out what the current order is, unpack the tuples, reorder them, repack them).</p>
<p dir="auto">The other recommended way is to keep the return values of pyplot</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[...]
art1, = pyplot.plot(...)
art2, = pyplot.plot(...)
# I always forget how to do it for errorbar
# art3, = pyplot.errorbar(...) # fails, unpacking works differently here
plt.legend((art1, art2), ("label1", "label2"))"><pre class="notranslate">[...]
<span class="pl-s1">art1</span>, <span class="pl-c1">=</span> <span class="pl-s1">pyplot</span>.<span class="pl-en">plot</span>(...)
<span class="pl-s1">art2</span>, <span class="pl-c1">=</span> <span class="pl-s1">pyplot</span>.<span class="pl-en">plot</span>(...)
<span class="pl-c"># I always forget how to do it for errorbar</span>
<span class="pl-c"># art3, = pyplot.errorbar(...) # fails, unpacking works differently here</span>
<span class="pl-s1">plt</span>.<span class="pl-en">legend</span>((<span class="pl-s1">art1</span>, <span class="pl-s1">art2</span>), (<span class="pl-s">"label1"</span>, <span class="pl-s">"label2"</span>))</pre></div>
<p dir="auto">As you can see, I always have trouble remembering how to unpack the return value correctly for stuff other than pyplot.plot(...) so that it works with plt.legend(...). Surely, other users must feel the same way. I would say that this method relies on knowing more about the matplotlib internals than the average user wants to know.</p>
<h1 dir="auto">Proposed solution</h1>
<p dir="auto">The user simply specifies the new <code class="notranslate">lorder</code> keyword in calls to pyplot</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[...]
pyplot.plot(..., lorder=2, label="second") # appears second in legend
pyplot.plot(..., lorder=3, label="third") # appears third in legend
pyplot.errorbar(..., lorder=1, label="first") # appears first in legend
plt.legend()"><pre class="notranslate">[...]
<span class="pl-s1">pyplot</span>.<span class="pl-en">plot</span>(..., <span class="pl-s1">lorder</span><span class="pl-c1">=</span><span class="pl-c1">2</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"second"</span>) <span class="pl-c"># appears second in legend</span>
<span class="pl-s1">pyplot</span>.<span class="pl-en">plot</span>(..., <span class="pl-s1">lorder</span><span class="pl-c1">=</span><span class="pl-c1">3</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"third"</span>) <span class="pl-c"># appears third in legend</span>
<span class="pl-s1">pyplot</span>.<span class="pl-en">errorbar</span>(..., <span class="pl-s1">lorder</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"first"</span>) <span class="pl-c"># appears first in legend</span>
<span class="pl-s1">plt</span>.<span class="pl-en">legend</span>()</pre></div>
<p dir="auto">This code is rather clear and makes it very easy to specify the ordering of items in the legend. As far as I understand tacaswell, it should be easy to handle internally as well, just make <code class="notranslate">lorder</code> part of the internal sorting criterion.</p>
<p dir="auto">A more explicit alternative is keyword <code class="notranslate">labelorder</code> instead of the shorter <code class="notranslate">lorder</code>.</p> | 0 |
<p dir="auto">Hi all,</p>
<p dir="auto">First off, thanks for all your hard work on this project. It kicks ass.</p>
<p dir="auto">This is my first time using bootstrap more extensively on a larger project, and I'm confused as to why the screen-xs breakpoint has been deprecated, and the xs breakpoint has been defined as everything less than 768px.</p>
<p dir="auto">I was taking a look at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="28699886" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/12913" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/12913/hovercard" href="https://github.com/twbs/bootstrap/issues/12913">#12913</a>, and I don't know the history here, but at first glance it looks like the underlying problem was that there wasn't a way to specify default "mobile-first" behavior, since the xs breakpoint was between 480px and 767px. There was nothing for < 480px, so the xs breakpoint was changed to be just < 768px.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/7e3274f998bb3e757af3b044308a5eead5ac2a62678fa4f7549cc155385b509e/687474703a2f2f636c2e6c792f696d6167652f3279336e326e3065316c31432f496d616765253230323031342d30392d3031253230617425323031322e34352e3130253230504d2e706e67"><img src="https://camo.githubusercontent.com/7e3274f998bb3e757af3b044308a5eead5ac2a62678fa4f7549cc155385b509e/687474703a2f2f636c2e6c792f696d6167652f3279336e326e3065316c31432f496d616765253230323031342d30392d3031253230617425323031322e34352e3130253230504d2e706e67" alt="Image of Yaktocat" data-canonical-src="http://cl.ly/image/2y3n2n0e1l1C/Image%202014-09-01%20at%2012.45.10%20PM.png" style="max-width: 100%;"></a></p>
<p dir="auto">But I have run into several cases where I'd love to use the xs breakpoint. Basically, I'd like to say .make-xs-column(6), and have it wrap the columns when < 480 but go side by side at 480 and up.</p>
<p dir="auto">Again, I don't know the history here, but it seems to me a better solution would be to add another set of mixins and helper classes to specify the default "mobile-first" behavior. Something like:</p>
<div class="highlight highlight-source-css-less notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=".my-row {
.make-row;
}
.my-row-item {
.make-column(6); // Default is 6 cols
.make-xs-column(3); // 3 cols at >= 480px
.make-md-column(2); // 2 cols at >= 768px
}"><pre class="notranslate"><span class="pl-e">.my-row</span> {
<span class="pl-e">.make-row</span>;
}
<span class="pl-e">.my-row-item</span> {
<span class="pl-e">.make-column</span>(<span class="pl-c1">6</span>); <span class="pl-c"><span class="pl-c">//</span> Default is 6 cols</span>
<span class="pl-e">.make-xs-column</span>(<span class="pl-c1">3</span>); <span class="pl-c"><span class="pl-c">//</span> 3 cols at >= 480px</span>
<span class="pl-e">.make-md-column</span>(<span class="pl-c1">2</span>); <span class="pl-c"><span class="pl-c">//</span> 2 cols at >= 768px</span>
}</pre></div>
<p dir="auto">Would it be crazy to make the xs breakpoint act like the sm, md, and lg breakpoints (i.e. xs >= 480px) and add another set of helpers (e.g. <code class="notranslate">.col-6</code>, <code class="notranslate">.visible-block</code>, <code class="notranslate">.make-column(8)</code>) to handle the >= 0px default behavior?</p>
<p dir="auto">Thanks</p> | <p dir="auto">The smallest grid column supported at the moment is .col-xs- (<768px), which seems like a big range.</p>
<p dir="auto">Would it be advisable to have:<br>
.col-xs- (>480px and <768px)<br>
.col-tn- (<480px)</p>
<p dir="auto">Reason being it still seems reasonable to have a 2 column grid on 768px (240px - 384px per column), while 480px have a stacked column.</p>
<p dir="auto">Using the current .col-xs- (<768px) option, putting one stacked column on 768px seems too wide on some cases, and 2 columns on 480px seems ridiculous at times.</p> | 1 |
<p dir="auto">Would it be possible to have line wrappings auto indent to match their starting line's indentation? The way that soft wrapping currently works in Atom is confusing and cluttered...</p>
<h3 dir="auto">So, instead of this:</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5497885/3785733/45155352-19c9-11e4-8b30-c977255ae40c.png"><img src="https://cloud.githubusercontent.com/assets/5497885/3785733/45155352-19c9-11e4-8b30-c977255ae40c.png" alt="screen shot 2014-08-01 at 4 09 19 pm" style="max-width: 100%;"></a></p>
<h3 dir="auto">Could you provide an option for this:</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5497885/3785730/41b4dd72-19c9-11e4-9eaa-90fbebc5b4ad.png"><img src="https://cloud.githubusercontent.com/assets/5497885/3785730/41b4dd72-19c9-11e4-9eaa-90fbebc5b4ad.png" alt="screen shot 2014-08-01 at 4 13 23 pm" style="max-width: 100%;"></a></p>
<p dir="auto">I am trying to convince a co-worker to switch to Atom, and this is the only thing holding him back :)<br>
Thank you! Atom Editor is the best.</p> | <p dir="auto">Ok, this one may be a personal preference, but it drives me nuts that softwrap doesn't match the indent.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/64fe852b37459ffba2a99896099c599b3947d45e8f015678cdc58894d0a2d529/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f37323931392f313536383834332f37633562306331302d353062382d313165332d393631622d3036353066393430303863342e706e67"><img src="https://camo.githubusercontent.com/64fe852b37459ffba2a99896099c599b3947d45e8f015678cdc58894d0a2d529/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f37323931392f313536383834332f37633562306331302d353062382d313165332d393631622d3036353066393430303863342e706e67" alt="screen shot 2013-11-18 at 5 18 17 pm" data-canonical-src="https://f.cloud.github.com/assets/72919/1568843/7c5b0c10-50b8-11e3-961b-0650f94008c4.png" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">While installing celey==4.0.2 its giving error <code class="notranslate">KeyError: 'async'</code>. Upgraded dependencies should install only when the version is upgraded not in this case</p> | <p dir="auto">If we removed support for Redis, we'd be able to focus the time on RabbitMQ, or maybe Kafka/nsq.<br>
There's also the huge task of porting to asyncio in Python 3.</p>
<p dir="auto">I think this should be seriously considered. If we are to work on this for fun, then the popularity of the transport shouldn't matter.</p>
<p dir="auto">In the end I will chose what I have the ability to work on anyway, but at least you can voice your concerns here.</p> | 0 |
<p dir="auto">See this in (slow mo!) action: <a href="https://youtu.be/ljXgi7r62Pc" rel="nofollow">https://youtu.be/ljXgi7r62Pc</a></p>
<p dir="auto">When a recipe in Pesto is animating up, notice how the shadow around the FAB flashes/clips.</p>
<p dir="auto">(noticed in a material eng review)</p> | <p dir="auto">Hello everybody. Tell me please whether it is possible to create flutter app maker? Like storyboard in Xcode? drug and drop element in window and generate code. in web similar <a href="http://mutisya.com" rel="nofollow">http://mutisya.com</a> how it works?</p> | 0 |
<ul dir="auto">
<li>VSCode Version: Alpha - <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/e77003fd6ca90d944feb572b54fc1d122d91d704/hovercard" href="https://github.com/microsoft/vscode/commit/e77003fd6ca90d944feb572b54fc1d122d91d704"><tt>e77003f</tt></a></li>
<li>OS Version: El Capitan</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Open any file in vscode</li>
<li>Make changes to that file outside of vscode, vscode is not picking up changes</li>
</ol>
<p dir="auto">File events seem to be completely broken for me, as git is also not picking up file event changes</p> | <p dir="auto">Today when you open VS Code on wrong casing workspace path, all file events stop to work. We should detect this case and either fix it or print a warning.</p> | 1 |
<p dir="auto">As far as I can tell the <code class="notranslate">runtime</code> transform is all-or-nothing, all I'm interested in is getting rid of the redundant helpers inlined into every module, but it seems I can't have that without also the "risk" of getting dependencies on the other runtimes (notably <code class="notranslate">core-js</code>).</p>
<p dir="auto">Have I missed something or would it not make sense to have a separate transform for just this? They seem to have rather separate concerns from my perspective (avoid redundant helper code vs add dependencies for optional features).</p> | <p dir="auto">This would be really nice for larger applications that aren't libraries, where they could still use the full, globally polluting polyfill, but the helpers wouldn't be duplicated across several modules. It would make the compiled code faster to load, and a lot smaller overall. These benefits are nice for both Node applications and web applications, where the deduplication would make programs significantly smaller. As for the core-js aliasing, it could just require the module at the top of every file that needs a feature from it, which doesn't add a lot of size overhead to the files.</p> | 1 |
<p dir="auto">Hello<br>
I am having trouble in checking existing data in scrapy. i have used elasticsearch as my database below code i am trying to execute ??</p>
<p dir="auto">`</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" def checkIfURLExistsInCrawler(single_url):
elastic_query = json.dumps({
"query": {
"match_phrase": {
"url": single_url
}
}
})
result = es.search(index='test', doc_type='test', body=elastic_query)['hits']['hits']
return result
def start_requests(self):
urls = [
here i have some url there might be chance that some urls are duplicate so i have to put
validation but in for loop it doesn't working
]
for request_url in urls:
checkExists = self.checkIfURLExistsInCrawler(request_url)
if not checkExists :
beingCrawledUrl = {}
beingCrawledUrl['url'] = single_url
beingCrawledUrl['added_on'] = now.strftime("%Y-%m-%d %H:%M:%S")
json_data = json.dumps(beingCrawledUrl)
InsertData = es.index(index='test', doc_type='test', body=json.loads(json_data))
yield scrapy.Request();"><pre class="notranslate"><code class="notranslate"> def checkIfURLExistsInCrawler(single_url):
elastic_query = json.dumps({
"query": {
"match_phrase": {
"url": single_url
}
}
})
result = es.search(index='test', doc_type='test', body=elastic_query)['hits']['hits']
return result
def start_requests(self):
urls = [
here i have some url there might be chance that some urls are duplicate so i have to put
validation but in for loop it doesn't working
]
for request_url in urls:
checkExists = self.checkIfURLExistsInCrawler(request_url)
if not checkExists :
beingCrawledUrl = {}
beingCrawledUrl['url'] = single_url
beingCrawledUrl['added_on'] = now.strftime("%Y-%m-%d %H:%M:%S")
json_data = json.dumps(beingCrawledUrl)
InsertData = es.index(index='test', doc_type='test', body=json.loads(json_data))
yield scrapy.Request();
</code></pre></div>
<p dir="auto">`</p>
<p dir="auto">if i execute this code all record inside urls = [ ] are inserted into "test" index even if its duplicated because of validation i put above is not working .</p>
<p dir="auto">but if i run this again with same data validation works .so please can any one help this out.</p> | <p dir="auto">Would it make sense to add something to the top of scrapy.utils.request.request_fingerprint like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if 'fingerprint' in request.meta:
return request.meta['fingerprint']"><pre class="notranslate"><code class="notranslate">if 'fingerprint' in request.meta:
return request.meta['fingerprint']
</code></pre></div>
<p dir="auto">This is useful, for example, if you consider two pages to be identical if they share the same productID query parameter:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def parse(self, response):
...
request = Request(url)
m = re.search(r'productID=([^&]+)', url)
if m:
request.meta['fingerprint'] = m.group(1)"><pre class="notranslate"><code class="notranslate">def parse(self, response):
...
request = Request(url)
m = re.search(r'productID=([^&]+)', url)
if m:
request.meta['fingerprint'] = m.group(1)
</code></pre></div>
<p dir="auto">I'm currently handling this with a custom duplicate filter, but it seems like it would be broadly useful.</p> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased")"><pre class="notranslate"><code class="notranslate">model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased")
</code></pre></div>
<p dir="auto">returns this warning message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForSequenceClassification: ['cls.predictions.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.decoder.weight', 'cls.seq_relationship.weight', 'cls.seq_relationship.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.LayerNorm.bias']
- This IS expected if you are initializing BertForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPretraining model).
- This IS NOT expected if you are initializing BertForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of BertForSequenceClassification were not initialized from the model checkpoint at bert-base-uncased and are newly initialized: ['classifier.weight', 'classifier.bias']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference."><pre class="notranslate"><code class="notranslate">Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForSequenceClassification: ['cls.predictions.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.decoder.weight', 'cls.seq_relationship.weight', 'cls.seq_relationship.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.LayerNorm.bias']
- This IS expected if you are initializing BertForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPretraining model).
- This IS NOT expected if you are initializing BertForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of BertForSequenceClassification were not initialized from the model checkpoint at bert-base-uncased and are newly initialized: ['classifier.weight', 'classifier.bias']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
</code></pre></div>
<p dir="auto">This just started popping up with v.3 so I'm not sure what is the recommended action to take here. Please advise if you can. Basically, any of my code using the <code class="notranslate">AutoModelFor<X></code> is throwing up this warning now.</p>
<p dir="auto">Thanks.</p> | <h2 dir="auto">Environment info</h2>
<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 4.17.0</li>
<li>Platform: Linux-5.10.0-051000-generic-x86_64-with-glibc2.10</li>
<li>Python version: 3.8.5</li>
<li>PyTorch version (GPU?): 1.10.2+cu113 (True)</li>
<li>Tensorflow version (GPU?): not installed (NA)</li>
<li>Flax version (CPU?/GPU?/TPU?): not installed (NA)</li>
<li>Jax version: not installed</li>
<li>JaxLib version: not installed</li>
<li>Using GPU in script?: Yes (the same on CPU)</li>
<li>Using distributed or parallel set-up in script?: No</li>
</ul>
<h3 dir="auto">Who can help</h3>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/LysandreJik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/LysandreJik">@LysandreJik</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Narsil/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Narsil">@Narsil</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/SaulLu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/SaulLu">@SaulLu</a></p>
<h2 dir="auto">Information</h2>
<p dir="auto">Model I am using (Bert, XLNet ...): BERT (<code class="notranslate">bert-large-cased</code>)</p>
<p dir="auto">The problem arises when using:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> the official example scripts: (give details below)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> my own modified scripts: (give details below)</li>
</ul>
<p dir="auto">The tasks I am working on is:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> an official GLUE/SQUaD task: (give the name)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> my own task or dataset: (give details below)</li>
</ul>
<h2 dir="auto">To reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="encoded = tokenizer("This thing costs £4.56")
decoded = tokenizer.decode(encoded["input_ids"], clean_up_tokenization_spaces=True)
print (decoded)"><pre class="notranslate"><span class="pl-s1">encoded</span> <span class="pl-c1">=</span> <span class="pl-en">tokenizer</span>(<span class="pl-s">"This thing costs £4.56"</span>)
<span class="pl-s1">decoded</span> <span class="pl-c1">=</span> <span class="pl-s1">tokenizer</span>.<span class="pl-en">decode</span>(<span class="pl-s1">encoded</span>[<span class="pl-s">"input_ids"</span>], <span class="pl-s1">clean_up_tokenization_spaces</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-en">print</span> (<span class="pl-s1">decoded</span>)</pre></div>
<p dir="auto">Real output: <code class="notranslate">[CLS] This thing costs £4. 56 [SEP]</code></p>
<p dir="auto">I tried it also with NER pipelines and other text inputs.<br>
Additional example: got <code class="notranslate">[CLS] ( including once - a - week tapping ) [SEP]</code> instead of <code class="notranslate">[CLS] (including once-a-week tapping) [SEP]</code></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Expected output: <code class="notranslate">[CLS] This thing costs £4.56 [SEP]</code>.</p>
<p dir="auto">I expected the tokenizer to cleanup all the spaces introduced. Is there any different way to do so? Am I missing some trivial parameter?</p> | 0 |
<p dir="auto"><a href="https://storage.googleapis.com/kubernetes-jenkins/logs/kubernetes-e2e-gce-scalability/7993/" rel="nofollow">https://storage.googleapis.com/kubernetes-jenkins/logs/kubernetes-e2e-gce-scalability/7993/</a></p>
<p dir="auto">Failed: [k8s.io] Load capacity [Feature:Performance] should be able to handle 30 pods per node {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/load.go:182
creating rc load-big-rc-3
Expected error:
<*errors.errorString | 0xc8283a7fb0>: {
s: "Number of reported pods for load-big-rc-3 changed: 248 vs 250",
}
Number of reported pods for load-big-rc-3 changed: 248 vs 250
not to have occurred"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/load.go:182
creating rc load-big-rc-3
Expected error:
<*errors.errorString | 0xc8283a7fb0>: {
s: "Number of reported pods for load-big-rc-3 changed: 248 vs 250",
}
Number of reported pods for load-big-rc-3 changed: 248 vs 250
not to have occurred
</code></pre></div> | <p dir="auto">There are two modes of crashing:</p>
<ul dir="auto">
<li>the first one I've seen 5 times today</li>
<li>the second I've seen exactly once</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="goroutine 3951325 [running]:
runtime.throw(0x2ef0660, 0x15)
/usr/local/go/src/runtime/panic.go:547 +0x90 fp=0xc8adb6ff68 sp=0xc8adb6ff50
runtime.mapdelete(0x200e720, 0xc857867a10, 0xc8adb70088)
/usr/local/go/src/runtime/hashmap.go:559 +0x5a fp=0xc8adb6ffc8 sp=0xc8adb6ff68
k8s.io/kubernetes/pkg/api/v1.Convert_api_Pod_To_v1_Pod(0xc903072860, 0xc9031c4150, 0x7f6bb9f96998, 0xc8784fb2c0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/conversion.go:514 +0x551 fp=0xc8adb70130 sp=0xc8adb6ffc8
k8s.io/kubernetes/pkg/api/v1.autoConvert_api_PodList_To_v1_PodList(0xc8a4e850e0, 0xc87d278ae0, 0x7f6bb9f96998, 0xc8784fb2c0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go:4628 +0x31a fp=0xc8adb70238 sp=0xc8adb70130
k8s.io/kubernetes/pkg/api/v1.Convert_api_PodList_To_v1_PodList(0xc8a4e850e0, 0xc87d278ae0, 0x7f6bb9f96998, 0xc8784fb2c0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go:4639 +0x4b fp=0xc8adb70270 sp=0xc8adb70238
runtime.call64(0xc821791100, 0x342dc10, 0xc89a1cd7d0, 0x2000000030)
/usr/local/go/src/runtime/asm_amd64.s:473 +0x3e fp=0xc8adb702b8 sp=0xc8adb70270
reflect.Value.call(0x24c3ba0, 0x342dc10, 0x13, 0x2cb4f58, 0x4, 0xc8adb707d8, 0x3, 0x3, 0x0, 0x0, ...)
/usr/local/go/src/reflect/value.go:435 +0x120d fp=0xc8adb70608 sp=0xc8adb702b8
reflect.Value.Call(0x24c3ba0, 0x342dc10, 0x13, 0xc8adb707d8, 0x3, 0x3, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:303 +0xb1 fp=0xc8adb70668 sp=0xc8adb70608
k8s.io/kubernetes/pkg/conversion.(*Converter).callCustom(0xc8201e2180, 0x2ad7ca0, 0xc8a4e850e0, 0x16, 0x2be8ba0, 0xc87d278ae0, 0x16, 0x24c3ba0, 0x342dc10, 0x13, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/conversion/converter.go:584 +0x4f4 fp=0xc8adb70828 sp=0xc8adb70668
k8s.io/kubernetes/pkg/conversion.(*Converter).convert(0xc8201e2180, 0x2842b40, 0xc8a4e850e0, 0x199, 0x2971ee0, 0xc87d278ae0, 0x199, 0xc8784fb2c0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/conversion/converter.go:627 +0xb76 fp=0xc8adb709e0 sp=0xc8adb70828
k8s.io/kubernetes/pkg/conversion.(*Converter).(k8s.io/kubernetes/pkg/conversion.convert)-fm(0x2842b40, 0xc8a4e850e0, 0x199, 0x2971ee0, 0xc87d278ae0, 0x199, 0xc8784fb2c0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/conversion/converter.go:524 +0x84 fp=0xc8adb70a38 sp=0xc8adb709e0
k8s.io/kubernetes/pkg/conversion.(*Converter).doConversion(0xc8201e2180, 0x2ad7ca0, 0xc8a4e850e0, 0x2be8ba0, 0xc87d278ae0, 0x0, 0xc8c7a7c6a8, 0xc8adb70c78, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/conversion/converter.go:561 +0x45e fp=0xc8adb70bd8 sp=0xc8adb70a38
k8s.io/kubernetes/pkg/conversion.(*Converter).Convert(0xc8201e2180, 0x2ad7ca0, 0xc8a4e850e0, 0x2be8ba0, 0xc87d278ae0, 0x0, 0xc8c7a7c6a8, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/conversion/converter.go:524 +0x28d fp=0xc8adb70ca8 sp=0xc8adb70bd8
k8s.io/kubernetes/pkg/runtime.(*Scheme).UnsafeConvertToVersion(0xc82006a2c0, 0x7f6bba382300, 0xc8a4e850e0, 0x0, 0x0, 0x2cc13b8, 0x2, 0x0, 0x0, 0x0, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/scheme.go:587 +0x1540 fp=0xc8adb71158 sp=0xc8adb70ca8
k8s.io/kubernetes/pkg/runtime.unsafeObjectConvertor.ConvertToVersion(0xc82006a2c0, 0x7f6bba382300, 0xc8a4e850e0, 0x0, 0x0, 0x2cc13b8, 0x2, 0x0, 0x0, 0x0, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/helper.go:39 +0x8e fp=0xc8adb711b8 sp=0xc8adb71158
k8s.io/kubernetes/pkg/runtime/serializer/versioning.(*codec).EncodeToStream(0xc872e970e0, 0x7f6bba382300, 0xc8a4e850e0, 0x7f6bb9e66b00, 0xc8c7a7c680, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go:279 +0xb19 fp=0xc8adb71438 sp=0xc8adb711b8
k8s.io/kubernetes/pkg/apiserver.writeNegotiated(0x7f6bba386890, 0xc820146150, 0x0, 0x0, 0x2cc13b8, 0x2, 0x7f6bb9f9c258, 0xc8c7a7c680, 0xc8915c6620, 0xc8, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/apiserver.go:445 +0x30e fp=0xc8adb71520 sp=0xc8adb71438
k8s.io/kubernetes/pkg/apiserver.write(0xc8, 0x0, 0x0, 0x2cc13b8, 0x2, 0x7f6bba386890, 0xc820146150, 0x7f6bba382300, 0xc8a4e850e0, 0x7f6bb9f9c258, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/apiserver.go:429 +0xb70 fp=0xc8adb71748 sp=0xc8adb71520
..."><pre class="notranslate"><code class="notranslate">goroutine 3951325 [running]:
runtime.throw(0x2ef0660, 0x15)
/usr/local/go/src/runtime/panic.go:547 +0x90 fp=0xc8adb6ff68 sp=0xc8adb6ff50
runtime.mapdelete(0x200e720, 0xc857867a10, 0xc8adb70088)
/usr/local/go/src/runtime/hashmap.go:559 +0x5a fp=0xc8adb6ffc8 sp=0xc8adb6ff68
k8s.io/kubernetes/pkg/api/v1.Convert_api_Pod_To_v1_Pod(0xc903072860, 0xc9031c4150, 0x7f6bb9f96998, 0xc8784fb2c0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/conversion.go:514 +0x551 fp=0xc8adb70130 sp=0xc8adb6ffc8
k8s.io/kubernetes/pkg/api/v1.autoConvert_api_PodList_To_v1_PodList(0xc8a4e850e0, 0xc87d278ae0, 0x7f6bb9f96998, 0xc8784fb2c0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go:4628 +0x31a fp=0xc8adb70238 sp=0xc8adb70130
k8s.io/kubernetes/pkg/api/v1.Convert_api_PodList_To_v1_PodList(0xc8a4e850e0, 0xc87d278ae0, 0x7f6bb9f96998, 0xc8784fb2c0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/conversion_generated.go:4639 +0x4b fp=0xc8adb70270 sp=0xc8adb70238
runtime.call64(0xc821791100, 0x342dc10, 0xc89a1cd7d0, 0x2000000030)
/usr/local/go/src/runtime/asm_amd64.s:473 +0x3e fp=0xc8adb702b8 sp=0xc8adb70270
reflect.Value.call(0x24c3ba0, 0x342dc10, 0x13, 0x2cb4f58, 0x4, 0xc8adb707d8, 0x3, 0x3, 0x0, 0x0, ...)
/usr/local/go/src/reflect/value.go:435 +0x120d fp=0xc8adb70608 sp=0xc8adb702b8
reflect.Value.Call(0x24c3ba0, 0x342dc10, 0x13, 0xc8adb707d8, 0x3, 0x3, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:303 +0xb1 fp=0xc8adb70668 sp=0xc8adb70608
k8s.io/kubernetes/pkg/conversion.(*Converter).callCustom(0xc8201e2180, 0x2ad7ca0, 0xc8a4e850e0, 0x16, 0x2be8ba0, 0xc87d278ae0, 0x16, 0x24c3ba0, 0x342dc10, 0x13, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/conversion/converter.go:584 +0x4f4 fp=0xc8adb70828 sp=0xc8adb70668
k8s.io/kubernetes/pkg/conversion.(*Converter).convert(0xc8201e2180, 0x2842b40, 0xc8a4e850e0, 0x199, 0x2971ee0, 0xc87d278ae0, 0x199, 0xc8784fb2c0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/conversion/converter.go:627 +0xb76 fp=0xc8adb709e0 sp=0xc8adb70828
k8s.io/kubernetes/pkg/conversion.(*Converter).(k8s.io/kubernetes/pkg/conversion.convert)-fm(0x2842b40, 0xc8a4e850e0, 0x199, 0x2971ee0, 0xc87d278ae0, 0x199, 0xc8784fb2c0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/conversion/converter.go:524 +0x84 fp=0xc8adb70a38 sp=0xc8adb709e0
k8s.io/kubernetes/pkg/conversion.(*Converter).doConversion(0xc8201e2180, 0x2ad7ca0, 0xc8a4e850e0, 0x2be8ba0, 0xc87d278ae0, 0x0, 0xc8c7a7c6a8, 0xc8adb70c78, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/conversion/converter.go:561 +0x45e fp=0xc8adb70bd8 sp=0xc8adb70a38
k8s.io/kubernetes/pkg/conversion.(*Converter).Convert(0xc8201e2180, 0x2ad7ca0, 0xc8a4e850e0, 0x2be8ba0, 0xc87d278ae0, 0x0, 0xc8c7a7c6a8, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/conversion/converter.go:524 +0x28d fp=0xc8adb70ca8 sp=0xc8adb70bd8
k8s.io/kubernetes/pkg/runtime.(*Scheme).UnsafeConvertToVersion(0xc82006a2c0, 0x7f6bba382300, 0xc8a4e850e0, 0x0, 0x0, 0x2cc13b8, 0x2, 0x0, 0x0, 0x0, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/scheme.go:587 +0x1540 fp=0xc8adb71158 sp=0xc8adb70ca8
k8s.io/kubernetes/pkg/runtime.unsafeObjectConvertor.ConvertToVersion(0xc82006a2c0, 0x7f6bba382300, 0xc8a4e850e0, 0x0, 0x0, 0x2cc13b8, 0x2, 0x0, 0x0, 0x0, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/helper.go:39 +0x8e fp=0xc8adb711b8 sp=0xc8adb71158
k8s.io/kubernetes/pkg/runtime/serializer/versioning.(*codec).EncodeToStream(0xc872e970e0, 0x7f6bba382300, 0xc8a4e850e0, 0x7f6bb9e66b00, 0xc8c7a7c680, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go:279 +0xb19 fp=0xc8adb71438 sp=0xc8adb711b8
k8s.io/kubernetes/pkg/apiserver.writeNegotiated(0x7f6bba386890, 0xc820146150, 0x0, 0x0, 0x2cc13b8, 0x2, 0x7f6bb9f9c258, 0xc8c7a7c680, 0xc8915c6620, 0xc8, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/apiserver.go:445 +0x30e fp=0xc8adb71520 sp=0xc8adb71438
k8s.io/kubernetes/pkg/apiserver.write(0xc8, 0x0, 0x0, 0x2cc13b8, 0x2, 0x7f6bba386890, 0xc820146150, 0x7f6bba382300, 0xc8a4e850e0, 0x7f6bb9f9c258, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/apiserver.go:429 +0xb70 fp=0xc8adb71748 sp=0xc8adb71520
...
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="goroutine 244779 [running]:
runtime.throw(0x300f700, 0x21)
/usr/local/go/src/runtime/panic.go:547 +0x90 fp=0xc873db63a8 sp=0xc873db6390
runtime.mapaccess1_faststr(0x200e720, 0xc89b0196e0, 0xc824b33220, 0x19, 0x4)
/usr/local/go/src/runtime/hashmap_fast.go:202 +0x5b fp=0xc873db6408 sp=0xc873db63a8
k8s.io/kubernetes/pkg/api/v1.(*ObjectMeta).MarshalTo(0xc873db6820, 0xc8d6ef72c4, 0x563e95, 0x563e95, 0x1d4, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/generated.pb.go:4335 +0x1005 fp=0xc873db66e8 sp=0xc873db6408
k8s.io/kubernetes/pkg/api/v1.(*Pod).MarshalTo(0xc873db6800, 0xc8d6ef72c1, 0x563e98, 0x563e98, 0x61a, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/generated.pb.go:5035 +0x123 fp=0xc873db6758 sp=0xc873db66e8
k8s.io/kubernetes/pkg/api/v1.(*PodList).MarshalTo(0xc8c78a2de0, 0xc8d6cd0018, 0x78b141, 0x78b141, 0x78b139, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/generated.pb.go:5391 +0x30e fp=0xc873db6d18 sp=0xc873db6758
k8s.io/kubernetes/pkg/runtime.(*Unknown).NestedMarshalTo(0xc873db70f0, 0xc8d6cd0004, 0x78b155, 0x78b155, 0x7f91f89d3e00, 0xc8c78a2de0, 0x78b139, 0x410cf8, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/types_proto.go:47 +0x265 fp=0xc873db6e38 sp=0xc873db6d18
k8s.io/kubernetes/pkg/runtime/serializer/protobuf.(*Serializer).EncodeToStream(0xc8201b40a0, 0x7f91f8ec7068, 0xc8c78a2de0, 0x7f91f8e9d218, 0xc8396ad160, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/protobuf.go:189 +0x4ac fp=0xc873db7150 sp=0xc873db6e38
k8s.io/kubernetes/pkg/runtime.(*SerializerInfo).EncodeToStream(0xc89e7b1c20, 0x7f91f8ec7068, 0xc8c78a2de0, 0x7f91f8e9d218, 0xc8396ad160, 0x0, 0x0, 0x0, 0x0, 0x0)
<autogenerated>:30 +0xbe fp=0xc873db71b8 sp=0xc873db7150
k8s.io/kubernetes/pkg/runtime/serializer/versioning.(*codec).EncodeToStream(0xc8783937a0, 0x7f91f8ec7068, 0xc8c78a2de0, 0x7f91f8e9d218, 0xc8396ad160, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go:288 +0xc04 fp=0xc873db7438 sp=0xc873db71b8
k8s.io/kubernetes/pkg/apiserver.writeNegotiated(0x7f91f8ecb848, 0xc820400620, 0x0, 0x0, 0x2cc13b8, 0x2, 0x7f91f8e9d078, 0xc8396ad160, 0xc8a8c24620, 0xc8, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/apiserver.go:445 +0x30e fp=0xc873db7520 sp=0xc873db7438
k8s.io/kubernetes/pkg/apiserver.write(0xc8, 0x0, 0x0, 0x2cc13b8, 0x2, 0x7f91f8ecb848, 0xc820400620, 0x7f91f8ec6870, 0xc84aa394a0, 0x7f91f8e9d078, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/apiserver.go:429 +0xb70 fp=0xc873db7748 sp=0xc873db7520
k8s.io/kubernetes/pkg/apiserver.ListResource.func1(0xc876ed7c80, 0xc84aa39200)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:328 +0xe5b fp=0xc873db7b38 sp=0xc873db7748
k8s.io/kubernetes/pkg/apiserver/metrics.InstrumentRouteFunc.func1(0xc876ed7c80, 0xc84aa39200"><pre class="notranslate"><code class="notranslate">goroutine 244779 [running]:
runtime.throw(0x300f700, 0x21)
/usr/local/go/src/runtime/panic.go:547 +0x90 fp=0xc873db63a8 sp=0xc873db6390
runtime.mapaccess1_faststr(0x200e720, 0xc89b0196e0, 0xc824b33220, 0x19, 0x4)
/usr/local/go/src/runtime/hashmap_fast.go:202 +0x5b fp=0xc873db6408 sp=0xc873db63a8
k8s.io/kubernetes/pkg/api/v1.(*ObjectMeta).MarshalTo(0xc873db6820, 0xc8d6ef72c4, 0x563e95, 0x563e95, 0x1d4, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/generated.pb.go:4335 +0x1005 fp=0xc873db66e8 sp=0xc873db6408
k8s.io/kubernetes/pkg/api/v1.(*Pod).MarshalTo(0xc873db6800, 0xc8d6ef72c1, 0x563e98, 0x563e98, 0x61a, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/generated.pb.go:5035 +0x123 fp=0xc873db6758 sp=0xc873db66e8
k8s.io/kubernetes/pkg/api/v1.(*PodList).MarshalTo(0xc8c78a2de0, 0xc8d6cd0018, 0x78b141, 0x78b141, 0x78b139, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/v1/generated.pb.go:5391 +0x30e fp=0xc873db6d18 sp=0xc873db6758
k8s.io/kubernetes/pkg/runtime.(*Unknown).NestedMarshalTo(0xc873db70f0, 0xc8d6cd0004, 0x78b155, 0x78b155, 0x7f91f89d3e00, 0xc8c78a2de0, 0x78b139, 0x410cf8, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/types_proto.go:47 +0x265 fp=0xc873db6e38 sp=0xc873db6d18
k8s.io/kubernetes/pkg/runtime/serializer/protobuf.(*Serializer).EncodeToStream(0xc8201b40a0, 0x7f91f8ec7068, 0xc8c78a2de0, 0x7f91f8e9d218, 0xc8396ad160, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/protobuf.go:189 +0x4ac fp=0xc873db7150 sp=0xc873db6e38
k8s.io/kubernetes/pkg/runtime.(*SerializerInfo).EncodeToStream(0xc89e7b1c20, 0x7f91f8ec7068, 0xc8c78a2de0, 0x7f91f8e9d218, 0xc8396ad160, 0x0, 0x0, 0x0, 0x0, 0x0)
<autogenerated>:30 +0xbe fp=0xc873db71b8 sp=0xc873db7150
k8s.io/kubernetes/pkg/runtime/serializer/versioning.(*codec).EncodeToStream(0xc8783937a0, 0x7f91f8ec7068, 0xc8c78a2de0, 0x7f91f8e9d218, 0xc8396ad160, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go:288 +0xc04 fp=0xc873db7438 sp=0xc873db71b8
k8s.io/kubernetes/pkg/apiserver.writeNegotiated(0x7f91f8ecb848, 0xc820400620, 0x0, 0x0, 0x2cc13b8, 0x2, 0x7f91f8e9d078, 0xc8396ad160, 0xc8a8c24620, 0xc8, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/apiserver.go:445 +0x30e fp=0xc873db7520 sp=0xc873db7438
k8s.io/kubernetes/pkg/apiserver.write(0xc8, 0x0, 0x0, 0x2cc13b8, 0x2, 0x7f91f8ecb848, 0xc820400620, 0x7f91f8ec6870, 0xc84aa394a0, 0x7f91f8e9d078, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/apiserver.go:429 +0xb70 fp=0xc873db7748 sp=0xc873db7520
k8s.io/kubernetes/pkg/apiserver.ListResource.func1(0xc876ed7c80, 0xc84aa39200)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:328 +0xe5b fp=0xc873db7b38 sp=0xc873db7748
k8s.io/kubernetes/pkg/apiserver/metrics.InstrumentRouteFunc.func1(0xc876ed7c80, 0xc84aa39200
</code></pre></div>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/smarterclayton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/smarterclayton">@smarterclayton</a></p> | 1 |
<h3 dir="auto">Problem</h3>
<p dir="auto">When using contourf with alpha < 1, these ugly lines appear at the color boundaries. This is evident both in the contoured data as well as on the colorbar.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45180714/85592661-5c28cb80-b614-11ea-98b5-bdd1df31abf4.png"><img src="https://user-images.githubusercontent.com/45180714/85592661-5c28cb80-b614-11ea-98b5-bdd1df31abf4.png" alt="new_look_0" style="max-width: 100%;"></a></p>
<p dir="auto">I can set antialiased=True in contourf to fix the problem with the data, but the lines on the colorbar remain.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/45180714/85592658-5c28cb80-b614-11ea-9079-a608503ae940.png"><img src="https://user-images.githubusercontent.com/45180714/85592658-5c28cb80-b614-11ea-9079-a608503ae940.png" alt="new_look" style="max-width: 100%;"></a></p>
<p dir="auto">As far as I can tell from the documentation, there doesn't seem to be a way to set antialiasing for the colorbar. Is there any way to get rid of these lines?</p> | <p dir="auto">This is the underlying problem raised in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="6572843" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/1178" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/1178/hovercard" href="https://github.com/matplotlib/matplotlib/pull/1178">#1178</a>.<br>
It is illustrated by the test below; note that boundary anomalies are visible in all forms--agg on the screen, and pdf and svg displayed with a viewer--but in different places depending on the viewer and the size of the figure as rendered.<br>
Note that the colorbar is rendered using pcolormesh, which has its own renderer with agg but otherwise is handled by draw_path_collection.</p>
<pre class="notranslate">import numpy as np
import matplotlib.pyplot as plt
z = np.arange(150)
z.shape = (10,15)
fig, axs = plt.subplots(2,2)
ax = axs[0,0]
cs0 = ax.contourf(z, 20)
cbar0 = fig.colorbar(cs0, ax=ax)
ax = axs[0,1]
cs1 = ax.contourf(z, 20, alpha=0.3)
cbar1 = fig.colorbar(cs1, ax=ax)
ax = axs[1,0]
im2 = ax.imshow(z, interpolation='nearest')
cbar2 = fig.colorbar(im2, ax=ax)
ax = axs[1,1]
im3 = ax.imshow(z, interpolation='nearest', alpha=0.3)
cbar3 = fig.colorbar(im3, ax=ax)
plt.savefig("test1.pdf")
plt.savefig("test1.svg")
plt.show()
</pre> | 1 |
<p dir="auto">When adding an adapter with a retry object to a session, read timeout errors are converted to connection errors.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> s = requests.Session()
>>> s.get("http://whatever.com", timeout=(3.05, 0.001))
Timeout: HTTPConnectionPool(host='whatever.com', port=80): Read timed out. (read timeout=0.001)
>>> a = HTTPAdapter(max_retries=Retry(total=3))
>>> s.mount("http://", a)
>>> s.get("http://whatever.com", timeout=(3.05, 0.001))
ConnectionError: HTTPConnectionPool(host='whatever.com', port=80): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPConnectionPool(host='whatever.com', port=80): Read timed out. (read timeout=0.001)"))"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">requests</span>.<span class="pl-v">Session</span>()
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">s</span>.<span class="pl-en">get</span>(<span class="pl-s">"http://whatever.com"</span>, <span class="pl-s1">timeout</span><span class="pl-c1">=</span>(<span class="pl-c1">3.05</span>, <span class="pl-c1">0.001</span>))
<span class="pl-v">Timeout</span>: <span class="pl-v">HTTPConnectionPool</span>(<span class="pl-s1">host</span><span class="pl-c1">=</span><span class="pl-s">'whatever.com'</span>, <span class="pl-s1">port</span><span class="pl-c1">=</span><span class="pl-c1">80</span>): <span class="pl-v">Read</span> <span class="pl-s1">timed</span> <span class="pl-s1">out</span>. (<span class="pl-s1">read</span> <span class="pl-s1">timeout</span><span class="pl-c1">=</span><span class="pl-c1">0.001</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-v">HTTPAdapter</span>(<span class="pl-s1">max_retries</span><span class="pl-c1">=</span><span class="pl-v">Retry</span>(<span class="pl-s1">total</span><span class="pl-c1">=</span><span class="pl-c1">3</span>))
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">s</span>.<span class="pl-en">mount</span>(<span class="pl-s">"http://"</span>, <span class="pl-s1">a</span>)
<span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-s1">s</span>.<span class="pl-en">get</span>(<span class="pl-s">"http://whatever.com"</span>, <span class="pl-s1">timeout</span><span class="pl-c1">=</span>(<span class="pl-c1">3.05</span>, <span class="pl-c1">0.001</span>))
<span class="pl-v">ConnectionError</span>: <span class="pl-v">HTTPConnectionPool</span>(<span class="pl-s1">host</span><span class="pl-c1">=</span><span class="pl-s">'whatever.com'</span>, <span class="pl-s1">port</span><span class="pl-c1">=</span><span class="pl-c1">80</span>): <span class="pl-v">Max</span> <span class="pl-s1">retries</span> <span class="pl-s1">exceeded</span> <span class="pl-k">with</span> <span class="pl-s1">url</span>: <span class="pl-c1">/</span> (<span class="pl-v">Caused</span> <span class="pl-s1">by</span> <span class="pl-v">ReadTimeoutError</span>(<span class="pl-s">"HTTPConnectionPool(host='whatever.com', port=80): Read timed out. (read timeout=0.001)"</span>))</pre></div>
<p dir="auto">Is this intentional? If so, what's the reasoning behind it? I'd like to catch these errors, but handle connection errors differently (e.g. warn the user to check his internet connection) from timeout errors (e.g. inform the user that the requested resource is possibly overloaded). Wouldn't it make more sense to raise the original error type once the max number of retries is exceeded?</p> | <p dir="auto">Consider the code below (<strong>main.py</strong>). When a temporary network disconnect occurs without the <code class="notranslate">timeout</code> keyword argument to <code class="notranslate">Session.get()</code>, the client may hang indefinitely and no exception is raised.</p>
<p dir="auto">However, if I use the <code class="notranslate">timeout</code> keyword argument, the application will raise a <code class="notranslate">ConnectionError</code> from <strong>models.py</strong> corresponding to the <code class="notranslate">urllib3.exceptions.ReadTimeoutError</code>:</p>
<p dir="auto"><code class="notranslate">requests.exceptions.ConnectionError: HTTPSConnectionPool(host='confluence.danskenet.net', port=443): Read timed out.</code></p>
<p dir="auto">Given that the exception is only raised, when using the <code class="notranslate">timeout</code> keyword argument, why isn't Requests raising <code class="notranslate">ReadTimeout</code> exception instead? In particular, the <code class="notranslate">ConnectionError</code>'s exception message "Read timed out." suggests that it should be a <code class="notranslate">ReadTimeout</code> exception?</p>
<p dir="auto">To mitigate the issue I'm currently performing a regular expression match on the exception message, which is a bad practice:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="except ConnectionError as e:
if re.search('Read timed out', str(e), re.IGNORECASE):"><pre class="notranslate"><code class="notranslate">except ConnectionError as e:
if re.search('Read timed out', str(e), re.IGNORECASE):
</code></pre></div>
<p dir="auto"><strong>main.py</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" try:
with requests.Session() as rs:
rs.mount('https://', HTTPAdapter(max_retries=Retry(total=10, connect=10, read=10, backoff_factor=1)))
with rs.get(url, params={}, headers={}, auth=self.auth, verify=self.ssl_verify, timeout=(30, 30)) as r:
r.raise_for_status()
page_set = r.json()
except ReadTimeout as e:
logging.exception('Request for page set timed out: {}'.format(url))
continue
except ConnectionError as e:
if re.search('Read timed out', str(e), re.IGNORECASE):
logging.exception('Request for page set timed out (network problem): {}'.format(url))
continue
else:
raise"><pre class="notranslate"><code class="notranslate"> try:
with requests.Session() as rs:
rs.mount('https://', HTTPAdapter(max_retries=Retry(total=10, connect=10, read=10, backoff_factor=1)))
with rs.get(url, params={}, headers={}, auth=self.auth, verify=self.ssl_verify, timeout=(30, 30)) as r:
r.raise_for_status()
page_set = r.json()
except ReadTimeout as e:
logging.exception('Request for page set timed out: {}'.format(url))
continue
except ConnectionError as e:
if re.search('Read timed out', str(e), re.IGNORECASE):
logging.exception('Request for page set timed out (network problem): {}'.format(url))
continue
else:
raise
</code></pre></div>
<p dir="auto"><strong>models.py</strong>:<br>
<a href="https://github.com/psf/requests/blob/master/requests/models.py">https://github.com/psf/requests/blob/master/requests/models.py</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def generate():
# Special case for urllib3.
if hasattr(self.raw, 'stream'):
try:
for chunk in self.raw.stream(chunk_size, decode_content=True):
yield chunk
except ProtocolError as e:
raise ChunkedEncodingError(e)
except DecodeError as e:
raise ContentDecodingError(e)
except ReadTimeoutError as e:
raise ConnectionError(e)"><pre class="notranslate"><code class="notranslate">def generate():
# Special case for urllib3.
if hasattr(self.raw, 'stream'):
try:
for chunk in self.raw.stream(chunk_size, decode_content=True):
yield chunk
except ProtocolError as e:
raise ChunkedEncodingError(e)
except DecodeError as e:
raise ContentDecodingError(e)
except ReadTimeoutError as e:
raise ConnectionError(e)
</code></pre></div>
<p dir="auto"><strong>Exception</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR -- 04/19/2020 04:51:32 PM -- root -- ThreadPoolExecutor-0_0 -- Request for page set timed out (network problem): https://confluence.danskenet.net/rest/api/content/search?expand=version,history,space,body.storage,children.attachment.version,children.attachment.history,children.attachment.space&limit=50&start=1900&cql=(type=page)
Traceback (most recent call last):
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 425, in _error_catcher
yield
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 755, in read_chunked
chunk = self._handle_chunk(amt)
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 708, in _handle_chunk
returned_chunk = self._fp._safe_read(self.chunk_left)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 620, in _safe_read
chunk = self.fp.read(min(amt, MAXAMOUNT))
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 929, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/models.py", line 751, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 560, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 781, in read_chunked
self._original_response.close()
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='confluence.danskenet.net', port=443): Read timed out.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nlykkei/projects/atlassian-watchdog/confluence/confluence.py", line 112, in __producer
with rs.get(url, params={}, headers={}, auth=self.auth, verify=self.ssl_verify, timeout=(30, 30)) as r:
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/sessions.py", line 683, in send
r.content
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/models.py", line 829, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/models.py", line 758, in generate
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='confluence.danskenet.net', port=443): Read timed out."><pre class="notranslate"><code class="notranslate">ERROR -- 04/19/2020 04:51:32 PM -- root -- ThreadPoolExecutor-0_0 -- Request for page set timed out (network problem): https://confluence.danskenet.net/rest/api/content/search?expand=version,history,space,body.storage,children.attachment.version,children.attachment.history,children.attachment.space&limit=50&start=1900&cql=(type=page)
Traceback (most recent call last):
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 425, in _error_catcher
yield
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 755, in read_chunked
chunk = self._handle_chunk(amt)
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 708, in _handle_chunk
returned_chunk = self._fp._safe_read(self.chunk_left)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 620, in _safe_read
chunk = self.fp.read(min(amt, MAXAMOUNT))
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 929, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/models.py", line 751, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 560, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 781, in read_chunked
self._original_response.close()
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='confluence.danskenet.net', port=443): Read timed out.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nlykkei/projects/atlassian-watchdog/confluence/confluence.py", line 112, in __producer
with rs.get(url, params={}, headers={}, auth=self.auth, verify=self.ssl_verify, timeout=(30, 30)) as r:
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/sessions.py", line 683, in send
r.content
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/models.py", line 829, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
File "/Users/nlykkei/projects/atlassian-watchdog/lib/python3.7/site-packages/requests/models.py", line 758, in generate
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='confluence.danskenet.net', port=443): Read timed out.
</code></pre></div>
<h2 dir="auto">Expected Result</h2>
<p dir="auto">I would expect a <code class="notranslate">requests.exceptions.ReadTimeout</code> to be raised.</p>
<h2 dir="auto">Actual Result</h2>
<p dir="auto">A <code class="notranslate">requests.exceptions.ConnectError</code> was raised instead, with the error message: <code class="notranslate">Read timed out.</code></p>
<h2 dir="auto">System Information</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -m requests.help"><pre class="notranslate"><code class="notranslate">$ python -m requests.help
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="nlykkei:~$ python3 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.7.7"
},
"platform": {
"release": "19.4.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.23.0"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.24.3"
},
"using_pyopenssl": false
}"><pre class="notranslate"><code class="notranslate">nlykkei:~$ python3 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.7.7"
},
"platform": {
"release": "19.4.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.23.0"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.24.3"
},
"using_pyopenssl": false
}
</code></pre></div>
<p dir="auto">This command is only available on Requests v2.16.4 and greater. Otherwise,<br>
please provide some basic information about your system (Python version,<br>
operating system, &c).</p> | 1 |
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong><br>
I'm using code splitting (via SplitChunksPlugin) to extract common dependencies. I have multiple entry points. The output target is node.<br>
When trying to run the successfully bundled code, I get the error <code class="notranslate">TypeError: Cannot read property 'call' of undefined</code>.<br>
When I remove code splitting from my config, the output runs without error.</p>
<p dir="auto">Some commonalities with previous comments:</p>
<ul dir="auto">
<li>I have multiple named entry points and one depends on the other, as in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="67209917" data-permission-text="Title is private" data-url="https://github.com/webpack/webpack/issues/959" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/959/hovercard?comment_id=397449112&comment_type=issue_comment" href="https://github.com/webpack/webpack/issues/959#issuecomment-397449112">#959 (comment)</a></li>
<li>One of my files imports the relative path <code class="notranslate">'../../fixtures/mock_users.json'</code>, similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="67209917" data-permission-text="Title is private" data-url="https://github.com/webpack/webpack/issues/959" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/959/hovercard?comment_id=118394128&comment_type=issue_comment" href="https://github.com/webpack/webpack/issues/959#issuecomment-118394128">#959 (comment)</a>.</li>
</ul>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
I've provided a minimal project setup that reproduces the problem: <a href="https://gitlab.com/jlapointe/codesplittingtest" rel="nofollow">https://gitlab.com/jlapointe/codesplittingtest</a></p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
The code generated using code splitting should behave identically to the code generated without using code splitting.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 4.31.0<br>
Node.js version: 10.15.3<br>
Operating System: Ubuntu 18.04 LTS<br>
Additional tools: NodeExternals</p> | <p dir="auto">If you add aliases into your DllPlugin, it will only write out the raw file path. This causes issues when you have to dual maint. aliases. Also when you are trying to abstract out logic, such as locale-specific bundles.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sokra/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sokra">@sokra</a> Is there a likelihood that this feature is possible and would be accepted if I put in a PR?</p>
<p dir="auto">Example:</p>
<p dir="auto"><strong>DllPlugin</strong></p>
<p dir="auto"><em>vendor.js</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="require('underscore');"><pre class="notranslate"><code class="notranslate">require('underscore');
</code></pre></div>
<p dir="auto"><em>vendor.config.js</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
entry: {
locale: [path.resolve('./vendor.js')]
},
output: {
path: path.resolve('./build/'),
filename: '[name].bundle.js',
library: '[name]'
},
plugins: [
new webpack.DllPlugin({
name: '[name]',
path: 'build/vendor-manifest.json'
})
],
resolve: {
extensions: ['', '.js'],
alias: {
'underscore': path.join('bower_components', 'lodash', 'dist', 'lodash.js')
}
}
}"><pre class="notranslate"><code class="notranslate">{
entry: {
locale: [path.resolve('./vendor.js')]
},
output: {
path: path.resolve('./build/'),
filename: '[name].bundle.js',
library: '[name]'
},
plugins: [
new webpack.DllPlugin({
name: '[name]',
path: 'build/vendor-manifest.json'
})
],
resolve: {
extensions: ['', '.js'],
alias: {
'underscore': path.join('bower_components', 'lodash', 'dist', 'lodash.js')
}
}
}
</code></pre></div>
<p dir="auto"><em>vendor-manifest.json</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"name": "vendor",
"content": {
"./bower_components/lodash/lodash.js": 1,
"./vendor.js": 2
}
}"><pre class="notranslate"><code class="notranslate">{
"name": "vendor",
"content": {
"./bower_components/lodash/lodash.js": 1,
"./vendor.js": 2
}
}
</code></pre></div> | 0 |
<p dir="auto">Is it possible to duplicate tabs as on linux terminals?</p>
<p dir="auto">On gnome term I can use ctrl+shift+t and it duplicates the current tab on the same directory while ctrl+t opens a new tab.</p> | <blockquote>
<p dir="auto">Is this indicative of a larger problem? Should we file an outstanding work item to audit all sites of manipulating the active buffer and/or somehow change the design such that the methods cannot accidentally be called without resolving which one is the active one first?</p>
</blockquote>
<p dir="auto">For the latter, my proposal would be to hide all the verbage methods off the base class and implement some sort of interface that holds them that is only returned when/if someone has correctly queried for the active one first. I'd accept competing proposals, though.</p>
<p dir="auto"><em>Originally posted by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/miniksa/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/miniksa">@miniksa</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="492514429" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/2729" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/terminal/pull/2729/hovercard?comment_id=530923095&comment_type=issue_comment" href="https://github.com/microsoft/terminal/pull/2729#issuecomment-530923095">#2729 (comment)</a></em></p> | 0 |
<p dir="auto">According Docs<br>
<a href="http://www.elasticsearch.org/guide/reference/api/search/facets/terms-facet/" rel="nofollow">http://www.elasticsearch.org/guide/reference/api/search/facets/terms-facet/</a><br>
and code<br>
org.elasticsearch.search.facet.terms.TermsFacet</p>
<p dir="auto">ordering works for "count" and "term" in two directions.</p>
<p dir="auto">for "count", the tie breaker is a "normal" compareTo, which will compare the String Text of the term. However this will produce a reverse order on the term names. For "reverse_count", this is the opposite.</p>
<p dir="auto">so I end up with z:1, a:1, rather than a:1,z:1 which, to my expectation, more people would be able to use to find the matching entries.</p>
<p dir="auto">Additionally, the comparison is always case sensitive and cannot be changed.</p>
<p dir="auto">So in the end, It looks like I always will need to resort the entries myself. But this creates wasted effort. Right now, it is not possible to get the facets without any sorting.<br>
Elasticsearch will always sort the Facets, and then I will have to sort them again.</p> | <p dir="auto">Hi</p>
<p dir="auto">My apologies if I am doing something dumb but I have been trying to get this working for a while now.</p>
<p dir="auto">I have downloaded and unpacked elasticsearch 2.1 (ZIP from elastic.co) and get the error below. I have reinstalled Java 1.8 and cleaned up any old installations but still get the same error. Any suggestions? I have repeated the download and install of both ElasticSearch and Java a couple of times to be sure.</p>
<p dir="auto">JAVA_HOME set to C:\Progra~1\Java\jdk1.8.0_25</p>
<p dir="auto">Thanks in advance</p>
<p dir="auto">CM</p>
<p dir="auto">Microsoft Windows [Version 6.1.7601]<br>
Copyright (c) 2009 Microsoft Corporation. All rights reserved.</p>
<p dir="auto">C:\WorkSpace\elasticsearch-2.1.0\bin>java -version<br>
java version "1.8.0_25"<br>
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)<br>
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)</p>
<p dir="auto">C:\WorkSpace\elasticsearch-2.1.0\bin>elasticsearch.bat<br>
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/bootstrap/Elasticsearch : Unsupported major.minor version 51.0<br>
at java.lang.ClassLoader.defineClass1(Native Method)<br>
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630)<br>
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)<br>
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)<br>
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)<br>
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)<br>
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)<br>
at java.security.AccessController.doPrivileged(Native Method)<br>
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br>
at java.lang.ClassLoader.loadClass(ClassLoader.java:305)<br>
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br>
at java.lang.ClassLoader.loadClass(ClassLoader.java:246)<br>
Could not find the main class: org.elasticsearch.bootstrap.Elasticsearch. Program will exit.</p> | 0 |
<p dir="auto">The bug can be demonstrated on the following example:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sqlalchemy import Table, MetaData, Integer
from sqlalchemy.dialects import mysql
metadata = MetaData()
table = Table('table', metadata,
Column('id', Integer, primary_key=True),
Column('int_or_null', Integer, nullable=True),
)
def dump_sql(query):
return str(query.compile(dialect=mysql.dialect()))
query = mysql.insert(table) \
.on_duplicate_key_update(int_or_null=None)
print(dump_sql(query))"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-v">Table</span>, <span class="pl-v">MetaData</span>, <span class="pl-v">Integer</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span> <span class="pl-k">import</span> <span class="pl-s1">mysql</span>
<span class="pl-s1">metadata</span> <span class="pl-c1">=</span> <span class="pl-v">MetaData</span>()
<span class="pl-s1">table</span> <span class="pl-c1">=</span> <span class="pl-v">Table</span>(<span class="pl-s">'table'</span>, <span class="pl-s1">metadata</span>,
<span class="pl-v">Column</span>(<span class="pl-s">'id'</span>, <span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>),
<span class="pl-v">Column</span>(<span class="pl-s">'int_or_null'</span>, <span class="pl-v">Integer</span>, <span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">True</span>),
)
<span class="pl-k">def</span> <span class="pl-en">dump_sql</span>(<span class="pl-s1">query</span>):
<span class="pl-k">return</span> <span class="pl-en">str</span>(<span class="pl-s1">query</span>.<span class="pl-en">compile</span>(<span class="pl-s1">dialect</span><span class="pl-c1">=</span><span class="pl-s1">mysql</span>.<span class="pl-en">dialect</span>()))
<span class="pl-s1">query</span> <span class="pl-c1">=</span> <span class="pl-s1">mysql</span>.<span class="pl-en">insert</span>(<span class="pl-s1">table</span>) \
.<span class="pl-en">on_duplicate_key_update</span>(<span class="pl-s1">int_or_null</span><span class="pl-c1">=</span><span class="pl-c1">None</span>)
<span class="pl-en">print</span>(<span class="pl-en">dump_sql</span>(<span class="pl-s1">query</span>))</pre></div>
<p dir="auto">which generates an invalid SQL that subsequently fails to execute:</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="INSERT INTO `table` (id, int_or_null)
VALUES (%s, %s)
ON DUPLICATE KEY UPDATE "><pre class="notranslate"><span class="pl-k">INSERT INTO</span> <span class="pl-s"><span class="pl-pds">`</span>table<span class="pl-pds">`</span></span> (id, int_or_null)
<span class="pl-k">VALUES</span> (%s, %s)
<span class="pl-k">ON</span> DUPLICATE KEY <span class="pl-k">UPDATE</span> </pre></div>
<p dir="auto">The missing <code class="notranslate">int_or_null = %s</code> or <code class="notranslate">int_or_null = NULL</code> part is apparently being cut in the <code class="notranslate">visit_on_duplicate_key_update(...)</code> function:</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/sqlalchemy/sqlalchemy/blob/e2521b595ae8b5b4ca8147c5ee13e2fc0f597e63/lib/sqlalchemy/dialects/mysql/base.py#L1241-L1242">sqlalchemy/lib/sqlalchemy/dialects/mysql/base.py</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 1241 to 1242
in
<a data-pjax="true" class="commit-tease-sha" href="/sqlalchemy/sqlalchemy/commit/e2521b595ae8b5b4ca8147c5ee13e2fc0f597e63">e2521b5</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="L1241" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1241"></td>
<td id="LC1241" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-s1">val</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>: </td>
</tr>
<tr class="border-0">
<td id="L1242" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1242"></td>
<td id="LC1242" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">continue</span> </td>
</tr>
</tbody></table>
</div>
</div>
<p></p> | <p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">the ZBlog demo can illustrate this. this relationship in mapper.py:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Topic.mapper = mapper(Topic, tables.topics)
TopicAssociation.mapper = mapper(TopicAssociation,tables.topic_xref,
primary_key=[tables.topic_xref.c.topic_id](tables.topic_xref.c.post_id,),
properties={
'topic':relation(Topic.mapper, lazy=False),
})
Post.mapper = mapper(Post, posts_with_ccount, properties={
'id':posts_with_ccount.c.post_id,
'topics':relation(TopicAssociation, lazy=False, private=True, association=Topic)
}, is_primary=True, order_by=[desc(posts_with_ccount.c.datetime)](desc(posts_with_ccount.c.datetime)))"><pre class="notranslate"><code class="notranslate">Topic.mapper = mapper(Topic, tables.topics)
TopicAssociation.mapper = mapper(TopicAssociation,tables.topic_xref,
primary_key=[tables.topic_xref.c.topic_id](tables.topic_xref.c.post_id,),
properties={
'topic':relation(Topic.mapper, lazy=False),
})
Post.mapper = mapper(Post, posts_with_ccount, properties={
'id':posts_with_ccount.c.post_id,
'topics':relation(TopicAssociation, lazy=False, private=True, association=Topic)
}, is_primary=True, order_by=[desc(posts_with_ccount.c.datetime)](desc(posts_with_ccount.c.datetime)))
</code></pre></div>
<p dir="auto">this creates TopicAssociation as a many-to-many association object. If you go to the interface and enter a post, and put the same topic name twice, it saves. This is the bug. the list of TopicAssociations should somehow be unique based on the Topic object its attached to, just like any other collection. then if you go to update that post, the update on the topicassocaitions returns 2 rows instead of 1 and the concurrency detector goes off.</p> | 0 |
<p dir="auto">NOTE: Only file GitHub issues for bugs and feature requests. All other topics will be closed.</p>
<p dir="auto">I'm now using TF version 0.10.0 installed from source.<br>
I'm not sure its a bug or intended implementation but the <code class="notranslate">embedding_lookup()</code> returns zeros when the index exceed embedding matrix size. For example,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" import tensorflow as tf
import numpy as np
embd_mat = np.linspace(1,10,10).reshape([10,1])*np.array([1,2,3]).reshape([1,3])
idx = np.linspace(0,19,20)
embd_in = tf.placeholder(tf.float32,[10,3])
idx_in = tf.placeholder(tf.int32,[20])
output = tf.nn.embedding_lookup(embd_in,idx_in)
with tf.Session() as sess:
sess.run(tf.initialize_all_variables())
embd_out = sess.run(output,feed_dict={embd_in:embd_mat, idx_in:idx})
print embd_out"><pre class="notranslate"><code class="notranslate"> import tensorflow as tf
import numpy as np
embd_mat = np.linspace(1,10,10).reshape([10,1])*np.array([1,2,3]).reshape([1,3])
idx = np.linspace(0,19,20)
embd_in = tf.placeholder(tf.float32,[10,3])
idx_in = tf.placeholder(tf.int32,[20])
output = tf.nn.embedding_lookup(embd_in,idx_in)
with tf.Session() as sess:
sess.run(tf.initialize_all_variables())
embd_out = sess.run(output,feed_dict={embd_in:embd_mat, idx_in:idx})
print embd_out
</code></pre></div>
<p dir="auto">The output of above code is,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[[ 1. 2. 3.]
[ 2. 4. 6.]
[ 3. 6. 9.]
[ 4. 8. 12.]
[ 5. 10. 15.]
[ 6. 12. 18.]
[ 7. 14. 21.]
[ 8. 16. 24.]
[ 9. 18. 27.]
[ 10. 20. 30.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]]"><pre class="notranslate"><code class="notranslate">[[ 1. 2. 3.]
[ 2. 4. 6.]
[ 3. 6. 9.]
[ 4. 8. 12.]
[ 5. 10. 15.]
[ 6. 12. 18.]
[ 7. 14. 21.]
[ 8. 16. 24.]
[ 9. 18. 27.]
[ 10. 20. 30.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]]
</code></pre></div>
<p dir="auto">Is there any reason it returns zeros not raises an error?<br>
I think that case happens only when programmers make a mistake.<br>
Unless there is any specific reason which I don't know of, I think it should raise a value error that the index is exceeding the matrix size.</p> | <p dir="auto">NOTE: Only file GitHub issues for bugs and feature requests. All other topics will be closed.</p>
<p dir="auto">I wrote an issues a month ago about the same problem <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="185907028" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/5260" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/5260/hovercard" href="https://github.com/tensorflow/tensorflow/issues/5260">#5260</a><br>
I recently update the TF to latest master branch(<code class="notranslate">0.11.head</code>) without any custom modification and the commit hash is <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/55dbc54192a378c5e685c52595f42503f037320e/hovercard" href="https://github.com/tensorflow/tensorflow/commit/55dbc54192a378c5e685c52595f42503f037320e"><tt>55dbc54</tt></a></p>
<p dir="auto">The tf.embedding_lookup() still do not raise error even though the index is exceeding the embedding matrix size. It automatically fills zeros as you can see in the below example.</p>
<p dir="auto">I tested same code with two different machines and the result was same.<br>
In the previous issue(<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="185907028" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/5260" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/5260/hovercard" href="https://github.com/tensorflow/tensorflow/issues/5260">#5260</a>), <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/strategist333/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/strategist333">@strategist333</a> said it raise an <code class="notranslate">InvalidArgumentError</code> in binary release.<br>
But when I tested TF installed from source, it didn't...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" import tensorflow as tf
import numpy as np
embd_mat = np.linspace(1,10,10).reshape([10,1])*np.array([1,2,3]).reshape([1,3])
idx = np.linspace(0,19,20)
embd_in = tf.placeholder(tf.float32,[10,3])
idx_in = tf.placeholder(tf.int32,[20])
output = tf.nn.embedding_lookup(embd_in,idx_in)
with tf.Session() as sess:
sess.run(tf.initialize_all_variables())
embd_out = sess.run(output,feed_dict={embd_in:embd_mat, idx_in:idx})
print embd_out"><pre class="notranslate"><code class="notranslate"> import tensorflow as tf
import numpy as np
embd_mat = np.linspace(1,10,10).reshape([10,1])*np.array([1,2,3]).reshape([1,3])
idx = np.linspace(0,19,20)
embd_in = tf.placeholder(tf.float32,[10,3])
idx_in = tf.placeholder(tf.int32,[20])
output = tf.nn.embedding_lookup(embd_in,idx_in)
with tf.Session() as sess:
sess.run(tf.initialize_all_variables())
embd_out = sess.run(output,feed_dict={embd_in:embd_mat, idx_in:idx})
print embd_out
</code></pre></div>
<p dir="auto">The output of above code is,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[[ 1. 2. 3.]
[ 2. 4. 6.]
[ 3. 6. 9.]
[ 4. 8. 12.]
[ 5. 10. 15.]
[ 6. 12. 18.]
[ 7. 14. 21.]
[ 8. 16. 24.]
[ 9. 18. 27.]
[ 10. 20. 30.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]]"><pre class="notranslate"><code class="notranslate">[[ 1. 2. 3.]
[ 2. 4. 6.]
[ 3. 6. 9.]
[ 4. 8. 12.]
[ 5. 10. 15.]
[ 6. 12. 18.]
[ 7. 14. 21.]
[ 8. 16. 24.]
[ 9. 18. 27.]
[ 10. 20. 30.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]]
</code></pre></div> | 1 |
<h3 dir="auto">Description</h3>
<p dir="auto">I find the connections view often leads to confusion because connections defined as environment variables and in a secrets backend are not displayed. This is not stated clearly.</p>
<p dir="auto">I suggest to:</p>
<ol dir="auto">
<li>Display connections set via environment variables (and hide the edit controls for those connections). This could also help debugging a URI string if you could see the URI components broken down in the connection view.</li>
<li>Display an info message in the connections view in case a secrets backend is configured stating that those connections are not visible in the webserver.</li>
</ol>
<h3 dir="auto">Use case/motivation</h3>
<p dir="auto">Motivation: having to explain over and over that <em>only</em> connections defined in the Airflow metastore are visible in the webserver.</p>
<h3 dir="auto">Related issues</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit a PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | <p dir="auto"><strong>Apache Airflow version</strong>: 1.10.9</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): ubuntu 18.04</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>: Eventlet with CeleryExecutor not working in Airflow 1.10.9 version<br>
<a href="https://github.com/apache/airflow/files/4472893/log.txt">log.txt</a><br>
I notice when I tried switching celery pool option to eventlet the worker doesn’t seem to be picking up tasks.</p>
<p dir="auto">Attached the snippet of logs.</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto"><strong>How to reproduce it</strong>: Start the airflow celery workers with Eventlet</p>
<p dir="auto"><strong>Anything else we need to know</strong>: Attached the logs</p> | 0 |
<h2 dir="auto">Feature request</h2>
<p dir="auto">When optimization.sideEffects is set to true, the code will not be analyzed for side effects during production mode construction,<br>
The sideEffects field in package.json will still be used<br>
Whether sideEffects in package.json should be ignored when optimization.sideEffects is true and in production mode</p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
Whether sideEffects in package.json should be ignored when optimization.sideEffects is true and in production mode,<br>
but when production model and optimization.sideEffects:true,Still use package.json's sideEffects</p>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong><br>
<a href="https://github.com/galaxy-s10/issue-demo/blob/master/demo1/webpack.config.js">https://github.com/galaxy-s10/issue-demo/blob/master/demo1/webpack.config.js</a></p>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong></p>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong><br>
emm</p> | <p dir="auto"><strong>What is the current behavior?</strong></p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ERROR in TypeError: __webpack_require__(...) is not a function
- index.ejs:1205 Object.../node_modules/webpack/buildin/harmony-module.js
/home/adam/apps/memory-n-back/web/index.ejs:1205:1
- index.ejs:622 __webpack_require__
/home/adam/apps/memory-n-back/web/index.ejs:622:30
- index.ejs:46 fn
/home/adam/apps/memory-n-back/web/index.ejs:46:20
- index.ejs:1197 Object.../node_modules/webpack/buildin/global.js
/home/adam/apps/memory-n-back/web/index.ejs:1197:1
- index.ejs:622 __webpack_require__
/home/adam/apps/memory-n-back/web/index.ejs:622:30
- index.ejs:46 fn
/home/adam/apps/memory-n-back/web/index.ejs:46:20
- index.ejs:1189 Object.../node_modules/lodash/lodash.js
/home/adam/apps/memory-n-back/web/index.ejs:1189:1"><pre class="notranslate">ERROR <span class="pl-k">in</span> TypeError: __webpack_require__(...) is not a function
- index.ejs:1205 Object.../node_modules/webpack/buildin/harmony-module.js
/home/adam/apps/memory-n-back/web/index.ejs:1205:1
- index.ejs:622 __webpack_require__
/home/adam/apps/memory-n-back/web/index.ejs:622:30
- index.ejs:46 fn
/home/adam/apps/memory-n-back/web/index.ejs:46:20
- index.ejs:1197 Object.../node_modules/webpack/buildin/global.js
/home/adam/apps/memory-n-back/web/index.ejs:1197:1
- index.ejs:622 __webpack_require__
/home/adam/apps/memory-n-back/web/index.ejs:622:30
- index.ejs:46 fn
/home/adam/apps/memory-n-back/web/index.ejs:46:20
- index.ejs:1189 Object.../node_modules/lodash/lodash.js
/home/adam/apps/memory-n-back/web/index.ejs:1189:1</pre></div>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
checking out <a href="https://github.com/goldylucks/memory-n-back/commit/6f0e93247c62b9c005f181abfaf1957eeb017696">this commit</a> from my <a href="https://github.com/goldylucks/memory-n-back">repo</a> and running <code class="notranslate">npm start</code></p>
<p dir="auto">The thing is I don't know what is causing the crash, because as u can c above, the logs are not very informational, hence I'm opening this issue and not asking on SO</p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
Work with tree shaking and not crashing</p>
<p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.</strong><br>
OS: <code class="notranslate">ubuntu 16.04</code><br>
webpack:<code class="notranslate"> 2.1.0-beta.25</code><br>
webpack-dev-server: <code class="notranslate">2.1.0-beta.0</code></p>
<p dir="auto">it crashes on both webpack and dev server</p> | 0 |
<h4 dir="auto">Challenge Name</h4>
<h6 dir="auto">Target Even Numbered Elements Using jQuery</h6>
<p dir="auto"><a href="url">https://www.freecodecamp.com/challenges/target-even-numbered-elements-using-jquery</a><br>
<strong><em>Previous challenges have same issue (and probably next ones)</em></strong></p>
<h4 dir="auto">Issue Description</h4>
<p dir="auto">One of the jquery code is rendered twice in the #preview .iphone .iframe-scroll.<br>
the problem appears when first loading the challenge and after a successful challenge test.</p>
<h2 dir="auto">Screenshot Available</h2>
<h6 dir="auto">P.S: The challenge test works without problem it's just the wrong preview that is the issue.</h6>
<h4 dir="auto">Browser Information</h4>
<ul dir="auto">
<li>Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0</li>
<li>Linux</li>
<li>Desktop</li>
</ul>
<h4 dir="auto">Your Code</h4>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// If relevant, paste all of your challenge code in here
<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well"); // This one is rendered twice
$("#target1").parent().css("background-color", "red");
$("#right-well").children().css("color", "orange");
$("#left-well").children().css("color", "green");
$(".target:nth-child(2)").addClass("animated bounce");
});
</script>
<!-- Only change code above this line. -->
<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>
"><pre class="notranslate"><span class="pl-c">// If relevant, paste all of your challenge code in here</span>
<span class="pl-c1"><</span><span class="pl-ent">script</span><span class="pl-c1">></span>
$(document).ready(function() <span class="pl-kos">{</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target1"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">"color"</span><span class="pl-kos">,</span> <span class="pl-s">"red"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target1"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">prop</span><span class="pl-kos">(</span><span class="pl-s">"disabled"</span><span class="pl-kos">,</span> <span class="pl-c1">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target4"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">remove</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target2"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">appendTo</span><span class="pl-kos">(</span><span class="pl-s">"#right-well"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target5"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">clone</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">appendTo</span><span class="pl-kos">(</span><span class="pl-s">"#left-well"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// This one is rendered twice</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target1"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">parent</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">"background-color"</span><span class="pl-kos">,</span> <span class="pl-s">"red"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">$</span><span class="pl-kos">(</span><span class="pl-s">"#right-well"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">children</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">"color"</span><span class="pl-kos">,</span> <span class="pl-s">"orange"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">$</span><span class="pl-kos">(</span><span class="pl-s">"#left-well"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">children</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">"color"</span><span class="pl-kos">,</span> <span class="pl-s">"green"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">$</span><span class="pl-kos">(</span><span class="pl-s">".target:nth-child(2)"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addClass</span><span class="pl-kos">(</span><span class="pl-s">"animated bounce"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>);
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">script</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">Only</span> <span class="pl-s1">change</span> <span class="pl-s1">code</span> <span class="pl-s1">above</span> <span class="pl-s1">this</span> <span class="pl-s1">line</span><span class="pl-kos">.</span> <span class="pl-c1">--</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"container-fluid"</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">h3</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"text-primary text-center"</span><span class="pl-c1">></span>jQuery Playground<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">h3</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"row"</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"col-xs-6"</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">h4</span><span class="pl-c1">></span>#left-well<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">h4</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"well"</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-s">"left-well"</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"btn btn-default target"</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-s">"target1"</span><span class="pl-c1">></span>#target1<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">button</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"btn btn-default target"</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-s">"target2"</span><span class="pl-c1">></span>#target2<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">button</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"btn btn-default target"</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-s">"target3"</span><span class="pl-c1">></span>#target3<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">button</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"col-xs-6"</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">h4</span><span class="pl-c1">></span>#right-well<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">h4</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"well"</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-s">"right-well"</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"btn btn-default target"</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-s">"target4"</span><span class="pl-c1">></span>#target4<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">button</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"btn btn-default target"</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-s">"target5"</span><span class="pl-c1">></span>#target5<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">button</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"btn btn-default target"</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-s">"target6"</span><span class="pl-c1">></span>#target6<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">button</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span></pre></div>
<h4 dir="auto">Screenshot</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/19495861/15451584/044a5e8c-1fba-11e6-91e4-0434b3621738.png"><img src="https://cloud.githubusercontent.com/assets/19495861/15451584/044a5e8c-1fba-11e6-91e4-0434b3621738.png" alt="git_fcc_issue" style="max-width: 100%;"></a></p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-clone-an-element-using-jquery#?solution=fccss%0A%20%20%24%28document%29.ready%28function%28%29%20%7B%0A%20%20%20%20%24%28%22%23target1%22%29.css%28%22color%22%2C%20%22red%22%29%3B%0A%20%20%20%20%24%28%22%23target1%22%29.prop%28%22disabled%22%2C%20true%29%3B%0A%20%20%20%20%24%28%22%23target4%22%29.remove%28%29%3B%0A%20%20%20%20%24%28%22%23target2%22%29.appendTo%28%22%23right-well%22%29%3B%0A%20%20%20%20%24%28%22%23target5%22%29.clone%28%29.appendTo%28%22%23left-well%22%29%3B%0A%20%20%7D%29%3B%0Afcces%0A%0A%3C!--%20Only%20change%20code%20above%20this%20line.%20--%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch3%20class%3D%22text-primary%20text-center%22%3EjQuery%20Playground%3C%2Fh3%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23left-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22left-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target1%22%3E%23target1%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target2%22%3E%23target2%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target3%22%3E%23target3%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23right-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22right-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target4%22%3E%23target4%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target5%22%3E%23target5%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target6%22%3E%23target6%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A" rel="nofollow">Waypoint: Clone an Element Using jQuery</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<h2 dir="auto">Issue</h2>
<p dir="auto">I believe I've found bug in the phone simulation in <strong>Waypoint: Clone an Element Using jQuery</strong>:</p>
<p dir="auto">I entered the code to clone <code class="notranslate">target5</code> and append it to <code class="notranslate">left-well</code>, and now I see three <strong>target5</strong> buttons in the phone simulator. FCC says my code is correct and advances me to the next challenge. The following challenges also show three target5 buttons:</p>
<ul dir="auto">
<li>Waypoint: Target the Parent of an Element Using jQuery</li>
<li>Waypoint: Target the Children of an Element Using jQuery</li>
</ul>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/qualitymanifest/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/qualitymanifest">@qualitymanifest</a> confirms this issue on his <strong>Linux</strong> box.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5673126/11647398/76751658-9d35-11e5-8fcf-112ab89c6920.png"><img src="https://cloud.githubusercontent.com/assets/5673126/11647398/76751658-9d35-11e5-8fcf-112ab89c6920.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">My code:</h2>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well");
});
</script>
<!-- Only change code above this line. -->
<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">script</span><span class="pl-kos">></span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">ready</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target1"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">css</span><span class="pl-kos">(</span><span class="pl-s">"color"</span><span class="pl-kos">,</span> <span class="pl-s">"red"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target1"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">prop</span><span class="pl-kos">(</span><span class="pl-s">"disabled"</span><span class="pl-kos">,</span> <span class="pl-c1">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target4"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">remove</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target2"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">appendTo</span><span class="pl-kos">(</span><span class="pl-s">"#right-well"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s">"#target5"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">clone</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">appendTo</span><span class="pl-kos">(</span><span class="pl-s">"#left-well"</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-ent">script</span><span class="pl-kos">></span>
<span class="pl-c"><!-- Only change code above this line. --></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">container-fluid</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h3</span> <span class="pl-c1">class</span>="<span class="pl-s">text-primary text-center</span>"<span class="pl-kos">></span>jQuery Playground<span class="pl-kos"></</span><span class="pl-ent">h3</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">row</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h4</span><span class="pl-kos">></span>#left-well<span class="pl-kos"></</span><span class="pl-ent">h4</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">left-well</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target1</span>"<span class="pl-kos">></span>#target1<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target2</span>"<span class="pl-kos">></span>#target2<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target3</span>"<span class="pl-kos">></span>#target3<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h4</span><span class="pl-kos">></span>#right-well<span class="pl-kos"></</span><span class="pl-ent">h4</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">right-well</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target4</span>"<span class="pl-kos">></span>#target4<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target5</span>"<span class="pl-kos">></span>#target5<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target6</span>"<span class="pl-kos">></span>#target6<span class="pl-kos"></</span><span class="pl-ent">button</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">div</span><span class="pl-kos">></span></pre></div> | 1 |
<p dir="auto">I'm new to typings, but it seems as if the Knex SchemaBuilder methods (<a href="https://github.com/borisyankov/DefinitelyTyped/blob/master/knex/knex.d.ts#L303">https://github.com/borisyankov/DefinitelyTyped/blob/master/knex/knex.d.ts#L303</a>) are returning the wrong type. They return Promise while the knex source has the methods just returning a reference to 'this' (<a href="https://github.com/tgriesser/knex/blob/master/lib/schema/builder.js#L27">https://github.com/tgriesser/knex/blob/master/lib/schema/builder.js#L27</a>).</p>
<p dir="auto">I don't see any references to promises of any kind in there. I'd be happy to create a PR, but I wanted to make sure I wasn't completely wrong here.</p>
<p dir="auto">Thanks!</p> | <p dir="auto">The following should compile but doesn't:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class ActiveState {
restrict = 'A'
constructor() {
}
}
angular.module('foo').directive('foo', ActiveState);"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">ActiveState</span> <span class="pl-kos">{</span>
<span class="pl-c1">restrict</span> <span class="pl-c1">=</span> <span class="pl-s">'A'</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-s1">angular</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">'foo'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">directive</span><span class="pl-kos">(</span><span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-smi">ActiveState</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | 0 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
I am loading some application configurations from a json file just before the application loads using APP_INITIALIZER shown below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Injectable()
export class ConfigService {
private _config: any;
constructor(private http: Http) {
}
load(): Promise<any> {
let promise: Promise<any> = new Promise((resolve: any) => {
this.http.get('app/config/appConfig.json').map(res => res.json())
.subscribe(config => {
this._config = config;
resolve(true);
});
});
return promise;
}
get(key: any) {
return this._config[key];
}
}
export function initConfiguration(configService: ConfigService): Function {
return () => configService.load();
}
@NgModule({
imports: [
//Some imports here.
],
declarations: [AppComponent],
bootstrap: [AppComponent],
providers: [
{
provide: APP_INITIALIZER,
useFactory: initConfiguration,
deps: [ConfigService],
multi: true
}
]
})
export class AppModule { }"><pre class="notranslate"><code class="notranslate">@Injectable()
export class ConfigService {
private _config: any;
constructor(private http: Http) {
}
load(): Promise<any> {
let promise: Promise<any> = new Promise((resolve: any) => {
this.http.get('app/config/appConfig.json').map(res => res.json())
.subscribe(config => {
this._config = config;
resolve(true);
});
});
return promise;
}
get(key: any) {
return this._config[key];
}
}
export function initConfiguration(configService: ConfigService): Function {
return () => configService.load();
}
@NgModule({
imports: [
//Some imports here.
],
declarations: [AppComponent],
bootstrap: [AppComponent],
providers: [
{
provide: APP_INITIALIZER,
useFactory: initConfiguration,
deps: [ConfigService],
multi: true
}
]
})
export class AppModule { }
</code></pre></div>
<p dir="auto">There are few services which use the loaded configurations by calling the <code class="notranslate">get</code> method defined in <code class="notranslate">ConfigService</code>. It was all working fine but after upgrading to 2.4.8, I can see that the <code class="notranslate">get</code> function is invoked before the configurations are loaded which produces an error.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
<code class="notranslate">ConfigService.load</code> should run in blocking mode like it used to work until 2.4.7</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
OS: Windows 10 Pro<br>
IDE: Visual Studio Code</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.8</li>
<li><strong>Browser:</strong> [all]</li>
<li><strong>Language:</strong> [TypeScript 2.1 | ES6]</li>
</ul> | <p dir="auto">It would be nice if we could tell angular not to destroy components when we navigate out of them, even if the next component is of a different type. This could be useful, for example, when building a window management system, where users can navigate through different windows (components) without<br>
the need for recovering the whole state.</p>
<p dir="auto">The existing canReuse hook is not useful for this use case, since it only allows us to reuse components if the previous and the next component have the same type.</p>
<p dir="auto">Code example:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Component({...})
class ExampleComponent {
canDestroy() { // or some other name
return this.closeButtonClicked;
}
}"><pre class="notranslate">@<span class="pl-v">Component</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">class</span> <span class="pl-v">ExampleComponent</span> <span class="pl-kos">{</span>
<span class="pl-en">canDestroy</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// or some other name</span>
<span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">closeButtonClicked</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | 0 |
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/create-a-form-element#?solution=%0A%3Clink%20href%3D%22https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%20%20.smaller-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%3Cp%3EClick%20here%20for%20%3Ca%20href%3D%22%23%22%3Ecat%20photos%3C%2Fa%3E.%3C%2Fp%3E%0A%0A%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20alt%3D%22A%20cute%20orange%20cat%20lying%20on%20its%20back.%20%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%0A%3Cp%3EThings%20cats%20love%3A%3C%2Fp%3E%0A%3Cul%3E%0A%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%3C%2Ful%3E%0A%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%3Col%3E%0A%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%3C%2Fol%3E%0A%3Cform%20action%3E%3Cinput%20type%3D%22text%22%20placeholder%3D%22cat%20photo%20URL%22%3E%3C%0A" rel="nofollow">Create a Form Element</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/57.0.2987.133 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, Monospace;
}
p {
font-size: 16px;
font-family: Monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.smaller-image {
width: 100px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p>Click here for <a href="#">cat photos</a>.</p>
<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back. " src="https://bit.ly/fcc-relaxing-cat"></a>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo"><input type="text" placeholder="cat photo URL"></form>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">link</span> <span class="pl-c1">href</span>="<span class="pl-s">https://fonts.googleapis.com/css?family=Lobster</span>" <span class="pl-c1">rel</span>="<span class="pl-s">stylesheet</span>" <span class="pl-c1">type</span>="<span class="pl-s">text/css</span>"<span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">style</span><span class="pl-kos">></span>
.<span class="pl-c1">red-text</span> {
<span class="pl-c1">color</span><span class="pl-kos">:</span> red;
}
<span class="pl-ent">h2</span> {
<span class="pl-c1">font-family</span><span class="pl-kos">:</span> Lobster<span class="pl-kos">,</span> Monospace;
}
<span class="pl-ent">p</span> {
<span class="pl-c1">font-size</span><span class="pl-kos">:</span> <span class="pl-c1">16<span class="pl-smi">px</span></span>;
<span class="pl-c1">font-family</span><span class="pl-kos">:</span> Monospace;
}
.<span class="pl-c1">thick-green-border</span> {
<span class="pl-c1">border-color</span><span class="pl-kos">:</span> green;
<span class="pl-c1">border-width</span><span class="pl-kos">:</span> <span class="pl-c1">10<span class="pl-smi">px</span></span>;
<span class="pl-c1">border-style</span><span class="pl-kos">:</span> solid;
<span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">50<span class="pl-smi">%</span></span>;
}
.<span class="pl-c1">smaller-image</span> {
<span class="pl-c1">width</span><span class="pl-kos">:</span> <span class="pl-c1">100<span class="pl-smi">px</span></span>;
}
<span class="pl-kos"></</span><span class="pl-ent">style</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h2</span> <span class="pl-c1">class</span>="<span class="pl-s">red-text</span>"<span class="pl-kos">></span>CatPhotoApp<span class="pl-kos"></</span><span class="pl-ent">h2</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Click here for <span class="pl-kos"><</span><span class="pl-ent">a</span> <span class="pl-c1">href</span>="<span class="pl-s">#</span>"<span class="pl-kos">></span>cat photos<span class="pl-kos"></</span><span class="pl-ent">a</span><span class="pl-kos">></span>.<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">a</span> <span class="pl-c1">href</span>="<span class="pl-s">#</span>"<span class="pl-kos">></span><span class="pl-kos"><</span><span class="pl-ent">img</span> <span class="pl-c1">class</span>="<span class="pl-s">smaller-image thick-green-border</span>" <span class="pl-c1">alt</span>="<span class="pl-s">A cute orange cat lying on its back. </span>" <span class="pl-c1">src</span>="<span class="pl-s">https://bit.ly/fcc-relaxing-cat</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">a</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Things cats love:<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">ul</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>cat nip<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>laser pointers<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>lasagna<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">ul</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Top 3 things cats hate:<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">ol</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>flea treatment<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>thunder<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">li</span><span class="pl-kos">></span>other cats<span class="pl-kos"></</span><span class="pl-ent">li</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">ol</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">form</span> <span class="pl-c1">action</span>="<span class="pl-s">/submit-cat-photo</span>"<span class="pl-kos">></span><span class="pl-kos"><</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">text</span>" <span class="pl-c1">placeholder</span>="<span class="pl-s">cat photo URL</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">form</span><span class="pl-kos">></span></pre></div> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life" rel="nofollow">http://www.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">When typing the solution, typing "$" "(" automatically generates a closing parenthesis, then typing the next "$" leaves "$($)" in the window, which is executed automatically, and freezes the page. From the behavior, I would assume an infinite loop. Copy-pasting the code suggestion bypasses the issue.</p>
<p dir="auto">Reloading the page, once the error has occurred, reloads the problematic code -- there is no user-accessible way to force a reset when the page isn't responding</p> | 0 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">Right now, there are two ways to get a component's "index":</p>
<ul dir="auto">
<li>Using <code class="notranslate">*ngFor</code> and getting the index from the context.</li>
<li>Using <code class="notranslate">@ContentChildren</code> or <code class="notranslate">@ViewChildren</code> on a parent component and moving the whatever logic uses the index to said parent component (only works when we are only interested in the index <em>among components of the same class</em>).</li>
</ul>
<p dir="auto">In cases where both of these are not possible, we have no way of getting a component's index. For instance, if you have a <code class="notranslate">TemplateRef</code> that contains several of your component statically:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<template>
<my-component>AAA<my-component>
<my-component>BBB<my-component>
<my-component>CCC<my-component>
</template>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">template</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">my-component</span><span class="pl-kos">></span>AAA<span class="pl-kos"><</span><span class="pl-ent">my-component</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">my-component</span><span class="pl-kos">></span>BBB<span class="pl-kos"><</span><span class="pl-ent">my-component</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">my-component</span><span class="pl-kos">></span>CCC<span class="pl-kos"><</span><span class="pl-ent">my-component</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">template</span><span class="pl-kos">></span></pre></div>
<p dir="auto">The parents that could query for <code class="notranslate">my-component</code> are the ones from the original template's location, not the ones from where the template is instantiated.</p>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">I do not know if it is possible, but I understand that each component has its own view, which is inserted inside a view container. Having access to the index of that view within its view container would be very useful.<br>
If this is not possible for some reason, I'd be very interested in knowing why, so I can understand more about the structure of the runtime app.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p>
<p dir="auto">This is a feature request, nothing to reproduce.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto">Write "ordered" reusable components, or components that care about the number of siblings before them, that would work in any context (with or without <code class="notranslate">*ngFor</code>, inside a template embedded in another part of the app, ...).</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.4.X</li>
</ul>
<ul dir="auto">
<li><strong>Browser:</strong> all</li>
</ul>
<ul dir="auto">
<li><strong>Language:</strong> all</li>
</ul> | <h1 dir="auto">Use Case</h1>
<p dir="auto"><code class="notranslate"><ng-content></code> allows for static (compile time resolution) projection of content. There are cases where the projection needs to be controlled programmatically. A common example is when the parent component would like to wrap/decorate the child components during projection.</p>
<h1 dir="auto">Mental Model</h1>
<p dir="auto">The mental model would be that <code class="notranslate"><ng-content></code> is for fast static projection, but for dynamic projection one would use a query to get a hold of the child components in the form of <code class="notranslate">ViewRef</code>s which could then be inserted programmatically at any location in the tree.</p>
<h1 dir="auto">Possible Solution</h1>
<ul dir="auto">
<li><code class="notranslate">ContentViewRef</code> extends <code class="notranslate">ViewRef</code></li>
<li><code class="notranslate">@Content(selector)</code> Provides a way to select direct children content elements using CSS selectors. (This would be after directives such as <code class="notranslate">ngFor</code> would unroll the content, and it would be in the correct order.)</li>
<li>This would allow selection of elements rather than directives. These <code class="notranslate">ContentViewRef</code>s could then be reinserted to any <code class="notranslate">ViewContainerRef</code></li>
<li>We would need <code class="notranslate">ngViewOutlet</code> (similar to <code class="notranslate">ngTemplateOutlet</code>).</li>
</ul>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Component({
template: `
<div *ngFor="let view of allViews">
<template ngViewOutlet="view"></template>
</div>
<ng-content><!-- project non selected nodes, such as text nodes --></ng-content>
`
})
class MySelect {
@Content('*') allViews: ContentViewRef[];
// another example
@Content('my-option') optionViews: ContentViewRef[];
}"><pre class="notranslate">@<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">template</span>: <span class="pl-s">`</span>
<span class="pl-s"> <div *ngFor="let view of allViews"></span>
<span class="pl-s"> <template ngViewOutlet="view"></template></span>
<span class="pl-s"> </div></span>
<span class="pl-s"> <ng-content><!-- project non selected nodes, such as text nodes --></ng-content></span>
<span class="pl-s">`</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">class</span> <span class="pl-smi">MySelect</span> <span class="pl-kos">{</span>
@<span class="pl-smi">Content</span><span class="pl-kos">(</span><span class="pl-s">'*'</span><span class="pl-kos">)</span> <span class="pl-c1">allViews</span>: <span class="pl-smi">ContentViewRef</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-c">// another example</span>
@<span class="pl-smi">Content</span><span class="pl-kos">(</span><span class="pl-s">'my-option'</span><span class="pl-kos">)</span> <span class="pl-c1">optionViews</span>: <span class="pl-smi">ContentViewRef</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Component({
selector: 'app',
template: `
<my-select>
Option
<my-option>header</my-option>
<my-option *ngFor="let item in items">unrolled items {{item}}</my-option>
<my-option-group>
<my-option>
foo <b>bar</b>
<other-directive />
</my-option>
<my-separator></my-separator>
<my-option></my-option>
</my-option-group>
</my-select>
`
})
class App {}"><pre class="notranslate">@<span class="pl-smi">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-kos">,</span>
<span class="pl-c1">template</span>: <span class="pl-s">`</span>
<span class="pl-s"><my-select></span>
<span class="pl-s"> Option</span>
<span class="pl-s"> <my-option>header</my-option></span>
<span class="pl-s"> <my-option *ngFor="let item in items">unrolled items {{item}}</my-option></span>
<span class="pl-s"> <my-option-group></span>
<span class="pl-s"> <my-option></span>
<span class="pl-s"> foo <b>bar</b></span>
<span class="pl-s"> <other-directive /></span>
<span class="pl-s"></my-option></span>
<span class="pl-s"> <my-separator></my-separator></span>
<span class="pl-s"> <my-option></my-option></span>
<span class="pl-s"></my-option-group></span>
<span class="pl-s"></my-select></span>
<span class="pl-s">`</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">class</span> <span class="pl-smi">App</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> | 1 |
<p dir="auto">Ran into an issue with the accordion. When you click on toggle headings too quickly, it doesn't always collapses all the groups properly, in this example, I've clicked on the "Collapsible Group Item # 2" then "Collapsible Group Item # 1", but it opened both of them at the same time.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1523107/4318543/09a178c4-3f20-11e4-96df-2d0b3465c719.gif"><img src="https://cloud.githubusercontent.com/assets/1523107/4318543/09a178c4-3f20-11e4-96df-2d0b3465c719.gif" alt="bootstrapbug" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">Using latest version of Google Chrome (Version 37.0.2062.120), probably something to do with transition not being picked up properly.</p> | <p dir="auto">Step 1. Navigate to this page: <a href="http://getbootstrap.com/javascript/#collapse" rel="nofollow">http://getbootstrap.com/javascript/#collapse</a><br>
Step 2. Click on one of the links that trigger opening of the accordion sections (ie. Collapsible Group Item <code class="notranslate">#1</code>)<br>
Step 3. Before the section's opening animation has a chance to complete (the one from 'Step 2' above) click on a different link to trigger opening a second panel (ie. Collapsible Group Item <code class="notranslate">#2</code>)</p>
<p dir="auto">At this point you should see that you have two accordion panels open at the same time.</p> | 1 |
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![allow(dead_code)]
#[derive(Show)]
struct Cell;
struct Grid {
cols: [[Cell; 6]; 6]
}
impl Grid {
fn iter(&self) -> Box<Iterator<Item = &Cell>> {
Box::new(self.cols.iter().flat_map(|x| x.iter()))
}
fn fill(&mut self) {
for cell in *self.iter() {
println!("here's a cell: {:?}", cell);
}
}
}
fn main() {
}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>allow<span class="pl-kos">(</span>dead_code<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-c1">#<span class="pl-kos">[</span>derive<span class="pl-kos">(</span><span class="pl-v">Show</span><span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">struct</span> <span class="pl-smi">Cell</span><span class="pl-kos">;</span>
<span class="pl-k">struct</span> <span class="pl-smi">Grid</span> <span class="pl-kos">{</span>
<span class="pl-c1">cols</span><span class="pl-kos">:</span> <span class="pl-kos">[</span><span class="pl-kos">[</span><span class="pl-smi">Cell</span><span class="pl-kos">;</span> <span class="pl-c1">6</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-c1">6</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span>
<span class="pl-k">impl</span> <span class="pl-smi">Grid</span> <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">iter</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -> <span class="pl-smi">Box</span><span class="pl-kos"><</span><span class="pl-smi">Iterator</span><span class="pl-kos"><</span><span class="pl-smi">Item</span> = <span class="pl-c1">&</span><span class="pl-smi">Cell</span><span class="pl-kos">></span><span class="pl-kos">></span> <span class="pl-kos">{</span>
<span class="pl-smi">Box</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-smi">self</span><span class="pl-kos">.</span><span class="pl-c1">cols</span><span class="pl-kos">.</span><span class="pl-en">iter</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">flat_map</span><span class="pl-kos">(</span>|x| x<span class="pl-kos">.</span><span class="pl-en">iter</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">fn</span> <span class="pl-en">fill</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-k">mut</span> <span class="pl-smi">self</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">for</span> cell <span class="pl-k">in</span> <span class="pl-c1">*</span><span class="pl-smi">self</span><span class="pl-kos">.</span><span class="pl-en">iter</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"here's a cell: {:?}"</span>, cell<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">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Error and backtrace:</p>
<p dir="auto"><code class="notranslate">rustc: /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/Instructions.cpp:550: void llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&): Assertion </code>(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Invoking a function with a bad signature!"' failed.`</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffefbff700 (LWP 4538)]
0x00007ffff711e107 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff711e107 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff711f4e8 in __GI_abort () at abort.c:89
#2 0x00007ffff7117226 in __assert_fail_base (fmt=0x7ffff724d968 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0x7ffff4bec220 "(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && \"Invoking a function with a bad signature!\"",
file=file@entry=0x7ffff4bea228 "/home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/Instructions.cpp", line=line@entry=550,
function=function@entry=0x7ffff4beda20 <llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&)::__PRETTY_FUNCTION__> "void llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&)") at assert.c:92
#3 0x00007ffff71172d2 in __GI___assert_fail (assertion=0x7ffff4bec220 "(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && \"Invoking a function with a bad signature!\"",
file=0x7ffff4bea228 "/home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/Instructions.cpp", line=550,
function=0x7ffff4beda20 <llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&)::__PRETTY_FUNCTION__> "void llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&)") at assert.c:101
#4 0x00007ffff419be6d in llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&) () from /usr/local/lib/librustc_llvm-4e7c5e5c.so
#5 0x00007ffff319a6e1 in llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >::CreateInvoke(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&) ()
from /usr/local/lib/librustc_llvm-4e7c5e5c.so
#6 0x00007ffff40e28ce in LLVMBuildInvoke () from /usr/local/lib/librustc_llvm-4e7c5e5c.so
#7 0x00007ffff6569050 in trans::base::invoke::h4cd8ec174fe38a29DTs () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#8 0x00007ffff65dcba1 in trans::callee::trans_call_inner::h2302436840455011871 () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#9 0x00007ffff65a4bc0 in trans::expr::trans_rvalue_stmt_unadjusted::h3e17f3a20f297c29BMi () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#10 0x00007ffff6553bbe in trans::expr::trans_into::ha60adcbe08fa3bdbKyh () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#11 0x00007ffff65545d1 in trans::controlflow::trans_block::hdd6a1a94b7524b90B3d () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#12 0x00007ffff66226ad in trans::base::trans_closure::h1947fd5123bfe895EYt () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#13 0x00007ffff653ede7 in trans::base::trans_fn::h5d061f11fc4ac1e7j9t () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#14 0x00007ffff653b00f in trans::base::trans_item::h34ec82732f0498f3Ewu () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#15 0x00007ffff6628dad in trans::base::trans_crate::he5ffa45aaa619f67lsv () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#16 0x00007ffff7aef844 in driver::phase_4_translate_to_llvm::h98aea3c7bb04643bPFa () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#17 0x00007ffff7acb49d in driver::compile_input::h04aea004c559b910xba () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#18 0x00007ffff7b9a96a in monitor::unboxed_closure.22497 () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#19 0x00007ffff7b98f82 in thunk::F.Invoke$LT$A$C$$u{20}R$GT$::invoke::h11849311349984608396 () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#20 0x00007ffff7b97c6f in rt::unwind::try::try_fn::h13617610205470131813 () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#21 0x00007ffff76196c9 in rust_try_inner () from /usr/local/lib/libstd-4e7c5e5c.so
#22 0x00007ffff76196b6 in rust_try () from /usr/local/lib/libstd-4e7c5e5c.so
#23 0x00007ffff7b98386 in thunk::F.Invoke$LT$A$C$$u{20}R$GT$::invoke::h14452289732390470265 () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#24 0x00007ffff75a19b2 in sys::thread::thread_start::h93b0d38960a9fcacqrw () from /usr/local/lib/libstd-4e7c5e5c.so
#25 0x00007ffff1b510a4 in start_thread (arg=0x7fffefbff700) at pthread_create.c:309
#26 0x00007ffff71ceccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111"><pre class="notranslate"><code class="notranslate">Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffefbff700 (LWP 4538)]
0x00007ffff711e107 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff711e107 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff711f4e8 in __GI_abort () at abort.c:89
#2 0x00007ffff7117226 in __assert_fail_base (fmt=0x7ffff724d968 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0x7ffff4bec220 "(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && \"Invoking a function with a bad signature!\"",
file=file@entry=0x7ffff4bea228 "/home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/Instructions.cpp", line=line@entry=550,
function=function@entry=0x7ffff4beda20 <llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&)::__PRETTY_FUNCTION__> "void llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&)") at assert.c:92
#3 0x00007ffff71172d2 in __GI___assert_fail (assertion=0x7ffff4bec220 "(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && \"Invoking a function with a bad signature!\"",
file=0x7ffff4bea228 "/home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/Instructions.cpp", line=550,
function=0x7ffff4beda20 <llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&)::__PRETTY_FUNCTION__> "void llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&)") at assert.c:101
#4 0x00007ffff419be6d in llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&) () from /usr/local/lib/librustc_llvm-4e7c5e5c.so
#5 0x00007ffff319a6e1 in llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >::CreateInvoke(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&) ()
from /usr/local/lib/librustc_llvm-4e7c5e5c.so
#6 0x00007ffff40e28ce in LLVMBuildInvoke () from /usr/local/lib/librustc_llvm-4e7c5e5c.so
#7 0x00007ffff6569050 in trans::base::invoke::h4cd8ec174fe38a29DTs () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#8 0x00007ffff65dcba1 in trans::callee::trans_call_inner::h2302436840455011871 () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#9 0x00007ffff65a4bc0 in trans::expr::trans_rvalue_stmt_unadjusted::h3e17f3a20f297c29BMi () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#10 0x00007ffff6553bbe in trans::expr::trans_into::ha60adcbe08fa3bdbKyh () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#11 0x00007ffff65545d1 in trans::controlflow::trans_block::hdd6a1a94b7524b90B3d () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#12 0x00007ffff66226ad in trans::base::trans_closure::h1947fd5123bfe895EYt () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#13 0x00007ffff653ede7 in trans::base::trans_fn::h5d061f11fc4ac1e7j9t () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#14 0x00007ffff653b00f in trans::base::trans_item::h34ec82732f0498f3Ewu () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#15 0x00007ffff6628dad in trans::base::trans_crate::he5ffa45aaa619f67lsv () from /usr/local/lib/librustc_trans-4e7c5e5c.so
#16 0x00007ffff7aef844 in driver::phase_4_translate_to_llvm::h98aea3c7bb04643bPFa () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#17 0x00007ffff7acb49d in driver::compile_input::h04aea004c559b910xba () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#18 0x00007ffff7b9a96a in monitor::unboxed_closure.22497 () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#19 0x00007ffff7b98f82 in thunk::F.Invoke$LT$A$C$$u{20}R$GT$::invoke::h11849311349984608396 () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#20 0x00007ffff7b97c6f in rt::unwind::try::try_fn::h13617610205470131813 () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#21 0x00007ffff76196c9 in rust_try_inner () from /usr/local/lib/libstd-4e7c5e5c.so
#22 0x00007ffff76196b6 in rust_try () from /usr/local/lib/libstd-4e7c5e5c.so
#23 0x00007ffff7b98386 in thunk::F.Invoke$LT$A$C$$u{20}R$GT$::invoke::h14452289732390470265 () from /usr/local/lib/librustc_driver-4e7c5e5c.so
#24 0x00007ffff75a19b2 in sys::thread::thread_start::h93b0d38960a9fcacqrw () from /usr/local/lib/libstd-4e7c5e5c.so
#25 0x00007ffff1b510a4 in start_thread (arg=0x7fffefbff700) at pthread_create.c:309
#26 0x00007ffff71ceccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
</code></pre></div> | <h3 dir="auto">Code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn changer<'a>(mut things: Box<Iterator<Item=&'a mut u8>>) {
for item in *things { *item = 0 }
}
fn main() {
}"><pre class="notranslate"><code class="notranslate">fn changer<'a>(mut things: Box<Iterator<Item=&'a mut u8>>) {
for item in *things { *item = 0 }
}
fn main() {
}
</code></pre></div>
<h3 dir="auto">Error</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: trying to take the sizing type of <core::iter::Iterator + 'static as core::iter::Iterator>::Item, an unsized type
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /Users/shep/Projects/rust/src/libsyntax/diagnostic.rs:182
stack backtrace:
1: 0x110a80d05 - sys::backtrace::write::h57cb71e45a6ad05bARs
2: 0x110aa667f - failure::on_fail::h1e60313e5a552ea32Ty
3: 0x110a0bb6a - rt::unwind::begin_unwind_inner::h591d6980cb1eb9bb2By
4: 0x10e753937 - rt::unwind::begin_unwind::h15926596774839260564
5: 0x10e7542a8 - diagnostic::Handler::bug::h4055c4ca2e17f0c6DLF
6: 0x10dd63cb8 - session::Session::bug::h5d1941c792f1e4caroq
7: 0x10d326a23 - trans::type_of::sizing_type_of::hded88082b54ddc4bgSo
8: 0x10d4422eb - trans::adt::represent_type_uncached::h5d90b81a92acc1b47xH
9: 0x10d320cd3 - trans::adt::represent_type::hdeb853742a302b7fHuH
10: 0x10d30c662 - trans::type_of::type_of::h0a1f71fc9850898aYYo
11: 0x10d30c34c - trans::type_of::type_of::h0a1f71fc9850898aYYo
12: 0x10d3b803f - trans::type_of::type_of_rust_fn::hf6b24d412c4c9582xOo
13: 0x10d41665c - trans::meth::trans_trait_callee_from_llval::h2aa4e324f7a786d6kwz
14: 0x10d413a56 - trans::meth::trans_object_shim::hfa24eaa4bec56008jBz
15: 0x10d31eb5f - trans::meth::trans_method_callee::hce96e8ac9be0c90eq6y
16: 0x10d385573 - trans::callee::trans_call_inner::h12246188759747685167
17: 0x10d354691 - trans::expr::trans_rvalue_stmt_unadjusted::hd58bf8791601bef4kQi
18: 0x10d306c8d - trans::expr::trans_into::h8bab20af1840b0a57xh
19: 0x10d307605 - trans::controlflow::trans_block::h051994b75eb2405cS1d
20: 0x10d3d0f44 - trans::base::trans_closure::hb694bfd51133ec9fMSt
21: 0x10d2f2a2b - trans::base::trans_fn::h816a9b6a32db67faj3t
22: 0x10d2ee086 - trans::base::trans_item::h223cbaffa1a561c6aqu
23: 0x10d3d8718 - trans::base::trans_crate::h7f75c26047f82847vlv
24: 0x10d19064e - driver::phase_4_translate_to_llvm::h17f0f28873e0c2d6uFa
25: 0x10d172501 - driver::compile_input::h059943f6c48c38c7vba
26: 0x10d239173 - thunk::F.Invoke<A, R>::invoke::h17305763774885229909
27: 0x10d2362d0 - rt::unwind::try::try_fn::h8419390306595151514
28: 0x110b0dba9 - rust_try_inner
29: 0x110b0db96 - rust_try
30: 0x10d236a16 - thunk::F.Invoke<A, R>::invoke::h8115208835806211442
31: 0x110a92154 - sys::thread::thread_start::hf32c2ee467ccc238CEv
32: 0x7fff9663c2fc - _pthread_body
33: 0x7fff9663c279 - _pthread_body"><pre class="notranslate"><code class="notranslate">error: internal compiler error: trying to take the sizing type of <core::iter::Iterator + 'static as core::iter::Iterator>::Item, an unsized type
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /Users/shep/Projects/rust/src/libsyntax/diagnostic.rs:182
stack backtrace:
1: 0x110a80d05 - sys::backtrace::write::h57cb71e45a6ad05bARs
2: 0x110aa667f - failure::on_fail::h1e60313e5a552ea32Ty
3: 0x110a0bb6a - rt::unwind::begin_unwind_inner::h591d6980cb1eb9bb2By
4: 0x10e753937 - rt::unwind::begin_unwind::h15926596774839260564
5: 0x10e7542a8 - diagnostic::Handler::bug::h4055c4ca2e17f0c6DLF
6: 0x10dd63cb8 - session::Session::bug::h5d1941c792f1e4caroq
7: 0x10d326a23 - trans::type_of::sizing_type_of::hded88082b54ddc4bgSo
8: 0x10d4422eb - trans::adt::represent_type_uncached::h5d90b81a92acc1b47xH
9: 0x10d320cd3 - trans::adt::represent_type::hdeb853742a302b7fHuH
10: 0x10d30c662 - trans::type_of::type_of::h0a1f71fc9850898aYYo
11: 0x10d30c34c - trans::type_of::type_of::h0a1f71fc9850898aYYo
12: 0x10d3b803f - trans::type_of::type_of_rust_fn::hf6b24d412c4c9582xOo
13: 0x10d41665c - trans::meth::trans_trait_callee_from_llval::h2aa4e324f7a786d6kwz
14: 0x10d413a56 - trans::meth::trans_object_shim::hfa24eaa4bec56008jBz
15: 0x10d31eb5f - trans::meth::trans_method_callee::hce96e8ac9be0c90eq6y
16: 0x10d385573 - trans::callee::trans_call_inner::h12246188759747685167
17: 0x10d354691 - trans::expr::trans_rvalue_stmt_unadjusted::hd58bf8791601bef4kQi
18: 0x10d306c8d - trans::expr::trans_into::h8bab20af1840b0a57xh
19: 0x10d307605 - trans::controlflow::trans_block::h051994b75eb2405cS1d
20: 0x10d3d0f44 - trans::base::trans_closure::hb694bfd51133ec9fMSt
21: 0x10d2f2a2b - trans::base::trans_fn::h816a9b6a32db67faj3t
22: 0x10d2ee086 - trans::base::trans_item::h223cbaffa1a561c6aqu
23: 0x10d3d8718 - trans::base::trans_crate::h7f75c26047f82847vlv
24: 0x10d19064e - driver::phase_4_translate_to_llvm::h17f0f28873e0c2d6uFa
25: 0x10d172501 - driver::compile_input::h059943f6c48c38c7vba
26: 0x10d239173 - thunk::F.Invoke<A, R>::invoke::h17305763774885229909
27: 0x10d2362d0 - rt::unwind::try::try_fn::h8419390306595151514
28: 0x110b0dba9 - rust_try_inner
29: 0x110b0db96 - rust_try
30: 0x10d236a16 - thunk::F.Invoke<A, R>::invoke::h8115208835806211442
31: 0x110a92154 - sys::thread::thread_start::hf32c2ee467ccc238CEv
32: 0x7fff9663c2fc - _pthread_body
33: 0x7fff9663c279 - _pthread_body
</code></pre></div>
<h3 dir="auto">Version</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 0.13.0-dev (5773bdeff 2015-01-04 21:36:41 +0000)
binary: rustc
commit-hash: 5773bdefff2e47cc007f5cc2af3f80b30303d45a
commit-date: 2015-01-04 21:36:41 +0000
host: x86_64-apple-darwin
release: 0.13.0-dev"><pre class="notranslate"><code class="notranslate">rustc 0.13.0-dev (5773bdeff 2015-01-04 21:36:41 +0000)
binary: rustc
commit-hash: 5773bdefff2e47cc007f5cc2af3f80b30303d45a
commit-date: 2015-01-04 21:36:41 +0000
host: x86_64-apple-darwin
release: 0.13.0-dev
</code></pre></div> | 1 |
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 4</li>
<li>Operating System / Platform => Ubuntu 16.04</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Looks like I have an issue to capture image from a camera, e.g. running <code class="notranslate">example_cpp_videocapture_camera</code> returns the following error:</p>
<blockquote>
<p dir="auto">Opening camera...<br>
[ WARN:0] VideoCapture(index=0) was built without support of requested backendID=200<br>
ERROR: Can't initialize camera capture</p>
</blockquote>
<p dir="auto">There is no issue with latest OpenCV 3.4 branch (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/opencv/opencv/commit/93d1785820bd24fde3a17b5e59b807ebddfd3fd5/hovercard" href="https://github.com/opencv/opencv/commit/93d1785820bd24fde3a17b5e59b807ebddfd3fd5"><tt>93d1785</tt></a>).</p>
<p dir="auto">My configuration:</p>
<details>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="General configuration for OpenCV 4.0.0-pre =====================================
Version control: 3.4.3-844-g5459c11
Platform:
Timestamp: 2018-11-12T15:48:29Z
Host: Linux 4.4.0-138-generic x86_64
CMake: 3.5.1
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: Release
CPU/HW features:
Baseline: SSE SSE2 SSE3
requested: SSE3
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
SSE4_1 (4 files): + SSSE3 SSE4_1
SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (0 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (4 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (10 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
AVX512_SKX (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_SKX
C/C++:
Built as dynamic libs?: YES
C++ Compiler: /usr/bin/c++ (ver 5.4.0)
C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
C Compiler: /usr/bin/cc
C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
Linker flags (Release):
Linker flags (Debug):
ccache: NO
Precompiled headers: YES
Extra dependencies: dl m pthread rt
3rdparty dependencies:
OpenCV modules:
To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc java java_bindings_generator ml objdetect photo python2 python3 python_bindings_generator stitching ts video videoio
Disabled: world
Disabled by dependency: -
Unavailable: js
Applications: examples apps
Documentation: NO
Non-free algorithms: NO
GUI:
GTK+: YES (ver 3.18.9)
GThread : YES (ver 2.48.2)
GtkGlExt: NO
VTK support: YES (ver 6.2.0)
Media I/O:
ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)
JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)
WEBP: /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x0202)
PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.54)
TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.0.6)
JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
OpenEXR: /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2.2.0)
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES
Video I/O:
DC1394: YES (ver 2.2.4)
FFMPEG: YES
avcodec: YES (ver 56.60.100)
avformat: YES (ver 56.40.101)
avutil: YES (ver 54.31.100)
swscale: YES (ver 3.1.101)
avresample: NO
GStreamer: NO
libv4l/libv4l2: NO
v4l/v4l2: linux/videodev2.h
Parallel framework: pthreads
Trace: YES (with Intel ITT)
Other third-party libraries:
Intel IPP: 2019.0.0 Gold [2019.0.0]
at: /home/user/opencv-build/3rdparty/ippicv/ippicv_lnx/icv
Intel IPP IW: sources (2019.0.0)
at: /home/user/opencv-build/3rdparty/ippicv/ippicv_lnx/iw
Lapack: YES (/opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_intel_lp64.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_sequential.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_core.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_intel_lp64.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_sequential.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_core.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_intel_lp64.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_sequential.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_core.so -lpthread -lm -ldl)
Eigen: YES (ver 3.2.92)
Custom HAL: NO
Protobuf: build (3.5.1)
OpenCL: YES (no extra features)
Include path: /home/user/opencv/opencv-fork/3rdparty/include/opencl/1.2
Link libraries: Dynamic load
Python 2:
Interpreter: /usr/bin/python2.7 (ver 2.7.12)
Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.12)
numpy: /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.12.0)
packages path: lib/python2.7/dist-packages
Python 3:
Interpreter: /usr/bin/python3 (ver 3.5.2)
Libraries: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (ver 3.5.2)
numpy: /usr/lib/python3/dist-packages/numpy/core/include (ver 1.11.0)
packages path: lib/python3.5/dist-packages
Python (for build): /usr/bin/python2.7
Java:
ant: /usr/bin/ant (ver 1.9.6)
JNI: /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include
Java wrappers: YES
Java tests: NO
Install to: /home/user/opencv-build/install
-----------------------------------------------------------------"><pre class="notranslate"><code class="notranslate">General configuration for OpenCV 4.0.0-pre =====================================
Version control: 3.4.3-844-g5459c11
Platform:
Timestamp: 2018-11-12T15:48:29Z
Host: Linux 4.4.0-138-generic x86_64
CMake: 3.5.1
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: Release
CPU/HW features:
Baseline: SSE SSE2 SSE3
requested: SSE3
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
SSE4_1 (4 files): + SSSE3 SSE4_1
SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (0 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (4 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (10 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
AVX512_SKX (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_SKX
C/C++:
Built as dynamic libs?: YES
C++ Compiler: /usr/bin/c++ (ver 5.4.0)
C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
C Compiler: /usr/bin/cc
C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
Linker flags (Release):
Linker flags (Debug):
ccache: NO
Precompiled headers: YES
Extra dependencies: dl m pthread rt
3rdparty dependencies:
OpenCV modules:
To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc java java_bindings_generator ml objdetect photo python2 python3 python_bindings_generator stitching ts video videoio
Disabled: world
Disabled by dependency: -
Unavailable: js
Applications: examples apps
Documentation: NO
Non-free algorithms: NO
GUI:
GTK+: YES (ver 3.18.9)
GThread : YES (ver 2.48.2)
GtkGlExt: NO
VTK support: YES (ver 6.2.0)
Media I/O:
ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)
JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)
WEBP: /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x0202)
PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.54)
TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.0.6)
JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
OpenEXR: /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2.2.0)
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES
Video I/O:
DC1394: YES (ver 2.2.4)
FFMPEG: YES
avcodec: YES (ver 56.60.100)
avformat: YES (ver 56.40.101)
avutil: YES (ver 54.31.100)
swscale: YES (ver 3.1.101)
avresample: NO
GStreamer: NO
libv4l/libv4l2: NO
v4l/v4l2: linux/videodev2.h
Parallel framework: pthreads
Trace: YES (with Intel ITT)
Other third-party libraries:
Intel IPP: 2019.0.0 Gold [2019.0.0]
at: /home/user/opencv-build/3rdparty/ippicv/ippicv_lnx/icv
Intel IPP IW: sources (2019.0.0)
at: /home/user/opencv-build/3rdparty/ippicv/ippicv_lnx/iw
Lapack: YES (/opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_intel_lp64.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_sequential.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_core.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_intel_lp64.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_sequential.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_core.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_intel_lp64.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_sequential.so /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_core.so -lpthread -lm -ldl)
Eigen: YES (ver 3.2.92)
Custom HAL: NO
Protobuf: build (3.5.1)
OpenCL: YES (no extra features)
Include path: /home/user/opencv/opencv-fork/3rdparty/include/opencl/1.2
Link libraries: Dynamic load
Python 2:
Interpreter: /usr/bin/python2.7 (ver 2.7.12)
Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.12)
numpy: /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.12.0)
packages path: lib/python2.7/dist-packages
Python 3:
Interpreter: /usr/bin/python3 (ver 3.5.2)
Libraries: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (ver 3.5.2)
numpy: /usr/lib/python3/dist-packages/numpy/core/include (ver 1.11.0)
packages path: lib/python3.5/dist-packages
Python (for build): /usr/bin/python2.7
Java:
ant: /usr/bin/ant (ver 1.9.6)
JNI: /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include
Java wrappers: YES
Java tests: NO
Install to: /home/user/opencv-build/install
-----------------------------------------------------------------
</code></pre></div>
</details> | <p dir="auto">On fedora 26 I have this error when compiling openCV with the modules:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ 84%] Building CXX object modules/optflow/CMakeFiles/opencv_perf_optflow.dir/perf/perf_main.cpp.o
[ 84%] Building CXX object modules/optflow/CMakeFiles/opencv_perf_optflow.dir/perf/perf_variational_refinement.cpp.o
In file included from /home/malcolm/external_sources/opencv/modules/python/src2/cv2.cpp:1496:0:
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h: In function ‘PyObject* pyopencv_cv_structured_light_structured_light_StructuredLightPattern_decode(PyObject*, PyObject*, PyObject*)’:
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45897:5: error: ‘vector_vector_Mat’ was not declared in this scope
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45897:5: note: suggested alternative: ‘vector_vector_DMatch’
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
vector_vector_DMatch
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45909:42: error: ‘patternImages’ was not declared in this scope
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45909:42: note: suggested alternative: ‘whiteImages’
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
whiteImages
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45922:5: error: ‘vector_vector_Mat’ was not declared in this scope
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45922:5: note: suggested alternative: ‘vector_vector_DMatch’
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
vector_vector_DMatch
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45934:42: error: ‘patternImages’ was not declared in this scope
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45934:42: note: suggested alternative: ‘whiteImages’
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
whiteImages
In file included from /home/malcolm/external_sources/opencv/modules/python/src2/cv2.cpp:1496:0:
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h: In function ‘PyObject* pyopencv_cv_structured_light_structured_light_StructuredLightPattern_decode(PyObject*, PyObject*, PyObject*)’:
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45676:5: error: ‘vector_vector_Mat’ was not declared in this scope
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45676:5: note: suggested alternative: ‘vector_vector_DMatch’
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
vector_vector_DMatch
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45688:42: error: ‘patternImages’ was not declared in this scope
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45688:42: note: suggested alternative: ‘whiteImages’
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
whiteImages
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45701:5: error: ‘vector_vector_Mat’ was not declared in this scope
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45701:5: note: suggested alternative: ‘vector_vector_DMatch’
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
vector_vector_DMatch
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45713:42: error: ‘patternImages’ was not declared in this scope
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45713:42: note: suggested alternative: ‘whiteImages’
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
whiteImages
[ 84%] Building CXX object modules/stitching/CMakeFiles/opencv_perf_stitching.dir/perf/perf_stich.cpp.o
[ 84%] Linking CXX executable ../../bin/opencv_perf_optflow
[ 84%] Built target opencv_perf_optflow
Scanning dependencies of target tutorial_hull_demo
[ 84%] Building CXX object samples/cpp/CMakeFiles/tutorial_hull_demo.dir/tutorial_code/ShapeDescriptors/hull_demo.cpp.o
[ 84%] Linking CXX executable ../../bin/cpp-tutorial-hull_demo
[ 84%] Built target tutorial_hull_demo
Scanning dependencies of target tutorial_EqualizeHist_Demo
[ 84%] Building CXX object samples/cpp/CMakeFiles/tutorial_EqualizeHist_Demo.dir/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp.o
make[2]: *** [modules/python2/CMakeFiles/opencv_python2.dir/build.make:324: modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:21101: modules/python2/CMakeFiles/opencv_python2.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 84%] Linking CXX executable ../../bin/opencv_perf_stitching
[ 84%] Linking CXX executable ../../bin/cpp-tutorial-EqualizeHist_Demo
[ 84%] Built target opencv_perf_stitching
[ 84%] Built target tutorial_EqualizeHist_Demo
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:324: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:21232: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
"><pre class="notranslate"><code class="notranslate">[ 84%] Building CXX object modules/optflow/CMakeFiles/opencv_perf_optflow.dir/perf/perf_main.cpp.o
[ 84%] Building CXX object modules/optflow/CMakeFiles/opencv_perf_optflow.dir/perf/perf_variational_refinement.cpp.o
In file included from /home/malcolm/external_sources/opencv/modules/python/src2/cv2.cpp:1496:0:
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h: In function ‘PyObject* pyopencv_cv_structured_light_structured_light_StructuredLightPattern_decode(PyObject*, PyObject*, PyObject*)’:
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45897:5: error: ‘vector_vector_Mat’ was not declared in this scope
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45897:5: note: suggested alternative: ‘vector_vector_DMatch’
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
vector_vector_DMatch
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45909:42: error: ‘patternImages’ was not declared in this scope
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45909:42: note: suggested alternative: ‘whiteImages’
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
whiteImages
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45922:5: error: ‘vector_vector_Mat’ was not declared in this scope
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45922:5: note: suggested alternative: ‘vector_vector_DMatch’
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
vector_vector_DMatch
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45934:42: error: ‘patternImages’ was not declared in this scope
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python2/pyopencv_generated_types.h:45934:42: note: suggested alternative: ‘whiteImages’
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
whiteImages
In file included from /home/malcolm/external_sources/opencv/modules/python/src2/cv2.cpp:1496:0:
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h: In function ‘PyObject* pyopencv_cv_structured_light_structured_light_StructuredLightPattern_decode(PyObject*, PyObject*, PyObject*)’:
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45676:5: error: ‘vector_vector_Mat’ was not declared in this scope
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45676:5: note: suggested alternative: ‘vector_vector_DMatch’
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
vector_vector_DMatch
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45688:42: error: ‘patternImages’ was not declared in this scope
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45688:42: note: suggested alternative: ‘whiteImages’
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
whiteImages
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45701:5: error: ‘vector_vector_Mat’ was not declared in this scope
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45701:5: note: suggested alternative: ‘vector_vector_DMatch’
vector_vector_Mat patternImages;
^~~~~~~~~~~~~~~~~
vector_vector_DMatch
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45713:42: error: ‘patternImages’ was not declared in this scope
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
/home/malcolm/external_sources/opencv/build/modules/python3/pyopencv_generated_types.h:45713:42: note: suggested alternative: ‘whiteImages’
pyopencv_to(pyobj_patternImages, patternImages, ArgInfo("patternImages", 0)) &&
^~~~~~~~~~~~~
whiteImages
[ 84%] Building CXX object modules/stitching/CMakeFiles/opencv_perf_stitching.dir/perf/perf_stich.cpp.o
[ 84%] Linking CXX executable ../../bin/opencv_perf_optflow
[ 84%] Built target opencv_perf_optflow
Scanning dependencies of target tutorial_hull_demo
[ 84%] Building CXX object samples/cpp/CMakeFiles/tutorial_hull_demo.dir/tutorial_code/ShapeDescriptors/hull_demo.cpp.o
[ 84%] Linking CXX executable ../../bin/cpp-tutorial-hull_demo
[ 84%] Built target tutorial_hull_demo
Scanning dependencies of target tutorial_EqualizeHist_Demo
[ 84%] Building CXX object samples/cpp/CMakeFiles/tutorial_EqualizeHist_Demo.dir/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp.o
make[2]: *** [modules/python2/CMakeFiles/opencv_python2.dir/build.make:324: modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:21101: modules/python2/CMakeFiles/opencv_python2.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 84%] Linking CXX executable ../../bin/opencv_perf_stitching
[ 84%] Linking CXX executable ../../bin/cpp-tutorial-EqualizeHist_Demo
[ 84%] Built target opencv_perf_stitching
[ 84%] Built target tutorial_EqualizeHist_Demo
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:324: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:21232: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
</code></pre></div>
<p dir="auto">My Cmake config is as follow</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="General configuration for OpenCV 3.3.0-dev =====================================
-- Version control: 3.3.0-370-g7475d23fe
--
-- Extra modules:
-- Location (extra): /home/malcolm/external_sources/opencv_contrib/modules
-- Version control (extra): 3.3.0-58-g4bc49c05
--
-- Platform:
-- Timestamp: 2017-09-26T18:52:28Z
-- Host: Linux 4.12.9-300.fc26.x86_64 x86_64
-- CMake: 3.9.1
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/gmake
-- Configuration: Release
--
-- CPU/HW features:
-- Baseline: SSE SSE2 SSE3
-- requested: SSE3
-- Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
-- requested: SSE4_1 SSE4_2 AVX FP16 AVX2
-- SSE4_1 (3 files): + SSSE3 SSE4_1
-- SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
-- FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
-- AVX (4 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
-- AVX2 (7 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++11: YES
-- C++ Compiler: /usr/bin/c++ (ver 7.1.1)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -O2 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/cc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -O2 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- ccache: NO
-- Precompiled headers: YES
-- Extra dependencies: dl m pthread rt
-- 3rdparty dependencies:
--
-- OpenCV modules:
-- To be built: core flann imgproc ml objdetect phase_unwrapping photo plot reg surface_matching video viz xphoto bgsegm face freetype fuzzy img_hash imgcodecs shape videoio xobjdetect highgui superres ts bioinspired dpm features2d line_descriptor saliency text calib3d ccalib cvv datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow stitching python2 python3
-- Disabled: js world contrib_world dnn_modern
-- Disabled by dependency: -
-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java cnn_3dobj hdf matlab sfm
--
-- GUI:
-- QT 5.x: YES (ver 5.7.1)
-- QT OpenGL support: NO
-- OpenGL support: NO
-- VTK support: YES (ver 8.1.0)
--
-- Media I/O:
-- ZLib: /lib64/libz.so (ver 1.2.11)
-- JPEG: /lib64/libjpeg.so (ver )
-- WEBP: build (ver encoder: 0x020e)
-- PNG: /lib64/libpng.so (ver 1.6.28)
-- TIFF: /lib64/libtiff.so (ver 42 - 4.0.8)
-- JPEG 2000: build (ver 1.900.1)
-- OpenEXR: build (ver 1.7.1)
-- GDAL: NO
-- GDCM: NO
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: NO
-- avcodec: NO
-- avformat: NO
-- avutil: NO
-- swscale: NO
-- avresample: NO
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- Aravis SDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: NO/YES
-- XIMEA: NO
-- Xine: NO
-- Intel Media SDK: NO
-- gPhoto2: NO
--
-- Parallel framework: pthreads
--
-- Trace: YES (with Intel ITT)
--
-- Other third-party libraries:
-- Use Intel IPP: 2017.0.3 [2017.0.3]
-- at: /home/malcolm/external_sources/opencv/build/3rdparty/ippicv/ippicv_lnx
-- Use Intel IPP IW: NO
-- Use VA: NO
-- Use Intel VA-API/OpenCL: NO
-- Use Lapack: NO
-- Use Eigen: YES (ver 3.3.4)
-- Use Cuda: NO
-- Use OpenCL: YES
-- Use OpenVX: NO
-- Use custom HAL: NO
--
-- OpenCL: <Dynamic loading of OpenCL library>
-- Include path: /home/malcolm/external_sources/opencv/3rdparty/include/opencl/1.2
-- Use AMDFFT: NO
-- Use AMDBLAS: NO
--
-- Python 2:
-- Interpreter: /usr/bin/python2.7 (ver 2.7.13)
-- Libraries: /lib64/libpython2.7.so (ver 2.7.13)
-- numpy: /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.12.1)
-- packages path: lib/python2.7/site-packages
--
-- Python 3:
-- Interpreter: /usr/bin/python3 (ver 3.6.2)
-- Libraries: /lib64/libpython3.6m.so (ver 3.6.2)
-- numpy: /usr/lib64/python3.6/site-packages/numpy/core/include (ver 1.12.1)
-- packages path: lib/python3.6/site-packages
--
-- Python (for build): /usr/bin/python2.7
--
-- Java:
-- ant: NO
-- JNI: NO
-- Java wrappers: NO
-- Java tests: NO
--
-- Matlab: Matlab not found or implicitly disabled
--
-- Documentation:
-- Doxygen: NO
--
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: YES
--
-- Install path: /usr/local
--
-- cvconfig.h is in: /home/malcolm/external_sources/opencv/build
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/malcolm/external_sources/opencv/build"><pre class="notranslate"><code class="notranslate">General configuration for OpenCV 3.3.0-dev =====================================
-- Version control: 3.3.0-370-g7475d23fe
--
-- Extra modules:
-- Location (extra): /home/malcolm/external_sources/opencv_contrib/modules
-- Version control (extra): 3.3.0-58-g4bc49c05
--
-- Platform:
-- Timestamp: 2017-09-26T18:52:28Z
-- Host: Linux 4.12.9-300.fc26.x86_64 x86_64
-- CMake: 3.9.1
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/gmake
-- Configuration: Release
--
-- CPU/HW features:
-- Baseline: SSE SSE2 SSE3
-- requested: SSE3
-- Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
-- requested: SSE4_1 SSE4_2 AVX FP16 AVX2
-- SSE4_1 (3 files): + SSSE3 SSE4_1
-- SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
-- FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
-- AVX (4 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
-- AVX2 (7 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++11: YES
-- C++ Compiler: /usr/bin/c++ (ver 7.1.1)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -O2 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/cc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -O2 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- ccache: NO
-- Precompiled headers: YES
-- Extra dependencies: dl m pthread rt
-- 3rdparty dependencies:
--
-- OpenCV modules:
-- To be built: core flann imgproc ml objdetect phase_unwrapping photo plot reg surface_matching video viz xphoto bgsegm face freetype fuzzy img_hash imgcodecs shape videoio xobjdetect highgui superres ts bioinspired dpm features2d line_descriptor saliency text calib3d ccalib cvv datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow stitching python2 python3
-- Disabled: js world contrib_world dnn_modern
-- Disabled by dependency: -
-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java cnn_3dobj hdf matlab sfm
--
-- GUI:
-- QT 5.x: YES (ver 5.7.1)
-- QT OpenGL support: NO
-- OpenGL support: NO
-- VTK support: YES (ver 8.1.0)
--
-- Media I/O:
-- ZLib: /lib64/libz.so (ver 1.2.11)
-- JPEG: /lib64/libjpeg.so (ver )
-- WEBP: build (ver encoder: 0x020e)
-- PNG: /lib64/libpng.so (ver 1.6.28)
-- TIFF: /lib64/libtiff.so (ver 42 - 4.0.8)
-- JPEG 2000: build (ver 1.900.1)
-- OpenEXR: build (ver 1.7.1)
-- GDAL: NO
-- GDCM: NO
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: NO
-- avcodec: NO
-- avformat: NO
-- avutil: NO
-- swscale: NO
-- avresample: NO
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- Aravis SDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: NO/YES
-- XIMEA: NO
-- Xine: NO
-- Intel Media SDK: NO
-- gPhoto2: NO
--
-- Parallel framework: pthreads
--
-- Trace: YES (with Intel ITT)
--
-- Other third-party libraries:
-- Use Intel IPP: 2017.0.3 [2017.0.3]
-- at: /home/malcolm/external_sources/opencv/build/3rdparty/ippicv/ippicv_lnx
-- Use Intel IPP IW: NO
-- Use VA: NO
-- Use Intel VA-API/OpenCL: NO
-- Use Lapack: NO
-- Use Eigen: YES (ver 3.3.4)
-- Use Cuda: NO
-- Use OpenCL: YES
-- Use OpenVX: NO
-- Use custom HAL: NO
--
-- OpenCL: <Dynamic loading of OpenCL library>
-- Include path: /home/malcolm/external_sources/opencv/3rdparty/include/opencl/1.2
-- Use AMDFFT: NO
-- Use AMDBLAS: NO
--
-- Python 2:
-- Interpreter: /usr/bin/python2.7 (ver 2.7.13)
-- Libraries: /lib64/libpython2.7.so (ver 2.7.13)
-- numpy: /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.12.1)
-- packages path: lib/python2.7/site-packages
--
-- Python 3:
-- Interpreter: /usr/bin/python3 (ver 3.6.2)
-- Libraries: /lib64/libpython3.6m.so (ver 3.6.2)
-- numpy: /usr/lib64/python3.6/site-packages/numpy/core/include (ver 1.12.1)
-- packages path: lib/python3.6/site-packages
--
-- Python (for build): /usr/bin/python2.7
--
-- Java:
-- ant: NO
-- JNI: NO
-- Java wrappers: NO
-- Java tests: NO
--
-- Matlab: Matlab not found or implicitly disabled
--
-- Documentation:
-- Doxygen: NO
--
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: YES
--
-- Install path: /usr/local
--
-- cvconfig.h is in: /home/malcolm/external_sources/opencv/build
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/malcolm/external_sources/opencv/build
</code></pre></div>
<p dir="auto">I used to work until I set BUILD_opencv_dnn and BUILD_opencv_dnn_modernto false. I'm not sure what I'm missing here</p> | 0 |
<p dir="auto">I get the warning message<br>
<code class="notranslate">W external/org_tensorflow/tensorflow/compiler/xla/service/hlo_pass_fix.h:49] Unexpectedly high number of iterations in HLO passes, exiting fixed point loop.</code><br>
each time I evaluate <code class="notranslate">grad(odeint)</code> in the following <a href="https://github.com/jessebett/jax/blob/hk-nodes/examples/nodes_cifar_hk.py">code</a>. The forward system has <code class="notranslate">4 * 4 * 64 = 1024</code> dimensions, and the dynamics function has <code class="notranslate">1 * 1 * 64 * 64 = 4096</code> parameters (so the adjoint system would have about <code class="notranslate">5121</code> dimensions). I also <a href="https://github.com/jessebett/jax/blob/hk-nodes/jax/experimental/ode.py">modified</a> <code class="notranslate">odeint</code> to count NFE on the forward pass (which in this case is only <code class="notranslate">7</code>).</p>
<p dir="auto">Not really sure what this warning message means, but I suspect it might be affecting the performance of my code. Any insights into this would be greatly appreciate, and I'm happy to create a more stripped down example (e.g. without the haiku dependency) if needed.</p>
<p dir="auto"><a href="https://drive.google.com/open?id=13Zck0wpfd57ZtoaKfpLfZIMw5UITsIH4" rel="nofollow">XLA dump</a></p> | <p dir="auto">I am getting an error/warning message when using clip_grads. The message is:<br>
"external/org_tensorflow/tensorflow/compiler/xla/service/hlo_pass_fix.h:49] Unexpectedly high number of iterations in HLO passes, exiting fixed point loop."</p>
<p dir="auto">Does anyone know what this means, or how to call clip_grads so it doesn't occur? Does it affect any results?</p>
<p dir="auto">In the code, with option == 1 (no jit for clip_grads), the message occurs five times. The number is dependent on the number of dense layers in the neural network. If option==1 (with jit), the message occurs only once. I assume the others are suppressed.</p>
<p dir="auto">Incidently, apart from clip_grads, I also get the message (once) if I change the neural net to one input and send X[:,0] to it in net_apply().</p>
<p dir="auto">And I also get the same message when I call odeint().</p>
<p dir="auto">I'm using jax version '0.1.62' and jaxlib version '0.1.43' on the GPU.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from jax import grad
from jax import random
from jax import jit
from jax.experimental import stax
from jax.experimental.stax import Dense, Tanh, BatchNorm
from jax.experimental import optimizers
# setup neural network -------------------------------
L = 2
net_init, net_apply = stax.serial(
Dense(L), Tanh,
Dense(L), Tanh,
Dense(2)
)
rng = random.PRNGKey(0)
rng, subkey = random.split(rng)
out_shape, net_params = net_init(subkey, (-1, 2))
opt_init, opt_update, get_params = optimizers.adam(step_size=.001)
opt_state = opt_init(net_params)
# option for jit clip_grads --------------------------
def clip(gr):
return optimizers.clip_grads(gr, 4)
clip_jit = jit(clip)
# loss function --------------------------------------
def loss(params, X):
ans = net_apply(params, X[:,0:2])
return 1. # return dummy loss
# step function --------------------------------------
def step(opt_state, X):
params = get_params(opt_state)
gr = grad(loss, argnums=(0,)) (params, X)
print(len(params))
# try different options
option = [0,1,2][2]
if option == 0:
gr = optimizers.clip_grads(gr, 4)
elif option == 1:
gr = clip_jit(gr)
elif option == 2:
pass
return 1. # return dummy value
# setup data -----------------------------------------
rng, subkey = random.split(rng)
N = 50
X = random.normal(subkey, (N, 10))
# call step ------------------------------------------
for ii in range(2):
result = step(opt_state, X)
"><pre class="notranslate"><code class="notranslate">from jax import grad
from jax import random
from jax import jit
from jax.experimental import stax
from jax.experimental.stax import Dense, Tanh, BatchNorm
from jax.experimental import optimizers
# setup neural network -------------------------------
L = 2
net_init, net_apply = stax.serial(
Dense(L), Tanh,
Dense(L), Tanh,
Dense(2)
)
rng = random.PRNGKey(0)
rng, subkey = random.split(rng)
out_shape, net_params = net_init(subkey, (-1, 2))
opt_init, opt_update, get_params = optimizers.adam(step_size=.001)
opt_state = opt_init(net_params)
# option for jit clip_grads --------------------------
def clip(gr):
return optimizers.clip_grads(gr, 4)
clip_jit = jit(clip)
# loss function --------------------------------------
def loss(params, X):
ans = net_apply(params, X[:,0:2])
return 1. # return dummy loss
# step function --------------------------------------
def step(opt_state, X):
params = get_params(opt_state)
gr = grad(loss, argnums=(0,)) (params, X)
print(len(params))
# try different options
option = [0,1,2][2]
if option == 0:
gr = optimizers.clip_grads(gr, 4)
elif option == 1:
gr = clip_jit(gr)
elif option == 2:
pass
return 1. # return dummy value
# setup data -----------------------------------------
rng, subkey = random.split(rng)
N = 50
X = random.normal(subkey, (N, 10))
# call step ------------------------------------------
for ii in range(2):
result = step(opt_state, X)
</code></pre></div> | 1 |
<p dir="auto">There seems to be some path problems when specifying a custom Access Denied template and extending a layout. It seems this has been reported here...</p>
<p dir="auto"><a href="http://trac.symfony-project.org/ticket/9502" rel="nofollow">http://trac.symfony-project.org/ticket/9502</a></p>
<p dir="auto">More details can be seen in the comments of this blog article...</p>
<p dir="auto"><a href="http://www.michelsalib.com/2011/03/advance-customization-of-the-403-error-page-in-symfony2/" rel="nofollow">http://www.michelsalib.com/2011/03/advance-customization-of-the-403-error-page-in-symfony2/</a></p>
<p dir="auto">Has there been any resolution to this issue?</p> | <table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>no</td>
</tr>
<tr>
<td>Feature request?</td>
<td>yes</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>yes</td>
</tr>
<tr>
<td>Symfony version</td>
<td>4.1</td>
</tr>
</tbody>
</table>
<p dir="auto">It would be nice allow inject tagged services as <code class="notranslate">ServiceLocator</code> instead of <code class="notranslate">iterable</code>. For example we have set of report generators, all of them implements <code class="notranslate">ReportGenerator</code> interface. We have tagged them with tag <code class="notranslate">app.report_generator</code> using autoconfigure, but we require compiler pass for creating <code class="notranslate">ServiceLocator</code> with them.</p> | 0 |
<p dir="auto">The weekly build with nightly wheels from numpy and pandas<br>
has failed. Check the logs for any updates that need to be<br>
made in matplotlib.<br>
<a href="https://github.com/matplotlib/matplotlib/actions/runs/3254383814">https://github.com/matplotlib/matplotlib/actions/runs/3254383814</a></p> | <p dir="auto">The weekly build with nightly wheels from numpy and pandas<br>
has failed. Check the logs for any updates that need to be<br>
made in matplotlib.<br>
<a href="https://github.com/matplotlib/matplotlib/actions/runs/3163174215">https://github.com/matplotlib/matplotlib/actions/runs/3163174215</a></p> | 1 |
<ul dir="auto">
<li>VSCode Version:1.1.0-alpha</li>
<li>OS Version: Mac</li>
</ul>
<p dir="auto">Regarding test item <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="150860120" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/5753" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/5753/hovercard" href="https://github.com/microsoft/vscode/issues/5753">#5753</a><br>
Just found this issue a day after I did my testing.</p>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>In a bower.json file, type in a package in the dependency section (I used lodash as the package). It will auto-complete and give you <code class="notranslate">"lodash":"latest"</code></li>
<li>Try changing <code class="notranslate">latest</code> to something else, like <code class="notranslate">^1.0.0</code></li>
<li>Note that it does not give you a suggestion like it would in a package.json file.</li>
</ol> | <ul dir="auto">
<li>VSCode Version: 0.10.12-alpha</li>
<li>OS Version: Windows10</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Create Asp .net core empty project in visual studio.</li>
<li>Add some directories under wwwroot folder for client code like JS.</li>
<li>Add new item to manage client lib and add bower.json file.</li>
<li>Add some client side lib in to bower.json under dependency section like below:</li>
</ol>
<blockquote>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/17735796/14002399/19404f8e-f109-11e5-85fe-0b25c3b8b733.png"><img src="https://cloud.githubusercontent.com/assets/17735796/14002399/19404f8e-f109-11e5-85fe-0b25c3b8b733.png" alt="image" style="max-width: 100%;"></a></p>
</blockquote>
<p dir="auto">Actual: Not getting intellisense for version #.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/17735796/14002646/7e2e6d58-f10a-11e5-9226-ab2c86dcef4d.png"><img src="https://cloud.githubusercontent.com/assets/17735796/14002646/7e2e6d58-f10a-11e5-9226-ab2c86dcef4d.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Expected:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/17735796/14002621/5ec5c966-f10a-11e5-818b-b9ec5c42f49e.png"><img src="https://cloud.githubusercontent.com/assets/17735796/14002621/5ec5c966-f10a-11e5-818b-b9ec5c42f49e.png" alt="image" style="max-width: 100%;"></a></p> | 1 |
<h5 dir="auto">System information</h5>
<ul dir="auto">
<li>OpenCV => 4.0.1 (Exactly, I am using OpenCV lib included in OpenVINO R5 2018 release.)</li>
<li>Operating System / Platform => Windows 64 Bit</li>
<li>Compiler => Visual Studio 2015</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Memory increases quickly as i run my code.<br>
My code is really simple: Create 2000 threads, and in each thread try to create a UMAT.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#include "stdafx.h"
#include <iostream>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <mutex>
#include <condition_variable>
#include <atomic>
#define DECODECORE_ROI_IMAGE_WIDTH 480
#define DECODECORE_ROI_IMAGE_HEIGHT 640
unsigned char resized[DECODECORE_ROI_IMAGE_WIDTH * DECODECORE_ROI_IMAGE_HEIGHT];
void TestThread()
{
std::cout << "TestThread started\n";
cv::Mat srcMat(DECODECORE_ROI_IMAGE_WIDTH, DECODECORE_ROI_IMAGE_HEIGHT, CV_8UC1, resized);
cv::UMat uMsrcImg = srcMat.getUMat(cv::ACCESS_READ);
uMsrcImg.release();
srcMat.release();
}
int main()
{
for (int i = 0; i < 2000; i++)
{
std::thread finderThread = std::thread(TestThread);
finderThread.detach();
std::cout << "i is " << i << "\n";
}
return 0;
}"><pre class="notranslate"><code class="notranslate">#include "stdafx.h"
#include <iostream>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <mutex>
#include <condition_variable>
#include <atomic>
#define DECODECORE_ROI_IMAGE_WIDTH 480
#define DECODECORE_ROI_IMAGE_HEIGHT 640
unsigned char resized[DECODECORE_ROI_IMAGE_WIDTH * DECODECORE_ROI_IMAGE_HEIGHT];
void TestThread()
{
std::cout << "TestThread started\n";
cv::Mat srcMat(DECODECORE_ROI_IMAGE_WIDTH, DECODECORE_ROI_IMAGE_HEIGHT, CV_8UC1, resized);
cv::UMat uMsrcImg = srcMat.getUMat(cv::ACCESS_READ);
uMsrcImg.release();
srcMat.release();
}
int main()
{
for (int i = 0; i < 2000; i++)
{
std::thread finderThread = std::thread(TestThread);
finderThread.detach();
std::cout << "i is " << i << "\n";
}
return 0;
}
</code></pre></div> | <ul dir="auto">
<li>OpenCV => 3.3.0</li>
<li>Operating System / Platform => Arch Linux (4.12.13-1-ARCH SMP PREEMPT x86_64 GNU/Linux)</li>
<li>Compiler => gcc 7.2.0 and clang 5.0.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">It seems that a significant portion of memory is leaked in every thread.<br>
The following code snippet consumes cca 100MB/s.</p>
<h5 dir="auto">Steps to reproduce</h5>
<div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#include <opencv2/opencv.hpp>
#include <future>
int main()
{
while(true) {
std::async(std::launch::async, []() { cv::Mat::zeros(1, 1, CV_32FC3); }).wait();
}
}"><pre class="notranslate">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>opencv2/opencv.hpp<span class="pl-pds">></span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds"><</span>future<span class="pl-pds">></span></span>
<span class="pl-k">int</span> <span class="pl-en">main</span>()
{
<span class="pl-k">while</span>(<span class="pl-c1">true</span>) {
<span class="pl-c1">std::async</span>(std::launch::async, []() { <span class="pl-c1">cv::Mat::zeros</span>(<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, CV_32FC3); }).<span class="pl-c1">wait</span>();
}
}</pre></div> | 1 |
<p dir="auto">My issue is taking a warning, while it is not logical.</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
from scipy.stats import pearsonr, spearmanr
x = np.asarray([0.20411998265592482, 0.07918124604762482])
y = np.asarray([0.017448610113466535, 0.012129956392826626])
print(pearsonr(x,y))"><pre class="notranslate"><code class="notranslate">import numpy as np
from scipy.stats import pearsonr, spearmanr
x = np.asarray([0.20411998265592482, 0.07918124604762482])
y = np.asarray([0.017448610113466535, 0.012129956392826626])
print(pearsonr(x,y))
</code></pre></div>
<h3 dir="auto">Warning message:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/usr/local/lib/python3.5/dist-packages/scipy/stats/stats.py:3020: RuntimeWarning: invalid value encountered in double_scalars
prob = _betai(0.5*df, 0.5, df/(df+t_squared))"><pre class="notranslate"><code class="notranslate">/usr/local/lib/python3.5/dist-packages/scipy/stats/stats.py:3020: RuntimeWarning: invalid value encountered in double_scalars
prob = _betai(0.5*df, 0.5, df/(df+t_squared))
</code></pre></div>
<h3 dir="auto">Output</h3>
<p dir="auto">Below + warning above.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(0.9999999999999999, nan)"><pre class="notranslate"><code class="notranslate">(0.9999999999999999, nan)
</code></pre></div>
<h3 dir="auto">Expected Output</h3>
<p dir="auto">I expect getting no warning. in addition p-value must be 0 not nan!</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(1.0, 0.0)"><pre class="notranslate"><code class="notranslate">(1.0, 0.0)
</code></pre></div>
<h3 dir="auto">Scipy/Numpy/Python version information:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.1.0 1.14.5 sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">1.1.0 1.14.5 sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0)
</code></pre></div> | <p dir="auto">Hi,</p>
<p dir="auto">This is an issue to mention that the implementation of pearsonr is not tolerant to overflows.</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/scipy/scipy/blob/b7865dd1b88db975e7ba51f3fde2e5982d561c8b/scipy/stats/stats.py#L3032">scipy/scipy/stats/stats.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 3032
in
<a data-pjax="true" class="commit-tease-sha" href="/scipy/scipy/commit/b7865dd1b88db975e7ba51f3fde2e5982d561c8b">b7865dd</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="L3032" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="3032"></td>
<td id="LC3032" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">r_den</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">sqrt</span>(<span class="pl-en">_sum_of_squares</span>(<span class="pl-s1">xm</span>) <span class="pl-c1">*</span> <span class="pl-en">_sum_of_squares</span>(<span class="pl-s1">ym</span>)) </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto">Pearsonr is stable by a multiplicative coefficient. When this coefficient is too high, the computation fails with an error message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="scipy/stats/stats.py:3013: RuntimeWarning: overflow encountered in double_scalars
r_den = np.sqrt(_sum_of_squares(xm) * _sum_of_squares(ym))"><pre class="notranslate"><code class="notranslate">scipy/stats/stats.py:3013: RuntimeWarning: overflow encountered in double_scalars
r_den = np.sqrt(_sum_of_squares(xm) * _sum_of_squares(ym))
</code></pre></div>
<p dir="auto">The sum of squares product here is too high. Need to adapt the computation so that this partial computation is avoided.</p>
<p dir="auto">To reproduce (starting from the documentation example in master branch):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
from scipy import stats
a = np.array([0, 0, 0, 1, 1, 1, 1])
b = np.arange(7)
pearson1 = stats.pearsonr(a, b)
a1 = a * 1e90
b1 = b * 1e90
pearson2 = stats.pearsonr(a1, b1)
print(pearson1 , pearson2)
assert(np.allclose(pearson1[0] , pearson2[0]))
assert(np.allclose(pearson1[1] , pearson2[1]))"><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">from</span> <span class="pl-s1">scipy</span> <span class="pl-k">import</span> <span class="pl-s1">stats</span>
<span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>])
<span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">7</span>)
<span class="pl-s1">pearson1</span> <span class="pl-c1">=</span> <span class="pl-s1">stats</span>.<span class="pl-en">pearsonr</span>(<span class="pl-s1">a</span>, <span class="pl-s1">b</span>)
<span class="pl-s1">a1</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span> <span class="pl-c1">*</span> <span class="pl-c1">1e90</span>
<span class="pl-s1">b1</span> <span class="pl-c1">=</span> <span class="pl-s1">b</span> <span class="pl-c1">*</span> <span class="pl-c1">1e90</span>
<span class="pl-s1">pearson2</span> <span class="pl-c1">=</span> <span class="pl-s1">stats</span>.<span class="pl-en">pearsonr</span>(<span class="pl-s1">a1</span>, <span class="pl-s1">b1</span>)
<span class="pl-en">print</span>(<span class="pl-s1">pearson1</span> , <span class="pl-s1">pearson2</span>)
<span class="pl-k">assert</span>(<span class="pl-s1">np</span>.<span class="pl-en">allclose</span>(<span class="pl-s1">pearson1</span>[<span class="pl-c1">0</span>] , <span class="pl-s1">pearson2</span>[<span class="pl-c1">0</span>]))
<span class="pl-k">assert</span>(<span class="pl-s1">np</span>.<span class="pl-en">allclose</span>(<span class="pl-s1">pearson1</span>[<span class="pl-c1">1</span>] , <span class="pl-s1">pearson2</span>[<span class="pl-c1">1</span>]))</pre></div>
<p dir="auto">Versions :</p>
<p dir="auto">output of 'import sys, scipy, numpy; print(scipy.<strong>version</strong>, numpy.<strong>version</strong>, sys.version_info)'</p>
<p dir="auto">1.1.0 1.14.5 sys.version_info(major=3, minor=6, micro=5, releaselevel='final', serial=0)</p>
<p dir="auto">Also performed a lookup to see if a similar issue already exists.</p> | 1 |
<p dir="auto">Firefox specific bug</p>
<p dir="auto">Due to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="150183047" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/6570" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/6570/hovercard" href="https://github.com/facebook/react/pull/6570">#6570</a> react > 15.0.3 populates every element with property <code class="notranslate">is="null"</code></p>
<p dir="auto">That's caused by weird Firefox behaviour checking the args number of <code class="notranslate">document.createElement</code>.<br>
e.g.:<br>
<code class="notranslate">document.createElement('a', '')</code> => <code class="notranslate"><a is=""></code><br>
<code class="notranslate">document.createElement('a', null)</code> => <code class="notranslate"><a is="null"></code><br>
<code class="notranslate">document.createElement('a', undefined)</code> => <code class="notranslate"><a is="undefined"></code></p>
<p dir="auto">Verified with Firefox v46.0.1, <a href="mailto:[email protected]">[email protected]</a> and [email protected]</p> | <p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p>
<p dir="auto">Looks like a <strong>bug</strong>.</p>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">I have a simple context set up to manage a global store. When implementing this context as a functional component with the useState hook, calls to my setStore function from inside a timeout are seeing old versions of the store and updating it incorrectly.</p>
<p dir="auto">Possibly a duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="374792702" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/14010" data-hovercard-type="issue" data-hovercard-url="/facebook/react/issues/14010/hovercard" href="https://github.com/facebook/react/issues/14010">#14010</a> but I don't see why the value of my store should be getting saved by the closure. The closure created by the setTimeout can't see the value of store, so it shouldn't be captured.</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>
<p dir="auto"><a href="https://codesandbox.io/s/mnxr754oy" rel="nofollow">https://codesandbox.io/s/mnxr754oy</a></p>
<p dir="auto">Refresh the page in the sandbox and click the "Increment otherVal" button a few times. After 3 seconds, a timeout fires in ChildThree that sets myVal to 42 but doesn't touch otherVal; however, the changes made by incrementing otherVal get blown away. This doesn't happen with changes prompted by onClick events (as you can test by clicking "Set myVal to 42" on the bottom), only timeouts.</p>
<p dir="auto">The context implementation is in <code class="notranslate">store.js</code>. If you swap out the functional StoreProvider with the commented out class version, everything works as expected.</p>
<p dir="auto">It's possible that I'm doing something wrong with how my closures are being created in the functional StoreProvider but I can't see why.</p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">The context provided function setStore should be seeing the correct copy of the state returned by the hook.</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">Tested in Chrome/Firefox/Edge on React 16.9.0-alpha.1</p> | 0 |
<p dir="auto">With <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="187731663" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/222" data-hovercard-type="pull_request" data-hovercard-url="/vercel/next.js/pull/222/hovercard" href="https://github.com/vercel/next.js/pull/222">#222</a> merged any ideas how to add a loader for TypeScript in next.config.js?</p>
<p dir="auto">I've tried adding a TypeScript specific loader like this</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const path = require('path');
const nextPagesDir = path.join(__dirname, 'pages');
const typescriptLoader = {
test: /\.ts(x?)$/,
loader: ['ts-loader'],
exclude: /node_modules/,
include: [
nextPagesDir
]
};
module.exports = {
webpack: (config) => {
config.module.rules.push(typescriptLoader);
return config;
}
}"><pre class="notranslate"><code class="notranslate">const path = require('path');
const nextPagesDir = path.join(__dirname, 'pages');
const typescriptLoader = {
test: /\.ts(x?)$/,
loader: ['ts-loader'],
exclude: /node_modules/,
include: [
nextPagesDir
]
};
module.exports = {
webpack: (config) => {
config.module.rules.push(typescriptLoader);
return config;
}
}
</code></pre></div>
<p dir="auto">but assume additional changes need to be made as well as additional entries for hot loading etc.</p>
<p dir="auto">Another question is should the TypeScript loader be used in with babel e.g.</p>
<p dir="auto"><code class="notranslate">loaders: ['babel-loader', 'ts-loader']</code></p>
<p dir="auto">If so I'd need to apply the same babel options as in webpack.js.</p> | <p dir="auto">this looks <em>awesome</em> but I also really like TypeScript.<br>
is there any way to integrate typescript into the workflow?</p> | 1 |
<p dir="auto">After many consecutive ORs in Golang, the code highlighting is messed up till the end of the file.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/9922b00d5d5d88e6f632e46059938de7878122297023087d9a1aab3c9b7ef1d1/687474703a2f2f692e646f6e64616e69656c6c6f2e636f6d2f323031342d31302d30355f31382d31382d31375f614d656a2e706e67"><img src="https://camo.githubusercontent.com/9922b00d5d5d88e6f632e46059938de7878122297023087d9a1aab3c9b7ef1d1/687474703a2f2f692e646f6e64616e69656c6c6f2e636f6d2f323031342d31302d30355f31382d31382d31375f614d656a2e706e67" alt="Example" data-canonical-src="http://i.dondaniello.com/2014-10-05_18-18-17_aMej.png" style="max-width: 100%;"></a></p>
<p dir="auto">Code is obviously valid and compiles correctly.</p> | <p dir="auto">I opened a Python file with the following line (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="20976125" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/963" data-hovercard-type="pull_request" data-hovercard-url="/atom/atom/pull/963/hovercard" href="https://github.com/atom/atom/pull/963">#963</a>):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" PrintAndLog(u"SSID: " + RememberedNetwork["SSIDString"].decode("utf-8") + u" - BSSID: " + RememberedNetwork["CachedScanRecord"]["BSSID"] + u" - RSSI: " + str(RememberedNetwork["CachedScanRecord"]["RSSI"]) + u" - Last connected: " + str(RememberedNetwork["LastConnected"]) + u" - Security type: " + RememberedNetwork["SecurityType"] + u" - Geolocation: " + Geolocation, "INFO")"><pre class="notranslate"> <span class="pl-v">PrintAndLog</span>(<span class="pl-s">u"SSID: "</span> <span class="pl-c1">+</span> <span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"SSIDString"</span>].<span class="pl-en">decode</span>(<span class="pl-s">"utf-8"</span>) <span class="pl-c1">+</span> <span class="pl-s">u" - BSSID: "</span> <span class="pl-c1">+</span> <span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"CachedScanRecord"</span>][<span class="pl-s">"BSSID"</span>] <span class="pl-c1">+</span> <span class="pl-s">u" - RSSI: "</span> <span class="pl-c1">+</span> <span class="pl-en">str</span>(<span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"CachedScanRecord"</span>][<span class="pl-s">"RSSI"</span>]) <span class="pl-c1">+</span> <span class="pl-s">u" - Last connected: "</span> <span class="pl-c1">+</span> <span class="pl-en">str</span>(<span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"LastConnected"</span>]) <span class="pl-c1">+</span> <span class="pl-s">u" - Security type: "</span> <span class="pl-c1">+</span> <span class="pl-v">RememberedNetwork</span>[<span class="pl-s">"SecurityType"</span>] <span class="pl-c1">+</span> <span class="pl-s">u" - Geolocation: "</span> <span class="pl-c1">+</span> <span class="pl-v">Geolocation</span>, <span class="pl-s">"INFO"</span>)</pre></div>
<p dir="auto">Which led to the following bug:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/e06069206d526a16adf21e84cd179f1185d3fb5e0f05fea4d4b4a08a978092f4/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f34343737342f323331333737382f37366262346262612d613330642d313165332d396136342d3831663666393163323563342e706e67"><img src="https://camo.githubusercontent.com/e06069206d526a16adf21e84cd179f1185d3fb5e0f05fea4d4b4a08a978092f4/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f34343737342f323331333737382f37366262346262612d613330642d313165332d396136342d3831663666393163323563342e706e67" alt="screen shot 2014-03-03 at 2 52 40 pm" data-canonical-src="https://f.cloud.github.com/assets/44774/2313778/76bb4bba-a30d-11e3-9a64-81f6f91c25c4.png" style="max-width: 100%;"></a></p>
<p dir="auto">You can find this as the main file in <a href="https://github.com/jipegit/OSXAuditor/blob/master/osxauditor.py"><code class="notranslate">osxauditor.py</code></a>.</p> | 1 |
<ul dir="auto">
<li>Electron version: 1.4.7</li>
<li>Operating system: OSX 10.12.1</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// in the render
var webview = document.querySelector('webview');
webview.addEventListener('will-navigate', function(e){
e.preventDefault(); // should prevent webview navigation
console.log(e);
// e.defaultPrevented: false
});"><pre class="notranslate"><span class="pl-c">// in the render</span>
<span class="pl-k">var</span> <span class="pl-s1">webview</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">querySelector</span><span class="pl-kos">(</span><span class="pl-s">'webview'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">webview</span><span class="pl-kos">.</span><span class="pl-en">addEventListener</span><span class="pl-kos">(</span><span class="pl-s">'will-navigate'</span><span class="pl-kos">,</span> <span class="pl-k">function</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-s1">e</span><span class="pl-kos">.</span><span class="pl-en">preventDefault</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// should prevent webview navigation</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-c">// e.defaultPrevented: false</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Also <code class="notranslate">webview.stop()</code> has no effect.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">The webview navigates to the target</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">See code above.</p> | <p dir="auto">It would be very useful to get events related to navigation:</p>
<ul dir="auto">
<li><code class="notranslate">will-navigate</code>: when the webview is about to navigate (url have been changed but no requests have been emited yet). It could eventually be cancelled with <code class="notranslate">event.preventDefault()</code>)</li>
<li><code class="notranslate">page-url-set</code>: like <code class="notranslate">page-title-set</code> but for url. It is different than <code class="notranslate">before-navigate</code> because it should also handle anchor changes and HTML5 url set without navigating (with <code class="notranslate">history.pushState</code> and <code class="notranslate">history.replaceState</code>)</li>
<li><code class="notranslate">did-navigate</code>: after the navigation has occured (i.e. when a new entry have been pushed to history and canGoBack/canGoForward/canGo... may have changed)</li>
</ul> | 1 |
<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jonathanong/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jonathanong">@jonathanong</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.2.0</li>
<li><strong>Node version:</strong> 5.1.0</li>
<li><strong>npm version:</strong> 3.3.12</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"presets": [
"es2015",
"stage-0",
"react"
],
"plugins": [
"lodash",
"transform-runtime"
]
}"><pre class="notranslate"><code class="notranslate">{
"presets": [
"es2015",
"stage-0",
"react"
],
"plugins": [
"lodash",
"transform-runtime"
]
}
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'use strict'
export default async function a(x) {
return 2 * b(x)
}
async function b(x) {
return x + 1
}"><pre class="notranslate"><code class="notranslate">'use strict'
export default async function a(x) {
return 2 * b(x)
}
async function b(x) {
return x + 1
}
</code></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">The output is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'use strict';
var b = (function () {
var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(x) {
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt('return', x + 1);
case 1:
case 'end':
return _context2.stop();
}
}
}, _callee2, this);
}));
return function b(_x2) {
return ref.apply(this, arguments);
};
})();
Object.defineProperty(exports, "__esModule", {
value: true
});
var _regenerator = require('babel-runtime/regenerator');
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = (function () {
var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(x) {
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
return _context.abrupt('return', 2 * b(x));
case 1:
case 'end':
return _context.stop();
}
}
}, _callee, this);
}));
return function a(_x) {
return ref.apply(this, arguments);
};
})();"><pre class="notranslate"><code class="notranslate">'use strict';
var b = (function () {
var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(x) {
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt('return', x + 1);
case 1:
case 'end':
return _context2.stop();
}
}
}, _callee2, this);
}));
return function b(_x2) {
return ref.apply(this, arguments);
};
})();
Object.defineProperty(exports, "__esModule", {
value: true
});
var _regenerator = require('babel-runtime/regenerator');
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = (function () {
var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(x) {
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
return _context.abrupt('return', 2 * b(x));
case 1:
case 'end':
return _context.stop();
}
}
}, _callee, this);
}));
return function a(_x) {
return ref.apply(this, arguments);
};
})();
</code></pre></div>
<p dir="auto"><code class="notranslate">_asyncToGenerator3</code> and <code class="notranslate">_regenerator2</code> are used before they are defined. the runtime <code class="notranslate">require()</code>s should be at the top!</p> | <p dir="auto">hi.</p>
<p dir="auto">seems like <code class="notranslate">[email protected]</code> -> <code class="notranslate">[email protected]</code> has some regression bug, because that code worked fine on previous version:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const obj = {
symbol: Symbol()
};
class Foo {
[obj.symbol]() {
console.log(123);
}
}
const foo = new Foo();
foo[obj.symbol]();"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">symbol</span>: <span class="pl-v">Symbol</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">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span>
<span class="pl-kos">[</span><span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">symbol</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-c1">123</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">foo</span><span class="pl-kos">[</span><span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">symbol</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="├── [email protected]
├── [email protected]
├── [email protected]"><pre class="notranslate">├── [email protected]
├── [email protected]
├── [email protected]</pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="babel test.js -o test.es5.js -i runtime"><pre class="notranslate">babel test.js -o test.es5.js -i runtime</pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test/node_modules/babel/lib/babel/helpers/parse.js:54
throw err;
^
RangeError: test.js: Maximum call stack size exceeded
at new Number (native)
at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:473:19)
at Array.map (native)
at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)
at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:478:17)
at Array.map (native)
at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)
at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:478:17)
at Array.map (native)
at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)"><pre class="notranslate">test/node_modules/babel/lib/babel/helpers/parse.js:54
throw err<span class="pl-k">;</span>
^
RangeError: test.js: Maximum call stack size exceeded
at new Number (native)
at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:473:19)
at Array.map (native)
at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)
at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:478:17)
at Array.map (native)
at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)
at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:478:17)
at Array.map (native)
at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)</pre></div>
<p dir="auto">but this is still working:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const symbol = Symbol();
class Foo {
[symbol]() {
console.log(123);
}
}
const foo = new Foo();
foo[symbol]();"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">symbol</span> <span class="pl-c1">=</span> <span class="pl-v">Symbol</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span>
<span class="pl-kos">[</span><span class="pl-s1">symbol</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-c1">123</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">foo</span><span class="pl-kos">[</span><span class="pl-s1">symbol</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | 0 |
<p dir="auto">I wanted to make a FacetGrid plot with some offset.</p>
<p dir="auto">Basic code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import seaborn as sns
sns.set(style="ticks", color_codes=True)
tips = sns.load_dataset("tips")
g = sns.FacetGrid(tips, col="time", row="smoker")
g = g.map(plt.hist, "total_bill")"><pre class="notranslate"><code class="notranslate">import seaborn as sns
sns.set(style="ticks", color_codes=True)
tips = sns.load_dataset("tips")
g = sns.FacetGrid(tips, col="time", row="smoker")
g = g.map(plt.hist, "total_bill")
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10461030/26489001/dc480cb2-4205-11e7-9313-551d0ddd2549.png"><img src="https://cloud.githubusercontent.com/assets/10461030/26489001/dc480cb2-4205-11e7-9313-551d0ddd2549.png" alt="zero" style="max-width: 100%;"></a></p>
<p dir="auto">Now with offset:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tips = sns.load_dataset("tips")
g = sns.FacetGrid(tips, col = 'time', row='sex')
g.despine(offset=10)
g = g.map(plt.hist, "tip")"><pre class="notranslate"><code class="notranslate">tips = sns.load_dataset("tips")
g = sns.FacetGrid(tips, col = 'time', row='sex')
g.despine(offset=10)
g = g.map(plt.hist, "tip")
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10461030/26489030/f5803dbc-4205-11e7-9b38-05626e7b5a88.png"><img src="https://cloud.githubusercontent.com/assets/10461030/26489030/f5803dbc-4205-11e7-9b38-05626e7b5a88.png" alt="second" style="max-width: 100%;"></a></p>
<p dir="auto">So the x- and y-label return in the inner axes, which is not what I want.<br>
I looked in the code for the class definition of FacetGrid, and applied the same code to remove the labels on the inner axes.</p>
<p dir="auto">The code I used as a base for my workaround:<br>
<a href="https://github.com/mwaskom/seaborn/blob/master/seaborn/axisgrid.py#L327">link to code</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Now we turn off labels on the inner axes
if sharex:
for ax in self._not_bottom_axes:
for label in ax.get_xticklabels():
label.set_visible(False)
ax.xaxis.offsetText.set_visible(False)
if sharey:
for ax in self._not_left_axes:
for label in ax.get_yticklabels():
label.set_visible(False)
ax.yaxis.offsetText.set_visible(False)"><pre class="notranslate"><code class="notranslate"># Now we turn off labels on the inner axes
if sharex:
for ax in self._not_bottom_axes:
for label in ax.get_xticklabels():
label.set_visible(False)
ax.xaxis.offsetText.set_visible(False)
if sharey:
for ax in self._not_left_axes:
for label in ax.get_yticklabels():
label.set_visible(False)
ax.yaxis.offsetText.set_visible(False)
</code></pre></div>
<p dir="auto">generate the figure:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tips = sns.load_dataset("tips")
g = sns.FacetGrid(tips, col = 'time', row='sex')
g.despine(offset=10)
g = g.map(plt.hist, "tip")
for ax in g.axes[:, 1:].flat:
for label in ax.get_yticklabels():
label.set_visible(False)
ax.yaxis.offsetText.set_visible(False)
for ax in g.axes[:-1, :].flat:
for label in ax.get_xticklabels():
label.set_visible(False)
ax.xaxis.offsetText.set_visible(False)"><pre class="notranslate"><code class="notranslate">tips = sns.load_dataset("tips")
g = sns.FacetGrid(tips, col = 'time', row='sex')
g.despine(offset=10)
g = g.map(plt.hist, "tip")
for ax in g.axes[:, 1:].flat:
for label in ax.get_yticklabels():
label.set_visible(False)
ax.yaxis.offsetText.set_visible(False)
for ax in g.axes[:-1, :].flat:
for label in ax.get_xticklabels():
label.set_visible(False)
ax.xaxis.offsetText.set_visible(False)
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10461030/26489430/9cea7292-4207-11e7-9121-36ce4c88c01d.png"><img src="https://cloud.githubusercontent.com/assets/10461030/26489430/9cea7292-4207-11e7-9121-36ce4c88c01d.png" alt="third" style="max-width: 100%;"></a></p>
<p dir="auto">My workaraound works, so no issues there. But I feel that this is not the behaviour you would expect from FacetGrid. I could not find the code in <code class="notranslate">utils/despine</code> which would be responsible for the behaviour.</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/37860163/seaborn-despine-brings-back-the-ytick-labels/44161447#44161447" rel="nofollow">original stackoverflow post</a></p> | <p dir="auto">Setup:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="samples = 1
df = pd.DataFrame()
for batch_size in range(31):
samples = samples/(1+scipy.stats.expon.rvs(loc=0, scale=1/1000, size=10000))
df = df.append(dict(batch_size=batch_size, samples=samples), ignore_index=True)
exploded_df = df.explode("samples")"><pre class="notranslate"><code class="notranslate">samples = 1
df = pd.DataFrame()
for batch_size in range(31):
samples = samples/(1+scipy.stats.expon.rvs(loc=0, scale=1/1000, size=10000))
df = df.append(dict(batch_size=batch_size, samples=samples), ignore_index=True)
exploded_df = df.explode("samples")
</code></pre></div>
<p dir="auto">The following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sns.displot(data=exploded_df[exploded_df.batch_size % 10 == 0], col="batch_size", x="samples", kind="hist")"><pre class="notranslate"><code class="notranslate">sns.displot(data=exploded_df[exploded_df.batch_size % 10 == 0], col="batch_size", x="samples", kind="hist")
</code></pre></div>
<p dir="auto">takes forever (aborted after a minute or so), while</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="g = sns.FacetGrid(data=exploded_df[exploded_df.batch_size % 10 == 0], col="batch_size", sharey=False)
def plot_histplot(metric, color, data):
sns.histplot(x=np.array(data[metric]), color=color)
g.map_dataframe(plot_histplot, "samples")"><pre class="notranslate"><code class="notranslate">g = sns.FacetGrid(data=exploded_df[exploded_df.batch_size % 10 == 0], col="batch_size", sharey=False)
def plot_histplot(metric, color, data):
sns.histplot(x=np.array(data[metric]), color=color)
g.map_dataframe(plot_histplot, "samples")
</code></pre></div>
<p dir="auto">works right away. (g.map_dataframe(sns.histplot, "samples") also takes ages, so it might be the call to np.array that speeds things up?)</p>
<p dir="auto">The first version seems to spend most of its time in:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="comp_data()->__setitem__()->_get_setitem_indexer()->_convert_to_indexer()->_get_listlike_indexer()->_reindex_non_unique()->get_indexer_non_unique()->resize()"><pre class="notranslate"><code class="notranslate">comp_data()->__setitem__()->_get_setitem_indexer()->_convert_to_indexer()->_get_listlike_indexer()->_reindex_non_unique()->get_indexer_non_unique()->resize()
</code></pre></div>
<hr>
<p dir="auto">Confounder:</p>
<p dir="auto">If I recreate explode_df using dummy data:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="exploded_df = pd.DataFrame(dict(batch_size=np.random.choice(31, 10000*31), samples=np.random.normal(size=10000*31)))"><pre class="notranslate"><code class="notranslate">exploded_df = pd.DataFrame(dict(batch_size=np.random.choice(31, 10000*31), samples=np.random.normal(size=10000*31)))
</code></pre></div>
<p dir="auto">both are fast. So it might seem there is something about the DataFrame that makes it slow?</p>
<hr>
<p dir="auto">seaborn 0.11.2<br>
pandas 1.1.5<br>
pandas-datareader 0.9.0<br>
pandas-gbq 0.13.3<br>
pandas-profiling 1.4.1<br>
sklearn-pandas 1.8.0</p>
<hr>
<p dir="auto">Thanks,<br>
Andreas</p> | 0 |
<h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>Use any branch on or after commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/a2951a9a1fed437422f9530fe82e4761dbedddbf/hovercard" href="https://github.com/flutter/flutter/commit/a2951a9a1fed437422f9530fe82e4761dbedddbf"><tt>a2951a9</tt></a></li>
<li>Run the release build with <code class="notranslate">flutter run --release</code></li>
<li>The app will crash on launch</li>
</ol>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="05-08 10:53:31.033 495 495 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-08 10:53:31.033 495 495 F DEBUG : Build fingerprint: 'Verizon/trltevzw/trltevzw:6.0.1/MMB29M/N910VVRU2CQL1:user/release-keys'
05-08 10:53:31.033 495 495 F DEBUG : Revision: '12'
05-08 10:53:31.033 495 495 F DEBUG : ABI: 'arm'
05-08 10:53:31.033 495 495 F DEBUG : pid: 12282, tid: 12310, name: 1.ui >>> com.clanhq.app <<<
05-08 10:53:31.033 495 495 F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x9eb57000
05-08 10:53:31.053 495 495 F DEBUG : r0 9c5fd04d r1 9dcc0021 r2 9dcc0021 r3 9eb56fff
05-08 10:53:31.053 495 495 F DEBUG : r4 9dcc0021 r5 9dcc37b1 r6 9dcc2df9 r7 00000003
05-08 10:53:31.053 495 495 F DEBUG : r8 9c2fefe9 r9 00000000 sl adc9c800 fp 9ee527fc
05-08 10:53:31.053 495 495 F DEBUG : ip 9dcc0021 sp 9ee527e8 lr b2aa7168 pc b2aa73dc cpsr 000b0010
05-08 10:53:31.053 495 495 F DEBUG :
05-08 10:53:31.053 495 495 F DEBUG : backtrace:
05-08 10:53:31.053 495 495 F DEBUG : #00 pc 000003dc /data/data/com.clanhq.app/app_flutter/vm_snapshot_instr
05-08 10:53:31.053 495 495 F DEBUG : #01 pc 00000164 /data/data/com.clanhq.app/app_flutter/vm_snapshot_instr"><pre class="notranslate"><code class="notranslate">05-08 10:53:31.033 495 495 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-08 10:53:31.033 495 495 F DEBUG : Build fingerprint: 'Verizon/trltevzw/trltevzw:6.0.1/MMB29M/N910VVRU2CQL1:user/release-keys'
05-08 10:53:31.033 495 495 F DEBUG : Revision: '12'
05-08 10:53:31.033 495 495 F DEBUG : ABI: 'arm'
05-08 10:53:31.033 495 495 F DEBUG : pid: 12282, tid: 12310, name: 1.ui >>> com.clanhq.app <<<
05-08 10:53:31.033 495 495 F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x9eb57000
05-08 10:53:31.053 495 495 F DEBUG : r0 9c5fd04d r1 9dcc0021 r2 9dcc0021 r3 9eb56fff
05-08 10:53:31.053 495 495 F DEBUG : r4 9dcc0021 r5 9dcc37b1 r6 9dcc2df9 r7 00000003
05-08 10:53:31.053 495 495 F DEBUG : r8 9c2fefe9 r9 00000000 sl adc9c800 fp 9ee527fc
05-08 10:53:31.053 495 495 F DEBUG : ip 9dcc0021 sp 9ee527e8 lr b2aa7168 pc b2aa73dc cpsr 000b0010
05-08 10:53:31.053 495 495 F DEBUG :
05-08 10:53:31.053 495 495 F DEBUG : backtrace:
05-08 10:53:31.053 495 495 F DEBUG : #00 pc 000003dc /data/data/com.clanhq.app/app_flutter/vm_snapshot_instr
05-08 10:53:31.053 495 495 F DEBUG : #01 pc 00000164 /data/data/com.clanhq.app/app_flutter/vm_snapshot_instr
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel unknown, v0.4.0, on Linux, locale en_US.UTF-8)
• Flutter version 0.4.0 at /home/paul/flutter
• Framework revision 7984f6e043 (4 days ago), 2018-05-04 10:48:06 -0700
• Engine revision e976be13c5
• Dart version 2.0.0-dev.53.0.flutter-e6d7d67f4b
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /home/paul/Android/Sdk
• Android NDK at /home/paul/Android/Sdk/ndk-bundle
• Platform android-27, build-tools 27.0.3
• Java binary at: /usr/local/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] Android Studio (version 3.1)
• Android Studio at /usr/local/android-studio
• Flutter plugin version 23.2.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] IntelliJ IDEA Community Edition (version 2018.1)
• IntelliJ at /home/paul/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/181.4203.550
• Flutter plugin version 24.0.2
• Dart plugin version 181.4203.498
[✓] IntelliJ IDEA Community Edition (version 2017.2)
• IntelliJ at /usr/local/idea-intellij
• Flutter plugin version 19.1
• Dart plugin version 172.4343.25
[✓] IntelliJ IDEA Community Edition (version 2017.3)
• IntelliJ at /home/paul/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/173.4548.28
• Flutter plugin version 22.0.2
• Dart plugin version 173.4548.30
[✓] VS Code (version 1.22.2)
• VS Code at /usr/share/code
• Dart Code extension version 2.11.1
[✓] Connected devices (1 available)
• SM N910V • f4c0da82 • android-arm • Android 6.0.1 (API 23)
• No issues found!
"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel unknown, v0.4.0, on Linux, locale en_US.UTF-8)
• Flutter version 0.4.0 at /home/paul/flutter
• Framework revision 7984f6e043 (4 days ago), 2018-05-04 10:48:06 -0700
• Engine revision e976be13c5
• Dart version 2.0.0-dev.53.0.flutter-e6d7d67f4b
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /home/paul/Android/Sdk
• Android NDK at /home/paul/Android/Sdk/ndk-bundle
• Platform android-27, build-tools 27.0.3
• Java binary at: /usr/local/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] Android Studio (version 3.1)
• Android Studio at /usr/local/android-studio
• Flutter plugin version 23.2.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] IntelliJ IDEA Community Edition (version 2018.1)
• IntelliJ at /home/paul/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/181.4203.550
• Flutter plugin version 24.0.2
• Dart plugin version 181.4203.498
[✓] IntelliJ IDEA Community Edition (version 2017.2)
• IntelliJ at /usr/local/idea-intellij
• Flutter plugin version 19.1
• Dart plugin version 172.4343.25
[✓] IntelliJ IDEA Community Edition (version 2017.3)
• IntelliJ at /home/paul/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/173.4548.28
• Flutter plugin version 22.0.2
• Dart plugin version 173.4548.30
[✓] VS Code (version 1.22.2)
• VS Code at /usr/share/code
• Dart Code extension version 2.11.1
[✓] Connected devices (1 available)
• SM N910V • f4c0da82 • android-arm • Android 6.0.1 (API 23)
• No issues found!
</code></pre></div> | <p dir="auto">I would expect either the whole word to wrap, or probably better to have it change phone size or ellipsize. We probably want some standardized titlebar behavior here.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/11857803/19585022/e1e33632-96fd-11e6-9dad-417ca15f908f.PNG"><img src="https://cloud.githubusercontent.com/assets/11857803/19585022/e1e33632-96fd-11e6-9dad-417ca15f908f.PNG" alt="img_0003" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">The system fails to give credit to the user if they add img-responsive class to the first image as well as the new image</p> | <p dir="auto">Lesson: <a href="http://www.freecodecamp.com/challenges/waypoint-mobile-responsive-images" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-mobile-responsive-images</a></p>
<ol dir="auto">
<li>Instructions are the wrong way around, should assign the class after instructing you to make the new <code class="notranslate">img</code> tag</li>
<li>Switches from <code class="notranslate">https://</code> to <code class="notranslate">http://</code> requirement for second <code class="notranslate">img</code></li>
<li>If you add <code class="notranslate">img-responsive</code> to the existing <code class="notranslate">img</code> tag you are then unable to complete the lesson even if you add another image below it with the correct <code class="notranslate">src</code> and <code class="notranslate">class</code></li>
<li>Lesson accepts itself as complete before you have to close the image tag eg: <code class="notranslate"><img class="img-responsive" src="http://bit.ly/fcc-kittens2"</code> is accepted (missing <code class="notranslate">></code> on the end)</li>
<li>Don't think the notes should have the words <code class="notranslate">responsive design</code> wrapped in a code tag, previously only seen it used to describe markup.</li>
<li>Don't think this needs the caps either: <code class="notranslate">Fortunately, we have access to a Responsive CSS Framework called Bootstrap.</code> should just be <code class="notranslate">responsive CSS framework</code></li>
</ol> | 1 |
<p dir="auto">When namespaces merge, any members exported by one namespace declaration are in scope in all the merged declarations. Ambient external modules like <code class="notranslate">declare module "foo" { }</code> can merge too. It seems natural then that exported declarations are in scope in merged external modules too. But external modules have additional ways of exporting their members, via export specifiers, export default, and <code class="notranslate">export *</code>. Should export specifiers contribute to the shared export scope as well?</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare module 'm' {
export interface I { }
interface J { }
interface K { }
export { K };
interface L { }
export { L as L2 };
export { P } from 'other';
}
declare module 'm' {
export function f(): I; // in scope because of export modifier
export function g(): J; // not in scope (lacks export modifier)
export function h(): K; // should this be in scope?
export function h(): L; // should this be in scope?
export function h(): P; // should this be in scope?
}
declare module 'other' {
export interface P { }
}"><pre class="notranslate"><span class="pl-k">declare</span> module <span class="pl-s">'m'</span> <span class="pl-kos">{</span>
<span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">I</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">J</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">K</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span>
<span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-smi">K</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">interface</span> <span class="pl-smi">L</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span>
<span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-smi">L</span> <span class="pl-k">as</span> <span class="pl-smi">L2</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-smi">P</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'other'</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">declare</span> module <span class="pl-s">'m'</span> <span class="pl-kos">{</span>
<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-s1">f</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">I</span><span class="pl-kos">;</span> <span class="pl-c">// in scope because of export modifier</span>
<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-s1">g</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">J</span><span class="pl-kos">;</span> <span class="pl-c">// not in scope (lacks export modifier)</span>
<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-s1">h</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">K</span><span class="pl-kos">;</span> <span class="pl-c">// should this be in scope?</span>
<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-s1">h</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">L</span><span class="pl-kos">;</span> <span class="pl-c">// should this be in scope?</span>
<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-s1">h</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">P</span><span class="pl-kos">;</span> <span class="pl-c">// should this be in scope?</span>
<span class="pl-kos">}</span>
<span class="pl-k">declare</span> module <span class="pl-s">'other'</span> <span class="pl-kos">{</span>
<span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">P</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Today only J is in scope.</p>
<p dir="auto">The key difference between export modifiers and export specifiers is that when an export modifier is used, the exporting entity is guaranteed to have a corresponding local entity with the same name. This is not true of export specifiers, as they can export stuff that is not declared locally, or they can export using a different name.</p>
<p dir="auto">I can think of 4 options. I've listed them in order from smallest export scope to largest export scope:</p>
<ol dir="auto">
<li>Shared export scopes are not created at all for external modules. This is a pretty harsh breaking change.</li>
<li>Only an export modifier (implicit or explicit) can put the name into a shared export scope, but an export specifier cannot. This is the current behavior. It breaks a nice user intuition that using the export modifier is equivalent to leaving it out and writing an export specifier.</li>
<li>An export specifier that exports a locally declared module member with the same name is also in scope and treated just like an export modifier. This sounds like an oddly specific rule. But it maintains the user intuition that option 2 breaks, and when you think about it, it seems pretty natural I think. This would mean that in the above example, I and K are in scope.</li>
<li>All exported entities in a module are in the shared export scope, no matter how they were exported. This is inconsistent with ES6 export semantics.</li>
</ol>
<p dir="auto">I think 1 and 4 are not viable options. 3 seems ideal, but I could also see a case for 2. How about it?</p> | <p dir="auto">Just a suggestion, but it would be very cool if one could create a TypeScript Library project to contain nothing but TypeScript files, which would compile to a single JavaScript file that could then be linked from other projects. Maybe have a Definitions folder to contain .d.ts files. If the source-map-based debugging could be made to work with this project type, then even better.</p>
<p dir="auto">I'm guessing the project would need the same kind of ordering semantics as F# projects, so that the output was concatenated in the correct order.</p>
<p dir="auto">Since TypeScript's raison d'etre is large-scale applications, it would seem to make sense to support this level of componentization in a Visual Studio solution, right?</p> | 0 |
<p dir="auto">The php error :<br>
PHP Fatal error: Call to a member function getRepository() on a non-object</p>
<p dir="auto">is suppressed and a blank page is rendered despite being in dev ( app_dev.php )</p>
<p dir="auto">To replicate:<br>
remove $em = $this->getDoctrine()->getManager(); from any crud action.</p> | <h3 dir="auto">How to reproduce</h3>
<ol dir="auto">
<li>Create a controller action that contains <code class="notranslate">$foo->bar();</code>. Make sure that <code class="notranslate">$foo</code> is undefined.</li>
<li>Call said controller in both the <code class="notranslate">prod</code> and <code class="notranslate">dev</code> environments.</li>
</ol>
<h3 dir="auto">Code sample</h3>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?php
// src/Acme/BugReportBundle/Controller/BuggyController.php
namespace Acme\BugReportBundle\Controller;
class BuggyController
{
public function indexAction()
{
$foo->bar();
}
}"><pre class="notranslate"><span class="pl-ent"><?php</span>
<span class="pl-c">// src/Acme/BugReportBundle/Controller/BuggyController.php</span>
<span class="pl-k">namespace</span> <span class="pl-v">Acme</span>\<span class="pl-v">BugReportBundle</span>\<span class="pl-v">Controller</span>;
<span class="pl-k">class</span> <span class="pl-v">BuggyController</span>
{
<span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">indexAction</span>()
{
<span class="pl-s1"><span class="pl-c1">$</span>foo</span>-><span class="pl-en">bar</span>();
}
}</pre></div>
<h3 dir="auto">Attempt at analysis</h3>
<p dir="auto">When <code class="notranslate">indexAction()</code> is called, Symfony will display a blank page if <code class="notranslate">Debug::enable()</code> was called before (for example, if the <code class="notranslate">dev</code> environment is being used).</p>
<p dir="auto">If you insert <code class="notranslate">$foo = null;</code> before <code class="notranslate">$foo->bar();</code>, then Symfony's fatal error page will be displayed as intended.</p>
<p dir="auto"><code class="notranslate">Debug::enable()</code> registers <code class="notranslate">\Symfony\Component\Debug\ErrorHandler</code> as an error handler. <code class="notranslate">$foo->bar()</code> will make PHP display two errors:</p>
<ol dir="auto">
<li>Notice: Undefined variable: foo in <em>file</em> on line <em>line</em></li>
<li>Fatal error: Call to a member function bar() on a non-object in <em>file</em> on line <em>line</em></li>
</ol>
<p dir="auto">The notice will trigger <code class="notranslate">ErrorHandler::handle()</code>, which will in turn raise a <code class="notranslate">\Symfony\Component\Debug\Exception\ContextErrorException</code>. However, presumably because of the fatal error in the same line, Symfony's "Exception detected" page will not be displayed. The thrown <code class="notranslate">ContextErrorException</code> also prevents <code class="notranslate">ErrorHandler::handleFatal()</code> from being called (if the line that throws said exception is commented out, <code class="notranslate">handleFatal()</code> will be called and the error page is displayed properly). Because of this, a blank page will be displayed which is not really useful for debugging.</p>
<h3 dir="auto">Other information</h3>
<p dir="auto"><strong>Operating system:</strong> Debian GNU/Linux 6.0.7 (Linux 2.6.32 i686)<br>
<strong>Symfony version:</strong> 2.3.3<br>
<strong>PHP version:</strong> 5.3.6-11 (running via FastCGI)</p> | 1 |
<h3 dir="auto">Describe your issue.</h3>
<p dir="auto">Ever since version 1.8.0 certain all calls to hypergeom.pmf seem to be slower with certain set of parameters being processed so slow that it is code breaking. For the code shown below, my computer needs ~0.08s to process the loop using scipy 1.7.3 but ~262s on scipy 1.9.3, slowing down the process by more than a factor of 3000.</p>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import time
from scipy.stats import hypergeom
start = time.time()
for i in range(0, 1000):
odds = hypergeom.pmf(np.arange(0, 201), 100000, 50000, 200)
end = time.time()
print("test: " f'{(end - start):0.5}' + "s")"><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">time</span>
<span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">stats</span> <span class="pl-k">import</span> <span class="pl-s1">hypergeom</span>
<span class="pl-s1">start</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-en">time</span>()
<span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">0</span>, <span class="pl-c1">1000</span>):
<span class="pl-s1">odds</span> <span class="pl-c1">=</span> <span class="pl-s1">hypergeom</span>.<span class="pl-en">pmf</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>, <span class="pl-c1">201</span>), <span class="pl-c1">100000</span>, <span class="pl-c1">50000</span>, <span class="pl-c1">200</span>)
<span class="pl-s1">end</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-en">time</span>()
<span class="pl-en">print</span>(<span class="pl-s">"test: "</span> <span class="pl-s">f'<span class="pl-s1"><span class="pl-kos">{</span>(<span class="pl-s1">end</span> <span class="pl-c1">-</span> <span class="pl-s1">start</span>):0.5<span class="pl-kos">}</span></span>'</span> <span class="pl-c1">+</span> <span class="pl-s">"s"</span>)</pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="no error"><pre class="notranslate">no error</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto">1.7.3 1.22.4 sys.version_info(major=3, minor=10, micro=5, releaselevel='final', serial=0)</p> | <h3 dir="auto">Describe your issue.</h3>
<p dir="auto">While using the <code class="notranslate">fisher_exact</code> test in a loop on some 2x2 tables, I noticed a significant slowdown between Scipy versions 1.7.3 and 1.8.0 (1.8.0 is about 20x slower than 1.7.3). I narrowed it down to the call to <code class="notranslate">hypergeom.cdf</code>, and found a specific set of arguments with which the slowdown can be reproduced (see code example below).</p>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import time
import scipy
from scipy.stats import distributions
ts = time.time()
for _ in range(10000):
distributions.hypergeom.cdf(0, 48127, 57, 35775)
te = time.time()
print(scipy.__version__, '%.2fs' % (te-ts))
# Output for version info 1.7.3 1.22.2 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)
# 1.7.3 1.84s
# Output for version info 1.8.0 1.22.2 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)
# 1.8.0 41.11s"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">time</span>
<span class="pl-k">import</span> <span class="pl-s1">scipy</span>
<span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">stats</span> <span class="pl-k">import</span> <span class="pl-s1">distributions</span>
<span class="pl-s1">ts</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-en">time</span>()
<span class="pl-k">for</span> <span class="pl-s1">_</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">10000</span>):
<span class="pl-s1">distributions</span>.<span class="pl-s1">hypergeom</span>.<span class="pl-en">cdf</span>(<span class="pl-c1">0</span>, <span class="pl-c1">48127</span>, <span class="pl-c1">57</span>, <span class="pl-c1">35775</span>)
<span class="pl-s1">te</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-en">time</span>()
<span class="pl-en">print</span>(<span class="pl-s1">scipy</span>.<span class="pl-s1">__version__</span>, <span class="pl-s">'%.2fs'</span> <span class="pl-c1">%</span> (<span class="pl-s1">te</span><span class="pl-c1">-</span><span class="pl-s1">ts</span>))
<span class="pl-c"># Output for version info 1.7.3 1.22.2 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)</span>
<span class="pl-c"># 1.7.3 1.84s</span>
<span class="pl-c"># Output for version info 1.8.0 1.22.2 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)</span>
<span class="pl-c"># 1.8.0 41.11s</span></pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="-"><pre class="notranslate">-</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto">1.8.0 1.22.2 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)</p> | 1 |
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong><br>
I have an issue after upgrade to webpack 5, we have internal components as npm packages and services that use those components and we have the following issue:</p>
<ol dir="auto">
<li>Package A have the following folder structure:<br>
src
<ul dir="auto">
<li>theme
<ul dir="auto">
<li>default-theme.ts</li>
</ul>
</li>
<li>views
<ul dir="auto">
<li>Component.tsx</li>
</ul>
</li>
<li>index.ts</li>
</ul>
</li>
<li>Service has the following folder structure<br>
src
<ul dir="auto">
<li>theme
<ul dir="auto">
<li>default-theme.ts</li>
</ul>
</li>
<li>exported
<ul dir="auto">
<li>ExportedView.tsx</li>
</ul>
</li>
<li>index.ts</li>
</ul>
</li>
</ol>
<p dir="auto">After we run build in the service, default-theme of Package A gets replaced by default-theme of the service.</p>
<p dir="auto">This does not happen if the 2 files have different paths or different name.</p>
<p dir="auto">This happens with all files that have same name and same path.</p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">default-theme from the services should not override the package default-theme.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 5.60.0<br>
Node.js version: 14<br>
Operating System: Mac<br>
Additional tools:</p>
<p dir="auto">Current webpack configuration:</p>
<p dir="auto">const webpack = require('webpack');<br>
const { merge } = require('webpack-merge');<br>
const externalsConfig = require('./webpack.externals');<br>
const paths = require('../paths');<br>
const serviceName = require(paths.appPackageJson).name.<br>
const fs = require('fs');<br>
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');</p>
<p dir="auto">const DuplicatePackageCheckerPlugin = require(paths.scriptModule(<br>
'duplicate-package-checker-webpack-plugin'<br>
));</p>
<p dir="auto">let packages = fs.existsSync(paths.localDependencies)<br>
? require(paths.localDependencies).packages<br>
: {};</p>
<p dir="auto">const svgInlineOptions = {<br>
template: (<br>
{ template },<br>
opts,<br>
{ imports, componentName, props, jsx, exports }<br>
) => template.ast`<br>
${imports}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" const ${componentName} = (${props}) => {
return ${jsx};
};
export default ${componentName};
`,"><pre class="notranslate"><code class="notranslate"> const ${componentName} = (${props}) => {
return ${jsx};
};
export default ${componentName};
`,
</code></pre></div>
<p dir="auto">};</p>
<p dir="auto">module.exports = () => {<br>
const entryPoints = {<br>
bundle: paths.appIndex<br>
};<br>
const commonConfigs = {<br>
entry: entryPoints,<br>
output: {<br>
filename: '[name].js',<br>
path: paths.appBuild,<br>
libraryTarget: 'umd',<br>
chunkFilename: '[name].[contenthash].bundle.js',<br>
devtoolNamespace: serviceName,<br>
library: serviceName<br>
},<br>
context: paths.appPath,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.webpack.js', '.web.js'],
alias: packages || {},
fallback: {
child_process: false,
fs: false,
crypto: false,
net: false,
tls: false,
tty: require.resolve("tty-browserify"),
"http": require.resolve("stream-http"),
"https": require.resolve("https-browserify"),
path: require.resolve('path-browserify')
}
},
stats: {
// Examine all modules
modulesSpace: Infinity,
// Display bailout reasons
optimizationBailout: true
},
module: {
rules: [
{
test: /\.tsx?$/,
use: [
{
loader: paths.scriptModule('esbuild-loader'),
options: {
loader: 'tsx',
target: 'es2015',
}
}
],
},
{
test: /\.eot(\?.*)?$/,
use: [{
loader: paths.scriptModule('file-loader?name=fonts/[content-hash].[ext]')
}]
},
{
test: /\.css?$/,
use: [{loader:paths.scriptModule('style-loader/useable')},{loader: paths.scriptModule('raw-loader')}
]
},
{
test: /\.svg(\?.*)?$/,
use: [{
loader: paths.scriptModule(
'url-loader?limit=10000&mimetype=image/svg+xml&name=fonts/[content-hash].[ext]'
) }],
exclude: /\.inline.svg$/
},
{
test: /\.inline.svg$/,
use: [
{
loader: paths.scriptModule('@svgr/webpack'),
options: svgInlineOptions
},
],
},
{
test: /\.(jpe?g|png|gif)$/i,
use: [{
loader: paths.scriptModule('url-loader?limit=1000&name=images/[content-hash].[ext]')
}]
},
{
test: /\.scss$/,
use: [{
loader: paths.scriptModule('style-loader/useable'),
},{
loader: paths.scriptModule('css-loader'),
},{
loader: paths.scriptModule('sass-loader')
}
]
},
{
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: paths.scriptModule('url-loader')
},
{
test: /\.(ttf|eot)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: paths.scriptModule('file-loader')
},
{
test: /font-awesome\.config\.js/,
loader: paths.scriptModule('style-loader')
}
]
},
plugins: [
new ForkTsCheckerWebpackPlugin(),
new webpack.LoaderOptionsPlugin({
options: {
tslint: {
failOnHint: true
}
}
}),
new DuplicatePackageCheckerPlugin({
verbose: true,
emitError: false,
showHelp: true,
strict: true
}),
new webpack.ProvidePlugin({
process: 'process/browser'
}),
],
node: {}
};
return merge(externalsConfig, commonConfigs);"><pre class="notranslate"><code class="notranslate"> resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.webpack.js', '.web.js'],
alias: packages || {},
fallback: {
child_process: false,
fs: false,
crypto: false,
net: false,
tls: false,
tty: require.resolve("tty-browserify"),
"http": require.resolve("stream-http"),
"https": require.resolve("https-browserify"),
path: require.resolve('path-browserify')
}
},
stats: {
// Examine all modules
modulesSpace: Infinity,
// Display bailout reasons
optimizationBailout: true
},
module: {
rules: [
{
test: /\.tsx?$/,
use: [
{
loader: paths.scriptModule('esbuild-loader'),
options: {
loader: 'tsx',
target: 'es2015',
}
}
],
},
{
test: /\.eot(\?.*)?$/,
use: [{
loader: paths.scriptModule('file-loader?name=fonts/[content-hash].[ext]')
}]
},
{
test: /\.css?$/,
use: [{loader:paths.scriptModule('style-loader/useable')},{loader: paths.scriptModule('raw-loader')}
]
},
{
test: /\.svg(\?.*)?$/,
use: [{
loader: paths.scriptModule(
'url-loader?limit=10000&mimetype=image/svg+xml&name=fonts/[content-hash].[ext]'
) }],
exclude: /\.inline.svg$/
},
{
test: /\.inline.svg$/,
use: [
{
loader: paths.scriptModule('@svgr/webpack'),
options: svgInlineOptions
},
],
},
{
test: /\.(jpe?g|png|gif)$/i,
use: [{
loader: paths.scriptModule('url-loader?limit=1000&name=images/[content-hash].[ext]')
}]
},
{
test: /\.scss$/,
use: [{
loader: paths.scriptModule('style-loader/useable'),
},{
loader: paths.scriptModule('css-loader'),
},{
loader: paths.scriptModule('sass-loader')
}
]
},
{
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: paths.scriptModule('url-loader')
},
{
test: /\.(ttf|eot)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: paths.scriptModule('file-loader')
},
{
test: /font-awesome\.config\.js/,
loader: paths.scriptModule('style-loader')
}
]
},
plugins: [
new ForkTsCheckerWebpackPlugin(),
new webpack.LoaderOptionsPlugin({
options: {
tslint: {
failOnHint: true
}
}
}),
new DuplicatePackageCheckerPlugin({
verbose: true,
emitError: false,
showHelp: true,
strict: true
}),
new webpack.ProvidePlugin({
process: 'process/browser'
}),
],
node: {}
};
return merge(externalsConfig, commonConfigs);
</code></pre></div>
<p dir="auto">};</p> | <p dir="auto">While porting a pre-existing application over to webpack I ran into an issue while cleaning up dependencies. The current setup is that 3rd party (vendor) libraries would go in a 'vendor' chunk and application global ones in 'global'. There are various entry points in the application (not single-page) and thus the grouping helps with de-duplication.</p>
<p dir="auto">To make this work I created a vendor and global entry, hoping to rely on CommonsChunkPlugin to resolve duplicates. This appears to work, but only partially. A test case of my setup is listed below, but the result is that global-1.js, which main.js requires, makes it both in the generated global.js as well as main.js, rather than just in the global.js. If in the config I move the entry of global-1.js to the vendor chunk, it does properly exclude the chunk from the generated main.js.</p>
<p dir="auto">Files for repro case:</p>
<p dir="auto">webpack.config.js:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="'use strict';
var path = require("path");
var webpack = require("webpack");
module.exports = {
entry: {
vendor: [
"./modules/vendor-1",
"./modules/vendor-2",
],
global: [
"./modules/global-1.js",
"./modules/global-2.js",
],
main: "./main.js",
},
plugins: [
// XXX: there appears to be a bug in webpack here, even though a chunk
// is common to global and main, it makes it into both. The plugin
// only appears to work properly for the first instantiation (vendor).
new webpack.optimize.CommonsChunkPlugin("vendor", "vendor.js", Infinity),
new webpack.optimize.CommonsChunkPlugin("global", "global.js", Infinity),
],
output: {
path: path.join(__dirname, "js"),
filename: "[name].js",
}
};"><pre class="notranslate"><span class="pl-s">'use strict'</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">path</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"path"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">webpack</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"webpack"</span><span class="pl-kos">)</span><span class="pl-kos">;</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-kos">{</span>
<span class="pl-c1">entry</span>: <span class="pl-kos">{</span>
<span class="pl-c1">vendor</span>: <span class="pl-kos">[</span>
<span class="pl-s">"./modules/vendor-1"</span><span class="pl-kos">,</span>
<span class="pl-s">"./modules/vendor-2"</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">global</span>: <span class="pl-kos">[</span>
<span class="pl-s">"./modules/global-1.js"</span><span class="pl-kos">,</span>
<span class="pl-s">"./modules/global-2.js"</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">main</span>: <span class="pl-s">"./main.js"</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c1">plugins</span>: <span class="pl-kos">[</span>
<span class="pl-c">// XXX: there appears to be a bug in webpack here, even though a chunk</span>
<span class="pl-c">// is common to global and main, it makes it into both. The plugin</span>
<span class="pl-c">// only appears to work properly for the first instantiation (vendor).</span>
<span class="pl-k">new</span> <span class="pl-s1">webpack</span><span class="pl-kos">.</span><span class="pl-c1">optimize</span><span class="pl-kos">.</span><span class="pl-c1">CommonsChunkPlugin</span><span class="pl-kos">(</span><span class="pl-s">"vendor"</span><span class="pl-kos">,</span> <span class="pl-s">"vendor.js"</span><span class="pl-kos">,</span> <span class="pl-v">Infinity</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-k">new</span> <span class="pl-s1">webpack</span><span class="pl-kos">.</span><span class="pl-c1">optimize</span><span class="pl-kos">.</span><span class="pl-c1">CommonsChunkPlugin</span><span class="pl-kos">(</span><span class="pl-s">"global"</span><span class="pl-kos">,</span> <span class="pl-s">"global.js"</span><span class="pl-kos">,</span> <span class="pl-v">Infinity</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-c1">output</span>: <span class="pl-kos">{</span>
<span class="pl-c1">path</span>: <span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">"js"</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-c1">filename</span>: <span class="pl-s">"[name].js"</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">main.js:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require("./modules/vendor-1")
require("./modules/vendor-2")
require("./modules/global-1.js")"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"./modules/vendor-1"</span><span class="pl-kos">)</span>
<span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"./modules/vendor-2"</span><span class="pl-kos">)</span>
<span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"./modules/global-1.js"</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">modules/vendor-1.js:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// vendor-1"><pre class="notranslate"><span class="pl-c">// vendor-1</span></pre></div>
<p dir="auto">modules/vendor-2.js:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// vendor-1"><pre class="notranslate"><span class="pl-c">// vendor-1</span></pre></div>
<p dir="auto">modules/global-1.js:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// global-1"><pre class="notranslate"><span class="pl-c">// global-1</span></pre></div>
<p dir="auto">modules/global-2.js:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// global-2"><pre class="notranslate"><span class="pl-c">// global-2</span></pre></div>
<p dir="auto">global.js output:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="webpackJsonp([2],[
/* 0 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(3);
module.exports = __webpack_require__(4);
/***/ },
/* 1 */,
/* 2 */,
/* 3 */
/***/ function(module, exports, __webpack_require__) {
// global-1
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
// global-2
/***/ }
]);"><pre class="notranslate"><span class="pl-en">webpackJsonp</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">,</span><span class="pl-kos">[</span>
<span class="pl-c">/* 0 */</span>
<span class="pl-c">/***/</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-c1">3</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-c1">4</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/***/</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c">/* 1 */</span><span class="pl-kos">,</span>
<span class="pl-c">/* 2 */</span><span class="pl-kos">,</span>
<span class="pl-c">/* 3 */</span>
<span class="pl-c">/***/</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// global-1</span>
<span class="pl-c">/***/</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c">/* 4 */</span>
<span class="pl-c">/***/</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// global-2</span>
<span class="pl-c">/***/</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">generated main.js output, note the global-1 section that also appears in the generated global.js:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="webpackJsonp([0],[
/* 0 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(1)
__webpack_require__(2)
__webpack_require__(3)
/***/ },
/* 1 */,
/* 2 */,
/* 3 */
/***/ function(module, exports, __webpack_require__) {
// global-1
/***/ }
]);"><pre class="notranslate"><span class="pl-en">webpackJsonp</span><span class="pl-kos">(</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-c">/* 0 */</span>
<span class="pl-c">/***/</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">)</span>
<span class="pl-s1">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span>
<span class="pl-s1">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-c1">3</span><span class="pl-kos">)</span>
<span class="pl-c">/***/</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-c">/* 1 */</span><span class="pl-kos">,</span>
<span class="pl-c">/* 2 */</span><span class="pl-kos">,</span>
<span class="pl-c">/* 3 */</span>
<span class="pl-c">/***/</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// global-1</span>
<span class="pl-c">/***/</span> <span class="pl-kos">}</span>
<span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ kubectl get pods
(...)
fluentd-elasticsearch-kubernetes-minion-7ewp kubernetes-minion-7ewp/ <none> Pending Less than a second
fluentd-elasticsearch gcr.io/google_containers/fluentd-elasticsearch:1.5
fluentd-elasticsearch-kubernetes-minion-aizq kubernetes-minion-aizq/ <none> Pending 1 seconds
fluentd-elasticsearch gcr.io/google_containers/fluentd-elasticsearch:1.5
(...) "><pre class="notranslate"><code class="notranslate">$ kubectl get pods
(...)
fluentd-elasticsearch-kubernetes-minion-7ewp kubernetes-minion-7ewp/ <none> Pending Less than a second
fluentd-elasticsearch gcr.io/google_containers/fluentd-elasticsearch:1.5
fluentd-elasticsearch-kubernetes-minion-aizq kubernetes-minion-aizq/ <none> Pending 1 seconds
fluentd-elasticsearch gcr.io/google_containers/fluentd-elasticsearch:1.5
(...)
</code></pre></div>
<p dir="auto">The status is always pending with the created time equal 1s or less than 1s.</p>
<p dir="auto">The logs from kubelet show these messages at about a second interval:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0522 01:10:23.012618 2893 kubelet.go:1074] Deleting mirror pod "fluentd-elasticsearch-kubernetes-minion-aizq_default" because it is outdated
W0522 01:10:24.217263 2893 status_manager.go:60] Failed to updated pod status: error updating status for pod "fluentd-elasticsearch-kubernetes-minion-aizq": pods "fluentd-elasticsearch-kubernetes-minion-aizq" not found"><pre class="notranslate"><code class="notranslate">E0522 01:10:23.012618 2893 kubelet.go:1074] Deleting mirror pod "fluentd-elasticsearch-kubernetes-minion-aizq_default" because it is outdated
W0522 01:10:24.217263 2893 status_manager.go:60] Failed to updated pod status: error updating status for pod "fluentd-elasticsearch-kubernetes-minion-aizq": pods "fluentd-elasticsearch-kubernetes-minion-aizq" not found
</code></pre></div> | <p dir="auto">Possibly related to/duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="167374488" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/29548" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/29548/hovercard" href="https://github.com/kubernetes/kubernetes/issues/29548">#29548</a></p>
<p dir="auto">I'm running Kubernetes 1.3.0 and having trouble mounting EBS volumes to pods. The volumes seem to be attached to the minion, but not mounted.</p>
<p dir="auto"><code class="notranslate">xvdba</code> device is the EBS volume I'm trying to mount:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ip-10-72-4-178 ~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 200G 0 disk
|-xvda1 202:1 0 128M 0 part /boot
|-xvda2 202:2 0 2M 0 part
|-xvda3 202:3 0 1G 0 part /usr
|-xvda4 202:4 0 1G 0 part
|-xvda6 202:6 0 128M 0 part /usr/share/oem
|-xvda7 202:7 0 64M 0 part
`-xvda9 202:9 0 197.7G 0 part /
xvdba 202:13312 0 5G 0 disk"><pre class="notranslate"><code class="notranslate">ip-10-72-4-178 ~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 200G 0 disk
|-xvda1 202:1 0 128M 0 part /boot
|-xvda2 202:2 0 2M 0 part
|-xvda3 202:3 0 1G 0 part /usr
|-xvda4 202:4 0 1G 0 part
|-xvda6 202:6 0 128M 0 part /usr/share/oem
|-xvda7 202:7 0 64M 0 part
`-xvda9 202:9 0 197.7G 0 part /
xvdba 202:13312 0 5G 0 disk
</code></pre></div>
<p dir="auto">The RC definition:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="volumes:
- awsElasticBlockStore:
fsType: ext4
volumeID: aws://us-west-2a/vol-cee37b47
name: jenkins-data"><pre class="notranslate"><code class="notranslate">volumes:
- awsElasticBlockStore:
fsType: ext4
volumeID: aws://us-west-2a/vol-cee37b47
name: jenkins-data
</code></pre></div>
<p dir="auto">From <code class="notranslate">kube-controller-manager</code> log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Jul 26 15:15:06 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: I0726 15:15:06.743994 2158 reconciler.go:114] Started DetachVolume for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" from node "ip-10-72-4-178.us-west-2.compute.internal"
Jul 26 15:15:06 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: I0726 15:15:06.747351 2158 operation_executor.go:546] Verified volume is safe to detach for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" (spec.Name: "jenkins-data") from node "ip-10-72-4-178.us-west-2.compute.internal".
Jul 26 15:15:14 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: E0726 15:15:14.047011 2158 aws.go:1136] endAttaching on non-allocated device
Jul 26 15:15:14 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: I0726 15:15:14.047042 2158 operation_executor.go:565] DetachVolume.Detach succeeded for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" (spec.Name: "jenkins-data") from node "ip-10-72-4-178.us-west-2.compute.internal".
Jul 26 15:15:21 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: I0726 15:15:21.176639 2158 reconciler.go:169] Started AttachVolume for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" to node "ip-10-72-4-178.us-west-2.compute.internal"
Jul 26 15:15:25 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: I0726 15:15:25.022432 2158 operation_executor.go:454] AttachVolume.Attach succeeded for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" (spec.Name: "jenkins-data") from node "ip-10-72-4-178.us-west-2.compute.internal"."><pre class="notranslate"><code class="notranslate">Jul 26 15:15:06 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: I0726 15:15:06.743994 2158 reconciler.go:114] Started DetachVolume for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" from node "ip-10-72-4-178.us-west-2.compute.internal"
Jul 26 15:15:06 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: I0726 15:15:06.747351 2158 operation_executor.go:546] Verified volume is safe to detach for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" (spec.Name: "jenkins-data") from node "ip-10-72-4-178.us-west-2.compute.internal".
Jul 26 15:15:14 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: E0726 15:15:14.047011 2158 aws.go:1136] endAttaching on non-allocated device
Jul 26 15:15:14 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: I0726 15:15:14.047042 2158 operation_executor.go:565] DetachVolume.Detach succeeded for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" (spec.Name: "jenkins-data") from node "ip-10-72-4-178.us-west-2.compute.internal".
Jul 26 15:15:21 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: I0726 15:15:21.176639 2158 reconciler.go:169] Started AttachVolume for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" to node "ip-10-72-4-178.us-west-2.compute.internal"
Jul 26 15:15:25 ip-10-72-1-244.us-west-2.compute.internal kube-controller-manager[2158]: I0726 15:15:25.022432 2158 operation_executor.go:454] AttachVolume.Attach succeeded for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" (spec.Name: "jenkins-data") from node "ip-10-72-4-178.us-west-2.compute.internal".
</code></pre></div>
<p dir="auto">From <code class="notranslate">kube-kubelet</code> log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Jul 26 15:14:45 ip-10-72-4-178.us-west-2.compute.internal kubelet[1309]: I0726 15:14:45.075708 1309 reconciler.go:179] VerifyControllerAttachedVolume operation started for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" (spec.Name: "jenkins-data") pod "2a44c2b7-5343-11e6-ae02-06e2e967e82b" (UID: "2a44c2b7-5343-11e6-ae02-06e2e967e82b")
Jul 26 15:14:45 ip-10-72-4-178.us-west-2.compute.internal kubelet[1309]: E0726 15:14:45.080193 1309 goroutinemap.go:155] Operation for "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" failed. No retries permitted until 2016-07-26 15:16:45.080187905 +0000 UTC (durationBeforeRetry 2m0s). error: VerifyControllerAttachedVolume failed fetching node from API server. Volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" (spec.Name: "jenkins-data") pod "2a44c2b7-5343-11e6-ae02-06e2e967e82b" (UID: "2a44c2b7-5343-11e6-ae02-06e2e967e82b"). Error: nodes "10.72.4.178" not found.
Jul 26 15:15:01 ip-10-72-4-178.us-west-2.compute.internal kubelet[1309]: E0726 15:15:01.445341 1309 file.go:53] Unable to read config path "/etc/kubernetes/manifests": path does not exist, ignoring
Jul 26 15:15:04 ip-10-72-4-178.us-west-2.compute.internal kubelet[1309]: E0726 15:15:04.906056 1309 kubelet.go:1930] Unable to mount volumes for pod "jenkins-6xpbb_default(2a44c2b7-5343-11e6-ae02-06e2e967e82b)": timeout expired waiting for volumes to attach/mount for pod "jenkins-6xpbb"/"default". list of unattached/unmounted volumes=[jenkins-data]; skipping pod
Jul 26 15:15:04 ip-10-72-4-178.us-west-2.compute.internal kubelet[1309]: E0726 15:15:04.906089 1309 pod_workers.go:183] Error syncing pod 2a44c2b7-5343-11e6-ae02-06e2e967e82b, skipping: timeout expired waiting for volumes to attach/mount for pod "jenkins-6xpbb"/"default". list of unattached/unmounted volumes=[jenkins-data]"><pre class="notranslate"><code class="notranslate">Jul 26 15:14:45 ip-10-72-4-178.us-west-2.compute.internal kubelet[1309]: I0726 15:14:45.075708 1309 reconciler.go:179] VerifyControllerAttachedVolume operation started for volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" (spec.Name: "jenkins-data") pod "2a44c2b7-5343-11e6-ae02-06e2e967e82b" (UID: "2a44c2b7-5343-11e6-ae02-06e2e967e82b")
Jul 26 15:14:45 ip-10-72-4-178.us-west-2.compute.internal kubelet[1309]: E0726 15:14:45.080193 1309 goroutinemap.go:155] Operation for "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" failed. No retries permitted until 2016-07-26 15:16:45.080187905 +0000 UTC (durationBeforeRetry 2m0s). error: VerifyControllerAttachedVolume failed fetching node from API server. Volume "kubernetes.io/aws-ebs/aws://us-west-2a/vol-cee37b47" (spec.Name: "jenkins-data") pod "2a44c2b7-5343-11e6-ae02-06e2e967e82b" (UID: "2a44c2b7-5343-11e6-ae02-06e2e967e82b"). Error: nodes "10.72.4.178" not found.
Jul 26 15:15:01 ip-10-72-4-178.us-west-2.compute.internal kubelet[1309]: E0726 15:15:01.445341 1309 file.go:53] Unable to read config path "/etc/kubernetes/manifests": path does not exist, ignoring
Jul 26 15:15:04 ip-10-72-4-178.us-west-2.compute.internal kubelet[1309]: E0726 15:15:04.906056 1309 kubelet.go:1930] Unable to mount volumes for pod "jenkins-6xpbb_default(2a44c2b7-5343-11e6-ae02-06e2e967e82b)": timeout expired waiting for volumes to attach/mount for pod "jenkins-6xpbb"/"default". list of unattached/unmounted volumes=[jenkins-data]; skipping pod
Jul 26 15:15:04 ip-10-72-4-178.us-west-2.compute.internal kubelet[1309]: E0726 15:15:04.906089 1309 pod_workers.go:183] Error syncing pod 2a44c2b7-5343-11e6-ae02-06e2e967e82b, skipping: timeout expired waiting for volumes to attach/mount for pod "jenkins-6xpbb"/"default". list of unattached/unmounted volumes=[jenkins-data]
</code></pre></div> | 0 |
<p dir="auto">Hi,</p>
<p dir="auto">I'm trying to perform a broad crawl of the web with Scrapy in breadth-first order.</p>
<p dir="auto">The issue I'm running into is that after a few seconds of the crawl running, it seems to get stuck on just one or two domains instead of continuing down the list of seed URLs. I would expect it to either continue through the entire list of separate domains, and/or crawl multiple domains concurrently.</p>
<p dir="auto">Output of <code class="notranslate">scrapy version -v</code>:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Scrapy : 1.3.2
lxml : 3.4.0.0
libxml2 : 2.9.1
cssselect : 1.0.1
parsel : 1.1.0
w3lib : 1.17.0
Twisted : 17.1.0
Python : 2.7.9 (default, Jun 29 2016, 13:08:31) - [GCC 4.9.2]
pyOpenSSL : 16.2.0 (OpenSSL 1.0.1t 3 May 2016)
Platform : Linux-3.16.0-4-amd64-x86_64-with-debian-8.7"><pre class="notranslate">Scrapy <span class="pl-c1">:</span> 1.3.2
lxml <span class="pl-c1">:</span> 3.4.0.0
libxml2 <span class="pl-c1">:</span> 2.9.1
cssselect <span class="pl-c1">:</span> 1.0.1
parsel <span class="pl-c1">:</span> 1.1.0
w3lib <span class="pl-c1">:</span> 1.17.0
Twisted <span class="pl-c1">:</span> 17.1.0
Python <span class="pl-c1">:</span> 2.7.9 (default, Jun 29 2016, 13:08:31) - [GCC 4.9.2]
pyOpenSSL <span class="pl-c1">:</span> 16.2.0 (OpenSSL 1.0.1t 3 May 2016)
Platform <span class="pl-c1">:</span> Linux-3.16.0-4-amd64-x86_64-with-debian-8.7</pre></div>
<p dir="auto">Here is the main code for my spider:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# MySpider defines our Scrapy spider.
class MySpider(CrawlSpider):
name = "MyBot"
rules = (
Rule(LinkExtractor(deny_domains=deny_domains), callback='parse_item', follow=True),
)
def start_requests(self):
# Open the seed.csv file.
seed_path = os.path.dirname(os.path.realpath(__file__)) + '/seed.csv'
f = open(seed_path)
csv_rdr = csv.reader(f)
for row in csv_rdr:
url = 'http://' + row[0].strip()
yield Request(url=url, callback=self.parse)
def parse_start_url(self, response):
return self.parse_item(response)
def parse_item(self, response):
print '!!!!!!!!!!!!! Parsing: %s !!!!!!!!!!!!!' % response.url
# Check the Content-Type.
if is_content_type_ok(response.headers.getlist('Content-Type')):
# Yield data here
yield {}"><pre class="notranslate"><span class="pl-c"># MySpider defines our Scrapy spider.</span>
<span class="pl-k">class</span> <span class="pl-v">MySpider</span>(<span class="pl-v">CrawlSpider</span>):
<span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s">"MyBot"</span>
<span class="pl-s1">rules</span> <span class="pl-c1">=</span> (
<span class="pl-v">Rule</span>(<span class="pl-v">LinkExtractor</span>(<span class="pl-s1">deny_domains</span><span class="pl-c1">=</span><span class="pl-s1">deny_domains</span>), <span class="pl-s1">callback</span><span class="pl-c1">=</span><span class="pl-s">'parse_item'</span>, <span class="pl-s1">follow</span><span class="pl-c1">=</span><span class="pl-c1">True</span>),
)
<span class="pl-k">def</span> <span class="pl-en">start_requests</span>(<span class="pl-s1">self</span>):
<span class="pl-c"># Open the seed.csv file.</span>
<span class="pl-s1">seed_path</span> <span class="pl-c1">=</span> <span class="pl-s1">os</span>.<span class="pl-s1">path</span>.<span class="pl-en">dirname</span>(<span class="pl-s1">os</span>.<span class="pl-s1">path</span>.<span class="pl-en">realpath</span>(<span class="pl-s1">__file__</span>)) <span class="pl-c1">+</span> <span class="pl-s">'/seed.csv'</span>
<span class="pl-s1">f</span> <span class="pl-c1">=</span> <span class="pl-en">open</span>(<span class="pl-s1">seed_path</span>)
<span class="pl-s1">csv_rdr</span> <span class="pl-c1">=</span> <span class="pl-s1">csv</span>.<span class="pl-en">reader</span>(<span class="pl-s1">f</span>)
<span class="pl-k">for</span> <span class="pl-s1">row</span> <span class="pl-c1">in</span> <span class="pl-s1">csv_rdr</span>:
<span class="pl-s1">url</span> <span class="pl-c1">=</span> <span class="pl-s">'http://'</span> <span class="pl-c1">+</span> <span class="pl-s1">row</span>[<span class="pl-c1">0</span>].<span class="pl-en">strip</span>()
<span class="pl-k">yield</span> <span class="pl-v">Request</span>(<span class="pl-s1">url</span><span class="pl-c1">=</span><span class="pl-s1">url</span>, <span class="pl-s1">callback</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">parse</span>)
<span class="pl-k">def</span> <span class="pl-en">parse_start_url</span>(<span class="pl-s1">self</span>, <span class="pl-s1">response</span>):
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">parse_item</span>(<span class="pl-s1">response</span>)
<span class="pl-k">def</span> <span class="pl-en">parse_item</span>(<span class="pl-s1">self</span>, <span class="pl-s1">response</span>):
<span class="pl-k">print</span> <span class="pl-s">'!!!!!!!!!!!!! Parsing: %s !!!!!!!!!!!!!'</span> <span class="pl-c1">%</span> <span class="pl-s1">response</span>.<span class="pl-s1">url</span>
<span class="pl-c"># Check the Content-Type.</span>
<span class="pl-k">if</span> <span class="pl-en">is_content_type_ok</span>(<span class="pl-s1">response</span>.<span class="pl-s1">headers</span>.<span class="pl-en">getlist</span>(<span class="pl-s">'Content-Type'</span>)):
<span class="pl-c"># Yield data here</span>
<span class="pl-k">yield</span> {}</pre></div>
<p dir="auto">Here is my <code class="notranslate">settings.py</code> file:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="BOT_NAME = 'MyBot'
SPIDER_MODULES = ['crawler.spiders']
NEWSPIDER_MODULE = 'crawler.spiders'
# Crawl responsibly by identifying yourself (and your website) on the user-agent
USER_AGENT = 'BotTest (+https://test.com)'
# Obey robots.txt rules
ROBOTSTXT_OBEY = True
# Broad crawl settings.
CONCURRENT_REQUESTS = 128
REACTOR_THREADPOOL_MAXSIZE = 30
CONCURRENT_REQUESTS_PER_DOMAIN = 1
CONCURRENT_REQUESTS_PER_IP = 1
COOKIES_ENABLED = False
RETRY_ENABLED = False
DOWNLOAD_TIMEOUT = 3
LOG_LEVEL = 'INFO'
AJAXCRAWL_ENABLED = True
HTTPCACHE_ENABLED = False
LOGSTATS_INTERVAL = 10
# Disable auto throttling.
AUTOTHROTTLE_ENABLED = False
# Set delay.
RANDOMIZE_DOWNLOAD_DELAY = False
DOWNLOAD_DELAY = 2
# Set max download size to 2MB
DOWNLOAD_MAXSIZE = 2 * 1024 * 1024
DOWNLOAD_WARNSIZE = 0
# Set scheduler to BFO.
DEPTH_PRIORITY = 1
SCHEDULER_DISK_QUEUE = 'scrapy.squeues.PickleFifoDiskQueue'
SCHEDULER_MEMORY_QUEUE = 'scrapy.squeues.FifoMemoryQueue'"><pre class="notranslate"><span class="pl-v">BOT_NAME</span> <span class="pl-c1">=</span> <span class="pl-s">'MyBot'</span>
<span class="pl-v">SPIDER_MODULES</span> <span class="pl-c1">=</span> [<span class="pl-s">'crawler.spiders'</span>]
<span class="pl-v">NEWSPIDER_MODULE</span> <span class="pl-c1">=</span> <span class="pl-s">'crawler.spiders'</span>
<span class="pl-c"># Crawl responsibly by identifying yourself (and your website) on the user-agent</span>
<span class="pl-v">USER_AGENT</span> <span class="pl-c1">=</span> <span class="pl-s">'BotTest (+https://test.com)'</span>
<span class="pl-c"># Obey robots.txt rules</span>
<span class="pl-v">ROBOTSTXT_OBEY</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>
<span class="pl-c"># Broad crawl settings.</span>
<span class="pl-v">CONCURRENT_REQUESTS</span> <span class="pl-c1">=</span> <span class="pl-c1">128</span>
<span class="pl-v">REACTOR_THREADPOOL_MAXSIZE</span> <span class="pl-c1">=</span> <span class="pl-c1">30</span>
<span class="pl-v">CONCURRENT_REQUESTS_PER_DOMAIN</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>
<span class="pl-v">CONCURRENT_REQUESTS_PER_IP</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>
<span class="pl-v">COOKIES_ENABLED</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-v">RETRY_ENABLED</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-v">DOWNLOAD_TIMEOUT</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span>
<span class="pl-v">LOG_LEVEL</span> <span class="pl-c1">=</span> <span class="pl-s">'INFO'</span>
<span class="pl-v">AJAXCRAWL_ENABLED</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>
<span class="pl-v">HTTPCACHE_ENABLED</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-v">LOGSTATS_INTERVAL</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span>
<span class="pl-c"># Disable auto throttling.</span>
<span class="pl-v">AUTOTHROTTLE_ENABLED</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-c"># Set delay.</span>
<span class="pl-v">RANDOMIZE_DOWNLOAD_DELAY</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>
<span class="pl-v">DOWNLOAD_DELAY</span> <span class="pl-c1">=</span> <span class="pl-c1">2</span>
<span class="pl-c"># Set max download size to 2MB</span>
<span class="pl-v">DOWNLOAD_MAXSIZE</span> <span class="pl-c1">=</span> <span class="pl-c1">2</span> <span class="pl-c1">*</span> <span class="pl-c1">1024</span> <span class="pl-c1">*</span> <span class="pl-c1">1024</span>
<span class="pl-v">DOWNLOAD_WARNSIZE</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span>
<span class="pl-c"># Set scheduler to BFO.</span>
<span class="pl-v">DEPTH_PRIORITY</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>
<span class="pl-v">SCHEDULER_DISK_QUEUE</span> <span class="pl-c1">=</span> <span class="pl-s">'scrapy.squeues.PickleFifoDiskQueue'</span>
<span class="pl-v">SCHEDULER_MEMORY_QUEUE</span> <span class="pl-c1">=</span> <span class="pl-s">'scrapy.squeues.FifoMemoryQueue'</span></pre></div>
<p dir="auto">And here is example output from a crawl:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$:~/crawler$ scrapy crawl MyBot -s JOBDIR=crawls/crawl-1 -o output.csv -t csv
2017-03-04 22:56:19 [scrapy.utils.log] INFO: Scrapy 1.3.2 started (bot: MyBot)
2017-03-04 22:56:19 [scrapy.utils.log] INFO: Overridden settings: {'FEED_URI': 'output.csv', 'AJAXCRAWL_ENABLED': True, 'COOKIES_ENABLED': False, 'FEED_FORMAT': 'csv', 'DOWNLOAD_DELAY': 2, 'LOG_LEVEL': 'INFO', 'RETRY_ENABLED': False, 'CONCURRENT_REQUESTS_PER_IP': 1, 'DOWNLOAD_TIMEOUT': 3, 'LOGSTATS_INTERVAL': 10, 'DEPTH_PRIORITY': 1, 'SCHEDULER_MEMORY_QUEUE': 'scrapy.squeues.FifoMemoryQueue', 'SCHEDULER_DISK_QUEUE': 'scrapy.squeues.PickleFifoDiskQueue', 'CONCURRENT_REQUESTS': 128, 'RANDOMIZE_DOWNLOAD_DELAY': False, 'DOWNLOAD_WARNSIZE': 0, 'SPIDER_MODULES': ['crawler.spiders'], 'BOT_NAME': 'Bot', 'NEWSPIDER_MODULE': 'crawler.spiders', 'ROBOTSTXT_OBEY': True, 'CONCURRENT_REQUESTS_PER_DOMAIN': 1, 'REACTOR_THREADPOOL_MAXSIZE': 30, 'DOWNLOAD_MAXSIZE': 2097152}
2017-03-04 22:56:19 [scrapy.middleware] INFO: Enabled extensions:
['scrapy.extensions.feedexport.FeedExporter',
'scrapy.extensions.logstats.LogStats',
'scrapy.extensions.telnet.TelnetConsole',
'scrapy.extensions.corestats.CoreStats',
'scrapy.extensions.spiderstate.SpiderState']
2017-03-04 22:56:19 [scrapy.middleware] INFO: Enabled downloader middlewares:
['scrapy.downloadermiddlewares.robotstxt.RobotsTxtMiddleware',
'scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware',
'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware',
'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware',
'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware',
'scrapy.downloadermiddlewares.ajaxcrawl.AjaxCrawlMiddleware',
'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware',
'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware',
'scrapy.downloadermiddlewares.redirect.RedirectMiddleware',
'scrapy.downloadermiddlewares.stats.DownloaderStats']
2017-03-04 22:56:19 [scrapy.middleware] INFO: Enabled spider middlewares:
['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware',
'scrapy.spidermiddlewares.offsite.OffsiteMiddleware',
'scrapy.spidermiddlewares.referer.RefererMiddleware',
'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware',
'scrapy.spidermiddlewares.depth.DepthMiddleware']
2017-03-04 22:56:19 [scrapy.middleware] INFO: Enabled item pipelines:
[]
2017-03-04 22:56:19 [scrapy.core.engine] INFO: Spider opened
2017-03-04 22:56:19 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
!!!!!!!!!!!!! Parsing: http://imgur.com !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://api.imgur.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://www.sina.com.cn/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://twitter.com/imgur !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://www.msn.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://www.ask.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://www.apple.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://www.bbc.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://www.adobe.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://wordpress.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://www.tumblr.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://www.reddit.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://www.yahoo.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://www.imdb.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://www.aliexpress.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://www.youtube.com/ !!!!!!!!!!!!!
... seconds later ...
!!!!!!!!!!!!! Parsing: https://www.paypal.com/us/home !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://stackoverflow.blog/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://www.amazon.co.jp/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/privacy !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/tags !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=13&ct=1488668190&rver=6.4.6456.0&wp=MBI_SSL_SHARED&wreply=https:%2F%2Fmail.live.com%2Fdefault.aspx%3Frru%3Dinbox&lc=1033&id=64855&mkt=en-US&cbcxt=mai !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/upload !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/vidgif !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackexchange.com/sites !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/tour !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/memegen !!!!!!!!!!!!!
2017-03-04 22:56:39 [scrapy.extensions.logstats] INFO: Crawled 165 pages (at 90 pages/min), scraped 19 items (at 36 items/min)
!!!!!!!!!!!!! Parsing: http://meta.stackoverflow.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://imgur.com/signin?invokedBy=regularSignIn !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: https://imgur.com/register?invokedBy=regularSignIn !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/help !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/company/about !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/hot/viral !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackexchange.com/ !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/new/viral !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/?tab=interesting !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/t/Funny !!!!!!!!!!!!!
2017-03-04 22:56:49 [scrapy.extensions.logstats] INFO: Crawled 175 pages (at 60 pages/min), scraped 25 items (at 36 items/min)
!!!!!!!!!!!!! Parsing: http://imgur.com/t/The_More_You_Know !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/?tab=featured !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/t/Science_and_Tech !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/?tab=hot !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/t/Gaming !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/?tab=week !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/?tab=month !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/t/Eat_What_You_Want !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/questions/42602342/java-unlimited-cryptography-extension-doesnt-work !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/t/Aww !!!!!!!!!!!!!
2017-03-04 22:56:59 [scrapy.extensions.logstats] INFO: Crawled 185 pages (at 60 pages/min), scraped 42 items (at 102 items/min)
!!!!!!!!!!!!! Parsing: http://imgur.com/t/Inspiring !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/questions/tagged/authentication !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/questions/tagged/hdfs !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/t/Awesome !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/questions/tagged/kerberos !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/t/Creativity !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/questions/tagged/jce !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/t/The_Great_Outdoors !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://imgur.com/t/Storytime !!!!!!!!!!!!!
!!!!!!!!!!!!! Parsing: http://stackoverflow.com/users/3593261/user3593261 !!!!!!!!!!!!!
2017-03-04 22:57:09 [scrapy.extensions.logstats] INFO: Crawled 195 pages (at 60 pages/min), scraped 48 items (at 36 items/min)"><pre class="notranslate">$:<span class="pl-k">~</span>/crawler$ scrapy crawl MyBot -s JOBDIR=crawls/crawl-1 -o output.csv -t csv
2017-03-04 22:56:19 [scrapy.utils.log] INFO: Scrapy 1.3.2 started (bot: MyBot)
2017-03-04 22:56:19 [scrapy.utils.log] INFO: Overridden settings: {<span class="pl-s"><span class="pl-pds">'</span>FEED_URI<span class="pl-pds">'</span></span>: <span class="pl-s"><span class="pl-pds">'</span>output.csv<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>AJAXCRAWL_ENABLED<span class="pl-pds">'</span></span>: True, <span class="pl-s"><span class="pl-pds">'</span>COOKIES_ENABLED<span class="pl-pds">'</span></span>: False, <span class="pl-s"><span class="pl-pds">'</span>FEED_FORMAT<span class="pl-pds">'</span></span>: <span class="pl-s"><span class="pl-pds">'</span>csv<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>DOWNLOAD_DELAY<span class="pl-pds">'</span></span>: 2, <span class="pl-s"><span class="pl-pds">'</span>LOG_LEVEL<span class="pl-pds">'</span></span>: <span class="pl-s"><span class="pl-pds">'</span>INFO<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>RETRY_ENABLED<span class="pl-pds">'</span></span>: False, <span class="pl-s"><span class="pl-pds">'</span>CONCURRENT_REQUESTS_PER_IP<span class="pl-pds">'</span></span>: 1, <span class="pl-s"><span class="pl-pds">'</span>DOWNLOAD_TIMEOUT<span class="pl-pds">'</span></span>: 3, <span class="pl-s"><span class="pl-pds">'</span>LOGSTATS_INTERVAL<span class="pl-pds">'</span></span>: 10, <span class="pl-s"><span class="pl-pds">'</span>DEPTH_PRIORITY<span class="pl-pds">'</span></span>: 1, <span class="pl-s"><span class="pl-pds">'</span>SCHEDULER_MEMORY_QUEUE<span class="pl-pds">'</span></span>: <span class="pl-s"><span class="pl-pds">'</span>scrapy.squeues.FifoMemoryQueue<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>SCHEDULER_DISK_QUEUE<span class="pl-pds">'</span></span>: <span class="pl-s"><span class="pl-pds">'</span>scrapy.squeues.PickleFifoDiskQueue<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>CONCURRENT_REQUESTS<span class="pl-pds">'</span></span>: 128, <span class="pl-s"><span class="pl-pds">'</span>RANDOMIZE_DOWNLOAD_DELAY<span class="pl-pds">'</span></span>: False, <span class="pl-s"><span class="pl-pds">'</span>DOWNLOAD_WARNSIZE<span class="pl-pds">'</span></span>: 0, <span class="pl-s"><span class="pl-pds">'</span>SPIDER_MODULES<span class="pl-pds">'</span></span>: [<span class="pl-s"><span class="pl-pds">'</span>crawler.spiders<span class="pl-pds">'</span></span>], <span class="pl-s"><span class="pl-pds">'</span>BOT_NAME<span class="pl-pds">'</span></span>: <span class="pl-s"><span class="pl-pds">'</span>Bot<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>NEWSPIDER_MODULE<span class="pl-pds">'</span></span>: <span class="pl-s"><span class="pl-pds">'</span>crawler.spiders<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>ROBOTSTXT_OBEY<span class="pl-pds">'</span></span>: True, <span class="pl-s"><span class="pl-pds">'</span>CONCURRENT_REQUESTS_PER_DOMAIN<span class="pl-pds">'</span></span>: 1, <span class="pl-s"><span class="pl-pds">'</span>REACTOR_THREADPOOL_MAXSIZE<span class="pl-pds">'</span></span>: 30, <span class="pl-s"><span class="pl-pds">'</span>DOWNLOAD_MAXSIZE<span class="pl-pds">'</span></span>: 2097152}
2017-03-04 22:56:19 [scrapy.middleware] INFO: Enabled extensions:
[<span class="pl-s"><span class="pl-pds">'</span>scrapy.extensions.feedexport.FeedExporter<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.extensions.logstats.LogStats<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.extensions.telnet.TelnetConsole<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.extensions.corestats.CoreStats<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.extensions.spiderstate.SpiderState<span class="pl-pds">'</span></span>]
2017-03-04 22:56:19 [scrapy.middleware] INFO: Enabled downloader middlewares:
[<span class="pl-s"><span class="pl-pds">'</span>scrapy.downloadermiddlewares.robotstxt.RobotsTxtMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.downloadermiddlewares.useragent.UserAgentMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.downloadermiddlewares.ajaxcrawl.AjaxCrawlMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.downloadermiddlewares.redirect.RedirectMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.downloadermiddlewares.stats.DownloaderStats<span class="pl-pds">'</span></span>]
2017-03-04 22:56:19 [scrapy.middleware] INFO: Enabled spider middlewares:
[<span class="pl-s"><span class="pl-pds">'</span>scrapy.spidermiddlewares.httperror.HttpErrorMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.spidermiddlewares.offsite.OffsiteMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.spidermiddlewares.referer.RefererMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.spidermiddlewares.urllength.UrlLengthMiddleware<span class="pl-pds">'</span></span>,
<span class="pl-s"><span class="pl-pds">'</span>scrapy.spidermiddlewares.depth.DepthMiddleware<span class="pl-pds">'</span></span>]
2017-03-04 22:56:19 [scrapy.middleware] INFO: Enabled item pipelines:
[]
2017-03-04 22:56:19 [scrapy.core.engine] INFO: Spider opened
2017-03-04 22:56:19 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://api.imgur.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://www.sina.com.cn/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://twitter.com/imgur <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://www.msn.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://www.ask.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://www.apple.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://www.bbc.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://www.adobe.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://wordpress.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://www.tumblr.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://www.reddit.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://www.yahoo.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://www.imdb.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://www.aliexpress.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://www.youtube.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
... seconds later ...
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://www.paypal.com/us/home <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://stackoverflow.blog/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://www.amazon.co.jp/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/privacy <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/tags <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://login.live.com/login.srf<span class="pl-k">?</span>wa=wsignin1.0<span class="pl-k">&</span>rpsnv=13<span class="pl-k">&</span>ct=1488668190<span class="pl-k">&</span>rver=6.4.6456.0<span class="pl-k">&</span>wp=MBI_SSL_SHARED<span class="pl-k">&</span>wreply=https:%2F%2Fmail.live.com%2Fdefault.aspx%3Frru%3Dinbox<span class="pl-k">&</span>lc=1033<span class="pl-k">&</span>id=64855<span class="pl-k">&</span>mkt=en-US<span class="pl-k">&</span>cbcxt=mai <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/upload <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/vidgif <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackexchange.com/sites <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/tour <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/memegen <span class="pl-k">!!!!!!!!!!!!!</span>
2017-03-04 22:56:39 [scrapy.extensions.logstats] INFO: Crawled 165 pages (at 90 pages/min), scraped 19 items (at 36 items/min)
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://meta.stackoverflow.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://imgur.com/signin<span class="pl-k">?</span>invokedBy=regularSignIn <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: https://imgur.com/register<span class="pl-k">?</span>invokedBy=regularSignIn <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/help <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/company/about <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/hot/viral <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackexchange.com/ <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/new/viral <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/<span class="pl-k">?</span>tab=interesting <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/Funny <span class="pl-k">!!!!!!!!!!!!!</span>
2017-03-04 22:56:49 [scrapy.extensions.logstats] INFO: Crawled 175 pages (at 60 pages/min), scraped 25 items (at 36 items/min)
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/The_More_You_Know <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/<span class="pl-k">?</span>tab=featured <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/Science_and_Tech <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/<span class="pl-k">?</span>tab=hot <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/Gaming <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/<span class="pl-k">?</span>tab=week <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/<span class="pl-k">?</span>tab=month <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/Eat_What_You_Want <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/questions/42602342/java-unlimited-cryptography-extension-doesnt-work <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/Aww <span class="pl-k">!!!!!!!!!!!!!</span>
2017-03-04 22:56:59 [scrapy.extensions.logstats] INFO: Crawled 185 pages (at 60 pages/min), scraped 42 items (at 102 items/min)
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/Inspiring <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/questions/tagged/authentication <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/questions/tagged/hdfs <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/Awesome <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/questions/tagged/kerberos <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/Creativity <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/questions/tagged/jce <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/The_Great_Outdoors <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://imgur.com/t/Storytime <span class="pl-k">!!!!!!!!!!!!!</span>
<span class="pl-k">!!!!!!!!!!!!!</span> Parsing: http://stackoverflow.com/users/3593261/user3593261 <span class="pl-k">!!!!!!!!!!!!!</span>
2017-03-04 22:57:09 [scrapy.extensions.logstats] INFO: Crawled 195 pages (at 60 pages/min), scraped 48 items (at 36 items/min)</pre></div>
<p dir="auto">Thanks, let me know if you need any other information!</p> | <p dir="auto">We need to add a deployment section to the documentation covering scrapyd-deploy.</p> | 0 |
<ul dir="auto">
<li>VSCode Version: 1.0.1-insider (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/85f337ee0851a464d5459ce9a354d05f94f0b9a4/hovercard" href="https://github.com/microsoft/vscode/commit/85f337ee0851a464d5459ce9a354d05f94f0b9a4"><tt>85f337e</tt></a>)</li>
<li>OS Version: OS X 10.11.4 (15E65)</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Have code open with git enabled on a repository (in particular, I'm working with @mozilla/gecko-dev)</li>
<li>Do a <code class="notranslate">git rebase -i</code> that will take a while (my case had 11 commits that I was squashing into 1)</li>
</ol>
<p dir="auto">A few times during the rebase, my rebase stopped because it couldn't create index.lock, saying it already existed. If I then did <code class="notranslate">git rebase --continue</code> things would carry on. (FTR, git also totally messed up the squashing in this case, but that's a git bug, not a code bug.) I realized that code's git integration was interfering with my rebase, quit code, <code class="notranslate">git reset --hard</code> to the original commit, and redid my rebase, and everything worked fine. My best guess is that the periodic <code class="notranslate">git status</code> (or similar) that code does was racing with the various commits of <code class="notranslate">git rebase</code>, and when code won, it would mess up the rebase. Code should probably avoid updating its internal knowledge of the working directory status while a rebase (or similar) is running. (Not sure if that's entirely possible, but it's at least something to think about.)</p> | <p dir="auto">Several times now I've had mysteriously deleted files when doing a git pull in a console while Visual Studio Code is running. I've seen this roughly since version 0.10.</p>
<p dir="auto">It seems that when auto-merging, Git is able to delete a file but not able to write the merged file back if it's open in Code. However that is just a hypothesis.</p>
<p dir="auto">Seen the issue last with git version 1.9.5.msysgit.1 and Code 0.10.2.</p> | 1 |
<p dir="auto">The second one looks like a duplicate of 2.0.0-alpha.33 (2015-07-30).</p> | <p dir="auto">I just ran through the demo for Dart here:</p>
<p dir="auto"><a href="https://angular.io/docs/dart/latest/quickstart.html" rel="nofollow">https://angular.io/docs/dart/latest/quickstart.html</a></p>
<ul dir="auto">
<li>Running through the built in Dart2JS transformer via pub serve results in a 5.2 MB main.dart.js file</li>
<li>Running through pub build results in a 2.5 MB main.dart.js file</li>
</ul> | 0 |
<p dir="auto">In language-javascript/snippets, there's an "f" snippet for an anonymous function, and language-todo/snippets has "fix" for a "fix me" comment. To see this:</p>
<ol dir="auto">
<li>Open a javascript file</li>
<li>Type "f"</li>
</ol>
<p dir="auto">The former should be offered as the first suggestion, as it's the best match, but instead it appears 6th on the list, behind fix, for, forin, forof and fun.</p> | <p dir="auto">When writing javascript code a common snippet is <code class="notranslate">f</code> that expands into an anonymous function.<br>
However if I type <code class="notranslate">f</code> the topmost and selected suggestion is <code class="notranslate">fix</code>. And the <code class="notranslate">f</code> snippet is number 6 in the list. If I was looking for <code class="notranslate">fix</code> I could add the letter 'i' to select that one however as <code class="notranslate">f</code> is the whole snippet trigger I am forced to press down 5 times to select it.</p>
<p dir="auto">When returning the list of suggestions it should be sorted so it puts exact matches to the top.</p> | 1 |
<p dir="auto">When you have a one page site, and the navbar is collapsed (e.g. on an iPhone),<br>
the 3-line collapse button is shown. Excellent.<br>
When you then click that button, the menu pops open. Good.</p>
<p dir="auto">If you then click one of the menu items, the 'jump' happens, but the menu does not collapse. Remember, it's a one page site, so the link refers to another location on the same page (#-link).<br>
The user now has to click the 3-line collapse button again to close the menu.</p>
<p dir="auto">Maybe it's easy to correct (by me), but if not, I hope you can fix it.</p>
<p dir="auto">For an example (still based on bootstrap 2.3, because it's a live site):<br>
<a href="Http://www.penumbragroup.com" rel="nofollow">Http://www.penumbragroup.com</a></p> | <p dir="auto">When writing a single-page application using Bootstrap's navbar, we quickly found out that we need a way to collapse the menu whenever any of the links are pressed.</p>
<p dir="auto">The naive solution seemed to be to attach the following to every link:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="data-toggle="collapse" data-target=".navbar-responsive-collapse""><pre class="notranslate"><code class="notranslate">data-toggle="collapse" data-target=".navbar-responsive-collapse"
</code></pre></div>
<p dir="auto">However, while this works fine when the screen is narrow and the navbar needs to be collapsed, it causes some very strange side-effects when the screen is "tablet" or "desktop" sized. On some browsers (IE and Firefox), repeated clicks cause the contents of the navbar to disappear completely.</p>
<p dir="auto">While it should be possible to deal with this issue by writing custom JS in the App, I think it would be much better if the App generally doesn't need to deal with it at all.</p>
<p dir="auto">I've created a JsFiddle, <a href="http://jsfiddle.net/dlpatri/SjSfh/" rel="nofollow">showing the problem</a>.</p>
<p dir="auto">As an interim solution, I've added the following to Collapse's Data-Api on my local copy:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$(document).on('click.bs.collapse.data-api', '[data-hide=collapse]', function (e) {
var $this = $(this), href
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
var $target = $(target)
if ($target.hasClass('in')) {
$target.collapse('hide');
}
})"><pre class="notranslate"><code class="notranslate">$(document).on('click.bs.collapse.data-api', '[data-hide=collapse]', function (e) {
var $this = $(this), href
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
var $target = $(target)
if ($target.hasClass('in')) {
$target.collapse('hide');
}
})
</code></pre></div>
<p dir="auto">It's based on the <em>[data-toggle=collapse]</em> listener, but without support for accordion views. The key element is checking to see whether or not the navbar <em>can</em> be collapsed before collapsing it.</p>
<p dir="auto">I'm hoping that something like this could be added to the Bootstrap Collapse API, or if we could just get the normal toggle listener to include more checks before toggling.</p>
<p dir="auto">Thanks.</p> | 1 |
<p dir="auto">The content of a pane/buffer that hasn't been saved to a file will dissapear after moving the pane to another place (in split-mode).</p>
<p dir="auto">Video: <a href="http://youtu.be/Mp2R8vqFUdY" rel="nofollow">http://youtu.be/Mp2R8vqFUdY</a></p> | <p dir="auto">I have my screen in split view (2 panes) and, when changing a tab from 1 pane to the other the file doesn't seem to show, after I switch tabs the content of the file show, there aren't errors in the developer tools. And a gif is included to demostrate the bug in <code class="notranslate">atom --safe</code><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1993929/4965892/8fef5ce4-679c-11e4-9a8a-a203c03493da.gif"><img src="https://cloud.githubusercontent.com/assets/1993929/4965892/8fef5ce4-679c-11e4-9a8a-a203c03493da.gif" alt="change editor of pane" data-animated-image="" style="max-width: 100%;"></a></p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.<br>
yes</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.<br>
yes</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.2</li>
<li>Operating System version: centos6.2</li>
<li>Java version: jdk1.8.0_152</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>when upgrade from dubbo2.5.4 to dubbo2.6.2</li>
<li>use hessian:// with large payload</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps?<br>
return result success</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?<br>
rpc error<br>
If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method downloadBytes in the service com.warehouse.api.facade.WarehouseFacade. Tried 3 times of
the providers [10.143.5.4:57994, 10.143.5.6:57994, 10.143.5.5:57994] (3/3) from the registry dubbo-zk1.finance.qihoo.com:2181 on the consumer 10.143.5.53 using t
he dubbo version 2.6.2. Last error is: Failed to invoke remote service: interface com.warehouse.api.facade.WarehouseFacade, method: downloadBytes, ca
use: 413: java.io.IOException: Server returned HTTP response code: 413 for URL: http://10.143.5.6:57994/com.warehouse.api.facade.WarehouseFacade?Serve
rApplicationName=warehouse-app&anyhost=true&application=gws-app&check=false&default.check=false&default.delay=-1&default.payload=52428800&default.reference.filter=-e
xception&default.service.filter=-exception&default.timeout=5000&delay=-1&dubbo=2.5.4-RELEASE&generic=false&interface=com.warehouse.api.facade.Warehou
seFacade&methods=download,downloadBytes,downloadBytesBatch,upload,buildUrlForOpenFile,getPathForOpenFile,zipCompress,uploadBytes,zipCompressByPassword&organization=720&owner=720loan&payload=157286400&pid=22932&protocol=hessian&qos.enable=false&register.ip=10.143.5.53&remote.timestamp=1541681653305&revision=0.0.2-RELEASE&server=j
etty&side=consumer&timeout=2000&timestamp=1542291054639
at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:109) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:238) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:75) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.common.bytecode.proxy23.downloadBytes(proxy23.java) ~[dubbo-2.6.2.jar:2.6.2]
at com.gws.common.warehouse.util.FileUploadUtils.downloadFileByWarehouse(FileUploadUtils.java:111) [gws-app-2.18.0-RELEASE.jar:?]
at com.gws.common.warehouse.util.FileUploadUtils.multiDownloadFile(FileUploadUtils.java:91) [gws-app-2.18.0-RELEASE.jar:?]
at com.gws.modules.face.FaceOcrFacadeImpl.faceOcrIdCard(FaceOcrFacadeImpl.java:50) [gws-app-2.18.0-RELEASE.jar:?]
at com.gws.modules.face.FaceOcrFacadeImpl.recognizeOcrIdcard(FaceOcrFacadeImpl.java:113) [gws-app-2.18.0-RELEASE.jar:?]
at com.alibaba.dubbo.common.bytecode.Wrapper38.invokeMethod(Wrapper38.java) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:76) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:52) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56) [dubbo-2.6.2.jar:2.6.2]
at com.msf.core.dubbo.filter.ExceptionFilter.invoke(ExceptionFilter.java:30) [msf-core-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:42) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:78) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.msf.app.filter.ProviderRejectServiceFilter.invoke(ProviderRejectServiceFilter.java:78) [msf-app-framework-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.msf.app.filter.MsfExecuteLimitFilter.invoke(MsfExecuteLimitFilter.java:60) [msf-app-framework-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.msf.core.dubbo.filter.MsfExceptionFilter.invoke(MsfExceptionFilter.java:31) [msf-core-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.msf.core.dubbo.filter.ProviderContextFilter.invoke(ProviderContextFilter.java:57) [msf-core-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.msf.plus.cat.dubbo.CatTransaction.invoke(CatTransaction.java:67) [msf-plus-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:138) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:38) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:103) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:96) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:172) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:80) [dubbo-2.6.2.jar:2.6.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
Caused by: com.caucho.hessian.client.HessianConnectionException: 413: java.io.IOException: Server returned HTTP response code: 413 for URL: http://10.143.5.6:57994/com.warehouse.api.facade.WarehouseFacade?ServerApplicationName=warehouse-app&anyhost=true&application=gws-app&check=false&default.check=false&default.delay=-1&default.payload=52428800&default.reference.filter=-exception&default.service.filter=-exception&default.timeout=5000&delay=-1&dubbo=2.5.4-RELEASE&generic=false&interface=com.warehouse.api.facade.WarehouseFacade&methods=download,downloadBytes,downloadBytesBatch,upload,buildUrlForOpenFile,getPathForOpenFile,zipCompress,uploadBytes,zipCompressByPassword&organization=720&owner=720loan&payload=157286400&pid=22932&protocol=hessian&qos.enable=false&register.ip=10.143.5.53&remote.timestamp=1541681653305&revision=0.0.2-RELEASE&server=jetty&side=consumer&timeout=2000&timestamp=1542291054639
at com.caucho.hessian.client.HessianURLConnection.sendRequest(HessianURLConnection.java:142) ~[hessian-4.0.7.jar:?]
at com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:283) ~[hessian-4.0.7.jar:?]
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:170) ~[hessian-4.0.7.jar:?]
at com.sun.proxy.$Proxy69.downloadBytes(Unknown Source) ~[?:?]
at com.alibaba.dubbo.common.bytecode.Wrapper22.invokeMethod(Wrapper22.java) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:76) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol$2.doInvoke(AbstractProxyProtocol.java:97) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:148) ~[dubbo-2.6.2.jar:2.6.2]
at com.msf.plus.cat.dubbo.AppNameAppendFilter.invoke(AppNameAppendFilter.java:16) ~[msf-plus-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.msf.hystrix.filter.HystrixFilter.invoke(HystrixFilter.java:51) ~[msf-hystrix-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:54) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.msf.core.dubbo.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:81) ~[msf-core-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.msf.plus.cat.dubbo.CatTransaction.invoke(CatTransaction.java:67) ~[msf-plus-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:77) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:78) ~[dubbo-2.6.2.jar:2.6.2]
... 47 more"><pre class="notranslate"><code class="notranslate">com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method downloadBytes in the service com.warehouse.api.facade.WarehouseFacade. Tried 3 times of
the providers [10.143.5.4:57994, 10.143.5.6:57994, 10.143.5.5:57994] (3/3) from the registry dubbo-zk1.finance.qihoo.com:2181 on the consumer 10.143.5.53 using t
he dubbo version 2.6.2. Last error is: Failed to invoke remote service: interface com.warehouse.api.facade.WarehouseFacade, method: downloadBytes, ca
use: 413: java.io.IOException: Server returned HTTP response code: 413 for URL: http://10.143.5.6:57994/com.warehouse.api.facade.WarehouseFacade?Serve
rApplicationName=warehouse-app&anyhost=true&application=gws-app&check=false&default.check=false&default.delay=-1&default.payload=52428800&default.reference.filter=-e
xception&default.service.filter=-exception&default.timeout=5000&delay=-1&dubbo=2.5.4-RELEASE&generic=false&interface=com.warehouse.api.facade.Warehou
seFacade&methods=download,downloadBytes,downloadBytesBatch,upload,buildUrlForOpenFile,getPathForOpenFile,zipCompress,uploadBytes,zipCompressByPassword&organization=720&owner=720loan&payload=157286400&pid=22932&protocol=hessian&qos.enable=false&register.ip=10.143.5.53&remote.timestamp=1541681653305&revision=0.0.2-RELEASE&server=j
etty&side=consumer&timeout=2000&timestamp=1542291054639
at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:109) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:238) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:75) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.common.bytecode.proxy23.downloadBytes(proxy23.java) ~[dubbo-2.6.2.jar:2.6.2]
at com.gws.common.warehouse.util.FileUploadUtils.downloadFileByWarehouse(FileUploadUtils.java:111) [gws-app-2.18.0-RELEASE.jar:?]
at com.gws.common.warehouse.util.FileUploadUtils.multiDownloadFile(FileUploadUtils.java:91) [gws-app-2.18.0-RELEASE.jar:?]
at com.gws.modules.face.FaceOcrFacadeImpl.faceOcrIdCard(FaceOcrFacadeImpl.java:50) [gws-app-2.18.0-RELEASE.jar:?]
at com.gws.modules.face.FaceOcrFacadeImpl.recognizeOcrIdcard(FaceOcrFacadeImpl.java:113) [gws-app-2.18.0-RELEASE.jar:?]
at com.alibaba.dubbo.common.bytecode.Wrapper38.invokeMethod(Wrapper38.java) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:76) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:52) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56) [dubbo-2.6.2.jar:2.6.2]
at com.msf.core.dubbo.filter.ExceptionFilter.invoke(ExceptionFilter.java:30) [msf-core-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:42) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:78) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.msf.app.filter.ProviderRejectServiceFilter.invoke(ProviderRejectServiceFilter.java:78) [msf-app-framework-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.msf.app.filter.MsfExecuteLimitFilter.invoke(MsfExecuteLimitFilter.java:60) [msf-app-framework-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.msf.core.dubbo.filter.MsfExceptionFilter.invoke(MsfExceptionFilter.java:31) [msf-core-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.msf.core.dubbo.filter.ProviderContextFilter.invoke(ProviderContextFilter.java:57) [msf-core-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.msf.plus.cat.dubbo.CatTransaction.invoke(CatTransaction.java:67) [msf-plus-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:138) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:38) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:103) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:96) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:172) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51) [dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:80) [dubbo-2.6.2.jar:2.6.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
Caused by: com.caucho.hessian.client.HessianConnectionException: 413: java.io.IOException: Server returned HTTP response code: 413 for URL: http://10.143.5.6:57994/com.warehouse.api.facade.WarehouseFacade?ServerApplicationName=warehouse-app&anyhost=true&application=gws-app&check=false&default.check=false&default.delay=-1&default.payload=52428800&default.reference.filter=-exception&default.service.filter=-exception&default.timeout=5000&delay=-1&dubbo=2.5.4-RELEASE&generic=false&interface=com.warehouse.api.facade.WarehouseFacade&methods=download,downloadBytes,downloadBytesBatch,upload,buildUrlForOpenFile,getPathForOpenFile,zipCompress,uploadBytes,zipCompressByPassword&organization=720&owner=720loan&payload=157286400&pid=22932&protocol=hessian&qos.enable=false&register.ip=10.143.5.53&remote.timestamp=1541681653305&revision=0.0.2-RELEASE&server=jetty&side=consumer&timeout=2000&timestamp=1542291054639
at com.caucho.hessian.client.HessianURLConnection.sendRequest(HessianURLConnection.java:142) ~[hessian-4.0.7.jar:?]
at com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:283) ~[hessian-4.0.7.jar:?]
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:170) ~[hessian-4.0.7.jar:?]
at com.sun.proxy.$Proxy69.downloadBytes(Unknown Source) ~[?:?]
at com.alibaba.dubbo.common.bytecode.Wrapper22.invokeMethod(Wrapper22.java) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:76) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol$2.doInvoke(AbstractProxyProtocol.java:97) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:148) ~[dubbo-2.6.2.jar:2.6.2]
at com.msf.plus.cat.dubbo.AppNameAppendFilter.invoke(AppNameAppendFilter.java:16) ~[msf-plus-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.msf.hystrix.filter.HystrixFilter.invoke(HystrixFilter.java:51) ~[msf-hystrix-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:54) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.msf.core.dubbo.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:81) ~[msf-core-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.msf.plus.cat.dubbo.CatTransaction.invoke(CatTransaction.java:67) ~[msf-plus-2.8.6.2-RELEASE.jar:?]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:72) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:77) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56) ~[dubbo-2.6.2.jar:2.6.2]
at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:78) ~[dubbo-2.6.2.jar:2.6.2]
... 47 more
</code></pre></div> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.6</li>
<li>Operating System version: ubuntu 16.04.5</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>服务端设置服务的超时时间100ms</li>
<li>客户端发送请求。</li>
<li>xxx</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">发送请求在设置的超时时间内超时。</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">在某些情况下会有异常超时如下。实际elapse时间超过设置timeout。</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
Caused by: com.alibaba.dubbo.remoting.TimeoutException: Sending request timeout in client-side. start time: 2019-08-02 20:19:14.066, end time: 2019-08-02 20:19:52.800, elapsed: 38734 ms, timeout: 100 ms, request: Request [id=26284376, version=2.0.2, twoway=true, event=false, broken=false,"><pre class="notranslate"><code class="notranslate">
Caused by: com.alibaba.dubbo.remoting.TimeoutException: Sending request timeout in client-side. start time: 2019-08-02 20:19:14.066, end time: 2019-08-02 20:19:52.800, elapsed: 38734 ms, timeout: 100 ms, request: Request [id=26284376, version=2.0.2, twoway=true, event=false, broken=false,
</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.7.1</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">There is a problem when invoking apt with variables.<br>
When the variables are inside an argument, it gives an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Install chromium browser
apt: deb=/root/{{item}}.deb
when: ansible_architecture in ['armv7l']
with_items:
- chromium-inspector
- chromium-browser"><pre class="notranslate"><code class="notranslate">- name: Install chromium browser
apt: deb=/root/{{item}}.deb
when: ansible_architecture in ['armv7l']
with_items:
- chromium-inspector
- chromium-browser
</code></pre></div>
<p dir="auto">Fails:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [gui | Install chromium browser] ****************************************
fatal: [7c669d537a3e] => failed to parse: Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1409662082.8-144889871942361/apt", line 1907, in <module>
main()
File "/root/.ansible/tmp/ansible-tmp-1409662082.8-144889871942361/apt", line 523, in main
force=force_yes, dpkg_options=p['dpkg_options'])
File "/root/.ansible/tmp/ansible-tmp-1409662082.8-144889871942361/apt", line 299, in install_deb
pkg = apt.debfile.DebPackage(deb_file)
File "/usr/lib/python2.7/dist-packages/apt/debfile.py", line 57, in __init__
self.open(filename)
File "/usr/lib/python2.7/dist-packages/apt/debfile.py", line 66, in open
self._debfile = apt_inst.DebFile(self.filename)
SystemError: E:Could not open file /root/chromium-inspector - open (2: No such file or directory), E:Unable to determine the file size - fstat (9: Bad file descriptor), E:Read error - read (9: Bad file descriptor)
FATAL: all hosts have already failed -- aborting"><pre class="notranslate"><code class="notranslate">TASK: [gui | Install chromium browser] ****************************************
fatal: [7c669d537a3e] => failed to parse: Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1409662082.8-144889871942361/apt", line 1907, in <module>
main()
File "/root/.ansible/tmp/ansible-tmp-1409662082.8-144889871942361/apt", line 523, in main
force=force_yes, dpkg_options=p['dpkg_options'])
File "/root/.ansible/tmp/ansible-tmp-1409662082.8-144889871942361/apt", line 299, in install_deb
pkg = apt.debfile.DebPackage(deb_file)
File "/usr/lib/python2.7/dist-packages/apt/debfile.py", line 57, in __init__
self.open(filename)
File "/usr/lib/python2.7/dist-packages/apt/debfile.py", line 66, in open
self._debfile = apt_inst.DebFile(self.filename)
SystemError: E:Could not open file /root/chromium-inspector - open (2: No such file or directory), E:Unable to determine the file size - fstat (9: Bad file descriptor), E:Read error - read (9: Bad file descriptor)
FATAL: all hosts have already failed -- aborting
</code></pre></div>
<p dir="auto">(note the missing .deb at the end of the filename)</p>
<p dir="auto">Whereas:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Install chromium browser
apt: deb=/root/{{item}}
when: ansible_architecture in ['armv7l']
with_items:
- chromium-inspector.deb
- chromium-browser.deb"><pre class="notranslate"><code class="notranslate">- name: Install chromium browser
apt: deb=/root/{{item}}
when: ansible_architecture in ['armv7l']
with_items:
- chromium-inspector.deb
- chromium-browser.deb
</code></pre></div>
<p dir="auto">(note moving the .deb filenames inside the array rather than after the variable on the deb argument)</p>
<p dir="auto">Succeeds.<br>
There should NOT be any difference between the runs.<br>
When trying to find out if it is caused by whitespace I did:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Install chromium browser
shell: echo deb=/root/{{item}}.deb
when: ansible_architecture in ['armv7l']
with_items:
- chromium-inspector
- chromium-browser"><pre class="notranslate"><code class="notranslate">- name: Install chromium browser
shell: echo deb=/root/{{item}}.deb
when: ansible_architecture in ['armv7l']
with_items:
- chromium-inspector
- chromium-browser
</code></pre></div>
<p dir="auto">Which resulted in:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="changed: [7c669d537a3e] => (item=chromium-inspector) => {"changed": true, "cmd": "echo deb=/root/chromium-inspector.deb", "delta": "0:00:00.035228", "end": "2014-09-02 12:48:54.123722", "item": "chromium-inspector", "rc": 0, "start": "2014-09-02 12:48:54.088494", "stderr": "", "stdout": "deb=/root/chromium-inspector.deb"}
changed: [7c669d537a3e] => (item=chromium-browser) => {"changed": true, "cmd": "echo deb=/root/chromium-browser.deb", "delta": "0:00:00.017942", "end": "2014-09-02 12:48:56.467385", "item": "chromium-browser", "rc": 0, "start": "2014-09-02 12:48:56.449443", "stderr": "", "stdout": "deb=/root/chromium-browser.deb"}"><pre class="notranslate"><code class="notranslate">changed: [7c669d537a3e] => (item=chromium-inspector) => {"changed": true, "cmd": "echo deb=/root/chromium-inspector.deb", "delta": "0:00:00.035228", "end": "2014-09-02 12:48:54.123722", "item": "chromium-inspector", "rc": 0, "start": "2014-09-02 12:48:54.088494", "stderr": "", "stdout": "deb=/root/chromium-inspector.deb"}
changed: [7c669d537a3e] => (item=chromium-browser) => {"changed": true, "cmd": "echo deb=/root/chromium-browser.deb", "delta": "0:00:00.017942", "end": "2014-09-02 12:48:56.467385", "item": "chromium-browser", "rc": 0, "start": "2014-09-02 12:48:56.449443", "stderr": "", "stdout": "deb=/root/chromium-browser.deb"}
</code></pre></div>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">See above.</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">No difference between the runs</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">Fails when .deb is in the argument line, Succeeds when inside the array.</p> | <p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jsnshrmn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jsnshrmn">@jsnshrmn</a> on 2016-06-17T15:03:20Z</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">lineinfile</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.1.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">Bone stock</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">CentOS 7</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When lineinfile with regexp finds a match, it substitutes properly. When it doesn't find a match (say, on subsequent runs), it just dumps the specified line at the bottom of the file as if you hadn't specified a regexp. Needless to say, this breaks idempotence.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<ol dir="auto">
<li>Take a look at a file.</li>
<li>Run lineinfile with regexp that matches a line</li>
<li>See that your line was in fact replaced.</li>
<li>Run lineinfile again.</li>
<li>See that the specified replacement line is now duplicated at the bottom of the file.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Add ops scripts to sudo secure_path
lineinfile:
dest: /etc/sudoers
regexp: >
^Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin$
line: 'Defaults secure_path = /opt/d7/bin:/sbin:/bin:/usr/sbin:/usr/bin'
validate: visudo -cf %s"><pre class="notranslate"><code class="notranslate">- name: Add ops scripts to sudo secure_path
lineinfile:
dest: /etc/sudoers
regexp: >
^Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin$
line: 'Defaults secure_path = /opt/d7/bin:/sbin:/bin:/usr/sbin:/usr/bin'
validate: visudo -cf %s
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Idempotent line replacement after a second run</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Refuse to run if unable to disable echo on the tty.
Defaults !visiblepw
#
# Preserving HOME has security implications since many programs
# use it when searching for configuration files. Note that HOME
# is already set when the the env_reset option is enabled, so
# this option is only effective for configurations where either
# env_reset is disabled or HOME is present in the env_keep list.
#
Defaults always_set_home
Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS"
Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"
#
# Adding HOME to env_keep may enable a user to run unrestricted
# commands via sudo.
#
# Defaults env_keep += "HOME"
Defaults secure_path = /opt/d7/bin:/sbin:/bin:/usr/sbin:/usr/bin
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
## Allows people in group wheel to run all commands without a password
%wheel ALL=(ALL) NOPASSWD: ALL"><pre class="notranslate"><code class="notranslate"># Refuse to run if unable to disable echo on the tty.
Defaults !visiblepw
#
# Preserving HOME has security implications since many programs
# use it when searching for configuration files. Note that HOME
# is already set when the the env_reset option is enabled, so
# this option is only effective for configurations where either
# env_reset is disabled or HOME is present in the env_keep list.
#
Defaults always_set_home
Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS"
Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"
#
# Adding HOME to env_keep may enable a user to run unrestricted
# commands via sudo.
#
# Defaults env_keep += "HOME"
Defaults secure_path = /opt/d7/bin:/sbin:/bin:/usr/sbin:/usr/bin
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
## Allows people in group wheel to run all commands without a password
%wheel ALL=(ALL) NOPASSWD: ALL
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Potentially show-stopping garbage at the bottom of a file</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Refuse to run if unable to disable echo on the tty.
Defaults !visiblepw
#
# Preserving HOME has security implications since many programs
# use it when searching for configuration files. Note that HOME
# is already set when the the env_reset option is enabled, so
# this option is only effective for configurations where either
# env_reset is disabled or HOME is present in the env_keep list.
#
Defaults always_set_home
Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS"
Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"
#
# Adding HOME to env_keep may enable a user to run unrestricted
# commands via sudo.
#
# Defaults env_keep += "HOME"
Defaults secure_path = /opt/d7/bin:/sbin:/bin:/usr/sbin:/usr/bin
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
## Allows people in group wheel to run all commands without a password
%wheel ALL=(ALL) NOPASSWD: ALL
Defaults secure_path = /opt/d7/bin:/sbin:/bin:/usr/sbin:/usr/bin"><pre class="notranslate"><code class="notranslate"># Refuse to run if unable to disable echo on the tty.
Defaults !visiblepw
#
# Preserving HOME has security implications since many programs
# use it when searching for configuration files. Note that HOME
# is already set when the the env_reset option is enabled, so
# this option is only effective for configurations where either
# env_reset is disabled or HOME is present in the env_keep list.
#
Defaults always_set_home
Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS"
Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"
#
# Adding HOME to env_keep may enable a user to run unrestricted
# commands via sudo.
#
# Defaults env_keep += "HOME"
Defaults secure_path = /opt/d7/bin:/sbin:/bin:/usr/sbin:/usr/bin
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
## Allows people in group wheel to run all commands without a password
%wheel ALL=(ALL) NOPASSWD: ALL
Defaults secure_path = /opt/d7/bin:/sbin:/bin:/usr/sbin:/usr/bin
</code></pre></div>
<p dir="auto">Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="160908951" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/3975" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/3975/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/3975">ansible/ansible-modules-core#3975</a></p> | 0 |
<p dir="auto">In a new IPython Notebook session:</p>
<p dir="auto">import pandas as pd<br>
import numpy as np<br>
%matplotlib<br>
dt_rng = pd.date_range(start='2014-01-01', end='2014-01-31', freq='1min')<br>
df = pd.DataFrame(np.random.randn(len(dt_rng)), index=dt_rng)<br>
ax = df.plot()</p>
<p dir="auto">The DataFrame is plotted correctly. However, a mouse-over shows wrong dates starting in the year 1970. The axis-labelling is correct.</p>
<p dir="auto">Editing the format_coord function shows something interesting:</p>
<p dir="auto">ax.format_coord = lambda x,y: "{} {}".format(x,y)</p>
<p dir="auto">231422240.[....] and so on. This float value obviously isn't parsed correctly. Any ideas?</p>
<p dir="auto">Thanks for making pandas so great and best regards!</p> | <p dir="auto">In pandas 0.13.1 this code produces a plot that, when "moused over", indicates incorrect dates on the 't' (x) axis, despite having the correct axis label.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pd.Series([1, 2, 3], index=pd.date_range('2014-01-01', periods=3, freq='D')).plot()"><pre class="notranslate"><span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2014-01-01'</span>, <span class="pl-s1">periods</span><span class="pl-c1">=</span><span class="pl-c1">3</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'D'</span>)).<span class="pl-en">plot</span>()</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/6dd5fc1e3be5a34400c7a3def8a8ddac54459da6107dd08ead808126092b244a/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353335363334302f323430353837392f38663764326566362d616135632d313165332d396336382d6631333833656663366235322e706e67"><img src="https://camo.githubusercontent.com/6dd5fc1e3be5a34400c7a3def8a8ddac54459da6107dd08ead808126092b244a/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353335363334302f323430353837392f38663764326566362d616135632d313165332d396336382d6631333833656663366235322e706e67" alt="screenshot" data-canonical-src="https://f.cloud.github.com/assets/5356340/2405879/8f7d2ef6-aa5c-11e3-9c68-f1383efc6b52.png" style="max-width: 100%;"></a></p>
<p dir="auto">(matplotlib version is 1.3.1)</p> | 1 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn id(x: uint) -> uint { x }
fn main() {
let c <- fail;
id(c);
}"><pre class="notranslate"><code class="notranslate">fn id(x: uint) -> uint { x }
fn main() {
let c <- fail;
id(c);
}
</code></pre></div>
<p dir="auto">Assertion failed: (getOperand(0)->getType() == cast(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"), function AssertOK, file Instructions.cpp, line 1065.</p> | <p dir="auto">Here's an example of the bug:</p>
<p dir="auto"><a href="https://gist.github.com/2421363">https://gist.github.com/2421363</a></p>
<p dir="auto">It seems that libraries re-export the ifaces/impls of libraries they're using, which triggers a duplicate symbol error when libraries are used in a diamond shaped pattern.</p> | 0 |
<p dir="auto"><code class="notranslate">flutter build apk</code> crashes with the message</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="===== CRASH =====
version=2.1.0-dev.4.0.flutter-cd9a42239f (Fri Sep 7 21:08:23 2018 +0000) on "macos_simarm"
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x148
Dart snapshot generator failed with exit code -6
Snapshotting exited with non-zero exit code: -6
FAILURE: Build failed with an exception."><pre class="notranslate"><code class="notranslate">===== CRASH =====
version=2.1.0-dev.4.0.flutter-cd9a42239f (Fri Sep 7 21:08:23 2018 +0000) on "macos_simarm"
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x148
Dart snapshot generator failed with exit code -6
Snapshotting exited with non-zero exit code: -6
FAILURE: Build failed with an exception.
</code></pre></div>
<h2 dir="auto">flutter doctor -v</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel master, v0.8.2-pre.24, on Mac OS X 10.13.6 17G65, locale en-DE)
• Flutter version 0.8.2-pre.24 at XXXXXXX
• Framework revision 4d9bbc10f2 (14 hours ago), 2018-09-09 03:15:34 -0400
• Engine revision 1770f88548
• Dart version 2.1.0-dev.4.0.flutter-cd9a42239f
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.0-rc1)
• Android SDK at XXXXXXX/android_sdk
• Android NDK at XXXXXXX/android_sdk/ndk-bundle
• Platform android-28, build-tools 28.0.0-rc1
• ANDROID_HOME = XXXXXXX/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-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 28.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[!] IntelliJ IDEA Community Edition (version 2017.3.4)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.io/intellij-setup/#installing-the-plugins
"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel master, v0.8.2-pre.24, on Mac OS X 10.13.6 17G65, locale en-DE)
• Flutter version 0.8.2-pre.24 at XXXXXXX
• Framework revision 4d9bbc10f2 (14 hours ago), 2018-09-09 03:15:34 -0400
• Engine revision 1770f88548
• Dart version 2.1.0-dev.4.0.flutter-cd9a42239f
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.0-rc1)
• Android SDK at XXXXXXX/android_sdk
• Android NDK at XXXXXXX/android_sdk/ndk-bundle
• Platform android-28, build-tools 28.0.0-rc1
• ANDROID_HOME = XXXXXXX/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-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 28.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[!] IntelliJ IDEA Community Edition (version 2017.3.4)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.io/intellij-setup/#installing-the-plugins
</code></pre></div> | <h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>Run the Flutter Gallery application on an iPhone 6.</li>
<li>Select the "Text field" demo.</li>
<li>Click on the "Name" field.</li>
<li>Click on the microphone icon on the iOS keyboard and say something.</li>
<li>The text displays in the text field.</li>
<li>Click "Done" in the keyboard area to dismiss the keyboard.</li>
<li>Only the last character of the spoken text is displayed in the text field. All other characters disappear.</li>
</ol>
<h2 dir="auto">Logs</h2>
<p dir="auto">N/A</p>
<h2 dir="auto">Flutter Doctor</h2>
<p dir="auto">[✓] Flutter (on Mac OS X 10.12.4 16E195, locale en-US, channel master)<br>
• Flutter at /Users/?/Development/flutter<br>
• Framework revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/767ab66c25b5b303a030d46b2ea3711d25a30001/hovercard" href="https://github.com/flutter/flutter/commit/767ab66c25b5b303a030d46b2ea3711d25a30001"><tt>767ab66</tt></a> (32 hours ago), 2017-05-27 00:45:25 -0700<br>
• Engine revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/75c74dc463d56e17be10315cfde409010fd8f90b/hovercard" href="https://github.com/flutter/flutter/commit/75c74dc463d56e17be10315cfde409010fd8f90b"><tt>75c74dc</tt></a><br>
• Tools Dart version 1.24.0-dev.3.0</p>
<p dir="auto">[✓] Android toolchain - develop for Android devices (Android SDK 25.0.3)<br>
• Android SDK at /Users/?/Library/Android/sdk<br>
• Platform android-25, build-tools 25.0.3<br>
• ANDROID_HOME = /Users/?/Library/Android/sdk<br>
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java<br>
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)</p>
<p dir="auto">[✓] iOS toolchain - develop for iOS devices (Xcode 8.3.2)<br>
• Xcode at /Applications/Xcode.app/Contents/Developer<br>
• Xcode 8.3.2, Build version 8E2002<br>
• ios-deploy 1.9.1<br>
• CocoaPods version 1.2.1</p>
<p dir="auto">[✓] Android Studio (version 2.3)<br>
• Android Studio at /Applications/Android Studio.app/Contents<br>
• Gradle version 3.2<br>
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)</p>
<p dir="auto">[✓] IntelliJ IDEA Community Edition (version 2017.1.3)<br>
• Dart plugin version 171.4424.63<br>
• Flutter plugin version 13.1</p> | 0 |
<p dir="auto">when I run the demo Example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> import numpy as np; np.random.seed(10)
>>> import seaborn as sns; sns.set(color_codes=True)
>>> mean, cov = [0, 2], [(1, .5), (.5, 1)]
>>> x, y = np.random.multivariate_normal(mean, cov, size=50).T
>>> ax = sns.kdeplot(x)"><pre class="notranslate"><code class="notranslate">>>> import numpy as np; np.random.seed(10)
>>> import seaborn as sns; sns.set(color_codes=True)
>>> mean, cov = [0, 2], [(1, .5), (.5, 1)]
>>> x, y = np.random.multivariate_normal(mean, cov, size=50).T
>>> ax = sns.kdeplot(x)
</code></pre></div>
<p dir="auto">it report an error as below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\Python\Python35\lib\site-packages\seaborn\distributions.py", line 604, in kdeplot
cumulative=cumulative, **kwargs)
File "D:\Python\Python35\lib\site-packages\seaborn\distributions.py", line 270, in _univariate_kdeplot
cumulative=cumulative)
File "D:\Python\Python35\lib\site-packages\seaborn\distributions.py", line 328, in _statsmodels_univariate_kde
kde.fit(kernel, bw, fft, gridsize=gridsize, cut=cut, clip=clip)
File "D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kde.py", line 146, in fit
clip=clip, cut=cut)
File "D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kde.py", line 506, in kdensityfft
f = revrt(zstar)
File "D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kdetools.py", line 20, in revrt
y = X[:m/2+1] + np.r_[0,X[m/2+1:],0]*1j
TypeError: slice indices must be integers or None or have an __index__ method"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\Python\Python35\lib\site-packages\seaborn\distributions.py", line 604, in kdeplot
cumulative=cumulative, **kwargs)
File "D:\Python\Python35\lib\site-packages\seaborn\distributions.py", line 270, in _univariate_kdeplot
cumulative=cumulative)
File "D:\Python\Python35\lib\site-packages\seaborn\distributions.py", line 328, in _statsmodels_univariate_kde
kde.fit(kernel, bw, fft, gridsize=gridsize, cut=cut, clip=clip)
File "D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kde.py", line 146, in fit
clip=clip, cut=cut)
File "D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kde.py", line 506, in kdensityfft
f = revrt(zstar)
File "D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kdetools.py", line 20, in revrt
y = X[:m/2+1] + np.r_[0,X[m/2+1:],0]*1j
TypeError: slice indices must be integers or None or have an __index__ method
</code></pre></div>
<p dir="auto">My platform is win10 and seaborn version is (0.7.1) and statsmodels version is (0.6.1).</p> | <p dir="auto">In seaborn, it seems one cannot customise legends for histplots. I'm not sure about the other categorical plots, but it is possible for scatter plots.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# This works
f, ax = pt.subplots()
x = np.arange(0, 6)
y1 = np.random.randint(1, 50, 6)
y2 = np.random.randomint(1, 25, 6)
sns.scatterplot(x=x, y=y1, color="blue", ax=ax)
sns.scatterplot(x=x, y=y2, color="red", ax=ax)
ax.legend(fontsize="medium")
plt.show()
# This does not work
f, ax = plt.subplots()
sns.histplot(x=x, y=y1, ax=ax)
sns.histplot(x=x, y=y2, ax=ax)
ax.legend(fontsize="medium")"><pre class="notranslate"><code class="notranslate"># This works
f, ax = pt.subplots()
x = np.arange(0, 6)
y1 = np.random.randint(1, 50, 6)
y2 = np.random.randomint(1, 25, 6)
sns.scatterplot(x=x, y=y1, color="blue", ax=ax)
sns.scatterplot(x=x, y=y2, color="red", ax=ax)
ax.legend(fontsize="medium")
plt.show()
# This does not work
f, ax = plt.subplots()
sns.histplot(x=x, y=y1, ax=ax)
sns.histplot(x=x, y=y2, ax=ax)
ax.legend(fontsize="medium")
</code></pre></div>
<p dir="auto">For hisplots, I get the error <code class="notranslate">No handles with labels found to put in legend.</code> Any way to have <code class="notranslate">ax.legend</code> function properly?</p> | 0 |
<p dir="auto">I do have a number of unregistered packages in .julia, and a few others which are not tracking METADATA. Likely one of these is confusing publish, or it could simply be that my .julia directory was created too long ago, in which case this issue can be closed.</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating cache of Match...
INFO: Updating Logging...
INFO: Updating Sam...
INFO: Updating BinDeps...
INFO: Updating Zlib...
INFO: Updating SortPerf...
INFO: Updating Match...
INFO: Updating OrderedCollections...
INFO: Updating BGZF...
INFO: Updating Monads...
INFO: Updating XClipboard...
INFO: Computing changes...
INFO: Removing HTTPClient v0.0.0
INFO: Removing JSON v0.2.3
INFO: Removing LibCURL v0.0.0
julia> Pkg.publish()
ERROR: METADATA is behind origin/metadata-v2 – run Pkg.update() before publishing
in publish at pkg/entry.jl:259
in anonymous at pkg/dir.jl:25
in cd at file.jl:22
in cd at pkg/dir.jl:25
in publish at pkg.jl:55
julia> Pkg.status()
Required packages:
- ArgParse 0.2.6
- BinDeps 0.2.12+ master
- Cairo 0.2.9
- Distributions 0.2.10
- Gaston 0.0.0
- HDFS 0.0.0
- HTTP 0.0.2
- Logging 0.0.0- master (unregistered)
- Monads 0.0.0+ master
- Nettle 0.1.2
- ODBC 0.3.1
- PyCall 0.0.1
- Winston 0.5.1
Additional packages:
- BGZF 0.0.0- master (unregistered)
- Blocks 0.0.0
- Calendar 0.4.0
- Color 0.2.6
- DataFrames 0.3.15
- Datetime 0.1.2
- GZip 0.2.5
- ICU 0.0.0
- IniFile 0.2.1
- Match 0.0.1 master
- NumericExtensions 0.2.18
- Options 0.2.1
- OrderedCollections 0.0.0- master (unregistered)
- PTools 0.0.0
- Sam 0.0.0- master (unregistered)
- SortPerf 0.0.0- master (unregistered)
- SortingAlgorithms 0.0.1
- Stats 0.2.8
- StrPack 0.0.0
- TextWrap 0.1.2
- Tk 0.2.8
- URIParser 0.0.0
- URLParse 0.0.0
- UTF16 0.2.0
- XClipboard 0.0.0- master (unregistered)
- Zlib 0.1.3+ read_concat"><pre class="notranslate">julia<span class="pl-k">></span> Pkg<span class="pl-k">.</span><span class="pl-c1">update</span>()
INFO<span class="pl-k">:</span> Updating METADATA<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating cache of Match<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating Logging<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating Sam<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating BinDeps<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating Zlib<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating SortPerf<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating Match<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating OrderedCollections<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating BGZF<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating Monads<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Updating XClipboard<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Computing changes<span class="pl-k">...</span>
INFO<span class="pl-k">:</span> Removing HTTPClient v0.<span class="pl-c1">0.0</span>
INFO<span class="pl-k">:</span> Removing JSON v0.<span class="pl-c1">2.3</span>
INFO<span class="pl-k">:</span> Removing LibCURL v0.<span class="pl-c1">0.0</span>
julia<span class="pl-k">></span> Pkg<span class="pl-k">.</span><span class="pl-c1">publish</span>()
ERROR<span class="pl-k">:</span> METADATA is behind origin<span class="pl-k">/</span>metadata<span class="pl-k">-</span>v2 – run Pkg<span class="pl-k">.</span><span class="pl-c1">update</span>() before publishing
<span class="pl-k">in</span> publish at pkg<span class="pl-k">/</span>entry<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">259</span>
<span class="pl-k">in</span> anonymous at pkg<span class="pl-k">/</span>dir<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">25</span>
<span class="pl-k">in</span> cd at file<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">22</span>
<span class="pl-k">in</span> cd at pkg<span class="pl-k">/</span>dir<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">25</span>
<span class="pl-k">in</span> publish at pkg<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">55</span>
julia<span class="pl-k">></span> Pkg<span class="pl-k">.</span><span class="pl-c1">status</span>()
Required packages<span class="pl-k">:</span>
<span class="pl-k">-</span> ArgParse <span class="pl-c1">0.2</span>.<span class="pl-c1">6</span>
<span class="pl-k">-</span> BinDeps <span class="pl-c1">0.2</span>.<span class="pl-c1">12</span><span class="pl-k">+</span> master
<span class="pl-k">-</span> Cairo <span class="pl-c1">0.2</span>.<span class="pl-c1">9</span>
<span class="pl-k">-</span> Distributions <span class="pl-c1">0.2</span>.<span class="pl-c1">10</span>
<span class="pl-k">-</span> Gaston <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span>
<span class="pl-k">-</span> HDFS <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span>
<span class="pl-k">-</span> HTTP <span class="pl-c1">0.0</span>.<span class="pl-c1">2</span>
<span class="pl-k">-</span> Logging <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span><span class="pl-k">-</span> master (unregistered)
<span class="pl-k">-</span> Monads <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span><span class="pl-k">+</span> master
<span class="pl-k">-</span> Nettle <span class="pl-c1">0.1</span>.<span class="pl-c1">2</span>
<span class="pl-k">-</span> ODBC <span class="pl-c1">0.3</span>.<span class="pl-c1">1</span>
<span class="pl-k">-</span> PyCall <span class="pl-c1">0.0</span>.<span class="pl-c1">1</span>
<span class="pl-k">-</span> Winston <span class="pl-c1">0.5</span>.<span class="pl-c1">1</span>
Additional packages<span class="pl-k">:</span>
<span class="pl-k">-</span> BGZF <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span><span class="pl-k">-</span> master (unregistered)
<span class="pl-k">-</span> Blocks <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span>
<span class="pl-k">-</span> Calendar <span class="pl-c1">0.4</span>.<span class="pl-c1">0</span>
<span class="pl-k">-</span> Color <span class="pl-c1">0.2</span>.<span class="pl-c1">6</span>
<span class="pl-k">-</span> DataFrames <span class="pl-c1">0.3</span>.<span class="pl-c1">15</span>
<span class="pl-k">-</span> Datetime <span class="pl-c1">0.1</span>.<span class="pl-c1">2</span>
<span class="pl-k">-</span> GZip <span class="pl-c1">0.2</span>.<span class="pl-c1">5</span>
<span class="pl-k">-</span> ICU <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span>
<span class="pl-k">-</span> IniFile <span class="pl-c1">0.2</span>.<span class="pl-c1">1</span>
<span class="pl-k">-</span> Match <span class="pl-c1">0.0</span>.<span class="pl-c1">1</span> master
<span class="pl-k">-</span> NumericExtensions <span class="pl-c1">0.2</span>.<span class="pl-c1">18</span>
<span class="pl-k">-</span> Options <span class="pl-c1">0.2</span>.<span class="pl-c1">1</span>
<span class="pl-k">-</span> OrderedCollections <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span><span class="pl-k">-</span> master (unregistered)
<span class="pl-k">-</span> PTools <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span>
<span class="pl-k">-</span> Sam <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span><span class="pl-k">-</span> master (unregistered)
<span class="pl-k">-</span> SortPerf <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span><span class="pl-k">-</span> master (unregistered)
<span class="pl-k">-</span> SortingAlgorithms <span class="pl-c1">0.0</span>.<span class="pl-c1">1</span>
<span class="pl-k">-</span> Stats <span class="pl-c1">0.2</span>.<span class="pl-c1">8</span>
<span class="pl-k">-</span> StrPack <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span>
<span class="pl-k">-</span> TextWrap <span class="pl-c1">0.1</span>.<span class="pl-c1">2</span>
<span class="pl-k">-</span> Tk <span class="pl-c1">0.2</span>.<span class="pl-c1">8</span>
<span class="pl-k">-</span> URIParser <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span>
<span class="pl-k">-</span> URLParse <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span>
<span class="pl-k">-</span> UTF16 <span class="pl-c1">0.2</span>.<span class="pl-c1">0</span>
<span class="pl-k">-</span> XClipboard <span class="pl-c1">0.0</span>.<span class="pl-c1">0</span><span class="pl-k">-</span> master (unregistered)
<span class="pl-k">-</span> Zlib <span class="pl-c1">0.1</span>.<span class="pl-c1">3</span><span class="pl-k">+</span> read_concat</pre></div> | <p dir="auto">This is an umbrella issue for compiler and other low-level optimizations. I'm including ones that are already done, to make it more interesting.</p>
<p dir="auto">compiler:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> static method lookup</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> basic inlining</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> null check elimination</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> function type check elimination</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> method lookup hoisting</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> function-valued argument inlining (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="109391246" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/13412" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/13412/hovercard" href="https://github.com/JuliaLang/julia/pull/13412">#13412</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> variable type specialization</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> varargs allocation elision</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> lambda lifting</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> native calling convention</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> hoist n-d array metadata loads</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> hoist 1-d array metadata loads (partial: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="25430717" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/5355" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/5355/hovercard" href="https://github.com/JuliaLang/julia/pull/5355">#5355</a>, more via LLVM TBAA)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> hoist access to fields in immutable values (partial: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="47431664" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8867" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/8867/hovercard" href="https://github.com/JuliaLang/julia/pull/8867">#8867</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> skip gc frame when possible</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> avoid re-boxing non-assigned variables</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> unboxed struct layout</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> apply tuple lowering: <code class="notranslate">apply(f, t::(T,S)) => f(t[1],t[2])</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> apply tuple elision: <code class="notranslate">apply(f, (x,y)) => f(x,y)</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> temporary tuple elision</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> create and return tuples as structs (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="9841356" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/1976" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/1976/hovercard" href="https://github.com/JuliaLang/julia/issues/1976">#1976</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11756458" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/2496" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/2496/hovercard" href="https://github.com/JuliaLang/julia/issues/2496">#2496</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> early freeing by dataflow analysis (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2219096" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/261" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/261/hovercard" href="https://github.com/JuliaLang/julia/issues/261">#261</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> don't pass or store 0-field structs</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> rerun type inference after inlining in some cases</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> handle more constant conditions in inference (partial: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="146540177" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/15785" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/15785/hovercard" href="https://github.com/JuliaLang/julia/pull/15785">#15785</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> remove excess temp vars</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> pool environments of inner functions</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> inline builtins</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> better inlining of apply()</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> inline invoke() (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="53353811" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/9608" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/9608/hovercard" href="https://github.com/JuliaLang/julia/issues/9608">#9608</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> inline isdefined() (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="189503090" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/19334" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/19334/hovercard" href="https://github.com/JuliaLang/julia/pull/19334">#19334</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> more general inlining</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> constant-fold type applications</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> direct call methods specialized for non-leaf types</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> closure environment specialization</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> static keyword argument sorting (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="156768424" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/16580" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/16580/hovercard" href="https://github.com/JuliaLang/julia/pull/16580">#16580</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> compute first field of a new object before allocating, to avoid the unnecessary NULL store to the first slot</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> identify types (especially immutable) that are always fully initialized, to avoid undefined checks on their fields (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="46951577" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8827" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/8827/hovercard" href="https://github.com/JuliaLang/julia/pull/8827">#8827</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> skip gc root for variables with stable values (e.g. vars that only alias arguments)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> avoid redundant loads of single-assigned variables from gc frame</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> possibly hoist boxing out of tight loops (might interfere with gc though?)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> faster possibly-undefined variables (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34051195" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6914" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/6914/hovercard" href="https://github.com/JuliaLang/julia/issues/6914">#6914</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> constant-propagation and CSE of pure functions (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="121068173" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/14324" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/14324/hovercard" href="https://github.com/JuliaLang/julia/issues/14324">#14324</a>)</li>
</ul>
<p dir="auto">RTS:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> compress ASTs</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> method hash tables</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> more efficient method and cache representation</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> gc: 1-bit refcount (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2219096" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/261" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/261/hovercard" href="https://github.com/JuliaLang/julia/issues/261">#261</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> flatten arrays of tuples</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> use realloc in growing arrays (complicated by alignment constraints)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> avoid extra buffer copy in uv_write</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> allow scheduler to be a function call, avoiding double task switch to get to next task</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> avoid some stack copies in Task; e.g. for tasks that never yield</li>
</ul>
<p dir="auto">larger projects:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> bounds check elimination</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> cache generated code (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2219081" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/260" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/260/hovercard" href="https://github.com/JuliaLang/julia/issues/260">#260</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> inlining function arguments</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> henchmen unrolling</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> better type info for tasks/produce/consume</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> SIMD support (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="10981388" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/2299" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/2299/hovercard" href="https://github.com/JuliaLang/julia/issues/2299">#2299</a>)</li>
</ul>
<p dir="auto">performance-related features:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> inbounds macro (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="15036987" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/3268" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/3268/hovercard" href="https://github.com/JuliaLang/julia/pull/3268">#3268</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7632866" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/1392" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/1392/hovercard" href="https://github.com/JuliaLang/julia/issues/1392">#1392</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> bounds check intrinsic</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> sizeof intrinsic</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> expose llvm <code class="notranslate">select</code> (inlined, eager-evaluated conditional function)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> inline declaration (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="5984570" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/1106" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/1106/hovercard" href="https://github.com/JuliaLang/julia/issues/1106">#1106</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> pure function declaration (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3295385" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/414" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/414/hovercard" href="https://github.com/JuliaLang/julia/issues/414">#414</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> improve behavior of globals (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="5220583" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/964" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/964/hovercard" href="https://github.com/JuliaLang/julia/issues/964">#964</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> better support for in-place ops (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="15644743" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/3424" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/3424/hovercard" href="https://github.com/JuliaLang/julia/issues/3424">#3424</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2118274" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/249" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/249/hovercard" href="https://github.com/JuliaLang/julia/issues/249">#249</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="6033170" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/1115" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/1115/hovercard" href="https://github.com/JuliaLang/julia/issues/1115">#1115</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="153879818" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/16285" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/16285/hovercard" href="https://github.com/JuliaLang/julia/issues/16285">#16285</a>)</li>
</ul> | 0 |
<p dir="auto">Hello,</p>
<p dir="auto">I am currently reflecting a MSSQL table and doing a bulk insert to it, my problem is that I need to check/avoid duplicates and I don't know how to do it in SQLAlchemy syntax.</p>
<p dir="auto">To give you some context, The SQL table is time series for a mortgage lender that contains 57 parameters including things such as "Loan ID", "Observation date","Month on Book", "Origination date", "Interest rate", etc. The clue to identify duplicates is in the "Month on book" since this can only have one row for each month after the "Origination Date" per "Loan ID". Each Loan ID would have different "Origination dates" and "Observation date", but the "Month on Book" encoding would be the same for every Loan ID.</p>
<p dir="auto">For example:</p>
<p dir="auto">Current date: March 2018</p>
<p dir="auto">Origination Date: 30 Jan 2018</p>
<p dir="auto">Observation Date: 30 March 2018</p>
<p dir="auto">Month on Book: 2 (February would be "1" and Jan would be "0")</p>
<p dir="auto">Since the table in MS SQL is already populated I want to insert new rows, but only having one record of month on book (the encoded version of "Observation Date") per LoanID (just in case someone runs the insert code twice, it doesn't duplicate all the data)</p>
<p dir="auto">This is how I am currently doing the whole insert process up to the duplicate exception (see "sqlalchemy_orm_bulk_insert" or "sqlalchemy_core_insert". Also, I know that the class I created to standardise the connection-insertion process with SQl Alchemy could be a bit crap, so if someone has any suggestions, they would be more than welcomed.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class SQLAlchemy_cashflow():
def __init__(self,database, user, password, sql_schema, driver, server):
self.sql_schema = sql_schema
self.driver = driver
self.server = server
self.database = database
self.user = user
self.password = password
params = urllib.parse.quote_plus('Driver={'+str(self.driver)+'};'\
"SERVER="+str(self.server)+";"\
"Database="+str(self.database)+";"
"UID="+str(self.user)+";"\
"PWD="+str(self.password)+";"\
"Trusted_Connection=yes"
)
engine = sa.create_engine("mssql+pyodbc:///?odbc_connect=%s" % params)
self.engine = engine
conn = engine.connect()
metadata = MetaData(schema=sql_schema)
Base = declarative_base(metadata= metadata)
Base.metadata.reflect(engine)
Session = sessionmaker(bind=engine)
session = Session()
self.metadata = metadata
self.Base = Base
self.session = session
def reflection(self, sql_table):
self.sql_table = sql_table
class MyClass(self.Base):
__table__ = self.Base.metadata.tables[self.sql_table]
table_reflected = Table(sql_table, self.metadata, autoload=True, autoload_with = self.engine)
return MyClass, table_reflected
def sqlalchemy_orm_bulk_insert(self,class_object, df):
connection("dbo")
t0 = time.time()
session.bulk_insert_mappings(class_object,
df.to_dict(orient="record"))
session.commit()
print("SQLAlchemy ORM bulk_insert_mappings(): Total time for " + str(len(df)) +
" records " + str(time.time() - t0) + " secs")
def sqlalchemy_core(self, class_object, df):
connection("dbo")
t0 = time.time()
engine.execute(class_object.__table__.insert(),
df.to_dict(orient="record"))
print("SQLAlchemy Core: Total time for " + str(len(df)) + " records " +
str(time.time() - t0) + " secs")
"><pre class="notranslate"><code class="notranslate">class SQLAlchemy_cashflow():
def __init__(self,database, user, password, sql_schema, driver, server):
self.sql_schema = sql_schema
self.driver = driver
self.server = server
self.database = database
self.user = user
self.password = password
params = urllib.parse.quote_plus('Driver={'+str(self.driver)+'};'\
"SERVER="+str(self.server)+";"\
"Database="+str(self.database)+";"
"UID="+str(self.user)+";"\
"PWD="+str(self.password)+";"\
"Trusted_Connection=yes"
)
engine = sa.create_engine("mssql+pyodbc:///?odbc_connect=%s" % params)
self.engine = engine
conn = engine.connect()
metadata = MetaData(schema=sql_schema)
Base = declarative_base(metadata= metadata)
Base.metadata.reflect(engine)
Session = sessionmaker(bind=engine)
session = Session()
self.metadata = metadata
self.Base = Base
self.session = session
def reflection(self, sql_table):
self.sql_table = sql_table
class MyClass(self.Base):
__table__ = self.Base.metadata.tables[self.sql_table]
table_reflected = Table(sql_table, self.metadata, autoload=True, autoload_with = self.engine)
return MyClass, table_reflected
def sqlalchemy_orm_bulk_insert(self,class_object, df):
connection("dbo")
t0 = time.time()
session.bulk_insert_mappings(class_object,
df.to_dict(orient="record"))
session.commit()
print("SQLAlchemy ORM bulk_insert_mappings(): Total time for " + str(len(df)) +
" records " + str(time.time() - t0) + " secs")
def sqlalchemy_core(self, class_object, df):
connection("dbo")
t0 = time.time()
engine.execute(class_object.__table__.insert(),
df.to_dict(orient="record"))
print("SQLAlchemy Core: Total time for " + str(len(df)) + " records " +
str(time.time() - t0) + " secs")
</code></pre></div> | <p dir="auto">Hi, I recently ran into a situation where a query was accidentally returning 100x the number of rows it should have due to a bad join, but it slipped by for a long time because the de-duping logic in orm/loading.py:instances saved us:</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">I was wondering if it would be a good idea to add an optional warning to catch discrepancies between the raw row count and the unique count. If so, I'd be happy to submit a PR.</p>
<p dir="auto">Thanks!</p> | 0 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Microsoft Windows [Version 10.0.18363.815]
PowerToys version: 0.17.0
PowerToy module for which you are reporting the bug (if applicable): Fancy Zones"><pre class="notranslate"><code class="notranslate">Microsoft Windows [Version 10.0.18363.815]
PowerToys version: 0.17.0
PowerToy module for which you are reporting the bug (if applicable): Fancy Zones
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">I have a multi-monitor setup with my secondary display above my primary in the upper right. I have setup 3 fancy zones on the primary display, and 2 zones on the secondary display. (See screen shots)</p>
<p dir="auto">I have PT Fancy zones configured to require the shift-key to be pressed to drag a window into a zone.</p>
<p dir="auto">I have PT set to run as Administrator.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">When I shift-drag a window into a fancy zone, it should show the drop-target overlay, expand the dropped window to fill that zone, and then hide the drop-target overlay.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Sometimes when shift-dragging a window into a fancy zone, the overlay that shows the drop zones gets stuck and won't go away. It looks as if the overlay is stuck in a loop recalculating/repainting. The CPU cycles spike and I am locked out. Nothing is accessible because the overlay is over the top of all apps, nothing can be brought to the foreground, and I can't even kill the PT app. CNTRL-ALT-DEL will bring up the system menu with the ability to Sign Out or Switch Users, which sometimes works. Other times it just causes the machine to act hung up with a black screen and I have to use a hard-power reset.</p>
<p dir="auto">This seems to happen more often after a wake from sleep and/or after PT has been running for an extended period of time. (Hours). But it's possible I just haven't noticed the exact sequence of steps to cause it to happen.</p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto">I have included a screenshot of the issue (taken with my phone, since the PC was locked up), and a short video clip showing how the fancy zone overlay keeps being repainted/repositioned.</p>
<p dir="auto"><a href="https://1drv.ms/u/s!Ak5dcA119y9Gk_VaF9pm2BdPPRVpKA?e=KdZot8" rel="nofollow">Fancy Zone Issue - Screen Shots and video</a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16259907/81716703-eaffd100-9436-11ea-97c9-9d2d156390fc.png"><img src="https://user-images.githubusercontent.com/16259907/81716703-eaffd100-9436-11ea-97c9-9d2d156390fc.png" alt="Multi-Monitor setup - Annotation 2020-05-12 093852" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16259907/81716708-ed622b00-9436-11ea-904f-e7ccf280ad10.jpg"><img src="https://user-images.githubusercontent.com/16259907/81716708-ed622b00-9436-11ea-904f-e7ccf280ad10.jpg" alt="PowerToys - Fancy Zones - fail on shift-drag to zone" style="max-width: 100%;"></a></p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">Currently, you can remap a single key to a single key, or a two-button shortcut to a two-button shortcut; the proposed feature would let you mix and match these two. For example, F6, F7, and F8 could be bound to Ctrl-X, Ctrl+C, and Ctrl+V respectively. Alternatively, Ctrl+Num6 (or any other combination of your choosing) could press the default F6, allowing you to bind the key to a shortcut by default without losing it's default functionality.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">Instead of having two separate menus within the keyboard manager (as is now), use a single menu that contains all variants of the remapping functionality. When selecting the user input, if only one key is pressed it knows to activate on that one key, but if two are pressed it looks for that combination before activating; the same is true for outputs.</p> | 0 |
<p dir="auto">When selecting multiple lines and trying to move them down or up (by <code class="notranslate">ctrl-arrow key</code> on linux at least) atom gives up all cursors but the latest one and only moves that line.</p>
<h2 dir="auto">Repro Steps</h2>
<ol dir="auto">
<li>add a cursor on multiple lines (by whatever means, <code class="notranslate">ctrl+d</code> or <code class="notranslate">ctrl-left mouse click</code>)</li>
<li>try to move the lines up or down (<code class="notranslate">ctrl+arrow key [up|down]</code>)</li>
</ol>
<p dir="auto"><strong>Expected:</strong> all lines move up or down<br>
<strong>Actual:</strong> only the line with the latest cursor moves and all other cursors are discarded</p>
<h2 dir="auto">Versions</h2>
<ul dir="auto">
<li><strong>Atom:</strong> 0.153.0</li>
<li><strong>Atom-Shell:</strong> 0.19.4</li>
<li><strong>OS:</strong> linux 3.14.25-1-lts</li>
<li><strong>Misc</strong>
<ul dir="auto">
<li>apm 0.111.1</li>
<li>npm 1.4.4</li>
<li>node 0.10.33</li>
<li>python 3.4.2</li>
<li>git 2.1.3</li>
</ul>
</li>
</ul>
<hr>
<p dir="auto">This report was created in and posted from the Atom editor using the package <code class="notranslate">bug-report</code> v0.5.3.</p> | <p dir="auto">After making multiple selections, "Move Line Up" (<kbd>Ctrl</kbd> <kbd>Cmd</kbd> <kbd>Up</kbd>) and "Move Line Down" (<kbd>Ctrl</kbd> <kbd>Cmd</kbd> <kbd>Down</kbd>) works only on the last selected line, instead it should move all the lines.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/50681/3138639/e528d254-e8a2-11e3-9608-e67da60182cf.gif"><img src="https://cloud.githubusercontent.com/assets/50681/3138639/e528d254-e8a2-11e3-9608-e67da60182cf.gif" alt="atom-multiple-selection-move-issue" data-animated-image="" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">signal.resample is broken for even-length inputs.</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.signal import resample
>>> resample(resample([1, 2, 3, 4], 6), 4)
array([ 1.25, 1.75, 3.25, 3.75])"><pre class="notranslate"><code class="notranslate">>>> from scipy.signal import resample
>>> resample(resample([1, 2, 3, 4], 6), 4)
array([ 1.25, 1.75, 3.25, 3.75])
</code></pre></div>
<p dir="auto">I would expect resampling to a higher number of samples and back to be the identity operation as a consequence of Fourier resampling being "perfect" for band-limited signals. This appears to be due to incorrect handling of the Nyquist frequency component.</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)
('0.14.1', '1.8.2', sys.version_info(major=2, minor=7, micro=10, releaselevel='final', serial=0))"><pre class="notranslate"><code class="notranslate">>>> import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)
('0.14.1', '1.8.2', sys.version_info(major=2, minor=7, micro=10, releaselevel='final', serial=0))
</code></pre></div> | <p dir="auto">Originally reported on SO <a href="http://stackoverflow.com/questions/43283845/scipy-signal-resample-malfunction-with-even-number-of-points" rel="nofollow">here</a>.</p>
<p dir="auto">It seems that <strong>scipy.signal.resample()</strong> makes errors when downsampling to an even number of points. For example, if we upsample a function to a multiple of the original points and then downsample again, we should get the original function back.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from scipy import signal
import numpy as np
def test_resample(n1,n2): # upsample from n1 to n2 points and back
x1=np.arange(n1)
y1=np.sin(x1)
y2,x2=signal.resample(y1,n2,x1)
y3,x3=signal.resample(y2,n1,x2)
print np.allclose(y1,y3)"><pre class="notranslate"><code class="notranslate">from scipy import signal
import numpy as np
def test_resample(n1,n2): # upsample from n1 to n2 points and back
x1=np.arange(n1)
y1=np.sin(x1)
y2,x2=signal.resample(y1,n2,x1)
y3,x3=signal.resample(y2,n1,x2)
print np.allclose(y1,y3)
</code></pre></div>
<p dir="auto">But this fails when the lower number of points is even:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_resample(10,20)
False
test_resample(11,22)
True
test_resample(11,33)
True"><pre class="notranslate"><code class="notranslate">test_resample(10,20)
False
test_resample(11,22)
True
test_resample(11,33)
True
</code></pre></div>
<p dir="auto">The problem occurs at the downsampling step. The errors are large, at least several percent for functions I tested.</p>
<p dir="auto">I found the bug in the code for <strong>resample()</strong>, see <a href="https://github.com/scipy/scipy/blob/v0.19.0/scipy/signal/signaltools.py#L2231-L2235">these lines</a>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sl[axis] = slice(0, (N + 1) // 2)
Y[sl] = X[sl]
sl[axis] = slice(-(N - 1) // 2, None)
Y[sl] = X[sl]
y = fftpack.ifft(Y, axis=axis) * (float(num) / float(Nx))"><pre class="notranslate"><code class="notranslate">sl[axis] = slice(0, (N + 1) // 2)
Y[sl] = X[sl]
sl[axis] = slice(-(N - 1) // 2, None)
Y[sl] = X[sl]
y = fftpack.ifft(Y, axis=axis) * (float(num) / float(Nx))
</code></pre></div>
<p dir="auto">These lines copy the FFT of the input function X to the FFT of the output function Y. Suppose we are downsampling and the number of points in the output spectrum, N, is even. Then Y[N/2] ends up containing the component of X at frequency -N/2. However, the subsequent IFFT expects that this should hold the sum of the positive and negative frequency components, namely X[N/2]+X[-N/2]. This can be solved by adding a few lines for the special condition like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sl[axis] = slice(0, (N + 1) // 2)
Y[sl] = X[sl]
sl[axis] = slice(-(N - 1) // 2, None)
Y[sl] = X[sl]
if N%2==0: # low number of points is even. So far we have set Y[-N/2]=X[-N/2]
if N<Nx: # if downsampling
sl[axis] = slice(N//2,N//2+1,None) # select the component at frequency N/2
Y[sl]+=X[sl] # add the component of X at N/2
elif N<num: # if upsampling
sl[axis] = slice(num-N//2,num-N//2+1,None) # select the component at frequency -N/2
Y[sl]/=2 # halve the component at -N/2
temp=Y[sl]
sl[axis] = slice(N//2,N//2+1,None) # select the component at +N/2
Y[sl]=temp # set that equal to the component at -N/2
y = fftpack.ifft(Y, axis=axis) * (float(num) / float(Nx))"><pre class="notranslate"><code class="notranslate">sl[axis] = slice(0, (N + 1) // 2)
Y[sl] = X[sl]
sl[axis] = slice(-(N - 1) // 2, None)
Y[sl] = X[sl]
if N%2==0: # low number of points is even. So far we have set Y[-N/2]=X[-N/2]
if N<Nx: # if downsampling
sl[axis] = slice(N//2,N//2+1,None) # select the component at frequency N/2
Y[sl]+=X[sl] # add the component of X at N/2
elif N<num: # if upsampling
sl[axis] = slice(num-N//2,num-N//2+1,None) # select the component at frequency -N/2
Y[sl]/=2 # halve the component at -N/2
temp=Y[sl]
sl[axis] = slice(N//2,N//2+1,None) # select the component at +N/2
Y[sl]=temp # set that equal to the component at -N/2
y = fftpack.ifft(Y, axis=axis) * (float(num) / float(Nx))
</code></pre></div>
<p dir="auto">So far this seems to work fine for my private version of resample(). Some professional should fix the scipy code.</p>
<hr>
<p dir="auto">Update 4/9/17:<br>
<strong>signal.resample()</strong> fails also on upsampling, for the same reason. However, the bug does not affect the real part of the output for real-valued input (which is why I missed it at first). By inspecting the imaginary parts the bug becomes apparent. For example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a=np.array([1.+0.j,0.+0.j])
print signal.resample(a,4)"><pre class="notranslate"><code class="notranslate">a=np.array([1.+0.j,0.+0.j])
print signal.resample(a,4)
</code></pre></div>
<p dir="auto">leads to</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ 1.0+0.j 0.5-0.5j 0.0+0.j 0.5+0.5j]"><pre class="notranslate"><code class="notranslate">[ 1.0+0.j 0.5-0.5j 0.0+0.j 0.5+0.5j]
</code></pre></div>
<p dir="auto">This is wrong, because <strong>a</strong> has no imaginary part, and therefore its upsampled version should not either.<br>
Again, this behavior is fixed by the code correction suggested above.</p> | 1 |
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Delagen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Delagen">@Delagen</a> on June 16, 2016 8:9</em></p>
<p dir="auto">simple url <a href="http://site.com/#/route;back=/a/b/c" rel="nofollow">http://site.com/#/route;back=/a/b/c</a></p>
<p dir="auto">Error: Cannot match any routes: 'route;back=true/a/b/c'</p>
<p dir="auto"><em>Copied from original issue: angular/vladivostok#59</em></p> | <p dir="auto">E.g. to make compiler benchmarks more realistic.</p>
<ol dir="auto">
<li>Add general reflector in <code class="notranslate">facade/reflector</code></li>
<li>delete <code class="notranslate">di/reflector</code>, <code class="notranslate">change_detection/parser/closure_map</code>, <code class="notranslate">core/compiler/reflector</code>
<ul dir="auto">
<li>will probably need to add some utility functions in DI that were present in the di/reflector,<br>
but those utilities should be written in AtScript and not JS/Dart specific implementations.</li>
</ul>
</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Reflector {
Function getter(String name) { ... }
Function setter(String name) { ... }
Function method(String name) { ... }
Function factory(Type type) { ... }
// one list for every parameter
// first entry is the parameter type, the rest are the annotations for that parameter
List<List<Object>> parameters(typeOrFunction) { ... }
// annotations placed on the type or function
List<Object> annotations(typeOrFunction) { ... }
}"><pre class="notranslate"><code class="notranslate">class Reflector {
Function getter(String name) { ... }
Function setter(String name) { ... }
Function method(String name) { ... }
Function factory(Type type) { ... }
// one list for every parameter
// first entry is the parameter type, the rest are the annotations for that parameter
List<List<Object>> parameters(typeOrFunction) { ... }
// annotations placed on the type or function
List<Object> annotations(typeOrFunction) { ... }
}
</code></pre></div>
<p dir="auto">This should be a singleton that is NOT injected via DI:</p>
<ul dir="auto">
<li>the js version should already include caching</li>
<li>the dart production version needs to replace the whole file and not just provide a different<br>
implementation as otherwise Mirrors would still be used by just loading the original file.</li>
<li>the <code class="notranslate">bind</code> helper method in DI relies on a singleton and would otherwise be hard to use</li>
</ul>
<p dir="auto">Example for Dart production version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="getters = {
"name" : (obj) => obj.name
"age" : (obj) => obj.age
}
methods = {
"methodName": (obj, args) => FuncionWrapper.apply(obj.methodName, args)
}
factories = {
Service : (a,b) => new Service(a,b)
}
parameters = {
Service: [[]],
myFactory: [[]]
}
annotations = {
Service: [[]],
myFactory: [[]]
}"><pre class="notranslate"><code class="notranslate">getters = {
"name" : (obj) => obj.name
"age" : (obj) => obj.age
}
methods = {
"methodName": (obj, args) => FuncionWrapper.apply(obj.methodName, args)
}
factories = {
Service : (a,b) => new Service(a,b)
}
parameters = {
Service: [[]],
myFactory: [[]]
}
annotations = {
Service: [[]],
myFactory: [[]]
}
</code></pre></div> | 0 |
<p dir="auto">by <strong>ficoos</strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Start a jsonrpc server
2. send {"jsonrpc":"2.0",
"method": "HeadCrash.CreateRepository",
"id": "1"}
3. Profit
What is the expected output?
Error similar to what happens when you send a request without a "method" field
rpc: service/method request ill-formed:
What do you see instead?
Go panics with "invalid memory address or nil pointer dereference"
net/rpc/jsonrpc.(*serverCodec).ReadRequestBody(0xf8400aa380, 0x54dfd0, 0xf840072cd0,
0x54dfd0, 0xf840072cd0, ...)
/home/user/projects/go/src/pkg/net/rpc/jsonrpc/server.go:97 +0x89
net/rpc.(*Server).readRequest(0xf84006d480, 0xf84006ddc0, 0xf8400aa380, 0xf84006d640,
0xf8400aa300, ...)
/home/user/projects/go/src/pkg/net/rpc/server.go:508 +0x23b
net/rpc.(*Server).ServeCodec(0xf84006d480, 0xf84006ddc0, 0xf8400aa380, 0x0)
/home/user/projects/go/src/pkg/net/rpc/server.go:408 +0x69
created by headcrash/dispatcher.DispatcherMain
/home/user/projects/headcrash/src/headcrash/dispatcher/dispatcher.go:66 +0x67d
Which compiler are you using (5g, 6g, 8g, gccgo)?
8g
Which operating system are you using?
linux
Which version are you using? (run 'go version')
go version go1.0.3
Please provide any additional information below.</pre> | <pre class="notranslate">I'm getting a reliable crash from a nil pointer dereference deep in the net/http
package, immediately after some data races. This occurs for a particular, large request
(112MB) that crashes the backend server and subsequently kills the proxy with the nil
pointer deference.
Attached are race logs and panic stack traces from go 1.2 and 1.2.1. The core proxy
code is also attached.</pre>
<p dir="auto">Attachments:</p>
<ol dir="auto">
<li><a href="https://storage.googleapis.com/go-attachment/7595/0/go1.2%20race%20and%20stack%20trace.txt" rel="nofollow">go1.2 race and stack trace.txt</a> (35107 bytes)</li>
<li><a href="https://storage.googleapis.com/go-attachment/7595/0/go1.2.1%20race%20and%20stack%20trace.txt" rel="nofollow">go1.2.1 race and stack trace.txt</a> (36204 bytes)</li>
<li><a href="https://storage.googleapis.com/go-attachment/7595/0/proxy.go" rel="nofollow">proxy.go</a> (6067 bytes)</li>
</ol> | 0 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.6</li>
<li>Operating System version: macos</li>
<li>Java version: jdk8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>consumer and provider are both used dubbo-2.7.6.</li>
<li>B , C as provider, A as consumer</li>
<li>B and C should be invoked in server-A, but the tag route was removed after the B invoke.</li>
<li>set tag route in A-server's method , and invoke B-server's method</li>
<li>the tag route was removed after B-server's method invoke.</li>
</ol>
<p dir="auto">for example:<br>
class A<br>
void invoke(){<br>
RpcContext.getContext().setAttachment(CommonConstants.TAG_KEY, "tag2");<br>
System.err.println("dubbo.tag:" + RpcContext.getContext().getAttachment(CommonConstants.TAG_KEY)); //dubbo.tag:tag2<br>
B.rpcInvoke();<br>
System.err.println("dubbo.tag:" + RpcContext.getContext().getAttachment(CommonConstants.TAG_KEY));<br>
//dubbo.tag:null<br>
C.rpcInvoke();<br>
RpcContext.getContext().getAttachment(CommonConstants.TAG_KEY));<br>
//dubbo.tag:null<br>
}</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">the tag route shouldn't remove</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">tag route was removed after once rpc invoke</p>
<p dir="auto">we saw the dubbo-resource:</p>
<p dir="auto">After once invoke, the ConsumerContextClusterInterceptor will remove the RpcContext.LOCAL.<br>
Is that reasonable?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.4</li>
<li>Operating System version: Windows 10</li>
<li>Java version: 1.8.0_172</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>add dubbo(2.6.4), dubbo-spring-boot-starter(1.5.17), spring-boot-starter(2.0.0.RELEASE) to pom.xml</li>
<li>add a spring boot start class</li>
<li>run and can the exception</li>
</ol>
<p dir="auto">Pls. provide [see file] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">Run successfully</p>
<h3 dir="auto">Actual Result</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IllegalStateException: Cannot load configuration class: com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration
......
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy"><pre class="notranslate"><code class="notranslate">java.lang.IllegalStateException: Cannot load configuration class: com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration
......
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
</code></pre></div>
<p dir="auto">full log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="D:\ProgramFiles\Java\jdk1.8.0_172\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=49591 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:\ProgramFiles\JetBrains\IntelliJ IDEA 2018.2.4\lib\idea_rt.jar=49592:D:\ProgramFiles\JetBrains\IntelliJ IDEA 2018.2.4\bin" -Dfile.encoding=UTF-8 -classpath D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\charsets.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\deploy.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\access-bridge-64.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\cldrdata.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\dnsns.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\jaccess.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\jfxrt.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\localedata.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\nashorn.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunec.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunjce_provider.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunmscapi.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunpkcs11.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\zipfs.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\javaws.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jce.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jfr.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jfxswt.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jsse.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\management-agent.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\plugin.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\resources.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\rt.jar;F:\idea-workspace\my\example\target\classes;E:\.m2\repository\org\springframework\boot\spring-boot-starter\1.5.17.RELEASE\spring-boot-starter-1.5.17.RELEASE.jar;E:\.m2\repository\org\springframework\boot\spring-boot\1.5.17.RELEASE\spring-boot-1.5.17.RELEASE.jar;E:\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\1.5.17.RELEASE\spring-boot-autoconfigure-1.5.17.RELEASE.jar;E:\.m2\repository\org\springframework\boot\spring-boot-starter-logging\1.5.17.RELEASE\spring-boot-starter-logging-1.5.17.RELEASE.jar;E:\.m2\repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;E:\.m2\repository\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;E:\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;E:\.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;E:\.m2\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;E:\.m2\repository\org\springframework\spring-core\4.3.20.RELEASE\spring-core-4.3.20.RELEASE.jar;E:\.m2\repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;E:\.m2\repository\com\alibaba\dubbo\2.6.4\dubbo-2.6.4.jar;E:\.m2\repository\org\springframework\spring-context\4.3.20.RELEASE\spring-context-4.3.20.RELEASE.jar;E:\.m2\repository\org\springframework\spring-aop\4.3.20.RELEASE\spring-aop-4.3.20.RELEASE.jar;E:\.m2\repository\org\springframework\spring-beans\4.3.20.RELEASE\spring-beans-4.3.20.RELEASE.jar;E:\.m2\repository\org\springframework\spring-expression\4.3.20.RELEASE\spring-expression-4.3.20.RELEASE.jar;E:\.m2\repository\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;E:\.m2\repository\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\.m2\repository\com\alibaba\boot\dubbo-spring-boot-starter\0.2.0\dubbo-spring-boot-starter-0.2.0.jar;E:\.m2\repository\org\apache\zookeeper\zookeeper\3.4.9\zookeeper-3.4.9.jar;E:\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;E:\.m2\repository\jline\jline\0.9.94\jline-0.9.94.jar;E:\.m2\repository\io\netty\netty\3.10.5.Final\netty-3.10.5.Final.jar;E:\.m2\repository\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;E:\.m2\repository\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;E:\.m2\repository\com\google\guava\guava\16.0.1\guava-16.0.1.jar;E:\.m2\repository\com\alibaba\boot\dubbo-spring-boot-autoconfigure\0.2.0\dubbo-spring-boot-autoconfigure-0.2.0.jar com.example.example.Application
2018-10-20 22:52:10.756 INFO 11160 --- [ main] c.a.dubbo.common.logger.LoggerFactory : using logger: com.alibaba.dubbo.common.logger.log4j.Log4jLoggerAdapter
2018-10-20 22:52:10.761 INFO 11160 --- [ main] a.b.d.c.e.WelcomeLogoApplicationListener :
:: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project
:: Dubbo (v2.6.4) : https://github.com/apache/incubator-dubbo
:: Google group : [email protected]
2018-10-20 22:52:10.765 INFO 11160 --- [ main] e.OverrideDubboConfigApplicationListener : Dubbo Config was overridden by externalized configuration {}
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.17.RELEASE)
2018-10-20 22:52:10.852 INFO 11160 --- [ main] com.example.example.Application : Starting Application on DESKTOP-FSRV3R2 with PID 11160 (F:\idea-workspace\my\example\target\classes started by MyPCAccountName in F:\idea-workspace\my\example)
2018-10-20 22:52:10.853 INFO 11160 --- [ main] com.example.example.Application : No active profile set, falling back to default profiles: default
2018-10-20 22:52:10.925 INFO 11160 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@51931956: startup date [Sat Oct 20 22:52:10 CST 2018]; root of context hierarchy
2018-10-20 22:52:11.455 ERROR 11160 --- [ main] o.s.boot.SpringApplication : Application startup failed
java.lang.IllegalStateException: Cannot load configuration class: com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration
at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:404) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:249) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:283) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:127) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.17.RELEASE.jar:1.5.17.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.17.RELEASE.jar:1.5.17.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.17.RELEASE.jar:1.5.17.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.17.RELEASE.jar:1.5.17.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.17.RELEASE.jar:1.5.17.RELEASE]
at com.example.example.Application.main(Application.java:14) [classes/:na]
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724) ~[na:1.8.0_172]
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531) ~[na:1.8.0_172]
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355) ~[na:1.8.0_172]
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286) ~[na:1.8.0_172]
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) ~[na:1.8.0_172]
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) ~[na:1.8.0_172]
at java.lang.reflect.Executable.declaredAnnotations(Executable.java:599) ~[na:1.8.0_172]
at java.lang.reflect.Executable.declaredAnnotations(Executable.java:597) ~[na:1.8.0_172]
at java.lang.reflect.Executable.getAnnotation(Executable.java:570) ~[na:1.8.0_172]
at java.lang.reflect.Method.getAnnotation(Method.java:622) ~[na:1.8.0_172]
at java.lang.reflect.AnnotatedElement.isAnnotationPresent(AnnotatedElement.java:258) ~[na:1.8.0_172]
at java.lang.reflect.AccessibleObject.isAnnotationPresent(AccessibleObject.java:191) ~[na:1.8.0_172]
at org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(AnnotatedElementUtils.java:614) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.BeanAnnotationHelper.isBeanAnnotated(BeanAnnotationHelper.java:33) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.isMatch(ConfigurationClassEnhancer.java:421) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$ConditionalCallbackFilter.accept(ConfigurationClassEnhancer.java:193) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.proxy.Enhancer.emitMethods(Enhancer.java:1108) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.proxy.Enhancer.generateClass(Enhancer.java:630) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.transform.TransformingClassGenerator.generateClass(TransformingClassGenerator.java:33) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanFactoryAwareGeneratorStrategy.generate(ConfigurationClassEnhancer.java:252) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.proxy.Enhancer.generate(Enhancer.java:492) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_172]
at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:480) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:337) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer.createClass(ConfigurationClassEnhancer.java:138) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:394) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
... 11 common frames omitted
2018-10-20 22:52:11.456 INFO 11160 --- [ main] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@51931956: startup date [Sat Oct 20 22:52:10 CST 2018]; root of context hierarchy
Process finished with exit code 1
"><pre class="notranslate"><code class="notranslate">D:\ProgramFiles\Java\jdk1.8.0_172\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=49591 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:\ProgramFiles\JetBrains\IntelliJ IDEA 2018.2.4\lib\idea_rt.jar=49592:D:\ProgramFiles\JetBrains\IntelliJ IDEA 2018.2.4\bin" -Dfile.encoding=UTF-8 -classpath D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\charsets.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\deploy.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\access-bridge-64.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\cldrdata.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\dnsns.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\jaccess.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\jfxrt.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\localedata.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\nashorn.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunec.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunjce_provider.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunmscapi.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunpkcs11.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\zipfs.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\javaws.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jce.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jfr.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jfxswt.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jsse.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\management-agent.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\plugin.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\resources.jar;D:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\rt.jar;F:\idea-workspace\my\example\target\classes;E:\.m2\repository\org\springframework\boot\spring-boot-starter\1.5.17.RELEASE\spring-boot-starter-1.5.17.RELEASE.jar;E:\.m2\repository\org\springframework\boot\spring-boot\1.5.17.RELEASE\spring-boot-1.5.17.RELEASE.jar;E:\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\1.5.17.RELEASE\spring-boot-autoconfigure-1.5.17.RELEASE.jar;E:\.m2\repository\org\springframework\boot\spring-boot-starter-logging\1.5.17.RELEASE\spring-boot-starter-logging-1.5.17.RELEASE.jar;E:\.m2\repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;E:\.m2\repository\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;E:\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;E:\.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;E:\.m2\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;E:\.m2\repository\org\springframework\spring-core\4.3.20.RELEASE\spring-core-4.3.20.RELEASE.jar;E:\.m2\repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;E:\.m2\repository\com\alibaba\dubbo\2.6.4\dubbo-2.6.4.jar;E:\.m2\repository\org\springframework\spring-context\4.3.20.RELEASE\spring-context-4.3.20.RELEASE.jar;E:\.m2\repository\org\springframework\spring-aop\4.3.20.RELEASE\spring-aop-4.3.20.RELEASE.jar;E:\.m2\repository\org\springframework\spring-beans\4.3.20.RELEASE\spring-beans-4.3.20.RELEASE.jar;E:\.m2\repository\org\springframework\spring-expression\4.3.20.RELEASE\spring-expression-4.3.20.RELEASE.jar;E:\.m2\repository\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;E:\.m2\repository\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\.m2\repository\com\alibaba\boot\dubbo-spring-boot-starter\0.2.0\dubbo-spring-boot-starter-0.2.0.jar;E:\.m2\repository\org\apache\zookeeper\zookeeper\3.4.9\zookeeper-3.4.9.jar;E:\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;E:\.m2\repository\jline\jline\0.9.94\jline-0.9.94.jar;E:\.m2\repository\io\netty\netty\3.10.5.Final\netty-3.10.5.Final.jar;E:\.m2\repository\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;E:\.m2\repository\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;E:\.m2\repository\com\google\guava\guava\16.0.1\guava-16.0.1.jar;E:\.m2\repository\com\alibaba\boot\dubbo-spring-boot-autoconfigure\0.2.0\dubbo-spring-boot-autoconfigure-0.2.0.jar com.example.example.Application
2018-10-20 22:52:10.756 INFO 11160 --- [ main] c.a.dubbo.common.logger.LoggerFactory : using logger: com.alibaba.dubbo.common.logger.log4j.Log4jLoggerAdapter
2018-10-20 22:52:10.761 INFO 11160 --- [ main] a.b.d.c.e.WelcomeLogoApplicationListener :
:: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project
:: Dubbo (v2.6.4) : https://github.com/apache/incubator-dubbo
:: Google group : [email protected]
2018-10-20 22:52:10.765 INFO 11160 --- [ main] e.OverrideDubboConfigApplicationListener : Dubbo Config was overridden by externalized configuration {}
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.17.RELEASE)
2018-10-20 22:52:10.852 INFO 11160 --- [ main] com.example.example.Application : Starting Application on DESKTOP-FSRV3R2 with PID 11160 (F:\idea-workspace\my\example\target\classes started by MyPCAccountName in F:\idea-workspace\my\example)
2018-10-20 22:52:10.853 INFO 11160 --- [ main] com.example.example.Application : No active profile set, falling back to default profiles: default
2018-10-20 22:52:10.925 INFO 11160 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@51931956: startup date [Sat Oct 20 22:52:10 CST 2018]; root of context hierarchy
2018-10-20 22:52:11.455 ERROR 11160 --- [ main] o.s.boot.SpringApplication : Application startup failed
java.lang.IllegalStateException: Cannot load configuration class: com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration
at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:404) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:249) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:283) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:127) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.17.RELEASE.jar:1.5.17.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.17.RELEASE.jar:1.5.17.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.17.RELEASE.jar:1.5.17.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.17.RELEASE.jar:1.5.17.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.17.RELEASE.jar:1.5.17.RELEASE]
at com.example.example.Application.main(Application.java:14) [classes/:na]
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724) ~[na:1.8.0_172]
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531) ~[na:1.8.0_172]
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355) ~[na:1.8.0_172]
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286) ~[na:1.8.0_172]
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) ~[na:1.8.0_172]
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) ~[na:1.8.0_172]
at java.lang.reflect.Executable.declaredAnnotations(Executable.java:599) ~[na:1.8.0_172]
at java.lang.reflect.Executable.declaredAnnotations(Executable.java:597) ~[na:1.8.0_172]
at java.lang.reflect.Executable.getAnnotation(Executable.java:570) ~[na:1.8.0_172]
at java.lang.reflect.Method.getAnnotation(Method.java:622) ~[na:1.8.0_172]
at java.lang.reflect.AnnotatedElement.isAnnotationPresent(AnnotatedElement.java:258) ~[na:1.8.0_172]
at java.lang.reflect.AccessibleObject.isAnnotationPresent(AccessibleObject.java:191) ~[na:1.8.0_172]
at org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(AnnotatedElementUtils.java:614) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.BeanAnnotationHelper.isBeanAnnotated(BeanAnnotationHelper.java:33) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.isMatch(ConfigurationClassEnhancer.java:421) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$ConditionalCallbackFilter.accept(ConfigurationClassEnhancer.java:193) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.proxy.Enhancer.emitMethods(Enhancer.java:1108) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.proxy.Enhancer.generateClass(Enhancer.java:630) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.transform.TransformingClassGenerator.generateClass(TransformingClassGenerator.java:33) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanFactoryAwareGeneratorStrategy.generate(ConfigurationClassEnhancer.java:252) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.proxy.Enhancer.generate(Enhancer.java:492) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_172]
at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:480) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:337) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer.createClass(ConfigurationClassEnhancer.java:138) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:394) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
... 11 common frames omitted
2018-10-20 22:52:11.456 INFO 11160 --- [ main] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@51931956: startup date [Sat Oct 20 22:52:10 CST 2018]; root of context hierarchy
Process finished with exit code 1
</code></pre></div>
<p dir="auto"><a href="https://github.com/apache/incubator-dubbo/files/2498250/example.zip">example.zip</a></p> | 0 |
<ul dir="auto">
<li>VSCode Version: 1.1.1</li>
<li>OS Version: 10.11.4</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Open a 3MB file with some repeating text at each line (<code class="notranslate">The quick brown fox jumps over the lazy dog</code></li>
<li>Highlight a word such as <code class="notranslate">quick</code></li>
<li>Do a multi-cursor select (CMD+SHIFT+L)</li>
<li>Edit <code class="notranslate">quick</code> to say <code class="notranslate">slow</code></li>
<li>Notice that not all lines were changed :( (stops at line 999 of a 35,397 line file)</li>
</ol> | <p dir="auto">I was playing around with the <code class="notranslate">editor.fontSize</code> setting in VSCode because I am a little nearsighted.<br>
Is there a way to also have the font either inherit the size from the <code class="notranslate">editor.fontSize</code> setting or create a new one for it?<br>
Keep in mind when you scale the font, the images to the left need to be scaled as well.</p> | 0 |
<p dir="auto">See log here: <a href="https://gist.github.com/sebv/914c9b73b48e4542bfeb">https://gist.github.com/sebv/914c9b73b48e4542bfeb</a> , the symlink to /mnt/ephemeral/docker/containers is not valid within container.</p>
<p dir="auto">This is a new issue on 1.1 (it's working on 1.0.7)</p>
<p dir="auto">On the node:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ubuntu@ip-172-20-0-155:~$ sudo ls -l /var/log/containers
total 80
lrwxrwxrwx 1 root root 171 Nov 23 21:24 elasticsearch-logging-v1-4yjm2_kube-system_elasticsearch-logging-b475872a10ac01e5fd94934a0860996db9611bfeeff74970ef14e4537beda041.log -> /mnt/ephemeral/docker/containers/b475872a10ac01e5fd94934a0860996db9611bfeeff74970ef14e4537beda041/b475872a10ac01e5fd94934a0860996db9611bfeeff74970ef14e4537beda041-json.log"><pre class="notranslate"><code class="notranslate">ubuntu@ip-172-20-0-155:~$ sudo ls -l /var/log/containers
total 80
lrwxrwxrwx 1 root root 171 Nov 23 21:24 elasticsearch-logging-v1-4yjm2_kube-system_elasticsearch-logging-b475872a10ac01e5fd94934a0860996db9611bfeeff74970ef14e4537beda041.log -> /mnt/ephemeral/docker/containers/b475872a10ac01e5fd94934a0860996db9611bfeeff74970ef14e4537beda041/b475872a10ac01e5fd94934a0860996db9611bfeeff74970ef14e4537beda041-json.log
</code></pre></div>
<p dir="auto">My version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" ~ kubectl version
Client Version: version.Info{Major:"1", Minor:"0+", GitVersion:"v1.0.8-beta.3+27719743e6b69e", GitCommit:"27719743e6b69e9526d5133b6d6b71cc6f1024c2", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"1", GitVersion:"v1.1.1", GitCommit:"92635e23dfafb2ddc828c8ac6c03c7a7205a84d8", GitTreeState:"clean"}"><pre class="notranslate"><code class="notranslate"> ~ kubectl version
Client Version: version.Info{Major:"1", Minor:"0+", GitVersion:"v1.0.8-beta.3+27719743e6b69e", GitCommit:"27719743e6b69e9526d5133b6d6b71cc6f1024c2", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"1", GitVersion:"v1.1.1", GitCommit:"92635e23dfafb2ddc828c8ac6c03c7a7205a84d8", GitTreeState:"clean"}
</code></pre></div> | <p dir="auto">It seems that there are potentially two separate issues here:</p>
<ul dir="auto">
<li>The inconsistent docker root due to a potential race between kubelet and docker.</li>
<li>The misconfiguration (on AWS) of fluentd to mount /var/lib/docker instead of /mnt/ephemeral/docker.</li>
</ul>
<p dir="auto">For the first issue, perhaps the kubelet should fail if it is not able to retrieve the docker root from docker info?</p>
<p dir="auto">An alternative solution would be to mount our volume for AWS to /var/lib/docker instead of /mnt/ephemeral/docker. This would solve both issues. But, it seems that the kubelet is providing the ability to dynamically locate the docker root for some reason.</p>
<h5 dir="auto">Details:</h5>
<p dir="auto">I'm having intermittent issues with fluentd pushing logs to elasticsearch. It seems that fluentd is unable to see the log files, even though it is able list the containers directory. This is happening on an AWS cluster.</p>
<p dir="auto">From inside the fluentd I see the following:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" root@fluentd-elasticsearch-ip-172-20-0-194:/# cat /varlog/containers/vapor-web-v1-x894w_vapor-alpha_nginx-521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491.log
cat: /varlog/containers/vapor-web-v1-x894w_vapor-alpha_nginx-521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491.log: No such file or directory"><pre class="notranslate"> root@fluentd-elasticsearch-ip-172-20-0-194:/<span class="pl-c"><span class="pl-c">#</span> cat /varlog/containers/vapor-web-v1-x894w_vapor-alpha_nginx-521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491.log</span>
cat: /varlog/containers/vapor-web-v1-x894w_vapor-alpha_nginx-521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491.log: No such file or directory</pre></div>
<p dir="auto">On AWS the log file symlinks look like this:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" root@fluentd-elasticsearch-ip-172-20-0-194:/# ls -al /varlog/containers/vapor-web-v1-x894w_*
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /varlog/containers/vapor-web-v1-x894w_vapor-alpha_POD-99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0.log -> /mnt/ephemeral/docker/containers/99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0/99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0-json.log
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /varlog/containers/vapor-web-v1-x894w_vapor-alpha_nginx-521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491.log -> /mnt/ephemeral/docker/containers/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491-json.log
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /varlog/containers/vapor-web-v1-x894w_vapor-alpha_vapor-unicorn-1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a.log -> /mnt/ephemeral/docker/containers/1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a/1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a-json.log"><pre class="notranslate"> root@fluentd-elasticsearch-ip-172-20-0-194:/<span class="pl-c"><span class="pl-c">#</span> ls -al /varlog/containers/vapor-web-v1-x894w_*</span>
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /varlog/containers/vapor-web-v1-x894w_vapor-alpha_POD-99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0.log -<span class="pl-k">></span> /mnt/ephemeral/docker/containers/99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0/99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0-json.log
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /varlog/containers/vapor-web-v1-x894w_vapor-alpha_nginx-521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491.log -<span class="pl-k">></span> /mnt/ephemeral/docker/containers/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491-json.log
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /varlog/containers/vapor-web-v1-x894w_vapor-alpha_vapor-unicorn-1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a.log -<span class="pl-k">></span> /mnt/ephemeral/docker/containers/1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a/1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a-json.log</pre></div>
<p dir="auto">Fluentd seems to expect that the symlinks will point to /var/lib/docker/containers but on AWS we use /mnt/ephemeral/docker/containers.</p>
<p dir="auto">From the node I see:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="root@ip-172-20-0-194:/home/ubuntu# ls -al /var/log/containers/vapor-web-v1-x894w_vapor-alpha_*
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /var/log/containers/vapor-web-v1-x894w_vapor-alpha_nginx-521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491.log -> /mnt/ephemeral/docker/containers/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491-json.log
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /var/log/containers/vapor-web-v1-x894w_vapor-alpha_POD-99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0.log -> /mnt/ephemeral/docker/containers/99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0/99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0-json.log
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /var/log/containers/vapor-web-v1-x894w_vapor-alpha_vapor-unicorn-1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a.log -> /mnt/ephemeral/docker/containers/1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a/1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a-json.log"><pre class="notranslate">root@ip-172-20-0-194:/home/ubuntu# ls -al /var/log/containers/vapor-web-v1-x894w_vapor-alpha_<span class="pl-k">*</span>
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /var/log/containers/vapor-web-v1-x894w_vapor-alpha_nginx-521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491.log -<span class="pl-k">></span> /mnt/ephemeral/docker/containers/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491-json.log
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /var/log/containers/vapor-web-v1-x894w_vapor-alpha_POD-99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0.log -<span class="pl-k">></span> /mnt/ephemeral/docker/containers/99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0/99cd13b12f2b45275f5a3bcb7537d08ce722c48d66e3e21b57ad0563d5f2d8c0-json.log
lrwxrwxrwx 1 root root 171 Aug 27 18:03 /var/log/containers/vapor-web-v1-x894w_vapor-alpha_vapor-unicorn-1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a.log -<span class="pl-k">></span> /mnt/ephemeral/docker/containers/1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a/1e5233b3d6d2e8c92c8534dd61d46b4aadc7766d54423eb17425682d678bad9a-json.log</pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" root@ip-172-20-0-194:/home/ubuntu# cat /mnt/ephemeral/docker/containers/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491-json.log | tail -n 5
{"log":"172.20.0.70 - - [28/Aug/2015:17:29:26 +0000] \"GET / HTTP/1.1\" 302 116 \"-\" \"Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)\"\n","stream":"stdout","time":"2015-08-28T17:29:26.242591558Z"}
{"log":"172.20.0.70 - - [28/Aug/2015:17:29:26 +0000] \"GET /users/sign_in HTTP/1.1\" 200 1954 \"-\" \"Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)\"\n","stream":"stdout","time":"2015-08-28T17:29:26.265429648Z"}
{"log":"2015/08/28 17:29:26 [info] 5#5: *58423 client 172.20.0.70 closed keepalive connection\n","stream":"stdout","time":"2015-08-28T17:29:26.271201715Z"}
{"log":"2015/08/28 17:29:38 [info] 5#5: *58426 client closed connection while waiting for request, client: 172.20.0.171, server: 0.0.0.0:80\n","stream":"stdout","time":"2015-08-28T17:29:38.549273837Z"}
{"log":"2015/08/28 17:29:46 [info] 5#5: *58427 client closed connection while waiting for request, client: 172.20.0.33, server: 0.0.0.0:80\n","stream":"stdout","time":"2015-08-28T17:29:46.549263618Z"}"><pre class="notranslate"> root@ip-172-20-0-194:/home/ubuntu# cat /mnt/ephemeral/docker/containers/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491/521e74369e30312a32806b018e62ef81d6a606dd87c0772aaacc2461ae84e491-json.log <span class="pl-k">|</span> tail -n 5
{<span class="pl-s"><span class="pl-pds">"</span>log<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>172.20.0.70 - - [28/Aug/2015:17:29:26 +0000] <span class="pl-cce">\"</span>GET / HTTP/1.1<span class="pl-cce">\"</span> 302 116 <span class="pl-cce">\"</span>-<span class="pl-cce">\"</span> <span class="pl-cce">\"</span>Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)<span class="pl-cce">\"</span>\n<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>stream<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>stdout<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>time<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>2015-08-28T17:29:26.242591558Z<span class="pl-pds">"</span></span>}
{<span class="pl-s"><span class="pl-pds">"</span>log<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>172.20.0.70 - - [28/Aug/2015:17:29:26 +0000] <span class="pl-cce">\"</span>GET /users/sign_in HTTP/1.1<span class="pl-cce">\"</span> 200 1954 <span class="pl-cce">\"</span>-<span class="pl-cce">\"</span> <span class="pl-cce">\"</span>Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)<span class="pl-cce">\"</span>\n<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>stream<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>stdout<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>time<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>2015-08-28T17:29:26.265429648Z<span class="pl-pds">"</span></span>}
{<span class="pl-s"><span class="pl-pds">"</span>log<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>2015/08/28 17:29:26 [info] 5#5: *58423 client 172.20.0.70 closed keepalive connection\n<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>stream<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>stdout<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>time<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>2015-08-28T17:29:26.271201715Z<span class="pl-pds">"</span></span>}
{<span class="pl-s"><span class="pl-pds">"</span>log<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>2015/08/28 17:29:38 [info] 5#5: *58426 client closed connection while waiting for request, client: 172.20.0.171, server: 0.0.0.0:80\n<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>stream<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>stdout<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>time<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>2015-08-28T17:29:38.549273837Z<span class="pl-pds">"</span></span>}
{<span class="pl-s"><span class="pl-pds">"</span>log<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>2015/08/28 17:29:46 [info] 5#5: *58427 client closed connection while waiting for request, client: 172.20.0.33, server: 0.0.0.0:80\n<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>stream<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>stdout<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>time<span class="pl-pds">"</span></span>:<span class="pl-s"><span class="pl-pds">"</span>2015-08-28T17:29:46.549263618Z<span class="pl-pds">"</span></span>}</pre></div> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by Rémy Roy (<a href="https://github.com/remyroy">@remyroy</a>)</strong></p>
<p dir="auto">IF EXISTS and IF NOT EXISTS are already part of many DBMSs DDL vocabulary. They have many use cases which are highly useful in some situations.</p>
<p dir="auto">For instance, creating a table if it does not already exists or dropping a column if it exists.</p>
<p dir="auto">It would be nice to have those directives with standard SQLAlchemy DDL methods. I guess they could be implemented using the native support for DBMSs that support them or with some introspection for those that do not.</p> | <h3 dir="auto">Describe the bug</h3>
<p dir="auto">When using <strong>SQLAlchemy</strong> with <strong>PyMySQL</strong> driver and attempting to add a conflicting resource which is unique by the name, <code class="notranslate">pymysql.err.IntegrityError</code> is being raised, where instead <code class="notranslate">SQLAlchemy.exc.IntegrityError</code> should be wrapping the driver exception.</p>
<h3 dir="auto">To Reproduce</h3>
<h4 dir="auto">Model</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
class Test(CustomModel):
__tablename__ = "tests"
id = Column(Integer, primary_key=True)
name = Column(String(255), unique=True, nullable=False)
def __init__(self, **kwargs) -> None:
self.name = kwargs['name']"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Test</span>(<span class="pl-v">CustomModel</span>):
<span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">"tests"</span>
<span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-v">Column</span>(<span class="pl-v">String</span>(<span class="pl-c1">255</span>), <span class="pl-s1">unique</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">nullable</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
<span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">-></span> <span class="pl-c1">None</span>:
<span class="pl-s1">self</span>.<span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s1">kwargs</span>[<span class="pl-s">'name'</span>]</pre></div>
<h4 dir="auto">Database init</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class DatabaseManager:
"""Manage database sessions and model creation."""
def __init__(self, config: dict) -> None:
self.uri = '{}://{}:{}@{}:{}/{}'.format(
config.drivers,
config.user,
config.password,
config.host,
config.port,
config.name
)
self.engine = sqlalchemy.create_engine(self.uri)
self.session = scoping.scoped_session(
sessionmaker(
bind=self.engine,
autocommit=False
)
)
@property
def session(self) -> object:
"""Retrieve database session."""
return self._session
@session.setter
def session(self, value: object) -> None:
"""Set default database session."""
self._session = value"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">DatabaseManager</span>:
<span class="pl-s">"""Manage database sessions and model creation."""</span>
<span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">config</span>: <span class="pl-s1">dict</span>) <span class="pl-c1">-></span> <span class="pl-c1">None</span>:
<span class="pl-s1">self</span>.<span class="pl-s1">uri</span> <span class="pl-c1">=</span> <span class="pl-s">'{}://{}:{}@{}:{}/{}'</span>.<span class="pl-en">format</span>(
<span class="pl-s1">config</span>.<span class="pl-s1">drivers</span>,
<span class="pl-s1">config</span>.<span class="pl-s1">user</span>,
<span class="pl-s1">config</span>.<span class="pl-s1">password</span>,
<span class="pl-s1">config</span>.<span class="pl-s1">host</span>,
<span class="pl-s1">config</span>.<span class="pl-s1">port</span>,
<span class="pl-s1">config</span>.<span class="pl-s1">name</span>
)
<span class="pl-s1">self</span>.<span class="pl-s1">engine</span> <span class="pl-c1">=</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-en">create_engine</span>(<span class="pl-s1">self</span>.<span class="pl-s1">uri</span>)
<span class="pl-s1">self</span>.<span class="pl-s1">session</span> <span class="pl-c1">=</span> <span class="pl-s1">scoping</span>.<span class="pl-en">scoped_session</span>(
<span class="pl-en">sessionmaker</span>(
<span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">engine</span>,
<span class="pl-s1">autocommit</span><span class="pl-c1">=</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">session</span>(<span class="pl-s1">self</span>) <span class="pl-c1">-></span> <span class="pl-s1">object</span>:
<span class="pl-s">"""Retrieve database session."""</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-s1">_session</span>
<span class="pl-en">@<span class="pl-s1">session</span>.<span class="pl-s1">setter</span></span>
<span class="pl-k">def</span> <span class="pl-en">session</span>(<span class="pl-s1">self</span>, <span class="pl-s1">value</span>: <span class="pl-s1">object</span>) <span class="pl-c1">-></span> <span class="pl-c1">None</span>:
<span class="pl-s">"""Set default database session."""</span>
<span class="pl-s1">self</span>.<span class="pl-s1">_session</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span></pre></div>
<h4 dir="auto">Add object</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" test = Test(**data)
session = app.db.session()
try:
session.add(test)
except exc.IntegrityError as error:
app.logger.error("Object '%s' already exists in the database.", object_name)
raise exceptions.Conflict(f"Object '{object_name}' already exists.") from error
else:
session.commit()"><pre class="notranslate"> <span class="pl-s1">test</span> <span class="pl-c1">=</span> <span class="pl-v">Test</span>(<span class="pl-c1">**</span><span class="pl-s1">data</span>)
<span class="pl-s1">session</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span>.<span class="pl-s1">db</span>.<span class="pl-en">session</span>()
<span class="pl-k">try</span>:
<span class="pl-s1">session</span>.<span class="pl-en">add</span>(<span class="pl-s1">test</span>)
<span class="pl-k">except</span> <span class="pl-s1">exc</span>.<span class="pl-v">IntegrityError</span> <span class="pl-k">as</span> <span class="pl-s1">error</span>:
<span class="pl-s1">app</span>.<span class="pl-s1">logger</span>.<span class="pl-en">error</span>(<span class="pl-s">"Object '%s' already exists in the database."</span>, <span class="pl-s1">object_name</span>)
<span class="pl-k">raise</span> <span class="pl-s1">exceptions</span>.<span class="pl-v">Conflict</span>(<span class="pl-s">f"Object '<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">object_name</span><span class="pl-kos">}</span></span>' already exists."</span>) <span class="pl-k">from</span> <span class="pl-s1">error</span>
<span class="pl-k">else</span>:
<span class="pl-s1">session</span>.<span class="pl-en">commit</span>()</pre></div>
<h3 dir="auto">Error</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2022-03-19 11:38:24,615] ERROR in exceptions: An exception has occurred internally. Reason: '(pymysql.err.IntegrityError) (1062, "Duplicate entry 'testobj' for key 'name_index'")
[SQL: INSERT INTO tests (name) VALUES (%(name)s)]
[parameters: {'name': 'testobj'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)'"><pre class="notranslate"><code class="notranslate">[2022-03-19 11:38:24,615] ERROR in exceptions: An exception has occurred internally. Reason: '(pymysql.err.IntegrityError) (1062, "Duplicate entry 'testobj' for key 'name_index'")
[SQL: INSERT INTO tests (name) VALUES (%(name)s)]
[parameters: {'name': 'testobj'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)'
</code></pre></div>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>OS: Ubuntu 20.04.4 LTS</li>
<li>Python: Python 3.7.12 (default, Feb 8 2022, 11:05:33)</li>
<li>SQLAlchemy: SQLAlchemy==1.4.32</li>
<li>Database: 10.5.5-MariaDB-1:10.5.5+maria~focal</li>
<li>DBAPI (eg: psycopg, cx_oracle, mysqlclient): PyMySQL==1.0.2</li>
</ul>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p> | 0 |
<p dir="auto">I've set up a rudimentary server on AWS EC2 (Debian Linux) running Deno 1.9.1 with an SSL certificate from Let's Encrypt. It simply serves a static HTML file when dealing with a GET request for "/", and returns a 404 for all other requests.</p>
<p dir="auto">It works fine for a while, and then starts hanging on all requests after a seemingly random amount of time. The code is the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { listenAndServeTLS } from "https://deno.land/std/http/server.ts";
const options = {
hostname: "www.example.org",
port: 443,
certFile: "./keys/cert.pem",
keyFile: "./keys/key.pem",
};
const index = await Deno.readTextFile("./static/index.html");
const notFound = await Deno.readTextFile("./static/notfound.html");
listenAndServeTLS(options, (req) =>{
let statusCode, content;
if (req.url === "/") {
statusCode = 200;
content = index;
} else {
statusCode = 404;
content = notFound;
}
console.log(`${statusCode} ${req.method} ${req.url}`);
req.respond({
status: statusCode,
headers: new Headers({
"content-type": "text/html",
}),
body: content,
});
});"><pre class="notranslate"><code class="notranslate">import { listenAndServeTLS } from "https://deno.land/std/http/server.ts";
const options = {
hostname: "www.example.org",
port: 443,
certFile: "./keys/cert.pem",
keyFile: "./keys/key.pem",
};
const index = await Deno.readTextFile("./static/index.html");
const notFound = await Deno.readTextFile("./static/notfound.html");
listenAndServeTLS(options, (req) =>{
let statusCode, content;
if (req.url === "/") {
statusCode = 200;
content = index;
} else {
statusCode = 404;
content = notFound;
}
console.log(`${statusCode} ${req.method} ${req.url}`);
req.respond({
status: statusCode,
headers: new Headers({
"content-type": "text/html",
}),
body: content,
});
});
</code></pre></div>
<p dir="auto">After the server starts hanging, curl outputs the following (and hangs as well):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to www.example.org (127.0.0.1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* Operation timed out after 300401 milliseconds with 0 out of 0 bytes received
* Closing connection 0
curl: (28) Operation timed out after 300401 milliseconds with 0 out of 0 bytes received"><pre class="notranslate"><code class="notranslate">* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to www.example.org (127.0.0.1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* Operation timed out after 300401 milliseconds with 0 out of 0 bytes received
* Closing connection 0
curl: (28) Operation timed out after 300401 milliseconds with 0 out of 0 bytes received
</code></pre></div>
<p dir="auto">Am I doing something wrong? I'm starting a big project based on Deno and this is blocking.</p> | <p dir="auto">Okay, this is a very strange issue, so I'm not very sure where to put this. Let's say I have this Deno HTTPS server:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { serveTLS } from "https://deno.land/[email protected]/http/server.ts";
const server = serveTLS({
port: 443,
hostname: "0.0.0.0",
certFile: "cert/fullchain.pem",
keyFile: "cert/key.pem",
});
for await (const req of server) {
(async () => {
const file = await Deno.open("image.png");
await req.respond({
headers: new Headers({
"Content-Type": "image/png",
}),
body: file,
});
await req.done;
file.close();
})();
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">serveTLS</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"https://deno.land/[email protected]/http/server.ts"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">server</span> <span class="pl-c1">=</span> <span class="pl-en">serveTLS</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">port</span>: <span class="pl-c1">443</span><span class="pl-kos">,</span>
<span class="pl-c1">hostname</span>: <span class="pl-s">"0.0.0.0"</span><span class="pl-kos">,</span>
<span class="pl-c1">certFile</span>: <span class="pl-s">"cert/fullchain.pem"</span><span class="pl-kos">,</span>
<span class="pl-c1">keyFile</span>: <span class="pl-s">"cert/key.pem"</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">for</span> <span class="pl-k">await</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">req</span> <span class="pl-k">of</span> <span class="pl-s1">server</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">file</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">open</span><span class="pl-kos">(</span><span class="pl-s">"image.png"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-en">respond</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">headers</span>: <span class="pl-k">new</span> <span class="pl-smi">Headers</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-s">"Content-Type"</span>: <span class="pl-s">"image/png"</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
<span class="pl-c1">body</span>: <span class="pl-s1">file</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">await</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">done</span><span class="pl-kos">;</span>
<span class="pl-s1">file</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Using the following image file:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11262022/110100122-58a03380-7da2-11eb-86ac-1693f29cc460.png"><img src="https://user-images.githubusercontent.com/11262022/110100122-58a03380-7da2-11eb-86ac-1693f29cc460.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I'm on Windows 10.0.19042.804.</p>
<p dir="auto">(Edit) Deno version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno 1.8.0 (release, x86_64-pc-windows-msvc)
v8 9.0.257.3
typescript 4.2.2"><pre class="notranslate"><code class="notranslate">deno 1.8.0 (release, x86_64-pc-windows-msvc)
v8 9.0.257.3
typescript 4.2.2
</code></pre></div>
<p dir="auto">On Windows, when I request this server from a browser or curl, it seems to only load the first 64KiB and then hang the request:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11262022/110100340-94d39400-7da2-11eb-8c90-f089c9304e69.png"><img src="https://user-images.githubusercontent.com/11262022/110100340-94d39400-7da2-11eb-8c90-f089c9304e69.png" alt="2021-03-05_11-04-11" style="max-width: 100%;"></a></p>
<p dir="auto">If I run the same program in Deno in WSL (1) it works completely fine.</p>
<p dir="auto">Also if I try to set the file to a 2.5MB JS file, it loads the entire file fine on Windows too, and doesn't hang the request, so there seems to be something that ONLY fails for Windows + binary files going on here.</p>
<p dir="auto">Am I doing something wrong in my code?</p> | 1 |
<p dir="auto">I updated to latest version, the syntax highlight is only partially working for ES6. Here is my jsconfig.json at the root of project:<br>
{<br>
"compilerOptions": {<br>
"target": "ES6",<br>
"module": "commonjs"<br>
}<br>
}</p>
<p dir="auto">keywords such as "if", "return", "default" are colored correctly, but keywords such as "let", "import" are not. I am using react with file extension as .js</p> | <p dir="auto">0.10.10 (Feburary build) has a regression is that the following JavaScript keywords are no longer highlighted in the Dark Visual Studio & Light Visual Studio themes:<br>
<code class="notranslate">var</code> <code class="notranslate">let</code> <code class="notranslate">const</code> <code class="notranslate">function</code> <code class="notranslate">get</code> <code class="notranslate">set</code> <code class="notranslate">class</code> <code class="notranslate">interface</code> <code class="notranslate">module</code> <code class="notranslate">namespace</code></p>
<p dir="auto">This only affects JavaScript (not TypeScript).<br>
The workaround if to switch to the Dark+ Default and Light+ theme.</p>
<p dir="auto">Note that there are other colorizing issues open, not caused by this regression: e.g. 'import' and 'from'. See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="125145725" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript-TmLanguage/issues/37" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript-TmLanguage/issues/37/hovercard" href="https://github.com/microsoft/TypeScript-TmLanguage/issues/37">microsoft/TypeScript-TmLanguage#37</a></p> | 1 |
<p dir="auto">I really think you should be able to drag file and folders to copy/move them in the file tree. I don't know why you can't do that.</p> | <p dir="auto">Would be awesome to be able to drag and drop files between folders in the file tree right in Atom. I like the text-based rename feature that lets you move files between folders, but drag and drop feels more natural to me having gotten used to it in TextMate.</p> | 1 |
<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">This issue exists in the latest npm version</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I am using the latest npm</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">npm WARN config global <code class="notranslate">--global</code>, <code class="notranslate">--local</code> are deprecated. Use <code class="notranslate">--location=global</code> instead.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">no more"npm WARN config global <code class="notranslate">--global</code>, <code class="notranslate">--local</code> are deprecated. Use <code class="notranslate">--location=global</code> instead."</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>In this environment...</li>
<li>With this config...</li>
<li>Run '...'</li>
<li>See error...</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>npm:8.15.0</li>
<li>Node.js:16.15.1</li>
<li>OS Name:Win10</li>
<li>System Model Name:Omen 16</li>
<li>npm config:</li>
</ul>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="C:\Users\Tang>npm help npm
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead."><pre class="notranslate">C:\Users\Tang>npm help npm
npm WARN config global `--global`, `--local` are deprecated. Use `--<span class="pl-k">location</span>=global` instead.</pre></div> | <h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">This issue exists in the latest npm version</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I am using the latest npm</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">current version of npm (8.11.0, node 16.15.1) writes a warning to STDERR on every command, that is a warning about using deprecated options. The message is...</p>
<p dir="auto"><code class="notranslate">npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.</code></p>
<p dir="auto">The message is written to STDERR regardless of whether or not the command run uses the --global or --local options. For example, the command...</p>
<p dir="auto">npm -v</p>
<p dir="auto">outputs the message, even though -v is the only option used, and writes to STDERR, even though it states it's purpose to be a warning, not an error, and the command still executes successfully.</p>
<p dir="auto">The result for my organization is to break our nightly builds. Our builds need to monitor STDERR for REAL build errors, which also use STDERR to capture a variety of aberrant build conditions including security vulnerabilities that are reported back to the build pipeline via STDERR in a script that runs "npm audit" and analyzes the results.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18708621/171736746-431947f2-430d-4b29-b33f-c84284757d21.png"><img src="https://user-images.githubusercontent.com/18708621/171736746-431947f2-430d-4b29-b33f-c84284757d21.png" alt="npm-warn" style="max-width: 100%;"></a></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">IMHO, this warning should only be written if the deprecated options are used, and should be written to STDOUT since it is not an error, just a warning.</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>In Windows...</li>
<li>Running node 16.15.1 and npm 8.11.0</li>
<li>Run any npm command, i.e. npm -v</li>
<li>See results...<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18708621/171734613-188a0d55-ad69-4b02-b7d0-26f1e15320d5.png"><img src="https://user-images.githubusercontent.com/18708621/171734613-188a0d55-ad69-4b02-b7d0-26f1e15320d5.png" alt="npm output" style="max-width: 100%;"></a></li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>npm: 8.11.0</li>
<li>Node.js: 16.15.1</li>
<li>OS Name: Windows 10</li>
<li>System Model Name: Dell Precision 5500 series</li>
<li>npm config:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="; "user" config from C:\Users\xxxx\.npmrc
cafile = "C:\\cert\\OGS_int_CA.pem"
; node bin location = C:\Program Files\nodejs\node.exe
; node version = v16.15.1
; npm local prefix = C:\Users\xxxx
; npm version = 8.11.0
; cwd = C:\Users\xxxx
; HOME = C:\Users\xxxx
; Run `npm config ls -l` to show all defaults."><pre class="notranslate"><code class="notranslate">; "user" config from C:\Users\xxxx\.npmrc
cafile = "C:\\cert\\OGS_int_CA.pem"
; node bin location = C:\Program Files\nodejs\node.exe
; node version = v16.15.1
; npm local prefix = C:\Users\xxxx
; npm version = 8.11.0
; cwd = C:\Users\xxxx
; HOME = C:\Users\xxxx
; Run `npm config ls -l` to show all defaults.
</code></pre></div> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=stevewickii" rel="nofollow">Stephen M. Wick</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3797?redirect=false" rel="nofollow">SPR-3797</a></strong> and commented</p>
<p dir="auto">Through Spring v2.0.2, MethodInvokingJobDetailFactoryBean cannot be used within a clustered Quartz deployment.</p>
<p dir="auto">I am attaching a cluster-safe version of Spring's MethodInvokingJobDetailFactoryBean, and a new BeanInvokingJobDetailFactoryBean for your review and possible inclusion in the Spring framework offering.</p>
<p dir="auto">MethodInvokingJobDetailFactoryBean can be used to invoke a method on a Java Object. The Object and method arguments must be Serializable. Alternatively, you can configure this FactoryBean to invoke a Static method on any Class by specifying the name of the Class, as a String, and the name of the Static Method to invoke. Again, the method arguments must be Serializable. (See the JavaDoc within the source for more information)</p>
<p dir="auto">BeanInvokingJobDetailFactoryBean can be used to invoke a method on any bean defined within the Spring ApplicationContext. The method arguments must be Serializable. (See the JavaDoc within the source for more information)</p>
<p dir="auto">Note : As of Quartz 1.6.0 there is a bug that prevents Objects from being Serialized to the MS SQL Server (required for Quartz Clustering). (See <a href="http://forums.opensymphony.com/messa...ssageID=128249" rel="nofollow">http://forums.opensymphony.com/messa...ssageID=128249</a>)<br>
Therefore, the following limitations apply to those using MS SQL Server until Quartz 1.6.1 is released:<br>
MethodInvokingJobDetailFactoryBean is restricted to Static No-Arg Method Invocation.<br>
BeanInvokingJobDetailFactoryBean is restricted to No-Arg Method Invocation.</p>
<p dir="auto">Please let me know if you have issues with these FactoryBeans. I am also looking for feedback on how useful, or not, these components are.</p>
<p dir="auto">I hope these components save you time and effort!</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.0 RC1, 1.0 RC2, 1.0 final, 1.0.1, 1.0.2, 1.1 RC1, 1.1 RC2, 1.1 final, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.2 RC1, 1.2 RC2, 1.2 final, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.2.8, 2.0 M1, 2.0 M2, 2.0 M3, 2.0 M4, 2.0 M5, 2.0 RC1, 2.0 RC2, 2.0 RC3, 2.0 RC4, 2.0 final, 2.0.1, 2.0.2, 1.2.9</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/12821/BeanInvokingJobDetailFactoryBean.java" rel="nofollow">BeanInvokingJobDetailFactoryBean.java</a> (<em>18.93 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/12820/MethodInvokingJobDetailFactoryBean.java" rel="nofollow">MethodInvokingJobDetailFactoryBean.java</a> (<em>19.47 kB</em>)</li>
</ul>
<p dir="auto">3 votes, 4 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=juergen.hoeller" rel="nofollow">Juergen Hoeller</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-69?redirect=false" rel="nofollow">SPR-69</a></strong> and commented</p>
<p dir="auto">Support for defining validation rules on beans via source markup.</p>
<p dir="auto">Support for declarative assignment of PropertyValidationRules to bean properties via Spring-IoC, through a scripting environment such as Groovy/Beanshell, or programatically in plain Java.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.2 RC1</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="398097026" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10704" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10704/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10704">#10704</a> Validation: Initial support for dependency injection of a JSR-303 Validator (<em><strong>"depends on"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398086031" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9205" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9205/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9205">#9205</a> Integration of SpringMVC with Hibernate Validator (<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="398089549" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9650" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9650/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9650">#9650</a> Provide integrated support for validation within <code class="notranslate">@MVC</code> lifecycle (<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="398088010" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9451" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9451/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9451">#9451</a> <code class="notranslate">@Validator</code>, <code class="notranslate">@Validate</code></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398092800" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10091" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10091/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10091">#10091</a> Integrating validation into the <code class="notranslate">@MVC</code> request lifecycle</li>
</ul>
<p dir="auto">14 votes, 13 watchers</p> | 0 |
<p dir="auto">When I pick Settings in the dropdown menu, profile.json opens in Visual Studio. This is slow. I would like to open it in a smaller/faster editor. I suppose it opens in VS due to my windows file extension settings for .json files. I don't wan't to change this setting, but I would like a seperate setting where I can choose my editor.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">With the new feature:</p>
<ol dir="auto">
<li>I will somehow pick editor for editing settings.</li>
<li>When I choose to edit settings, profile.json opens in the editor from 1)</li>
</ol> | <h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto">Add new field in settings containing profiles to use on startup. Currently present default profile should be used only for new tab functionality and as a fallback when startup profiles are not defined (for example after update).</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">For ease of use new field should accept both string with GUID of a single profile and array of strings and if it's not present at all it should fallback to default</p> | 0 |
<p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-serial/1538/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-serial/1538/</a></p>
<p dir="auto">Failed: [k8s.io] [HPA] Horizontal pod autoscaling (scale resource: CPU) [k8s.io] [Serial] [Slow] ReplicationController Should scale from 1 pod to 3 pods and from 3 to 5 and verify decision stability {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/horizontal_pod_autoscaling.go:70
Jun 15 11:37:41.767: Number of replicas has changed: expected 3, got 4"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:70
Jun 15 11:37:41.767: Number of replicas has changed: expected 3, got 4
</code></pre></div> | <p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-subnet/3097/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-subnet/3097/</a></p>
<p dir="auto">Failed: Horizontal pod autoscaling (scale resource: CPU) [Serial] [Slow] ReplicationController Should scale from 1 pod to 3 pods and from 3 to 5 and verify decision stability {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/horizontal_pod_autoscaling.go:72
Jun 12 14:01:32.286: Number of replicas has changed: expected 3, got 4"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:72
Jun 12 14:01:32.286: Number of replicas has changed: expected 3, got 4
</code></pre></div> | 1 |
<h3 dir="auto">Bug summary</h3>
<p dir="auto">The line <code class="notranslate">fig, ax = plt.subplots(nrows=1, ncols=2, figsize=[12,6])</code> results in the following warning message:</p>
<p dir="auto"><code class="notranslate">MatplotlibDeprecationWarning: The resize_event function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use callbacks.process('resize_event', ResizeEvent(...)) instead.</code></p>
<h3 dir="auto">Code for reproduction</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
fig, ax = plt.subplots(nrows=1, ncols=2, figsize=[12,6])"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>(<span class="pl-s1">nrows</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">ncols</span><span class="pl-c1">=</span><span class="pl-c1">2</span>, <span class="pl-s1">figsize</span><span class="pl-c1">=</span>[<span class="pl-c1">12</span>,<span class="pl-c1">6</span>])</pre></div>
<h3 dir="auto">Actual outcome</h3>
<p dir="auto"><code class="notranslate">MatplotlibDeprecationWarning: The resize_event function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use callbacks.process('resize_event', ResizeEvent(...)) instead.</code><br>
<code class="notranslate">fig, ax = plt.subplots(nrows=1, ncols=2, figsize=[12,6])</code></p>
<h3 dir="auto">Expected outcome</h3>
<p dir="auto">No warning message.</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.6.0</p>
<h3 dir="auto">Matplotlib Backend</h3>
<p dir="auto">MacOSX</p>
<h3 dir="auto">Python version</h3>
<p dir="auto">3.10.6</p>
<h3 dir="auto">Jupyter version</h3>
<p dir="auto">6.4.12</p>
<h3 dir="auto">Installation</h3>
<p dir="auto">pip</p> | <h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Using GTK3Cairo, TkCairo, and Qt5Cairo cause specgram() y-axis data to appear to rotate 180 degrees, while x-axis data is correct. Compared with, for example, Qt5Agg, TkAgg, and GTK3Agg.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<p dir="auto">MWE (from comment <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="343213251" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/11715" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/11715/hovercard?comment_id=406735726&comment_type=issue_comment" href="https://github.com/matplotlib/matplotlib/issues/11715#issuecomment-406735726">#11715 (comment)</a>):</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ax1 = plt.subplot(212)
x = np.random.rand(20, 20)
x[3, :] = 19.
ax1.imshow(x)
plt.show()"><pre class="notranslate"><span class="pl-s1">ax1</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">212</span>)
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">20</span>, <span class="pl-c1">20</span>)
<span class="pl-s1">x</span>[<span class="pl-c1">3</span>, :] <span class="pl-c1">=</span> <span class="pl-c1">19.</span>
<span class="pl-s1">ax1</span>.<span class="pl-en">imshow</span>(<span class="pl-s1">x</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto">ORIGINAL MWE:<br>
(code pulled from <a href="https://matplotlib.org/gallery/images_contours_and_fields/specgram_demo.html#sphx-glr-gallery-images-contours-and-fields-specgram-demo-py" rel="nofollow">https://matplotlib.org/gallery/images_contours_and_fields/specgram_demo.html#sphx-glr-gallery-images-contours-and-fields-specgram-demo-py</a> and modified to include matplotlib.use(...) only)</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Paste your code here
#
import matplotlib
#matplotlib.use("Qt5Cairo")# BAD - rotation
#matplotlib.use("TkCairo")# BAD - rotation
#matplotlib.use("GTK3Cairo")# BAD - rotation
matplotlib.use("Qt5Agg")# Good
#matplotlib.use("TkAgg")# Good
#matplotlib.use("GTK3Agg")# Good
#matplotlib.use("WebAgg")# Good
#%valid strings are ['GTK', 'GTKAgg', 'GTKCairo', 'GTK3Agg', 'GTK3Cairo', 'MacOSX', 'nbAgg', 'Qt4Agg', 'Qt4Cairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo', 'gdk', 'pdf', 'pgf', 'ps', 'svg', 'template']
import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np.random.seed(19680801)
dt = 0.0005
t = np.arange(0.0, 20.0, dt)
s1 = np.sin(2 * np.pi * 100 * t)
s2 = 2 * np.sin(2 * np.pi * 400 * t)
# create a transient "chirp"
mask = np.where(np.logical_and(t > 10, t < 12), 1.0, 0.0)
s2 = s2 * mask
# add some noise into the mix
nse = 0.01 * np.random.random(size=len(t))
x = s1 + s2 + nse # the signal
NFFT = 1024 # the length of the windowing segments
Fs = int(1.0 / dt) # the sampling frequency
# Pxx is the segments x freqs array of instantaneous power, freqs is
# the frequency vector, bins are the centers of the time bins in which
# the power is computed, and im is the matplotlib.image.AxesImage
# instance
ax1 = plt.subplot(211)
plt.plot(t, x)
plt.subplot(212, sharex=ax1)
Pxx, freqs, bins, im = plt.specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900)
plt.show()"><pre class="notranslate"><span class="pl-c"># Paste your code here</span>
<span class="pl-c">#</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>
<span class="pl-c">#matplotlib.use("Qt5Cairo")# BAD - rotation</span>
<span class="pl-c">#matplotlib.use("TkCairo")# BAD - rotation</span>
<span class="pl-c">#matplotlib.use("GTK3Cairo")# BAD - rotation</span>
<span class="pl-s1">matplotlib</span>.<span class="pl-en">use</span>(<span class="pl-s">"Qt5Agg"</span>)<span class="pl-c"># Good</span>
<span class="pl-c">#matplotlib.use("TkAgg")# Good</span>
<span class="pl-c">#matplotlib.use("GTK3Agg")# Good</span>
<span class="pl-c">#matplotlib.use("WebAgg")# Good</span>
<span class="pl-c">#%valid strings are ['GTK', 'GTKAgg', 'GTKCairo', 'GTK3Agg', 'GTK3Cairo', 'MacOSX', 'nbAgg', 'Qt4Agg', 'Qt4Cairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo', 'gdk', 'pdf', 'pgf', 'ps', 'svg', 'template']</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-c"># Fixing random state for reproducibility</span>
<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">seed</span>(<span class="pl-c1">19680801</span>)
<span class="pl-s1">dt</span> <span class="pl-c1">=</span> <span class="pl-c1">0.0005</span>
<span class="pl-s1">t</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0.0</span>, <span class="pl-c1">20.0</span>, <span class="pl-s1">dt</span>)
<span class="pl-s1">s1</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">sin</span>(<span class="pl-c1">2</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-s1">pi</span> <span class="pl-c1">*</span> <span class="pl-c1">100</span> <span class="pl-c1">*</span> <span class="pl-s1">t</span>)
<span class="pl-s1">s2</span> <span class="pl-c1">=</span> <span class="pl-c1">2</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">sin</span>(<span class="pl-c1">2</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-s1">pi</span> <span class="pl-c1">*</span> <span class="pl-c1">400</span> <span class="pl-c1">*</span> <span class="pl-s1">t</span>)
<span class="pl-c"># create a transient "chirp"</span>
<span class="pl-s1">mask</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">where</span>(<span class="pl-s1">np</span>.<span class="pl-en">logical_and</span>(<span class="pl-s1">t</span> <span class="pl-c1">></span> <span class="pl-c1">10</span>, <span class="pl-s1">t</span> <span class="pl-c1"><</span> <span class="pl-c1">12</span>), <span class="pl-c1">1.0</span>, <span class="pl-c1">0.0</span>)
<span class="pl-s1">s2</span> <span class="pl-c1">=</span> <span class="pl-s1">s2</span> <span class="pl-c1">*</span> <span class="pl-s1">mask</span>
<span class="pl-c"># add some noise into the mix</span>
<span class="pl-s1">nse</span> <span class="pl-c1">=</span> <span class="pl-c1">0.01</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>(<span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-en">len</span>(<span class="pl-s1">t</span>))
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">s1</span> <span class="pl-c1">+</span> <span class="pl-s1">s2</span> <span class="pl-c1">+</span> <span class="pl-s1">nse</span> <span class="pl-c"># the signal</span>
<span class="pl-v">NFFT</span> <span class="pl-c1">=</span> <span class="pl-c1">1024</span> <span class="pl-c"># the length of the windowing segments</span>
<span class="pl-v">Fs</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-c1">1.0</span> <span class="pl-c1">/</span> <span class="pl-s1">dt</span>) <span class="pl-c"># the sampling frequency</span>
<span class="pl-c"># Pxx is the segments x freqs array of instantaneous power, freqs is</span>
<span class="pl-c"># the frequency vector, bins are the centers of the time bins in which</span>
<span class="pl-c"># the power is computed, and im is the matplotlib.image.AxesImage</span>
<span class="pl-c"># instance</span>
<span class="pl-s1">ax1</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">211</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">t</span>, <span class="pl-s1">x</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">212</span>, <span class="pl-s1">sharex</span><span class="pl-c1">=</span><span class="pl-s1">ax1</span>)
<span class="pl-v">Pxx</span>, <span class="pl-s1">freqs</span>, <span class="pl-s1">bins</span>, <span class="pl-s1">im</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">specgram</span>(<span class="pl-s1">x</span>, <span class="pl-v">NFFT</span><span class="pl-c1">=</span><span class="pl-v">NFFT</span>, <span class="pl-v">Fs</span><span class="pl-c1">=</span><span class="pl-v">Fs</span>, <span class="pl-s1">noverlap</span><span class="pl-c1">=</span><span class="pl-c1">900</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5010253/43019235-e6150a30-8c21-11e8-89c6-2f5732ccb268.png"><img src="https://user-images.githubusercontent.com/5010253/43019235-e6150a30-8c21-11e8-89c6-2f5732ccb268.png" alt="cairo_backend" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5010253/43019207-cdf5315a-8c21-11e8-9eb4-9218990fbc26.png"><img src="https://user-images.githubusercontent.com/5010253/43019207-cdf5315a-8c21-11e8-9eb4-9218990fbc26.png" alt="agg_backend" style="max-width: 100%;"></a></p>
<p dir="auto">Unsure whether this issue occurred in previous versions...</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Windows 10 and Mingw64</li>
<li>Matplotlib version: 2.2.2<br>
<em>WORKING</em></li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): Qt5Agg, TkAgg, GTK3Agg, WebAgg, etc.<br>
<em>NOT WORKING</em></li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): Qt5Cairo, TkCairo, GTK3Cairo, cairo</li>
<li>Python version: 3.6.5 (Anaconda3), 3.7.0 (Mingw64)</li>
<li>Other libraries: numpy</li>
</ul>
<p dir="auto">For <code class="notranslate">conda</code> (Anaconda3), matplotlib installed from default channels<br>
For <code class="notranslate">mingw</code> (MSYS2), matplotlib installed using <code class="notranslate">pacman -S mingw-w64-x86_64-python3-matplotlib</code> (2.2.2-2 mingw64)</p>
<p dir="auto">For GTK-based backends, GTK and GObject, including all dependencies were installed following Windows directions from: <a href="https://pygobject.readthedocs.io/en/latest/getting_started.html" rel="nofollow">https://pygobject.readthedocs.io/en/latest/getting_started.html</a> However, I used <code class="notranslate">x86_64</code> versions instead of <code class="notranslate">i686</code> versions.</p>
<p dir="auto"><strong>Note</strong><br>
It is unclear to me whether this is a Matplotlib bug, or due to Cairo. I do not have any other Cairo-based issues except for Matplotlib's <code class="notranslate">specgram()</code>.</p> | 0 |
<ul dir="auto">
<li>VSCode Version: 1.0.0</li>
<li>OS Version: Windows 10 10586.218</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Create new file</li>
<li>Type anything</li>
<li>Close visual studio code or file. Below alert will display:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7344772/15090192/1fee2f80-1450-11e6-8f0d-e38529fc8924.png"><img src="https://cloud.githubusercontent.com/assets/7344772/15090192/1fee2f80-1450-11e6-8f0d-e38529fc8924.png" alt="vsc" style="max-width: 100%;"></a></li>
</ol>
<p dir="auto">Either save or not save, the shortcut key are same. I don't think it's a good idea.</p> | <p dir="auto">The test plan for the December iteration plan <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="119924764" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/917" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/917/hovercard" href="https://github.com/microsoft/vscode/issues/917">#917</a>.</p>
<h3 dir="auto">Debug - long text wraps in repl</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> win <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexandrudima/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexandrudima">@alexandrudima</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> mac <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jrieken/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jrieken">@jrieken</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> linux <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sofianhn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sofianhn">@sofianhn</a></li>
</ul>
<p dir="auto">Verify that long text now nicely wraps across multiple lines in the debug repl both for evaluation requests and for output text.</p>
<h3 dir="auto">Debug - breakpoint state</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> win <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexandrudima/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexandrudima">@alexandrudima</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> mac <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jrieken/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jrieken">@jrieken</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> linux <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/aeschli/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aeschli">@aeschli</a></li>
</ul>
<p dir="auto">We have changed breakpoints states and now show it differently in the UI. Verify:</p>
<ul dir="auto">
<li>new UI properly and intuitivly reflects if breakpoints are enabled, disabled, verified or deactivated.</li>
<li>breakpoints get hit / not hit depending on their enablement state</li>
</ul>
<h3 dir="auto">Debug - extension debugging</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> win <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dbaeumer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dbaeumer">@dbaeumer</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> mac <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sofianhn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sofianhn">@sofianhn</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> linux <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/aeschli/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aeschli">@aeschli</a></li>
</ul>
<p dir="auto">Extension debugging is now using a new strategy to attach the debugger to the extension</p>
<ul dir="auto">
<li>verify you can debug your extension as before</li>
<li>verify you can restart debugging from the debugger side and the debugger reconnects properly</li>
<li>verify you can change folders or refresh on the extension development side and the debugger reconnects</li>
<li>verify closing the extension development side stops debugging</li>
<li>verify stopping the session from the debugger closes the extension development window</li>
</ul>
<h3 dir="auto">Update - channel from settings</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> win <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexandrudima/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexandrudima">@alexandrudima</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> mac <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/joaomoreno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/joaomoreno">@joaomoreno</a></li>
</ul>
<p dir="auto">Verify you can change the update channel from settings.</p>
<h3 dir="auto">View - persisted zoom settings</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> win <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dbaeumer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dbaeumer">@dbaeumer</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> mac | linux <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/weinand/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/weinand">@weinand</a></li>
</ul>
<p dir="auto">Verify you can change and persist the zoom factor for windows.</p>
<ul dir="auto">
<li>negative and positive values work</li>
<li>the zoom actions are still working as before but do not persist</li>
<li>the change is live</li>
</ul>
<h3 dir="auto">Quick open - Path and Fuzzy matching</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> win <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/aeschli/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aeschli">@aeschli</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> mac | linux <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/isidorn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/isidorn">@isidorn</a></li>
</ul>
<p dir="auto">Unless you include a path character in your query or enabled fuzzy matching, quick open for files should work as before:</p>
<ul dir="auto">
<li>results are sorted properly with most relevant ones to the top</li>
<li>editor history always comes first on top of matching file results</li>
<li>if you narrow down a search, subsequent matching is fast and does not go to the disk (verify with a larger workspace)</li>
</ul>
<p dir="auto">Verify the new support to match on paths if included in search</p>
<ul dir="auto">
<li>using the native path separator in the search enables matching on (workspace relative) paths for both editor history results and file matching</li>
<li>more relevant results are still sorted to the top</li>
<li>results are highlighted properly also in their path segment</li>
</ul>
<p dir="auto">Verify the new support for fuzzy file matching</p>
<ul dir="auto">
<li>find and enable the new setting to enable fuzzy matching for quick open. this will only enable fuzzy matching for file search, it should not have any impact to other quick open providers, nor the editor history search</li>
<li>verify results from file searches match on the entire (workspace relative) path of the file without having to use the native path separator</li>
<li>verify matching happens in substrings of the path, not requiring the characters to be in sequence (e.g. "fr" would match "<strong>f</strong>oo_ba<strong>r</strong>")</li>
<li>more relevant results are sorted to the top</li>
</ul>
<h3 dir="auto">Extensions info in status bar <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="121193177" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/1123" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/vscode/pull/1123/hovercard" href="https://github.com/microsoft/vscode/pull/1123">#1123</a></h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> win <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bpasero/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bpasero">@bpasero</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> mac <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/egamma/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/egamma">@egamma</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> linux <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sofianhn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sofianhn">@sofianhn</a></li>
</ul>
<p dir="auto">Verify that the extensions status shows up in the status bar if you have extension errors. Verify clicking on the status bar shows all the error / warning messages to the user and that you can uninstall the extension via action in message.</p> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="nyuszika7h@cadoth ~/src > git clone https://github.com/kennethreitz/requests.git
Cloning into 'requests'...
remote: Counting objects: 18867, done.
remote: Compressing objects: 100% (11/11), done.
error: object 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: badTimezone: invalid author/committer line - bad time zone
fatal: Error in object
fatal: index-pack failed"><pre class="notranslate"><code class="notranslate">nyuszika7h@cadoth ~/src > git clone https://github.com/kennethreitz/requests.git
Cloning into 'requests'...
remote: Counting objects: 18867, done.
remote: Compressing objects: 100% (11/11), done.
error: object 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: badTimezone: invalid author/committer line - bad time zone
fatal: Error in object
fatal: index-pack failed
</code></pre></div> | <p dir="auto">I can't clone this repo. It complains:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ git clone https://github.com/kennethreitz/requests
Cloning into 'requests'...
remote: Counting objects: 17048, done.
remote: Compressing objects: 100% (39/39), done.
error: object 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: badTimezone: invalid author/committer line - bad time zone
fatal: Error in object
fatal: index-pack failed"><pre class="notranslate"><code class="notranslate">$ git clone https://github.com/kennethreitz/requests
Cloning into 'requests'...
remote: Counting objects: 17048, done.
remote: Compressing objects: 100% (39/39), done.
error: object 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: badTimezone: invalid author/committer line - bad time zone
fatal: Error in object
fatal: index-pack failed
</code></pre></div> | 1 |
<p dir="auto">When I change the transitions in the default variables (like: <a href="https://material-ui-1dab0.firebaseapp.com/customization/themes/#the-other-variables" rel="nofollow">https://material-ui-1dab0.firebaseapp.com/customization/themes/#the-other-variables</a>), the app throws me the following error:<br>
<code class="notranslate">TypeError: theme.transitions.create is not a function</code></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">The framework should use <strong>MY</strong> default transitions that I put on the createMuiTheme function.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The app throws me the following error:<br>
<code class="notranslate">TypeError: theme.transitions.create is not a function</code></p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const materialTheme = createMuiTheme({
transitions: {
easing: {
easeInOut: 'cubic-bezier(0.6, 0, 0.2, 1)',
easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',
easeIn: 'cubic-bezier(0.6, 0, 1, 1)',
sharp: 'cubic-bezier(0.6, 0, 0.6, 1)'
},
duration: {
shortest: 150,
shorter: 200,
short: 250,
standard: 300,
complex: 375,
enteringScreen: 225,
leavingScreen: 195
}
}
});
<MuiThemeProvider theme={materialTheme}>
<Button raised color="accent">
Mui Button
</Button>
</MuiThemeProvider>"><pre class="notranslate"><code class="notranslate">const materialTheme = createMuiTheme({
transitions: {
easing: {
easeInOut: 'cubic-bezier(0.6, 0, 0.2, 1)',
easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',
easeIn: 'cubic-bezier(0.6, 0, 1, 1)',
sharp: 'cubic-bezier(0.6, 0, 0.6, 1)'
},
duration: {
shortest: 150,
shorter: 200,
short: 250,
standard: 300,
complex: 375,
enteringScreen: 225,
leavingScreen: 195
}
}
});
<MuiThemeProvider theme={materialTheme}>
<Button raised color="accent">
Mui Button
</Button>
</MuiThemeProvider>
</code></pre></div>
<h2 dir="auto">Context</h2>
<p dir="auto">The application doesn't compile.</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.9</td>
</tr>
<tr>
<td>React</td>
<td>15.6.1</td>
</tr>
</tbody>
</table> | <h2 dir="auto">Summary</h2>
<p dir="auto">There's a similar issue in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="119258658" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/2302" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/2302/hovercard" href="https://github.com/mui/material-ui/issues/2302">#2302</a>.<br>
Currently, this library did not provide TextFieldBox yet. Therefore I wanted to know if the team will implement it or not. The specification can be found <a href="https://material.io/guidelines/components/text-fields.html#text-fields-field-variations" rel="nofollow">here</a>.<br>
It's appearance would look something like this :<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/23183656/32844112-83e2a728-ca5c-11e7-8ac7-71331f81c9e2.png"><img src="https://user-images.githubusercontent.com/23183656/32844112-83e2a728-ca5c-11e7-8ac7-71331f81c9e2.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Moreover, this design is also widely adopted in the latest Google Calendar App :<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/23183656/32844161-a6bf369e-ca5c-11e7-980a-ce9aed7b34e8.png"><img src="https://user-images.githubusercontent.com/23183656/32844161-a6bf369e-ca5c-11e7-980a-ce9aed7b34e8.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">Conclusion</h2>
<p dir="auto">I hope that this component will be implemented soon, as I personally felt that it has a better UX compared to the singe-line text field.</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> | 0 |
<h1 dir="auto">🚀 Feature request</h1>
<p dir="auto">Ensure reproducibility when loading pretrained models.</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">In order to distribute results in a transparent manner, it is important to ensure reproducibility.</p>
<p dir="auto">When loading a pretrained model, I cannot get the same weights, probably due to non-initialized weights.<br>
Even when using <code class="notranslate">set_seed</code>, I cannot get twice the same models.</p>
<h2 dir="auto">Your contribution</h2>
<p dir="auto">I created a <a href="https://colab.research.google.com/gist/borisdayma/efa9ce5e8c7078bf12031b525f21f107/transformers-repeatability.ipynb" rel="nofollow">small example</a> to illustrate the issue.</p> | <h3 dir="auto">System Info</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ transformers-cli env
2022-05-05 11:22:48.908890: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
WARNING:tensorflow:From /home/arnold/bin/anaconda/envs/nlp/lib/python3.8/site-packages/transformers/commands/env.py:50: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.config.list_physical_devices('GPU')` instead.
2022-05-05 11:22:50.917777: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-05-05 11:22:50.920262: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2022-05-05 11:22:50.920313: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2022-05-05 11:22:50.921473: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:50.921634: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:08:00.0 name: NVIDIA GeForce RTX 2080 Ti computeCapability: 7.5
coreClock: 1.545GHz coreCount: 68 deviceMemorySize: 10.76GiB deviceMemoryBandwidth: 573.69GiB/s
2022-05-05 11:22:50.921654: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
2022-05-05 11:22:50.966290: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.10
2022-05-05 11:22:50.966413: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.10
2022-05-05 11:22:51.048655: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2022-05-05 11:22:51.054988: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2022-05-05 11:22:51.100060: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10
2022-05-05 11:22:51.106893: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.10
2022-05-05 11:22:51.187096: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.7
2022-05-05 11:22:51.187319: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:51.187572: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:51.187671: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2022-05-05 11:22:51.188275: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
2022-05-05 11:22:52.310987: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2022-05-05 11:22:52.311023: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267] 0
2022-05-05 11:22:52.311030: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0: N
2022-05-05 11:22:52.311832: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:52.312058: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:52.312219: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:52.312331: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/device:GPU:0 with 9224 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce RTX 2080 Ti, pci bus id: 0000:08:00.0, compute capability: 7.5)
Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.
- `transformers` version: 4.14.1
- Platform: Linux-5.13.0-40-lowlatency-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyTorch version (GPU?): 1.11.0+cu102 (True)
- Tensorflow version (GPU?): 2.4.1 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>"><pre class="notranslate">$ transformers-cli env
2022-05-05 11:22:48.908890: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
WARNING:tensorflow:From /home/arnold/bin/anaconda/envs/nlp/lib/python3.8/site-packages/transformers/commands/env.py:50: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed <span class="pl-k">in</span> a future version.
Instructions <span class="pl-k">for</span> updating:
Use <span class="pl-s"><span class="pl-pds">`</span>tf.config.list_physical_devices(<span class="pl-s"><span class="pl-pds">'</span>GPU<span class="pl-pds">'</span></span>)<span class="pl-pds">`</span></span> instead.
2022-05-05 11:22:50.917777: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions <span class="pl-k">in</span> performance-critical operations: SSE4.1 SSE4.2 AVX AVX2 FMA
To <span class="pl-c1">enable</span> them <span class="pl-k">in</span> other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-05-05 11:22:50.920262: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not <span class="pl-c1">set</span>
2022-05-05 11:22:50.920313: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2022-05-05 11:22:50.921473: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node <span class="pl-c1">read</span> from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:50.921634: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:08:00.0 name: NVIDIA GeForce RTX 2080 Ti computeCapability: 7.5
coreClock: 1.545GHz coreCount: 68 deviceMemorySize: 10.76GiB deviceMemoryBandwidth: 573.69GiB/s
2022-05-05 11:22:50.921654: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
2022-05-05 11:22:50.966290: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.10
2022-05-05 11:22:50.966413: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.10
2022-05-05 11:22:51.048655: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2022-05-05 11:22:51.054988: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2022-05-05 11:22:51.100060: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10
2022-05-05 11:22:51.106893: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.10
2022-05-05 11:22:51.187096: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.7
2022-05-05 11:22:51.187319: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node <span class="pl-c1">read</span> from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:51.187572: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node <span class="pl-c1">read</span> from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:51.187671: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2022-05-05 11:22:51.188275: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
2022-05-05 11:22:52.310987: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2022-05-05 11:22:52.311023: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267] 0
2022-05-05 11:22:52.311030: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0: N
2022-05-05 11:22:52.311832: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node <span class="pl-c1">read</span> from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:52.312058: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node <span class="pl-c1">read</span> from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:52.312219: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node <span class="pl-c1">read</span> from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-05 11:22:52.312331: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/device:GPU:0 with 9224 MB memory) -<span class="pl-k">></span> physical GPU (device: 0, name: NVIDIA GeForce RTX 2080 Ti, pci bus id: 0000:08:00.0, compute capability: 7.5)
Copy-and-paste the text below <span class="pl-k">in</span> your GitHub issue and FILL OUT the two last points.
- <span class="pl-s"><span class="pl-pds">`</span>transformers<span class="pl-pds">`</span></span> version: 4.14.1
- Platform: Linux-5.13.0-40-lowlatency-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyTorch version (GPU<span class="pl-k">?</span>): 1.11.0+cu102 (True)
- Tensorflow version (GPU<span class="pl-k">?</span>): 2.4.1 (True)
- Flax version (CPU<span class="pl-k">?</span>/GPU<span class="pl-k">?</span>/TPU<span class="pl-k">?</span>): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU <span class="pl-k">in</span> script<span class="pl-k">?</span>: <span class="pl-k"><</span>fill in<span class="pl-k">></span>
- Using distributed or parallel set-up <span class="pl-k">in</span> script<span class="pl-k">?</span>: <span class="pl-k"><</span>fill in<span class="pl-k">></span></pre></div>
<h3 dir="auto">Who can help?</h3>
<p dir="auto">I cannot install transformers and datasets into the same conda environment. When I do that and try to import transformers inti python I get the error: ImportError: cannot import name 'create_repo' from 'huggingface_hub' (/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/huggingface_hub/<strong>init</strong>.py)</p>
<p dir="auto">When install these libraries without the other I can import that library.</p>
<p dir="auto">The problem arises when I try to duplicate the examples of chapter 2, page 33 of the book 'Natural language processing with transformers'. Up untill that page everything was ok.</p>
<h3 dir="auto">Information</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> The official example scripts</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> My own modified scripts</li>
</ul>
<h3 dir="auto">Tasks</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> An officially supported task in the <code class="notranslate">examples</code> folder (such as GLUE/SQuAD, ...)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> My own task or dataset (give details below)</li>
</ul>
<h3 dir="auto">Reproduction</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ conda create -n test transformers datasets torch
$ python
Python 3.8.13 (default, Mar 28 2022, 11:38:47)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import transformers
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/__init__.py", line 43, in <module>
from . import dependency_versions_check
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/dependency_versions_check.py", line 36, in <module>
from .file_utils import is_tokenizers_available
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/file_utils.py", line 52, in <module>
from huggingface_hub import HfFolder, Repository, create_repo, list_repo_files, whoami
ImportError: cannot import name 'create_repo' from 'huggingface_hub' (/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/huggingface_hub/__init__.py)
>>>
"><pre class="notranslate"><code class="notranslate">$ conda create -n test transformers datasets torch
$ python
Python 3.8.13 (default, Mar 28 2022, 11:38:47)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import transformers
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/__init__.py", line 43, in <module>
from . import dependency_versions_check
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/dependency_versions_check.py", line 36, in <module>
from .file_utils import is_tokenizers_available
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/file_utils.py", line 52, in <module>
from huggingface_hub import HfFolder, Repository, create_repo, list_repo_files, whoami
ImportError: cannot import name 'create_repo' from 'huggingface_hub' (/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/huggingface_hub/__init__.py)
>>>
</code></pre></div>
<p dir="auto">I did some experiments to try to determine the cause of the error. The output you can find below.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
$ conda create -n test transformers
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/arnold/bin/anaconda/envs/test
added / updated specs:
- transformers
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2022.4.26 | h06a4308_0 124 KB
ninja-1.10.2 | h06a4308_5 8 KB
ninja-base-1.10.2 | hd09550d_5 109 KB
numpy-1.21.5 | py39he7a7128_2 10 KB
numpy-base-1.21.5 | py39hf524024_2 4.9 MB
pytorch-1.10.2 |cpu_py39hfa7516b_0 44.1 MB
setuptools-61.2.0 | py39h06a4308_0 1011 KB
tokenizers-0.10.3 | py39hb317417_1 2.4 MB
tqdm-4.64.0 | py39h06a4308_0 126 KB
urllib3-1.26.9 | py39h06a4308_0 180 KB
xz-5.2.5 | h7f8727e_1 339 KB
------------------------------------------------------------
Total: 53.2 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
_openmp_mutex pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
blas pkgs/main/linux-64::blas-1.0-mkl
brotlipy pkgs/main/linux-64::brotlipy-0.7.0-py39h27cfd23_1003
ca-certificates pkgs/main/linux-64::ca-certificates-2022.4.26-h06a4308_0
certifi pkgs/main/linux-64::certifi-2021.10.8-py39h06a4308_2
cffi pkgs/main/linux-64::cffi-1.15.0-py39hd667e15_1
charset-normalizer pkgs/main/noarch::charset-normalizer-2.0.4-pyhd3eb1b0_0
click pkgs/main/linux-64::click-8.0.4-py39h06a4308_0
cryptography pkgs/main/linux-64::cryptography-36.0.0-py39h9ce1e76_0
dataclasses pkgs/main/noarch::dataclasses-0.8-pyh6d0b6a4_7
filelock pkgs/main/noarch::filelock-3.6.0-pyhd3eb1b0_0
future pkgs/main/linux-64::future-0.18.2-py39h06a4308_1
huggingface_hub pkgs/main/noarch::huggingface_hub-0.2.1-pyhd3eb1b0_0
idna pkgs/main/noarch::idna-3.3-pyhd3eb1b0_0
importlib-metadata pkgs/main/linux-64::importlib-metadata-4.11.3-py39h06a4308_0
importlib_metadata pkgs/main/noarch::importlib_metadata-4.11.3-hd3eb1b0_0
intel-openmp pkgs/main/linux-64::intel-openmp-2021.4.0-h06a4308_3561
joblib pkgs/main/noarch::joblib-1.1.0-pyhd3eb1b0_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.35.1-h7274673_9
libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.3.0-h5101ec6_17
libgomp pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.3.0-hd4cf53a_17
mkl pkgs/main/linux-64::mkl-2021.4.0-h06a4308_640
mkl-service pkgs/main/linux-64::mkl-service-2.4.0-py39h7f8727e_0
mkl_fft pkgs/main/linux-64::mkl_fft-1.3.1-py39hd3c417c_0
mkl_random pkgs/main/linux-64::mkl_random-1.2.2-py39h51133e4_0
ncurses pkgs/main/linux-64::ncurses-6.3-h7f8727e_2
ninja pkgs/main/linux-64::ninja-1.10.2-h06a4308_5
ninja-base pkgs/main/linux-64::ninja-base-1.10.2-hd09550d_5
numpy pkgs/main/linux-64::numpy-1.21.5-py39he7a7128_2
numpy-base pkgs/main/linux-64::numpy-base-1.21.5-py39hf524024_2
openssl pkgs/main/linux-64::openssl-1.1.1n-h7f8727e_0
packaging pkgs/main/noarch::packaging-21.3-pyhd3eb1b0_0
pip pkgs/main/linux-64::pip-21.2.4-py39h06a4308_0
pycparser pkgs/main/noarch::pycparser-2.21-pyhd3eb1b0_0
pyopenssl pkgs/main/noarch::pyopenssl-22.0.0-pyhd3eb1b0_0
pyparsing pkgs/main/noarch::pyparsing-3.0.4-pyhd3eb1b0_0
pysocks pkgs/main/linux-64::pysocks-1.7.1-py39h06a4308_0
python pkgs/main/linux-64::python-3.9.12-h12debd9_0
pytorch pkgs/main/linux-64::pytorch-1.10.2-cpu_py39hfa7516b_0
pyyaml pkgs/main/linux-64::pyyaml-6.0-py39h7f8727e_1
readline pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
regex pkgs/main/linux-64::regex-2022.3.15-py39h7f8727e_0
requests pkgs/main/noarch::requests-2.27.1-pyhd3eb1b0_0
sacremoses pkgs/main/noarch::sacremoses-0.0.43-pyhd3eb1b0_0
setuptools pkgs/main/linux-64::setuptools-61.2.0-py39h06a4308_0
six pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1
sqlite pkgs/main/linux-64::sqlite-3.38.2-hc218d9a_0
tk pkgs/main/linux-64::tk-8.6.11-h1ccaba5_0
tokenizers pkgs/main/linux-64::tokenizers-0.10.3-py39hb317417_1
tqdm pkgs/main/linux-64::tqdm-4.64.0-py39h06a4308_0
transformers pkgs/main/noarch::transformers-4.14.1-pyhd3eb1b0_0
typing-extensions pkgs/main/noarch::typing-extensions-4.1.1-hd3eb1b0_0
typing_extensions pkgs/main/noarch::typing_extensions-4.1.1-pyh06a4308_0
tzdata pkgs/main/noarch::tzdata-2022a-hda174b7_0
urllib3 pkgs/main/linux-64::urllib3-1.26.9-py39h06a4308_0
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
xz pkgs/main/linux-64::xz-5.2.5-h7f8727e_1
yaml pkgs/main/linux-64::yaml-0.2.5-h7b6447c_0
zipp pkgs/main/noarch::zipp-3.7.0-pyhd3eb1b0_0
zlib pkgs/main/linux-64::zlib-1.2.12-h7f8727e_2
Proceed ([y]/n)?
Downloading and Extracting Packages
pytorch-1.10.2 | 44.1 MB | ######################################################### | 100%
tqdm-4.64.0 | 126 KB | ######################################################### | 100%
ninja-base-1.10.2 | 109 KB | ######################################################### | 100%
numpy-1.21.5 | 10 KB | ######################################################### | 100%
tokenizers-0.10.3 | 2.4 MB | ######################################################### | 100%
numpy-base-1.21.5 | 4.9 MB | ######################################################### | 100%
ca-certificates-2022 | 124 KB | ######################################################### | 100%
xz-5.2.5 | 339 KB | ######################################################### | 100%
urllib3-1.26.9 | 180 KB | ######################################################### | 100%
ninja-1.10.2 | 8 KB | ######################################################### | 100%
setuptools-61.2.0 | 1011 KB | ######################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate test
#
# To deactivate an active environment, use
#
# $ conda deactivate
$ conda activate test
$ conda install datasets
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:
- feature:/linux-64::__glibc==2.34=0
- python=3.9 -> libgcc-ng[version='>=7.5.0'] -> __glibc[version='>=2.17']
Your installed version is: 2.34
$ conda create -n test transformers datasets
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/arnold/bin/anaconda/envs/test
added / updated specs:
- datasets
- transformers
The following packages will be downloaded:
package | build
---------------------------|-----------------
abseil-cpp-20210324.2 | h2531618_0 965 KB
arrow-cpp-3.0.0 | py38h6b21186_4 7.1 MB
boost-cpp-1.73.0 | h27cfd23_11 25 KB
conllu-4.4.1 | pyhd3eb1b0_0 23 KB
datasets-1.12.1 | pyhd3eb1b0_0 193 KB
dill-0.3.4 | pyhd3eb1b0_0 61 KB
double-conversion-3.1.5 | he6710b0_1 235 KB
fsspec-2022.2.0 | pyhd3eb1b0_0 98 KB
gflags-2.2.2 | he6710b0_0 126 KB
glog-0.5.0 | h2531618_0 101 KB
grpc-cpp-1.39.0 | hae934f6_5 2.8 MB
huggingface_hub-0.0.17 | pyhd3eb1b0_0 59 KB
libcurl-7.82.0 | h0b77cf5_0 342 KB
libevent-2.1.12 | h8f2d780_0 425 KB
libprotobuf-3.17.2 | h4ff587b_1 2.0 MB
libssh2-1.10.0 | h8f2d780_0 274 KB
libthrift-0.14.2 | hcc01f38_0 2.8 MB
lxml-4.8.0 | py38h1f438cf_0 1.3 MB
multiprocess-0.70.12.2 | py38h7f8727e_0 226 KB
numpy-1.21.5 | py38he7a7128_2 10 KB
numpy-base-1.21.5 | py38hf524024_2 4.8 MB
orc-1.6.9 | ha97a36c_3 623 KB
pyarrow-3.0.0 | py38he0739d4_3 1.9 MB
python-xxhash-2.0.2 | py38h7f8727e_0 24 KB
re2-2020.11.01 | h2531618_1 315 KB
snappy-1.1.9 | h295c915_0 636 KB
tqdm-4.49.0 | py_0 55 KB
uriparser-0.9.3 | he6710b0_1 48 KB
utf8proc-2.6.1 | h27cfd23_0 308 KB
xxhash-0.8.0 | h7f8727e_3 83 KB
yarl-1.6.3 | py38h27cfd23_0 136 KB
------------------------------------------------------------
Total: 28.0 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
_openmp_mutex pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
abseil-cpp pkgs/main/linux-64::abseil-cpp-20210324.2-h2531618_0
aiohttp pkgs/main/linux-64::aiohttp-3.8.1-py38h7f8727e_1
aiosignal pkgs/main/noarch::aiosignal-1.2.0-pyhd3eb1b0_0
arrow-cpp pkgs/main/linux-64::arrow-cpp-3.0.0-py38h6b21186_4
async-timeout pkgs/main/noarch::async-timeout-4.0.1-pyhd3eb1b0_0
attrs pkgs/main/noarch::attrs-21.4.0-pyhd3eb1b0_0
aws-c-common pkgs/main/linux-64::aws-c-common-0.4.57-he6710b0_1
aws-c-event-stream pkgs/main/linux-64::aws-c-event-stream-0.1.6-h2531618_5
aws-checksums pkgs/main/linux-64::aws-checksums-0.1.9-he6710b0_0
aws-sdk-cpp pkgs/main/linux-64::aws-sdk-cpp-1.8.185-hce553d0_0
bcj-cffi pkgs/main/linux-64::bcj-cffi-0.5.1-py38h295c915_0
blas pkgs/main/linux-64::blas-1.0-mkl
boost-cpp pkgs/main/linux-64::boost-cpp-1.73.0-h27cfd23_11
bottleneck pkgs/main/linux-64::bottleneck-1.3.4-py38hce1f21e_0
brotli pkgs/main/linux-64::brotli-1.0.9-he6710b0_2
brotli-python pkgs/main/linux-64::brotli-python-1.0.9-py38heb0550a_2
brotlicffi pkgs/main/linux-64::brotlicffi-1.0.9.2-py38h295c915_0
brotlipy pkgs/main/linux-64::brotlipy-0.7.0-py38h27cfd23_1003
bzip2 pkgs/main/linux-64::bzip2-1.0.8-h7b6447c_0
c-ares pkgs/main/linux-64::c-ares-1.18.1-h7f8727e_0
ca-certificates pkgs/main/linux-64::ca-certificates-2022.4.26-h06a4308_0
certifi pkgs/main/linux-64::certifi-2021.10.8-py38h06a4308_2
cffi pkgs/main/linux-64::cffi-1.15.0-py38hd667e15_1
charset-normalizer pkgs/main/noarch::charset-normalizer-2.0.4-pyhd3eb1b0_0
click pkgs/main/linux-64::click-8.0.4-py38h06a4308_0
conllu pkgs/main/noarch::conllu-4.4.1-pyhd3eb1b0_0
cryptography pkgs/main/linux-64::cryptography-36.0.0-py38h9ce1e76_0
dataclasses pkgs/main/noarch::dataclasses-0.8-pyh6d0b6a4_7
datasets pkgs/main/noarch::datasets-1.12.1-pyhd3eb1b0_0
dill pkgs/main/noarch::dill-0.3.4-pyhd3eb1b0_0
double-conversion pkgs/main/linux-64::double-conversion-3.1.5-he6710b0_1
et_xmlfile pkgs/main/linux-64::et_xmlfile-1.1.0-py38h06a4308_0
filelock pkgs/main/noarch::filelock-3.6.0-pyhd3eb1b0_0
frozenlist pkgs/main/linux-64::frozenlist-1.2.0-py38h7f8727e_0
fsspec pkgs/main/noarch::fsspec-2022.2.0-pyhd3eb1b0_0
future pkgs/main/linux-64::future-0.18.2-py38_1
gflags pkgs/main/linux-64::gflags-2.2.2-he6710b0_0
glog pkgs/main/linux-64::glog-0.5.0-h2531618_0
gmp pkgs/main/linux-64::gmp-6.2.1-h2531618_2
grpc-cpp pkgs/main/linux-64::grpc-cpp-1.39.0-hae934f6_5
huggingface_hub pkgs/main/noarch::huggingface_hub-0.0.17-pyhd3eb1b0_0
icu pkgs/main/linux-64::icu-58.2-he6710b0_3
idna pkgs/main/noarch::idna-3.3-pyhd3eb1b0_0
importlib-metadata pkgs/main/linux-64::importlib-metadata-4.11.3-py38h06a4308_0
importlib_metadata pkgs/main/noarch::importlib_metadata-4.11.3-hd3eb1b0_0
intel-openmp pkgs/main/linux-64::intel-openmp-2021.4.0-h06a4308_3561
joblib pkgs/main/noarch::joblib-1.1.0-pyhd3eb1b0_0
krb5 pkgs/main/linux-64::krb5-1.19.2-hac12032_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.35.1-h7274673_9
libboost pkgs/main/linux-64::libboost-1.73.0-h3ff78a5_11
libcurl pkgs/main/linux-64::libcurl-7.82.0-h0b77cf5_0
libedit pkgs/main/linux-64::libedit-3.1.20210910-h7f8727e_0
libev pkgs/main/linux-64::libev-4.33-h7f8727e_1
libevent pkgs/main/linux-64::libevent-2.1.12-h8f2d780_0
libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.3.0-h5101ec6_17
libgomp pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17
libnghttp2 pkgs/main/linux-64::libnghttp2-1.46.0-hce63b2e_0
libprotobuf pkgs/main/linux-64::libprotobuf-3.17.2-h4ff587b_1
libssh2 pkgs/main/linux-64::libssh2-1.10.0-h8f2d780_0
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.3.0-hd4cf53a_17
libthrift pkgs/main/linux-64::libthrift-0.14.2-hcc01f38_0
libxml2 pkgs/main/linux-64::libxml2-2.9.12-h03d6c58_0
libxslt pkgs/main/linux-64::libxslt-1.1.34-hc22bd24_0
lxml pkgs/main/linux-64::lxml-4.8.0-py38h1f438cf_0
lz4-c pkgs/main/linux-64::lz4-c-1.9.3-h295c915_1
mkl pkgs/main/linux-64::mkl-2021.4.0-h06a4308_640
mkl-service pkgs/main/linux-64::mkl-service-2.4.0-py38h7f8727e_0
mkl_fft pkgs/main/linux-64::mkl_fft-1.3.1-py38hd3c417c_0
mkl_random pkgs/main/linux-64::mkl_random-1.2.2-py38h51133e4_0
multidict pkgs/main/linux-64::multidict-5.2.0-py38h7f8727e_2
multiprocess pkgs/main/linux-64::multiprocess-0.70.12.2-py38h7f8727e_0
multivolumefile pkgs/main/noarch::multivolumefile-0.2.3-pyhd3eb1b0_0
ncurses pkgs/main/linux-64::ncurses-6.3-h7f8727e_2
ninja pkgs/main/linux-64::ninja-1.10.2-h06a4308_5
ninja-base pkgs/main/linux-64::ninja-base-1.10.2-hd09550d_5
numexpr pkgs/main/linux-64::numexpr-2.8.1-py38h6abb31d_0
numpy pkgs/main/linux-64::numpy-1.21.5-py38he7a7128_2
numpy-base pkgs/main/linux-64::numpy-base-1.21.5-py38hf524024_2
openpyxl pkgs/main/noarch::openpyxl-3.0.9-pyhd3eb1b0_0
openssl pkgs/main/linux-64::openssl-1.1.1n-h7f8727e_0
orc pkgs/main/linux-64::orc-1.6.9-ha97a36c_3
packaging pkgs/main/noarch::packaging-21.3-pyhd3eb1b0_0
pandas pkgs/main/linux-64::pandas-1.4.2-py38h295c915_0
pip pkgs/main/linux-64::pip-21.2.4-py38h06a4308_0
py7zr pkgs/main/noarch::py7zr-0.16.1-pyhd3eb1b0_1
pyarrow pkgs/main/linux-64::pyarrow-3.0.0-py38he0739d4_3
pycparser pkgs/main/noarch::pycparser-2.21-pyhd3eb1b0_0
pycryptodomex pkgs/main/linux-64::pycryptodomex-3.10.1-py38h27cfd23_1
pyopenssl pkgs/main/noarch::pyopenssl-22.0.0-pyhd3eb1b0_0
pyparsing pkgs/main/noarch::pyparsing-3.0.4-pyhd3eb1b0_0
pyppmd pkgs/main/linux-64::pyppmd-0.16.1-py38h295c915_0
pysocks pkgs/main/linux-64::pysocks-1.7.1-py38h06a4308_0
python pkgs/main/linux-64::python-3.8.13-h12debd9_0
python-dateutil pkgs/main/noarch::python-dateutil-2.8.2-pyhd3eb1b0_0
python-xxhash pkgs/main/linux-64::python-xxhash-2.0.2-py38h7f8727e_0
pytorch pkgs/main/linux-64::pytorch-1.10.2-cpu_py38hfa7516b_0
pytz pkgs/main/noarch::pytz-2021.3-pyhd3eb1b0_0
pyyaml pkgs/main/linux-64::pyyaml-6.0-py38h7f8727e_1
pyzstd pkgs/main/linux-64::pyzstd-0.14.4-py38h7f8727e_3
re2 pkgs/main/linux-64::re2-2020.11.01-h2531618_1
readline pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
regex pkgs/main/linux-64::regex-2022.3.15-py38h7f8727e_0
requests pkgs/main/noarch::requests-2.27.1-pyhd3eb1b0_0
sacremoses pkgs/main/noarch::sacremoses-0.0.43-pyhd3eb1b0_0
setuptools pkgs/main/linux-64::setuptools-61.2.0-py38h06a4308_0
six pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1
snappy pkgs/main/linux-64::snappy-1.1.9-h295c915_0
sqlite pkgs/main/linux-64::sqlite-3.38.2-hc218d9a_0
texttable pkgs/main/noarch::texttable-1.6.4-pyhd3eb1b0_0
tk pkgs/main/linux-64::tk-8.6.11-h1ccaba5_0
tokenizers pkgs/main/linux-64::tokenizers-0.10.3-py38hb317417_1
tqdm pkgs/main/noarch::tqdm-4.49.0-py_0
transformers pkgs/main/noarch::transformers-4.14.1-pyhd3eb1b0_0
typing-extensions pkgs/main/noarch::typing-extensions-4.1.1-hd3eb1b0_0
typing_extensions pkgs/main/noarch::typing_extensions-4.1.1-pyh06a4308_0
uriparser pkgs/main/linux-64::uriparser-0.9.3-he6710b0_1
urllib3 pkgs/main/linux-64::urllib3-1.26.9-py38h06a4308_0
utf8proc pkgs/main/linux-64::utf8proc-2.6.1-h27cfd23_0
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
xxhash pkgs/main/linux-64::xxhash-0.8.0-h7f8727e_3
xz pkgs/main/linux-64::xz-5.2.5-h7f8727e_1
yaml pkgs/main/linux-64::yaml-0.2.5-h7b6447c_0
yarl pkgs/main/linux-64::yarl-1.6.3-py38h27cfd23_0
zipp pkgs/main/noarch::zipp-3.7.0-pyhd3eb1b0_0
zlib pkgs/main/linux-64::zlib-1.2.12-h7f8727e_2
zstd pkgs/main/linux-64::zstd-1.4.9-haebb681_0
Proceed ([y]/n)?
Downloading and Extracting Packages
libprotobuf-3.17.2 | 2.0 MB | ######################################################### | 100%
snappy-1.1.9 | 636 KB | ######################################################### | 100%
grpc-cpp-1.39.0 | 2.8 MB | ######################################################### | 100%
utf8proc-2.6.1 | 308 KB | ######################################################### | 100%
glog-0.5.0 | 101 KB | ######################################################### | 100%
orc-1.6.9 | 623 KB | ######################################################### | 100%
re2-2020.11.01 | 315 KB | ######################################################### | 100%
tqdm-4.49.0 | 55 KB | ######################################################### | 100%
huggingface_hub-0.0. | 59 KB | ######################################################### | 100%
lxml-4.8.0 | 1.3 MB | ######################################################### | 100%
libssh2-1.10.0 | 274 KB | ######################################################### | 100%
multiprocess-0.70.12 | 226 KB | ######################################################### | 100%
datasets-1.12.1 | 193 KB | ######################################################### | 100%
xxhash-0.8.0 | 83 KB | ######################################################### | 100%
conllu-4.4.1 | 23 KB | ######################################################### | 100%
double-conversion-3. | 235 KB | ######################################################### | 100%
python-xxhash-2.0.2 | 24 KB | ######################################################### | 100%
libcurl-7.82.0 | 342 KB | ######################################################### | 100%
numpy-1.21.5 | 10 KB | ######################################################### | 100%
abseil-cpp-20210324. | 965 KB | ######################################################### | 100%
numpy-base-1.21.5 | 4.8 MB | ######################################################### | 100%
libthrift-0.14.2 | 2.8 MB | ######################################################### | 100%
pyarrow-3.0.0 | 1.9 MB | ######################################################### | 100%
dill-0.3.4 | 61 KB | ######################################################### | 100%
gflags-2.2.2 | 126 KB | ######################################################### | 100%
arrow-cpp-3.0.0 | 7.1 MB | ######################################################### | 100%
uriparser-0.9.3 | 48 KB | ######################################################### | 100%
boost-cpp-1.73.0 | 25 KB | ######################################################### | 100%
fsspec-2022.2.0 | 98 KB | ######################################################### | 100%
yarl-1.6.3 | 136 KB | ######################################################### | 100%
libevent-2.1.12 | 425 KB | ######################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate test
#
# To deactivate an active environment, use
#
# $ conda deactivate
$ conda activate test
$ python
Python 3.8.13 (default, Mar 28 2022, 11:38:47)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import transformers
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/__init__.py", line 43, in <module>
from . import dependency_versions_check
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/dependency_versions_check.py", line 36, in <module>
from .file_utils import is_tokenizers_available
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/file_utils.py", line 52, in <module>
from huggingface_hub import HfFolder, Repository, create_repo, list_repo_files, whoami
ImportError: cannot import name 'create_repo' from 'huggingface_hub' (/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/huggingface_hub/__init__.py)
>>>
"><pre class="notranslate"><code class="notranslate">
$ conda create -n test transformers
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/arnold/bin/anaconda/envs/test
added / updated specs:
- transformers
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2022.4.26 | h06a4308_0 124 KB
ninja-1.10.2 | h06a4308_5 8 KB
ninja-base-1.10.2 | hd09550d_5 109 KB
numpy-1.21.5 | py39he7a7128_2 10 KB
numpy-base-1.21.5 | py39hf524024_2 4.9 MB
pytorch-1.10.2 |cpu_py39hfa7516b_0 44.1 MB
setuptools-61.2.0 | py39h06a4308_0 1011 KB
tokenizers-0.10.3 | py39hb317417_1 2.4 MB
tqdm-4.64.0 | py39h06a4308_0 126 KB
urllib3-1.26.9 | py39h06a4308_0 180 KB
xz-5.2.5 | h7f8727e_1 339 KB
------------------------------------------------------------
Total: 53.2 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
_openmp_mutex pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
blas pkgs/main/linux-64::blas-1.0-mkl
brotlipy pkgs/main/linux-64::brotlipy-0.7.0-py39h27cfd23_1003
ca-certificates pkgs/main/linux-64::ca-certificates-2022.4.26-h06a4308_0
certifi pkgs/main/linux-64::certifi-2021.10.8-py39h06a4308_2
cffi pkgs/main/linux-64::cffi-1.15.0-py39hd667e15_1
charset-normalizer pkgs/main/noarch::charset-normalizer-2.0.4-pyhd3eb1b0_0
click pkgs/main/linux-64::click-8.0.4-py39h06a4308_0
cryptography pkgs/main/linux-64::cryptography-36.0.0-py39h9ce1e76_0
dataclasses pkgs/main/noarch::dataclasses-0.8-pyh6d0b6a4_7
filelock pkgs/main/noarch::filelock-3.6.0-pyhd3eb1b0_0
future pkgs/main/linux-64::future-0.18.2-py39h06a4308_1
huggingface_hub pkgs/main/noarch::huggingface_hub-0.2.1-pyhd3eb1b0_0
idna pkgs/main/noarch::idna-3.3-pyhd3eb1b0_0
importlib-metadata pkgs/main/linux-64::importlib-metadata-4.11.3-py39h06a4308_0
importlib_metadata pkgs/main/noarch::importlib_metadata-4.11.3-hd3eb1b0_0
intel-openmp pkgs/main/linux-64::intel-openmp-2021.4.0-h06a4308_3561
joblib pkgs/main/noarch::joblib-1.1.0-pyhd3eb1b0_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.35.1-h7274673_9
libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.3.0-h5101ec6_17
libgomp pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.3.0-hd4cf53a_17
mkl pkgs/main/linux-64::mkl-2021.4.0-h06a4308_640
mkl-service pkgs/main/linux-64::mkl-service-2.4.0-py39h7f8727e_0
mkl_fft pkgs/main/linux-64::mkl_fft-1.3.1-py39hd3c417c_0
mkl_random pkgs/main/linux-64::mkl_random-1.2.2-py39h51133e4_0
ncurses pkgs/main/linux-64::ncurses-6.3-h7f8727e_2
ninja pkgs/main/linux-64::ninja-1.10.2-h06a4308_5
ninja-base pkgs/main/linux-64::ninja-base-1.10.2-hd09550d_5
numpy pkgs/main/linux-64::numpy-1.21.5-py39he7a7128_2
numpy-base pkgs/main/linux-64::numpy-base-1.21.5-py39hf524024_2
openssl pkgs/main/linux-64::openssl-1.1.1n-h7f8727e_0
packaging pkgs/main/noarch::packaging-21.3-pyhd3eb1b0_0
pip pkgs/main/linux-64::pip-21.2.4-py39h06a4308_0
pycparser pkgs/main/noarch::pycparser-2.21-pyhd3eb1b0_0
pyopenssl pkgs/main/noarch::pyopenssl-22.0.0-pyhd3eb1b0_0
pyparsing pkgs/main/noarch::pyparsing-3.0.4-pyhd3eb1b0_0
pysocks pkgs/main/linux-64::pysocks-1.7.1-py39h06a4308_0
python pkgs/main/linux-64::python-3.9.12-h12debd9_0
pytorch pkgs/main/linux-64::pytorch-1.10.2-cpu_py39hfa7516b_0
pyyaml pkgs/main/linux-64::pyyaml-6.0-py39h7f8727e_1
readline pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
regex pkgs/main/linux-64::regex-2022.3.15-py39h7f8727e_0
requests pkgs/main/noarch::requests-2.27.1-pyhd3eb1b0_0
sacremoses pkgs/main/noarch::sacremoses-0.0.43-pyhd3eb1b0_0
setuptools pkgs/main/linux-64::setuptools-61.2.0-py39h06a4308_0
six pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1
sqlite pkgs/main/linux-64::sqlite-3.38.2-hc218d9a_0
tk pkgs/main/linux-64::tk-8.6.11-h1ccaba5_0
tokenizers pkgs/main/linux-64::tokenizers-0.10.3-py39hb317417_1
tqdm pkgs/main/linux-64::tqdm-4.64.0-py39h06a4308_0
transformers pkgs/main/noarch::transformers-4.14.1-pyhd3eb1b0_0
typing-extensions pkgs/main/noarch::typing-extensions-4.1.1-hd3eb1b0_0
typing_extensions pkgs/main/noarch::typing_extensions-4.1.1-pyh06a4308_0
tzdata pkgs/main/noarch::tzdata-2022a-hda174b7_0
urllib3 pkgs/main/linux-64::urllib3-1.26.9-py39h06a4308_0
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
xz pkgs/main/linux-64::xz-5.2.5-h7f8727e_1
yaml pkgs/main/linux-64::yaml-0.2.5-h7b6447c_0
zipp pkgs/main/noarch::zipp-3.7.0-pyhd3eb1b0_0
zlib pkgs/main/linux-64::zlib-1.2.12-h7f8727e_2
Proceed ([y]/n)?
Downloading and Extracting Packages
pytorch-1.10.2 | 44.1 MB | ######################################################### | 100%
tqdm-4.64.0 | 126 KB | ######################################################### | 100%
ninja-base-1.10.2 | 109 KB | ######################################################### | 100%
numpy-1.21.5 | 10 KB | ######################################################### | 100%
tokenizers-0.10.3 | 2.4 MB | ######################################################### | 100%
numpy-base-1.21.5 | 4.9 MB | ######################################################### | 100%
ca-certificates-2022 | 124 KB | ######################################################### | 100%
xz-5.2.5 | 339 KB | ######################################################### | 100%
urllib3-1.26.9 | 180 KB | ######################################################### | 100%
ninja-1.10.2 | 8 KB | ######################################################### | 100%
setuptools-61.2.0 | 1011 KB | ######################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate test
#
# To deactivate an active environment, use
#
# $ conda deactivate
$ conda activate test
$ conda install datasets
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:
- feature:/linux-64::__glibc==2.34=0
- python=3.9 -> libgcc-ng[version='>=7.5.0'] -> __glibc[version='>=2.17']
Your installed version is: 2.34
$ conda create -n test transformers datasets
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/arnold/bin/anaconda/envs/test
added / updated specs:
- datasets
- transformers
The following packages will be downloaded:
package | build
---------------------------|-----------------
abseil-cpp-20210324.2 | h2531618_0 965 KB
arrow-cpp-3.0.0 | py38h6b21186_4 7.1 MB
boost-cpp-1.73.0 | h27cfd23_11 25 KB
conllu-4.4.1 | pyhd3eb1b0_0 23 KB
datasets-1.12.1 | pyhd3eb1b0_0 193 KB
dill-0.3.4 | pyhd3eb1b0_0 61 KB
double-conversion-3.1.5 | he6710b0_1 235 KB
fsspec-2022.2.0 | pyhd3eb1b0_0 98 KB
gflags-2.2.2 | he6710b0_0 126 KB
glog-0.5.0 | h2531618_0 101 KB
grpc-cpp-1.39.0 | hae934f6_5 2.8 MB
huggingface_hub-0.0.17 | pyhd3eb1b0_0 59 KB
libcurl-7.82.0 | h0b77cf5_0 342 KB
libevent-2.1.12 | h8f2d780_0 425 KB
libprotobuf-3.17.2 | h4ff587b_1 2.0 MB
libssh2-1.10.0 | h8f2d780_0 274 KB
libthrift-0.14.2 | hcc01f38_0 2.8 MB
lxml-4.8.0 | py38h1f438cf_0 1.3 MB
multiprocess-0.70.12.2 | py38h7f8727e_0 226 KB
numpy-1.21.5 | py38he7a7128_2 10 KB
numpy-base-1.21.5 | py38hf524024_2 4.8 MB
orc-1.6.9 | ha97a36c_3 623 KB
pyarrow-3.0.0 | py38he0739d4_3 1.9 MB
python-xxhash-2.0.2 | py38h7f8727e_0 24 KB
re2-2020.11.01 | h2531618_1 315 KB
snappy-1.1.9 | h295c915_0 636 KB
tqdm-4.49.0 | py_0 55 KB
uriparser-0.9.3 | he6710b0_1 48 KB
utf8proc-2.6.1 | h27cfd23_0 308 KB
xxhash-0.8.0 | h7f8727e_3 83 KB
yarl-1.6.3 | py38h27cfd23_0 136 KB
------------------------------------------------------------
Total: 28.0 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
_openmp_mutex pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
abseil-cpp pkgs/main/linux-64::abseil-cpp-20210324.2-h2531618_0
aiohttp pkgs/main/linux-64::aiohttp-3.8.1-py38h7f8727e_1
aiosignal pkgs/main/noarch::aiosignal-1.2.0-pyhd3eb1b0_0
arrow-cpp pkgs/main/linux-64::arrow-cpp-3.0.0-py38h6b21186_4
async-timeout pkgs/main/noarch::async-timeout-4.0.1-pyhd3eb1b0_0
attrs pkgs/main/noarch::attrs-21.4.0-pyhd3eb1b0_0
aws-c-common pkgs/main/linux-64::aws-c-common-0.4.57-he6710b0_1
aws-c-event-stream pkgs/main/linux-64::aws-c-event-stream-0.1.6-h2531618_5
aws-checksums pkgs/main/linux-64::aws-checksums-0.1.9-he6710b0_0
aws-sdk-cpp pkgs/main/linux-64::aws-sdk-cpp-1.8.185-hce553d0_0
bcj-cffi pkgs/main/linux-64::bcj-cffi-0.5.1-py38h295c915_0
blas pkgs/main/linux-64::blas-1.0-mkl
boost-cpp pkgs/main/linux-64::boost-cpp-1.73.0-h27cfd23_11
bottleneck pkgs/main/linux-64::bottleneck-1.3.4-py38hce1f21e_0
brotli pkgs/main/linux-64::brotli-1.0.9-he6710b0_2
brotli-python pkgs/main/linux-64::brotli-python-1.0.9-py38heb0550a_2
brotlicffi pkgs/main/linux-64::brotlicffi-1.0.9.2-py38h295c915_0
brotlipy pkgs/main/linux-64::brotlipy-0.7.0-py38h27cfd23_1003
bzip2 pkgs/main/linux-64::bzip2-1.0.8-h7b6447c_0
c-ares pkgs/main/linux-64::c-ares-1.18.1-h7f8727e_0
ca-certificates pkgs/main/linux-64::ca-certificates-2022.4.26-h06a4308_0
certifi pkgs/main/linux-64::certifi-2021.10.8-py38h06a4308_2
cffi pkgs/main/linux-64::cffi-1.15.0-py38hd667e15_1
charset-normalizer pkgs/main/noarch::charset-normalizer-2.0.4-pyhd3eb1b0_0
click pkgs/main/linux-64::click-8.0.4-py38h06a4308_0
conllu pkgs/main/noarch::conllu-4.4.1-pyhd3eb1b0_0
cryptography pkgs/main/linux-64::cryptography-36.0.0-py38h9ce1e76_0
dataclasses pkgs/main/noarch::dataclasses-0.8-pyh6d0b6a4_7
datasets pkgs/main/noarch::datasets-1.12.1-pyhd3eb1b0_0
dill pkgs/main/noarch::dill-0.3.4-pyhd3eb1b0_0
double-conversion pkgs/main/linux-64::double-conversion-3.1.5-he6710b0_1
et_xmlfile pkgs/main/linux-64::et_xmlfile-1.1.0-py38h06a4308_0
filelock pkgs/main/noarch::filelock-3.6.0-pyhd3eb1b0_0
frozenlist pkgs/main/linux-64::frozenlist-1.2.0-py38h7f8727e_0
fsspec pkgs/main/noarch::fsspec-2022.2.0-pyhd3eb1b0_0
future pkgs/main/linux-64::future-0.18.2-py38_1
gflags pkgs/main/linux-64::gflags-2.2.2-he6710b0_0
glog pkgs/main/linux-64::glog-0.5.0-h2531618_0
gmp pkgs/main/linux-64::gmp-6.2.1-h2531618_2
grpc-cpp pkgs/main/linux-64::grpc-cpp-1.39.0-hae934f6_5
huggingface_hub pkgs/main/noarch::huggingface_hub-0.0.17-pyhd3eb1b0_0
icu pkgs/main/linux-64::icu-58.2-he6710b0_3
idna pkgs/main/noarch::idna-3.3-pyhd3eb1b0_0
importlib-metadata pkgs/main/linux-64::importlib-metadata-4.11.3-py38h06a4308_0
importlib_metadata pkgs/main/noarch::importlib_metadata-4.11.3-hd3eb1b0_0
intel-openmp pkgs/main/linux-64::intel-openmp-2021.4.0-h06a4308_3561
joblib pkgs/main/noarch::joblib-1.1.0-pyhd3eb1b0_0
krb5 pkgs/main/linux-64::krb5-1.19.2-hac12032_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.35.1-h7274673_9
libboost pkgs/main/linux-64::libboost-1.73.0-h3ff78a5_11
libcurl pkgs/main/linux-64::libcurl-7.82.0-h0b77cf5_0
libedit pkgs/main/linux-64::libedit-3.1.20210910-h7f8727e_0
libev pkgs/main/linux-64::libev-4.33-h7f8727e_1
libevent pkgs/main/linux-64::libevent-2.1.12-h8f2d780_0
libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.3.0-h5101ec6_17
libgomp pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17
libnghttp2 pkgs/main/linux-64::libnghttp2-1.46.0-hce63b2e_0
libprotobuf pkgs/main/linux-64::libprotobuf-3.17.2-h4ff587b_1
libssh2 pkgs/main/linux-64::libssh2-1.10.0-h8f2d780_0
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.3.0-hd4cf53a_17
libthrift pkgs/main/linux-64::libthrift-0.14.2-hcc01f38_0
libxml2 pkgs/main/linux-64::libxml2-2.9.12-h03d6c58_0
libxslt pkgs/main/linux-64::libxslt-1.1.34-hc22bd24_0
lxml pkgs/main/linux-64::lxml-4.8.0-py38h1f438cf_0
lz4-c pkgs/main/linux-64::lz4-c-1.9.3-h295c915_1
mkl pkgs/main/linux-64::mkl-2021.4.0-h06a4308_640
mkl-service pkgs/main/linux-64::mkl-service-2.4.0-py38h7f8727e_0
mkl_fft pkgs/main/linux-64::mkl_fft-1.3.1-py38hd3c417c_0
mkl_random pkgs/main/linux-64::mkl_random-1.2.2-py38h51133e4_0
multidict pkgs/main/linux-64::multidict-5.2.0-py38h7f8727e_2
multiprocess pkgs/main/linux-64::multiprocess-0.70.12.2-py38h7f8727e_0
multivolumefile pkgs/main/noarch::multivolumefile-0.2.3-pyhd3eb1b0_0
ncurses pkgs/main/linux-64::ncurses-6.3-h7f8727e_2
ninja pkgs/main/linux-64::ninja-1.10.2-h06a4308_5
ninja-base pkgs/main/linux-64::ninja-base-1.10.2-hd09550d_5
numexpr pkgs/main/linux-64::numexpr-2.8.1-py38h6abb31d_0
numpy pkgs/main/linux-64::numpy-1.21.5-py38he7a7128_2
numpy-base pkgs/main/linux-64::numpy-base-1.21.5-py38hf524024_2
openpyxl pkgs/main/noarch::openpyxl-3.0.9-pyhd3eb1b0_0
openssl pkgs/main/linux-64::openssl-1.1.1n-h7f8727e_0
orc pkgs/main/linux-64::orc-1.6.9-ha97a36c_3
packaging pkgs/main/noarch::packaging-21.3-pyhd3eb1b0_0
pandas pkgs/main/linux-64::pandas-1.4.2-py38h295c915_0
pip pkgs/main/linux-64::pip-21.2.4-py38h06a4308_0
py7zr pkgs/main/noarch::py7zr-0.16.1-pyhd3eb1b0_1
pyarrow pkgs/main/linux-64::pyarrow-3.0.0-py38he0739d4_3
pycparser pkgs/main/noarch::pycparser-2.21-pyhd3eb1b0_0
pycryptodomex pkgs/main/linux-64::pycryptodomex-3.10.1-py38h27cfd23_1
pyopenssl pkgs/main/noarch::pyopenssl-22.0.0-pyhd3eb1b0_0
pyparsing pkgs/main/noarch::pyparsing-3.0.4-pyhd3eb1b0_0
pyppmd pkgs/main/linux-64::pyppmd-0.16.1-py38h295c915_0
pysocks pkgs/main/linux-64::pysocks-1.7.1-py38h06a4308_0
python pkgs/main/linux-64::python-3.8.13-h12debd9_0
python-dateutil pkgs/main/noarch::python-dateutil-2.8.2-pyhd3eb1b0_0
python-xxhash pkgs/main/linux-64::python-xxhash-2.0.2-py38h7f8727e_0
pytorch pkgs/main/linux-64::pytorch-1.10.2-cpu_py38hfa7516b_0
pytz pkgs/main/noarch::pytz-2021.3-pyhd3eb1b0_0
pyyaml pkgs/main/linux-64::pyyaml-6.0-py38h7f8727e_1
pyzstd pkgs/main/linux-64::pyzstd-0.14.4-py38h7f8727e_3
re2 pkgs/main/linux-64::re2-2020.11.01-h2531618_1
readline pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
regex pkgs/main/linux-64::regex-2022.3.15-py38h7f8727e_0
requests pkgs/main/noarch::requests-2.27.1-pyhd3eb1b0_0
sacremoses pkgs/main/noarch::sacremoses-0.0.43-pyhd3eb1b0_0
setuptools pkgs/main/linux-64::setuptools-61.2.0-py38h06a4308_0
six pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1
snappy pkgs/main/linux-64::snappy-1.1.9-h295c915_0
sqlite pkgs/main/linux-64::sqlite-3.38.2-hc218d9a_0
texttable pkgs/main/noarch::texttable-1.6.4-pyhd3eb1b0_0
tk pkgs/main/linux-64::tk-8.6.11-h1ccaba5_0
tokenizers pkgs/main/linux-64::tokenizers-0.10.3-py38hb317417_1
tqdm pkgs/main/noarch::tqdm-4.49.0-py_0
transformers pkgs/main/noarch::transformers-4.14.1-pyhd3eb1b0_0
typing-extensions pkgs/main/noarch::typing-extensions-4.1.1-hd3eb1b0_0
typing_extensions pkgs/main/noarch::typing_extensions-4.1.1-pyh06a4308_0
uriparser pkgs/main/linux-64::uriparser-0.9.3-he6710b0_1
urllib3 pkgs/main/linux-64::urllib3-1.26.9-py38h06a4308_0
utf8proc pkgs/main/linux-64::utf8proc-2.6.1-h27cfd23_0
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
xxhash pkgs/main/linux-64::xxhash-0.8.0-h7f8727e_3
xz pkgs/main/linux-64::xz-5.2.5-h7f8727e_1
yaml pkgs/main/linux-64::yaml-0.2.5-h7b6447c_0
yarl pkgs/main/linux-64::yarl-1.6.3-py38h27cfd23_0
zipp pkgs/main/noarch::zipp-3.7.0-pyhd3eb1b0_0
zlib pkgs/main/linux-64::zlib-1.2.12-h7f8727e_2
zstd pkgs/main/linux-64::zstd-1.4.9-haebb681_0
Proceed ([y]/n)?
Downloading and Extracting Packages
libprotobuf-3.17.2 | 2.0 MB | ######################################################### | 100%
snappy-1.1.9 | 636 KB | ######################################################### | 100%
grpc-cpp-1.39.0 | 2.8 MB | ######################################################### | 100%
utf8proc-2.6.1 | 308 KB | ######################################################### | 100%
glog-0.5.0 | 101 KB | ######################################################### | 100%
orc-1.6.9 | 623 KB | ######################################################### | 100%
re2-2020.11.01 | 315 KB | ######################################################### | 100%
tqdm-4.49.0 | 55 KB | ######################################################### | 100%
huggingface_hub-0.0. | 59 KB | ######################################################### | 100%
lxml-4.8.0 | 1.3 MB | ######################################################### | 100%
libssh2-1.10.0 | 274 KB | ######################################################### | 100%
multiprocess-0.70.12 | 226 KB | ######################################################### | 100%
datasets-1.12.1 | 193 KB | ######################################################### | 100%
xxhash-0.8.0 | 83 KB | ######################################################### | 100%
conllu-4.4.1 | 23 KB | ######################################################### | 100%
double-conversion-3. | 235 KB | ######################################################### | 100%
python-xxhash-2.0.2 | 24 KB | ######################################################### | 100%
libcurl-7.82.0 | 342 KB | ######################################################### | 100%
numpy-1.21.5 | 10 KB | ######################################################### | 100%
abseil-cpp-20210324. | 965 KB | ######################################################### | 100%
numpy-base-1.21.5 | 4.8 MB | ######################################################### | 100%
libthrift-0.14.2 | 2.8 MB | ######################################################### | 100%
pyarrow-3.0.0 | 1.9 MB | ######################################################### | 100%
dill-0.3.4 | 61 KB | ######################################################### | 100%
gflags-2.2.2 | 126 KB | ######################################################### | 100%
arrow-cpp-3.0.0 | 7.1 MB | ######################################################### | 100%
uriparser-0.9.3 | 48 KB | ######################################################### | 100%
boost-cpp-1.73.0 | 25 KB | ######################################################### | 100%
fsspec-2022.2.0 | 98 KB | ######################################################### | 100%
yarl-1.6.3 | 136 KB | ######################################################### | 100%
libevent-2.1.12 | 425 KB | ######################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate test
#
# To deactivate an active environment, use
#
# $ conda deactivate
$ conda activate test
$ python
Python 3.8.13 (default, Mar 28 2022, 11:38:47)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import transformers
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/__init__.py", line 43, in <module>
from . import dependency_versions_check
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/dependency_versions_check.py", line 36, in <module>
from .file_utils import is_tokenizers_available
File "/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/transformers/file_utils.py", line 52, in <module>
from huggingface_hub import HfFolder, Repository, create_repo, list_repo_files, whoami
ImportError: cannot import name 'create_repo' from 'huggingface_hub' (/home/arnold/bin/anaconda/envs/test/lib/python3.8/site-packages/huggingface_hub/__init__.py)
>>>
</code></pre></div>
<h3 dir="auto">Expected behavior</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ conda create -n test transformers datasets torch
$ python
Python 3.8.13 (default, Mar 28 2022, 11:38:47)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import transformers
>>>"><pre class="notranslate">$ conda create -n <span class="pl-c1">test</span> transformers datasets torch
$ python
Python 3.8.13 (default, Mar 28 2022, 11:38:47)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type <span class="pl-s"><span class="pl-pds">"</span>help<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>copyright<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>credits<span class="pl-pds">"</span></span> or <span class="pl-s"><span class="pl-pds">"</span>license<span class="pl-pds">"</span></span> <span class="pl-k">for</span> more information.
>>> import transformers
>>></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> | 0 |
<p dir="auto"><code class="notranslate">tensorflow.python.tools.optimize_for_inference_lib.optimize_for_inference</code> is producing an invalid graph definition. So far as I can tell this is not user error; optimizing a valid graph definition should produce a valid graph definition, so this appears to be a bug.</p>
<p dir="auto">The following code demonstrates the problem. You will need the input graph definition <a href="https://github.com/tensorflow/tensorflow/files/1001369/model.txt.gz">model.txt.gz</a>. Running the code loads the graph definition, verifies it is valid (by importing it and printing the number of nodes) then calls <code class="notranslate">optimize_for_inference</code>. We then attempt to verify the resulting graph definition but get the error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ValueError: graph_def is invalid at node u'valid/valid_fed/model/rnn/rnn/while/multi_rnn_cell/cell_0/basic_lstm_cell/basic_lstm_cell_1/concat/axis': More inputs specified ('valid/valid_fed/model/rnn/rnn/while/Switch:1') than the op expects.."><pre class="notranslate"><code class="notranslate">ValueError: graph_def is invalid at node u'valid/valid_fed/model/rnn/rnn/while/multi_rnn_cell/cell_0/basic_lstm_cell/basic_lstm_cell_1/concat/axis': More inputs specified ('valid/valid_fed/model/rnn/rnn/while/Switch:1') than the op expects..
</code></pre></div>
<p dir="auto">The error originates from</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tensorflow/python/framework/importer.py, line 362, in import_graph_def"><pre class="notranslate"><code class="notranslate">tensorflow/python/framework/importer.py, line 362, in import_graph_def
</code></pre></div>
<p dir="auto">The attached model definition has been manually altered to reduce the size of the (frozen) parameters but the same error occurs with the unmodified original. Attempts to reproduce this problem with a simpler graph failed. Simpler graphs can be optimized successfully. I don't know what it is about this graph that causes the failure.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import gzip
import tensorflow as tf
from google.protobuf import text_format
from tensorflow.python.tools import optimize_for_inference_lib
def verify(graph_def):
with tf.Graph().as_default():
tf.import_graph_def(graph_def, name="")
print(len(tf.get_default_graph().as_graph_def().node))
def read_graph_def(path):
graph_def = tf.GraphDef()
with gzip.open(path, "rb") as input_file:
text_format.Merge(input_file.read(), graph_def)
return graph_def
def optimize(input_graph_def):
output_graph_def = optimize_for_inference_lib.optimize_for_inference(
input_graph_def, ["valid/valid_fed/model/input/x"],
["valid/valid_fed/model/output/y"], tf.int32.as_datatype_enum)
return output_graph_def
def main():
input_graph_def = read_graph_def("model.txt.gz")
verify(input_graph_def)
output_graph_def = optimize(input_graph_def)
verify(output_graph_def)
if __name__ == "__main__":
main()"><pre class="notranslate"><code class="notranslate">import gzip
import tensorflow as tf
from google.protobuf import text_format
from tensorflow.python.tools import optimize_for_inference_lib
def verify(graph_def):
with tf.Graph().as_default():
tf.import_graph_def(graph_def, name="")
print(len(tf.get_default_graph().as_graph_def().node))
def read_graph_def(path):
graph_def = tf.GraphDef()
with gzip.open(path, "rb") as input_file:
text_format.Merge(input_file.read(), graph_def)
return graph_def
def optimize(input_graph_def):
output_graph_def = optimize_for_inference_lib.optimize_for_inference(
input_graph_def, ["valid/valid_fed/model/input/x"],
["valid/valid_fed/model/output/y"], tf.int32.as_datatype_enum)
return output_graph_def
def main():
input_graph_def = read_graph_def("model.txt.gz")
verify(input_graph_def)
output_graph_def = optimize(input_graph_def)
verify(output_graph_def)
if __name__ == "__main__":
main()
</code></pre></div>
<p dir="auto">Environment details:</p>
<ul dir="auto">
<li>Linux Ubuntu 14.04</li>
<li>TensorFlow installed from source</li>
<li>TensorFlow version: ('v1.1.0-0-g1ec6ed5', '1.1.0')</li>
<li>Bazel version: 0.4.5</li>
<li>No GPU</li>
</ul> | <p dir="auto">Env:<br>
Tensorflow-GPU 1.13.1<br>
Tensorboard 1.13.1<br>
TensorboardX 1.6<br>
Installed time: 2019/03/22<br>
Installed from PIP<br>
OS: Windows 10<br>
Python version: 3.7<br>
CUDA: 10</p>
<p dir="auto">Problem:<br>
I use command "tensorboard --logdir ... --host 127.0.0.1" to run the program, and there are many log output in the command. And not add "-v" parameter..</p>
<p dir="auto">TensorBoard 1.13.1 at <a href="http://127.0.0.1:6006" rel="nofollow">http://127.0.0.1:6006</a> (Press CTRL+C to quit)<br>
I0322 17:56:22.683215 10068 _internal.py:97] 127.0.0.1 - - [22/Mar/2019 17:56:22] "GET / HTTP/1.1" 200 -<br>
I0322 17:56:23.341972 12492 _internal.py:97] 127.0.0.1 - - [22/Mar/2019 17:56:23] "GET /font-roboto/oMMgfZMQthOryQo9n22dcuvvDin1pK8aKteLpeZ5c0A.woff2 HTTP/1.1" 200 -<br>
I0322 17:56:24.188966 10068 _internal.py:97] 127.0.0.1 - - [22/Mar/2019 17:56:24] "GET /tf-interactive-inference-dashboard/editedexample.png HTTP/1.1" 200 -<br>
...</p>
<p dir="auto">This does not appare in the previous version. I not sure whether it is a bug or a new feature.</p> | 0 |
<p dir="auto">Hello.<br>
I've got strange behavior for experiments. I'm working with matrix (for example <strong>b</strong>) that in result of multiplying <strong>b.T * b</strong> should be singular matrix and for inverse method should be arisen error like <em>numpy.linalg.linalg.LinAlgError: Singular matrix</em>. But result was high/low values.<br>
Code below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> b = np.matrix([[1,1,0], [1,0,1], [1,1,0]])
>>> b
matrix([[1, 1, 0],
[1, 0, 1],
[1, 1, 0]])
>>> np.linalg.inv(b.T * b)
matrix([[ 4.50359963e+15, -4.50359963e+15, -4.50359963e+15],
[-4.50359963e+15, 4.50359963e+15, 4.50359963e+15],
[-4.50359963e+15, 4.50359963e+15, 4.50359963e+15]])"><pre class="notranslate"><code class="notranslate">>>> b = np.matrix([[1,1,0], [1,0,1], [1,1,0]])
>>> b
matrix([[1, 1, 0],
[1, 0, 1],
[1, 1, 0]])
>>> np.linalg.inv(b.T * b)
matrix([[ 4.50359963e+15, -4.50359963e+15, -4.50359963e+15],
[-4.50359963e+15, 4.50359963e+15, 4.50359963e+15],
[-4.50359963e+15, 4.50359963e+15, 4.50359963e+15]])
</code></pre></div>
<p dir="auto">How can be avoided this behavior?<br>
Tests on:<br>
win10, Python 3.5.4, numpy version '1.14.0'.<br>
ubuntu 16.04, Python 3.5.2, numpy version '1.13.3' and '1.14.0'.</p>
<p dir="auto">PS. I've checked via wolfram and R it's real singular matrix.</p> | <p dir="auto">I am trying to solve several independent systems of equations at the same time using <code class="notranslate">numpy.linalg.solve</code>, e.g., <code class="notranslate">a</code> has shape (N, M, M). The challenge I'm running into is how to deal with the case when, for some values of N, the last two dimensions comprise a singular matrix.</p>
<p dir="auto">Consider this example</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
arr = [[[1, 0], [0, 1]], [[1, 0], [0, 1]], [[0, 0], [0, 0]]]
np.linalg.solve(arr, 1)"><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-s1">arr</span> <span class="pl-c1">=</span> [[[<span class="pl-c1">1</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>]], [[<span class="pl-c1">1</span>, <span class="pl-c1">0</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">1</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">np</span>.<span class="pl-s1">linalg</span>.<span class="pl-en">solve</span>(<span class="pl-s1">arr</span>, <span class="pl-c1">1</span>)</pre></div>
<p dir="auto">On numpy 1.9.2, this will raise a <code class="notranslate">LinAlgError</code>, but I still would like to know the solutions for all the full-rank matrices. (I would be okay with getting back NaNs for the singular cases.) I'm aware I can compute the singular values and use fancy indexing to slice the array, but in my algorithm I have to do several slicing/filtering steps and I would prefer not to lose the alignment of <code class="notranslate">a</code> with <code class="notranslate">b</code> -- my real-world <code class="notranslate">a</code> typically has 6-7 dimensions and all the indexing arrays make the code hard to follow.</p>
<p dir="auto">My ideal solution seems to involve masked arrays since I end up doing several other filtering steps, but it appears that most (all?) functions in the <code class="notranslate">linalg</code> family ignore array masks.</p>
<p dir="auto">Is there an alternative solution already available, or perhaps a suggestion on how I could contribute a solution that I could package as a PR?</p> | 1 |
<p dir="auto">It seems <code class="notranslate">./pavement.py</code> has some dead code, in particular we noticed that the <code class="notranslate">bootstrap</code> task cannot run because there is a typo in the <code class="notranslate">bscript</code> name (<code class="notranslate">boostrap.py</code>, not <code class="notranslate">bootstrap.py</code>) See PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="318713545" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/11005" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/11005/hovercard" href="https://github.com/numpy/numpy/pull/11005">#11005</a></p> | <p dir="auto">Just a few notes resulting from 1.10.4 release for future reference</p>
<ul dir="auto">
<li><code class="notranslate">paver sdist</code> must be run before <code class="notranslate">paver write_release_and_log,</code> otherwise fail.</li>
<li>docs are generated with <code class="notranslate">paver pdf</code> (not in documentation)</li>
<li>paver generates <code class="notranslate">NOTES.txt</code>, need to rename <code class="notranslate">README.txt</code> and sign for Sourceforge.</li>
<li>Changelog would look far better if merge commits were not included.</li>
<li>Results are in three directories <code class="notranslate">release</code>, <code class="notranslate">dist</code>, <code class="notranslate">build_doc</code>. That's crazy.</li>
<li><code class="notranslate">python setup.py sdist --formats=gztar,zip upload --sign</code> requires a <code class="notranslate">~/.pypirc</code> file with <code class="notranslate">[server-login]</code> entry.</li>
<li>If <code class="notranslate">~/.pypirc</code> exists, twine expects <code class="notranslate">[pypi]</code> and maybe <code class="notranslate">[distutils]</code> entries.</li>
<li>twine wasn't working anyway. Problem may have been on pypi side.</li>
</ul>
<p dir="auto">Conclusions: paver script needs updating, documentation also, make a <code class="notranslate">~/.pypirc</code> file. It would be nice to know why twine wasn't working, but given that pypi requires a new release every time you sneeze, I'm not going to explore the issue. The generation of the mac wheel files worked well. Pypi is an undocumented PITA.</p> | 1 |
<p dir="auto">For example, <code class="notranslate">0</code> for markdown, large enough for code.</p> | <p dir="auto">It would be interesting to have the ability to define different word wrap values for <em>different languages</em>, specially if you use <strong>Code</strong> for editing normal programming languages like JavaScript, Pascal and <em>non</em> programming languages, like Markdown.</p>
<p dir="auto">I tend to respect the word wrap values defined in the main IDE for a particular language (if exists/is used), and turn off word wrap for for Markdown/Log/Text files. But today, in <strong>Code</strong> I only have settings for the <em>Editor</em> (<code class="notranslate">editor.wrappingColumn</code> and <code class="notranslate">editor.wrappingIndent</code>).</p>
<p dir="auto">Thanks in advance</p> | 1 |
<p dir="auto">Avoid issues like the one fixed by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="60305369" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/4204" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/4204/hovercard" href="https://github.com/matplotlib/matplotlib/pull/4204">#4204</a></p> | <p dir="auto">The linkchecker that we use at the moment does not seem to check external links hence <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="114637245" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/5379" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/5379/hovercard" href="https://github.com/matplotlib/matplotlib/pull/5379">#5379</a> and others</p>
<p dir="auto">I tried turning on the sphinx linkchecker <code class="notranslate">python make.py linkcheck</code> which seems to work but generate a fair number of redirect warnings and errors. Perhaps it is worth turning this on pr default?</p>
<p dir="auto">See <a href="https://gist.github.com/jenshnielsen/b3dceef10df743154942">https://gist.github.com/jenshnielsen/b3dceef10df743154942</a> for the present output.</p>
<p dir="auto">The linkcheck command is broken on python 3.5 but that should be fixed in the next Sphinx point release</p> | 1 |
<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">I have some global installed packages which I can't see in <code class="notranslate">npm -g ls</code>. I also can't see them being outdated with <code class="notranslate">npm -g outdated</code>. These packages are eslint, yarn, semver<br>
I tried to remove and re-install them(<code class="notranslate">npm -g remove eslint yarn semver && npm -g i eslint yarn semver</code>) But no luck, they still won't appear in <code class="notranslate">npm -g ls</code>. I also purged npm cache once before re-installation</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Update/View these packages like others</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li><code class="notranslate">npm -g ls</code></li>
<li>I have 20 packages in %appdata%\npm\node_modules but I only see 17</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS: Windows 10 21H1</li>
<li>Node: 14.18.1</li>
<li>npm: 8.1.0</li>
</ul> | <h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">I have ESLint 8.0.0 installed globally via <code class="notranslate">npm install -g eslint</code> (using Node v16.11.0 x64/npm v8.0.0, as well as with npm7.x, on win11).</p>
<p dir="auto">The issue is that, if I run <code class="notranslate">npm list -g</code> then unfortunately ESLint is not listed (it should show: <code class="notranslate">[email protected]</code>).</p>
<p dir="auto">For reference, all my other globally installed packages are displayed ok:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="> npm list -g (or: npm list -g --depth=0)
C:\Users\Kostas\AppData\Roaming\npm
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]"><pre class="notranslate"><code class="notranslate">> npm list -g (or: npm list -g --depth=0)
C:\Users\Kostas\AppData\Roaming\npm
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
</code></pre></div>
<p dir="auto">I have tried uninstalling+reinstalling ESLInt without any difference. I have also tried in a virtual machine (=clean install of Node) with same results.</p>
<p dir="auto">But, with this command (using <code class="notranslate">ls</code> of 'Git for Windows' installed Bash), ESLint is included in the list:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="> ls -l $(npm root -g)
Directory: C:\Users\Kostas\AppData\Roaming\npm\node_modules
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 12/10/2021 15:40 eslint
d---- 12/10/2021 15:40 npm-check-updates
d---- 12/10/2021 15:40 npm-gui
d---- 12/10/2021 15:40 prettier
d---- 12/10/2021 15:40 stylelint
d---- 12/10/2021 15:40 typescript
d---- 12/10/2021 15:40 web-ext
d---- 12/10/2021 15:40 zx"><pre class="notranslate"><code class="notranslate">> ls -l $(npm root -g)
Directory: C:\Users\Kostas\AppData\Roaming\npm\node_modules
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 12/10/2021 15:40 eslint
d---- 12/10/2021 15:40 npm-check-updates
d---- 12/10/2021 15:40 npm-gui
d---- 12/10/2021 15:40 prettier
d---- 12/10/2021 15:40 stylelint
d---- 12/10/2021 15:40 typescript
d---- 12/10/2021 15:40 web-ext
d---- 12/10/2021 15:40 zx
</code></pre></div>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto"><code class="notranslate">npm list -g</code> should show: <code class="notranslate">[email protected]</code> .</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>In a fresh Node x64 v16.11.0/npm v8.0.0 (or v16.10.0/npm v7.24.0) install ESLint via <code class="notranslate">npm install -g eslint</code></li>
<li>(no special config)</li>
<li>Run <code class="notranslate">npm list -g</code> (or <code class="notranslate">npm list -g --depth=0</code>)</li>
<li>Notice that ESLint is not listed.</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS: win 11 x64</li>
<li>Node: 16.10.0/16.11.0</li>
<li>npm: 7.24.0/8.0.0</li>
</ul> | 1 |
<p dir="auto">Hi,<br>
I am using Snapshot testing for my application.<br>
My application has a theme, based on some parameter passed to the component. The theme changes the look n feel of the app, by adding some classes to the elements.</p>
<p dir="auto">I want to generate snapshots for the components for both the themes.<br>
But I do not want to duplicate the code or keep two separate .test/.spec files for this.</p>
<p dir="auto">Is there a way I can generate snapshot files based on what theme is passed, with just one spec file.</p>
<h4 dir="auto">Expected Behaviour:</h4>
<p dir="auto">If, two theme values are: dark and light<br>
One Component.spec.js file should generate Component.dark.spec.js.snap or Component.light.spec.js.snap based on the theme passed.</p>
<p dir="auto">This way I can have separate separate snapshots based on theme with just one source .spec file.</p> | <p dir="auto">Describe what you were doing when the bug occurred:</p>
<ol dir="auto">
<li>React Development tool is not running by this</li>
<li></li>
<li></li>
</ol>
<hr>
<h2 dir="auto">Please do not remove the text below this line</h2>
<p dir="auto">DevTools version: 4.8.2-fed4ae024</p>
<p dir="auto">Call stack: at Store.getElementAtIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19359:35)<br>
at Store.getElementIDAtIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19376:26)<br>
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26594:18<br>
at List.render (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:21229:18)<br>
at li (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11802:76)<br>
at ki (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11793:10)<br>
at ck (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:14433:86)<br>
at bk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13779:11)<br>
at ak (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13768:5)<br>
at Sj (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13750:7)</p>
<p dir="auto">Component stack: at List (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:20924:30)<br>
at div<br>
at AutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:2786:5)<br>
at div<br>
at div<br>
at Tree_Tree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26368:45)<br>
at div<br>
at div<br>
at InspectedElementContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26848:23)<br>
at OwnersListContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25520:23)<br>
at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26139:23)<br>
at Components_Components (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30926:50)<br>
at ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27172:5)<br>
at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27303:32)<br>
at div<br>
at div<br>
at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30463:23)<br>
at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22538:23)<br>
at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23040:27)<br>
at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28328:23)<br>
at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33797:21)</p> | 0 |
<p dir="auto"><strong>TypeScript Version:</strong><br>
1.8.10</p>
<p dir="auto"><strong>OS Version:</strong><br>
MacOS</p>
<p dir="auto">In fact, I just begin to learn typescript, because the angular2.0, I use the <code class="notranslate">https://github.com/angular/quickstart</code> as the begining, and I change it's file structure, add ts folder, and move the typescript file to ts folder, change npm scripts:</p>
<p dir="auto"><code class="notranslate">"start": "tsc && concurrently \"tsc -w\" \"lite-server\" ",</code> ----><br>
<code class="notranslate">"start": "npm run build:css && tsc --outDir ./app/scripts/ --rootDir ./app/ts/ && concurrently \"npm run tsc:w\" \"lite-server\" ",</code></p>
<p dir="auto"><code class="notranslate">"tsc:w": "tsc -w",</code> ----><br>
<code class="notranslate">"tsc:w": "tsc -w --outDir ./app/scripts/ --rootDir ./app/ts/",</code></p>
<p dir="auto">I start the project by run npm start, the tsc generate related js file to app/scripts folder, but when I change some typescirpt file, instead of outputing to the --outDir folder, it outputs .js files to where the .ts file is. It just happens after changing the file, the first compilation is right.</p> | <p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.9</p>
<p dir="auto">The tsserver code assumes that OSX file systems are always run case insensitive. However this is not the case. When the tsserver is used on a case sensitive file system code assist and other features stop working do to file lookup misses. For all the details please see:</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="147389969" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/5161" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/5161/hovercard?comment_id=210490841&comment_type=issue_comment" href="https://github.com/microsoft/vscode/issues/5161#issuecomment-210490841">microsoft/vscode#5161 (comment)</a></p> | 0 |
<p dir="auto">The <a href="http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture" rel="nofollow">WEBGL_depth_texture extension</a> is widely supported, at least on desktop implementations of WebGL.</p>
<p dir="auto">It would be nice to be able to use depth textures in three.js; render to depth and stencil buffers, as well as using depth textures as input.<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alteredq/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alteredq">@alteredq</a> mentioned in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2362890" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/806" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/806/hovercard" href="https://github.com/mrdoob/three.js/issues/806">#806</a> that he ran into some limitations when playing with depth textures, so I figured it deserves its own issue.</p>
<p dir="auto">An alternative to supporting depth textures could be to be able to supply our own framebuffers as render target, but I suspect the refactoring necessary to do this might be the largest hurdle anyway.</p> | <p dir="auto">Hey guys, wrestled with this for days but need some help.<br>
( THREE.js R69, Windows8, NVIDIA GeForce GTX 760, Chrome 39.0.2171.71 m )</p>
<p dir="auto">This JSFiddle <a href="http://jsfiddle.net/Angrypickle/mbtdxazy/24/" rel="nofollow">http://jsfiddle.net/Angrypickle/mbtdxazy/24/</a> shows a LensFlare image appear in front of the PerspectiveCamera as the camera moves away (and is looking away) from the actual lensflare position. You may have to re-run the jsfiddle to see it appear because it happens quickly.</p>
<p dir="auto">The lensflare should only appear at position [0,0,0] but when the camera reaches a certain distance, a duplicate lensflare appears in a location opposite the original lensflare. The distance necessary to achieve the bug seems to be related to the camera's <code class="notranslate">.near</code> and <code class="notranslate">.far</code> properties.</p>
<p dir="auto">I can circumvent the bug by setting a higher <code class="notranslate">camera.near</code> value, but I don't want to do that :) Thanks in advance for help!</p> | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.