text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<p dir="auto">Original discussion at <a href="https://groups.google.com/forum/#!searchin/golang-dev/json$20map/golang-dev/5gSHNrJQpUI/vZGSGRmUrC0J" rel="nofollow">https://groups.google.com/forum/#!searchin/golang-dev/json$20map/golang-dev/5gSHNrJQpUI/vZGSGRmUrC0J</a></p> <p dir="auto">Currently, json.Marshal will fail to marshal Go maps that have non-string keys, e.g.:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// http://play.golang.org/p/2m9wLZATqw type Coord struct { X,Y int } occupied := map[Coord]bool{} occupied[Coord{1,2}] = true data, err := json.Marshal(occupied) fmt.Printf(&quot;Data: %s\nErr: %v&quot;, data, err)"><pre class="notranslate"><code class="notranslate">// http://play.golang.org/p/2m9wLZATqw type Coord struct { X,Y int } occupied := map[Coord]bool{} occupied[Coord{1,2}] = true data, err := json.Marshal(occupied) fmt.Printf("Data: %s\nErr: %v", data, err) </code></pre></div> <p dir="auto">I propose to enhance the encoding/json package such that:</p> <ol dir="auto"> <li>for <code class="notranslate">json.Marshal</code> <ul dir="auto"> <li>If the map key is a string kind it is used directly.</li> <li>Otherwise if the map key satisfies the encoding.TextMarshaler interface then that is used to generate the map key.</li> <li>Otherwise it fails as it does today.</li> </ul> </li> <li>for <code class="notranslate">json.Unmarshal</code> <ul dir="auto"> <li>If the map key is a string kind it is written directly.</li> <li>Otherwise if the map key satisfies the encoding.TextUnmarshaler interface then that is used to decode the map key.</li> <li>Otherwise it fails as it does today.</li> </ul> </li> </ol> <h1 dir="auto">Example</h1> <p dir="auto">(<a href="http://play.golang.org/p/VxhFluFKTX" rel="nofollow">http://play.golang.org/p/VxhFluFKTX</a>)</p> <p dir="auto">This would, for example, allow a <code class="notranslate">map[Coord]bool</code> to be Marshaled &amp; Unmarshaled if <code class="notranslate">Coord</code> was defined as:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type Coord struct{ X, Y int } func (c Coord) MarshalText() ([]byte, error) { return []byte(fmt.Sprintf(&quot;%d,%d&quot;, c.X, c.Y)), nil } func (c *Coord) UnmarshalText(p []byte) error { if n, err := fmt.Sscanf(string(p), &quot;%d,%d&quot;, &amp;c.X, &amp;c.Y); err != nil { return err } else if n != 2 { return errors.New(&quot;Cannot parse coord: &quot; + string(p)) } return nil }"><pre class="notranslate"><code class="notranslate">type Coord struct{ X, Y int } func (c Coord) MarshalText() ([]byte, error) { return []byte(fmt.Sprintf("%d,%d", c.X, c.Y)), nil } func (c *Coord) UnmarshalText(p []byte) error { if n, err := fmt.Sscanf(string(p), "%d,%d", &amp;c.X, &amp;c.Y); err != nil { return err } else if n != 2 { return errors.New("Cannot parse coord: " + string(p)) } return nil } </code></pre></div> <p dir="auto">And the Go struct</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="map[Coord]bool{Coord{1, 2}: true, Coord{3, 4}: true}"><pre class="notranslate"><code class="notranslate">map[Coord]bool{Coord{1, 2}: true, Coord{3, 4}: true} </code></pre></div> <p dir="auto">would correspond to</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{&quot;1,2&quot;: true,&quot;3,4&quot;:true}"><pre class="notranslate"><code class="notranslate">{"1,2": true,"3,4":true} </code></pre></div> <h1 dir="auto">Considerations</h1> <p dir="auto">If the struct marshals to a non-unique value, e.g.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="func (c Coord) MarshalText() ([]byte, error) { return []byte(&quot;always the same&quot;), nil }"><pre class="notranslate"><code class="notranslate">func (c Coord) MarshalText() ([]byte, error) { return []byte("always the same"), nil } </code></pre></div> <p dir="auto">The the json encoder would output JSON that has repeated keys, e.g.:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{&quot;always the same&quot;: true,&quot;always the same&quot;:true}"><pre class="notranslate"><code class="notranslate">{"always the same": true,"always the same":true} </code></pre></div> <p dir="auto">This is valid JSON.</p> <p dir="auto">Similarly, when decoding a map, it would unmarshal each key and value and then assign that into the map, so last-write-wins, as is currently done.</p> <p dir="auto">An interesting side effect is that it would then be possible to explicitly handle JSON with repeated keys (or even explicitly record the order of the json keys) by having the go-side map key TextUnmarshaler have non-deterministic unmarshaling (e.g. record timestamp for each unmarshal).</p>
<p dir="auto">by <strong>lexszero</strong>:</p> <pre class="notranslate">What steps will reproduce the problem? Build any package using cgo wtih following command: GOARM=5 GOARCH=arm go build -x What is the expected output? Package build process What do you see instead? lexs@nyapad ~/.go/src/code.google.com/p/gosqlite/sqlite &gt; GOARM=5 GOARCH=arm go build -x WORK=/tmp/go-build982624259 and nothing more. return code is 0 Which compiler are you using (5g, 6g, 8g, gccgo)? 5g Which operating system are you using? linux/amd64 Which version are you using? (run 'go version') go version devel +1fcddf5fd778 Wed May 22 14:22:50 2013 -0700 linux/amd64 Please provide any additional information below. Building packages that doesn't using cgo with command above works fine. Manual running building commands analogous to those issued by 'GOARCH=amd64 go build -x' for the same package (with replacing 6g to 5g, gcc to arm-none-linux-gnueabi-gcc, fixing cflags, etc) also works fine, except for absent package 'runtime/cgo', which silently wasn't built during go installation process for the same reason.</pre>
0
<p dir="auto">For audio / scalar time series / 1d signals of shapes T or BxT, one currently has to unsqueeze at least to 3d tensor and then squeeze back.</p> <p dir="auto">With PyTorch now used for everything and not just imaages, easy support for 1d signals would be great!</p>
<p dir="auto">Currently, <code class="notranslate">torch.nn.functional.interpolate</code> has dedicated implementation for 1d, 2d and 3d data, as well as for nearest, bilinear and bicubic interpolation. The set of different kernels that are dispatched can be seen <a href="https://github.com/pytorch/pytorch/blob/master/torch/nn/functional.py#L2050-L2079">here</a>.</p> <p dir="auto">Those implementation are all very similar one to the other, and there is a lot of code duplication in there.<br> Compare for example <a href="https://github.com/pytorch/pytorch/blob/master/aten/src/THNN/generic/SpatialUpSamplingNearest.c#L31-L95">nearest</a> with <a href="https://github.com/pytorch/pytorch/blob/master/aten/src/THNN/generic/SpatialUpSamplingBilinear.c#L33-L106">bilinear</a>.</p> <p dir="auto">I believe it is possible to refactor the underlying implementation so that we can have a single C++ / CUDA codepath, with minimal code duplication.</p> <p dir="auto">This could be achieved in two independent steps (that could be done at the same time):</p> <ul dir="auto"> <li>factor out the different kernel computations, so that we have a generic <code class="notranslate">filter</code> that is used to compute the interpolation, plus the size of the filter as a struct. For an example, <a href="https://github.com/python-pillow/Pillow/blob/master/src/libImaging/Resample.c#L9-L83">see how Pillow implements it</a>, and then the interpolation coefficients can be generically computed <a href="https://github.com/python-pillow/Pillow/blob/master/src/libImaging/Resample.c#L236">as in here</a>.</li> <li>make the interpolate kernel separable (it is already separable in most cases). This means that we can have the user specify the dimensions he wants to interpolate as a list, and in the C++/CUDA code we have a loop over the dimensions. Something like <code class="notranslate">F.interpolate(image, dim=[-2, -1])</code> for spatial interpolation, or <code class="notranslate">F.interpolate(volume, dim=[-3, -2, -1])</code> for volumetric data. We can have reasonable defaults if <code class="notranslate">dim</code> is not specified (that depends on the shape of the input), to keep backwards compatibility.</li> </ul> <p dir="auto">The first point will allow us to fuse the <code class="notranslate">nearest</code> / <code class="notranslate">bilinear</code> / <code class="notranslate">bicubic</code> interpolation modes in a single file, while the second point will fuse <code class="notranslate">temporal</code> / <code class="notranslate">spatial</code> and <code class="notranslate">volumetric</code> into the same function.</p>
1
<p dir="auto"><strong>Migrated issue, originally created by RobS (<a href="https://github.com/phro">@phro</a>)</strong></p> <p dir="auto">I'm not really sure what's going on here but for this particular schema after reflection via the automapper the indexes are duplicated. If you remove anything from the table definitions the duplication goes away.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat repro.sql CREATE TABLE &quot;users&quot; (&quot;id&quot; integer not null primary key autoincrement not null, &quot;slug&quot; varchar(150) not null, &quot;email&quot; varchar(254) not null); CREATE UNIQUE INDEX users_email_unique on &quot;users&quot; (&quot;email&quot;); CREATE TABLE &quot;refreshtokens&quot; (&quot;id&quot; integer not null primary key autoincrement, &quot;user_id&quot; integer not null, foreign key(&quot;user_id&quot;) references &quot;users&quot;(&quot;id&quot;)); CREATE UNIQUE INDEX users_slug_unique on &quot;users&quot; (&quot;slug&quot;); $ sqlite3 repro.db &quot;.read repro.sql&quot; $ cat repro.py from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine Base = automap_base() engine = create_engine(&quot;sqlite:///repro.db&quot;) Base.prepare(engine, reflect=True) users = Base.metadata.tables.get('users') print(users.indexes) $ python repro.py set([Index('users_slug_unique', Column('slug', VARCHAR(length=150), table=&lt;users&gt;, nullable=False), unique=True), Index('users_email_unique', Column('email', VARCHAR(length=254), table=&lt;users&gt;, nullable=False), unique=True), Index('users_email_unique', Column('email', VARCHAR(length=254), table=&lt;users&gt;, nullable=False), unique=True), Index('users_slug_unique', Column('slug', VARCHAR(length=150), table=&lt;users&gt;, nullable=False), unique=True)]) $ pip freeze PyMySQL==0.7.9 SQLAlchemy==1.1.4 $ python --version Python 2.7.9 $ sqlite3 --version 3.8.7.1 2014-10-29 13:59:56 3b7b72c4685aa5cf5e675c2c47ebec10d9704221"><pre class="notranslate"><code class="notranslate">$ cat repro.sql CREATE TABLE "users" ("id" integer not null primary key autoincrement not null, "slug" varchar(150) not null, "email" varchar(254) not null); CREATE UNIQUE INDEX users_email_unique on "users" ("email"); CREATE TABLE "refreshtokens" ("id" integer not null primary key autoincrement, "user_id" integer not null, foreign key("user_id") references "users"("id")); CREATE UNIQUE INDEX users_slug_unique on "users" ("slug"); $ sqlite3 repro.db ".read repro.sql" $ cat repro.py from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine Base = automap_base() engine = create_engine("sqlite:///repro.db") Base.prepare(engine, reflect=True) users = Base.metadata.tables.get('users') print(users.indexes) $ python repro.py set([Index('users_slug_unique', Column('slug', VARCHAR(length=150), table=&lt;users&gt;, nullable=False), unique=True), Index('users_email_unique', Column('email', VARCHAR(length=254), table=&lt;users&gt;, nullable=False), unique=True), Index('users_email_unique', Column('email', VARCHAR(length=254), table=&lt;users&gt;, nullable=False), unique=True), Index('users_slug_unique', Column('slug', VARCHAR(length=150), table=&lt;users&gt;, nullable=False), unique=True)]) $ pip freeze PyMySQL==0.7.9 SQLAlchemy==1.1.4 $ python --version Python 2.7.9 $ sqlite3 --version 3.8.7.1 2014-10-29 13:59:56 3b7b72c4685aa5cf5e675c2c47ebec10d9704221 </code></pre></div>
<p dir="auto"><strong>Migrated issue, originally created by Marek Derňár (<a href="https://github.com/marderko">@marderko</a>)</strong></p> <p dir="auto">Founded bug in "Transactions and Connection Management" documentation <a href="http://docs.sqlalchemy.org/en/latest/orm/session_transaction.html" rel="nofollow">http://docs.sqlalchemy.org/en/latest/orm/session_transaction.html</a> section "Supporting Tests with Rollbacks". There is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# then each time that SAVEPOINT ends, reopen it @event.listens_for(self.session, &quot;after_transaction_end&quot;) def restart_savepoint(session, transaction): if transaction.nested and not transaction._parent.nested: # ensure that state is expired the way # session.commit() at the top level normally does # (optional step) session.expire_all() session.begin_nested()"><pre class="notranslate"><code class="notranslate"># then each time that SAVEPOINT ends, reopen it @event.listens_for(self.session, "after_transaction_end") def restart_savepoint(session, transaction): if transaction.nested and not transaction._parent.nested: # ensure that state is expired the way # session.commit() at the top level normally does # (optional step) session.expire_all() session.begin_nested() </code></pre></div> <p dir="auto">I think the if condition is not correct and the right condition is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if transaction.nested and not session.transaction.nested:"><pre class="notranslate"><code class="notranslate">if transaction.nested and not session.transaction.nested: </code></pre></div> <p dir="auto">Explanation:</p> <p dir="auto">There are constructed some transaction path (or tree) which have <code class="notranslate">session.transaction</code> in the end (tree leaf) and <code class="notranslate">session.transaction._parent._parent....._parent</code> in the start (tree root) and variable transaction from <code class="notranslate">restart_savepoint</code> is the start point (tree leaf). I think the second condition wants to restrict maximal length of path (or tree depth) to 2. But the condition is for path start and <code class="notranslate">session.begin_nested()</code> begins nested transaction in the end - so I change the condition also for the path end.</p> <p dir="auto">I attached failing example with two factories (second has first as subfactory) and simple parametrized test. It is really slow and it fails for tests number &gt; 919 because of maximal recursion depth.<br> After condition change it is really quickly and no fail in any test.</p> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/4297/savepoint_fail.zip">savepoint_fail.zip</a></p>
0
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>: 4.4.7</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Unrecoverable error: PreconditionFailed(406, 'PRECONDITION_FAILED - delivery acknowledgement on channel 1 timed out. Timeout value used: 1800000 ms. This timeout value can be configured, see consumers doc guide to learn more', (0, 0), '')"><pre class="notranslate"><code class="notranslate">Unrecoverable error: PreconditionFailed(406, 'PRECONDITION_FAILED - delivery acknowledgement on channel 1 timed out. Timeout value used: 1800000 ms. This timeout value can be configured, see consumers doc guide to learn more', (0, 0), '') </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: 3.7</li> <li><strong>Minimal Celery Version</strong>: 4.4.7</li> <li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Version</strong>: RabbitMQ v3.8.21</li> <li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li> <li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==5.0.6 arabic-reshaper==2.1.3 asgiref==3.4.1 autopep8==1.5.7 bcrypt==3.2.0 billiard==3.6.4.0 bitstring==3.1.9 blurhash-python==1.1.1 boto3==1.18.24 botocore==1.21.24 CacheControl==0.12.6 cachetools==4.2.2 celery==5.1.2 celery-prometheus-exporter==1.7.0 certifi==2020.12.5 cffi==1.14.6 chardet==4.0.0 click==7.1.2 click-didyoumean==0.0.3 click-plugins==1.1.1 click-repl==0.2.0 cryptography==3.4.7 defusedxml==0.7.1 Deprecated==1.2.12 diff-match-patch==20200713 Django==3.2.6 django-admin-tools==0.9.1 django-admintool-command==0.1.1 django-celery-beat==2.2.1 django-celery-results==2.2.0 django-compat==1.0.15 django-extensions==3.1.3 django-import-export==2.5.0 django-ipware==3.0.7 django-oauth-toolkit==1.5.0 django-prometheus==2.1.0 django-shortuuidfield==0.1.3 django-silk==4.1.0 django-storages==1.11.1 django-sympycharfield==0.4.1 django-timezone-field==4.2.1 djangorestframework==3.12.4 drf-recaptcha==2.0.4 ecdsa==0.17.0 esptool==3.1 et-xmlfile==1.1.0 fcm-django==1.0.5 firebase-admin==5.0.2 future==0.18.2 google-api-core==1.31.2 google-api-python-client==2.17.0 google-auth==2.0.0 google-auth-httplib2==0.1.0 google-cloud-core==1.7.2 google-cloud-firestore==2.2.0 google-cloud-storage==1.42.0 google-crc32c==1.1.2 google-resumable-media==1.3.3 googleapis-common-protos==1.53.0 gprof2dot==2021.2.21 grpcio==1.39.0 html5lib==1.1 httplib2==0.19.1 idna==2.10 Jinja2==3.0.1 jmespath==0.10.0 jwcrypto==1.0 kombu==5.1.0 MarkupPy==1.14 MarkupSafe==2.0.1 mpmath==1.2.1 msgpack==1.0.2 oauthlib==3.1.1 odfpy==1.4.1 openpyxl==3.0.7 packaging==21.0 paho-mqtt==1.5.1 phonenumberslite==8.12.30 Pillow==8.3.1 pip-chill==1.0.1 pkg-resources==0.0.0 prometheus-client==0.11.0 prompt-toolkit==3.0.19 proto-plus==1.19.0 protobuf==3.17.3 psycopg2-binary==2.9.1 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycodestyle==2.7.0 pycparser==2.20 pycryptodome==3.10.1 Pygments==2.10.0 pyparsing==2.4.7 PyPDF2==1.26.0 pyserial==3.5 python-bidi==0.4.2 python-crontab==2.5.1 python-dateutil==2.8.2 pytz==2021.1 PyYAML==5.4.1 qrcode==7.2 reedsolo==1.5.4 reportlab==3.6.1 requests==2.25.1 rsa==4.7.2 s3transfer==0.5.0 sentry-sdk==1.3.1 shortuuid==1.0.1 six==1.16.0 sqlparse==0.4.1 sympy==1.8 tablib==3.0.0 termcolor==1.1.0 toml==0.10.2 uritemplate==3.0.1 urllib3==1.26.2 uWSGI==2.0.19.1 vine==5.0.0 wcwidth==0.2.5 webencodings==0.5.1 wrapt==1.12.1 xhtml2pdf==0.2.5 xlrd==2.0.1 xlwt==1.3.0"><pre class="notranslate"><code class="notranslate">amqp==5.0.6 arabic-reshaper==2.1.3 asgiref==3.4.1 autopep8==1.5.7 bcrypt==3.2.0 billiard==3.6.4.0 bitstring==3.1.9 blurhash-python==1.1.1 boto3==1.18.24 botocore==1.21.24 CacheControl==0.12.6 cachetools==4.2.2 celery==5.1.2 celery-prometheus-exporter==1.7.0 certifi==2020.12.5 cffi==1.14.6 chardet==4.0.0 click==7.1.2 click-didyoumean==0.0.3 click-plugins==1.1.1 click-repl==0.2.0 cryptography==3.4.7 defusedxml==0.7.1 Deprecated==1.2.12 diff-match-patch==20200713 Django==3.2.6 django-admin-tools==0.9.1 django-admintool-command==0.1.1 django-celery-beat==2.2.1 django-celery-results==2.2.0 django-compat==1.0.15 django-extensions==3.1.3 django-import-export==2.5.0 django-ipware==3.0.7 django-oauth-toolkit==1.5.0 django-prometheus==2.1.0 django-shortuuidfield==0.1.3 django-silk==4.1.0 django-storages==1.11.1 django-sympycharfield==0.4.1 django-timezone-field==4.2.1 djangorestframework==3.12.4 drf-recaptcha==2.0.4 ecdsa==0.17.0 esptool==3.1 et-xmlfile==1.1.0 fcm-django==1.0.5 firebase-admin==5.0.2 future==0.18.2 google-api-core==1.31.2 google-api-python-client==2.17.0 google-auth==2.0.0 google-auth-httplib2==0.1.0 google-cloud-core==1.7.2 google-cloud-firestore==2.2.0 google-cloud-storage==1.42.0 google-crc32c==1.1.2 google-resumable-media==1.3.3 googleapis-common-protos==1.53.0 gprof2dot==2021.2.21 grpcio==1.39.0 html5lib==1.1 httplib2==0.19.1 idna==2.10 Jinja2==3.0.1 jmespath==0.10.0 jwcrypto==1.0 kombu==5.1.0 MarkupPy==1.14 MarkupSafe==2.0.1 mpmath==1.2.1 msgpack==1.0.2 oauthlib==3.1.1 odfpy==1.4.1 openpyxl==3.0.7 packaging==21.0 paho-mqtt==1.5.1 phonenumberslite==8.12.30 Pillow==8.3.1 pip-chill==1.0.1 pkg-resources==0.0.0 prometheus-client==0.11.0 prompt-toolkit==3.0.19 proto-plus==1.19.0 protobuf==3.17.3 psycopg2-binary==2.9.1 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycodestyle==2.7.0 pycparser==2.20 pycryptodome==3.10.1 Pygments==2.10.0 pyparsing==2.4.7 PyPDF2==1.26.0 pyserial==3.5 python-bidi==0.4.2 python-crontab==2.5.1 python-dateutil==2.8.2 pytz==2021.1 PyYAML==5.4.1 qrcode==7.2 reedsolo==1.5.4 reportlab==3.6.1 requests==2.25.1 rsa==4.7.2 s3transfer==0.5.0 sentry-sdk==1.3.1 shortuuid==1.0.1 six==1.16.0 sqlparse==0.4.1 sympy==1.8 tablib==3.0.0 termcolor==1.1.0 toml==0.10.2 uritemplate==3.0.1 urllib3==1.26.2 uWSGI==2.0.19.1 vine==5.0.0 wcwidth==0.2.5 webencodings==0.5.1 wrapt==1.12.1 xhtml2pdf==0.2.5 xlrd==2.0.1 xlwt==1.3.0 </code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">I am using latest version of Celery 4 with RabbitMQ broker.</p> <p dir="auto">Recently I upgrade my RabbitMQ broker and started getting crashes, with following critical error in log:<br> <code class="notranslate">Unrecoverable error: PreconditionFailed(406, 'PRECONDITION_FAILED - delivery acknowledgement on channel 1 timed out. Timeout value used: 1800000 ms. This timeout value can be configured, see consumers doc guide to learn more', (0, 0), '')</code></p> <p dir="auto">Doing some google searching lead me to <a href="https://groups.google.com/g/rabbitmq-users/c/X-x3DKVJb8k" rel="nofollow">a thread on RabbitMQ user group</a>, this mentions that "ack timeout" was added from v3.8.15. This is new (unexpected) behaviour with the broker upgrade, earlier with <code class="notranslate">v3.8.6</code> it did not happen.</p> <p dir="auto">Now is this known issue and fixed in Celery5 or is it new? I do not see any issues in the list regarding it.</p> <p dir="auto">Already posted this in <a href="https://groups.google.com/g/celery-users/c/fsSACtCz8U4" rel="nofollow">celery-user group</a>, but no response.</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">Proper ackhnowledgments should be sent before timeout that is causing crash.</p>
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>Retry not working properly when using chunks <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="876328567" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/6755" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/6755/hovercard" href="https://github.com/celery/celery/issues/6755">#6755</a></li> <li>Pickling Retry instance is incorrect <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="870723267" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/6748" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/6748/hovercard" href="https://github.com/celery/celery/issues/6748">#6748</a></li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>: 5.0.5</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"> </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <p dir="auto">Create a django application with celery with default settings using pyamqp and rabbitmq 3.8.16 (current version) as broker, and run it in docker using docker-compose.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="services: rabbit: container_name: rabbit image: rabbitmq:3.8.16-management hostname: myapp-rabbit celery: command: [ &quot;bash&quot;, &quot;-c&quot;, &quot;date &amp;&amp; celery -A myapp worker -l debug --scheduler django_celery_beat.schedulers:DatabaseScheduler -B&quot; ] image: &lt;image based on ubuntu:20.04&gt; container_name: celery depends_on: - rabbit - db db: image: postgres:10"><pre class="notranslate"><code class="notranslate">services: rabbit: container_name: rabbit image: rabbitmq:3.8.16-management hostname: myapp-rabbit celery: command: [ "bash", "-c", "date &amp;&amp; celery -A myapp worker -l debug --scheduler django_celery_beat.schedulers:DatabaseScheduler -B" ] image: &lt;image based on ubuntu:20.04&gt; container_name: celery depends_on: - rabbit - db db: image: postgres:10 </code></pre></div> <p dir="auto">Implement a task that will call retry, and then start everything and set up the scheduler to run the task.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@app.task(bind=True) def debug_task(self): print(&quot;Running debug task&quot;) self.retry(countdown=60 * 60, max_retries=1)"><pre class="notranslate"><code class="notranslate">@app.task(bind=True) def debug_task(self): print("Running debug task") self.retry(countdown=60 * 60, max_retries=1) </code></pre></div> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: 3.8</li> <li><strong>Minimal Celery Version</strong>: 5.0.5</li> <li><strong>Minimal Kombu Version</strong>: 5.0.2</li> <li><strong>Minimal Broker Version</strong>: rabbit 3.8.16</li> <li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li> <li><strong>Minimal OS and/or Kernel Version</strong>: ubuntu 20.04</li> <li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Django==3.1.5 amqp==5.0.6 celery==5.0.5 django-celery-beat==2.1.0 django-celery-results==2.0.1 kombu==5.0.2&lt;/summary&gt;"><pre class="notranslate"><code class="notranslate">Django==3.1.5 amqp==5.0.6 celery==5.0.5 django-celery-beat==2.1.0 django-celery-results==2.0.1 kombu==5.0.2&lt;/summary&gt; </code></pre></div> <p dir="auto"></p> </summary></details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Expected the task to retry after one hour</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">After 15 minutes, the entire celery container crashes with the following error</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="07/05/2021 06:51:38 MainProcess : celery.worker : CRITICAL Unrecoverable error: PreconditionFailed(406, 'PRECONDITION_FAILED - consumer ack timed out on channel 1', (0, 0), '') Traceback (most recent call last): File &quot;/usr/local/lib/python3.8/dist-packages/celery/worker/worker.py&quot;, line 203, in start self.blueprint.start(self) File &quot;/usr/local/lib/python3.8/dist-packages/celery/bootsteps.py&quot;, line 116, in start step.start(parent) File &quot;/usr/local/lib/python3.8/dist-packages/celery/bootsteps.py&quot;, line 365, in start return self.obj.start() File &quot;/usr/local/lib/python3.8/dist-packages/celery/worker/consumer/consumer.py&quot;, line 311, in start blueprint.start(self) File &quot;/usr/local/lib/python3.8/dist-packages/celery/bootsteps.py&quot;, line 116, in start step.start(parent) File &quot;/usr/local/lib/python3.8/dist-packages/celery/worker/consumer/consumer.py&quot;, line 592, in start c.loop(*c.loop_args()) File &quot;/usr/local/lib/python3.8/dist-packages/celery/worker/loops.py&quot;, line 81, in asynloop next(loop) File &quot;/usr/local/lib/python3.8/dist-packages/kombu/asynchronous/hub.py&quot;, line 361, in create_loop cb(*cbargs) File &quot;/usr/local/lib/python3.8/dist-packages/kombu/transport/base.py&quot;, line 235, in on_readable reader(loop) File &quot;/usr/local/lib/python3.8/dist-packages/kombu/transport/base.py&quot;, line 217, in _read drain_events(timeout=0) File &quot;/usr/local/lib/python3.8/dist-packages/amqp/connection.py&quot;, line 523, in drain_events while not self.blocking_read(timeout): File &quot;/usr/local/lib/python3.8/dist-packages/amqp/connection.py&quot;, line 529, in blocking_read return self.on_inbound_frame(frame) File &quot;/usr/local/lib/python3.8/dist-packages/amqp/method_framing.py&quot;, line 53, in on_frame callback(channel, method_sig, buf, None) File &quot;/usr/local/lib/python3.8/dist-packages/amqp/connection.py&quot;, line 535, in on_inbound_method return self.channels[channel_id].dispatch_method( File &quot;/usr/local/lib/python3.8/dist-packages/amqp/abstract_channel.py&quot;, line 143, in dispatch_method listener(*args) File &quot;/usr/local/lib/python3.8/dist-packages/amqp/channel.py&quot;, line 277, in _on_close raise error_for_code( amqp.exceptions.PreconditionFailed: (0, 0): (406) PRECONDITION_FAILED - consumer ack timed out on channel 1"><pre class="notranslate"><code class="notranslate">07/05/2021 06:51:38 MainProcess : celery.worker : CRITICAL Unrecoverable error: PreconditionFailed(406, 'PRECONDITION_FAILED - consumer ack timed out on channel 1', (0, 0), '') Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/celery/worker/worker.py", line 203, in start self.blueprint.start(self) File "/usr/local/lib/python3.8/dist-packages/celery/bootsteps.py", line 116, in start step.start(parent) File "/usr/local/lib/python3.8/dist-packages/celery/bootsteps.py", line 365, in start return self.obj.start() File "/usr/local/lib/python3.8/dist-packages/celery/worker/consumer/consumer.py", line 311, in start blueprint.start(self) File "/usr/local/lib/python3.8/dist-packages/celery/bootsteps.py", line 116, in start step.start(parent) File "/usr/local/lib/python3.8/dist-packages/celery/worker/consumer/consumer.py", line 592, in start c.loop(*c.loop_args()) File "/usr/local/lib/python3.8/dist-packages/celery/worker/loops.py", line 81, in asynloop next(loop) File "/usr/local/lib/python3.8/dist-packages/kombu/asynchronous/hub.py", line 361, in create_loop cb(*cbargs) File "/usr/local/lib/python3.8/dist-packages/kombu/transport/base.py", line 235, in on_readable reader(loop) File "/usr/local/lib/python3.8/dist-packages/kombu/transport/base.py", line 217, in _read drain_events(timeout=0) File "/usr/local/lib/python3.8/dist-packages/amqp/connection.py", line 523, in drain_events while not self.blocking_read(timeout): File "/usr/local/lib/python3.8/dist-packages/amqp/connection.py", line 529, in blocking_read return self.on_inbound_frame(frame) File "/usr/local/lib/python3.8/dist-packages/amqp/method_framing.py", line 53, in on_frame callback(channel, method_sig, buf, None) File "/usr/local/lib/python3.8/dist-packages/amqp/connection.py", line 535, in on_inbound_method return self.channels[channel_id].dispatch_method( File "/usr/local/lib/python3.8/dist-packages/amqp/abstract_channel.py", line 143, in dispatch_method listener(*args) File "/usr/local/lib/python3.8/dist-packages/amqp/channel.py", line 277, in _on_close raise error_for_code( amqp.exceptions.PreconditionFailed: (0, 0): (406) PRECONDITION_FAILED - consumer ack timed out on channel 1 </code></pre></div> <p dir="auto">Rabbit logs the following:<br> <code class="notranslate">[warning] &lt;0.10196.1&gt; Consumer None4 on channel 1 has timed out waiting on consumer acknowledgement. Timeout used: 900000 ms</code></p> <p dir="auto">Note that by downgrading rabbitmq to version 3.8.14 this doesn't happen anymore. (This might be a bug in rabbit instead.)</p>
1
<p dir="auto">If I've interpreted it correctly seems that there is some strange behavior with Keras multi inputs and the estimator.</p> <ul dir="auto"> <li>Why input layers are renamed with <code class="notranslate">_1</code> suffix?</li> <li>Why TB display a <code class="notranslate">_2</code> suffixed parallel sub-graph?</li> </ul> <p dir="auto">I've attached a snippet runnable on <a href="http://colab.research.google.com/" rel="nofollow">colab</a> and the TB rendered image.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from tensorflow import keras as ks import numpy as np from IPython.display import clear_output, Image, display, HTML def strip_consts(graph_def, max_const_size=32): &quot;&quot;&quot;Strip large constant values from graph_def.&quot;&quot;&quot; strip_def = tf.GraphDef() for n0 in graph_def.node: n = strip_def.node.add() n.MergeFrom(n0) if n.op == 'Const': tensor = n.attr['value'].tensor size = len(tensor.tensor_content) if size &gt; max_const_size: tensor.tensor_content = &quot;&lt;stripped %d bytes&gt;&quot;%size return strip_def def show_graph(graph_def, max_const_size=32): &quot;&quot;&quot;Visualize TensorFlow graph.&quot;&quot;&quot; if hasattr(graph_def, 'as_graph_def'): graph_def = graph_def.as_graph_def() strip_def = strip_consts(graph_def, max_const_size=max_const_size) code = &quot;&quot;&quot; &lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/polymer/0.3.3/platform.js&quot;&gt;&lt;/script&gt; &lt;script&gt; function load() {{ document.getElementById(&quot;{id}&quot;).pbtxt = {data}; }} &lt;/script&gt; &lt;link rel=&quot;import&quot; href=&quot;https://tensorboard.appspot.com/tf-graph-basic.build.html&quot; onload=load()&gt; &lt;div style=&quot;height:600px&quot;&gt; &lt;tf-graph-basic id=&quot;{id}&quot;&gt;&lt;/tf-graph-basic&gt; &lt;/div&gt; &quot;&quot;&quot;.format(data=repr(str(strip_def)), id='graph'+str(np.random.rand())) iframe = &quot;&quot;&quot; &lt;iframe seamless style=&quot;width:1200px;height:620px;border:0&quot; srcdoc=&quot;{}&quot;&gt;&lt;/iframe&gt; &quot;&quot;&quot;.format(code.replace('&quot;', '&amp;quot;')) display(HTML(iframe)) class ExampleHook(tf.train.SessionRunHook): def __init__(self): print('Starting the session.') return def begin(self): g = tf.get_default_graph() show_graph(g) print('Starting the session.') #for op in tf.get_default_graph().get_operations(): #print(str(op.name) ) my_input_fn = tf.estimator.inputs.numpy_input_fn( x={&quot;input_rgb&quot;: np.array(np.random.rand(5,5,3).astype(np.float32)), &quot;input_gray&quot;: np.array(np.random.rand(5,5,1).astype(np.float32)), &quot;input_mix&quot;: np.array(np.random.rand(5,5,1).astype(np.float32))}, y= np.array(np.random.rand(5,5,1)), batch_size=1, num_epochs=1, shuffle=False) input_rgb = ks.layers.Input(shape=(1,5, 5, 3), name=&quot;input_rgb&quot;) input_gray = ks.layers.Input(shape=(1,5, 5, 1), name=&quot;input_gray&quot;) input_mix = ks.layers.Input(shape=(1,5, 5, 1), name=&quot;input_mix&quot;) rgb_gray = ks.layers.concatenate([input_rgb, input_gray, input_mix], name=&quot;rbg_gray&quot;) x = ks.layers.Dense(1, activation='relu',name=&quot;Dense_1&quot;)(rgb_gray) x = ks.layers.Dense(1, activation='softmax',name=&quot;softmax&quot;)(x) model = ks.models.Model( inputs=[input_rgb, input_gray, input_mix], outputs=[x]) model.compile(loss={ 'softmax': 'binary_crossentropy'},optimizer=tf.keras.optimizers.Adam()) est = ks.estimator.model_to_estimator( keras_model=model) model.summary() print(model.input_names) pred = list(est.predict( input_fn=my_input_fn, predict_keys=None, hooks=[ExampleHook()], ))"><pre lang="import" class="notranslate"><code class="notranslate">from tensorflow import keras as ks import numpy as np from IPython.display import clear_output, Image, display, HTML def strip_consts(graph_def, max_const_size=32): """Strip large constant values from graph_def.""" strip_def = tf.GraphDef() for n0 in graph_def.node: n = strip_def.node.add() n.MergeFrom(n0) if n.op == 'Const': tensor = n.attr['value'].tensor size = len(tensor.tensor_content) if size &gt; max_const_size: tensor.tensor_content = "&lt;stripped %d bytes&gt;"%size return strip_def def show_graph(graph_def, max_const_size=32): """Visualize TensorFlow graph.""" if hasattr(graph_def, 'as_graph_def'): graph_def = graph_def.as_graph_def() strip_def = strip_consts(graph_def, max_const_size=max_const_size) code = """ &lt;script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.3.3/platform.js"&gt;&lt;/script&gt; &lt;script&gt; function load() {{ document.getElementById("{id}").pbtxt = {data}; }} &lt;/script&gt; &lt;link rel="import" href="https://tensorboard.appspot.com/tf-graph-basic.build.html" onload=load()&gt; &lt;div style="height:600px"&gt; &lt;tf-graph-basic id="{id}"&gt;&lt;/tf-graph-basic&gt; &lt;/div&gt; """.format(data=repr(str(strip_def)), id='graph'+str(np.random.rand())) iframe = """ &lt;iframe seamless style="width:1200px;height:620px;border:0" srcdoc="{}"&gt;&lt;/iframe&gt; """.format(code.replace('"', '&amp;quot;')) display(HTML(iframe)) class ExampleHook(tf.train.SessionRunHook): def __init__(self): print('Starting the session.') return def begin(self): g = tf.get_default_graph() show_graph(g) print('Starting the session.') #for op in tf.get_default_graph().get_operations(): #print(str(op.name) ) my_input_fn = tf.estimator.inputs.numpy_input_fn( x={"input_rgb": np.array(np.random.rand(5,5,3).astype(np.float32)), "input_gray": np.array(np.random.rand(5,5,1).astype(np.float32)), "input_mix": np.array(np.random.rand(5,5,1).astype(np.float32))}, y= np.array(np.random.rand(5,5,1)), batch_size=1, num_epochs=1, shuffle=False) input_rgb = ks.layers.Input(shape=(1,5, 5, 3), name="input_rgb") input_gray = ks.layers.Input(shape=(1,5, 5, 1), name="input_gray") input_mix = ks.layers.Input(shape=(1,5, 5, 1), name="input_mix") rgb_gray = ks.layers.concatenate([input_rgb, input_gray, input_mix], name="rbg_gray") x = ks.layers.Dense(1, activation='relu',name="Dense_1")(rgb_gray) x = ks.layers.Dense(1, activation='softmax',name="softmax")(x) model = ks.models.Model( inputs=[input_rgb, input_gray, input_mix], outputs=[x]) model.compile(loss={ 'softmax': 'binary_crossentropy'},optimizer=tf.keras.optimizers.Adam()) est = ks.estimator.model_to_estimator( keras_model=model) model.summary() print(model.input_names) pred = list(est.predict( input_fn=my_input_fn, predict_keys=None, hooks=[ExampleHook()], )) </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1710528/35459923-5eca90b8-02e2-11e8-8248-764671141850.png"><img src="https://user-images.githubusercontent.com/1710528/35459923-5eca90b8-02e2-11e8-8248-764671141850.png" alt="tb" style="max-width: 100%;"></a></p>
<p dir="auto">Hello, guys.<br> I got an error just after install Python 3.5.3 and Tensorflow in a Windows 10 system and it fails in the very first test, the one suggested in Tensorflow install instructions.<br> The messages I got are here:</p> <p dir="auto">Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)] on win32<br> Type "help", "copyright", "credits" or "license" for more information.</p> <blockquote> <blockquote> <blockquote> <p dir="auto">import tensorflow as tf<br> hello=tf.constant('Hello')<br> sess=tf.Session()<br> print(sess.run(hello))<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "BestSplits" device_type: "CPU"') for unknown op: BestSplits<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "CountExtremelyRandomStats" device_type: "CPU"') for unknown op: CountExtremelyRandomStats<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "FinishedNodes" device_type: "CPU"') for unknown op: FinishedNodes<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "GrowTree" device_type: "CPU"') for unknown op: GrowTree<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ReinterpretStringToFloat" device_type: "CPU"') for unknown op: ReinterpretStringToFloat<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "SampleInputs" device_type: "CPU"') for unknown op: SampleInputs<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ScatterAddNdim" device_type: "CPU"') for unknown op: ScatterAddNdim<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNInsert" device_type: "CPU"') for unknown op: TopNInsert<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNRemove" device_type: "CPU"') for unknown op: TopNRemove<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TreePredictions" device_type: "CPU"') for unknown op: TreePredictions<br> E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "UpdateFertileSlots" device_type: "CPU"') for unknown op: UpdateFertileSlots<br> b'Hello'</p> </blockquote> </blockquote> </blockquote> <p dir="auto">Do you know how to fix this issue.</p> <p dir="auto">Thanks in advance,</p> <p dir="auto">Daniel Vermes</p>
0
<ul dir="auto"> <li>Electron version: 1.4.0</li> <li>Operating system: OS X 10.11.6</li> </ul> <p dir="auto">Hi Electron team,</p> <p dir="auto">Awesome project! Discovered this the other day and it's on our way to production!</p> <p dir="auto">Chrome 53 has a flag <code class="notranslate">Desktop Share with tab source</code> (chrome://flags/#tab-for-desktop-share) that enables audio recording on the tab level. Is this possible on Electron?</p> <p dir="auto">I have tried this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var screenSource = null; desktopCapturer.getSources({ types: ['window', 'screen'] }, function(err, sources) { for (let source of sources) { if (source.name === 'Electron Dashboard') { console.log('Found dashboard:', source); screenSource = source; } } }); "><pre class="notranslate"><code class="notranslate">var screenSource = null; desktopCapturer.getSources({ types: ['window', 'screen'] }, function(err, sources) { for (let source of sources) { if (source.name === 'Electron Dashboard') { console.log('Found dashboard:', source); screenSource = source; } } }); </code></pre></div> <p dir="auto">and then grabbing the tab with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="getUserMedia({ audio: { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: screenSource.id }, optional: [] }, video: { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: screenSource.id, maxWidth: window.screen.width, maxHeight: window.screen.height }, optional: [] } }, function(screenStream) { console.log('getUserMedia on screen success', screenStream); // attach screenStream to local video element }, function(err) { console.error('getUserMedia on tab video error:', err); });"><pre class="notranslate"><code class="notranslate">getUserMedia({ audio: { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: screenSource.id }, optional: [] }, video: { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: screenSource.id, maxWidth: window.screen.width, maxHeight: window.screen.height }, optional: [] } }, function(screenStream) { console.log('getUserMedia on screen success', screenStream); // attach screenStream to local video element }, function(err) { console.error('getUserMedia on tab video error:', err); }); </code></pre></div> <p dir="auto">The video is captured splendidly, but audio is not. This audio recording works using my old setup, with the flag enabled and Chrome extensions. I used <code class="notranslate">chrome.desktopCapture.chooseDesktopMedia</code> and passed in the captured stream id to the above <code class="notranslate">getUserMedia</code> function as the <code class="notranslate">chromeMediaSourceId</code>.</p> <p dir="auto">Is there something I'm doing wrong? Thanks again! Let me know if you need anything else from me.</p>
<ul dir="auto"> <li>Electron version: <code class="notranslate">0.37.0</code></li> <li>Operating system: All</li> </ul> <p dir="auto">I've been trying for weeks now to figure this out, I need to somehow capture the audio output from my electron application. But the <code class="notranslate">desktopCapturer</code> API appears to exclude that exact use case <g-emoji class="g-emoji" alias="cry" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f622.png">😢</g-emoji></p> <p dir="auto">Is there an alternative way of performing this capture WITHOUT capturing the entire computers audio through the "screen" capturer?</p> <p dir="auto"><a href="https://github.com/atom/electron/blob/master/docs/api/desktop-capturer.md">https://github.com/atom/electron/blob/master/docs/api/desktop-capturer.md</a></p> <p dir="auto">Also open to any JS methods of capturing a stream from an Audio element</p>
1
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [48]: s = pd.Series([np.NaN, 'hello world']) In [49]: s Out[49]: 0 NaN 1 hello world dtype: object In [50]: s.fillna([]) Out[50]: 0 NaN 1 hello world dtype: object In [51]: s.fillna(['not empty']) Out[51]: 0 not empty 1 hello world dtype: object"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">48</span>]: <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-s1">np</span>.<span class="pl-v">NaN</span>, <span class="pl-s">'hello world'</span>]) <span class="pl-v">In</span> [<span class="pl-c1">49</span>]: <span class="pl-s1">s</span> <span class="pl-v">Out</span>[<span class="pl-c1">49</span>]: <span class="pl-c1">0</span> <span class="pl-v">NaN</span> <span class="pl-c1">1</span> <span class="pl-s1">hello</span> <span class="pl-s1">world</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">object</span> <span class="pl-v">In</span> [<span class="pl-c1">50</span>]: <span class="pl-s1">s</span>.<span class="pl-en">fillna</span>([]) <span class="pl-v">Out</span>[<span class="pl-c1">50</span>]: <span class="pl-c1">0</span> <span class="pl-v">NaN</span> <span class="pl-c1">1</span> <span class="pl-s1">hello</span> <span class="pl-s1">world</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">object</span> <span class="pl-v">In</span> [<span class="pl-c1">51</span>]: <span class="pl-s1">s</span>.<span class="pl-en">fillna</span>([<span class="pl-s">'not empty'</span>]) <span class="pl-v">Out</span>[<span class="pl-c1">51</span>]: <span class="pl-c1">0</span> <span class="pl-c1">not</span> <span class="pl-s1">empty</span> <span class="pl-c1">1</span> <span class="pl-s1">hello</span> <span class="pl-s1">world</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">object</span></pre></div> <p dir="auto">Had a quick peak in the code and it looks like a numpy issue (1.6.2)</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [52]: a = np.array([np.NaN, 'hello world']) In [53]: m = np.array([True, False]) In [54]: a[m] = [] In [55]: a Out[55]: array(['nan', 'hello world'], dtype='|S11') In [56]: a[m] = ['not empty'] In [57]: a Out[57]: array(['not empty', 'hello world'], dtype='|S11')"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">52</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-s1">np</span>.<span class="pl-v">NaN</span>, <span class="pl-s">'hello world'</span>]) <span class="pl-v">In</span> [<span class="pl-c1">53</span>]: <span class="pl-s1">m</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">True</span>, <span class="pl-c1">False</span>]) <span class="pl-v">In</span> [<span class="pl-c1">54</span>]: <span class="pl-s1">a</span>[<span class="pl-s1">m</span>] <span class="pl-c1">=</span> [] <span class="pl-v">In</span> [<span class="pl-c1">55</span>]: <span class="pl-s1">a</span> <span class="pl-v">Out</span>[<span class="pl-c1">55</span>]: <span class="pl-en">array</span>([<span class="pl-s">'nan'</span>, <span class="pl-s">'hello world'</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'|S11'</span>) <span class="pl-v">In</span> [<span class="pl-c1">56</span>]: <span class="pl-s1">a</span>[<span class="pl-s1">m</span>] <span class="pl-c1">=</span> [<span class="pl-s">'not empty'</span>] <span class="pl-v">In</span> [<span class="pl-c1">57</span>]: <span class="pl-s1">a</span> <span class="pl-v">Out</span>[<span class="pl-c1">57</span>]: <span class="pl-en">array</span>([<span class="pl-s">'not empty'</span>, <span class="pl-s">'hello world'</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'|S11'</span>)</pre></div> <p dir="auto">similar issue when using operators supporting <code class="notranslate">fill_value</code></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [58]: s1 = pd.Series([np.NaN, [1,2], [10, 20]]) In [59]: s2 = pd.Series([[3,4], np.NaN, [30, 40]]) In [60]: s1.add(s2, fill_value=[]) ... TypeError: unsupported operand type(s) for +: 'float' and 'list'"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">58</span>]: <span class="pl-s1">s1</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-s1">np</span>.<span class="pl-v">NaN</span>, [<span class="pl-c1">1</span>,<span class="pl-c1">2</span>], [<span class="pl-c1">10</span>, <span class="pl-c1">20</span>]]) <span class="pl-v">In</span> [<span class="pl-c1">59</span>]: <span class="pl-s1">s2</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([[<span class="pl-c1">3</span>,<span class="pl-c1">4</span>], <span class="pl-s1">np</span>.<span class="pl-v">NaN</span>, [<span class="pl-c1">30</span>, <span class="pl-c1">40</span>]]) <span class="pl-v">In</span> [<span class="pl-c1">60</span>]: <span class="pl-s1">s1</span>.<span class="pl-en">add</span>(<span class="pl-s1">s2</span>, <span class="pl-s1">fill_value</span><span class="pl-c1">=</span>[]) ... <span class="pl-v">TypeError</span>: <span class="pl-en">unsupported</span> <span class="pl-s1">operand</span> <span class="pl-s1">type</span>(<span class="pl-s1">s</span>) <span class="pl-s1">for</span> <span class="pl-c1">+</span>: <span class="pl-s">'float'</span> <span class="pl-c1">and</span> <span class="pl-s">'list'</span></pre></div> <p dir="auto">Did not try for DataFrame, but i suppose this will be the same.</p>
<p dir="auto">Should raise on a passed list to <code class="notranslate">value</code></p> <p dir="auto">The results from the fillna() method are very strange when the value parameter is given a list.</p> <p dir="auto">For example, using a simple example DataFrame:</p> <blockquote> <p dir="auto">df = pandas.DataFrame({'A': [numpy.nan, 1, 2], 'B': [10, numpy.nan, 12], 'C': [[20, 21, 22], [23, 24, 25], numpy.nan]})<br> df<br> A B C<br> 0 NaN 10 [20, 21, 22]<br> 1 1 NaN [23, 24, 25]<br> 2 2 12 NaN</p> <p dir="auto">df.fillna(value=[100, 101, 102])<br> A B C<br> 0 100 10 [20, 21, 22]<br> 1 1 101 [23, 24, 25]<br> 2 2 12 102</p> </blockquote> <p dir="auto">So it appears the values in the list are used to fill the 'holes' in order, if the list has the same length as number of holes. But if the the list is shorter than the number of holes, the behavior changes to using only the first value in the list:</p> <blockquote> <p dir="auto">df.fillna(value=[100, 101])<br> A B C<br> 0 100 10 [20, 21, 22]<br> 1 1 100 [23, 24, 25]<br> 2 2 12 100</p> </blockquote> <p dir="auto">If the list is longer than the number of holes, you get something even more odd:</p> <blockquote> <p dir="auto">df.fillna(value=[100, 101, 102, 103])<br> A B C<br> 0 100 10 [20, 21, 22]<br> 1 1 100 [23, 24, 25]<br> 2 2 12 102</p> </blockquote> <p dir="auto">If you specify provide a dict that specifies the fill values by column, the values from the list are used within that column only:</p> <blockquote> <p dir="auto">df.fillna(value={'C': [100, 101]})<br> A B C<br> 0 NaN 10 [20, 21, 22]<br> 1 1 NaN [23, 24, 25]<br> 2 2 12 100</p> </blockquote> <p dir="auto">Since it's not always practical to know the number of NaN values a priori, or to customize the length of the value list to match it, this is problematic. Furthermore, some desired values get over-interpreted and cannot be used:</p> <p dir="auto">For example, if you want to actually replace all NaN instances in a single column with the same list (either empty or non-empty), I can't figure out how to do it:</p> <blockquote> <p dir="auto">df.fillna(value={'C': [[100,101]]})<br> A B C<br> 0 NaN 10 [20, 21, 22]<br> 1 1 NaN [23, 24, 25]<br> 2 2 12 100</p> </blockquote> <p dir="auto">Indeed, if you specify the empty list nothing is filled:</p> <blockquote> <p dir="auto">df.fillna(value={'C': list()})<br> A B C<br> 0 NaN 10 [20, 21, 22]<br> 1 1 NaN [23, 24, 25]<br> 2 2 12 NaN</p> </blockquote> <p dir="auto">But a dict works fine:</p> <blockquote> <p dir="auto">f.fillna(value={'C': {0: 1}})<br> A B C<br> 0 NaN 10 [20, 21, 22]<br> 1 1 NaN [23, 24, 25]<br> 2 2 12 {0: 1}</p> <p dir="auto">df.fillna(value={'C': dict()})<br> A B C<br> 0 NaN 10 [20, 21, 22]<br> 1 1 NaN [23, 24, 25]<br> 2 2 12 {}</p> </blockquote> <p dir="auto">So it appears the fillna() is making a lot of decisions about how the fill values should be applied, and certain desired outcomes can't be achieved because it's being too 'clever'.</p>
1
<pre class="notranslate">This text in the spec: --- As a special case, if the return parameters of a function or method g are equal in number and individually assignable to the parameters of another function or method f, then the call f(g(parameters_of_g)) will invoke f after binding the return values of g to the parameters of f in order. The call of f must contain no parameters other than the call of g. If f has a final ... parameter, it is assigned the return values of g that remain after assignment of regular parameters. --- doesn't preclude the following program: package main func f() {} func g() {} func main() { f(g()) } though the tools reject it. The text should be amended to restrict the special case to functions g with more than one return parameter.</pre>
<pre class="notranslate">go version go1.3beta2 +1de165698f51 Thu May 22 11:45:03 2014 -0400 darwin/amd64 The program is package a type S struct { x interface{} i int } func f() { c := make(chan int) a := [2]*int{} for ; ; c &lt;- *a[S{}.i] { } } $ go build -race src.go src.go:6: internal error: f autotmp_0001 (type S) recorded as live on entry</pre>
0
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br> This is a bug report. I think this bug and one already reported (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="370404098" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/13856" data-hovercard-type="issue" data-hovercard-url="/facebook/react/issues/13856/hovercard" href="https://github.com/facebook/react/issues/13856">#13856</a>) have the same root cause.</p> <p dir="auto"><strong>What is the current behavior?</strong><br> A component instance preventing its own rerender, by returning <code class="notranslate">false</code> from <code class="notranslate">shouldComponentUpdate</code> may under certain condition still get its children rerendered, even if no direct update to said children happened.</p> <p dir="auto">This behaviour is triggered by a very specific stack of components. The simplest example I managed to create (<a href="https://codesandbox.io/s/9zymvq479r" rel="nofollow">https://codesandbox.io/s/9zymvq479r</a>) involves five components, each rendering the next one:</p> <ul dir="auto"> <li><code class="notranslate">UpdatingRoot</code> responsible for triggering the top-level update, by calling <code class="notranslate">setState</code> in the <code class="notranslate">componentDidMount</code> lifecycle method.</li> <li><code class="notranslate">LegacyContextInjector</code> responsible for creating the child context object according to the legacy context API.</li> <li><code class="notranslate">SCUBarrier</code> with <code class="notranslate">shouldComponentUpdate</code> function always returning <code class="notranslate">false</code>. Any children of this component instance should not be rerendered as long as they themselves are not sheduled for an update. This is the behaviour I expect. This bug prevents it from happening.</li> <li><code class="notranslate">IntermediateComponent</code> responsible for rendering <code class="notranslate">UpdatingChild</code> few levels down in the component instance tree.</li> <li><code class="notranslate">UpdatingChild</code> responsible for calling its own <code class="notranslate">setState</code> in the <code class="notranslate">componentDidMount</code> lifecycle method.</li> </ul> <p dir="auto">Each of the created component instances will be rendered only one or two times. Both <code class="notranslate">UpdatingRoot</code> and <code class="notranslate">UpdatingChild</code> are expected to be rendered twice, and this does happen. Each of the <code class="notranslate">IntermediateComponent</code> instances is expected to render only once. This expectation is based on the fact that the <code class="notranslate">SCUBarrier#shouldComponentUpdate</code> always returns false, and no child <code class="notranslate">IntermediateComponent</code> instance updates itself. The legacy context API should not pierce through <code class="notranslate">shouldComponentUpdate</code> returning <code class="notranslate">false</code> (<a href="https://reactjs.org/docs/legacy-context.html#updating-context" rel="nofollow">https://reactjs.org/docs/legacy-context.html#updating-context</a>).</p> <p dir="auto">Despite those expectation, all <code class="notranslate">IntermediateComponent</code> instances are rendered twice.</p> <p dir="auto">It's important that the <code class="notranslate">UpdatingRoot#setState</code> and <code class="notranslate">UpdatingChild#setState</code> function are batched together. You can try "unbatching" them, by swapping:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="this.setState({ weAreHome: &quot;my friend&quot; });"><pre class="notranslate"><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">weAreHome</span>: <span class="pl-s">"my friend"</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">for</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="setTimeout(() =&gt; this.setState({ weAreHome: &quot;my friend&quot; }),0)"><pre class="notranslate"><span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">weAreHome</span>: <span class="pl-s">"my friend"</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">,</span><span class="pl-c1">0</span><span class="pl-kos">)</span></pre></div> <p dir="auto">When this is done the <code class="notranslate">IntermediateComponent</code> instances are correctly rendered only once.</p> <p dir="auto">My example code does the batching by calling <code class="notranslate">UpdatingRoot#setState</code> and <code class="notranslate">UpdatingChild#setState</code> functions directly in the <code class="notranslate">componentDidMount</code> lifecycles of their respective components. I believe this generally is an anti-pattern, but this approach was chosen for simplicity. The same issue can be replicated by calling both <code class="notranslate">setState</code> in <code class="notranslate">ReactDOM.unstable_batchedUpdates(() =&gt; { ... })</code></p> <p dir="auto">For a more practical example of a situation in which two ancestor-descendant components may naturally schedule updates in a batch, take a look at <a href="https://github.com/tappleby/redux-batched-subscribe">https://github.com/tappleby/redux-batched-subscribe</a>.</p> <p dir="auto">Legacy context API is used by popular components like <code class="notranslate">Transition</code> from <a href="https://github.com/reactjs/react-transition-group">https://github.com/reactjs/react-transition-group</a> or by commonly used <code class="notranslate">react-redux</code>.</p> <p dir="auto">A real-life example of this bug could be:<br> Two Redux-connected component <code class="notranslate">A</code> and <code class="notranslate">C</code> are scheduled for update in the same batch. A <code class="notranslate">Transition</code> (from <code class="notranslate">react-transition-group</code>) injecting legacy context is rendered between them. Some component <code class="notranslate">B</code> in between <code class="notranslate">A</code> and <code class="notranslate">C</code> (descendent of <code class="notranslate">A</code>, ancestor of <code class="notranslate">C</code>) implements <code class="notranslate">shouldComponentUpdate</code> to optimize the rendering of some unchanging subtree (which eventually, down the line, renders <code class="notranslate">B</code>). Both <code class="notranslate">A</code> and <code class="notranslate">C</code> component instances rerender correctly (as expected, since <code class="notranslate">react-redux</code> uses legacy context API correctly as described in <a href="https://medium.com/@mweststrate/how-to-safely-use-react-context-b7e343eff076" rel="nofollow">https://medium.com/@mweststrate/how-to-safely-use-react-context-b7e343eff076</a>). However the instances corresponding to the unchanging element tree returned by <code class="notranslate">B</code> will also be unexpectedly rerendered.</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.</strong><br> <a href="https://codesandbox.io/s/9zymvq479r" rel="nofollow">https://codesandbox.io/s/9zymvq479r</a></p> <p dir="auto"><strong>What is the expected behavior?</strong><br> All <code class="notranslate">IntermediateComponent</code> instances should be rendered only once.</p> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong><br> react "16.6.0-alpha.f47a958"<br> react-dom "16.6.0-alpha.8af6728 - canary"</p> <p dir="auto">I originally discovered this issue in the React/ReactDOM version 16.5.2</p> <p dir="auto">Please let me know if there is something unclear about this bug. It's definitely not an easy thing to reproduce, since so many different components need to be involved!</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">bug.</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">In a component tree where legacy context and new context are co-exisiting, when components are placed on tree nodes under the legacy context provider and between new context provider and consumer, components are always rendered even if <code class="notranslate">shouldComponentUpdate()</code> returns false in a parent component.</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.</strong></p> <p dir="auto"><a href="https://jsfiddle.net/fdrgz9c4/15/" rel="nofollow">https://jsfiddle.net/fdrgz9c4/15/</a></p> <p dir="auto">The above is the minimal case I've created without other dependencies, but first I found this behaviour in my Redux application, which uses legacy style context to map the state in store.</p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">Should not call <code class="notranslate">render()</code> when <code class="notranslate">shouldComponentUpdate()</code> returns false in parent components, as same as the other cases (it prevents rendering when it is located without legacy context or not between new context provider / consumer tree. See the above fiddle)</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">React 16.5.2, maybe in older versions.<br> No OS/browser dependencies I believe.</p>
1
<p dir="auto">Installation of scipy using zc.buildout fails, because <code class="notranslate">numpy.distutils.core</code> is not available during install:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ ./bin/buildout Unused options for buildout: 'unzip'. Getting distribution for 'scipy'. Traceback (most recent call last): […] File &quot;setup.py&quot;, line 230, in &lt;module&gt; File &quot;setup.py&quot;, line 218, in setup_package ImportError: No module named numpy.distutils.core An error occurred when trying to install scipy 0.13.3. Look above this message for any errors that were output by easy_install. While: Installing ipython. Getting distribution for 'scipy'. Error: Couldn't install: scipy 0.13.3"><pre class="notranslate">$ ./bin/buildout Unused options <span class="pl-k">for</span> buildout: <span class="pl-s"><span class="pl-pds">'</span>unzip<span class="pl-pds">'</span></span>. Getting distribution <span class="pl-k">for</span> <span class="pl-s"><span class="pl-pds">'</span>scipy<span class="pl-pds">'</span></span>. Traceback (most recent call last): […] File <span class="pl-s"><span class="pl-pds">"</span>setup.py<span class="pl-pds">"</span></span>, line 230, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span> File <span class="pl-s"><span class="pl-pds">"</span>setup.py<span class="pl-pds">"</span></span>, line 218, <span class="pl-k">in</span> setup_package ImportError: No module named numpy.distutils.core An error occurred when trying to install scipy 0.13.3. Look above this message <span class="pl-k">for</span> any errors that were output by easy_install. While: Installing ipython. Getting distribution <span class="pl-k">for</span> <span class="pl-s"><span class="pl-pds">'</span>scipy<span class="pl-pds">'</span></span>. Error: Couldn<span class="pl-s"><span class="pl-pds">'</span>t install: scipy 0.13.3</span></pre></div>
<p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="212921526" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/8762" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/8762/hovercard" href="https://github.com/numpy/numpy/pull/8762">numpy/numpy#8762</a></p>
0
<p dir="auto">When trying to use jasmine and angular-scenario type definitions in same project, I get the following conflicts:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Duplicate identifier 'browser'. Duplicate identifier 'element'. The property 'toThrow' does not exist on value of type 'angularScenario.Expect'. The property 'toNotEqual' does not exist on value of type 'angularScenario.Expect'. Duplicate identifier 'xdescribe'. Duplicate identifier 'it'. Duplicate identifier 'xit'. Duplicate identifier 'beforeEach'. Duplicate identifier 'afterEach'. "><pre class="notranslate"><code class="notranslate">Duplicate identifier 'browser'. Duplicate identifier 'element'. The property 'toThrow' does not exist on value of type 'angularScenario.Expect'. The property 'toNotEqual' does not exist on value of type 'angularScenario.Expect'. Duplicate identifier 'xdescribe'. Duplicate identifier 'it'. Duplicate identifier 'xit'. Duplicate identifier 'beforeEach'. Duplicate identifier 'afterEach'. </code></pre></div> <p dir="auto">I had to comment out these lines in angular-scenario.d.ts to kind of get it working. But I think I may have to remove that file completely:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="//declare var describe: angularScenario.RunFunctionWithDescription; declare var ddescribe: angularScenario.RunFunctionWithDescription; //declare var xdescribe: angularScenario.RunFunctionWithDescription; //declare var beforeEach: angularScenario.RunFunction; //declare var afterEach: angularScenario.RunFunction; //declare var it: angularScenario.RunFunctionWithDescription; declare var iit: angularScenario.RunFunctionWithDescription; //declare var xit: angularScenario.RunFunctionWithDescription; declare var pause: angularScenario.PauseFunction; declare var sleep: angularScenario.SleepFunction; //declare function browser(): angularScenario.Browser; declare function expect(expectation: angularScenario.Future): angularScenario.Expect; declare var using: angularScenario.UsingFunction; declare var binding: angularScenario.BindingFunction; declare function input(ngModelBinding: string): angularScenario.Input; declare function repeater(selector: string, repeaterDescription?: string): angularScenario.Repeater; declare function select(ngModelBinding: string): angularScenario.Select; //declare function element(selector: string, elementDescription?: string): angularScenario.Element;"><pre class="notranslate"><code class="notranslate">//declare var describe: angularScenario.RunFunctionWithDescription; declare var ddescribe: angularScenario.RunFunctionWithDescription; //declare var xdescribe: angularScenario.RunFunctionWithDescription; //declare var beforeEach: angularScenario.RunFunction; //declare var afterEach: angularScenario.RunFunction; //declare var it: angularScenario.RunFunctionWithDescription; declare var iit: angularScenario.RunFunctionWithDescription; //declare var xit: angularScenario.RunFunctionWithDescription; declare var pause: angularScenario.PauseFunction; declare var sleep: angularScenario.SleepFunction; //declare function browser(): angularScenario.Browser; declare function expect(expectation: angularScenario.Future): angularScenario.Expect; declare var using: angularScenario.UsingFunction; declare var binding: angularScenario.BindingFunction; declare function input(ngModelBinding: string): angularScenario.Input; declare function repeater(selector: string, repeaterDescription?: string): angularScenario.Repeater; declare function select(ngModelBinding: string): angularScenario.Select; //declare function element(selector: string, elementDescription?: string): angularScenario.Element; </code></pre></div> <p dir="auto">Thanks!<br> Jay</p>
<p dir="auto">I'll try and add a section to the bottom of <code class="notranslate">npm test</code> script to show the error log for each file that failed.</p> <p dir="auto">Creating here to track and prevent duplication of effort.</p>
0
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.3.0 (latest released)</p> <h3 dir="auto">What happened</h3> <p dir="auto">In the new grid view, tasks are not visible if they contain dots in their name (but are shown in the details panel and graph view).</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/38216041/169659004-f7c57357-2600-4a76-8cad-9ee073086190.png"><img width="1449" alt="grid" src="https://user-images.githubusercontent.com/38216041/169659004-f7c57357-2600-4a76-8cad-9ee073086190.png" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/38216041/169659002-0d8359c7-9483-4b69-8bc6-3c15e84f7fbf.png"><img width="331" alt="graph" src="https://user-images.githubusercontent.com/38216041/169659002-0d8359c7-9483-4b69-8bc6-3c15e84f7fbf.png" style="max-width: 100%;"></a></p> <h3 dir="auto">What you think should happen instead</h3> <p dir="auto">All tasks should be displayed, matching the ones in the detailed panel and the graph view.</p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">Here is a dag that reproduces the problem:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from airflow import DAG from airflow.operators.dummy_operator import DummyOperator from datetime import datetime dag = DAG(&quot;some-test-dag&quot;, start_date=datetime(2021, 0o2, 17), schedule_interval=&quot;0 10 * * *&quot;, max_active_runs=1, catchup=False) DummyOperator(task_id=f&quot;task_without_dots&quot;, dag=dag) DummyOperator(task_id=f&quot;task.with.dots&quot;, dag=dag)"><pre class="notranslate"><code class="notranslate">from airflow import DAG from airflow.operators.dummy_operator import DummyOperator from datetime import datetime dag = DAG("some-test-dag", start_date=datetime(2021, 0o2, 17), schedule_interval="0 10 * * *", max_active_runs=1, catchup=False) DummyOperator(task_id=f"task_without_dots", dag=dag) DummyOperator(task_id=f"task.with.dots", dag=dag) </code></pre></div> <p dir="auto">The task without the dot is displayed, however, the other doesn't.</p> <h3 dir="auto">Operating System</h3> <p dir="auto">Ubuntu / MacOS</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Deployment</h3> <p dir="auto">Official Apache Airflow Helm Chart</p> <h3 dir="auto">Deployment details</h3> <p dir="auto">EKS / official helm chart</p> <h3 dir="auto">Anything else</h3> <ul dir="auto"> <li>no errors are shown in the console (chrome)</li> <li>the response from <code class="notranslate">api/v1/dags/some-test-dag/tasks</code> had two elements</li> <li>the div for the missing task is present in the body (just empty)</li> <li>i spotted the block of code (in packed <code class="notranslate">tree.js</code> in chrome) which prevents the task from showing:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" const {task: t, level: n, prevTaskId: a, isParentOpen: i=!0, dagRunIds: u} = e // ... , w = Object(r.useCallback)((()=&gt;d &amp;&amp; b()), [b, d]) , x = t.id.split(&quot;.&quot;); &lt;---- x.splice(-1); const E = i &amp;&amp; x.every((e=&gt;v.some((t=&gt;t === e)))); // &lt;--- returns false for tasks containing dots in their name // .... }, o.a.createElement(Qb, { in: E, unmountOnExit: !0 }"><pre class="notranslate"><code class="notranslate"> const {task: t, level: n, prevTaskId: a, isParentOpen: i=!0, dagRunIds: u} = e // ... , w = Object(r.useCallback)((()=&gt;d &amp;&amp; b()), [b, d]) , x = t.id.split("."); &lt;---- x.splice(-1); const E = i &amp;&amp; x.every((e=&gt;v.some((t=&gt;t === e)))); // &lt;--- returns false for tasks containing dots in their name // .... }, o.a.createElement(Qb, { in: E, unmountOnExit: !0 } </code></pre></div> <ul dir="auto"> <li>i couldn't find the split code in <a href="https://github.com/apache/airflow/blob/main/airflow/www/static/js/grid/Grid.jsx#L42">Grid</a> or <a href="https://github.com/apache/airflow/blob/main/airflow/www/static/js/grid/renderTaskRows.jsx#L141">Collapse</a></li> </ul> <h3 dir="auto">Are you willing to submit PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.3.0 (latest released)</p> <h3 dir="auto">What happened</h3> <p dir="auto"><code class="notranslate">task_id</code> with <code class="notranslate">.</code> e.g. <code class="notranslate">hello.world</code> is not rendered in grid view.</p> <h3 dir="auto">What you think should happen instead</h3> <p dir="auto">The task should be rendered just fine in Grid view.</p> <h3 dir="auto">How to reproduce</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # &quot;License&quot;); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. &quot;&quot;&quot;Example DAG demonstrating the usage of the BashOperator.&quot;&quot;&quot; from datetime import datetime, timedelta from airflow import DAG from airflow.operators.bash import BashOperator from airflow.operators.dummy import DummyOperator with DAG( dag_id=&quot;example_bash_operator&quot;, schedule_interval=&quot;0 0 * * *&quot;, start_date=datetime(2021, 1, 1), catchup=False, dagrun_timeout=timedelta(minutes=60), tags=[&quot;example&quot;, &quot;example2&quot;], params={&quot;example_key&quot;: &quot;example_value&quot;}, ) as dag: run_this_last = DummyOperator( task_id=&quot;run.this.last&quot;, ) # [START howto_operator_bash] run_this = BashOperator( task_id=&quot;run.after.loop&quot;, bash_command=&quot;echo 1&quot;, ) # [END howto_operator_bash] run_this &gt;&gt; run_this_last for i in range(3): task = BashOperator( task_id=&quot;runme.&quot; + str(i), bash_command='echo &quot;{{ task_instance_key_str }}&quot; &amp;&amp; sleep 1', ) task &gt;&gt; run_this # [START howto_operator_bash_template] also_run_this = BashOperator( task_id=&quot;also.run.this&quot;, bash_command='echo &quot;run_id={{ run_id }} | dag_run={{ dag_run }}&quot;', ) # [END howto_operator_bash_template] also_run_this &gt;&gt; run_this_last # [START howto_operator_bash_skip] this_will_skip = BashOperator( task_id=&quot;this.will.skip&quot;, bash_command='echo &quot;hello world&quot;; exit 99;', dag=dag, ) # [END howto_operator_bash_skip] this_will_skip &gt;&gt; run_this_last if __name__ == &quot;__main__&quot;: dag.cli()"><pre class="notranslate"><code class="notranslate"># # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. """Example DAG demonstrating the usage of the BashOperator.""" from datetime import datetime, timedelta from airflow import DAG from airflow.operators.bash import BashOperator from airflow.operators.dummy import DummyOperator with DAG( dag_id="example_bash_operator", schedule_interval="0 0 * * *", start_date=datetime(2021, 1, 1), catchup=False, dagrun_timeout=timedelta(minutes=60), tags=["example", "example2"], params={"example_key": "example_value"}, ) as dag: run_this_last = DummyOperator( task_id="run.this.last", ) # [START howto_operator_bash] run_this = BashOperator( task_id="run.after.loop", bash_command="echo 1", ) # [END howto_operator_bash] run_this &gt;&gt; run_this_last for i in range(3): task = BashOperator( task_id="runme." + str(i), bash_command='echo "{{ task_instance_key_str }}" &amp;&amp; sleep 1', ) task &gt;&gt; run_this # [START howto_operator_bash_template] also_run_this = BashOperator( task_id="also.run.this", bash_command='echo "run_id={{ run_id }} | dag_run={{ dag_run }}"', ) # [END howto_operator_bash_template] also_run_this &gt;&gt; run_this_last # [START howto_operator_bash_skip] this_will_skip = BashOperator( task_id="this.will.skip", bash_command='echo "hello world"; exit 99;', dag=dag, ) # [END howto_operator_bash_skip] this_will_skip &gt;&gt; run_this_last if __name__ == "__main__": dag.cli() </code></pre></div> <h3 dir="auto">Operating System</h3> <p dir="auto">Debian GNU/Linux 11 (bullseye)</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Deployment</h3> <p dir="auto">Official Apache Airflow Helm Chart</p> <h3 dir="auto">Deployment details</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Anything else</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Are you willing to submit PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
1
<p dir="auto"><strong>Description</strong></p> <p dir="auto">Up until database interaction is introduced, the tutorial for FastAPI uses pydantic models for everything, such as this example in <a href="https://fastapi.tiangolo.com/tutorial/extra-models/" rel="nofollow">the sextion on Extra Models</a> :</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class UserOut(BaseModel): username: str email: EmailStr full_name: str = None class UserInDB(BaseModel): username: str hashed_password: str email: EmailStr full_name: str = None"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">UserOut</span>(<span class="pl-v">BaseModel</span>): <span class="pl-s1">username</span>: <span class="pl-s1">str</span> <span class="pl-s1">email</span>: <span class="pl-v">EmailStr</span> <span class="pl-s1">full_name</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span> <span class="pl-k">class</span> <span class="pl-v">UserInDB</span>(<span class="pl-v">BaseModel</span>): <span class="pl-s1">username</span>: <span class="pl-s1">str</span> <span class="pl-s1">hashed_password</span>: <span class="pl-s1">str</span> <span class="pl-s1">email</span>: <span class="pl-v">EmailStr</span> <span class="pl-s1">full_name</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span></pre></div> <p dir="auto">This alows for the "database model" to have private data which will not be exposed through the API. Later, in <a href="https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/" rel="nofollow">the section on security</a>, a similar trick is used, but this time using inheritance to stack the two models (which I find makes the return-casting used by some functions better encoded in the type system).</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class User(BaseModel): username: str email: str = None full_name: str = None disabled: bool = None class UserInDB(User): hashed_password: str"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">User</span>(<span class="pl-v">BaseModel</span>): <span class="pl-s1">username</span>: <span class="pl-s1">str</span> <span class="pl-s1">email</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span> <span class="pl-s1">full_name</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span> <span class="pl-s1">disabled</span>: <span class="pl-s1">bool</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span> <span class="pl-k">class</span> <span class="pl-v">UserInDB</span>(<span class="pl-v">User</span>): <span class="pl-s1">hashed_password</span>: <span class="pl-s1">str</span></pre></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def get_db_user() -&gt; UserInDB: return UserInDB( username=&quot;johndoe&quot;, full_name=&quot;John Doe&quot;, email=&quot;johndoe@example.com&quot;, hashed_password=&quot;fakehashedsecret&quot;, disabled=False ) def get_user() -&gt; User: return get_db_user()"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">get_db_user</span>() <span class="pl-c1">-&gt;</span> <span class="pl-v">UserInDB</span>: <span class="pl-k">return</span> <span class="pl-v">UserInDB</span>( <span class="pl-s1">username</span><span class="pl-c1">=</span><span class="pl-s">"johndoe"</span>, <span class="pl-s1">full_name</span><span class="pl-c1">=</span><span class="pl-s">"John Doe"</span>, <span class="pl-s1">email</span><span class="pl-c1">=</span><span class="pl-s">"johndoe@example.com"</span>, <span class="pl-s1">hashed_password</span><span class="pl-c1">=</span><span class="pl-s">"fakehashedsecret"</span>, <span class="pl-s1">disabled</span><span class="pl-c1">=</span><span class="pl-c1">False</span> ) <span class="pl-k">def</span> <span class="pl-en">get_user</span>() <span class="pl-c1">-&gt;</span> <span class="pl-v">User</span>: <span class="pl-k">return</span> <span class="pl-en">get_db_user</span>()</pre></div> <p dir="auto">However, when <a href="https://fastapi.tiangolo.com/tutorial/sql-databases/" rel="nofollow">proper databases are introduced</a>, those Pydantic models are dropped in favor of a single SQLAlchemy ORM model, with no effort to bridge the two parts. And while one could see this as the SQLAlchemy models completely superseding the Pydantic models, <a href="https://github.com/tiangolo/full-stack-fastapi-postgresql">the fullstack demo app</a> appears to <a href="https://github.com/tiangolo/full-stack-fastapi-postgresql/blob/ecd634e49715bb57fdfeb35b9dba21a6e94cf012/%7B%7Bcookiecutter.project_slug%7D%7D/backend/app/app/api/api_v1/endpoints/login.py#L13-L16">actually use both</a>, so there appears to be value in attempting to use them together, something which the documentation doesn't seem to address.</p> <p dir="auto">So can/should Pydantic and SQLAlchemy models be used together? If they are, how is one meant to connect the two together and can this still be done while maintaining some kind of type hierarchy?</p>
<p dir="auto"><strong>Describe the bug</strong><br> Getting duplicate headers on API methods with subdependencies requiring the same dependency with a Header argument.</p> <p dir="auto"><strong>To Reproduce</strong><br> I've created an example repo to reproduce <a href="https://github.com/henriklindgren/fastapi-header-bug">https://github.com/henriklindgren/fastapi-header-bug</a><br> Steps to reproduce the behavior:</p> <ol dir="auto"> <li>Create an API-method which uses the same dependency, with a Header argument, in each of 2 paths of the dependency tree. Like this <a href="https://github.com/henriklindgren/fastapi-header-bug/blob/master/app/main.py">https://github.com/henriklindgren/fastapi-header-bug/blob/master/app/main.py</a></li> <li>Visit generated OpenApi json and see duplicate header requirements for the method.</li> </ol> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;parameters&quot;: [ { &quot;required&quot;: true, &quot;schema&quot;: { &quot;title&quot;: &quot;Someheader&quot;, &quot;type&quot;: &quot;string&quot; }, &quot;name&quot;: &quot;someheader&quot;, &quot;in&quot;: &quot;header&quot; }, { &quot;required&quot;: true, &quot;schema&quot;: { &quot;title&quot;: &quot;Someheader&quot;, &quot;type&quot;: &quot;string&quot; }, &quot;name&quot;: &quot;someheader&quot;, &quot;in&quot;: &quot;header&quot; } ]"><pre class="notranslate"><span class="pl-ent">"parameters"</span>: [ { <span class="pl-ent">"required"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"schema"</span>: { <span class="pl-ent">"title"</span>: <span class="pl-s"><span class="pl-pds">"</span>Someheader<span class="pl-pds">"</span></span>, <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>string<span class="pl-pds">"</span></span> }, <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>someheader<span class="pl-pds">"</span></span>, <span class="pl-ent">"in"</span>: <span class="pl-s"><span class="pl-pds">"</span>header<span class="pl-pds">"</span></span> }, { <span class="pl-ent">"required"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"schema"</span>: { <span class="pl-ent">"title"</span>: <span class="pl-s"><span class="pl-pds">"</span>Someheader<span class="pl-pds">"</span></span>, <span class="pl-ent">"type"</span>: <span class="pl-s"><span class="pl-pds">"</span>string<span class="pl-pds">"</span></span> }, <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>someheader<span class="pl-pds">"</span></span>, <span class="pl-ent">"in"</span>: <span class="pl-s"><span class="pl-pds">"</span>header<span class="pl-pds">"</span></span> } ]</pre></div> <p dir="auto"><strong>Expected behavior</strong><br> A single header requirement shown in the OpenApi definition.</p> <p dir="auto"><strong>Environment:</strong></p> <ul dir="auto"> <li>OS: Linux</li> <li>FastAPI Version: 0.33.0</li> <li>Python Version: 3.7.3</li> </ul>
0
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ cat test.rs enum A { B = A::B as isize } fn main() { println!(&quot;{}&quot;, A::B as isize); } $ rustc test.rs thread 'rustc' has overflowed its stack Illegal instruction (core dumped) $ rustc --version --verbose rustc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02) binary: rustc commit-hash: 9854143cba679834bc4ef932858cd5303f015a0e commit-date: 2015-04-02 build-date: 2015-04-02 host: x86_64-unknown-linux-gnu release: 1.0.0-beta"><pre class="notranslate">$ <span class="pl-s1">cat test.rs</span> <span class="pl-c1">enum A { B = A::B as isize }</span> <span class="pl-c1">fn main() {</span> <span class="pl-c1"> println!("{}", A::B as isize);</span> <span class="pl-c1">}</span> $ <span class="pl-s1">rustc test.rs</span> <span class="pl-c1">thread 'rustc' has overflowed its stack</span> <span class="pl-c1">Illegal instruction (core dumped)</span> $ <span class="pl-s1">rustc --version --verbose</span> <span class="pl-c1">rustc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02)</span> <span class="pl-c1">binary: rustc</span> <span class="pl-c1">commit-hash: 9854143cba679834bc4ef932858cd5303f015a0e</span> <span class="pl-c1">commit-date: 2015-04-02</span> <span class="pl-c1">build-date: 2015-04-02</span> <span class="pl-c1">host: x86_64-unknown-linux-gnu</span> <span class="pl-c1">release: 1.0.0-beta</span></pre></div>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="enum X { A = X::A as isize } fn main() {}"><pre class="notranslate"><span class="pl-k">enum</span> <span class="pl-smi">X</span> <span class="pl-kos">{</span> <span class="pl-v">A</span> = <span class="pl-smi">X</span><span class="pl-kos">::</span><span class="pl-v">A</span> <span class="pl-k">as</span> <span class="pl-smi">isize</span> <span class="pl-kos">}</span> <span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'rustc' has overflowed its stack Illegal instruction (core dumped)"><pre class="notranslate"><code class="notranslate">thread 'rustc' has overflowed its stack Illegal instruction (core dumped) </code></pre></div>
1
<p dir="auto"><strong>I'm submitting a ...</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report [X] feature request [ ] support request"><pre class="notranslate"><code class="notranslate">[ ] bug report [X] feature request [ ] support request </code></pre></div> <p dir="auto"><strong>Current behavior</strong><br> Routes do have only a path and are accessed by this path e.g. <code class="notranslate">&lt;a routerLink="/crisis-center"&gt;Crysis center&lt;/a&gt;</code></p> <p dir="auto"><strong>Expected behavior</strong><br> Routes should have a fixed synonym which they can be accessed by.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> If we want to change a path we have to search all across our app and change it everywhere. This is not just unhandy, it leads into errors if we forget to change it somewhere. In the real world maybe a stakeholder decides to change a path multiple times in the development.</p> <p dir="auto"><strong>How other frameworks do it:</strong><br> I want to show how its done in the PHP framework Symfony. The configuration is in YAML:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="blog_show: path: /blog/{slug} defaults: { _controller: AppBundle:Blog:show }"><pre class="notranslate"><code class="notranslate">blog_show: path: /blog/{slug} defaults: { _controller: AppBundle:Blog:show } </code></pre></div> <p dir="auto">Now we have a fixed name <code class="notranslate">blog_list</code> which will probably not change. But we can change the path as we want to and the app still keeps working.</p> <p dir="auto">To use the link we can generate it with a function:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$url = $this-&gt;generateUrl( 'blog_list', array('slug' =&gt; 'my-blog-post') );"><pre class="notranslate"><code class="notranslate">$url = $this-&gt;generateUrl( 'blog_list', array('slug' =&gt; 'my-blog-post') ); </code></pre></div>
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">On compiling Angular CLI App with "strict": true, flag in tsconfig.json and using ts 2.3. ng server fails with below error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in node_modules/@angular/forms/src/model.d.ts (544,19): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (571,9): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (571,19): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (607,25): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (607,35): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (711,29): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (711,39): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (735,31): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (735,41): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (770,25): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (770,35): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature."><pre class="notranslate"><code class="notranslate">ERROR in node_modules/@angular/forms/src/model.d.ts (544,19): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (571,9): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (571,19): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (607,25): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (607,35): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (711,29): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (711,39): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (735,31): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (735,41): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (770,25): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature. ERROR in node_modules/@angular/forms/src/model.d.ts (770,35): Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature. </code></pre></div> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">Build should be successful</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p> <ul dir="auto"> <li>Install latest angular CLI</li> <li>Update to latest Typescript</li> <li><code class="notranslate">"strict": true</code>, flag in tsconfig.json</li> <li>Build using : <code class="notranslate">ng serve</code></li> </ul> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <ul dir="auto"> <li>To be able to enable strict checking with latest Typescript</li> </ul> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li><strong>Angular version:</strong> 4.1</li> </ul> <ul dir="auto"> <li><strong>Browser:</strong> all</li> </ul> <ul dir="auto"> <li> <p dir="auto"><strong>Language:</strong> TypeScript 2.3</p> </li> <li> <p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> = 7.8</p> </li> </ul>
0
<ul dir="auto"> <li>VSCode Version: 1.0.0</li> <li>OS Version: OS X El Capitan 10.11.4</li> </ul> <p dir="auto">No syntax highlighting for C#. Also unable to select C# from the languages menu.</p> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>Open a .cs file in Visual Studio Code</li> </ol> <p dir="auto">Expected:</p> <ul dir="auto"> <li>Syntax highlighting for C# supported.</li> </ul> <p dir="auto">Actual:</p> <ul dir="auto"> <li>File is recognised as Plain Text</li> </ul> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/13098888/14587000/137ff43c-04aa-11e6-9cd3-cb8348dac83f.png"><img width="770" alt="screen shot 2016-04-17 at 14 37 53" src="https://cloud.githubusercontent.com/assets/13098888/14587000/137ff43c-04aa-11e6-9cd3-cb8348dac83f.png" style="max-width: 100%;"></a></p> <p dir="auto">Try to set language to C#</p> <ol dir="auto"> <li>Click on "Plain Text" on the bottom right</li> <li>"Select Language Mode" dialog opens</li> </ol> <p dir="auto">Expected:</p> <ul dir="auto"> <li>Entry listing C#</li> </ul> <p dir="auto">Actual:</p> <ul dir="auto"> <li>C# language is missing from the list.</li> </ul> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/13098888/14587001/13a334ec-04aa-11e6-84d7-1eabd205deef.png"><img width="636" alt="screen shot 2016-04-17 at 14 38 10" src="https://cloud.githubusercontent.com/assets/13098888/14587001/13a334ec-04aa-11e6-84d7-1eabd205deef.png" style="max-width: 100%;"></a></p>
<ul dir="auto"> <li>VSCode Version: 1.0.0</li> <li>OS Version: Ubuntu Mate 15.10</li> </ul> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>Install VS Code Stable 1.0</li> <li>Open a folder created by: yo aspnet --grunt</li> <li>Open a .cs file eg Controllers/HomeController.cs<br> The text loads white (no syntax highlighting)<br> In the status bar at the bottom of the window is says "Plain text" which I'm assuming is the file type. When I click on this to change file type, the list does not include C#- but it does include many others eg C, C++, F#, CSS, etc.</li> </ol>
1
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong><br> I created <code class="notranslate">childCompiler</code> at <code class="notranslate">parentCompiler.hook.make</code> stage and I called <code class="notranslate">runAsChild</code> at <code class="notranslate">parentCompiler.hook.emit</code> stage. <code class="notranslate">childCompilation.assets</code> are nothing. I do not see any compilation.</p> <p dir="auto">Parent compilation is based on <code class="notranslate">web.webpack.config.js</code> whose target is <code class="notranslate">web</code>. Child compilation is based on another <code class="notranslate">webworker.webpack.config.js</code> whose target is <code class="notranslate">webworker</code>.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <p dir="auto">web.webpack.config.js</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;plugins&quot;: [ new WorkboxPlugin(require(&quot;./webworker.webpack.config.js&quot;)(env, argv)) ], &quot;target&quot;: &quot;web&quot; ]"><pre class="notranslate"><span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span> <span class="pl-k">new</span> <span class="pl-v">WorkboxPlugin</span><span class="pl-kos">(</span><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"./webworker.webpack.config.js"</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-s1">env</span><span class="pl-kos">,</span> <span class="pl-s1">argv</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s">"target"</span>: <span class="pl-s">"web"</span> <span class="pl-kos">]</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const {DefinePlugin, WebpackOptionsApply, WebpackOptionsDefaulter} = require(&quot;webpack&quot;); const NAME = &quot;webworker-injection&quot;; module.exports = class WorkboxPlugin { constructor(options) { this.options = new WebpackOptionsDefaulter().process(options); } apply(compiler) { const self = this; let childCompiler = null; debugHooks(compiler, NAME); compiler.hooks.emit.tapAsync(NAME, (compilation, callback) =&gt; { const stats = compilation.getStats().toJson(); new DefinePlugin({ &quot;__PRECACHE_MANIFEST__&quot;: JSON.stringify({}), }).apply(childCompiler); childCompiler.runAsChild((err, entries, childCompilation) =&gt; { console.log(childCompilation.getStats().toJson()); &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; this has nothing callback(err); }) }); compiler.hooks.make.tapAsync(NAME, (compilation, callback) =&gt; { childCompiler = compilation.createChildCompiler(&quot;child&quot;, self.options.output); childCompiler.options = new WebpackOptionsApply().process(self.options, childCompiler); childCompiler.context = compiler.context; debugHooks(childCompiler, &quot;child&quot;); callback(); }); } } const debugHooks = (target, from) =&gt; { for (let hook in target.hooks) { if (target.hooks[hook].constructor.name.startsWith(&quot;Async&quot;)) { target.hooks[hook].tapAsync(from, (...args) =&gt; { console.log(`${hook}.${from}`); args[args.length - 1](); }); } else { target.hooks[hook].tap(from, () =&gt; { console.log(`${hook}.${from}`); }); } } }"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span>DefinePlugin<span class="pl-kos">,</span> WebpackOptionsApply<span class="pl-kos">,</span> WebpackOptionsDefaulter<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"webpack"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-c1">NAME</span> <span class="pl-c1">=</span> <span class="pl-s">"webworker-injection"</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-k">class</span> <span class="pl-v">WorkboxPlugin</span> <span class="pl-kos">{</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">options</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">options</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">WebpackOptionsDefaulter</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">process</span><span class="pl-kos">(</span><span class="pl-s1">options</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">compiler</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">self</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">;</span> <span class="pl-k">let</span> <span class="pl-s1">childCompiler</span> <span class="pl-c1">=</span> <span class="pl-c1">null</span><span class="pl-kos">;</span> <span class="pl-en">debugHooks</span><span class="pl-kos">(</span><span class="pl-s1">compiler</span><span class="pl-kos">,</span> <span class="pl-c1">NAME</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">compiler</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">.</span><span class="pl-c1">emit</span><span class="pl-kos">.</span><span class="pl-en">tapAsync</span><span class="pl-kos">(</span><span class="pl-c1">NAME</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">compilation</span><span class="pl-kos">,</span> <span class="pl-s1">callback</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">stats</span> <span class="pl-c1">=</span> <span class="pl-s1">compilation</span><span class="pl-kos">.</span><span class="pl-en">getStats</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toJson</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">new</span> <span class="pl-v">DefinePlugin</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-s">"__PRECACHE_MANIFEST__"</span>: <span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</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-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">childCompiler</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">childCompiler</span><span class="pl-kos">.</span><span class="pl-en">runAsChild</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">,</span> <span class="pl-s1">entries</span><span class="pl-kos">,</span> <span class="pl-s1">childCompilation</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">childCompilation</span><span class="pl-kos">.</span><span class="pl-en">getStats</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toJson</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">&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;</span> <span class="pl-s1">this</span> <span class="pl-c1">has</span> <span class="pl-c1">nothing</span> <span class="pl-c1">callback</span><span class="pl-kos">(</span><span class="pl-s1">err</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-s1">compiler</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">.</span><span class="pl-c1">make</span><span class="pl-kos">.</span><span class="pl-en">tapAsync</span><span class="pl-kos">(</span><span class="pl-c1">NAME</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">compilation</span><span class="pl-kos">,</span> <span class="pl-s1">callback</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">childCompiler</span> <span class="pl-c1">=</span> <span class="pl-s1">compilation</span><span class="pl-kos">.</span><span class="pl-en">createChildCompiler</span><span class="pl-kos">(</span><span class="pl-s">"child"</span><span class="pl-kos">,</span> <span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-c1">options</span><span class="pl-kos">.</span><span class="pl-c1">output</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">childCompiler</span><span class="pl-kos">.</span><span class="pl-c1">options</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">WebpackOptionsApply</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">process</span><span class="pl-kos">(</span><span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-c1">options</span><span class="pl-kos">,</span> <span class="pl-s1">childCompiler</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">childCompiler</span><span class="pl-kos">.</span><span class="pl-c1">context</span> <span class="pl-c1">=</span> <span class="pl-s1">compiler</span><span class="pl-kos">.</span><span class="pl-c1">context</span><span class="pl-kos">;</span> <span class="pl-en">debugHooks</span><span class="pl-kos">(</span><span class="pl-s1">childCompiler</span><span class="pl-kos">,</span> <span class="pl-s">"child"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">callback</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">const</span> <span class="pl-en">debugHooks</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">,</span> <span class="pl-s1">from</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">hook</span> <span class="pl-k">in</span> <span class="pl-s1">target</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">[</span><span class="pl-s1">hook</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">constructor</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">.</span><span class="pl-en">startsWith</span><span class="pl-kos">(</span><span class="pl-s">"Async"</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">target</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">[</span><span class="pl-s1">hook</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">tapAsync</span><span class="pl-kos">(</span><span class="pl-s1">from</span><span class="pl-kos">,</span> <span class="pl-kos">(</span>...<span class="pl-s1">args</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">hook</span><span class="pl-kos">}</span></span>.<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">from</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">args</span><span class="pl-kos">[</span><span class="pl-s1">args</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">-</span> <span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-s1">target</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">[</span><span class="pl-s1">hook</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">tap</span><span class="pl-kos">(</span><span class="pl-s1">from</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">hook</span><span class="pl-kos">}</span></span>.<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">from</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><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"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5212215/59151491-f8236d00-89e8-11e9-9086-b9f26db20816.png"><img src="https://user-images.githubusercontent.com/5212215/59151491-f8236d00-89e8-11e9-9086-b9f26db20816.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="childCompiler.runAsChild((err, entries, childCompilation) =&gt; { console.log(childCompilation.getStats().toJson()); &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; this should have something callback(err); });"><pre class="notranslate"><span class="pl-s1">childCompiler</span><span class="pl-kos">.</span><span class="pl-en">runAsChild</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">,</span> <span class="pl-s1">entries</span><span class="pl-kos">,</span> <span class="pl-s1">childCompilation</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">childCompilation</span><span class="pl-kos">.</span><span class="pl-en">getStats</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toJson</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">&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;</span> <span class="pl-s1">this</span> <span class="pl-c1">should</span> <span class="pl-c1">have</span> <span class="pl-c1">something</span> <span class="pl-c1">callback</span><span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 4.30<br> Node.js version: 12.3.1<br> Operating System: macOS 10.14.5<br> Additional tools:</p>
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong><br> I can see a new feature called dependOn is added to webpack which fits in rightly for my requirement. As I moved my webpack version from 4.43.0 to 5.0.0-beta.16, for some reasons the transformation of arrow function in bundle.js is not happening.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br> Let me share my configurations.</p> <p dir="auto"><strong>Package.json</strong></p> <p dir="auto">`</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;name&quot;: &quot;root&quot;, &quot;private&quot;: true, &quot;workspaces&quot;: [ &quot;compositions/*&quot; ], &quot;dependencies&quot;: { &quot;classnames&quot;: &quot;^2.2.6&quot;, &quot;core-js&quot;: &quot;3&quot;, &quot;react&quot;: &quot;^16.10.2&quot;, &quot;react-dom&quot;: &quot;^16.10.2&quot; }, &quot;devDependencies&quot;: { &quot;@babel/cli&quot;: &quot;^7.8.4&quot;, &quot;@babel/core&quot;: &quot;^7.9.6&quot;, &quot;@babel/plugin-proposal-class-properties&quot;: &quot;^7.8.3&quot;, &quot;@babel/plugin-transform-runtime&quot;: &quot;^7.9.6&quot;, &quot;@babel/polyfill&quot;: &quot;^7.8.7&quot;, &quot;@babel/preset-env&quot;: &quot;^7.9.6&quot;, &quot;@babel/preset-react&quot;: &quot;^7.9.4&quot;, &quot;@emcm-ui/stylelint-config&quot;: &quot;^1.2.2&quot;, &quot;@storybook/react&quot;: &quot;^5.3.18&quot;, &quot;babel-core&quot;: &quot;7.0.0-bridge.0&quot;, &quot;babel-loader&quot;: &quot;^8.1.0&quot;, &quot;babel-plugin-styled-components&quot;: &quot;^1.10.7&quot;, &quot;babel-polyfill&quot;: &quot;^6.26.0&quot;, &quot;compression-webpack-plugin&quot;: &quot;^3.1.0&quot;, &quot;css-loader&quot;: &quot;^3.5.3&quot;, &quot;duplicate-package-checker-webpack-plugin&quot;: &quot;^3.0.0&quot;, &quot;es6-promise&quot;: &quot;^4.2.8&quot;, &quot;eslint&quot;: &quot;^6.8.0&quot;, &quot;fs-extra&quot;: &quot;^9.0.0&quot;, &quot;isomorphic-fetch&quot;: &quot;^2.2.1&quot;, &quot;lerna&quot;: &quot;^3.20.2&quot;, &quot;mini-css-extract-plugin&quot;: &quot;^0.9.0&quot;, &quot;module&quot;: &quot;^1.2.5&quot;, &quot;npm-run-all&quot;: &quot;^4.1.5&quot;, &quot;postcss&quot;: &quot;^7.0.27&quot;, &quot;postcss-calc&quot;: &quot;^7.0.2&quot;, &quot;postcss-css-variables&quot;: &quot;^0.17.0&quot;, &quot;prettier&quot;: &quot;^1.19.1&quot;, &quot;reduce-css-calc&quot;: &quot;^2.1.7&quot;, &quot;regenerator-runtime&quot;: &quot;^0.13.5&quot;, &quot;style-loader&quot;: &quot;^1.2.1&quot;, &quot;uglifyjs-webpack-plugin&quot;: &quot;^2.2.0&quot;, &quot;webpack&quot;: &quot;5.0.0-beta.16&quot;, &quot;webpack-bundle-analyzer&quot;: &quot;^3.6.0&quot;, &quot;webpack-cli&quot;: &quot;^3.3.11&quot; }, &quot;scripts&quot;: { &quot;build&quot;: &quot;yarn format &amp;&amp; webpack --mode production&quot;, &quot;start&quot;: &quot;start-storybook -p 5555&quot;, &quot;npmScript&quot;: &quot;webpack --mode production&quot;, &quot;postcss&quot;: &quot;node scripts/buildVars.js&quot;, &quot;cleanup&quot;: &quot;./cleanup.sh&quot;, &quot;format&quot;: &quot;yarn internal:prettier \&quot;./*.{js,jsx,json,md}\&quot; \&quot;./**/*.{js,jsx,json,md}\&quot; --write&quot;, &quot;internal:lint:js&quot;: &quot;eslint --ext .js,.jsx --ignore-path .eslintignore&quot;, &quot;internal:prettier&quot;: &quot;prettier&quot;, &quot;lint&quot;: &quot;npm-run-all lint:*&quot;, &quot;lint:format&quot;: &quot;yarn internal:prettier --list-different \&quot;./*.{js,jsx,json,md}\&quot; \&quot;./**/*.{js,jsx,json,md}\&quot;&quot;, &quot;lint:js&quot;: &quot;yarn internal:lint:js .&quot;, &quot;lint:js:fix&quot;: &quot;yarn internal:lint:js . --fix&quot; } } "><pre class="notranslate"><code class="notranslate">{ "name": "root", "private": true, "workspaces": [ "compositions/*" ], "dependencies": { "classnames": "^2.2.6", "core-js": "3", "react": "^16.10.2", "react-dom": "^16.10.2" }, "devDependencies": { "@babel/cli": "^7.8.4", "@babel/core": "^7.9.6", "@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-transform-runtime": "^7.9.6", "@babel/polyfill": "^7.8.7", "@babel/preset-env": "^7.9.6", "@babel/preset-react": "^7.9.4", "@emcm-ui/stylelint-config": "^1.2.2", "@storybook/react": "^5.3.18", "babel-core": "7.0.0-bridge.0", "babel-loader": "^8.1.0", "babel-plugin-styled-components": "^1.10.7", "babel-polyfill": "^6.26.0", "compression-webpack-plugin": "^3.1.0", "css-loader": "^3.5.3", "duplicate-package-checker-webpack-plugin": "^3.0.0", "es6-promise": "^4.2.8", "eslint": "^6.8.0", "fs-extra": "^9.0.0", "isomorphic-fetch": "^2.2.1", "lerna": "^3.20.2", "mini-css-extract-plugin": "^0.9.0", "module": "^1.2.5", "npm-run-all": "^4.1.5", "postcss": "^7.0.27", "postcss-calc": "^7.0.2", "postcss-css-variables": "^0.17.0", "prettier": "^1.19.1", "reduce-css-calc": "^2.1.7", "regenerator-runtime": "^0.13.5", "style-loader": "^1.2.1", "uglifyjs-webpack-plugin": "^2.2.0", "webpack": "5.0.0-beta.16", "webpack-bundle-analyzer": "^3.6.0", "webpack-cli": "^3.3.11" }, "scripts": { "build": "yarn format &amp;&amp; webpack --mode production", "start": "start-storybook -p 5555", "npmScript": "webpack --mode production", "postcss": "node scripts/buildVars.js", "cleanup": "./cleanup.sh", "format": "yarn internal:prettier \"./*.{js,jsx,json,md}\" \"./**/*.{js,jsx,json,md}\" --write", "internal:lint:js": "eslint --ext .js,.jsx --ignore-path .eslintignore", "internal:prettier": "prettier", "lint": "npm-run-all lint:*", "lint:format": "yarn internal:prettier --list-different \"./*.{js,jsx,json,md}\" \"./**/*.{js,jsx,json,md}\"", "lint:js": "yarn internal:lint:js .", "lint:js:fix": "yarn internal:lint:js . --fix" } } </code></pre></div> <p dir="auto">`</p> <p dir="auto"><strong>webpack.config.js</strong></p> <p dir="auto">`</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const path = require(&quot;path&quot;); const BundleAnalyzerPlugin = require(&quot;webpack-bundle-analyzer&quot;) .BundleAnalyzerPlugin; const DuplicatePackageCheckerPlugin = require(&quot;duplicate-package-checker-webpack-plugin&quot;); const webpack = require(&quot;webpack&quot;); const getPackages = require(&quot;./scripts/getPackages&quot;); const localPackage = require(&quot;./package.json&quot;); const MiniCssExtractPlugin = require(&quot;mini-css-extract-plugin&quot;); const UglifyJsPlugin = require(&quot;uglifyjs-webpack-plugin&quot;); module.exports = { entry: { icons: path.resolve(__dirname, &quot;node_modules&quot;, &quot;@emcm-ui/icons&quot;) }, output: { filename: &quot;[name].js&quot; }, devServer: { inline: true, port: 3002 }, module: { rules: [ { test: /\.(js|jsx)$/, exclude: /(node_modules|bower_components)/, use: { loader: &quot;babel-loader&quot;, options: { presets: [ [ &quot;@babel/preset-env&quot;, { useBuiltIns: &quot;entry&quot;, corejs: { version: 3, proposals: true } } ], &quot;@babel/preset-react&quot; ], plugins: [ &quot;@babel/plugin-proposal-class-properties&quot;, &quot;@babel/plugin-transform-arrow-functions&quot;, &quot;@babel/plugin-transform-runtime&quot; ] } } }, { test: /\.css$/, use: [ // This is executed in reverse order #important MiniCssExtractPlugin.loader, // &quot;style-loader&quot;, &quot;css-loader&quot; // this is used to understand the import statement in js for css ] } ] }, plugins: [ new BundleAnalyzerPlugin({ analyzerMode: &quot;static&quot;, generateStatsFile: true, openAnalyzer: false, statsOptions: { source: false } }), new MiniCssExtractPlugin({ // Options similar to the same options in webpackOptions.output // both options are optional filename: &quot;[name].css&quot; }), new DuplicatePackageCheckerPlugin() ] }; ` **polyfill.js** ` import &quot;regenerator-runtime/runtime&quot;; import &quot;core-js/es&quot;; import &quot;isomorphic-fetch&quot;; import es6Promise from &quot;es6-promise&quot;; es6Promise.polyfill();"><pre class="notranslate"><code class="notranslate">const path = require("path"); const BundleAnalyzerPlugin = require("webpack-bundle-analyzer") .BundleAnalyzerPlugin; const DuplicatePackageCheckerPlugin = require("duplicate-package-checker-webpack-plugin"); const webpack = require("webpack"); const getPackages = require("./scripts/getPackages"); const localPackage = require("./package.json"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); module.exports = { entry: { icons: path.resolve(__dirname, "node_modules", "@emcm-ui/icons") }, output: { filename: "[name].js" }, devServer: { inline: true, port: 3002 }, module: { rules: [ { test: /\.(js|jsx)$/, exclude: /(node_modules|bower_components)/, use: { loader: "babel-loader", options: { presets: [ [ "@babel/preset-env", { useBuiltIns: "entry", corejs: { version: 3, proposals: true } } ], "@babel/preset-react" ], plugins: [ "@babel/plugin-proposal-class-properties", "@babel/plugin-transform-arrow-functions", "@babel/plugin-transform-runtime" ] } } }, { test: /\.css$/, use: [ // This is executed in reverse order #important MiniCssExtractPlugin.loader, // "style-loader", "css-loader" // this is used to understand the import statement in js for css ] } ] }, plugins: [ new BundleAnalyzerPlugin({ analyzerMode: "static", generateStatsFile: true, openAnalyzer: false, statsOptions: { source: false } }), new MiniCssExtractPlugin({ // Options similar to the same options in webpackOptions.output // both options are optional filename: "[name].css" }), new DuplicatePackageCheckerPlugin() ] }; ` **polyfill.js** ` import "regenerator-runtime/runtime"; import "core-js/es"; import "isomorphic-fetch"; import es6Promise from "es6-promise"; es6Promise.polyfill(); </code></pre></div> <p dir="auto">`</p> <p dir="auto"><strong>What is the expected behavior?</strong><br> I should see my bundle.js transformed into without arrow function in them as most of the browsers cannot read them. The same works when I downgrade my webpack version to 4.43.0</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 5.0.0-beta.16<br> Node.js version: v12.16.2<br> Operating System: Windows 32<br> Additional tools: VSCode</p> <p dir="auto">Any help would be appreciated</p>
0
<p dir="auto">When viewing a navbar menu on my iPhone, the whole navbar menu is presented as a long list (by clicking on the icon in the top right) - which is expected as there isn't enough room to show it conventionally.</p> <p dir="auto">If the menu contains dropdown items, these expand when they are clicked on, and fold out as expected.</p> <p dir="auto">However, when clicking on the menu item within the dropdown, the dropdown collapses again, meaning the item isn't selectable.</p> <p dir="auto">Everything works fine in a desktop browser, but not on my iPhone or Android devices.</p> <p dir="auto">Is this a known issue? I can't imagine it isn't!</p> <p dir="auto">You can see the functionality I'm talking about on my website:<br> <a href="http://www.bigemrg.co.uk/ig-photography/home/home.html" rel="nofollow">http://www.bigemrg.co.uk/ig-photography/home/home.html</a></p>
<p dir="auto">I have simple dropdown buttons we built with 2.04</p> <p dir="auto">links are A tags, proper quotes, href='#'</p> <p dir="auto">Used to work fine.</p> <p dir="auto">Upgraded today to 2.1 and the links in any dropdown button don't work. The dropdown menu opens, but clicking on a link closes the menu without any action. tested on Android 2.3 and iOS 5</p> <p dir="auto">Rolledback to 2.04 and everything works again. Anyone else has this issue?</p>
1
<p dir="auto">I'm on a Mac OSX. It's "easier" to scroll (using the two-finger scroll on my mac) when I put my mouse on the off-white space between the text editor and the description, rather than being able to scroll easily in the text editor alone.</p> <p dir="auto">I've noticed that in beta there are scroll bars (perhaps to help with this issue) but it replaces it with a new problem. Once you hit the bottom (or top) of the editor, the scrolling doesn't stop and the editor moves out of view. Or another way to put it is that the scrolling continues to scroll the whole page instead of stopping, and that makes you have to scroll the whole page now to get the editor back in view. The sam over-scrolling issue results from scrolling the instructions area. Also, I still find scrolling the editor to be stubborn (needing to "overscroll" to get movement).</p> <p dir="auto">Related to this...in order to avoid the scrolling annoyance, I tried just using the cursor + arrow keys on the keyboard in the text area. if you scroll down that way, the bottom of the text editor area doesn't even show up and then you have to use the scroll method to finish it anyway...which brings up the same problems as stated above.</p> <p dir="auto">Sorry if this is a duplicate. I couldn't find it.</p>
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/zipline-build-a-simon-game" rel="nofollow">http://freecodecamp.com/challenges/zipline-build-a-simon-game</a> has an issue. It contains the video of Tic-Tac-Toe, and it shows that it's completed, although I didn't.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/8385781/9330472/4bcc45c2-45c2-11e5-9735-9e8f13c5ca1e.jpg"><img src="https://cloud.githubusercontent.com/assets/8385781/9330472/4bcc45c2-45c2-11e5-9735-9e8f13c5ca1e.jpg" alt="1st" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/8385781/9330473/4bce515a-45c2-11e5-92a2-f0f40db99a76.jpg"><img src="https://cloud.githubusercontent.com/assets/8385781/9330473/4bce515a-45c2-11e5-92a2-f0f40db99a76.jpg" alt="2nd" style="max-width: 100%;"></a></p>
0
<p dir="auto"><strong>I've deactivated the soft tab option in the preferences.</strong><br> Using tabulators does not align the text correctly. Looks like the offset is not correct.</p> <p dir="auto"><strong>I tried this example text:</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="asdasd asd asdas asd"><pre class="notranslate"><code class="notranslate">asdasd asd asdas asd </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/fdb18f472dd88c95f5225f569644c5cc7b197b68e0572671ab74758c2f5b5cbf/687474703a2f2f636c2e6c792f696d6167652f30663077314132413156306f2f61746f6d2532307461622532306f666673657425323070726f626c656d2e706e67"><img src="https://camo.githubusercontent.com/fdb18f472dd88c95f5225f569644c5cc7b197b68e0572671ab74758c2f5b5cbf/687474703a2f2f636c2e6c792f696d6167652f30663077314132413156306f2f61746f6d2532307461622532306f666673657425323070726f626c656d2e706e67" alt="" data-canonical-src="http://cl.ly/image/0f0w1A2A1V0o/atom%20tab%20offset%20problem.png" style="max-width: 100%;"></a></p> <p dir="auto">If someone could give me a hint, where in the code I could look for this Issue - I could try to fix it.</p>
<p dir="auto">Halp tickets and forum discussions:</p> <ul dir="auto"> <li>support/e81a1594b92311e38c14f6435a91cb51</li> <li>support/4a790a5cb67b11e38a43313fda33ea39</li> <li>support/7bb3319eb34011e39a2834190894c452</li> <li>support/7cc4f4b0b3f811e38f004d617216e1a5</li> <li><a href="http://discuss.atom.io/t/auto-aligned-indenting/3553" rel="nofollow">http://discuss.atom.io/t/auto-aligned-indenting/3553</a></li> <li><a href="http://discuss.atom.io/t/tabulators-are-not-aligned-correctly/6182" rel="nofollow">http://discuss.atom.io/t/tabulators-are-not-aligned-correctly/6182</a></li> <li><a href="http://discuss.atom.io/t/soft-tabs-should-follow-tab-stops/5154" rel="nofollow">http://discuss.atom.io/t/soft-tabs-should-follow-tab-stops/5154</a></li> </ul> <blockquote> <p dir="auto">I'm having an issue that is probably related in that hard tabs are not shown properly. They are all just rendered as the number of space characters I have set instead of just being as wide as the length to the next tab stop.</p> <p dir="auto">So when I'm using hard tabs and set tabs to be 8 characters wide I get this: <a href="http://puu.sh/7zWi1.png13" rel="nofollow">http://puu.sh/7zWi1.png13</a> While I would expect it to look more like this: <a href="http://puu.sh/7zWil.png9" rel="nofollow">http://puu.sh/7zWil.png9</a></p> </blockquote> <p dir="auto">Actual:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/fbafcce8345e6e36e6b471b5e23ec40ebf7e2aea0b9c35981260ce465d4fa3e2/687474703a2f2f7075752e73682f377a5769312e706e67"><img src="https://camo.githubusercontent.com/fbafcce8345e6e36e6b471b5e23ec40ebf7e2aea0b9c35981260ce465d4fa3e2/687474703a2f2f7075752e73682f377a5769312e706e67" alt="" data-canonical-src="http://puu.sh/7zWi1.png" style="max-width: 100%;"></a></p> <p dir="auto">Expected:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/5f7b7ec7351bcfa7783d29a52abe20de0750cf3140e0827f9baba9d89c58c69f/687474703a2f2f7075752e73682f377a57696c2e706e67"><img src="https://camo.githubusercontent.com/5f7b7ec7351bcfa7783d29a52abe20de0750cf3140e0827f9baba9d89c58c69f/687474703a2f2f7075752e73682f377a57696c2e706e67" alt="" data-canonical-src="http://puu.sh/7zWil.png" style="max-width: 100%;"></a></p>
1
<h3 dir="auto">Bug summary</h3> <p dir="auto">Not sure if this is a Matplotlib bug or not. I am aware that this method is deprecated, but it is currently used in IPython and I assume that it shouldn't restart the terminal.</p> <p dir="auto">Executing the code in Spyder 5.2.1 with Python 3.9.7, IPython 7.30.1 and Matplotlib 3.5.1 a restart happens on my Windows 10 laptop. Same thing if executed in a standard python prompt (although only the deprecation warnings are shown).</p> <p dir="auto">On a Linux machine with Python 3.9.7 and IPython 7.29.0 it works (as in not crashing).</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="from io import BytesIO from matplotlib import mathtext mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$')"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">io</span> <span class="pl-k">import</span> <span class="pl-v">BytesIO</span> <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">mathtext</span> <span class="pl-s1">mathtext</span>.<span class="pl-v">MathTextParser</span>(<span class="pl-s">'bitmap'</span>).<span class="pl-en">to_png</span>(<span class="pl-v">BytesIO</span>(), <span class="pl-s">'$x$'</span>)</pre></div> <h3 dir="auto">Actual outcome</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:15:42) [MSC v.1916 64 bit (AMD64)] Type &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. IPython 7.30.1 -- An enhanced Interactive Python. from io import BytesIO from matplotlib import mathtext mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$' ) C:\Users\Oscar\AppData\Local\Temp/ipykernel_19884/2432144463.py:1: MatplotlibDeprecationWarning: The to_png function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use mathtext.math_to_image instead. mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$') C:\Users\Oscar\AppData\Local\Temp/ipykernel_19884/2432144463.py:1: MatplotlibDeprecationWarning: The to_rgba function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use mathtext.math_to_image instead. mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$') C:\Users\Oscar\AppData\Local\Temp/ipykernel_19884/2432144463.py:1: MatplotlibDeprecationWarning: The to_mask function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use mathtext.math_to_image instead. mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$') C:\Users\Oscar\AppData\Local\Temp/ipykernel_19884/2432144463.py:1: MatplotlibDeprecationWarning: The MathtextBackendBitmap class was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use mathtext.math_to_image instead. mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$') Windows fatal exception: access violation Main thread: Current thread 0x00005478 (most recent call first): File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py&quot;, line 271 in _get_info File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py&quot;, line 150 in get_metrics File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py&quot;, line 1162 in _update_metrics File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py&quot;, line 1156 in __init__ File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py&quot;, line 2356 in symbol File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 283 in wrapper File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 844 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4074 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4335 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 5186 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4919 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 3828 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4074 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4335 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4335 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 5186 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4074 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4335 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 5186 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4074 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4335 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 5186 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4750 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4335 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 5186 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 1117 in parse_string File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py&quot;, line 2300 in math_string File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 283 in wrapper File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 844 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 3828 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4750 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4851 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 3850 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 4335 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 5186 in parseImpl File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 807 in _parseNoCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 907 in _parseCache File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py&quot;, line 1117 in parse_string File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py&quot;, line 2237 in parse File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\mathtext.py&quot;, line 456 in _parse_cached File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\mathtext.py&quot;, line 435 in parse File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\mathtext.py&quot;, line 483 in to_mask File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_api\deprecation.py&quot;, line 205 in wrapper File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\mathtext.py&quot;, line 509 in to_rgba File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_api\deprecation.py&quot;, line 205 in wrapper File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\mathtext.py&quot;, line 542 in to_png File &quot;C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_api\deprecation.py&quot;, line 205 in wrapper File &quot;C:\Users\Oscar\AppData\Local\Temp/ipykernel_19884/2432144463.py&quot;, line 1 in &lt;module&gt; Restarting kernel... "><pre class="notranslate"><code class="notranslate">Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:15:42) [MSC v.1916 64 bit (AMD64)] Type "copyright", "credits" or "license" for more information. IPython 7.30.1 -- An enhanced Interactive Python. from io import BytesIO from matplotlib import mathtext mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$' ) C:\Users\Oscar\AppData\Local\Temp/ipykernel_19884/2432144463.py:1: MatplotlibDeprecationWarning: The to_png function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use mathtext.math_to_image instead. mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$') C:\Users\Oscar\AppData\Local\Temp/ipykernel_19884/2432144463.py:1: MatplotlibDeprecationWarning: The to_rgba function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use mathtext.math_to_image instead. mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$') C:\Users\Oscar\AppData\Local\Temp/ipykernel_19884/2432144463.py:1: MatplotlibDeprecationWarning: The to_mask function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use mathtext.math_to_image instead. mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$') C:\Users\Oscar\AppData\Local\Temp/ipykernel_19884/2432144463.py:1: MatplotlibDeprecationWarning: The MathtextBackendBitmap class was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use mathtext.math_to_image instead. mathtext.MathTextParser('bitmap').to_png(BytesIO(), '$x$') Windows fatal exception: access violation Main thread: Current thread 0x00005478 (most recent call first): File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py", line 271 in _get_info File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py", line 150 in get_metrics File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py", line 1162 in _update_metrics File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py", line 1156 in __init__ File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py", line 2356 in symbol File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 283 in wrapper File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 844 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4074 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4335 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 5186 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4919 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 3828 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4074 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4335 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4335 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 5186 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4074 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4335 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 5186 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4074 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4335 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 5186 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4750 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4335 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 5186 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 1117 in parse_string File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py", line 2300 in math_string File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 283 in wrapper File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 844 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 3828 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4750 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4851 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 3850 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 4335 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 5186 in parseImpl File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 807 in _parseNoCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 907 in _parseCache File "C:\Users\Oscar\miniconda3\lib\site-packages\pyparsing\core.py", line 1117 in parse_string File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_mathtext.py", line 2237 in parse File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\mathtext.py", line 456 in _parse_cached File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\mathtext.py", line 435 in parse File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\mathtext.py", line 483 in to_mask File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_api\deprecation.py", line 205 in wrapper File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\mathtext.py", line 509 in to_rgba File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_api\deprecation.py", line 205 in wrapper File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\mathtext.py", line 542 in to_png File "C:\Users\Oscar\miniconda3\lib\site-packages\matplotlib\_api\deprecation.py", line 205 in wrapper File "C:\Users\Oscar\AppData\Local\Temp/ipykernel_19884/2432144463.py", line 1 in &lt;module&gt; Restarting kernel... </code></pre></div> <h3 dir="auto">Expected outcome</h3> <p dir="auto">No restart.</p> <h3 dir="auto">Additional information</h3> <p dir="auto">It worked "last time I tried" which was probably a year ago.</p> <h3 dir="auto">Operating system</h3> <p dir="auto">Windows 10</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">3.5.1</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Python version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">conda</p>
<h3 dir="auto">Bug summary</h3> <p dir="auto">After updating <code class="notranslate">matplotlib version 3.5.0</code> through <code class="notranslate">conda update</code>, there seem to be some issues using matplotlib in both Spyder and PyCharm, but they show different phenomena. I try to run a simple script using matplotlib (Please check the code in the <code class="notranslate">Code for reproduction</code>), what I see is described below:</p> <p dir="auto">In Spyder, the phenomena depend on the <code class="notranslate">preferences</code> (settings):<br> If the <code class="notranslate">Inline Backend</code> is used, the script can be run without any issues. But if the <code class="notranslate">plt.show()</code> is commented, I will not see the figure showing (Normally in Spyder, even without the code <code class="notranslate">plt.show()</code>, the figure should be shown.), and after a while, I see <code class="notranslate">Restarting kernel...</code> in the console.<br> If the <code class="notranslate">Automatic Backend</code> is used no matter the code <code class="notranslate">plt.show()</code> is commented or not, after the script is run, I can see the figure window popping up, but no figure is shown and the figure window is disappeared after one second around. After that, the <code class="notranslate">Restarting kernel...</code> is shown in the console.</p> <p dir="auto">In PyCharm:<br> After the script is run, again I can see the figure window popping up but no figure shown in the window. After around one second, the figure window disappears and the exit code is shown as <code class="notranslate">Process finished with exit code -1073741819 (0xC0000005)</code>. If the code <code class="notranslate">plt.show()</code> is commented, the figure is not shown anymore which is normal while using PyCharm, and the exit code is shown as <code class="notranslate">Process finished with exit code 0</code>.</p> <p dir="auto">I consider there can be something wrong or bugs within the newest version of matplotlib, or maybe my setting issues. Could anyone help me with this issue?</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 numpy as np import matplotlib.pyplot as plt x=np.arange(0,10) y=np.arange(0,10) plt.plot(x, y) plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>,<span class="pl-c1">10</span>) <span class="pl-s1">y</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>,<span class="pl-c1">10</span>) <span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>) <span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div> <h3 dir="auto">Actual outcome</h3> <p dir="auto">Spyder:<br> <code class="notranslate">Restarting kernel...</code></p> <p dir="auto">PyCharm:<br> <code class="notranslate">Process finished with exit code -1073741819 (0xC0000005)</code></p> <h3 dir="auto">Expected outcome</h3> <p dir="auto">A figure window with the expected figure shown on it</p> <h3 dir="auto">Additional information</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Operating system</h3> <p dir="auto">Windows 10</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">3.5.0</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto">Qt5Agg</p> <h3 dir="auto">Python version</h3> <p dir="auto">Python 3.8.12</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">conda</p>
1
<p dir="auto">If I navigate to an Angular SPA from another page (outside the SPA), I have to click back twice to return to where I was. When the page first loads a duplicate history entry is created. If I keep refreshing the SPA page, the history gets longer and longer...</p> <p dir="auto">Some initial investigation shows that:</p> <ul dir="auto"> <li>The problem does not occur if the URL that serves the SPA does not match any defined routes.</li> <li>The problem does not occur for applications that have no routing configuration.</li> </ul> <p dir="auto">Possibly related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="114288806" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/5025" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/5025/hovercard" href="https://github.com/angular/angular/issues/5025">#5025</a> ?</p> <p dir="auto">Using Angular 2.0.0-beta.0</p>
<p dir="auto">In case of an Observable array, in component template if we add *ngIf =" (list$ | async)?.length&gt;0" it doesn't loops through the child *ngFor.</p> <p dir="auto">For example if I have below Observable list in the component:</p> <p dir="auto"><code class="notranslate">list$: Observable&lt;any[]&gt;;</code></p> <p dir="auto">and below in template:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div&gt; Length: {{(list$ | async)?.length}} &lt;div *ngIf=&quot;(list$ | async)?.length&gt;0&quot;&gt; &lt;ul&gt; &lt;li *ngFor=&quot;let item of (list$ | async)&quot;&gt; {{item.name}} &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div&gt; Length: {{(list$ | async)?.length}} &lt;div *ngIf="(list$ | async)?.length&gt;0"&gt; &lt;ul&gt; &lt;li *ngFor="let item of (list$ | async)"&gt; {{item.name}} &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; </code></pre></div> <p dir="auto">It seems that (list$ | async)?.length gives us the length of the list but the list isn't printed on the screen.</p> <p dir="auto">Whereas if I remove ngIf it start working:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div&gt; Length: {{(list$ | async)?.length}} &lt;ul&gt; &lt;li *ngFor=&quot;let item of (list$ | async)&quot;&gt; {{item.name}} &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div&gt; Length: {{(list$ | async)?.length}} &lt;ul&gt; &lt;li *ngFor="let item of (list$ | async)"&gt; {{item.name}} &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre></div>
0
<p dir="auto">[x ] bug report =&gt; search github for a similar issue or PR before submitting<br> [ ] feature request<br> [ ] support request =&gt; Please do not submit support request here, instead see <a href="https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question">https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I have separated my application into `js` directory where all my generated `.js` files are and an `app` directory where I keep my `.ts`, `.html` and `.css` files together. For the AoT compilation I use the `tsconfig.aot.json` { &quot;compilerOptions&quot;: { &quot;target&quot;: &quot;es2015&quot;, &quot;module&quot;: &quot;es2015&quot;, &quot;moduleResolution&quot;: &quot;node&quot;, &quot;declaration&quot;: false, &quot;removeComments&quot;: true, &quot;noLib&quot;: false, &quot;emitDecoratorMetadata&quot;: true, &quot;experimentalDecorators&quot;: true, &quot;lib&quot;: [&quot;es6&quot;, &quot;es2015&quot;, &quot;dom&quot;], &quot;sourceMap&quot;: true, &quot;pretty&quot;: true, &quot;allowUnreachableCode&quot;: false, &quot;allowUnusedLabels&quot;: false, &quot;noImplicitAny&quot;: true, &quot;noImplicitReturns&quot;: true, &quot;noImplicitUseStrict&quot;: false, &quot;noFallthroughCasesInSwitch&quot;: true, &quot;outDir&quot;: &quot;js&quot;, &quot;typeRoots&quot;: [ &quot;./node_modules/@types&quot;, &quot;./node_modules&quot; ], &quot;types&quot;: [ ] }, &quot;files&quot;: [ &quot;app/main.ts&quot; ], &quot;exclude&quot;: [ &quot;node_modules&quot;, &quot;js&quot;, &quot;app&quot; ], &quot;compileOnSave&quot;: false } and the script: `&quot;ngc&quot;: &quot;ngc -p tsconfig.aot.json &amp;&amp; npm run copy \&quot;app/*\&quot; \&quot;compiled\&quot; &quot;` Because I have seprated my app into `js` and `app` folders I have to use it like this: @Component({ moduleId: module.id.replace(&quot;/js/&quot;, &quot;/app/&quot;), selector: 'escl-mainbar', templateUrl: './mainbar.component.html' }) export class MainbarComponent { But when I try to run the script it gives me this error: &gt; angular-quickstart@1.0.0 ngc C:\dev_escal\project\escal\ui\src\main\webapp &gt; ngc -p tsconfig.aot.json &amp;&amp; npm run copy &quot;app/*&quot; &quot;compiled&quot; Error encountered resolving symbol values statically. Calling function 'module', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol MainbarComponent in C:/dev_escal/project/escal/ui/src/main/webapp/app/mainbar/mainbar.component.ts, resolving symbol MainbarComponent in C:/dev_escal/project/escal/ui/src/main/webapp/app/mainbar/mainbar.component.ts I tried with using: export function moduleId() { return module.id.replace(&quot;/js/&quot;, &quot;/app/&quot;); } @Component({ moduleId: moduleId(), selector: 'escl-mainbar', templateUrl: './mainbar.component.html' }) export class MainbarComponent { } but that still gives me Error encountered resolving symbol values statically.... I'm using `@angular/comiler-clie` and the other stuff of version 2.4.6 and typescript version is 2.1.5. Any idea where, the problem is or if it is really a bug."><pre class="notranslate"><code class="notranslate">I have separated my application into `js` directory where all my generated `.js` files are and an `app` directory where I keep my `.ts`, `.html` and `.css` files together. For the AoT compilation I use the `tsconfig.aot.json` { "compilerOptions": { "target": "es2015", "module": "es2015", "moduleResolution": "node", "declaration": false, "removeComments": true, "noLib": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": ["es6", "es2015", "dom"], "sourceMap": true, "pretty": true, "allowUnreachableCode": false, "allowUnusedLabels": false, "noImplicitAny": true, "noImplicitReturns": true, "noImplicitUseStrict": false, "noFallthroughCasesInSwitch": true, "outDir": "js", "typeRoots": [ "./node_modules/@types", "./node_modules" ], "types": [ ] }, "files": [ "app/main.ts" ], "exclude": [ "node_modules", "js", "app" ], "compileOnSave": false } and the script: `"ngc": "ngc -p tsconfig.aot.json &amp;&amp; npm run copy \"app/*\" \"compiled\" "` Because I have seprated my app into `js` and `app` folders I have to use it like this: @Component({ moduleId: module.id.replace("/js/", "/app/"), selector: 'escl-mainbar', templateUrl: './mainbar.component.html' }) export class MainbarComponent { But when I try to run the script it gives me this error: &gt; angular-quickstart@1.0.0 ngc C:\dev_escal\project\escal\ui\src\main\webapp &gt; ngc -p tsconfig.aot.json &amp;&amp; npm run copy "app/*" "compiled" Error encountered resolving symbol values statically. Calling function 'module', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol MainbarComponent in C:/dev_escal/project/escal/ui/src/main/webapp/app/mainbar/mainbar.component.ts, resolving symbol MainbarComponent in C:/dev_escal/project/escal/ui/src/main/webapp/app/mainbar/mainbar.component.ts I tried with using: export function moduleId() { return module.id.replace("/js/", "/app/"); } @Component({ moduleId: moduleId(), selector: 'escl-mainbar', templateUrl: './mainbar.component.html' }) export class MainbarComponent { } but that still gives me Error encountered resolving symbol values statically.... I'm using `@angular/comiler-clie` and the other stuff of version 2.4.6 and typescript version is 2.1.5. Any idea where, the problem is or if it is really a bug. </code></pre></div>
<p dir="auto">JIT path use relative to wwwroot but AoT use relative path</p> <p dir="auto">for JIT: templateUrl:'app/app.html'<br> for AoT: templateUrl:'app.html'</p> <p dir="auto">this bothers me everytime I change from or to AoT compile</p>
1
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/706" rel="nofollow">http://projects.scipy.org/scipy/ticket/706</a> on 2008-07-23 by trac user rjansen, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wnbell/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wnbell">@wnbell</a>.</em></p> <p dir="auto">Hi,</p> <p dir="auto">I'm trying to compile scipy on Solaris 10:</p> <p dir="auto">After, what seems to be a succesfull LAPACK and ATLAS build with the GNU compiler 4.0.2 (switched to sunfreeware python,w hich is build with GNU compilers<br> and installing NumPy with same compiler, I'm bumped into the following error below when trying to compile SciPy.</p> <p dir="auto">This same error shows also when using the Sun Studio 12 compiler chain. (everything rebuild with Sun compilers, due to the python used from the blastwave.org packages)</p> <p dir="auto">The SciPy build stage seems to switch/default to Sun Studio compiler again</p> <p dir="auto">scipy/optimize/minpack2/dcstep.f:<br> dcstep:<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2602: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2603: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2604: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2605: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2606: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2607: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2608: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2609: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2610: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2611: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2612: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2614: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools.h", line 409: Error: multiplies is not a member of std.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: While instantiating "csr_elmul_csr&lt;int, int&gt;(const int, const int, const int_, const int_, const int_, const int_, const int_, const int_, std::vector<em>, std::vector</em>, std::vector<em>)".<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: Instantiated from non-template code.<br> "scipy/sparse/sparsetools/sparsetools.h", line 409: Error: Unexpected type name "T" encountered.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: While instantiating "csr_elmul_csr&lt;int, int&gt;(const int, const int, const int</em>, const int_, const int_, const int_, const int_, const int_, std::vector<em>, std::vector</em>, std::vector<em>)".<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: Instantiated from non-template code.<br> "scipy/sparse/sparsetools/sparsetools.h", line 409: Error: Operand expected instead of ")".<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: While instantiating "csr_elmul_csr&lt;int, int&gt;(const int, const int, const int</em>, const int_, const int_, const int_, const int_, const int_, std::vector<em>, std::vector</em>, std::vector<em>)".<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: Instantiated from non-template code.<br> 3 Error(s) and 12 Warning(s) detected.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2602: Warning: String literal converted to char</em> in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2603: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2604: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2605: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2606: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2607: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2608: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2609: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2610: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2611: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2612: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 2614: Warning: String literal converted to char* in initialization.<br> "scipy/sparse/sparsetools/sparsetools.h", line 409: Error: multiplies is not a member of std.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: While instantiating "csr_elmul_csr&lt;int, int&gt;(const int, const int, const int_, const int_, const int_, const int_, const int_, const int_, std::vector<em>, std::vector</em>, std::vector<em>)".<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: Instantiated from non-template code.<br> "scipy/sparse/sparsetools/sparsetools.h", line 409: Error: Unexpected type name "T" encountered.<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: While instantiating "csr_elmul_csr&lt;int, int&gt;(const int, const int, const int</em>, const int_, const int_, const int_, const int_, const int_, std::vector<em>, std::vector</em>, std::vector<em>)".<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: Instantiated from non-template code.<br> "scipy/sparse/sparsetools/sparsetools.h", line 409: Error: Operand expected instead of ")".<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: While instantiating "csr_elmul_csr&lt;int, int&gt;(const int, const int, const int</em>, const int_, const int_, const int_, const int_, const int_, std::vector<em>, std::vector</em>, std::vector*)".<br> "scipy/sparse/sparsetools/sparsetools_wrap.cxx", line 15087: Where: Instantiated from non-template code.<br> 3 Error(s) and 12 Warning(s) detected.<br> error: Setup script exited with error: Command "CC -DNDEBUG -xO3 -xtarget=ultra -xarch=v8 -Iscipy/sparse/sparsetools -I/opt/csw/lib/python/site-packages/numpy-1.1.0-py2.5-solaris-2.10-sun4u.egg/numpy/core/include -I/opt/csw/include/python2.5 -c scipy/sparse/sparsetools/sparsetools_wrap.cxx -o build/temp.solaris-2.10-sun4u-2.5/scipy/sparse/sparsetools/sparsetools_wrap.o" failed with exit status 3</p>
<p dir="auto">This started out as a <a href="http://stackoverflow.com/a/42349847/7207392" rel="nofollow">hack</a> on stack overflow to speed up construction of csr matrices.</p> <p dir="auto">As in some cases savings are considerable (several-fold reduction in time needed), it was suggested to me to offer this for inclusion in scipy.</p> <p dir="auto">I'm on Python 3.6, numpy 1.11.3, scipy 0.18.1</p> <p dir="auto">The speedup is achieved by</p> <ul dir="auto"> <li>using int32 and viewcasting this to int64 in the indirect sort of indices</li> <li>using quicksort instead of mergesort since duplicate indices are fused anyway (is there any deeper reason lexsort doesn't let you pick the sort algo?)</li> <li>using argsort instead of lexsort</li> </ul> <p dir="auto">I attach a proof-of-concept version lacking checks for endianness and index size.</p> <p dir="auto">Nico Schlömer has offered to add some timings.</p> <p dir="auto"><a href="https://github.com/scipy/scipy/files/790580/fast_tocsr.py.txt">fast_tocsr.py.txt</a></p>
0
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">The figure is copying the image background of the window when I set the facecolor to None.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import sys from PyQt5.QtCore import Qt from PyQt5.QtGui import * from PyQt5.QtWidgets import * import matplotlib matplotlib.use('Qt5Agg') # Make sure that we are using QT5 from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar from matplotlib.figure import Figure import matplotlib.pyplot as plt import RessourcesGUI_rc # or any image class SecondWindow(QWidget): def __init__(self, parent=None): super(SecondWindow, self).__init__(parent) self.setupUi(self) def setupUi(self, Form): # WINDOW SETTINGS Form.setObjectName(&quot;Form&quot;) Form.resize(800, 600) Form.setWindowTitle('Hello') self.p = QPalette() self.pixmap = QPixmap(&quot;:/Image_accueil/Fond_fumee_blanche.png&quot;).scaled(self.size(), Qt.IgnoreAspectRatio, Qt.SmoothTransformation) self.p.setBrush(QPalette.Background, QBrush(self.pixmap)) self.setPalette(self.p) # CREATE FIGURE AND SETTINGS self.figure = plt.figure() self.figure.patch.set_facecolor('None') self.figure.patch.set_alpha(0) self.figure.set_facecolor('None') self.figure.set_alpha(0) self.canvas = FigureCanvas(self.figure) self.axes = self.figure.add_subplot(111) self.toolbar = NavigationToolbar(self.canvas, self) self.toolbar.hide() # NOT IMPORTANT BELOW # LAYOUT V1 self.check1 = QCheckBox('Check 1') self.check2 = QCheckBox('check 2') self.button1 = QPushButton('Button 1') self.button2 = QPushButton('Button 2') self.spacerItem1 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) self.spacerItem2 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) self.spacerItem3 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) self.layoutV = QVBoxLayout() self.layoutV.setContentsMargins(5, 0, 5, 0) self.widget_layoutV = QWidget() self.layoutV.addItem(self.spacerItem1) self.layoutV.addWidget(self.check1) self.layoutV.addWidget(self.check2) self.layoutV.addItem(self.spacerItem2) self.layoutV.addWidget(self.button1) self.layoutV.addWidget(self.button2) self.layoutV.addItem(self.spacerItem3) self.widget_layoutV.setLayout(self.layoutV) # LAYOUT V2 self.bouton_zoom = QPushButton('Zoom') self.bouton_pan = QPushButton('Pan') self.bouton_retour = QPushButton('Home') self.bouton_curseur = QPushButton('Cursor') self.coord_X = QLabel('X : ') self.coord_Y = QLabel('Y : ') self.layoutV2 = QVBoxLayout() self.layoutV2.setContentsMargins(5, 0, 5, 0) self.widget_layoutV2 = QWidget() self.layoutV2.addWidget(self.coord_X) self.layoutV2.addWidget(self.coord_Y) self.widget_layoutV2.setLayout(self.layoutV2) # LAYOUT H1 (with V2) self.layoutH = QHBoxLayout() self.layoutH.setContentsMargins(5, 0, 5, 0) self.widget_layoutH = QWidget() self.layoutH.addWidget(self.bouton_zoom) self.layoutH.addWidget(self.bouton_pan) self.layoutH.addWidget(self.bouton_retour) self.layoutH.addWidget(self.bouton_curseur) self.layoutH.addWidget(self.widget_layoutV2) self.widget_layoutH.setLayout(self.layoutH) # LAYOUT H2 (with V and H2) self.layoutH2 = QHBoxLayout() self.layoutH2.setContentsMargins(5, 0, 5, 0) self.widget_layoutH2 = QWidget() self.layoutH2.addWidget(self.canvas,5) self.layoutH2.addWidget(self.widget_layoutV) self.widget_layoutH2.setLayout(self.layoutH2) # WINDOW LAYOUT (with H1 and H2) self.setLayout(QVBoxLayout()) self.layout().addWidget(self.widget_layoutH,1) self.layout().addWidget(self.widget_layoutH2,10) self.layout().setContentsMargins(5, 0, 5, 0) def resizeEvent(self, ResizeEvent): size = self.size() self.p.setBrush(QPalette.Background, QBrush(self.pixmap.scaled(size, Qt.IgnoreAspectRatio, Qt.SmoothTransformation))) self.setPalette(self.p) if __name__ == '__main__': app = QApplication(sys.argv) form = SecondWindow() form.show() sys.exit(app.exec_())"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">sys</span> <span class="pl-k">from</span> <span class="pl-v">PyQt5</span>.<span class="pl-v">QtCore</span> <span class="pl-k">import</span> <span class="pl-v">Qt</span> <span class="pl-k">from</span> <span class="pl-v">PyQt5</span>.<span class="pl-v">QtGui</span> <span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-v">PyQt5</span>.<span class="pl-v">QtWidgets</span> <span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span> <span class="pl-s1">matplotlib</span>.<span class="pl-en">use</span>(<span class="pl-s">'Qt5Agg'</span>) <span class="pl-c"># Make sure that we are using QT5</span> <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">backends</span>.<span class="pl-s1">backend_qt5agg</span> <span class="pl-k">import</span> <span class="pl-v">FigureCanvasQTAgg</span> <span class="pl-k">as</span> <span class="pl-v">FigureCanvas</span> <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">backends</span>.<span class="pl-s1">backend_qt5agg</span> <span class="pl-k">import</span> <span class="pl-v">NavigationToolbar2QT</span> <span class="pl-k">as</span> <span class="pl-v">NavigationToolbar</span> <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">figure</span> <span class="pl-k">import</span> <span class="pl-v">Figure</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-v">RessourcesGUI_rc</span> <span class="pl-c"># or any image</span> <span class="pl-k">class</span> <span class="pl-v">SecondWindow</span>(<span class="pl-v">QWidget</span>): <span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">parent</span><span class="pl-c1">=</span><span class="pl-c1">None</span>): <span class="pl-en">super</span>(<span class="pl-v">SecondWindow</span>, <span class="pl-s1">self</span>).<span class="pl-en">__init__</span>(<span class="pl-s1">parent</span>) <span class="pl-s1">self</span>.<span class="pl-en">setupUi</span>(<span class="pl-s1">self</span>) <span class="pl-k">def</span> <span class="pl-en">setupUi</span>(<span class="pl-s1">self</span>, <span class="pl-v">Form</span>): <span class="pl-c"># WINDOW SETTINGS</span> <span class="pl-v">Form</span>.<span class="pl-en">setObjectName</span>(<span class="pl-s">"Form"</span>) <span class="pl-v">Form</span>.<span class="pl-en">resize</span>(<span class="pl-c1">800</span>, <span class="pl-c1">600</span>) <span class="pl-v">Form</span>.<span class="pl-en">setWindowTitle</span>(<span class="pl-s">'Hello'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">p</span> <span class="pl-c1">=</span> <span class="pl-v">QPalette</span>() <span class="pl-s1">self</span>.<span class="pl-s1">pixmap</span> <span class="pl-c1">=</span> <span class="pl-v">QPixmap</span>(<span class="pl-s">":/Image_accueil/Fond_fumee_blanche.png"</span>).<span class="pl-en">scaled</span>(<span class="pl-s1">self</span>.<span class="pl-en">size</span>(), <span class="pl-v">Qt</span>.<span class="pl-v">IgnoreAspectRatio</span>, <span class="pl-v">Qt</span>.<span class="pl-v">SmoothTransformation</span>) <span class="pl-s1">self</span>.<span class="pl-s1">p</span>.<span class="pl-en">setBrush</span>(<span class="pl-v">QPalette</span>.<span class="pl-v">Background</span>, <span class="pl-v">QBrush</span>(<span class="pl-s1">self</span>.<span class="pl-s1">pixmap</span>)) <span class="pl-s1">self</span>.<span class="pl-en">setPalette</span>(<span class="pl-s1">self</span>.<span class="pl-s1">p</span>) <span class="pl-c"># CREATE FIGURE AND SETTINGS</span> <span class="pl-s1">self</span>.<span class="pl-s1">figure</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>() <span class="pl-s1">self</span>.<span class="pl-s1">figure</span>.<span class="pl-s1">patch</span>.<span class="pl-en">set_facecolor</span>(<span class="pl-s">'None'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">figure</span>.<span class="pl-s1">patch</span>.<span class="pl-en">set_alpha</span>(<span class="pl-c1">0</span>) <span class="pl-s1">self</span>.<span class="pl-s1">figure</span>.<span class="pl-en">set_facecolor</span>(<span class="pl-s">'None'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">figure</span>.<span class="pl-en">set_alpha</span>(<span class="pl-c1">0</span>) <span class="pl-s1">self</span>.<span class="pl-s1">canvas</span> <span class="pl-c1">=</span> <span class="pl-v">FigureCanvas</span>(<span class="pl-s1">self</span>.<span class="pl-s1">figure</span>) <span class="pl-s1">self</span>.<span class="pl-s1">axes</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">figure</span>.<span class="pl-en">add_subplot</span>(<span class="pl-c1">111</span>) <span class="pl-s1">self</span>.<span class="pl-s1">toolbar</span> <span class="pl-c1">=</span> <span class="pl-v">NavigationToolbar</span>(<span class="pl-s1">self</span>.<span class="pl-s1">canvas</span>, <span class="pl-s1">self</span>) <span class="pl-s1">self</span>.<span class="pl-s1">toolbar</span>.<span class="pl-en">hide</span>() <span class="pl-c"># NOT IMPORTANT BELOW</span> <span class="pl-c"># LAYOUT V1</span> <span class="pl-s1">self</span>.<span class="pl-s1">check1</span> <span class="pl-c1">=</span> <span class="pl-v">QCheckBox</span>(<span class="pl-s">'Check 1'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">check2</span> <span class="pl-c1">=</span> <span class="pl-v">QCheckBox</span>(<span class="pl-s">'check 2'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">button1</span> <span class="pl-c1">=</span> <span class="pl-v">QPushButton</span>(<span class="pl-s">'Button 1'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">button2</span> <span class="pl-c1">=</span> <span class="pl-v">QPushButton</span>(<span class="pl-s">'Button 2'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">spacerItem1</span> <span class="pl-c1">=</span> <span class="pl-v">QSpacerItem</span>(<span class="pl-c1">20</span>, <span class="pl-c1">40</span>, <span class="pl-v">QSizePolicy</span>.<span class="pl-v">Minimum</span>, <span class="pl-v">QSizePolicy</span>.<span class="pl-v">Expanding</span>) <span class="pl-s1">self</span>.<span class="pl-s1">spacerItem2</span> <span class="pl-c1">=</span> <span class="pl-v">QSpacerItem</span>(<span class="pl-c1">20</span>, <span class="pl-c1">40</span>, <span class="pl-v">QSizePolicy</span>.<span class="pl-v">Minimum</span>, <span class="pl-v">QSizePolicy</span>.<span class="pl-v">Expanding</span>) <span class="pl-s1">self</span>.<span class="pl-s1">spacerItem3</span> <span class="pl-c1">=</span> <span class="pl-v">QSpacerItem</span>(<span class="pl-c1">20</span>, <span class="pl-c1">40</span>, <span class="pl-v">QSizePolicy</span>.<span class="pl-v">Minimum</span>, <span class="pl-v">QSizePolicy</span>.<span class="pl-v">Expanding</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutV</span> <span class="pl-c1">=</span> <span class="pl-v">QVBoxLayout</span>() <span class="pl-s1">self</span>.<span class="pl-s1">layoutV</span>.<span class="pl-en">setContentsMargins</span>(<span class="pl-c1">5</span>, <span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-c1">0</span>) <span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutV</span> <span class="pl-c1">=</span> <span class="pl-v">QWidget</span>() <span class="pl-s1">self</span>.<span class="pl-s1">layoutV</span>.<span class="pl-en">addItem</span>(<span class="pl-s1">self</span>.<span class="pl-s1">spacerItem1</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutV</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">check1</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutV</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">check2</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutV</span>.<span class="pl-en">addItem</span>(<span class="pl-s1">self</span>.<span class="pl-s1">spacerItem2</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutV</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">button1</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutV</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">button2</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutV</span>.<span class="pl-en">addItem</span>(<span class="pl-s1">self</span>.<span class="pl-s1">spacerItem3</span>) <span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutV</span>.<span class="pl-en">setLayout</span>(<span class="pl-s1">self</span>.<span class="pl-s1">layoutV</span>) <span class="pl-c"># LAYOUT V2</span> <span class="pl-s1">self</span>.<span class="pl-s1">bouton_zoom</span> <span class="pl-c1">=</span> <span class="pl-v">QPushButton</span>(<span class="pl-s">'Zoom'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">bouton_pan</span> <span class="pl-c1">=</span> <span class="pl-v">QPushButton</span>(<span class="pl-s">'Pan'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">bouton_retour</span> <span class="pl-c1">=</span> <span class="pl-v">QPushButton</span>(<span class="pl-s">'Home'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">bouton_curseur</span> <span class="pl-c1">=</span> <span class="pl-v">QPushButton</span>(<span class="pl-s">'Cursor'</span>) <span class="pl-s1">self</span>.<span class="pl-s1">coord_X</span> <span class="pl-c1">=</span> <span class="pl-v">QLabel</span>(<span class="pl-s">'X : '</span>) <span class="pl-s1">self</span>.<span class="pl-s1">coord_Y</span> <span class="pl-c1">=</span> <span class="pl-v">QLabel</span>(<span class="pl-s">'Y : '</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutV2</span> <span class="pl-c1">=</span> <span class="pl-v">QVBoxLayout</span>() <span class="pl-s1">self</span>.<span class="pl-s1">layoutV2</span>.<span class="pl-en">setContentsMargins</span>(<span class="pl-c1">5</span>, <span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-c1">0</span>) <span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutV2</span> <span class="pl-c1">=</span> <span class="pl-v">QWidget</span>() <span class="pl-s1">self</span>.<span class="pl-s1">layoutV2</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">coord_X</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutV2</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">coord_Y</span>) <span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutV2</span>.<span class="pl-en">setLayout</span>(<span class="pl-s1">self</span>.<span class="pl-s1">layoutV2</span>) <span class="pl-c"># LAYOUT H1 (with V2)</span> <span class="pl-s1">self</span>.<span class="pl-s1">layoutH</span> <span class="pl-c1">=</span> <span class="pl-v">QHBoxLayout</span>() <span class="pl-s1">self</span>.<span class="pl-s1">layoutH</span>.<span class="pl-en">setContentsMargins</span>(<span class="pl-c1">5</span>, <span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-c1">0</span>) <span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutH</span> <span class="pl-c1">=</span> <span class="pl-v">QWidget</span>() <span class="pl-s1">self</span>.<span class="pl-s1">layoutH</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">bouton_zoom</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutH</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">bouton_pan</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutH</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">bouton_retour</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutH</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">bouton_curseur</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutH</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutV2</span>) <span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutH</span>.<span class="pl-en">setLayout</span>(<span class="pl-s1">self</span>.<span class="pl-s1">layoutH</span>) <span class="pl-c"># LAYOUT H2 (with V and H2)</span> <span class="pl-s1">self</span>.<span class="pl-s1">layoutH2</span> <span class="pl-c1">=</span> <span class="pl-v">QHBoxLayout</span>() <span class="pl-s1">self</span>.<span class="pl-s1">layoutH2</span>.<span class="pl-en">setContentsMargins</span>(<span class="pl-c1">5</span>, <span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-c1">0</span>) <span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutH2</span> <span class="pl-c1">=</span> <span class="pl-v">QWidget</span>() <span class="pl-s1">self</span>.<span class="pl-s1">layoutH2</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">canvas</span>,<span class="pl-c1">5</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layoutH2</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutV</span>) <span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutH2</span>.<span class="pl-en">setLayout</span>(<span class="pl-s1">self</span>.<span class="pl-s1">layoutH2</span>) <span class="pl-c"># WINDOW LAYOUT (with H1 and H2)</span> <span class="pl-s1">self</span>.<span class="pl-en">setLayout</span>(<span class="pl-v">QVBoxLayout</span>()) <span class="pl-s1">self</span>.<span class="pl-en">layout</span>().<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutH</span>,<span class="pl-c1">1</span>) <span class="pl-s1">self</span>.<span class="pl-en">layout</span>().<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">widget_layoutH2</span>,<span class="pl-c1">10</span>) <span class="pl-s1">self</span>.<span class="pl-en">layout</span>().<span class="pl-en">setContentsMargins</span>(<span class="pl-c1">5</span>, <span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-c1">0</span>) <span class="pl-k">def</span> <span class="pl-en">resizeEvent</span>(<span class="pl-s1">self</span>, <span class="pl-v">ResizeEvent</span>): <span class="pl-s1">size</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">size</span>() <span class="pl-s1">self</span>.<span class="pl-s1">p</span>.<span class="pl-en">setBrush</span>(<span class="pl-v">QPalette</span>.<span class="pl-v">Background</span>, <span class="pl-v">QBrush</span>(<span class="pl-s1">self</span>.<span class="pl-s1">pixmap</span>.<span class="pl-en">scaled</span>(<span class="pl-s1">size</span>, <span class="pl-v">Qt</span>.<span class="pl-v">IgnoreAspectRatio</span>, <span class="pl-v">Qt</span>.<span class="pl-v">SmoothTransformation</span>))) <span class="pl-s1">self</span>.<span class="pl-en">setPalette</span>(<span class="pl-s1">self</span>.<span class="pl-s1">p</span>) <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>: <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">QApplication</span>(<span class="pl-s1">sys</span>.<span class="pl-s1">argv</span>) <span class="pl-s1">form</span> <span class="pl-c1">=</span> <span class="pl-v">SecondWindow</span>() <span class="pl-s1">form</span>.<span class="pl-en">show</span>() <span class="pl-s1">sys</span>.<span class="pl-en">exit</span>(<span class="pl-s1">app</span>.<span class="pl-en">exec_</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/30922706/29204715-e9445916-7e78-11e7-875d-48ef3e4f37a1.png"><img src="https://user-images.githubusercontent.com/30922706/29204715-e9445916-7e78-11e7-875d-48ef3e4f37a1.png" alt="actual_outcome" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">I wish to have a real transprent background for the figure. Like this, the background of the window will not be duplicated into the figure.</p> <p dir="auto">Thanks for your help !</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating System: Windows 7 Pro</li> <li>Matplotlib Version: 2.0.2 (installed via Anaconda, conda install matplotlib --channel conda-forge)</li> <li>Python Version: Python 3.6</li> </ul>
<p dir="auto">Bug also reported here: <a href="https://bugs.archlinux.org/task/41790" rel="nofollow">https://bugs.archlinux.org/task/41790</a><br> When clicking on the Save button on the NavigationToolbar, I get an error:<br> <code class="notranslate">Format "png)')" is not supported. Supported formats: eps, jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff.</code></p> <p dir="auto">I tracked the bug to be coming from the output of the <code class="notranslate">_getSaveFileName</code> function, that is supposed to be a string but is a tuple in reality. In <code class="notranslate">qt_compat.py</code>, <code class="notranslate">_getSaveFileName</code> links to QtWidgets.QtFileDialog.getSaveFileName.<br> In pyqt4, this function returns a string, but the doc pyqt4/5 differences says that in pyqt5 the functions returns a tuple (filename, extension), as for <code class="notranslate">getSaveFileNameAndFilter</code> in pyqt4.</p> <p dir="auto">Commenting line 96 in <code class="notranslate">qt_compat.py</code> solved the problem, because <code class="notranslate">_getSaveFileName</code> is then correctly defined in line 117 (only returning the first element of the tuple).</p>
0
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">The axes of a subplot_mosaic show up in a random order in <code class="notranslate">fig.axes</code> (likely due to the use of a <code class="notranslate">set</code> for uniquification in <code class="notranslate">_identify_keys_and_nested</code>).</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for _ in $(seq 10); do python -c 'from pylab import *; fig, axs = subplot_mosaic(&quot;ab&quot;); print(fig.axes.index(axs[&quot;a&quot;]))'; done"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-smi">_</span> <span class="pl-k">in</span> <span class="pl-s"><span class="pl-pds">$(</span>seq 10<span class="pl-pds">)</span></span><span class="pl-k">;</span> <span class="pl-k">do</span> python -c <span class="pl-s"><span class="pl-pds">'</span>from pylab import *; fig, axs = subplot_mosaic("ab"); print(fig.axes.index(axs["a"]))<span class="pl-pds">'</span></span><span class="pl-k">;</span> <span class="pl-k">done</span></pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1 0 1 1 1 0 0 0 0 1"><pre class="notranslate"><code class="notranslate">1 0 1 1 1 0 0 0 0 1 </code></pre></div> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">Axes should be added in a consistent order. I guess a reasonable one would be as if iterating the spec in C order (dropping duplicates).</p> <p dir="auto">Not release critical (especially as the order was not fixed, so fixing an order is not a backcompat break), but would be nice to get this sorted out before the API moves out of being experimental.</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: linux</li> <li>Matplotlib version (<code class="notranslate">import matplotlib; print(matplotlib.__version__)</code>): head</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): any</li> <li>Python version: 39</li> <li>Jupyter version (if applicable):</li> <li>Other libraries:</li> </ul> <hr> <p dir="auto">Note: the simple solution of replacing <code class="notranslate">unique_ids = set()</code> by <code class="notranslate">unique_ids = cbook._OrderedSet()</code> is good enough for the non-nested case, but doesn't handle nested layouts such as <code class="notranslate">subplot_mosaic([["a", [["b1", "b2"], ["b3", "b4"]]], ["c", "d"]])</code> because currently the nested submosaic is always added after all the non-nested axes.</p>
<p dir="auto">Consider the following example:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt import numpy as np fig,axes = plt.subplots() line_A = axes.plot( np.random.random(10), label=&quot;foo&quot; )[0] line_B = axes.plot( np.random.random(10), label=&quot;bar&quot; )[0] line_C = axes.plot( np.random.random(10), label=&quot;quz&quot; )[0] lines = [line_A,line_B] axes.legend( lines, [line.get_label() for line in lines] )"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-s1">fig</span>,<span class="pl-s1">axes</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>() <span class="pl-s1">line_A</span> <span class="pl-c1">=</span> <span class="pl-s1">axes</span>.<span class="pl-en">plot</span>( <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>(<span class="pl-c1">10</span>), <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"foo"</span> )[<span class="pl-c1">0</span>] <span class="pl-s1">line_B</span> <span class="pl-c1">=</span> <span class="pl-s1">axes</span>.<span class="pl-en">plot</span>( <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>(<span class="pl-c1">10</span>), <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"bar"</span> )[<span class="pl-c1">0</span>] <span class="pl-s1">line_C</span> <span class="pl-c1">=</span> <span class="pl-s1">axes</span>.<span class="pl-en">plot</span>( <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>(<span class="pl-c1">10</span>), <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"quz"</span> )[<span class="pl-c1">0</span>] <span class="pl-s1">lines</span> <span class="pl-c1">=</span> [<span class="pl-s1">line_A</span>,<span class="pl-s1">line_B</span>] <span class="pl-s1">axes</span>.<span class="pl-en">legend</span>( <span class="pl-s1">lines</span>, [<span class="pl-s1">line</span>.<span class="pl-en">get_label</span>() <span class="pl-k">for</span> <span class="pl-s1">line</span> <span class="pl-c1">in</span> <span class="pl-s1">lines</span>] )</pre></div> <p dir="auto">The last line needs to be this complicated since I get unwanted internal information if I just use <code class="notranslate">axes.legend(lines)</code>. However, this seems like something <code class="notranslate">legend</code> could do automatically: If I do not specify the handles for the legend, it extracts them from whatever I give it automatically.</p> <p dir="auto">This may be a duplicate of <a href="https://github.com/matplotlib/matplotlib/issues/8389" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/8389/hovercard">this request</a>, but I am not sure.</p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/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/wiki/FAQ">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: latest</li> </ul> <h3 dir="auto">Step to reproduce this issue</h3> <ol dir="auto"> <li>export a rest service DemoService with a url: rest://127.0.0.1:4444/test/</li> <li>then we will get a real rest service with rest://127.0.0.1:4444/test/DemoService</li> <li>but when we export a rest service DemoService with a url: rest://127.0.0.1:4444/test</li> <li>then we will get a real rest service with rest://127.0.0.1:4444/DemoService</li> </ol> <p dir="auto">Those are the different results, in the second case the context path test is missing.<br> So users use explicit exporter and invoker to call rest services, they would feel puzzled.</p> <p dir="auto">We should fix it by modifying getContextPath method.</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/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.4-SNAPSHOT</li> <li>Operating System version: win7</li> <li>Java version: 8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>使用springboot,在application.yml无法使用<br> dubbo:<br> metircs:<br> port: 20880<br> protocol: dubbo</li> </ol>
0
<p dir="auto">I can reproduce it reliably, and have tracked it down to what seems like an ARM code generation bug.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; versioninfo() Julia Version 1.7.0 Commit 3bf9d17731 (2021-11-30 12:12 UTC) Platform Info: OS: macOS (arm64-apple-darwin21.1.0) CPU: Apple M1 Max WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-12.0.1 (ORCJIT, cyclone) julia&gt; using WGLMakie julia&gt; fig=Figure() julia&gt; ax1 = Axis(fig[1, 1]) signal (11): Segmentation fault: 11 in expression starting at REPL[3]:1 ^ at ./math.jl:0 [inlined] bounding_order_of_magnitude at /Users/tlb/.julia/packages/PlotUtils/VgXdq/src/ticks.jl:14 optimize_ticks_typed at /Users/tlb/.julia/packages/PlotUtils/VgXdq/src/ticks.jl:161 #optimize_ticks#42 at /Users/tlb/.julia/packages/PlotUtils/VgXdq/src/ticks.jl:139 [inlined] optimize_ticks##kw at /Users/tlb/.julia/packages/PlotUtils/VgXdq/src/ticks.jl:138 [inlined] get_tickvalues at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/ticklocators/wilkinson.jl:21 [inlined] get_tickvalues at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/ticklocators/wilkinson.jl:17 [inlined] get_tickvalues at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/lineaxis.jl:459 get_ticks at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/lineaxis.jl:453 unknown function (ip: 0x12e27c4cb) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #191 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/lineaxis.jl:187 unknown function (ip: 0x12e26d457) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) do_apply at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #lift#61 at /Users/tlb/.julia/packages/Makie/gQOQF/src/interaction/nodes.jl:13 jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) do_apply at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) lift at /Users/tlb/.julia/packages/Makie/gQOQF/src/interaction/nodes.jl:10 jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #LineAxis#181 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/lineaxis.jl:185 Type##kw at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/lineaxis.jl:3 unknown function (ip: 0x12e1e945b) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #layoutable#251 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables/axis.jl:211 layoutable at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables/axis.jl:10 [inlined] #_layoutable#11 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:69 [inlined] _layoutable at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:69 [inlined] #_layoutable#10 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:64 _layoutable at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:60 [inlined] #_#9 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:49 [inlined] Layoutable at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:49 unknown function (ip: 0x12e1492d7) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) do_call at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) eval_body at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_interpret_toplevel_thunk at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_toplevel_eval_flex at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_toplevel_eval_flex at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_toplevel_eval_in at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) eval at ./boot.jl:373 [inlined] eval_user_input at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:150 repl_backend_loop at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:244 start_repl_backend at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:229 #run_repl#47 at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:362 run_repl at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:349 jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #930 at ./client.jl:394 jfptr_YY.930_43775 at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_f__call_latest at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #invokelatest#2 at ./essentials.jl:716 [inlined] invokelatest at ./essentials.jl:714 [inlined] run_main_repl at ./client.jl:379 exec_options at ./client.jl:309 _start at ./client.jl:495 jl_sysimg_fvars_base at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) true_main at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_repl_entrypoint at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) Allocations: 163411336 (Pool: 163378481; Big: 32855); GC: 91"><pre class="notranslate"><code class="notranslate">julia&gt; versioninfo() Julia Version 1.7.0 Commit 3bf9d17731 (2021-11-30 12:12 UTC) Platform Info: OS: macOS (arm64-apple-darwin21.1.0) CPU: Apple M1 Max WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-12.0.1 (ORCJIT, cyclone) julia&gt; using WGLMakie julia&gt; fig=Figure() julia&gt; ax1 = Axis(fig[1, 1]) signal (11): Segmentation fault: 11 in expression starting at REPL[3]:1 ^ at ./math.jl:0 [inlined] bounding_order_of_magnitude at /Users/tlb/.julia/packages/PlotUtils/VgXdq/src/ticks.jl:14 optimize_ticks_typed at /Users/tlb/.julia/packages/PlotUtils/VgXdq/src/ticks.jl:161 #optimize_ticks#42 at /Users/tlb/.julia/packages/PlotUtils/VgXdq/src/ticks.jl:139 [inlined] optimize_ticks##kw at /Users/tlb/.julia/packages/PlotUtils/VgXdq/src/ticks.jl:138 [inlined] get_tickvalues at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/ticklocators/wilkinson.jl:21 [inlined] get_tickvalues at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/ticklocators/wilkinson.jl:17 [inlined] get_tickvalues at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/lineaxis.jl:459 get_ticks at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/lineaxis.jl:453 unknown function (ip: 0x12e27c4cb) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #191 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/lineaxis.jl:187 unknown function (ip: 0x12e26d457) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) do_apply at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #lift#61 at /Users/tlb/.julia/packages/Makie/gQOQF/src/interaction/nodes.jl:13 jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) do_apply at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) lift at /Users/tlb/.julia/packages/Makie/gQOQF/src/interaction/nodes.jl:10 jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #LineAxis#181 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/lineaxis.jl:185 Type##kw at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/lineaxis.jl:3 unknown function (ip: 0x12e1e945b) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #layoutable#251 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables/axis.jl:211 layoutable at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables/axis.jl:10 [inlined] #_layoutable#11 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:69 [inlined] _layoutable at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:69 [inlined] #_layoutable#10 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:64 _layoutable at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:60 [inlined] #_#9 at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:49 [inlined] Layoutable at /Users/tlb/.julia/packages/Makie/gQOQF/src/makielayout/layoutables.jl:49 unknown function (ip: 0x12e1492d7) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) do_call at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) eval_body at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_interpret_toplevel_thunk at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_toplevel_eval_flex at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_toplevel_eval_flex at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_toplevel_eval_in at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) eval at ./boot.jl:373 [inlined] eval_user_input at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:150 repl_backend_loop at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:244 start_repl_backend at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:229 #run_repl#47 at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:362 run_repl at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:349 jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #930 at ./client.jl:394 jfptr_YY.930_43775 at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_f__call_latest at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) #invokelatest#2 at ./essentials.jl:716 [inlined] invokelatest at ./essentials.jl:714 [inlined] run_main_repl at ./client.jl:379 exec_options at ./client.jl:309 _start at ./client.jl:495 jl_sysimg_fvars_base at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line) jl_apply_generic at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) true_main at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) jl_repl_entrypoint at /Applications/Julia-1.7arm.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line) Allocations: 163411336 (Pool: 163378481; Big: 32855); GC: 91 </code></pre></div> <p dir="auto">The line where it's crashing is:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" while xspan &lt; base^a * one_dt"><pre class="notranslate"> <span class="pl-k">while</span> xspan <span class="pl-k">&lt;</span> base<span class="pl-k">^</span>a <span class="pl-k">*</span> one_dt</pre></div> <p dir="auto">Looking with lldb, it's segfaulting on an <code class="notranslate">ldrb</code> instruction (marked with a <code class="notranslate">-&gt;</code> below). The base address in <code class="notranslate">x19</code> derives from an <code class="notranslate">adrp</code> instruction, so it's some kind of immediate data relative to the PC.</p> <p dir="auto">Segfault is <code class="notranslate">error: memory read failed for 0xee4e2400</code>.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 0x10fc9f878: stp d13, d12, [sp, #-0x70]! 0x10fc9f87c: stp d11, d10, [sp, #0x10] 0x10fc9f880: stp d9, d8, [sp, #0x20] 0x10fc9f884: stp x24, x23, [sp, #0x30] 0x10fc9f888: stp x22, x21, [sp, #0x40] 0x10fc9f88c: stp x20, x19, [sp, #0x50] 0x10fc9f890: stp x29, x30, [sp, #0x60] 0x10fc9f894: mov.16b v8, v1 0x10fc9f898: mov.16b v9, v0 0x10fc9f89c: fmul d10, d1, d1 0x10fc9f8a0: fmul d11, d10, d1 0x10fc9f8a4: fmov d0, #1.00000000 0x10fc9f8a8: mov w8, #0x3 0x10fc9f8ac: adrp x20, 0 0x10fc9f8b0: ldr x20, [x20, #0xa80] 0x10fc9f8b4: adrp x19, -137149 0x10fc9f8b8: add x19, x19, #0x410 ; =0x410 0x10fc9f8bc: fdiv d12, d0, d1 0x10fc9f8c0: b 0x10fc9f8d4 0x10fc9f8c4: mov.16b v0, v8 0x10fc9f8c8: fcmp d0, d9 0x10fc9f8cc: mov x8, x22 0x10fc9f8d0: b.le 0x10fc9f920 0x10fc9f8d4: sub x22, x8, #0x1 ; =0x1 0x10fc9f8d8: cmp x22, #0x4 ; =0x4 0x10fc9f8dc: b.hi 0x10fc9f8fc 0x10fc9f8e0: adr x8, #-0x1c -&gt; 0x10fc9f8e4: ldrb w9, [x19, x22] 0x10fc9f8e8: add x8, x8, x9, lsl #2 0x10fc9f8ec: fmov d0, #1.00000000 0x10fc9f8f0: br x8 0x10fc9f8f4: mov.16b v0, v12 0x10fc9f8f8: b 0x10fc9f8c8 0x10fc9f8fc: sub x8, x8, #0x2 ; =0x2 0x10fc9f900: scvtf d1, x8 0x10fc9f904: mov.16b v0, v8 0x10fc9f908: blr x20 0x10fc9f90c: b 0x10fc9f8c8 0x10fc9f910: mov.16b v0, v10 0x10fc9f914: b 0x10fc9f8c8 0x10fc9f918: mov.16b v0, v11 0x10fc9f91c: b 0x10fc9f8c8 0x10fc9f920: mov x19, #0x0 0x10fc9f924: sub x21, x22, #0x1 ; =0x1"><pre class="notranslate"><code class="notranslate"> 0x10fc9f878: stp d13, d12, [sp, #-0x70]! 0x10fc9f87c: stp d11, d10, [sp, #0x10] 0x10fc9f880: stp d9, d8, [sp, #0x20] 0x10fc9f884: stp x24, x23, [sp, #0x30] 0x10fc9f888: stp x22, x21, [sp, #0x40] 0x10fc9f88c: stp x20, x19, [sp, #0x50] 0x10fc9f890: stp x29, x30, [sp, #0x60] 0x10fc9f894: mov.16b v8, v1 0x10fc9f898: mov.16b v9, v0 0x10fc9f89c: fmul d10, d1, d1 0x10fc9f8a0: fmul d11, d10, d1 0x10fc9f8a4: fmov d0, #1.00000000 0x10fc9f8a8: mov w8, #0x3 0x10fc9f8ac: adrp x20, 0 0x10fc9f8b0: ldr x20, [x20, #0xa80] 0x10fc9f8b4: adrp x19, -137149 0x10fc9f8b8: add x19, x19, #0x410 ; =0x410 0x10fc9f8bc: fdiv d12, d0, d1 0x10fc9f8c0: b 0x10fc9f8d4 0x10fc9f8c4: mov.16b v0, v8 0x10fc9f8c8: fcmp d0, d9 0x10fc9f8cc: mov x8, x22 0x10fc9f8d0: b.le 0x10fc9f920 0x10fc9f8d4: sub x22, x8, #0x1 ; =0x1 0x10fc9f8d8: cmp x22, #0x4 ; =0x4 0x10fc9f8dc: b.hi 0x10fc9f8fc 0x10fc9f8e0: adr x8, #-0x1c -&gt; 0x10fc9f8e4: ldrb w9, [x19, x22] 0x10fc9f8e8: add x8, x8, x9, lsl #2 0x10fc9f8ec: fmov d0, #1.00000000 0x10fc9f8f0: br x8 0x10fc9f8f4: mov.16b v0, v12 0x10fc9f8f8: b 0x10fc9f8c8 0x10fc9f8fc: sub x8, x8, #0x2 ; =0x2 0x10fc9f900: scvtf d1, x8 0x10fc9f904: mov.16b v0, v8 0x10fc9f908: blr x20 0x10fc9f90c: b 0x10fc9f8c8 0x10fc9f910: mov.16b v0, v10 0x10fc9f914: b 0x10fc9f8c8 0x10fc9f918: mov.16b v0, v11 0x10fc9f91c: b 0x10fc9f8c8 0x10fc9f920: mov x19, #0x0 0x10fc9f924: sub x21, x22, #0x1 ; =0x1 </code></pre></div> <p dir="auto">I can see the calculation of <code class="notranslate">x19</code> seems to be as instructed (the <code class="notranslate">-137149</code> below is the argument to the <code class="notranslate">adrp</code> instruction). The <code class="notranslate">adrp</code> instruction masks the bottom 11 bits of the PC and adds its operand shifted left 12 bits.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(lldb) reg read x19 x19 = 0x00000000ee4e2410 (lldb) p/x (0x000000010fc9f8e4 &amp; ~0xfff) + 0x1000*(-137149) + 0x410 (long) $9 = 0x00000000ee4e2410 "><pre class="notranslate"><code class="notranslate">(lldb) reg read x19 x19 = 0x00000000ee4e2410 (lldb) p/x (0x000000010fc9f8e4 &amp; ~0xfff) + 0x1000*(-137149) + 0x410 (long) $9 = 0x00000000ee4e2410 </code></pre></div> <p dir="auto">And <code class="notranslate">x22</code> is <code class="notranslate">2</code>. But <code class="notranslate">-137149 * 4096</code> seems like a strangely large offset! It's well outside the current code segment:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(lldb) reg read pc pc = 0x000000010fc9f8e4 (lldb) mem region 0x000000010fc9f8e4 [0x000000010f99c000-0x000000010fd9c000) r-x"><pre class="notranslate"><code class="notranslate">(lldb) reg read pc pc = 0x000000010fc9f8e4 (lldb) mem region 0x000000010fc9f8e4 [0x000000010f99c000-0x000000010fd9c000) r-x </code></pre></div> <p dir="auto">Thus, I suspect an error in ARM code generation for fetching PC-relative data.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" From worker 6: From worker 6: signal (11): Segmentation fault: 11 From worker 6: in expression starting at /Users/keno/julia/usr/share/julia/stdlib/v1.8/LinearAlgebra/test/svd.jl:68 From worker 6: ntuple at ./ntuple.jl:0 From worker 6: unknown function (ip: 0x115d6f2f3) From worker 6: _jl_invoke at /Users/keno/julia/src/gf.c:0 [inlined] From worker 6: jl_apply_generic at /Users/keno/julia/src/gf.c:2427 From worker 6: getindex at ./range.jl:373 From worker 6: _hvcat_rows at /Users/keno/julia/usr/share/julia/stdlib/v1.8/SparseArrays/src/sparsevector.jl:1114 From worker 6: _jl_invoke at /Users/keno/julia/src/gf.c:0 [inlined] From worker 6: jl_apply_generic at /Users/keno/julia/src/gf.c:2427"><pre class="notranslate"><code class="notranslate"> From worker 6: From worker 6: signal (11): Segmentation fault: 11 From worker 6: in expression starting at /Users/keno/julia/usr/share/julia/stdlib/v1.8/LinearAlgebra/test/svd.jl:68 From worker 6: ntuple at ./ntuple.jl:0 From worker 6: unknown function (ip: 0x115d6f2f3) From worker 6: _jl_invoke at /Users/keno/julia/src/gf.c:0 [inlined] From worker 6: jl_apply_generic at /Users/keno/julia/src/gf.c:2427 From worker 6: getindex at ./range.jl:373 From worker 6: _hvcat_rows at /Users/keno/julia/usr/share/julia/stdlib/v1.8/SparseArrays/src/sparsevector.jl:1114 From worker 6: _jl_invoke at /Users/keno/julia/src/gf.c:0 [inlined] From worker 6: jl_apply_generic at /Users/keno/julia/src/gf.c:2427 </code></pre></div>
1
<p dir="auto"><strong>Current behavior:</strong></p> <ul dir="auto"> <li>Switch to "latest" version of docs</li> <li>click on the <code class="notranslate">docs</code> link at the top of the page (for example, to switch between the <code class="notranslate">manual</code> and <code class="notranslate">standard library</code> docs</li> <li>The docs pages revert back to <code class="notranslate">1.0</code></li> </ul> <p dir="auto"><strong>Expected behavior:</strong></p> <ul dir="auto"> <li>Once the docs are switched to <code class="notranslate">latest</code>, all links should only refer to <code class="notranslate">latest</code> . And vice-versa</li> <li>All pages to show somewhere which version of the documentation is being viewed. Currently it is only seen in the URL</li> </ul>
<p dir="auto">Is there a better way to show the <code class="notranslate">latest</code> and <code class="notranslate">release-0.1</code> versions of the manual? People cannot guess that the readthedocs icon at the bottom is a clickable drawer that is closed by default. The interface is not easy to use - one frequently has to try a couple of times.</p> <p dir="auto">Is there a way to make it so that the default behaviour is that the drawer is open instead of closed, so that the different versions of the manual are all visible when one visits docs.julialang.org?</p>
1
<p dir="auto">Description of what I'm doing:</p> <p dir="auto">I'm porting the hello world app on the Quick Start page to Clojurescript</p> <p dir="auto"><a href="https://github.com/atom/atom-shell/blob/master/docs/tutorial/quick-start.md">https://github.com/atom/atom-shell/blob/master/docs/tutorial/quick-start.md</a></p> <p dir="auto">Here is my port of main.js to Clojurescript:</p> <p dir="auto"><a href="https://gist.github.com/frankhale/8fe873601fb4212cdc87">https://gist.github.com/frankhale/8fe873601fb4212cdc87</a></p> <p dir="auto">I have the requisite files in my project and it works fine using the provided main.js. When I use my Clojurescript compiled main.js atom-shell tells me my app is not valid. The project structure is exactly as it should be and all I'm replacing is the Javascript version of main.js with a Clojurescript compiled main.js from my translation of the Javascript.</p> <p dir="auto">Question for atom-shell developers:</p> <p dir="auto">Is there a way to debug what is going on when atom-shell tries to start my application? I'm running atom.exe and dragging my app folder into the window. I've opened the dev tools but no errors are reported. All I get is a message saying that my app is not valid.</p> <p dir="auto">Question for somebody that may be able to help debug the Clojurescript:</p> <p dir="auto">If anyone knows Clojurescript would you mind taking a look at my Gist to see if I've made any crazy mistakes? I've been trying to get this working for several hours. The code looks straightforward enough and doesn't look like it should be a problem porting.</p> <p dir="auto">Here is a repo of my project for those that may want to have a look:</p> <p dir="auto"><a href="https://github.com/frankhale/hello-atom-shell">https://github.com/frankhale/hello-atom-shell</a></p>
<p dir="auto">Even when launching from the command line, any JS error occuring in main.js is internally trapped, preventing debugging. Instead, you get the following:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/231157/2947232/fc3162d0-d9f3-11e3-9b8c-a5f22460e757.png"><img src="https://cloud.githubusercontent.com/assets/231157/2947232/fc3162d0-d9f3-11e3-9b8c-a5f22460e757.png" alt="screenshot 2014-05-12 09 38 03" style="max-width: 100%;"></a></p> <p dir="auto">The error is not reported in the console.</p>
1
<p dir="auto">Unlike Python2, Python3's (builtin) round function is documented to return an integer when called with a single argument. However, numpy float dtypes do not satisfy this, returning a float instead.</p>
<p dir="auto"><code class="notranslate">round(x)</code> (i.e. <code class="notranslate">object.__round__(self)</code>) is expected to return an <code class="notranslate">int</code>, but for numpy floats, it returns a numpy float.</p>
1
<p dir="auto">hello! i have the problem when i use the node module "create vite@latest" on Windows OS, with deno it asks me for certain permissions and when i start in the command terminal it does not allow me to select the correct tool, it only stays stuck in the vanilla option, is there any way to solve this? i want to select the react option but it does not allow me, is it a problem of deno or the problem is specific to vite?</p> <p dir="auto">another detail is that to use the create vite@latest package as indicated in the official vite documentation is with a blank space between the words, why with deno you have to put a hyphen as in the following form? npm:create-vite@latest</p>
<p dir="auto">Is supporting <a href="https://vitejs.dev/" rel="nofollow">Vite</a> on Deno's radar?</p> <p dir="auto">Although many Node.js libraries already work with Deno, Vite is a whole different beast and probably needs changes on Deno's side.</p> <p dir="auto">Note that it's not only about supporting Vite, but also its entire ecosystem (<a href="https://kit.svelte.dev/" rel="nofollow">SvelteKit</a>, <a href="https://vite-plugin-ssr.com/" rel="nofollow">vite-plugin-ssr</a>, etc.).</p> <p dir="auto">FYI Bun is working on supporting Vite: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1295392392" data-permission-text="Title is private" data-url="https://github.com/oven-sh/bun/issues/250" data-hovercard-type="issue" data-hovercard-url="/oven-sh/bun/issues/250/hovercard?comment_id=1195153860&amp;comment_type=issue_comment" href="https://github.com/oven-sh/bun/issues/250#issuecomment-1195153860">oven-sh/bun#250 (comment)</a>.</p>
1
<p dir="auto">by <strong>namegduf</strong>:</p> <pre class="notranslate">What steps will reproduce the problem? 1. Copy the following into a file: package main import "fmt" func main() { wait := make(chan bool) go func() { &lt;-wait fmt.Printf("Test!") }() fmt.Println("Hello World!") } 2. Build the file with 6g file.go; 6l file.go 2. Run 6prof on the output executable What is the expected output? The program's own output, follwed by a sample count and profiling output. Absence of errors. What do you see instead? "ptrace waitpid: unexpected new tid &lt;some tid&gt; status 0x137f", followed by the program's output, followed by the program hanging. No output from 6prof. What is your $GOOS? $GOARCH? GOOS=linux GOARCH=amd64 Which revision are you using? (hg identify) 58cc2828bfd2 tip It seems to work sometimes with even an empty goroutine, but removing the channel seems to make things inconsistent.</pre>
<p dir="auto">by <strong>montsamu</strong>:</p> <pre class="notranslate">Before filing a bug, please check whether it has been fixed since the latest release: run "hg pull -u" and retry what you did to reproduce the problem. Thanks. What steps will reproduce the problem? 1. need to make an http.Get request but specify a head (e.g. "Authorization" "OAuth") 2. see that http.Get doesn't allow this 3. see how ugly it would be to write an additional stack just to do this outside http.Get (http.send is 'private') Please provide any additional information below. Apologies if there is a simple way to do this which I am missing.</pre>
0
<p dir="auto">Hi!</p> <p dir="auto">I'm (eventually) attempting to build a PostCSS/cssnext setup on top of Next.js, but somehow importing a CSS file cannot be resolved.</p> <p dir="auto">My <code class="notranslate">pages/index.js</code> file tries to import the <code class="notranslate">pages/index.css</code> file (that exists):</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import './index.css'"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'./index.css'</span></pre></div> <p dir="auto">With the Webpack config:</p> <p dir="auto"><strong>next.config.js:</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = { webpack(config) { config.module.rules.push({ test: /\.css$/, exclude: /node_modules/, loader: ['style-loader', 'css-loader'] }); return config; } };"><pre class="notranslate"><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-en">webpack</span><span class="pl-kos">(</span><span class="pl-s1">config</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">config</span><span class="pl-kos">.</span><span class="pl-c1">module</span><span class="pl-kos">.</span><span class="pl-c1">rules</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">test</span>: <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">\.</span>css<span class="pl-cce">$</span><span class="pl-c1">/</span></span><span class="pl-kos">,</span> <span class="pl-c1">exclude</span>: <span class="pl-pds"><span class="pl-c1">/</span>node_modules<span class="pl-c1">/</span></span><span class="pl-kos">,</span> <span class="pl-c1">loader</span>: <span class="pl-kos">[</span><span class="pl-s">'style-loader'</span><span class="pl-kos">,</span> <span class="pl-s">'css-loader'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-s1">config</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">results in</p> <p dir="auto"><strong>output:</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="yarn run v0.15.1 $ next &gt; Using &quot;webpack&quot; config function defined in next.config.js. DONE Compiled successfully in 3004ms &gt; Ready on http://localhost:3000 { Error: Cannot find module './index.css' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.&lt;anonymous&gt; (/Users/kpuputti/code/projects/nextlatest/pages/index.js?entry:3:1) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) code: 'MODULE_NOT_FOUND' }"><pre class="notranslate"><code class="notranslate">yarn run v0.15.1 $ next &gt; Using "webpack" config function defined in next.config.js. DONE Compiled successfully in 3004ms &gt; Ready on http://localhost:3000 { Error: Cannot find module './index.css' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.&lt;anonymous&gt; (/Users/kpuputti/code/projects/nextlatest/pages/index.js?entry:3:1) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) code: 'MODULE_NOT_FOUND' } </code></pre></div> <p dir="auto">Package versions in <code class="notranslate">package.json</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;dependencies&quot;: { &quot;css-loader&quot;: &quot;^0.26.1&quot;, &quot;next&quot;: &quot;2.0.0-beta.12&quot;, &quot;style-loader&quot;: &quot;^0.13.1&quot; }"><pre class="notranslate"><code class="notranslate"> "dependencies": { "css-loader": "^0.26.1", "next": "2.0.0-beta.12", "style-loader": "^0.13.1" } </code></pre></div> <p dir="auto">Do I need to do some extra setup to get the resolving work, or how should I approach this? Thanks!</p>
<p dir="auto">Sometimes it's nice to break out your CSS into a separate <code class="notranslate">.css</code> file. I've tried to do the following:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pages/ └── index ├── index.css ├── index.js └── component.js"><pre class="notranslate"><code class="notranslate">pages/ └── index ├── index.css ├── index.js └── component.js </code></pre></div> <p dir="auto">Then in the index.js, I've tried to do:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import css from './index.css'"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">css</span> <span class="pl-k">from</span> <span class="pl-s">'./index.css'</span></pre></div> <p dir="auto">And in next.config.js:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = { webpack: function (config) { config.module.loaders = (config.module.loaders || []).concat({ test: /\.css$/, loader: 'raw' }) return config } }"><pre class="notranslate"><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-en">webpack</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">config</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">config</span><span class="pl-kos">.</span><span class="pl-c1">module</span><span class="pl-kos">.</span><span class="pl-c1">loaders</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">config</span><span class="pl-kos">.</span><span class="pl-c1">module</span><span class="pl-kos">.</span><span class="pl-c1">loaders</span> <span class="pl-c1">||</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">concat</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">test</span>: <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">\.</span>css<span class="pl-cce">$</span><span class="pl-c1">/</span></span><span class="pl-kos">,</span> <span class="pl-c1">loader</span>: <span class="pl-s">'raw'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-k">return</span> <span class="pl-s1">config</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">But unfortunately, it keeps giving me:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" ERROR Failed to compile with 1 errors This dependency was not found in node_modules: * ./index.css"><pre class="notranslate"><code class="notranslate"> ERROR Failed to compile with 1 errors This dependency was not found in node_modules: * ./index.css </code></pre></div> <p dir="auto">Seems like it's not resolving to the right place for some reason, the local <code class="notranslate">component.js</code> works though via <code class="notranslate">import component from './component.js'</code>, so I'm not sure what's going on here.</p>
1
<p dir="auto"><strong>Apache Airflow version</strong>: 2.0.1</p> <p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>):</p> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li> <p dir="auto"><strong>Cloud provider or hardware configuration</strong>: Dell Latitude</p> </li> <li> <p dir="auto"><strong>OS</strong> (e.g. from /etc/os-release): Ubuntu 20.04.2 LTS</p> </li> <li> <p dir="auto"><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): 5.8.0-48-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="89720033" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/54" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/54/hovercard" href="https://github.com/apache/airflow/pull/54">#54</a>~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux</p> </li> <li> <p dir="auto"><strong>Install tools</strong>: python 3.8.5</p> </li> <li> <p dir="auto"><strong>Others</strong>: local development</p> </li> </ul> <p dir="auto"><strong>What happened</strong>: When I click delete button (on UI admin panel) for the DAG, admin panel crashed</p> <p dir="auto">Traceback (most recent call last):<br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app<br> response = self.full_dispatch_request()<br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request<br> rv = self.handle_user_exception(e)<br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception<br> reraise(exc_type, exc_value, tb)<br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise<br> raise value<br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request<br> rv = self.dispatch_request()<br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request<br> return self.view_functions<a href="**req.view_args">rule.endpoint</a><br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/airflow/www/auth.py", line 34, in decorated<br> return func(*args, **kwargs)<br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/airflow/www/decorators.py", line 60, in wrapper<br> return f(*args, **kwargs)<br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/airflow/www/views.py", line 1393, in delete<br> delete_dag.delete_dag(dag_id)<br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/airflow/utils/session.py", line 65, in wrapper<br> return func(*args, session=session, **kwargs)<br> File "/home/krzysztofwrobel/.local/lib/python3.8/site-packages/airflow/api/common/experimental/delete_dag.py", line 54, in delete_dag<br> for model in models.base.Base._decl_class_registry.values(): # noqa pylint: disable=protected-access<br> AttributeError: type object 'Base' has no attribute '_decl_class_registry</p> <p dir="auto"><strong>What you expected to happen</strong>: Delete DAG</p> <p dir="auto"><strong>How to reproduce it</strong>: Try to delete dag in admin panel</p> <p dir="auto"><strong>Anything else we need to know</strong>:</p>
<h3 dir="auto">Body</h3> <p dir="auto">I have a kind request for all the contributors to the latest provider packages release.<br> Could you please help us to test the RC versions of the providers?</p> <p dir="auto">Let us know in the comment, whether the issue is addressed.</p> <p dir="auto">Those are providers that require testing as there were some substantial changes introduced:</p> <h2 dir="auto">Provider <a href="https://pypi.org/project/apache-airflow-providers-amazon/8.0.0rc3" rel="nofollow">amazon: 8.0.0rc3</a></h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/30748" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30748/hovercard">Remove deprecated "delegate_to" from GCP operators and hooks (#30748)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/shahar1/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/shahar1">@shahar1</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/30755" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30755/hovercard">take advantage of upcoming major version release to remove deprecated things (#30755)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vandonr-amz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vandonr-amz">@vandonr-amz</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/30720" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30720/hovercard">add a stop operator to emr serverless (#30720)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vandonr-amz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vandonr-amz">@vandonr-amz</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/30460" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30460/hovercard">SqlToS3Operator - Add feature to partition SQL table (#30460)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/utkarsharma2/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/utkarsharma2">@utkarsharma2</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/28338" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/28338/hovercard">New AWS sensor — DynamoDBValueSensor (#28338)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mrichman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mrichman">@mrichman</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/30757" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30757/hovercard">Add a "force" option to emr serverless stop/delete operator (#30757)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vandonr-amz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vandonr-amz">@vandonr-amz</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/30032" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30032/hovercard">Add support for deferrable operators in AMPP (#30032)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/syedahsn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/syedahsn">@syedahsn</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/30703" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30703/hovercard">Fixed logging issue in <code class="notranslate">DynamoDBValueSensor</code> (#30703)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mrichman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mrichman">@mrichman</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/30595" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30595/hovercard">DynamoDBHook - waiter_path() to consider <code class="notranslate">resource_type</code> or <code class="notranslate">client_type</code> (#30595)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/utkarsharma2/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/utkarsharma2">@utkarsharma2</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/30586" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30586/hovercard">Add ability to override waiter delay in EcsRunTaskOperator (#30586)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vincbeck/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vincbeck">@vincbeck</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/29522" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/29522/hovercard">Add support in AWS Batch Operator for multinode jobs (#29522)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vandonr-amz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vandonr-amz">@vandonr-amz</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/30756" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30756/hovercard">AWS logs. Exit fast when 3 consecutive responses are returned from AWS Cloudwatch logs (#30756)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vincbeck/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vincbeck">@vincbeck</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/30868" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30868/hovercard">Fix async conn for none aws_session_token (#30868)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pankajastro/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pankajastro">@pankajastro</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/30774" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30774/hovercard">Remove @poke_mode_only from EmrStepSensor (#30774)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vincbeck/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vincbeck">@vincbeck</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/30541" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30541/hovercard">Organize Amazon provider docs index (#30541)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/eladkal/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eladkal">@eladkal</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/30634" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30634/hovercard">Remove duplicate param docstring in EksPodOperator (#30634)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jlaneve/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jlaneve">@jlaneve</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/30844" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30844/hovercard">Update AWS EMR Cluster Link to use the new dashboard (#30844)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dakshin-k/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dakshin-k">@dakshin-k</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/30874" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/30874/hovercard">Restore aiobotocore as optional dependency of amazon provider (#30874)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/potiuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/potiuk">@potiuk</a></li> </ul> <p dir="auto">The guidelines on how to test providers can be found in</p> <p dir="auto"><a href="https://github.com/apache/airflow/blob/main/dev/README_RELEASE_PROVIDER_PACKAGES.md#verify-by-contributors">Verify providers by contributors</a></p> <p dir="auto">I have marked issues that were <a href="https://github.com/apache/airflow/issues/30849" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/30849/hovercard">tested in RC2</a> as completed.</p> <p dir="auto">All users involved in the PRs:<br> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vincbeck/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vincbeck">@vincbeck</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/utkarsharma2/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/utkarsharma2">@utkarsharma2</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/syedahsn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/syedahsn">@syedahsn</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mrichman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mrichman">@mrichman</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/shahar1/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/shahar1">@shahar1</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vandonr-amz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vandonr-amz">@vandonr-amz</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/eladkal/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eladkal">@eladkal</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/potiuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/potiuk">@potiuk</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jlaneve/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jlaneve">@jlaneve</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pankajastro/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pankajastro">@pankajastro</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dakshin-k/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dakshin-k">@dakshin-k</a></p> <h3 dir="auto">Committer</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I acknowledge that I am a maintainer/committer of the Apache Airflow project.</li> </ul>
0
<p dir="auto">I wanted to use this <code class="notranslate">--autoreload</code> option. But just after I add it I have:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery -A proj status Error: No nodes replied within time constraint."><pre class="notranslate"><code class="notranslate">celery -A proj status Error: No nodes replied within time constraint. </code></pre></div> <p dir="auto">Before that:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery -A proj status celery@hostname: OK 1 node online."><pre class="notranslate"><code class="notranslate">celery -A proj status celery@hostname: OK 1 node online. </code></pre></div> <p dir="auto">So now when I call <code class="notranslate">celery call tasks.taskname</code> RabbitMQ recieves this message (I can see this). But will only execute it when I restart Celery without <code class="notranslate">--autoreload</code></p> <p dir="auto">Celery is started as <code class="notranslate">celery -A proj worker --loglevel=INFO --autoreload</code>. Used inside a Django 1.7 project.</p> <p dir="auto">PS: worker.log has absolutely the same log when I run the command - tasks are discovered, and this message is printed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2014-09-10 18:46:27,230: WARNING/MainProcess] celery@hostname ready."><pre class="notranslate"><code class="notranslate">[2014-09-10 18:46:27,230: WARNING/MainProcess] celery@hostname ready. </code></pre></div> <p dir="auto">But no messages are delivered to this worker from RabbitMQ in case of <code class="notranslate">--autoreload</code>.</p>
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>: 4.4.7 / 5.1.0<br> <strong>Django version</strong>: 3.1.11<br> <strong>Redis version</strong>: 3.2.12</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:5.1.0 (sun-harmonics) kombu:5.1.0 py:3.9.0 billiard:3.6.4.0 redis:3.5.3 platform -&gt; system:Linux arch:64bit, ELF kernel version:3.10.0-1160.6.1.el7.x86_64 imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:redis results:disabled"><pre class="notranslate"><code class="notranslate">software -&gt; celery:5.1.0 (sun-harmonics) kombu:5.1.0 py:3.9.0 billiard:3.6.4.0 redis:3.5.3 platform -&gt; system:Linux arch:64bit, ELF kernel version:3.10.0-1160.6.1.el7.x86_64 imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:redis results:disabled </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: N/A or Unknown</li> <li><strong>Minimal Celery Version</strong>: N/A or Unknown</li> <li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li> <li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">When i try to run many tasks (some of the tasks will make a grpc call), the main worker died cause by the segmentation fault after a few minutes.</p> <p dir="auto">these is some trace log print by <code class="notranslate">strace -e trace=signal,process,file,network</code>, it seems always be killed after recvfrom call.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="recvfrom(28, 0x312e050, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) recvfrom(21, &quot;*-1\r\n&quot;, 65536, 0, NULL, NULL) = 5 sendto(21, &quot;*6\r\n$5\r\nBRPOP\r\n$6\r\ncelery\r\n$9\r\nc&quot;..., 79, 0, NULL, 0) = 79 open(&quot;/proc/loadavg&quot;, O_RDONLY) = 40 recvfrom(30, 0x31316a0, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) sendto(30, &quot;*3\r\n$7\r\nPUBLISH\r\n$29\r\n/14.celery&quot;..., 827, 0, NULL, 0) = 827 recvfrom(30, &quot;:2\r\n&quot;, 65536, 0, NULL, NULL) = 4 recvfrom(28, &quot;*4\r\n$8\r\npmessage\r\n$21\r\n/14.celer&quot;..., 65536, 0, NULL, NULL) = 856 recvfrom(28, 0x312e050, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) +++ killed by SIGSEGV +++"><pre class="notranslate"><code class="notranslate">recvfrom(28, 0x312e050, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) recvfrom(21, "*-1\r\n", 65536, 0, NULL, NULL) = 5 sendto(21, "*6\r\n$5\r\nBRPOP\r\n$6\r\ncelery\r\n$9\r\nc"..., 79, 0, NULL, 0) = 79 open("/proc/loadavg", O_RDONLY) = 40 recvfrom(30, 0x31316a0, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) sendto(30, "*3\r\n$7\r\nPUBLISH\r\n$29\r\n/14.celery"..., 827, 0, NULL, 0) = 827 recvfrom(30, ":2\r\n", 65536, 0, NULL, NULL) = 4 recvfrom(28, "*4\r\n$8\r\npmessage\r\n$21\r\n/14.celer"..., 65536, 0, NULL, NULL) = 856 recvfrom(28, 0x312e050, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) +++ killed by SIGSEGV +++ </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="recvfrom(31, &quot;*4\r\n$8\r\npmessage\r\n$21\r\n/14.celer&quot;..., 65536, 0, NULL, NULL) = 856 recvfrom(31, 0x2359040, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) recvfrom(21, &quot;*-1\r\n&quot;, 65536, 0, NULL, NULL) = 5 sendto(21, &quot;*6\r\n$5\r\nBRPOP\r\n$6\r\ncelery\r\n$9\r\nc&quot;..., 79, 0, NULL, 0) = 79 recvfrom(21, &quot;*-1\r\n&quot;, 65536, 0, NULL, NULL) = 5 sendto(21, &quot;*6\r\n$5\r\nBRPOP\r\n$6\r\ncelery\r\n$9\r\nc&quot;..., 79, 0, NULL, 0) = 79 open(&quot;/proc/loadavg&quot;, O_RDONLY) = 40 recvfrom(30, 0x2359040, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) sendto(30, &quot;*3\r\n$7\r\nPUBLISH\r\n$29\r\n/14.celery&quot;..., 827, 0, NULL, 0) = 827 recvfrom(30, &quot;:1\r\n&quot;, 65536, 0, NULL, NULL) = 4 recvfrom(31, &quot;*4\r\n$8\r\npmessage\r\n$21\r\n/14.celer&quot;..., 65536, 0, NULL, NULL) = 856 recvfrom(31, 0x2359040, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) +++ killed by SIGSEGV +++"><pre class="notranslate"><code class="notranslate">recvfrom(31, "*4\r\n$8\r\npmessage\r\n$21\r\n/14.celer"..., 65536, 0, NULL, NULL) = 856 recvfrom(31, 0x2359040, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) recvfrom(21, "*-1\r\n", 65536, 0, NULL, NULL) = 5 sendto(21, "*6\r\n$5\r\nBRPOP\r\n$6\r\ncelery\r\n$9\r\nc"..., 79, 0, NULL, 0) = 79 recvfrom(21, "*-1\r\n", 65536, 0, NULL, NULL) = 5 sendto(21, "*6\r\n$5\r\nBRPOP\r\n$6\r\ncelery\r\n$9\r\nc"..., 79, 0, NULL, 0) = 79 open("/proc/loadavg", O_RDONLY) = 40 recvfrom(30, 0x2359040, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) sendto(30, "*3\r\n$7\r\nPUBLISH\r\n$29\r\n/14.celery"..., 827, 0, NULL, 0) = 827 recvfrom(30, ":1\r\n", 65536, 0, NULL, NULL) = 4 recvfrom(31, "*4\r\n$8\r\npmessage\r\n$21\r\n/14.celer"..., 65536, 0, NULL, NULL) = 856 recvfrom(31, 0x2359040, 65536, 0, NULL, NULL) = -1 EAGAIN (Resources are temporarily unavailable) +++ killed by SIGSEGV +++ </code></pre></div> <p dir="auto">These outputted by the Python's faulthandler</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Fatal Python error: Segmentation fault Thread 0x00007fc6a0680740 (most recent call first): File &quot;/srv/www/venv/lib/python3.9/site-packages/kombu/utils/eventio.py&quot;, line 82 in poll File &quot;/srv/www/venv/lib/python3.9/site-packages/kombu/asynchronous/hub.py&quot;, line 305 in create_loop File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/worker/loops.py&quot;, line 81 in asynloop File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/worker/consumer/consumer.py&quot;, line 618 in start File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/bootsteps.py&quot;, line 116 in start File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/worker/consumer/consumer.py&quot;, line 326 in start File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/bootsteps.py&quot;, line 365 in start File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/bootsteps.py&quot;, line 116 in start File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/worker/worker.py&quot;, line 203 in start File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/bin/worker.py&quot;, line 346 in worker File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/bin/base.py&quot;, line 132 in caller File &quot;/srv/www/venv/lib/python3.9/site-packages/click/decorators.py&quot;, line 21 in new_func File &quot;/srv/www/venv/lib/python3.9/site-packages/click/core.py&quot;, line 610 in invoke File &quot;/srv/www/venv/lib/python3.9/site-packages/click/core.py&quot;, line 1066 in invoke File &quot;/srv/www/venv/lib/python3.9/site-packages/click/core.py&quot;, line 1259 in invoke File &quot;/srv/www/venv/lib/python3.9/site-packages/click/core.py&quot;, line 782 in main File &quot;/srv/www/venv/lib/python3.9/site-packages/click/core.py&quot;, line 829 in __call__ File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/bin/celery.py&quot;, line 213 in main File &quot;/srv/www/venv/lib/python3.9/site-packages/celery/__main__.py&quot;, line 15 in main File &quot;/srv/www/venv/bin/celery&quot;, line 8 in &lt;module&gt; "><pre class="notranslate"><code class="notranslate">Fatal Python error: Segmentation fault Thread 0x00007fc6a0680740 (most recent call first): File "/srv/www/venv/lib/python3.9/site-packages/kombu/utils/eventio.py", line 82 in poll File "/srv/www/venv/lib/python3.9/site-packages/kombu/asynchronous/hub.py", line 305 in create_loop File "/srv/www/venv/lib/python3.9/site-packages/celery/worker/loops.py", line 81 in asynloop File "/srv/www/venv/lib/python3.9/site-packages/celery/worker/consumer/consumer.py", line 618 in start File "/srv/www/venv/lib/python3.9/site-packages/celery/bootsteps.py", line 116 in start File "/srv/www/venv/lib/python3.9/site-packages/celery/worker/consumer/consumer.py", line 326 in start File "/srv/www/venv/lib/python3.9/site-packages/celery/bootsteps.py", line 365 in start File "/srv/www/venv/lib/python3.9/site-packages/celery/bootsteps.py", line 116 in start File "/srv/www/venv/lib/python3.9/site-packages/celery/worker/worker.py", line 203 in start File "/srv/www/venv/lib/python3.9/site-packages/celery/bin/worker.py", line 346 in worker File "/srv/www/venv/lib/python3.9/site-packages/celery/bin/base.py", line 132 in caller File "/srv/www/venv/lib/python3.9/site-packages/click/decorators.py", line 21 in new_func File "/srv/www/venv/lib/python3.9/site-packages/click/core.py", line 610 in invoke File "/srv/www/venv/lib/python3.9/site-packages/click/core.py", line 1066 in invoke File "/srv/www/venv/lib/python3.9/site-packages/click/core.py", line 1259 in invoke File "/srv/www/venv/lib/python3.9/site-packages/click/core.py", line 782 in main File "/srv/www/venv/lib/python3.9/site-packages/click/core.py", line 829 in __call__ File "/srv/www/venv/lib/python3.9/site-packages/celery/bin/celery.py", line 213 in main File "/srv/www/venv/lib/python3.9/site-packages/celery/__main__.py", line 15 in main File "/srv/www/venv/bin/celery", line 8 in &lt;module&gt; </code></pre></div>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <p dir="auto">As expected:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd all_cols = list(&quot;abcdefg&quot;) informative_cols = [&quot;a&quot;,&quot;c&quot;,&quot;g&quot;] dfrandom = pd.DataFrame(pd.np.random.rand(5, len(all_cols)), columns=all_cols) field = informative_cols[0] print(field) print(type(dfrandom[field])) print(type(dfrandom[informative_cols][field]))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-s1">all_cols</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s">"abcdefg"</span>) <span class="pl-s1">informative_cols</span> <span class="pl-c1">=</span> [<span class="pl-s">"a"</span>,<span class="pl-s">"c"</span>,<span class="pl-s">"g"</span>] <span class="pl-s1">dfrandom</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">pd</span>.<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">5</span>, <span class="pl-en">len</span>(<span class="pl-s1">all_cols</span>)), <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">all_cols</span>) <span class="pl-s1">field</span> <span class="pl-c1">=</span> <span class="pl-s1">informative_cols</span>[<span class="pl-c1">0</span>] <span class="pl-en">print</span>(<span class="pl-s1">field</span>) <span class="pl-en">print</span>(<span class="pl-en">type</span>(<span class="pl-s1">dfrandom</span>[<span class="pl-s1">field</span>])) <span class="pl-en">print</span>(<span class="pl-en">type</span>(<span class="pl-s1">dfrandom</span>[<span class="pl-s1">informative_cols</span>][<span class="pl-s1">field</span>]))</pre></div> <p dir="auto">returns:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a &lt;class 'pandas.core.series.Series'&gt; &lt;class 'pandas.core.series.Series'&gt;"><pre class="notranslate"><code class="notranslate">a &lt;class 'pandas.core.series.Series'&gt; &lt;class 'pandas.core.series.Series'&gt; </code></pre></div> <p dir="auto">However, unexpectedly:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd all_cols = list(&quot;abcdefg&quot;) informative_cols = [&quot;a&quot;,&quot;c&quot;,&quot;g&quot;] dfrandom = pd.DataFrame(pd.np.random.rand(5, len(all_cols)), columns=all_cols) field = informative_cols[0] print(field) print(type(dfrandom[field])) print(type(dfrandom[informative_cols][field]))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-s1">all_cols</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s">"abcdefg"</span>) <span class="pl-s1">informative_cols</span> <span class="pl-c1">=</span> [<span class="pl-s">"a"</span>,<span class="pl-s">"c"</span>,<span class="pl-s">"g"</span>] <span class="pl-s1">dfrandom</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">pd</span>.<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">5</span>, <span class="pl-en">len</span>(<span class="pl-s1">all_cols</span>)), <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">all_cols</span>) <span class="pl-s1">field</span> <span class="pl-c1">=</span> <span class="pl-s1">informative_cols</span>[<span class="pl-c1">0</span>] <span class="pl-en">print</span>(<span class="pl-s1">field</span>) <span class="pl-en">print</span>(<span class="pl-en">type</span>(<span class="pl-s1">dfrandom</span>[<span class="pl-s1">field</span>])) <span class="pl-en">print</span>(<span class="pl-en">type</span>(<span class="pl-s1">dfrandom</span>[<span class="pl-s1">informative_cols</span>][<span class="pl-s1">field</span>]))</pre></div> <p dir="auto">returns:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0_AnatomicRegionSequence_CodeMeaning &lt;class 'pandas.core.series.Series'&gt; &lt;class 'pandas.core.frame.DataFrame'&gt;"><pre class="notranslate"><code class="notranslate">0_AnatomicRegionSequence_CodeMeaning &lt;class 'pandas.core.series.Series'&gt; &lt;class 'pandas.core.frame.DataFrame'&gt; </code></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">Subsetting one single column with a string must output the same result independent of copying and previous subsetting.<br> Because expected output is consistent and unexpected is inconsistent</p> <h4 dir="auto">Expected Output</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0_AnatomicRegionSequence_CodeMeaning &lt;class 'pandas.core.series.Series'&gt; &lt;class 'pandas.core.series.Series'&gt;"><pre class="notranslate"><code class="notranslate">0_AnatomicRegionSequence_CodeMeaning &lt;class 'pandas.core.series.Series'&gt; &lt;class 'pandas.core.series.Series'&gt; </code></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> INSTALLED VERSIONS ------------------ commit: None python: 3.6.1.final.0 python-bits: 64 OS: Linux OS-release: 4.2.0-42-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 <p dir="auto">pandas: 0.20.2<br> pytest: None<br> pip: 9.0.1<br> setuptools: 36.0.1<br> Cython: None<br> numpy: 1.13.0<br> scipy: 0.19.0<br> xarray: None<br> IPython: 6.1.0<br> sphinx: None<br> patsy: 0.4.1<br> dateutil: 2.6.0<br> pytz: 2017.2<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> feather: None<br> matplotlib: 2.0.2<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: 0.999999999<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.9.6<br> s3fs: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
<h2 dir="auto">In [6]: DataFrame.from_records( [(1,2,3)], columns=['a','b','a'])</h2> <p dir="auto">IndexError Traceback (most recent call last)<br> /home/adam/bin/jtds/ in ()<br> ----&gt; 1 DataFrame.from_records( [(1,2,3)], columns=['a','b','a'])</p> <p dir="auto">/home/adam/code/pandas/pandas/core/frame.pyc in from_records(cls, data, index, exclude, columns, names, coerce_float)<br> 760 result_index = np.arange(len(data))<br> 761<br> --&gt; 762 return cls(sdict, index=result_index, columns=columns)<br> 763<br> 764 def to_records(self, index=True):</p> <p dir="auto">/home/adam/code/pandas/pandas/core/frame.pyc in <strong>init</strong>(self, data, index, columns, dtype, copy)<br> 301 mgr = self._init_mgr(data, index, columns, dtype=dtype, copy=copy)<br> 302 elif isinstance(data, dict):<br> --&gt; 303 mgr = self._init_dict(data, index, columns, dtype=dtype)<br> 304 elif isinstance(data, ma.MaskedArray):<br> 305 mask = ma.getmaskarray(data)</p> <p dir="auto">/home/adam/code/pandas/pandas/core/frame.pyc in _init_dict(self, data, index, columns, dtype)<br> 391<br> 392 # segregates dtypes and forms blocks matching to columns</p> <p dir="auto">--&gt; 393 blocks = form_blocks(homogenized, axes)<br> 394<br> 395 # consolidate for now</p> <p dir="auto">/home/adam/code/pandas/pandas/core/internals.pyc in form_blocks(data, axes)<br> 1125<br> 1126 if len(int_dict):<br> -&gt; 1127 int_block = _simple_blockify(int_dict, items, np.int64)<br> 1128 blocks.append(int_block)<br> 1129</p> <p dir="auto">/home/adam/code/pandas/pandas/core/internals.pyc in _simple_blockify(dct, ref_items, dtype)<br> 1154<br> 1155 def _simple_blockify(dct, ref_items, dtype):<br> -&gt; 1156 block_items, values = _stack_dict(dct, ref_items, dtype)<br> 1157 # CHECK DTYPE?</p> <p dir="auto">1158 if values.dtype != dtype: # pragma: no cover</p> <p dir="auto">/home/adam/code/pandas/pandas/core/internals.pyc in _stack_dict(dct, ref_items, dtype)<br> 1187 stacked = np.empty(shape, dtype=dtype)<br> 1188 for i, item in enumerate(items):<br> -&gt; 1189 stacked[i] = _asarray_compat(dct[item])<br> 1190<br> 1191 # stacked = np.vstack([_asarray_compat(dct[k]) for k in items])</p> <p dir="auto">IndexError: index out of bounds</p>
0
<p dir="auto">是否增加eureka注册中心的支持<br> how do supported eureka as service discovery?</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/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.5.9~2.5.10</li> <li>Operating System version: any</li> <li>Java version: any</li> </ul> <h3 dir="auto">Step to reproduce this issue</h3> <p dir="auto">response with attachments is a new feature in release 2.6.3.</p> <p dir="auto">but its compatible versions are set to ![2.0.10 ~ 2.6.2] while the "ProtocolVersion" had bean changed to 2.0.1 (implementation version) and 2.0.0 (specification version).</p> <p dir="auto">the priority of "implementation version" is greater than other in Version.getVersion.</p> <p dir="auto">this will cause dubbo rpc request failing from &gt;2.5.9 to 2.6.3.</p> <p dir="auto">So is that a good idea to upgrade the lowest protocol version of attachment-feature to 2.0.2?</p> <p dir="auto">it's a big problem</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">compatible</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">fail</p>
0
<h2 dir="auto">Steps to Reproduce</h2> <ol dir="auto"> <li>Run the following app: <a href="https://gist.github.com/tvolkert/1458377c6d4bfb582e14bb284083c1b2">https://gist.github.com/tvolkert/1458377c6d4bfb582e14bb284083c1b2</a></li> <li>In the drawer, select "Show Breakage" to set the <code class="notranslate">Material.debugEnablePhysicalModel</code> value to <code class="notranslate">true</code>.</li> <li>Look closely at the text rendering within the tab contents</li> </ol> <h2 dir="auto">Results</h2> <p dir="auto">The rendering of the contents of the tab seem to have pixel rounding errors. See the screenshots <a href="https://cloud.githubusercontent.com/assets/15253456/24776927/e33ed5aa-1ad7-11e7-9f08-c8d168720aec.png" rel="nofollow">without raster cache checkerboard</a> and <a href="https://cloud.githubusercontent.com/assets/15253456/24776940/03295b2e-1ad8-11e7-8485-7c50bf1db682.png" rel="nofollow">with raster cache checkerboard</a>.</p> <h2 dir="auto">Analysis</h2> <p dir="auto">When you select "Checkerboard Raster Cache Images" in the drawer, the fact that the checkerboard patterns show artifacts as well indicates that this is a raster cache issue -- and that the <code class="notranslate">Material.debugEnablePhysicalModel</code> flag is merely tickling a code path into causing the raster cache to show this underlying issue.</p>
<p dir="auto">Test device: <strong>Pixel XL</strong></p> <p dir="auto">The <code class="notranslate">PageView</code> contents are rendered correctly on the initial render but once you start scrolling they become corrupted. They will remain this way even after the scrollable "settles".</p> <p dir="auto">The following are examples of text and a <code class="notranslate">Widget</code> near the edges of a <code class="notranslate">DecoratedBox</code>:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/37941/23496477/463855da-fed3-11e6-8388-576ce8d90557.png"><img width="208" alt="screen shot 2017-03-01 at 10 48 52 pm" src="https://cloud.githubusercontent.com/assets/37941/23496477/463855da-fed3-11e6-8388-576ce8d90557.png" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/37941/23496480/48415aac-fed3-11e6-9e5c-ddbe18a58d4e.png"><img width="435" alt="screen shot 2017-03-01 at 10 49 41 pm" src="https://cloud.githubusercontent.com/assets/37941/23496480/48415aac-fed3-11e6-9e5c-ddbe18a58d4e.png" style="max-width: 100%;"></a></p> <p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/abarth/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/abarth">@abarth</a> (on Gitter): "it sounds like a problem in the raster cache that once we cache the texture for the page we draw the ugly version".</p>
1
<p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p> <p dir="auto"><strong>System information</strong></p> <ul dir="auto"> <li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04 on gcloud</li> <li></li> <li>TensorFlow installed from (source or binary): not sure</li> <li>TensorFlow version: 1.13.</li> <li>Python version: 3.5</li> <li>Installed using virtualenv? pip? conda?: pip</li> <li>Bazel version (if compiling from source):</li> <li>GCC/Compiler version (if compiling from source):</li> <li>CUDA/cuDNN version: 10</li> <li>GPU model and memory: Nvidia K-80 15 GB</li> </ul> <p dir="auto"><strong>Describe the problem</strong><br> I created a gpu vm instance on google cloud and followed the steps to install tensorflow-gpu</p> <p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong></p> <h1 dir="auto">update apt-get</h1> <p dir="auto">sudo apt-get update</p> <h1 dir="auto">work as root</h1> <p dir="auto">sudo su</p> <p dir="auto">#!/bin/bash<br> echo "Checking for CUDA and installing."</p> <h1 dir="auto">Check for CUDA and try to install.</h1> <p dir="auto">if ! dpkg-query -W cuda; then<br> curl -O <a href="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb" rel="nofollow">https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb</a><br> sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb<br> sudo apt-get update<br> sudo apt-get install cuda-9-0<br> sudo nvidia-smi -pm 1<br> fi</p> <p dir="auto">Test that your GPU is sucessfully installed:</p> <h1 dir="auto">check that GPU is working</h1> <p dir="auto">nvidia-smi</p> <p dir="auto">Install your Deep Neural Network (cuDNN) binaries that you uploaded earlier (check your version):</p> <p dir="auto">sudo dpkg -i libcudnn7_7.4.2.24-1+cuda10.0_amd64.deb</p> <p dir="auto">echo 'export CUDA_HOME=/usr/local/cuda' &gt;&gt; ~/.bashrc<br> echo 'export PATH=$PATH:$CUDA_HOME/bin' &gt;&gt; ~/.bashrc<br> echo 'export LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH' &gt;&gt; ~/.bashrc<br> source ~/.bashrc</p> <h1 dir="auto">Install tensorflow</h1> <p dir="auto">sudo apt-get install python3-dev python3-pip libcupti-dev</p> <h1 dir="auto">install tensorflow-gpu</h1> <p dir="auto">sudo pip3 install tensorflow-gpu</p> <h1 dir="auto">install ipython3</h1> <p dir="auto">apt install ipython3</p> <p dir="auto"><strong>Any other info / logs</strong></p> <p dir="auto">here is my error file when i do python3 import tensorflow as tf</p> <p dir="auto">Traceback (most recent call last):<br> File "", line 1, in <br> File "/usr/local/lib/python3.5/dist-packages/tensorflow/<strong>init</strong>.py", line 24, in <br> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import<br> File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/<strong>init</strong>.py", line 49, in <br> from tensorflow.python import pywrap_tensorflow<br> File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <br> raise ImportError(msg)<br> ImportError: Traceback (most recent call last):<br> File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <br> from tensorflow.python.pywrap_tensorflow_internal import *<br> File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <br> _pywrap_tensorflow_internal = swig_import_helper()<br> File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_i<br> mport_helper<br> _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br> File "/usr/lib/python3.5/imp.py", line 242, in load_module<br> return load_dynamic(name, filename, file)<br> File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic<br> return _load(spec)<br> ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory<br> Failed to load the native TensorFlow runtime.</p>
<h3 dir="auto">System information</h3> <p dir="auto">Linux 4.9.0-kali4-686-pae <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115886302" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/1" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/1/hovercard" href="https://github.com/tensorflow/tensorflow/issues/1">#1</a> SMP Debian 4.9.25-1kali1 (2017-05-04) i686 GNU/Linux<br> TensorFlow installed from source code<br> TensorFlow version : 1.0.1<br> Bazel version : 0.4.2<br> CUDA/cuDNN version: None<br> GPU model and memory: None</p> <blockquote> <p dir="auto">== cat /etc/issue ===============================================<br> Linux 4.9.0-kali4-686-pae <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115886302" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/1" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/1/hovercard" href="https://github.com/tensorflow/tensorflow/issues/1">#1</a> SMP Debian 4.9.25-1kali1 (2017-05-04) i686 GNU/Linux<br> VERSION="2017.1"<br> VERSION_ID="2017.1"</p> <p dir="auto">== are we in docker =============================================<br> No</p> <p dir="auto">== compiler =====================================================<br> c++ (Debian 6.3.0-16) 6.3.0 20170425<br> Copyright (C) 2016 Free Software Foundation, Inc.<br> This is free software; see the source for copying conditions. There is NO<br> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p> <p dir="auto">== uname -a =====================================================<br> Linux 4.9.0-kali4-686-pae <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115886302" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/1" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/1/hovercard" href="https://github.com/tensorflow/tensorflow/issues/1">#1</a> SMP Debian 4.9.25-1kali1 (2017-05-04) i686 GNU/Linux</p> <p dir="auto">== check pips ===================================================<br> numpy (1.12.1)</p> <p dir="auto">== check for virtualenv =========================================<br> False</p> <p dir="auto">== tensorflow import ============================================<br> Traceback (most recent call last):<br> File "", line 1, in <br> File "tensorflow/<strong>init</strong>.py", line 24, in <br> from tensorflow.python import *<br> File "tensorflow/python/<strong>init</strong>.py", line 72, in <br> raise ImportError(msg)<br> ImportError: Traceback (most recent call last):<br> File "tensorflow/python/<strong>init</strong>.py", line 61, in <br> from tensorflow.python import pywrap_tensorflow<br> ImportError: cannot import name pywrap_tensorflow</p> <p dir="auto">Failed to load the native TensorFlow runtime.</p> <p dir="auto">See <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error</a></p> <p dir="auto">for some common reasons and solutions. Include the entire stack trace<br> above this error message when asking for help.</p> <p dir="auto">== env ==========================================================<br> LD_LIBRARY_PATH is unset<br> DYLD_LIBRARY_PATH is unset</p> <p dir="auto">== nvidia-smi ===================================================</p> <p dir="auto">== cuda libs ===================================================</p> </blockquote> <h3 dir="auto">Describe the problem</h3> <p dir="auto">I compiled it from source, and got this fatal error when try to import tensorflow in python3.5.3:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118] on linux Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. &gt;&gt;&gt; import tensorflow F tensorflow/core/platform/cpu_feature_guard.cc:35] The TensorFlow library was compiled to use SSE instructions, but these aren't available on your machine. Aborted"><pre class="notranslate"><code class="notranslate">Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118] on linux Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; import tensorflow F tensorflow/core/platform/cpu_feature_guard.cc:35] The TensorFlow library was compiled to use SSE instructions, but these aren't available on your machine. Aborted </code></pre></div> <p dir="auto">And here is the information of my CPU:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="....... processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 37 model name : Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz stepping : 5 microcode : 0x4 cpu MHz : 933.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 2 apicid : 5 initial apicid : 5 fdiv_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid dtherm arat bugs : bogomips : 4787.91 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual ...... "><pre class="notranslate"><code class="notranslate">....... processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 37 model name : Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz stepping : 5 microcode : 0x4 cpu MHz : 933.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 2 apicid : 5 initial apicid : 5 fdiv_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid dtherm arat bugs : bogomips : 4787.91 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual ...... </code></pre></div> <p dir="auto">that's all.</p>
0
<p dir="auto">When clicking the [src] link at the top right of the page of all of the rust docs pages, you are taken to the 'not found' page instead of being taken to the relevant source file.</p>
<p dir="auto">I don't think it is, but might be a duplicate of issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="44807156" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/17740" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/17740/hovercard" href="https://github.com/rust-lang/rust/issues/17740">#17740</a>.</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait Foo&lt;'a&gt;: 'a {} impl Foo&lt;'static&gt; for ||: 'static {} // or impl&lt;'a&gt; Foo&lt;'a&gt; for ||: 'a fn main() {}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">Foo</span><span class="pl-kos">&lt;</span><span class="pl-c1">'</span><span class="pl-ent">a</span><span class="pl-kos">&gt;</span><span class="pl-kos">:</span> <span class="pl-c1">'</span><span class="pl-ent">a</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">impl</span> <span class="pl-smi">Foo</span><span class="pl-kos">&lt;</span><span class="pl-c1">'</span><span class="pl-ent">static</span><span class="pl-kos">&gt;</span> <span class="pl-k">for</span> ||<span class="pl-kos">:</span> <span class="pl-c1">'</span><span class="pl-ent">static</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-c">// or impl&lt;'a&gt; Foo&lt;'a&gt; for ||: 'a</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> <hr> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;anon&gt;:3:1: 3:37 error: internal compiler error: cannot relate bound region: ReEarlyBound(6, TypeSpace, 0, 'a) &lt;= ReStatic &lt;anon&gt;:3 impl Foo&lt;'static&gt; for ||: 'static {} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note: the compiler hit an unexpected failure path. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace task 'rustc' failed at 'Box&lt;Any&gt;', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:116"><pre class="notranslate"><span class="pl-c1">&lt;anon&gt;:3:1: 3:37 error: internal compiler error: cannot relate bound region: ReEarlyBound(6, TypeSpace, 0, 'a) &lt;= ReStatic</span> <span class="pl-c1">&lt;anon&gt;:3 impl Foo&lt;'static&gt; for ||: 'static {}</span> <span class="pl-c1"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span> <span class="pl-c1">note: the compiler hit an unexpected failure path. this is a bug.</span> <span class="pl-c1">note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html</span> <span class="pl-c1">note: run with `RUST_BACKTRACE=1` for a backtrace</span> <span class="pl-c1">task 'rustc' failed at 'Box&lt;Any&gt;', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:116</span></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: Microsoft Windows [Version 10.0.18362.10005] Windows Terminal version: master build commit dca0ffe6dd0f76ca7997807424a2c08684e07751 Debugging mode (Debug x64) under Visual Studio 2019."><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.10005] Windows Terminal version: master build commit dca0ffe6dd0f76ca7997807424a2c08684e07751 Debugging mode (Debug x64) under Visual Studio 2019. </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ul dir="auto"> <li>Use a build from latest master commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/terminal/commit/dca0ffe6dd0f76ca7997807424a2c08684e07751/hovercard" href="https://github.com/microsoft/terminal/commit/dca0ffe6dd0f76ca7997807424a2c08684e07751"><tt>dca0ffe</tt></a>.</li> <li>Start the terminal under VS, then click on the tab down-arrow menu button.</li> <li>Observe the crash.</li> </ul> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Menu shows up (it did some time ago...)</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">A continuable exception is thrown, see the screen-capture below.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1969829/61635259-6ff4e080-ac93-11e9-827c-e595ef4ef3a9.png"><img src="https://user-images.githubusercontent.com/1969829/61635259-6ff4e080-ac93-11e9-827c-e595ef4ef3a9.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Improved stack-trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" [External Code] &gt; Microsoft.UI.Xaml.dll!winrt::throw_hresult(const winrt::hresult result) Line 4282 C++ [Inline Frame] Microsoft.UI.Xaml.dll!winrt::check_hresult(const winrt::hresult) C++ Microsoft.UI.Xaml.dll!winrt::impl::consume_Windows_System_IDispatcherQueueStatics&lt;winrt::Windows::System::IDispatcherQueueStatics&gt;::GetForCurrentThread() Line 585 C++ [Inline Frame] Microsoft.UI.Xaml.dll!winrt::Windows::UI::ViewManagement::ApplicationView::GetForCurrentView::__l2::&lt;lambda_30d95ff0d0a0221e0e76d5a8187eef0d&gt;::operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewStatics2 &amp;) C++ [Inline Frame] Microsoft.UI.Xaml.dll!winrt::impl::factory_cache_entry&lt;winrt::Windows::UI::ViewManagement::ApplicationView,winrt::Windows::UI::ViewManagement::IApplicationViewStatics2&gt;::call(winrt::Windows::UI::ViewManagement::ApplicationView::GetForCurrentView::__l2::&lt;lambda_30d95ff0d0a0221e0e76d5a8187eef0d&gt; &amp;) C++ Microsoft.UI.Xaml.dll!winrt::impl::call_factory&lt;winrt::Windows::UI::ViewManagement::ApplicationView,winrt::Windows::UI::ViewManagement::IApplicationViewStatics2,&lt;lambda_30d95ff0d0a0221e0e76d5a8187eef0d&gt; &gt;(winrt::Windows::UI::ViewManagement::ApplicationView::GetForCurrentView::__l2::&lt;lambda_30d95ff0d0a0221e0e76d5a8187eef0d&gt; &amp;&amp;) Line 5471 C++ [Inline Frame] Microsoft.UI.Xaml.dll!winrt::Windows::UI::ViewManagement::ApplicationView::GetForCurrentView() C++ Microsoft.UI.Xaml.dll!MaterialHelper::IsFullScreenOrTabletMode() Line 1017 C++ [Inline Frame] Microsoft.UI.Xaml.dll!AcrylicBrush::UpdateAcrylicStatus() Line 573 C++ Microsoft.UI.Xaml.dll!AcrylicBrush::OnConnected() Line 167 C++ Microsoft.UI.Xaml.dll!winrt::impl::produce&lt;AcrylicBrush,winrt::Windows::UI::Xaml::Media::IXamlCompositionBrushBaseOverrides&gt;::OnConnected() Line 5341 C++ [External Code] WindowsTerminal.exe!wWinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, wchar_t * __formal, int __formal) Line 134 C++ [External Code] "><pre class="notranslate"><code class="notranslate"> [External Code] &gt; Microsoft.UI.Xaml.dll!winrt::throw_hresult(const winrt::hresult result) Line 4282 C++ [Inline Frame] Microsoft.UI.Xaml.dll!winrt::check_hresult(const winrt::hresult) C++ Microsoft.UI.Xaml.dll!winrt::impl::consume_Windows_System_IDispatcherQueueStatics&lt;winrt::Windows::System::IDispatcherQueueStatics&gt;::GetForCurrentThread() Line 585 C++ [Inline Frame] Microsoft.UI.Xaml.dll!winrt::Windows::UI::ViewManagement::ApplicationView::GetForCurrentView::__l2::&lt;lambda_30d95ff0d0a0221e0e76d5a8187eef0d&gt;::operator()(const winrt::Windows::UI::ViewManagement::IApplicationViewStatics2 &amp;) C++ [Inline Frame] Microsoft.UI.Xaml.dll!winrt::impl::factory_cache_entry&lt;winrt::Windows::UI::ViewManagement::ApplicationView,winrt::Windows::UI::ViewManagement::IApplicationViewStatics2&gt;::call(winrt::Windows::UI::ViewManagement::ApplicationView::GetForCurrentView::__l2::&lt;lambda_30d95ff0d0a0221e0e76d5a8187eef0d&gt; &amp;) C++ Microsoft.UI.Xaml.dll!winrt::impl::call_factory&lt;winrt::Windows::UI::ViewManagement::ApplicationView,winrt::Windows::UI::ViewManagement::IApplicationViewStatics2,&lt;lambda_30d95ff0d0a0221e0e76d5a8187eef0d&gt; &gt;(winrt::Windows::UI::ViewManagement::ApplicationView::GetForCurrentView::__l2::&lt;lambda_30d95ff0d0a0221e0e76d5a8187eef0d&gt; &amp;&amp;) Line 5471 C++ [Inline Frame] Microsoft.UI.Xaml.dll!winrt::Windows::UI::ViewManagement::ApplicationView::GetForCurrentView() C++ Microsoft.UI.Xaml.dll!MaterialHelper::IsFullScreenOrTabletMode() Line 1017 C++ [Inline Frame] Microsoft.UI.Xaml.dll!AcrylicBrush::UpdateAcrylicStatus() Line 573 C++ Microsoft.UI.Xaml.dll!AcrylicBrush::OnConnected() Line 167 C++ Microsoft.UI.Xaml.dll!winrt::impl::produce&lt;AcrylicBrush,winrt::Windows::UI::Xaml::Media::IXamlCompositionBrushBaseOverrides&gt;::OnConnected() Line 5341 C++ [External Code] WindowsTerminal.exe!wWinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, wchar_t * __formal, int __formal) Line 134 C++ [External Code] </code></pre></div>
<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.19008.0 Windows Terminal version: 0.6.2951.0 WSL 2: Ubuntu 19.04"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.19008.0 Windows Terminal version: 0.6.2951.0 WSL 2: Ubuntu 19.04 </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ul dir="auto"> <li>Open terminal</li> <li>Open file to edit in vim</li> <li>Type ':set mouse=a' to enable mouse mode globally</li> <li>Attempt to scroll</li> </ul> <h1 dir="auto">Expected behavior</h1> <ul dir="auto"> <li>Scrolling and other mouse events should be passed through and handled by the respective program</li> <li>Double clicking should engage VISUAL mode in vim</li> </ul> <h1 dir="auto">Actual behavior</h1> <ul dir="auto"> <li>Scrolling causes the terminal to scroll into it's scrollback buffer<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13264485/68268359-737e5e80-001b-11ea-8b2a-3b9de40bebe9.png"><img src="https://user-images.githubusercontent.com/13264485/68268359-737e5e80-001b-11ea-8b2a-3b9de40bebe9.png" alt="windows_terminal_vim_scroll" style="max-width: 100%;"></a></li> <li>Double clicking selects text in the terminal, but not in the application itself. This seems more in line with how I would expect single click and drag or shift + click events to be handled.</li> </ul>
0
<p dir="auto">As <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yujuhong/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yujuhong">@yujuhong</a> noted it'd be useful to reduce variance of measurements. Additionally we may want to include fluentd pod in the measurements.</p>
<p dir="auto">Since 4:25PM the e2e test <code class="notranslate">ResourceUsage should not exceed expected amount</code> has been failing.<br> Looking at the last batch of merged PRs I can't tell if any of them are responsible, either individually or in combination. Please can the PR authors <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/eparis/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eparis">@eparis</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/BenTheElder/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/BenTheElder">@BenTheElder</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nikhiljindal/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nikhiljindal">@nikhiljindal</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gmarek/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gmarek">@gmarek</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/feihujiang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/feihujiang">@feihujiang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yifan-gu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yifan-gu">@yifan-gu</a> have a think about whether their change could have caused:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ResourceUsage should not exceed expected amount. /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/monitor_resources.go:131 Expected &lt;map[string]e2e.resourceUsagePerContainer | len:3&gt;: { &quot;e2e-gce-minion-jt3o&quot;: { &quot;/&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.32753680271174745, MemoryUsageInBytes: 5536577126, MemoryWorkingSetInBytes: 1995254169, CPUInterval: 0, }, &quot;/docker-daemon&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.05330590708577182, MemoryUsageInBytes: 3765198848, MemoryWorkingSetInBytes: 674401484, CPUInterval: 0, }, &quot;/kubelet&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.04093180701209144, MemoryUsageInBytes: 94748672, MemoryWorkingSetInBytes: 94444748, CPUInterval: 0, }, &quot;/kube-proxy&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.015246457387254289, MemoryUsageInBytes: 5681152, MemoryWorkingSetInBytes: 5656576, CPUInterval: 0, }, &quot;/system&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.004761631665055137, MemoryUsageInBytes: 42254336, MemoryWorkingSetInBytes: 25874432, CPUInterval: 0, }, }, &quot;e2e-gce-minion-yb6a&quot;: { &quot;/system&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.00338632073811133, MemoryUsageInBytes: 43447910, MemoryWorkingSetInBytes: 26343014, CPUInterval: 0, }, &quot;/&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.3377336907593952, MemoryUsageInBytes: 2699154227, MemoryWorkingSetInBytes: 936918220, CPUInterval: 0, }, &quot;/docker-daemon&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.06698396036521867, MemoryUsageInBytes: 1778617548, MemoryWorkingSetInBytes: 339885260, CPUInterval: 0, }, &quot;/kubelet&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.0644396340620269, MemoryUsageInBytes: 99394355, MemoryWorkingSetInBytes: 98837299, CPUInterval: 0, }, &quot;/kube-proxy&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.010085711242831061, MemoryUsageInBytes: 4357324, MemoryWorkingSetInBytes: 4330291, CPUInterval: 0, }, }, &quot;e2e-gce-minion-itlb&quot;: { &quot;/&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.45461458647632885, MemoryUsageInBytes: 4603497676, MemoryWorkingSetInBytes: 1894986547, CPUInterval: 0, }, &quot;/docker-daemon&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.059021967282394824, MemoryUsageInBytes: 2742996172, MemoryWorkingSetInBytes: 488832204, CPUInterval: 0, }, &quot;/kubelet&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.06799305314744905, MemoryUsageInBytes: 104071168, MemoryWorkingSetInBytes: 103599308, CPUInterval: 0, }, &quot;/kube-proxy&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.012785393033208461, MemoryUsageInBytes: 5046272, MemoryWorkingSetInBytes: 5021696, CPUInterval: 0, }, &quot;/system&quot;: { Name: &quot;&quot;, Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.004112326988701547, MemoryUsageInBytes: 67950182, MemoryWorkingSetInBytes: 51807846, CPUInterval: 0, }, }, } to be empty"><pre class="notranslate"><code class="notranslate">ResourceUsage should not exceed expected amount. /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/monitor_resources.go:131 Expected &lt;map[string]e2e.resourceUsagePerContainer | len:3&gt;: { "e2e-gce-minion-jt3o": { "/": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.32753680271174745, MemoryUsageInBytes: 5536577126, MemoryWorkingSetInBytes: 1995254169, CPUInterval: 0, }, "/docker-daemon": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.05330590708577182, MemoryUsageInBytes: 3765198848, MemoryWorkingSetInBytes: 674401484, CPUInterval: 0, }, "/kubelet": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.04093180701209144, MemoryUsageInBytes: 94748672, MemoryWorkingSetInBytes: 94444748, CPUInterval: 0, }, "/kube-proxy": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.015246457387254289, MemoryUsageInBytes: 5681152, MemoryWorkingSetInBytes: 5656576, CPUInterval: 0, }, "/system": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.004761631665055137, MemoryUsageInBytes: 42254336, MemoryWorkingSetInBytes: 25874432, CPUInterval: 0, }, }, "e2e-gce-minion-yb6a": { "/system": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.00338632073811133, MemoryUsageInBytes: 43447910, MemoryWorkingSetInBytes: 26343014, CPUInterval: 0, }, "/": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.3377336907593952, MemoryUsageInBytes: 2699154227, MemoryWorkingSetInBytes: 936918220, CPUInterval: 0, }, "/docker-daemon": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.06698396036521867, MemoryUsageInBytes: 1778617548, MemoryWorkingSetInBytes: 339885260, CPUInterval: 0, }, "/kubelet": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.0644396340620269, MemoryUsageInBytes: 99394355, MemoryWorkingSetInBytes: 98837299, CPUInterval: 0, }, "/kube-proxy": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.010085711242831061, MemoryUsageInBytes: 4357324, MemoryWorkingSetInBytes: 4330291, CPUInterval: 0, }, }, "e2e-gce-minion-itlb": { "/": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.45461458647632885, MemoryUsageInBytes: 4603497676, MemoryWorkingSetInBytes: 1894986547, CPUInterval: 0, }, "/docker-daemon": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.059021967282394824, MemoryUsageInBytes: 2742996172, MemoryWorkingSetInBytes: 488832204, CPUInterval: 0, }, "/kubelet": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.06799305314744905, MemoryUsageInBytes: 104071168, MemoryWorkingSetInBytes: 103599308, CPUInterval: 0, }, "/kube-proxy": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.012785393033208461, MemoryUsageInBytes: 5046272, MemoryWorkingSetInBytes: 5021696, CPUInterval: 0, }, "/system": { Name: "", Timestamp: {sec: 0, nsec: 0, loc: nil}, CPUUsageInCores: 0.004112326988701547, MemoryUsageInBytes: 67950182, MemoryWorkingSetInBytes: 51807846, CPUInterval: 0, }, }, } to be empty </code></pre></div> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ixdy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ixdy">@ixdy</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/quinton-hoole/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/quinton-hoole">@quinton-hoole</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dchen1107/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dchen1107">@dchen1107</a></p>
1
<p dir="auto">Posted first on <a href="http://stackoverflow.com/questions/35999301/segmentation-fault-on-reading-tif-file-with-python-opencv" rel="nofollow">stackoverflow</a>, but no response as of yet.</p> <p dir="auto">Any steps I can do to debug further would be appreciated.</p> <h2 dir="auto"></h2> <p dir="auto">Environment:</p> <ul dir="auto"> <li>centos 6.7</li> <li>opencv 2.4.12</li> <li>python 2.7</li> <li>GNU libc 2.12</li> <li>gcc version 4.4.7 20120313 (Red Hat 4.4.7-16)</li> </ul> <p dir="auto">uname output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Linux xxxx 2.6.32-573.18.1.el6.x86_64 #1 SMP xxx x86_64 x86_64 x86_64 GNU/Linux"><pre class="notranslate"><code class="notranslate">Linux xxxx 2.6.32-573.18.1.el6.x86_64 #1 SMP xxx x86_64 x86_64 x86_64 GNU/Linux </code></pre></div> <p dir="auto">Clean download of 2.4.12 release and compiles fine with the following commands:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export PYTHON_EXECUTABLE=/usr/bin/python2.7 export PYTHON_INCLUDE_PATH=/usr/include/python2.7/ export PYTHON_LIBRARY=/usr/lib64/libpython2.7.so export PYTHON_NUMPY_INCLUDE_DIR=/home/centos/.local/lib/python2.7/site-packages/numpy/core/include/numpy export PYTHON_PACKAGES_PATH=/home/centos/.local/lib/python2.7/site-packages cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DBUILD_WITH_DEBUG_INFO=ON \ -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ -DPYTHON_INCLUDE_PATH=$PYTHON_INCLUDE_PATH \ -DPYTHON_LIBRARY=$PYTHON_LIBRARY \ -DPYTHON_NUMPY_INCLUDE_DIR=$PYTHON_NUMPY_INCLUDE_DIR \ -DPYTHON_PACKAGES_PATH=$PYTHON_PACKAGES_PATH \ -DINSTALL_C_EXAMPLES=OFF \ -DINSTALL_PYTHON_EXAMPLES=OFF \ -DBUILD_EXAMPLES=OFF \ -DWITH_FFMPEG=OFF .."><pre class="notranslate"><code class="notranslate">export PYTHON_EXECUTABLE=/usr/bin/python2.7 export PYTHON_INCLUDE_PATH=/usr/include/python2.7/ export PYTHON_LIBRARY=/usr/lib64/libpython2.7.so export PYTHON_NUMPY_INCLUDE_DIR=/home/centos/.local/lib/python2.7/site-packages/numpy/core/include/numpy export PYTHON_PACKAGES_PATH=/home/centos/.local/lib/python2.7/site-packages cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DBUILD_WITH_DEBUG_INFO=ON \ -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE \ -DPYTHON_INCLUDE_PATH=$PYTHON_INCLUDE_PATH \ -DPYTHON_LIBRARY=$PYTHON_LIBRARY \ -DPYTHON_NUMPY_INCLUDE_DIR=$PYTHON_NUMPY_INCLUDE_DIR \ -DPYTHON_PACKAGES_PATH=$PYTHON_PACKAGES_PATH \ -DINSTALL_C_EXAMPLES=OFF \ -DINSTALL_PYTHON_EXAMPLES=OFF \ -DBUILD_EXAMPLES=OFF \ -DWITH_FFMPEG=OFF .. </code></pre></div> <p dir="auto">Output snippet from running make</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-- Media I/O: -- ZLib: /usr/lib64/libz.so (ver 1.2.3) -- JPEG: /usr/lib64/libjpeg.so (ver ) -- PNG: /usr/lib64/libpng.so (ver 1.2.49) -- TIFF: /usr/lib64/libtiff.so (ver 42 - 3.9.4) -- JPEG 2000: /usr/lib64/libjasper.so (ver 1.900.1) -- OpenEXR: /usr/lib64/libImath.so /usr/lib64/libIlmImf.so /usr/lib64/libIex.so /usr/lib64/libHalf.so /usr/lib64/libIlmThread.so (ver 1.6.1) -- "><pre class="notranslate"><code class="notranslate">-- Media I/O: -- ZLib: /usr/lib64/libz.so (ver 1.2.3) -- JPEG: /usr/lib64/libjpeg.so (ver ) -- PNG: /usr/lib64/libpng.so (ver 1.2.49) -- TIFF: /usr/lib64/libtiff.so (ver 42 - 3.9.4) -- JPEG 2000: /usr/lib64/libjasper.so (ver 1.900.1) -- OpenEXR: /usr/lib64/libImath.so /usr/lib64/libIlmImf.so /usr/lib64/libIex.so /usr/lib64/libHalf.so /usr/lib64/libIlmThread.so (ver 1.6.1) -- </code></pre></div> <p dir="auto">However. This runs fine:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;$ python2.7 -c &quot;import cv2; cv2.imread('test.png')&quot;"><pre class="notranslate"><code class="notranslate">&gt;$ python2.7 -c "import cv2; cv2.imread('test.png')" </code></pre></div> <p dir="auto">But this does not:</p> <blockquote> <p dir="auto">$ python2.7 -c "import cv2; cv2.imread('test.tif')"</p> </blockquote> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="OpenCV Error: Assertion failed (udata &lt; (uchar*)ptr &amp;&amp; ((uchar*)ptr - udata) &lt;= (ptrdiff_t)(sizeof(void*)+16)) in fastFree, file /fleuron-data/opencv-2.4.12/modules/core/src/alloc.cpp, line 78 terminate called after throwing an instance of 'cv::Exception' what(): /fleuron-data/opencv-2.4.12/modules/core/src/alloc.cpp:78: error: (-215) udata &lt; (uchar*)ptr &amp;&amp; ((uchar*)ptr - udata) &lt;= (ptrdiff_t)(sizeof(void*)+16) in function fastFree Aborted"><pre class="notranslate"><code class="notranslate">OpenCV Error: Assertion failed (udata &lt; (uchar*)ptr &amp;&amp; ((uchar*)ptr - udata) &lt;= (ptrdiff_t)(sizeof(void*)+16)) in fastFree, file /fleuron-data/opencv-2.4.12/modules/core/src/alloc.cpp, line 78 terminate called after throwing an instance of 'cv::Exception' what(): /fleuron-data/opencv-2.4.12/modules/core/src/alloc.cpp:78: error: (-215) udata &lt; (uchar*)ptr &amp;&amp; ((uchar*)ptr - udata) &lt;= (ptrdiff_t)(sizeof(void*)+16) in function fastFree Aborted </code></pre></div> <p dir="auto">And has me lost..</p>
<p dir="auto">Can you please help me understand why I can't get imread to open simple bitonal files like this one?<br> <a href="https://app.box.com/s/y2h71ydjb7uim1um1gwqjvsuqz2cpmf2" rel="nofollow">https://app.box.com/s/y2h71ydjb7uim1um1gwqjvsuqz2cpmf2</a></p> <p dir="auto">This is an example of what I get. It worked in 3.0 rc but with 3.0.0 it no longer works.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Unhandled exception at 0x00007FF992BB9A1D (opencv_world300d.dll) in OpenCv_FastHough.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF."><pre class="notranslate"><code class="notranslate">Unhandled exception at 0x00007FF992BB9A1D (opencv_world300d.dll) in OpenCv_FastHough.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. </code></pre></div>
1
<p dir="auto">We're parsing <a href="https://github.com/flutter/website/blob/master/_data/catalog/widgets.json"><code class="notranslate">widgets.json</code></a> to take advantage of the widget categories in the inspector. In the process of adding some validation, I noticed that the following widgets show up more than once (and with different categorizations):</p> <ul dir="auto"> <li><code class="notranslate">GridView</code></li> <li><code class="notranslate">ListView</code></li> <li><code class="notranslate">Transform</code></li> </ul> <p dir="auto">Here are the raw bits:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" { &quot;name&quot;: &quot;GridView&quot;, &quot;description&quot;: &quot;A grid list consists of a repeated pattern of cells arrayed in a vertical and horizontal layout. The GridView widget implements this component.&quot;, &quot;categories&quot;: [], &quot;subcategories&quot;: [ &quot;Information displays&quot; ], &quot;link&quot;: &quot;https://docs.flutter.io/flutter/widgets/GridView-class.html&quot;, &quot;image&quot;: &quot;&lt;img alt='' src='https://material-design.storage.googleapis.com/publish/material_v_9/0B7WCemMG6e0VandQYXpNMG9aQUk/components_grid_lists.png'&gt;&quot; }, { &quot;name&quot;: &quot;GridView&quot;, &quot;description&quot;: &quot;A scrollable, 2D array of widgets.&quot;, &quot;categories&quot;: [ ], &quot;subcategories&quot;: [ &quot;Multi-child layout widgets&quot; ], &quot;link&quot;: &quot;https://docs.flutter.io/flutter/widgets/GridView-class.html&quot;, &quot;image&quot;: &quot;&lt;img alt='' src='/images/catalog-widget-placeholder.png'&gt;&quot; }, { &quot;name&quot;: &quot;GridView&quot;, &quot;description&quot;: &quot;A scrollable, 2D array of widgets. The most commonly used grid layouts are GridView.count, which creates a layout with a fixed number of tiles in the cross axis, and GridView.extent, which creates a layout with tiles that have a maximum cross-axis extent. A custom SliverGridDelegate can produce an aribtrary 2D arrangement of children, including arrangements that are unaligned or overlapping.&quot;, &quot;categories&quot;: [ &quot;Scrolling&quot; ], &quot;subcategories&quot;: [ ], &quot;link&quot;: &quot;https://docs.flutter.io/flutter/widgets/GridView-class.html&quot;, &quot;image&quot;: &quot;&lt;img alt='' src='/images/catalog-widget-placeholder.png'&gt;&quot; }, { &quot;name&quot;: &quot;ListView&quot;, &quot;sample&quot;: &quot;ListView_index&quot;, &quot;description&quot;: &quot;A scrollable, linear list of widgets. ListView is the most commonly used scrolling widget. It displays its children one after another in the scroll direction. In the cross axis, the children are required to fill the ListView.&quot;, &quot;categories&quot;: [ ], &quot;subcategories&quot;: [ &quot;Multi-child layout widgets&quot; ], &quot;link&quot;: &quot;https://docs.flutter.io/flutter/widgets/ListView-class.html&quot;, &quot;image&quot;: &quot;&lt;svg viewBox='0 0 100 100'&gt;&lt;filter id='inset-shadow-block' x='-50%' y='-50%' width='200%' height='200%'&gt;&lt;feComponentTransfer in='SourceAlpha'&gt;&lt;feFuncA type='table' tableValues='1 0' /&gt;&lt;/feComponentTransfer&gt;&lt;feGaussianBlur stdDeviation='2' result='Blur'/&gt;&lt;feFlood flood-color='#666666' result='color'/&gt;&lt;feComposite in2='Blur' operator='in'/&gt;&lt;feComposite in2='SourceAlpha' operator='in' /&gt;&lt;feMerge&gt;&lt;feMergeNode /&gt;&lt;/feMerge&gt;&lt;/filter&gt;&lt;rect x='0' y='0' width='100' height='100' fill='#3949ab'/&gt;&lt;rect x='30' y='10' width='40' height='80' fill='#ffffff'/&gt;&lt;rect x='35' y='10' width='30' height='15' fill='#4dd0e1'/&gt;&lt;rect x='35' y='30' width='30' height='20' fill='#4dd0e1'/&gt;&lt;rect x='35' y='55' width='30' height='5' fill='#4dd0e1'/&gt;&lt;rect x='35' y='65' width='30' height='15' fill='#4dd0e1'/&gt;&lt;rect x='35' y='85' width='30' height='5' fill='#4dd0e1'/&gt;&lt;rect x='30' y='10' width='40' height='80' fill='#ffffff' filter='url(#inset-shadow-block)'/&gt;&lt;/svg&gt;&quot; { &quot;name&quot;: &quot;ListView&quot;, &quot;description&quot;: &quot;A scrollable, linear list of widgets. ListView is the most commonly used scrolling widget. It displays its children one after another in the scroll direction. In the cross axis, the children are required to fill the ListView.&quot;, &quot;categories&quot;: [ &quot;Scrolling&quot; ], &quot;subcategories&quot;: [ ], &quot;link&quot;: &quot;https://docs.flutter.io/flutter/widgets/ListView-class.html&quot;, &quot;image&quot;: &quot;&lt;img alt='' src='/images/catalog-widget-placeholder.png'&gt;&quot; }, { &quot;name&quot;: &quot;Transform&quot;, &quot;description&quot;: &quot;A widget that applies a transformation before painting its child.&quot;, &quot;categories&quot;: [ ], &quot;subcategories&quot;: [ &quot;Single-child layout widgets&quot; ], &quot;link&quot;: &quot;https://docs.flutter.io/flutter/widgets/Transform-class.html&quot;, &quot;image&quot;: &quot;&lt;svg viewBox='0 0 100 100'&gt;&lt;rect x='0' y='0' width='100' height='100' fill='#3949ab'/&gt;&lt;rect x='17.5' y='42.5' width='50' height='30' fill='#ffffff'/&gt;&lt;rect x='20' y='45' width='45' height='25' fill='#3b75ad'/&gt;&lt;rect x='20' y='45' width='45' height='25' fill='#4dd0e1' transform='translate(15 -5) rotate(-23) skewX(-10)'/&gt;&lt;/svg&gt;&quot; }, { &quot;name&quot;: &quot;Transform&quot;, &quot;description&quot;: &quot;A widget that applies a transformation before painting its child.&quot;, &quot;categories&quot;: [ &quot;Painting and effects&quot; ], &quot;subcategories&quot;: [ ], &quot;link&quot;: &quot;https://docs.flutter.io/flutter/widgets/Transform-class.html&quot;, &quot;image&quot;: &quot;&lt;img alt='' src='/images/catalog-widget-placeholder.png'&gt;&quot; }, "><pre class="notranslate"><code class="notranslate"> { "name": "GridView", "description": "A grid list consists of a repeated pattern of cells arrayed in a vertical and horizontal layout. The GridView widget implements this component.", "categories": [], "subcategories": [ "Information displays" ], "link": "https://docs.flutter.io/flutter/widgets/GridView-class.html", "image": "&lt;img alt='' src='https://material-design.storage.googleapis.com/publish/material_v_9/0B7WCemMG6e0VandQYXpNMG9aQUk/components_grid_lists.png'&gt;" }, { "name": "GridView", "description": "A scrollable, 2D array of widgets.", "categories": [ ], "subcategories": [ "Multi-child layout widgets" ], "link": "https://docs.flutter.io/flutter/widgets/GridView-class.html", "image": "&lt;img alt='' src='/images/catalog-widget-placeholder.png'&gt;" }, { "name": "GridView", "description": "A scrollable, 2D array of widgets. The most commonly used grid layouts are GridView.count, which creates a layout with a fixed number of tiles in the cross axis, and GridView.extent, which creates a layout with tiles that have a maximum cross-axis extent. A custom SliverGridDelegate can produce an aribtrary 2D arrangement of children, including arrangements that are unaligned or overlapping.", "categories": [ "Scrolling" ], "subcategories": [ ], "link": "https://docs.flutter.io/flutter/widgets/GridView-class.html", "image": "&lt;img alt='' src='/images/catalog-widget-placeholder.png'&gt;" }, { "name": "ListView", "sample": "ListView_index", "description": "A scrollable, linear list of widgets. ListView is the most commonly used scrolling widget. It displays its children one after another in the scroll direction. In the cross axis, the children are required to fill the ListView.", "categories": [ ], "subcategories": [ "Multi-child layout widgets" ], "link": "https://docs.flutter.io/flutter/widgets/ListView-class.html", "image": "&lt;svg viewBox='0 0 100 100'&gt;&lt;filter id='inset-shadow-block' x='-50%' y='-50%' width='200%' height='200%'&gt;&lt;feComponentTransfer in='SourceAlpha'&gt;&lt;feFuncA type='table' tableValues='1 0' /&gt;&lt;/feComponentTransfer&gt;&lt;feGaussianBlur stdDeviation='2' result='Blur'/&gt;&lt;feFlood flood-color='#666666' result='color'/&gt;&lt;feComposite in2='Blur' operator='in'/&gt;&lt;feComposite in2='SourceAlpha' operator='in' /&gt;&lt;feMerge&gt;&lt;feMergeNode /&gt;&lt;/feMerge&gt;&lt;/filter&gt;&lt;rect x='0' y='0' width='100' height='100' fill='#3949ab'/&gt;&lt;rect x='30' y='10' width='40' height='80' fill='#ffffff'/&gt;&lt;rect x='35' y='10' width='30' height='15' fill='#4dd0e1'/&gt;&lt;rect x='35' y='30' width='30' height='20' fill='#4dd0e1'/&gt;&lt;rect x='35' y='55' width='30' height='5' fill='#4dd0e1'/&gt;&lt;rect x='35' y='65' width='30' height='15' fill='#4dd0e1'/&gt;&lt;rect x='35' y='85' width='30' height='5' fill='#4dd0e1'/&gt;&lt;rect x='30' y='10' width='40' height='80' fill='#ffffff' filter='url(#inset-shadow-block)'/&gt;&lt;/svg&gt;" { "name": "ListView", "description": "A scrollable, linear list of widgets. ListView is the most commonly used scrolling widget. It displays its children one after another in the scroll direction. In the cross axis, the children are required to fill the ListView.", "categories": [ "Scrolling" ], "subcategories": [ ], "link": "https://docs.flutter.io/flutter/widgets/ListView-class.html", "image": "&lt;img alt='' src='/images/catalog-widget-placeholder.png'&gt;" }, { "name": "Transform", "description": "A widget that applies a transformation before painting its child.", "categories": [ ], "subcategories": [ "Single-child layout widgets" ], "link": "https://docs.flutter.io/flutter/widgets/Transform-class.html", "image": "&lt;svg viewBox='0 0 100 100'&gt;&lt;rect x='0' y='0' width='100' height='100' fill='#3949ab'/&gt;&lt;rect x='17.5' y='42.5' width='50' height='30' fill='#ffffff'/&gt;&lt;rect x='20' y='45' width='45' height='25' fill='#3b75ad'/&gt;&lt;rect x='20' y='45' width='45' height='25' fill='#4dd0e1' transform='translate(15 -5) rotate(-23) skewX(-10)'/&gt;&lt;/svg&gt;" }, { "name": "Transform", "description": "A widget that applies a transformation before painting its child.", "categories": [ "Painting and effects" ], "subcategories": [ ], "link": "https://docs.flutter.io/flutter/widgets/Transform-class.html", "image": "&lt;img alt='' src='/images/catalog-widget-placeholder.png'&gt;" }, </code></pre></div> <p dir="auto">I'm happy to update the JSON but I'm not sure which categorizations should win. <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/HansMuller/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/HansMuller">@HansMuller</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Hixie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Hixie">@Hixie</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sethladd/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sethladd">@sethladd</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/maryx/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/maryx">@maryx</a></p>
<p dir="auto">Steps to reproduce:</p> <ol dir="auto"> <li>Launch gallery (profile or debug) using <code class="notranslate">flutter run</code>.</li> <li>Go to the URL the console tells you about.</li> <li>Try to do anything useful with the observatory.</li> </ol>
0
<p dir="auto">Hi people,</p> <p dir="auto">I have 2 Django projects (at different branchs/versions) on the same machine and both use celery for asynchronous tasks.</p> <p dir="auto">I figure thanks to <strong>sentry</strong> that tasks from app A are sent to workers of app B. Each application runs under a different unix user and workers/wsgi run through <strong>supervisor</strong>.</p> <p dir="auto">Here the different configurations:</p> <ul dir="auto"> <li><strong>Application A</strong></li> <li>Supervisor</li> </ul> <div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[program:demo-a-worker] command=/home/demo_a/start_worker.sh numprocs=1 directory=/home/demo_a autostart=true autorestart=true user=demo_a redirect_stderr=true stdout_logfile=/var/log/demo_a/worker.log stdout_logfile_maxbytes=1MB stdout_logfile_backups=10 stdout_capture_maxbytes=1MB"><pre class="notranslate"><span class="pl-en">[program:demo-a-worker]</span> <span class="pl-k">command</span>=/home/demo_a/start_worker.sh <span class="pl-k">numprocs</span>=1 <span class="pl-k">directory</span>=/home/demo_a <span class="pl-k">autostart</span>=true <span class="pl-k">autorestart</span>=true <span class="pl-k">user</span>=demo_a <span class="pl-k">redirect_stderr</span>=true <span class="pl-k">stdout_logfile</span>=/var/log/demo_a/worker.log <span class="pl-k">stdout_logfile_maxbytes</span>=1MB <span class="pl-k">stdout_logfile_backups</span>=10 <span class="pl-k">stdout_capture_maxbytes</span>=1MB</pre></div> <ul dir="auto"> <li>Script</li> </ul> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="exec $PYENV/celery worker -A mydjangoproject -B -Q demo_a --loglevel=INFO --hostname demo_a.%h"><pre class="notranslate"><span class="pl-c1">exec</span> <span class="pl-smi">$PYENV</span>/celery worker -A mydjangoproject -B -Q demo_a --loglevel=INFO --hostname demo_a.%h</pre></div> <ul dir="auto"> <li><strong>Application B</strong></li> <li>Supervisord</li> </ul> <div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[program:demo-b-worker] command=/home/demo_b/start_worker.sh numprocs=1 directory=/home/demo_b autostart=true autorestart=true user=demo_b redirect_stderr=true stdout_logfile=/var/log/demo_b/worker.log stdout_logfile_maxbytes=1MB stdout_logfile_backups=10 stdout_capture_maxbytes=1MB"><pre class="notranslate"><span class="pl-en">[program:demo-b-worker]</span> <span class="pl-k">command</span>=/home/demo_b/start_worker.sh <span class="pl-k">numprocs</span>=1 <span class="pl-k">directory</span>=/home/demo_b <span class="pl-k">autostart</span>=true <span class="pl-k">autorestart</span>=true <span class="pl-k">user</span>=demo_b <span class="pl-k">redirect_stderr</span>=true <span class="pl-k">stdout_logfile</span>=/var/log/demo_b/worker.log <span class="pl-k">stdout_logfile_maxbytes</span>=1MB <span class="pl-k">stdout_logfile_backups</span>=10 <span class="pl-k">stdout_capture_maxbytes</span>=1MB</pre></div> <ul dir="auto"> <li>Script</li> </ul> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="exec $PYENV/celery worker -A mydjangoproject -B -Q demo_b --loglevel=INFO --hostname demo_b.%h"><pre class="notranslate"><span class="pl-c1">exec</span> <span class="pl-smi">$PYENV</span>/celery worker -A mydjangoproject -B -Q demo_b --loglevel=INFO --hostname demo_b.%h</pre></div> <ul dir="auto"> <li>Celery configuration in <code class="notranslate">mydjangoproject</code></li> </ul> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mydjangoproject.settings') os.environ.setdefault(&quot;DJANGO_CONFIGURATION&quot;, &quot;Dev&quot;) # Load environment configuration from configurations import importer importer.install() class Celery(celery.Celery): &quot;&quot;&quot; Celery configuration class &quot;&quot;&quot; def on_configure(self): # Get Raven configuration from Django settings if not hasattr(settings, 'RAVEN_CONFIG'): return # Initialize Raven client client = raven.Client(**settings.RAVEN_CONFIG) # Register a custom filter to filter out duplicate logs register_logger_signal(client) # Hook into the Celery error handler register_signal(client) # Initialize Celery application app = Celery('mydjangoproject') # Using a string here means the worker will not have to # pickle the object when using Windows. app.config_from_object('django.conf:settings') # Auto-discover celery tasks inside Django applications from django.conf import settings app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)"><pre class="notranslate"><span class="pl-c"># Set the default Django settings module for the 'celery' program.</span> <span class="pl-s1">os</span>.<span class="pl-s1">environ</span>.<span class="pl-en">setdefault</span>(<span class="pl-s">'DJANGO_SETTINGS_MODULE'</span>, <span class="pl-s">'mydjangoproject.settings'</span>) <span class="pl-s1">os</span>.<span class="pl-s1">environ</span>.<span class="pl-en">setdefault</span>(<span class="pl-s">"DJANGO_CONFIGURATION"</span>, <span class="pl-s">"Dev"</span>) <span class="pl-c"># Load environment configuration</span> <span class="pl-k">from</span> <span class="pl-s1">configurations</span> <span class="pl-k">import</span> <span class="pl-s1">importer</span> <span class="pl-s1">importer</span>.<span class="pl-en">install</span>() <span class="pl-k">class</span> <span class="pl-v">Celery</span>(<span class="pl-s1">celery</span>.<span class="pl-v">Celery</span>): <span class="pl-s">"""</span> <span class="pl-s"> Celery configuration class</span> <span class="pl-s"> """</span> <span class="pl-k">def</span> <span class="pl-en">on_configure</span>(<span class="pl-s1">self</span>): <span class="pl-c"># Get Raven configuration from Django settings</span> <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-en">hasattr</span>(<span class="pl-s1">settings</span>, <span class="pl-s">'RAVEN_CONFIG'</span>): <span class="pl-k">return</span> <span class="pl-c"># Initialize Raven client</span> <span class="pl-s1">client</span> <span class="pl-c1">=</span> <span class="pl-s1">raven</span>.<span class="pl-v">Client</span>(<span class="pl-c1">**</span><span class="pl-s1">settings</span>.<span class="pl-v">RAVEN_CONFIG</span>) <span class="pl-c"># Register a custom filter to filter out duplicate logs</span> <span class="pl-en">register_logger_signal</span>(<span class="pl-s1">client</span>) <span class="pl-c"># Hook into the Celery error handler</span> <span class="pl-en">register_signal</span>(<span class="pl-s1">client</span>) <span class="pl-c"># Initialize Celery application</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'mydjangoproject'</span>) <span class="pl-c"># Using a string here means the worker will not have to</span> <span class="pl-c"># pickle the object when using Windows.</span> <span class="pl-s1">app</span>.<span class="pl-en">config_from_object</span>(<span class="pl-s">'django.conf:settings'</span>) <span class="pl-c"># Auto-discover celery tasks inside Django applications</span> <span class="pl-k">from</span> <span class="pl-s1">django</span>.<span class="pl-s1">conf</span> <span class="pl-k">import</span> <span class="pl-s1">settings</span> <span class="pl-s1">app</span>.<span class="pl-en">autodiscover_tasks</span>(<span class="pl-k">lambda</span>: <span class="pl-s1">settings</span>.<span class="pl-v">INSTALLED_APPS</span>)</pre></div> <ul dir="auto"> <li><strong>Settings</strong></li> </ul> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" # Celery configuration BROKER_URL = values.Value('redis://localhost:6379/0') BROKER_TRANSPORT_OPTIONS = { 'visibility_timeout': 3600, 'fanout_prefix': True, 'fanout_patterns': True, } CELERY_TASK_SERIALIZER = 'pickle' CELERY_RESULT_SERIALIZER = 'pickle' CELERY_RESULT_BACKEND = values.Value('redis') CELERY_TASK_RESULT_EXPIRES = 3600 CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml'] CELERY_DISABLE_RATE_LIMITS = True CELERY_CHORD_PROPAGATES = True CELERY_ALWAYS_EAGER = values.BooleanValue(True) CELERY_DEFAULT_QUEUE = values.Value('celery', environ_name='QUEUE_NAME')"><pre class="notranslate"> <span class="pl-c"># Celery configuration</span> <span class="pl-v">BROKER_URL</span> <span class="pl-c1">=</span> <span class="pl-s1">values</span>.<span class="pl-v">Value</span>(<span class="pl-s">'redis://localhost:6379/0'</span>) <span class="pl-v">BROKER_TRANSPORT_OPTIONS</span> <span class="pl-c1">=</span> { <span class="pl-s">'visibility_timeout'</span>: <span class="pl-c1">3600</span>, <span class="pl-s">'fanout_prefix'</span>: <span class="pl-c1">True</span>, <span class="pl-s">'fanout_patterns'</span>: <span class="pl-c1">True</span>, } <span class="pl-v">CELERY_TASK_SERIALIZER</span> <span class="pl-c1">=</span> <span class="pl-s">'pickle'</span> <span class="pl-v">CELERY_RESULT_SERIALIZER</span> <span class="pl-c1">=</span> <span class="pl-s">'pickle'</span> <span class="pl-v">CELERY_RESULT_BACKEND</span> <span class="pl-c1">=</span> <span class="pl-s1">values</span>.<span class="pl-v">Value</span>(<span class="pl-s">'redis'</span>) <span class="pl-v">CELERY_TASK_RESULT_EXPIRES</span> <span class="pl-c1">=</span> <span class="pl-c1">3600</span> <span class="pl-v">CELERY_ACCEPT_CONTENT</span> <span class="pl-c1">=</span> [<span class="pl-s">'pickle'</span>, <span class="pl-s">'json'</span>, <span class="pl-s">'msgpack'</span>, <span class="pl-s">'yaml'</span>] <span class="pl-v">CELERY_DISABLE_RATE_LIMITS</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span> <span class="pl-v">CELERY_CHORD_PROPAGATES</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span> <span class="pl-v">CELERY_ALWAYS_EAGER</span> <span class="pl-c1">=</span> <span class="pl-s1">values</span>.<span class="pl-v">BooleanValue</span>(<span class="pl-c1">True</span>) <span class="pl-v">CELERY_DEFAULT_QUEUE</span> <span class="pl-c1">=</span> <span class="pl-s1">values</span>.<span class="pl-v">Value</span>(<span class="pl-s">'celery'</span>, <span class="pl-s1">environ_name</span><span class="pl-c1">=</span><span class="pl-s">'QUEUE_NAME'</span>)</pre></div> <p dir="auto">Values are environment configuration, in production CELERY_ALWAYS_EAGER=False and queue name is the same as in the command line.</p> <p dir="auto">I take care that each worker has its own name and queue but it seems not to solve the issue.</p> <p dir="auto">Thanks!</p>
<h1 dir="auto">Checklist</h1> <ul dir="auto"> <li>[ x] I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+label%3A%22Issue+Type%3A+Feature+Request%22+">issues list</a><br> for similar or identical feature requests.</li> <li>[ x] I have checked the <a href="https://github.com/celery/celery/pulls?utf8=%E2%9C%93&amp;q=is%3Apr+label%3A%22PR+Type%3A+Feature%22+">pull requests list</a><br> for existing proposed implementations of this feature.</li> <li>[ x] I have checked the <a href="https://github.com/celery/celery/commits/main">commit log</a><br> to find out if the same feature was already implemented in the<br> main branch.</li> <li>[x ] I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h1 dir="auto">Brief Summary</h1> <p dir="auto">This is related to another issue I filed: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1800454221" data-permission-text="Title is private" data-url="https://github.com/ovh/celery-director/issues/195" data-hovercard-type="issue" data-hovercard-url="/ovh/celery-director/issues/195/hovercard" href="https://github.com/ovh/celery-director/issues/195">ovh/celery-director#195</a>: In a workflow, a step might need some info/value generated in a grand parent step(not a direct parent step), one solution is enable a step/task to save the info into payload, and then later step could access this payload. I am not good at celery, not sure whether this is possible. But the use case is very usefully.</p> <h1 dir="auto">Design</h1> <h2 dir="auto">Architectural Considerations</h2> <p dir="auto">None</p> <h2 dir="auto">Proposed Behavior</h2> <h2 dir="auto">Proposed UI/UX</h2> <h2 dir="auto">Diagrams</h2> <p dir="auto">N/A</p> <h2 dir="auto">Alternatives</h2> <p dir="auto">None</p>
0
<ul dir="auto"> <li>Electron version: Latest</li> <li>Operating system: OSX, Windows</li> </ul> <p dir="auto">I've been rebuilding the spellchecker for <a href="www.notion.so/desktop">notion.so</a> and I thought I would compile some of the quirks I ran into.</p> <p dir="auto">The de facto solution right now is to use <a href="https://github.com/electron-userland/electron-spellchecker">electron-spellchecker</a> and we've been using it for the past year, but recently the language auto-detect stopped working on Mac. Probably a recent OS update or something. Slack has language select in their settings menu so I'd imagine fixing this issue isn't such a high priority for them (I believe the maintainer works there ;).</p> <p dir="auto">So I went about building my own solution that uses <a href="https://github.com/dachev/node-cld">node-cld</a> to detect the language on <code class="notranslate">selectionchange</code> events and <a href="https://github.com/atom/node-spellchecker">node-spellchecker</a> to access native spellcheck APIs on MacOS and Window 8+. Here are some feature requests:</p> <ul dir="auto"> <li> <p dir="auto">Async <a href="https://github.com/electron/electron/blob/master/docs/api/web-frame.md#webframesetspellcheckproviderlanguage-autocorrectword-provider"><code class="notranslate">webFrame.setSpellCheckProvider</code></a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="264038860" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/10734" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/10734/hovercard" href="https://github.com/electron/electron/issues/10734">#10734</a> -- if we could throttle spellcheck to wait for users to stop typing, there would be a lot less jank and feel a lot more performant.</p> </li> <li> <p dir="auto"><code class="notranslate">webFrame.checkSpelling(elm: HTMLElement)</code> -- currently, a user has to move their selection through an editable element before the spellchecker will run. It would be nice if we could trigger this manually.</p> </li> <li> <p dir="auto"><a href="https://github.com/electron/electron/blob/master/docs/api/web-contents.md#contentsreplacemisspellingtext"><code class="notranslate">webContents.replaceMisspelling</code></a> doesn't remove misspelling underline -- The <code class="notranslate">webFrame.checkSpelling</code> API could be a simple workaround to fix this.</p> </li> <li> <p dir="auto">Multi-language support is not quite possible because the <a href="https://github.com/electron/electron/blob/master/docs/api/web-frame.md#webframesetspellcheckproviderlanguage-autocorrectword-provider"><code class="notranslate">webFrame.setSpellCheckProvider</code></a> API only lets you check one word at a time. Thus you cannot have multiple languages in the same input because it needs to decide on only one language. One solution is for the API to pass the entire textContent and return a list of selections that are misspelled.</p> </li> <li> <p dir="auto">Tangentially related: <code class="notranslate">node-spellchecker</code> has <code class="notranslate">Add to Dictionary</code> and <code class="notranslate">Remove from Dictionary</code> support, but it doesn't have <code class="notranslate">isAddedToDictionary</code> so its hard to know when to show the <code class="notranslate">Remove from Dictionary</code> option in the context menu.</p> </li> </ul> <p dir="auto">Finally, I just want to highlight how good the Google Chrome spellchecker is. It handles language detection with multiple languages in the same input. Its asynchronous and non-blocking. It has all the native dictionary support. If we were able to pull the Google Chrome spellchecker into Chromium, then all the Electron-based note taking apps and email clients would benefit greatly. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="113271622" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/3211" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/3211/hovercard" href="https://github.com/electron/electron/issues/3211">#3211</a></p> <p dir="auto">CC: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/paulcbetts/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/paulcbetts">@paulcbetts</a></p> <p dir="auto">Thanks!</p>
<p dir="auto">On OS X apart from the basic spell-checking it also provides a "Spelling and Grammar" menu that allows some more advanced operations:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/639601/10719716/bff72fd4-7bc8-11e5-9b97-980e9a75dd91.png"><img width="666" alt="screen shot 2015-10-26 at 10 02 39 am" src="https://cloud.githubusercontent.com/assets/639601/10719716/bff72fd4-7bc8-11e5-9b97-980e9a75dd91.png" style="max-width: 100%;"></a></p> <p dir="auto">Chrome browser has implemented most of the features, we should find a way to make Electron apps use it without any pain.</p>
1
<p dir="auto">The current implementation of the Image Sizes listview is having usability issues: the trash can icon gets cut off while the design is not following OS design guidelines for lists. It allows for in-line editing, which makes sense in a datagrid that holds a lot of information that you want to 'quick edit'.</p> <p dir="auto">The issues:</p> <ul dir="auto"> <li>The ListView is too wide, the delete button gets cut off on smaller resolutions (and the default window width)</li> <li>Users reported that they would like to have a better description of the stretch modes, there's no space to integrate that.</li> <li>Inline editing is common for DataGrids, not for ListViews.</li> </ul> <p dir="auto">Current state:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9866362/91637377-3fd84f00-ea08-11ea-865d-5fbfd76cd56a.png"><img src="https://user-images.githubusercontent.com/9866362/91637377-3fd84f00-ea08-11ea-865d-5fbfd76cd56a.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Proposal (non-functional XAML mock-up):<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9866362/91637464-eb819f00-ea08-11ea-9620-d8035d5d2f3b.gif"><img src="https://user-images.githubusercontent.com/9866362/91637464-eb819f00-ea08-11ea-9620-d8035d5d2f3b.gif" alt="ImageResizer list" data-animated-image="" style="max-width: 100%;"></a></p> <h2 dir="auto">Would be great to get feedback on this - any features we'd be missing, any UX concerns?</h2> <p dir="auto">If you'd like to see this feature implemented, add a <g-emoji class="g-emoji" alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png">👍</g-emoji> reaction to this post.</p>
<p dir="auto">We should restructure the table to make it easier to visually capture the table.</p> <h3 dir="auto">Original</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1462282/81435687-2049ad80-911d-11ea-8085-384476bf8458.png"><img src="https://user-images.githubusercontent.com/1462282/81435687-2049ad80-911d-11ea-8085-384476bf8458.png" alt="img" style="max-width: 100%;"></a></p> <h3 dir="auto">Proposal</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/61519853/81449574-d2669100-9180-11ea-9236-2153ebe0d7b6.png"><img src="https://user-images.githubusercontent.com/61519853/81449574-d2669100-9180-11ea-9236-2153ebe0d7b6.png" alt="image" style="max-width: 100%;"></a></p>
1
<p dir="auto">Lines 808/809</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="button(): JQuery; button(methodName: string): JQuery;"><pre class="notranslate"><code class="notranslate">button(): JQuery; button(methodName: string): JQuery; </code></pre></div> <p dir="auto">and line 1007</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tooltip(methodName: string): JQuery;"><pre class="notranslate"><code class="notranslate">tooltip(methodName: string): JQuery; </code></pre></div> <p dir="auto">cause "Duplicate overload signature".</p>
<p dir="auto">Today my builds started failing because of a conflict between requirejs and node require</p> <p dir="auto">This is the compile error I received from typescript:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="d:/a/1/s/node_modules/@types/node/index.d.ts(99,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'Require', but here has type 'NodeRequire'."><pre class="notranslate"><code class="notranslate">d:/a/1/s/node_modules/@types/node/index.d.ts(99,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'Require', but here has type 'NodeRequire'. </code></pre></div> <p dir="auto">Lookin at the npm install diff since last known good built showed that it was introduced from react-dom:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9914123/28945102-eb720cf8-7859-11e7-8858-4409e1aa336e.png"><img src="https://user-images.githubusercontent.com/9914123/28945102-eb720cf8-7859-11e7-8858-4409e1aa336e.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">15.5.1 didn't have the dependency to <code class="notranslate">@types/node</code></p>
0
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v1.32.1]</li> <li>Operating System: [Windows 10]</li> <li>Browser: [ Chromium]</li> </ul> <h3 dir="auto">Source code</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I provided exact source code that allows reproducing the issue locally.</li> </ul> <p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p> <p dir="auto"><strong>Config file</strong></p> <p dir="auto"><strong>Test file (self-contained)</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sync getText(): Promise&lt;string&gt; { const context = await chromium.launchPersistentContext('C:\\temp\\playwright-cache', {headless: false, channel: 'chrome' }); const page = context.pages()[0]; await page.goto(&quot;url behind SSO&quot;); //here user login to the SSO manually for the first time const text= await page.locator('cssSelector').innerHTML({timeout: 60*1000}); await page.close(); return text }"><pre class="notranslate"><span class="pl-s1">sync</span> <span class="pl-en">getText</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-v">Promise</span><span class="pl-c1">&lt;</span><span class="pl-s1">string</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">const</span> context <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">chromium</span><span class="pl-kos">.</span><span class="pl-en">launchPersistentContext</span><span class="pl-kos">(</span><span class="pl-s">'C:\\temp\\playwright-cache'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">headless</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span> <span class="pl-c1">channel</span>: <span class="pl-s">'chrome'</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">page</span> <span class="pl-c1">=</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">pages</span><span class="pl-kos">(</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-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">"url behind SSO"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">//here user login to the SSO manually for the first time</span> <span class="pl-k">const</span> <span class="pl-s1">text</span><span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">locator</span><span class="pl-kos">(</span><span class="pl-s">'cssSelector'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">innerHTML</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">timeout</span>: <span class="pl-c1">60</span><span class="pl-c1">*</span><span class="pl-c1">1000</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">page</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-k">return</span> <span class="pl-s1">text</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><strong>Steps</strong></p> <ol dir="auto"> <li>Playwright opens a browser with persistent context</li> <li>Playwright navigates to a URL with behind SSO</li> <li>User enters credentials and logins</li> <li>Playwright grabs the text and we return it</li> <li>Function is run for second time</li> </ol> <p dir="auto"><strong>Expected</strong><br> SSO not to be shown as user has already logged in once.</p> <p dir="auto"><strong>Actual</strong><br> SSO page is shown every time as session is not saved.</p> <p dir="auto"><strong>Workaround</strong><br> If <code class="notranslate">await page.close();</code> is removed, session is correctly saved at the end of the test run and SSO page is no longer shown. However, the browser that was used to get the text required for other tests (that run in an non-persistent browser) remains open through out the test suite running and that is not ideal.</p> <p dir="auto">It was mentioned in <a href="https://github.com/microsoft/playwright/issues/24007" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/24007/hovercard">this issue</a> that page is being closed too early and it is causing the session not to be persisted.<br> However, adding some explicit timeout to try this theory did not proof useful:<br> <code class="notranslate">await page.waitForTimeout(30000); </code><br> it seem like that as long as the page closed via <code class="notranslate">page.close()</code>, it is not saving the session.</p> <p dir="auto">Note:</p> <ul dir="auto"> <li>Due to compliance and other technical decisions, this is the only way that I am able to save session instead of using storageState.</li> <li>I already raised this issue <a href="https://github.com/microsoft/playwright/issues/24007" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/24007/hovercard">this issue</a>, however, it was closed without an answer that works. So I am not sure if I should leave a comment there or create a new issue. Please advice.</li> </ul>
<p dir="auto">It would be great if Playwright had something similar to CodeceptJS methods:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9056958/77189043-dbb37580-6ace-11ea-9fe0-7216a9569b00.png"><img src="https://user-images.githubusercontent.com/9056958/77189043-dbb37580-6ace-11ea-9fe0-7216a9569b00.png" alt="image" style="max-width: 100%;"></a><br> or</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9056958/77189066-e1a95680-6ace-11ea-9617-6c3a438cc0a3.png"><img src="https://user-images.githubusercontent.com/9056958/77189066-e1a95680-6ace-11ea-9617-6c3a438cc0a3.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">I guess this could be in a form similar to <code class="notranslate">waitForProperty</code>? which waits for an element to exist and waits for a property of key and value</p> <p dir="auto">e.g. <code class="notranslate">waitForProperty(selector, "innerText", "Foo",{timeout})</code> <code class="notranslate">waitForProperty(selector, "value", "bar",{timeout})</code></p>
0
<p dir="auto">Hi, I'm noticing that the back button doesn't trigger getInitialProps.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Steps to Reproduce</h2> <ol dir="auto"> <li>Go to <a href="https://wecured.com/condition/depression" rel="nofollow">https://wecured.com/condition/depression</a></li> <li>Click on 'Symptoms' tab, which will trigger a shallow client transition.</li> <li>Click on 'hay fever' on the left rail, which will trigger a client transition.</li> <li>Press back.<br> Expected: page should end up on the depression page with symptoms tab.<br> Actual: page ended up on hay fever on the symptoms tab.</li> </ol> <p dir="auto">I did some debugging and found that this is because getInitialProps wasn't called.</p>
<p dir="auto">I have an app with a single page <code class="notranslate">index.js</code>, and I parse the query parameters in <code class="notranslate">getInitialProps</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="static async getInitialProps ({query}) { console.log('PAGE', query.screenId); try { const projectData = await ProjectLoader.loadProject(query); return projectData; } catch (err) { console.error(err); } };"><pre class="notranslate"><code class="notranslate">static async getInitialProps ({query}) { console.log('PAGE', query.screenId); try { const projectData = await ProjectLoader.loadProject(query); return projectData; } catch (err) { console.error(err); } }; </code></pre></div> <p dir="auto">I use <code class="notranslate">&lt;Link href={pathname, query} prefetch&gt;</code> tags to build my links.</p> <p dir="auto">The <code class="notranslate">screenId</code> property is key to finding the right page to render.</p> <p dir="auto">However, when I use the back button in the browser to a page without <code class="notranslate">screenId</code> set, <code class="notranslate">getInitialProps</code> doesn’t return <code class="notranslate">screenId:undefined</code> as expected, but another value (as you can see in the console log):</p> <p dir="auto"><a href="https://i.stack.imgur.com/pWUXE.gif" rel="nofollow"><img src="https://camo.githubusercontent.com/bb7ac2040b7623677b1ca870bd1c97c22659c4edf045bd3c817326ae19f06aa4/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f70575558452e676966" alt="getInitialProps not working with history" data-animated-image="" data-canonical-src="https://i.stack.imgur.com/pWUXE.gif" style="max-width: 100%;"></a></p> <p dir="auto">When I refresh the page, I get the right properties and see the correct results.</p> <p dir="auto">The “imaginary” <code class="notranslate">screenId</code> is actually a valid value, but I have no idea where this value comes from.</p> <p dir="auto">Why is this happening?</p>
1
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/900690/15919964/8ec93690-2e16-11e6-9047-5236ec0fdd11.png"><img width="715" alt="screen shot 2016-06-09 at 07 48 24" src="https://cloud.githubusercontent.com/assets/900690/15919964/8ec93690-2e16-11e6-9047-5236ec0fdd11.png" style="max-width: 100%;"></a></p> <p dir="auto">Maybe an issue with the cwd?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2193314/16358493/ca2ea09e-3ac8-11e6-89d2-7d9b3b5e589d.png"><img src="https://cloud.githubusercontent.com/assets/2193314/16358493/ca2ea09e-3ac8-11e6-89d2-7d9b3b5e589d.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">gnome-terminal env:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="❯ env XDG_VTNR=7 LC_PAPER=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 XDG_SESSION_ID=c2 XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/daimms LC_MONETARY=en_US.UTF-8 CLUTTER_IM_MODULE=xim SESSION=ubuntu GPG_AGENT_INFO=/home/daimms/.gnupg/S.gpg-agent:0:1 TERM=xterm-256color VTE_VERSION=4205 SHELL=/bin/bash QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 WINDOWID=58720262 LC_NUMERIC=en_US.UTF-8 UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1421 GNOME_KEYRING_CONTROL= GTK_MODULES=gail:atk-bridge:unity-gtk-module USER=daimms LS_COLORS=no=00:fi=00:di=1;34:ln=1;36:pi=40;33:so=1;35:bd=1;40;33:cd=1;40;33:or=1;40;31:ex=1;32:*.tar=1;31:*.tgz=1;31:*.arj=1;31:*.taz=1;31:*.lzh=1;31:*.zip=1;31:*.z=1;31:*.Z=1;31:*.gz=1;31:*.deb=1;31:*.bmp=35:*.gif=35:*.jpg=35:*.png=35:*.ppm=35:*.tga=35:*.tif=35:*.xbm=35:*.xpm=35:*.avi=35:*.mpg=35: LC_TELEPHONE=en_US.UTF-8 QT_ACCESSIBILITY=1 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg DESKTOP_SESSION=ubuntu PATH=/home/daimms/.npm-packages/bin:/home/daimms/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin QT_IM_MODULE=ibus QT_QPA_PLATFORMTHEME=appmenu-qt5 LC_IDENTIFICATION=en_US.UTF-8 XDG_SESSION_TYPE=x11 PWD=/home/daimms/dev/Microsoft/vscode JOB=unity-settings-daemon XMODIFIERS=@im=ibus GNOME_KEYRING_PID= LANG=en_AU.UTF-8 GDM_LANG=en_AU MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path NODE_PATH=/home/daimms/.npm-packages/lib/node_modules:/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript LC_MEASUREMENT=en_US.UTF-8 COMPIZ_CONFIG_PROFILE=ubuntu IM_CONFIG_PHASE=1 PAPERSIZE=letter GDMSESSION=ubuntu SESSIONTYPE=gnome-session GTK2_MODULES=overlay-scrollbar SHLVL=1 HOME=/home/daimms XDG_SEAT=seat0 LANGUAGE=en_AU:en_US:en GNOME_DESKTOP_SESSION_ID=this-is-deprecated UPSTART_INSTANCE= UPSTART_EVENTS=xsession started XDG_SESSION_DESKTOP=ubuntu LOGNAME=daimms COMPIZ_BIN_PATH=/usr/bin/ DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-gvVqAqwrcR XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop QT4_IM_MODULE=xim LESSOPEN=| /usr/bin/lesspipe %s PROMPT_COMMAND=__prompt_command INSTANCE= UPSTART_JOB=unity7 XDG_RUNTIME_DIR=/run/user/1000 DISPLAY=:0 XDG_CURRENT_DESKTOP=Unity GTK_IM_MODULE=ibus LESSCLOSE=/usr/bin/lesspipe %s %s LC_TIME=en_US.UTF-8 LC_NAME=en_US.UTF-8 XAUTHORITY=/home/daimms/.Xauthority _=/usr/bin/env OLDPWD=/home/daimms/dev/Tyriar/xterm.js"><pre class="notranslate"><code class="notranslate">❯ env XDG_VTNR=7 LC_PAPER=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 XDG_SESSION_ID=c2 XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/daimms LC_MONETARY=en_US.UTF-8 CLUTTER_IM_MODULE=xim SESSION=ubuntu GPG_AGENT_INFO=/home/daimms/.gnupg/S.gpg-agent:0:1 TERM=xterm-256color VTE_VERSION=4205 SHELL=/bin/bash QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 WINDOWID=58720262 LC_NUMERIC=en_US.UTF-8 UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1421 GNOME_KEYRING_CONTROL= GTK_MODULES=gail:atk-bridge:unity-gtk-module USER=daimms LS_COLORS=no=00:fi=00:di=1;34:ln=1;36:pi=40;33:so=1;35:bd=1;40;33:cd=1;40;33:or=1;40;31:ex=1;32:*.tar=1;31:*.tgz=1;31:*.arj=1;31:*.taz=1;31:*.lzh=1;31:*.zip=1;31:*.z=1;31:*.Z=1;31:*.gz=1;31:*.deb=1;31:*.bmp=35:*.gif=35:*.jpg=35:*.png=35:*.ppm=35:*.tga=35:*.tif=35:*.xbm=35:*.xpm=35:*.avi=35:*.mpg=35: LC_TELEPHONE=en_US.UTF-8 QT_ACCESSIBILITY=1 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg DESKTOP_SESSION=ubuntu PATH=/home/daimms/.npm-packages/bin:/home/daimms/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin QT_IM_MODULE=ibus QT_QPA_PLATFORMTHEME=appmenu-qt5 LC_IDENTIFICATION=en_US.UTF-8 XDG_SESSION_TYPE=x11 PWD=/home/daimms/dev/Microsoft/vscode JOB=unity-settings-daemon XMODIFIERS=@im=ibus GNOME_KEYRING_PID= LANG=en_AU.UTF-8 GDM_LANG=en_AU MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path NODE_PATH=/home/daimms/.npm-packages/lib/node_modules:/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript LC_MEASUREMENT=en_US.UTF-8 COMPIZ_CONFIG_PROFILE=ubuntu IM_CONFIG_PHASE=1 PAPERSIZE=letter GDMSESSION=ubuntu SESSIONTYPE=gnome-session GTK2_MODULES=overlay-scrollbar SHLVL=1 HOME=/home/daimms XDG_SEAT=seat0 LANGUAGE=en_AU:en_US:en GNOME_DESKTOP_SESSION_ID=this-is-deprecated UPSTART_INSTANCE= UPSTART_EVENTS=xsession started XDG_SESSION_DESKTOP=ubuntu LOGNAME=daimms COMPIZ_BIN_PATH=/usr/bin/ DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-gvVqAqwrcR XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop QT4_IM_MODULE=xim LESSOPEN=| /usr/bin/lesspipe %s PROMPT_COMMAND=__prompt_command INSTANCE= UPSTART_JOB=unity7 XDG_RUNTIME_DIR=/run/user/1000 DISPLAY=:0 XDG_CURRENT_DESKTOP=Unity GTK_IM_MODULE=ibus LESSCLOSE=/usr/bin/lesspipe %s %s LC_TIME=en_US.UTF-8 LC_NAME=en_US.UTF-8 XAUTHORITY=/home/daimms/.Xauthority _=/usr/bin/env OLDPWD=/home/daimms/dev/Tyriar/xterm.js </code></pre></div> <p dir="auto">Integrated terminal env:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="❯ env XDG_VTNR=7 LC_PAPER=en_US.UTF-8 VSCODE_CLI=1 LC_ADDRESS=en_US.UTF-8 XDG_SESSION_ID=c2 XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/daimms LC_MONETARY=en_US.UTF-8 CLUTTER_IM_MODULE=xim ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 SESSION=ubuntu GPG_AGENT_INFO=/home/daimms/.gnupg/S.gpg-agent:0:1 TERM=xterm VTE_VERSION=4205 SHELL=/bin/bash QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 LC_NUMERIC=en_US.UTF-8 UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1421 GNOME_KEYRING_CONTROL= GTK_MODULES=gail:atk-bridge:unity-gtk-module USER=daimms LS_COLORS=no=00:fi=00:di=1;34:ln=1;36:pi=40;33:so=1;35:bd=1;40;33:cd=1;40;33:or=1;40;31:ex=1;32:*.tar=1;31:*.tgz=1;31:*.arj=1;31:*.taz=1;31:*.lzh=1;31:*.zip=1;31:*.z=1;31:*.Z =1;31:*.gz=1;31:*.deb=1;31:*.bmp=35:*.gif=35:*.jpg=35:*.png=35:*.ppm=35:*.tga=35:*.tif=35:*.xbm=35:*.xpm=35:*.avi=35:*.mpg=35: LC_TELEPHONE=en_US.UTF-8 QT_ACCESSIBILITY=1 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q DESKTOP_SESSION=ubuntu PATH=/home/daimms/.npm-packages/bin:/home/daimms/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin QT_IM_MODULE=ibus QT_QPA_PLATFORMTHEME=appmenu-qt5 LC_IDENTIFICATION=en_US.UTF-8 XDG_SESSION_TYPE=x11 PWD=/home/daimms/dev/Microsoft/vscode JOB=unity-settings-daemon ELECTRON_NO_ATTACH_CONSOLE=1 XMODIFIERS=@im=ibus GNOME_KEYRING_PID= LANG=en_AU.UTF-8 GDM_LANG=en_AU MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path NODE_PATH=/home/daimms/.npm-packages/lib/node_modules:/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript LC_MEASUREMENT=en_US.UTF-8 COMPIZ_CONFIG_PROFILE=ubuntu IM_CONFIG_PHASE=1 PTYPID=6141 PAPERSIZE=letter GDMSESSION=ubuntu SESSIONTYPE=gnome-session GTK2_MODULES=overlay-scrollbar PTYCWD=/home/daimms/dev/Microsoft/vscode SHLVL=3 HOME=/home/daimms XDG_SEAT=seat0 LANGUAGE=en_AU:en_US:en VSCODE_NLS_CONFIG={&quot;locale&quot;:&quot;en-gb&quot;,&quot;availableLanguages&quot;:{}} GNOME_DESKTOP_SESSION_ID=this-is-deprecated PTYSHELL=/bin/bash VSCODE_SHARED_IPC_HOOK=/tmp/Code - Insiders-cd6740-shared.sock UPSTART_INSTANCE= UPSTART_EVENTS=xsession started XDG_SESSION_DESKTOP=ubuntu LOGNAME=daimms COMPIZ_BIN_PATH=/usr/bin/ VSCODE_IPC_HOOK=/tmp/Code - Insiders-cd6740.sock DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-gvVqAqwrcR XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop QT4_IM_MODULE=xim LESSOPEN=| /usr/bin/lesspipe %s PROMPT_COMMAND=__prompt_command INSTANCE= UPSTART_JOB=unity7 XDG_RUNTIME_DIR=/run/user/1000 DISPLAY=:0 XDG_CURRENT_DESKTOP=Unity GTK_IM_MODULE=ibus LESSCLOSE=/usr/bin/lesspipe %s %s LC_TIME=en_US.UTF-8 LC_NAME=en_US.UTF-8 XAUTHORITY=/home/daimms/.Xauthority _=/usr/bin/env"><pre class="notranslate"><code class="notranslate">❯ env XDG_VTNR=7 LC_PAPER=en_US.UTF-8 VSCODE_CLI=1 LC_ADDRESS=en_US.UTF-8 XDG_SESSION_ID=c2 XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/daimms LC_MONETARY=en_US.UTF-8 CLUTTER_IM_MODULE=xim ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 SESSION=ubuntu GPG_AGENT_INFO=/home/daimms/.gnupg/S.gpg-agent:0:1 TERM=xterm VTE_VERSION=4205 SHELL=/bin/bash QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 LC_NUMERIC=en_US.UTF-8 UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1421 GNOME_KEYRING_CONTROL= GTK_MODULES=gail:atk-bridge:unity-gtk-module USER=daimms LS_COLORS=no=00:fi=00:di=1;34:ln=1;36:pi=40;33:so=1;35:bd=1;40;33:cd=1;40;33:or=1;40;31:ex=1;32:*.tar=1;31:*.tgz=1;31:*.arj=1;31:*.taz=1;31:*.lzh=1;31:*.zip=1;31:*.z=1;31:*.Z =1;31:*.gz=1;31:*.deb=1;31:*.bmp=35:*.gif=35:*.jpg=35:*.png=35:*.ppm=35:*.tga=35:*.tif=35:*.xbm=35:*.xpm=35:*.avi=35:*.mpg=35: LC_TELEPHONE=en_US.UTF-8 QT_ACCESSIBILITY=1 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q DESKTOP_SESSION=ubuntu PATH=/home/daimms/.npm-packages/bin:/home/daimms/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin QT_IM_MODULE=ibus QT_QPA_PLATFORMTHEME=appmenu-qt5 LC_IDENTIFICATION=en_US.UTF-8 XDG_SESSION_TYPE=x11 PWD=/home/daimms/dev/Microsoft/vscode JOB=unity-settings-daemon ELECTRON_NO_ATTACH_CONSOLE=1 XMODIFIERS=@im=ibus GNOME_KEYRING_PID= LANG=en_AU.UTF-8 GDM_LANG=en_AU MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path NODE_PATH=/home/daimms/.npm-packages/lib/node_modules:/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript LC_MEASUREMENT=en_US.UTF-8 COMPIZ_CONFIG_PROFILE=ubuntu IM_CONFIG_PHASE=1 PTYPID=6141 PAPERSIZE=letter GDMSESSION=ubuntu SESSIONTYPE=gnome-session GTK2_MODULES=overlay-scrollbar PTYCWD=/home/daimms/dev/Microsoft/vscode SHLVL=3 HOME=/home/daimms XDG_SEAT=seat0 LANGUAGE=en_AU:en_US:en VSCODE_NLS_CONFIG={"locale":"en-gb","availableLanguages":{}} GNOME_DESKTOP_SESSION_ID=this-is-deprecated PTYSHELL=/bin/bash VSCODE_SHARED_IPC_HOOK=/tmp/Code - Insiders-cd6740-shared.sock UPSTART_INSTANCE= UPSTART_EVENTS=xsession started XDG_SESSION_DESKTOP=ubuntu LOGNAME=daimms COMPIZ_BIN_PATH=/usr/bin/ VSCODE_IPC_HOOK=/tmp/Code - Insiders-cd6740.sock DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-gvVqAqwrcR XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop QT4_IM_MODULE=xim LESSOPEN=| /usr/bin/lesspipe %s PROMPT_COMMAND=__prompt_command INSTANCE= UPSTART_JOB=unity7 XDG_RUNTIME_DIR=/run/user/1000 DISPLAY=:0 XDG_CURRENT_DESKTOP=Unity GTK_IM_MODULE=ibus LESSCLOSE=/usr/bin/lesspipe %s %s LC_TIME=en_US.UTF-8 LC_NAME=en_US.UTF-8 XAUTHORITY=/home/daimms/.Xauthority _=/usr/bin/env </code></pre></div>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="request.meta['handle_httpstatus_all'] = True dfd = self.crawler.engine.download(request, info.spider)"><pre class="notranslate"><code class="notranslate">request.meta['handle_httpstatus_all'] = True dfd = self.crawler.engine.download(request, info.spider) </code></pre></div> <p dir="auto">When Media Pipeline schedules request it attached <code class="notranslate">handle_httpstatus_all</code> meta which prevents Redirect Middleware from doing it's job. This breaks download of images that require redirect, mostly urls that need to redirect from <code class="notranslate">http</code> to <code class="notranslate">https</code>.</p> <p dir="auto">Maybe implement a setting to enable redirects in this pipeline?</p>
<p dir="auto">Basically, what's happened is that my spider is unable to download the files because the file_urls provided are actually redirected to the final download link. However, because of the following code, the redirect download middleware is effectively disabled, which makes the download fail.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def _check_media_to_download(self, result, request, info): if result is not None: return result if self.download_func: # this ugly code was left only to support tests. TODO: remove dfd = mustbe_deferred(self.download_func, request, info.spider) dfd.addCallbacks( callback=self.media_downloaded, callbackArgs=(request, info), errback=self.media_failed, errbackArgs=(request, info)) else: request.meta['handle_httpstatus_all'] = True dfd = self.crawler.engine.download(request, info.spider) dfd.addCallbacks( callback=self.media_downloaded, callbackArgs=(request, info), errback=self.media_failed, errbackArgs=(request, info)) return dfd"><pre class="notranslate"><code class="notranslate">def _check_media_to_download(self, result, request, info): if result is not None: return result if self.download_func: # this ugly code was left only to support tests. TODO: remove dfd = mustbe_deferred(self.download_func, request, info.spider) dfd.addCallbacks( callback=self.media_downloaded, callbackArgs=(request, info), errback=self.media_failed, errbackArgs=(request, info)) else: request.meta['handle_httpstatus_all'] = True dfd = self.crawler.engine.download(request, info.spider) dfd.addCallbacks( callback=self.media_downloaded, callbackArgs=(request, info), errback=self.media_failed, errbackArgs=(request, info)) return dfd </code></pre></div> <p dir="auto">And here is the check in the redirect middleware that disables it:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (request.meta.get('dont_redirect', False) or response.status in getattr(spider, 'handle_httpstatus_list', []) or response.status in request.meta.get('handle_httpstatus_list', []) or request.meta.get('handle_httpstatus_all', False)): return response "><pre class="notranslate"><code class="notranslate">if (request.meta.get('dont_redirect', False) or response.status in getattr(spider, 'handle_httpstatus_list', []) or response.status in request.meta.get('handle_httpstatus_list', []) or request.meta.get('handle_httpstatus_all', False)): return response </code></pre></div> <p dir="auto">My question is: What is the point of enabling the handling of httpstatus_all, when it effectively disables all of the checks?</p>
1
<p dir="auto">$ npm install @discordjs/opus<br> npm ERR! cb() never called!</p> <p dir="auto">npm ERR! This is an error with npm itself. Please report this error at:</p> <p dir="auto">this is the error that i got on installing some packages for my app</p>
<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">When I try to install a package from github using ssh</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm i -g github:georgestech/denis-cli"><pre class="notranslate"><code class="notranslate">npm i -g github:georgestech/denis-cli </code></pre></div> <p dir="auto">I have to following output</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/usr/local/lib/node_modules/@georgestech/denis-cli $ ls README.md bin node_modules package-lock.json package.json types"><pre class="notranslate"><code class="notranslate">/usr/local/lib/node_modules/@georgestech/denis-cli $ ls README.md bin node_modules package-lock.json package.json types </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ denis CLI to manage developer's common tasks VERSION @georgestech/denis-cli/21.8.24-3379953 linux-x64 node-v14.16.0 USAGE $ denis [COMMAND] COMMANDS help display help for denis"><pre class="notranslate"><code class="notranslate">$ denis CLI to manage developer's common tasks VERSION @georgestech/denis-cli/21.8.24-3379953 linux-x64 node-v14.16.0 USAGE $ denis [COMMAND] COMMANDS help display help for denis </code></pre></div> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">When I install the same package from github repository</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm config set @georgestech:registry https://npm.pkg.github.com/ npm config set //npm.pkg.github.com/:_authToken *** npm i -g @georgestech/denis-cli"><pre class="notranslate"><code class="notranslate">npm config set @georgestech:registry https://npm.pkg.github.com/ npm config set //npm.pkg.github.com/:_authToken *** npm i -g @georgestech/denis-cli </code></pre></div> <p dir="auto">I have to following output</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/usr/local/lib/node_modules/@georgestech/denis-cli $ ls README.md bin lib node_modules package-lock.json package.json types"><pre class="notranslate"><code class="notranslate">/usr/local/lib/node_modules/@georgestech/denis-cli $ ls README.md bin lib node_modules package-lock.json package.json types </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ denis CLI to manage developer's common tasks VERSION @georgestech/denis-cli/21.8.24-3379953 linux-x64 node-v14.16.0 USAGE $ denis [COMMAND] TOPICS db manage your local database COMMANDS help display help for denis install install project dependencies publish publish current project on our github registry release create a release of the current project using calver version number update update project dependencies"><pre class="notranslate"><code class="notranslate">$ denis CLI to manage developer's common tasks VERSION @georgestech/denis-cli/21.8.24-3379953 linux-x64 node-v14.16.0 USAGE $ denis [COMMAND] TOPICS db manage your local database COMMANDS help display help for denis install install project dependencies publish publish current project on our github registry release create a release of the current project using calver version number update update project dependencies </code></pre></div> <h3 dir="auto">Steps To Reproduce</h3> <p dir="auto">on each commit, the github ci do:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="update package.json version field with $version git add package.json package-lock.json git commit -m &quot;🔖 Release $version&quot; git tag -a $version -m &quot;🔖 Release $version&quot; git tag -f -a $daily_version git push git push -f --tags"><pre class="notranslate"><code class="notranslate">update package.json version field with $version git add package.json package-lock.json git commit -m "🔖 Release $version" git tag -a $version -m "🔖 Release $version" git tag -f -a $daily_version git push git push -f --tags </code></pre></div> <p dir="auto">21.8.24-3379953 and 21.8.24 point to the same commit</p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>OS: Ubuntu 20.04, docker node:lts, github action,...</li> <li>Node: lts</li> <li>npm: 6.14.11 and 7@latest</li> </ul>
0
<p dir="auto"><strong>Describe the bug</strong></p> <p dir="auto">There is an issue with some incorrect texture colours when loading a GLTF model via <code class="notranslate">GLTFLoader</code> when <code class="notranslate">WebGLRenderer</code> is instantiated with <code class="notranslate">alpha</code> set to <code class="notranslate">true</code>.</p> <p dir="auto"><strong>To Reproduce</strong></p> <p dir="auto">Steps to reproduce the behavior:</p> <p dir="auto">Instantiate <code class="notranslate">WebGLRenderer</code> with <code class="notranslate">alpha</code> set to <code class="notranslate">false</code>.</p> <p dir="auto"><em><strong>Code</strong></em></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as THREE from &quot;three&quot;; import { GLTFLoader } from &quot;three/examples/jsm/loaders/GLTFLoader&quot;; const renderer = new THREE.WebGLRenderer({ // ... antialias: true, alpha: true // this is what causes the texture colour issue }); const width = 1024; const height = 768; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 1000); const ambientLight = new THREE.AmbientLight(); scene.add(ambientLight); // Load model and add to scene const loader = new GLTFLoader(); loader.load(&quot;model.gltf&quot;, (gltf) =&gt; { scene.add(gltf.scene); }); // Render scene (function render() { renderer.render(scene, camera); requestAnimationFrame(animate); })();"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-c1">THREE</span> <span class="pl-k">from</span> <span class="pl-s">"three"</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">GLTFLoader</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"three/examples/jsm/loaders/GLTFLoader"</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">renderer</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">WebGLRenderer</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c">// ...</span> <span class="pl-c1">antialias</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">alpha</span>: <span class="pl-c1">true</span> <span class="pl-c">// this is what causes the texture colour issue</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">width</span> <span class="pl-c1">=</span> <span class="pl-c1">1024</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">height</span> <span class="pl-c1">=</span> <span class="pl-c1">768</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">scene</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">Scene</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">camera</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">PerspectiveCamera</span><span class="pl-kos">(</span><span class="pl-c1">75</span><span class="pl-kos">,</span> <span class="pl-s1">width</span> <span class="pl-c1">/</span> <span class="pl-s1">height</span><span class="pl-kos">,</span> <span class="pl-c1">0.1</span><span class="pl-kos">,</span> <span class="pl-c1">1000</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">ambientLight</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">AmbientLight</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">scene</span><span class="pl-kos">.</span><span class="pl-en">add</span><span class="pl-kos">(</span><span class="pl-s1">ambientLight</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Load model and add to scene</span> <span class="pl-k">const</span> <span class="pl-s1">loader</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">GLTFLoader</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">loader</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">(</span><span class="pl-s">"model.gltf"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">gltf</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">scene</span><span class="pl-kos">.</span><span class="pl-en">add</span><span class="pl-kos">(</span><span class="pl-s1">gltf</span><span class="pl-kos">.</span><span class="pl-c1">scene</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Render scene</span> <span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">renderer</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">scene</span><span class="pl-kos">,</span> <span class="pl-s1">camera</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">requestAnimationFrame</span><span class="pl-kos">(</span><span class="pl-s1">animate</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Live Demos</strong></p> <table role="table"> <thead> <tr> <th>alpha: true</th> <th>alpha: false</th> </tr> </thead> <tbody> <tr> <td><a href="https://codesandbox.io/s/pedantic-cloud-vgppt?file=/src/index.js" rel="nofollow">https://codesandbox.io/s/pedantic-cloud-vgppt?file=/src/index.js</a></td> <td><a href="https://codesandbox.io/s/dry-http-fdykp?file=/src/index.js" rel="nofollow">https://codesandbox.io/s/dry-http-fdykp?file=/src/index.js</a></td> </tr> </tbody> </table> <p dir="auto">Below is the output where <code class="notranslate">WebGLRenderer</code> has been instantiated with <code class="notranslate">alpha</code> set to <code class="notranslate">true</code> and <code class="notranslate">false</code></p> <table role="table"> <thead> <tr> <th>alpha: true</th> <th>alpha: false</th> </tr> </thead> <tbody> <tr> <td><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5284715/116463928-36d3a200-a863-11eb-980e-d29320fbdad2.png"><img src="https://user-images.githubusercontent.com/5284715/116463928-36d3a200-a863-11eb-980e-d29320fbdad2.png" alt="" style="max-width: 100%;"></a></td> <td><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5284715/116463976-48b54500-a863-11eb-8b8b-9000cccfa7d4.png"><img src="https://user-images.githubusercontent.com/5284715/116463976-48b54500-a863-11eb-8b8b-9000cccfa7d4.png" alt="image" style="max-width: 100%;"></a></td> </tr> </tbody> </table> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">I believe setting the <code class="notranslate">alpha</code> to <code class="notranslate">true</code> or <code class="notranslate">false</code> shouldn't have an effect on how solid textures are rendered. The expected behaviour would be for textures to render consistently regardless of the alpha setting.</p>
<p dir="auto">Redundant AR button on Safari</p> <p dir="auto">A clear and concise description of what the bug is. Before submitting, please remove unnecessary sections.</p> <p dir="auto"><strong>To Reproduce</strong></p> <p dir="auto">Steps to reproduce the behavior:</p> <ol dir="auto"> <li>Go to <a href="https://threejs.org/examples/?q=usdz#misc_exporter_usdz" rel="nofollow">'AR sample'</a></li> <li>See 2 icon of AR overlaid</li> </ol> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">Single AR button</p> <p dir="auto"><strong>Screenshots</strong></p> <p dir="auto"><strong>Platform:</strong></p> <ul dir="auto"> <li>Device: [Mobile]</li> <li>OS: [iOS 15]</li> <li>Browser: [Safari]</li> <li>Three.js version: [main]</li> </ul>
0
<p dir="auto">Pattern comprehension now supports</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RETURN [(a)--&gt;(b)--&gt;(c) WHERE b:Movie | [b.year,c.prop1] ] AS myColl"><pre class="notranslate"><code class="notranslate">RETURN [(a)--&gt;(b)--&gt;(c) WHERE b:Movie | [b.year,c.prop1] ] AS myColl </code></pre></div> <p dir="auto">but is does not support</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RETURN [(a)--&gt;(b)--&gt;(c),(b)--&gt;(d) WHERE b:Movie | [b.year,c.prop1,d.prop2] ] AS myColl"><pre class="notranslate"><code class="notranslate">RETURN [(a)--&gt;(b)--&gt;(c),(b)--&gt;(d) WHERE b:Movie | [b.year,c.prop1,d.prop2] ] AS myColl </code></pre></div>
<h2 dir="auto">Regex Failure for neo4j-admin</h2> <p dir="auto">Regex not detecting files along path, even though regex has successfully been tested on an online regex platform, as well as in Python. I have tried this regex with, and without double-quotes, and confirmed the path it's intended to represent is valid by successfully ingesting from the full-path.</p> <ul dir="auto"> <li>Neo4j version: 4.4.12</li> <li>Operating system: Ubuntu 20.04</li> <li>API/Driver: Neo4j-admin import</li> <li>Steps to reproduce:</li> </ul> <ol dir="auto"> <li>Place multiple .tsv files with headers in a path like this (spread across multiple date sub-directories):<br> -<code class="notranslate"> /media/user/ext4_ssd/tsvs/entities/authors/2022-12-23/authors_xxx.tsv</code></li> <li>Execute the following command: <ul dir="auto"> <li><code class="notranslate">./neo4j-admin import --high-io=true --database=zero --skip-duplicate-nodes --ignore-empty-strings=true --verbose --delimiter='\t' --nodes=authors=/media/user/ext4_ssd/tsvs/entities/.*authors.*.tsv</code></li> </ul> </li> </ol> <ul dir="auto"> <li>Expected behavior <ul dir="auto"> <li>ingest all the .tsv files in the dated directory ending with xxx.tsv</li> </ul> </li> <li>Actual behavior <ul dir="auto"> <li><code class="notranslate">Invalid value for option '--nodes' at index 0 ([&lt;label&gt;[:&lt;label&gt;]...=]&lt;files&gt;): Invalid nodes file: authors=/media/suciokhan/ext4_ssd/extracted_tsvs_mini/entities/.*authors.*.tsv (java.lang.IllegalArgumentException: File '/media/suciokhan/ext4_ssd/extracted_tsvs_mini/entities/.*authors.*.tsv' doesn't exist)</code></li> </ul> </li> </ul> <p dir="auto">I have attempted this both with/without quoting (single and double) the regex path, as well as replacing "nodes=authors=/path" with "nodes /path", to reflect the example given in the 4.4 operations manual (<a href="https://neo4j.com/docs/operations-manual/current/tools/neo4j-admin/neo4j-admin-import/#import-tool-multiple-input-files-regex-example" rel="nofollow">https://neo4j.com/docs/operations-manual/current/tools/neo4j-admin/neo4j-admin-import/#import-tool-multiple-input-files-regex-example</a>).</p> <p dir="auto">Link to similar (closed) issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="724594482" data-permission-text="Title is private" data-url="https://github.com/neo4j/neo4j/issues/12610" data-hovercard-type="issue" data-hovercard-url="/neo4j/neo4j/issues/12610/hovercard" href="https://github.com/neo4j/neo4j/issues/12610">#12610</a></p>
0
<p dir="auto">Currently when users use words that can't be use as an identifier (this case will be more common as module and class becomes strict mode code), we should then have better binding diagnostics to report this error instead of <code class="notranslate">Duplicate identifier '(Missing)'.</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="interface Struct { a: boolean b: number } let v1: Struct = {a: true, b:1} let v2: Struct = Object.assign({}, v1, { b: false })"><pre class="notranslate"><code class="notranslate">interface Struct { a: boolean b: number } let v1: Struct = {a: true, b:1} let v2: Struct = Object.assign({}, v1, { b: false }) </code></pre></div> <p dir="auto"><code class="notranslate">v2</code> variable now contains <code class="notranslate">{a: true, b: false}</code>, which is definetely not <code class="notranslate">Struct</code> type. But there is no compile-time error there. How come?</p>
0
<p dir="auto">An arrow function as part of an extends clause requires parenthesis. This was changed before ES2015 became final, see <a href="http://wiki.ecmascript.org/doku.php?id=harmony%3Aspecification_drafts#january_20_2014_draft_rev_22" rel="nofollow">http://wiki.ecmascript.org/doku.php?id=harmony%3Aspecification_drafts#january_20_2014_draft_rev_22</a></p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gabelevi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gabelevi">@gabelevi</a> summarized the issue internally at FB:</p> <ol dir="auto"> <li>After "extends" there is a LeftHandSideExpression: <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-class-definitions" rel="nofollow">http://www.ecma-international.org/ecma-262/6.0/#sec-class-definitions</a></li> <li>LeftHandSideExpression is a CallExpression or a NewExpression: <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-left-hand-side-expressions" rel="nofollow">http://www.ecma-international.org/ecma-262/6.0/#sec-left-hand-side-expressions</a></li> <li>ArrowFunction is an AssignmentExpression: <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-assignment-operators" rel="nofollow">http://www.ecma-international.org/ecma-262/6.0/#sec-assignment-operators</a></li> </ol>
<p dir="auto">These non-programs are accepted by babel: <code class="notranslate">!()=&gt;0</code>, <code class="notranslate">a + ()=&gt;0</code>, <code class="notranslate">a || ()=&gt;0</code>, etc.</p> <p dir="auto">Arrows should have the precedence of an assignment expression.</p>
1
<h3 dir="auto">Feature request</h3> <p dir="auto">Thank you for the awesome framework!<br> For my work I wanted to use <code class="notranslate">transformers.pipelines.token_classification.TokenClassificationPipeline</code> in batch mode, since it is much faster on GPU, but I wanted to keep all the functionality for grouping entities.<br> So I want to suggest something like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="nlp = pipeline(&quot;ner&quot;, model=model, tokenizer=tokenizer, device = 0 if torch.cuda.is_available() else -1, aggregation_strategy=&quot;average&quot;, batch_size=16)"><pre class="notranslate"><code class="notranslate">nlp = pipeline("ner", model=model, tokenizer=tokenizer, device = 0 if torch.cuda.is_available() else -1, aggregation_strategy="average", batch_size=16) </code></pre></div> <h3 dir="auto">Motivation</h3> <p dir="auto">I implemented it for myself and think it would be cool to have this functionality "out-of-the-box" for community to enjoy the speed up. (And it really gives a huge speed up)</p> <h3 dir="auto">Your contribution</h3> <p dir="auto">I am willing to contribute and implement this change for TokenClassification task (also for TextClassification, FeatureExtraction should be pretty much same). Have not worked with other pipelines, so not sure how batching is implemented there, but I am willing to try and contribute.</p>
<h3 dir="auto">System Info</h3> <p dir="auto">python: 3.8<br> transformers: 4.23.1</p> <h3 dir="auto">Who can help?</h3> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/patrickvonplaten/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/patrickvonplaten">@patrickvonplaten</a></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" checked=""> 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"> My own task or dataset (give details below)</li> </ul> <h3 dir="auto">Reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from transformers import Wav2Vec2Tokenizer, Wav2Vec2CTCTokenizer def main() -&gt; None: # [NOTE]: plsace insert save_dir path output_dir = r&quot;./output_dir&quot; encoder1_tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(&quot;facebook/wav2vec2-base-960h&quot;) encoder2_tokenizer = Wav2Vec2Tokenizer.from_pretrained(&quot;facebook/wav2vec2-base-960h&quot;) encoder1_tokenizer.vocab_files_name = { &quot;vocab_file&quot;: &quot;encoder1_vocab.json&quot;, &quot;tokenizer_config_file&quot;: &quot;encoder1_tokenizer_config.json&quot;, } encoder2_tokenizer.vocab_files_name = { &quot;vocab_file&quot;: &quot;encoder2_vocab.json&quot;, &quot;tokenizer_config_file&quot;: &quot;encoder2_tokenizer_config.json&quot;, } encoder1_tokenizer.save_vocabulary(save_diretory=output_dir) encoder2_tokenizer.save_vocabulary(save_diretory=output_dir) if &quot;__main__&quot; in __name__: main()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">transformers</span> <span class="pl-k">import</span> <span class="pl-v">Wav2Vec2Tokenizer</span>, <span class="pl-v">Wav2Vec2CTCTokenizer</span> <span class="pl-k">def</span> <span class="pl-en">main</span>() <span class="pl-c1">-&gt;</span> <span class="pl-c1">None</span>: <span class="pl-c"># [NOTE]: plsace insert save_dir path</span> <span class="pl-s1">output_dir</span> <span class="pl-c1">=</span> <span class="pl-s">r"./output_dir"</span> <span class="pl-s1">encoder1_tokenizer</span> <span class="pl-c1">=</span> <span class="pl-v">Wav2Vec2CTCTokenizer</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s">"facebook/wav2vec2-base-960h"</span>) <span class="pl-s1">encoder2_tokenizer</span> <span class="pl-c1">=</span> <span class="pl-v">Wav2Vec2Tokenizer</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s">"facebook/wav2vec2-base-960h"</span>) <span class="pl-s1">encoder1_tokenizer</span>.<span class="pl-s1">vocab_files_name</span> <span class="pl-c1">=</span> { <span class="pl-s">"vocab_file"</span>: <span class="pl-s">"encoder1_vocab.json"</span>, <span class="pl-s">"tokenizer_config_file"</span>: <span class="pl-s">"encoder1_tokenizer_config.json"</span>, } <span class="pl-s1">encoder2_tokenizer</span>.<span class="pl-s1">vocab_files_name</span> <span class="pl-c1">=</span> { <span class="pl-s">"vocab_file"</span>: <span class="pl-s">"encoder2_vocab.json"</span>, <span class="pl-s">"tokenizer_config_file"</span>: <span class="pl-s">"encoder2_tokenizer_config.json"</span>, } <span class="pl-s1">encoder1_tokenizer</span>.<span class="pl-en">save_vocabulary</span>(<span class="pl-s1">save_diretory</span><span class="pl-c1">=</span><span class="pl-s1">output_dir</span>) <span class="pl-s1">encoder2_tokenizer</span>.<span class="pl-en">save_vocabulary</span>(<span class="pl-s1">save_diretory</span><span class="pl-c1">=</span><span class="pl-s1">output_dir</span>) <span class="pl-k">if</span> <span class="pl-s">"__main__"</span> <span class="pl-c1">in</span> <span class="pl-s1">__name__</span>: <span class="pl-en">main</span>()</pre></div> <h3 dir="auto">Expected behavior</h3> <p dir="auto">This is the problem that occurred when the bi-encoder had to be placed on Wav2Vec2.<br> When i saving the model<br> To prevent overwriting due to duplication when saving in tokenizer, i may have named files that are saved differently.</p> <p dir="auto">I overridden vocab_files_name as shown in Reproduction.</p> <p dir="auto">But later I found out that the file hasn't been renamed</p> <p dir="auto">So I looked up the problem and found the following problem</p> <p dir="auto">tokenization_wav2vec2.py &gt; <a href="https://github.com/huggingface/transformers/blob/v4.24.0/src/transformers/models/wav2vec2/tokenization_wav2vec2.py#L127-L161">L127-161</a></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Wav2Vec2CTCTokenizer(PreTrainedTokenizer): &quot;&quot;&quot; Constructs a Wav2Vec2CTC tokenizer. This tokenizer inherits from [`PreTrainedTokenizer`] which contains some of the main methods. Users should refer to the superclass for more information regarding such methods. Args: vocab_file (`str`): File containing the vocabulary. bos_token (`str`, *optional*, defaults to `&quot;&lt;s&gt;&quot;`): The beginning of sentence token. eos_token (`str`, *optional*, defaults to `&quot;&lt;/s&gt;&quot;`): The end of sentence token. unk_token (`str`, *optional*, defaults to `&quot;&lt;unk&gt;&quot;`): The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this token instead. pad_token (`str`, *optional*, defaults to `&quot;&lt;pad&gt;&quot;`): The token used for padding, for example when batching sequences of different lengths. word_delimiter_token (`str`, *optional*, defaults to `&quot;|&quot;`): The token used for defining the end of a word. do_lower_case (`bool`, *optional*, defaults to `False`): Whether or not to accept lowercase input and lowercase the output when decoding. **kwargs Additional keyword arguments passed along to [`PreTrainedTokenizer`] &quot;&quot;&quot; vocab_files_names = VOCAB_FILES_NAMES # [NOTE]: here pretrained_vocab_files_map = PRETRAINED_VOCAB_FILES_MAP max_model_input_sizes = PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES model_input_names = [&quot;input_ids&quot;, &quot;attention_mask&quot;] def __init__( "><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Wav2Vec2CTCTokenizer</span>(<span class="pl-v">PreTrainedTokenizer</span>): <span class="pl-s">"""</span> <span class="pl-s"> Constructs a Wav2Vec2CTC tokenizer.</span> <span class="pl-s"> This tokenizer inherits from [`PreTrainedTokenizer`] which contains some of the main methods. Users should refer to</span> <span class="pl-s"> the superclass for more information regarding such methods.</span> <span class="pl-s"> Args:</span> <span class="pl-s"> vocab_file (`str`):</span> <span class="pl-s"> File containing the vocabulary.</span> <span class="pl-s"> bos_token (`str`, *optional*, defaults to `"&lt;s&gt;"`):</span> <span class="pl-s"> The beginning of sentence token.</span> <span class="pl-s"> eos_token (`str`, *optional*, defaults to `"&lt;/s&gt;"`):</span> <span class="pl-s"> The end of sentence token.</span> <span class="pl-s"> unk_token (`str`, *optional*, defaults to `"&lt;unk&gt;"`):</span> <span class="pl-s"> The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this</span> <span class="pl-s"> token instead.</span> <span class="pl-s"> pad_token (`str`, *optional*, defaults to `"&lt;pad&gt;"`):</span> <span class="pl-s"> The token used for padding, for example when batching sequences of different lengths.</span> <span class="pl-s"> word_delimiter_token (`str`, *optional*, defaults to `"|"`):</span> <span class="pl-s"> The token used for defining the end of a word.</span> <span class="pl-s"> do_lower_case (`bool`, *optional*, defaults to `False`):</span> <span class="pl-s"> Whether or not to accept lowercase input and lowercase the output when decoding.</span> <span class="pl-s"> **kwargs</span> <span class="pl-s"> Additional keyword arguments passed along to [`PreTrainedTokenizer`]</span> <span class="pl-s"> """</span> <span class="pl-s1">vocab_files_names</span> <span class="pl-c1">=</span> <span class="pl-v">VOCAB_FILES_NAMES</span> <span class="pl-c"># [NOTE]: here</span> <span class="pl-s1">pretrained_vocab_files_map</span> <span class="pl-c1">=</span> <span class="pl-v">PRETRAINED_VOCAB_FILES_MAP</span> <span class="pl-s1">max_model_input_sizes</span> <span class="pl-c1">=</span> <span class="pl-v">PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES</span> <span class="pl-s1">model_input_names</span> <span class="pl-c1">=</span> [<span class="pl-s">"input_ids"</span>, <span class="pl-s">"attention_mask"</span>] <span class="pl-k">def</span> <span class="pl-s1">__init__</span>(</pre></div> <p dir="auto">VOCAB_FILES_NAMES sets the default value for vocab_files_names</p> <p dir="auto">tokenization_wav2vec2.py &gt; <a href="https://github.com/huggingface/transformers/blob/v4.24.0/src/transformers/models/wav2vec2/tokenization_wav2vec2.py#L595-L606">L595-606</a></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" def save_vocabulary(self, save_directory: str, filename_prefix: Optional[str] = None) -&gt; Tuple[str]: if not os.path.isdir(save_directory): logger.error(f&quot;Vocabulary path ({save_directory}) should be a directory&quot;) return vocab_file = os.path.join( save_directory, (filename_prefix + &quot;-&quot; if filename_prefix else &quot;&quot;) + VOCAB_FILES_NAMES[&quot;vocab_file&quot;] # [NOTE]: here ) with open(vocab_file, &quot;w&quot;, encoding=&quot;utf-8&quot;) as f: f.write(json.dumps(self.encoder, indent=2, sort_keys=True, ensure_ascii=False) + &quot;\n&quot;) return (vocab_file,)"><pre class="notranslate"> <span class="pl-k">def</span> <span class="pl-en">save_vocabulary</span>(<span class="pl-s1">self</span>, <span class="pl-s1">save_directory</span>: <span class="pl-s1">str</span>, <span class="pl-s1">filename_prefix</span>: <span class="pl-v">Optional</span>[<span class="pl-s1">str</span>] <span class="pl-c1">=</span> <span class="pl-c1">None</span>) <span class="pl-c1">-&gt;</span> <span class="pl-v">Tuple</span>[<span class="pl-s1">str</span>]: <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">os</span>.<span class="pl-s1">path</span>.<span class="pl-en">isdir</span>(<span class="pl-s1">save_directory</span>): <span class="pl-s1">logger</span>.<span class="pl-en">error</span>(<span class="pl-s">f"Vocabulary path (<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">save_directory</span><span class="pl-kos">}</span></span>) should be a directory"</span>) <span class="pl-k">return</span> <span class="pl-s1">vocab_file</span> <span class="pl-c1">=</span> <span class="pl-s1">os</span>.<span class="pl-s1">path</span>.<span class="pl-en">join</span>( <span class="pl-s1">save_directory</span>, (<span class="pl-s1">filename_prefix</span> <span class="pl-c1">+</span> <span class="pl-s">"-"</span> <span class="pl-k">if</span> <span class="pl-s1">filename_prefix</span> <span class="pl-k">else</span> <span class="pl-s">""</span>) <span class="pl-c1">+</span> <span class="pl-v">VOCAB_FILES_NAMES</span>[<span class="pl-s">"vocab_file"</span>] <span class="pl-c"># [NOTE]: here</span> ) <span class="pl-k">with</span> <span class="pl-en">open</span>(<span class="pl-s1">vocab_file</span>, <span class="pl-s">"w"</span>, <span class="pl-s1">encoding</span><span class="pl-c1">=</span><span class="pl-s">"utf-8"</span>) <span class="pl-k">as</span> <span class="pl-s1">f</span>: <span class="pl-s1">f</span>.<span class="pl-en">write</span>(<span class="pl-s1">json</span>.<span class="pl-en">dumps</span>(<span class="pl-s1">self</span>.<span class="pl-s1">encoder</span>, <span class="pl-s1">indent</span><span class="pl-c1">=</span><span class="pl-c1">2</span>, <span class="pl-s1">sort_keys</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">ensure_ascii</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-c1">+</span> <span class="pl-s">"<span class="pl-cce">\n</span>"</span>) <span class="pl-k">return</span> (<span class="pl-s1">vocab_file</span>,)</pre></div> <p dir="auto">However, if you look at the save_vocabulary function, "vocab_files_names" is not included in the checked part, but "VOCAB_FILES_NAMES" is included, so the file name does not change even if you override "vocab_files_names"</p> <p dir="auto">So I want to change that "VOCAB_FILES_NAMES" part to "vocab_files_names"<br> And this was on Wav2Vec2CTCTokenizer and Wav2Vec2Tokenizer</p>
0
<p dir="auto">Flutter crash report; please file at <a href="https://github.com/flutter/flutter/issues">https://github.com/flutter/flutter/issues</a>.</p> <h2 dir="auto">command</h2> <p dir="auto">flutter doctor</p> <h2 dir="auto">exception</h2> <p dir="auto">ArgumentError: Invalid argument(s): Invalid locale 'C.UTF-8'</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#0 Intl._throwLocaleError (package:intl/intl.dart:231) #1 Intl.verifiedLocale (package:intl/intl.dart:225) #2 Intl.verifiedLocale (package:intl/intl.dart:210) #3 new NumberFormat._forPattern (package:intl/src/intl/number_format.dart:486) #4 new NumberFormat.decimalPattern (package:intl/src/intl/number_format.dart:175) #5 kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:114) #6 kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:114) #7 getElapsedAsMilliseconds (package:flutter_tools/src/base/utils.dart:122) #8 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:234) &lt;asynchronous suspension&gt; #9 CommandRunner.runCommand (package:args/command_runner.dart:194) &lt;asynchronous suspension&gt; #10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:286) &lt;asynchronous suspension&gt; #11 CommandRunner.run.&lt;anonymous closure&gt; (package:args/command_runner.dart:109) #12 new Future.sync (dart:async/future.dart:222) #13 CommandRunner.run (package:args/command_runner.dart:109) #14 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:166) #15 run.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:90) &lt;asynchronous suspension&gt; #16 AppContext._run (package:flutter_tools/src/base/context.dart:76) &lt;asynchronous suspension&gt; #17 AppContext.runInZone.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:66) #18 _rootRun (dart:async/zone.dart:1126) #19 _CustomZone.run (dart:async/zone.dart:1023) #20 runZoned (dart:async/zone.dart:1501) #21 AppContext.runInZone (package:flutter_tools/src/base/context.dart:65) #22 run (package:flutter_tools/runner.dart:61) &lt;asynchronous suspension&gt; #23 main (package:flutter_tools/executable.dart:48) &lt;asynchronous suspension&gt; #24 main (file:///home/dracula/Desktop/flutter/packages/flutter_tools/bin/flutter_tools.dart:16) #25 _startIsolate.&lt;anonymous closure&gt; (dart:isolate-patch/dart:isolate/isolate_patch.dart:277) #26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)"><pre class="notranslate"><code class="notranslate">#0 Intl._throwLocaleError (package:intl/intl.dart:231) #1 Intl.verifiedLocale (package:intl/intl.dart:225) #2 Intl.verifiedLocale (package:intl/intl.dart:210) #3 new NumberFormat._forPattern (package:intl/src/intl/number_format.dart:486) #4 new NumberFormat.decimalPattern (package:intl/src/intl/number_format.dart:175) #5 kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:114) #6 kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:114) #7 getElapsedAsMilliseconds (package:flutter_tools/src/base/utils.dart:122) #8 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:234) &lt;asynchronous suspension&gt; #9 CommandRunner.runCommand (package:args/command_runner.dart:194) &lt;asynchronous suspension&gt; #10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:286) &lt;asynchronous suspension&gt; #11 CommandRunner.run.&lt;anonymous closure&gt; (package:args/command_runner.dart:109) #12 new Future.sync (dart:async/future.dart:222) #13 CommandRunner.run (package:args/command_runner.dart:109) #14 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:166) #15 run.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:90) &lt;asynchronous suspension&gt; #16 AppContext._run (package:flutter_tools/src/base/context.dart:76) &lt;asynchronous suspension&gt; #17 AppContext.runInZone.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:66) #18 _rootRun (dart:async/zone.dart:1126) #19 _CustomZone.run (dart:async/zone.dart:1023) #20 runZoned (dart:async/zone.dart:1501) #21 AppContext.runInZone (package:flutter_tools/src/base/context.dart:65) #22 run (package:flutter_tools/runner.dart:61) &lt;asynchronous suspension&gt; #23 main (package:flutter_tools/executable.dart:48) &lt;asynchronous suspension&gt; #24 main (file:///home/dracula/Desktop/flutter/packages/flutter_tools/bin/flutter_tools.dart:16) #25 _startIsolate.&lt;anonymous closure&gt; (dart:isolate-patch/dart:isolate/isolate_patch.dart:277) #26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165) </code></pre></div> <h2 dir="auto">flutter doctor</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[!] Flutter (Channel beta, v0.2.3, on Linux, locale C.UTF-8) • Flutter version 0.2.3 at /home/dracula/Desktop/flutter • Framework revision 5a58b36e36 (2 weeks ago), 2018-03-13 13:20:13 -0700 • Engine revision e61bb9ac3a • Dart version 2.0.0-dev.35.flutter-290c576264 ✗ Downloaded executables cannot execute on host. See https://github.com/flutter/flutter/issues/6207 for more information On Debian/Ubuntu/Mint: sudo apt-get install lib32stdc++6 On Fedora: dnf install libstdc++.i686 On Arch: pacman -S lib32-libstdc++5 [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.io/setup/#android-setup for detailed instructions). If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location. [✗] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.io/setup/#android-setup for detailed instructions). [✓] IntelliJ IDEA Ultimate Edition (version 2018.1) • IntelliJ at /media/dracula/msk/SOFTWARES/programming lang/idea-IU-181.4203.550 • Flutter plugin version 23.1.3 • Dart plugin version 181.4203.498 ! Doctor found issues in 3 categories."><pre class="notranslate"><code class="notranslate">[!] Flutter (Channel beta, v0.2.3, on Linux, locale C.UTF-8) • Flutter version 0.2.3 at /home/dracula/Desktop/flutter • Framework revision 5a58b36e36 (2 weeks ago), 2018-03-13 13:20:13 -0700 • Engine revision e61bb9ac3a • Dart version 2.0.0-dev.35.flutter-290c576264 ✗ Downloaded executables cannot execute on host. See https://github.com/flutter/flutter/issues/6207 for more information On Debian/Ubuntu/Mint: sudo apt-get install lib32stdc++6 On Fedora: dnf install libstdc++.i686 On Arch: pacman -S lib32-libstdc++5 [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.io/setup/#android-setup for detailed instructions). If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location. [✗] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.io/setup/#android-setup for detailed instructions). [✓] IntelliJ IDEA Ultimate Edition (version 2018.1) • IntelliJ at /media/dracula/msk/SOFTWARES/programming lang/idea-IU-181.4203.550 • Flutter plugin version 23.1.3 • Dart plugin version 181.4203.498 ! Doctor found issues in 3 categories. </code></pre></div>
<p dir="auto"><a href="https://giphy.com/gifs/mXFpFPmmNIe38jrAJK" rel="nofollow">https://giphy.com/gifs/mXFpFPmmNIe38jrAJK</a></p> <p dir="auto">Velocity becomes 0 as soon as I lift the finger after a fling.</p>
0
<p dir="auto">The first failure happened at ~9:20 PST 29/04/2015. The failure looks like that:</p> <p dir="auto">/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/density.go:158<br> Expected error:<br> &lt;*errors.errorString | 0xc20b84daa0&gt;: {<br> s: "Controller my-hostname-density3000-75cb549b-ee8e-11e4-ae78-42010af01555: Only found 3052 replicas out of 3000",<br> }<br> Controller my-hostname-density3000-75cb549b-ee8e-11e4-ae78-42010af01555: Only found 3052 replicas out of 3000<br> not to have occurred</p> <p dir="auto">It seems that because of some reason we are starting much more pods within a replication controller than expected. Another related failure:</p> <p dir="auto">Expected error:<br> &lt;*errors.errorString | 0xc2083b3050&gt;: {<br> s: "Number of reported pods changed: 3222 vs 3000",<br> }<br> Number of reported pods changed: 3222 vs 3000<br> not to have occurred</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/quinton-hoole/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/quinton-hoole">@quinton-hoole</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lavalamp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lavalamp">@lavalamp</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bprashanth/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bprashanth">@bprashanth</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/fgrzadkowski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/fgrzadkowski">@fgrzadkowski</a></p>
<p dir="auto">I haven't looked into the details yet, but it seems that a PR went in at around 16:30 PDT today (Wed 04/29) that is causing significantly more e2e failures than usual in our continuous integration.</p> <p dir="auto">I'll dig into it in the morning unless one of the oncalls gets there before me.</p>
1
<p dir="auto">The mathtext rendered in the 1.3.1 release does't work with the bundled pyparsing.py module (1.5.0).</p> <p dir="auto">Simply installing the latest version of the pyparsing.py module with easy install doesn't work. It does if the matplotlib\pyparsing.py file is overvritten with the newer version (2.0.1).</p> <p dir="auto">I don't know why the pyparsing.py module comes with the matplotlib source, but it could be useful to provide an option to allow using that installed manually.</p> <p dir="auto">Thank you!</p>
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">Because <code class="notranslate">IndexFormatter.__call__</code> doesn't round to the nearest integer but truncates/round up to the next integer, x ticks labels are duplicated when user pans plot to left, displaying values below minimum.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" import matplotlib.pyplot as plt from matplotlib.ticker import IndexFormatter x = [1, 2, 3, 4, 5] y = [1, 3, 5, 6, 0] x_labels = ['under', 'a', 'b', 'c', 'd', 'e', 'over'] fig, ax = plt.subplots() print(x[1]) ax.xaxis.set_major_formatter(IndexFormatter(x_labels)) ax.plot(x, y, '-o') plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">ticker</span> <span class="pl-k">import</span> <span class="pl-v">IndexFormatter</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>, <span class="pl-c1">5</span>] <span class="pl-s1">y</span> <span class="pl-c1">=</span> [<span class="pl-c1">1</span>, <span class="pl-c1">3</span>, <span class="pl-c1">5</span>, <span class="pl-c1">6</span>, <span class="pl-c1">0</span>] <span class="pl-s1">x_labels</span> <span class="pl-c1">=</span> [<span class="pl-s">'under'</span>, <span class="pl-s">'a'</span>, <span class="pl-s">'b'</span>, <span class="pl-s">'c'</span>, <span class="pl-s">'d'</span>, <span class="pl-s">'e'</span>, <span class="pl-s">'over'</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-en">print</span>(<span class="pl-s1">x</span>[<span class="pl-c1">1</span>]) <span class="pl-s1">ax</span>.<span class="pl-s1">xaxis</span>.<span class="pl-en">set_major_formatter</span>(<span class="pl-v">IndexFormatter</span>(<span class="pl-s1">x_labels</span>)) <span class="pl-s1">ax</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>, <span class="pl-s">'-o'</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/28050769/75695105-904c3b00-5c77-11ea-89ee-f9820b404858.png"><img src="https://user-images.githubusercontent.com/28050769/75695105-904c3b00-5c77-11ea-89ee-f9820b404858.png" alt="bug" style="max-width: 100%;"></a></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class IndexFormatter(Formatter): [...] def __call__(self, x, pos=None): &quot;&quot;&quot; Return the format for tick value `x` at position pos. The position is ignored and the value is rounded to the nearest integer ******** NOT TRUE *********, which is used to look up the label. &quot;&quot;&quot; i = int(x + 0.5) if i &lt; 0 or i &gt;= self.n: return '' else: return self.labels[i] "><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">IndexFormatter</span>(<span class="pl-v">Formatter</span>): [...] <span class="pl-k">def</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">x</span>, <span class="pl-s1">pos</span><span class="pl-c1">=</span><span class="pl-c1">None</span>): <span class="pl-s">"""</span> <span class="pl-s"> Return the format for tick value `x` at position pos.</span> <span class="pl-s"></span> <span class="pl-s"> The position is ignored and the value is rounded to the nearest</span> <span class="pl-s"> integer ******** NOT TRUE *********, which is used to look up the label.</span> <span class="pl-s"> """</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-c1">0.5</span>) <span class="pl-k">if</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">0</span> <span class="pl-c1">or</span> <span class="pl-s1">i</span> <span class="pl-c1">&gt;=</span> <span class="pl-s1">self</span>.<span class="pl-s1">n</span>: <span class="pl-k">return</span> <span class="pl-s">''</span> <span class="pl-k">else</span>: <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-s1">labels</span>[<span class="pl-s1">i</span>]</pre></div> <p dir="auto"><a href="https://matplotlib.org/3.1.3/_modules/matplotlib/ticker.html#IndexFormatter" rel="nofollow">IndexFormatter</a> returns self.labels[0] for x = -1 instead of an empty string</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/28050769/75695138-9cd09380-5c77-11ea-8414-938fc0ddf3a6.png"><img src="https://user-images.githubusercontent.com/28050769/75695138-9cd09380-5c77-11ea-8414-938fc0ddf3a6.png" alt="int_round" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Proposed solution to correct [IndexFormatter] (<a href="https://matplotlib.org/3.1.3/_modules/matplotlib/ticker.html#IndexFormatter" rel="nofollow">https://matplotlib.org/3.1.3/_modules/matplotlib/ticker.html#IndexFormatter</a>)</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" def __call__(self, x, pos=None): &quot;&quot;&quot; Return the format for tick value `x` at position pos. The position is ignored and the value is rounded to the nearest integer, which is used to look up the label. &quot;&quot;&quot; i = int(round(x)) if i &lt; 0 or i &gt;= self.n: return '' else: return self.labels[i]"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">x</span>, <span class="pl-s1">pos</span><span class="pl-c1">=</span><span class="pl-c1">None</span>): <span class="pl-s">"""</span> <span class="pl-s"> Return the format for tick value `x` at position pos.</span> <span class="pl-s"></span> <span class="pl-s"> The position is ignored and the value is rounded to the nearest</span> <span class="pl-s"> integer, which is used to look up the label.</span> <span class="pl-s"> """</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-en">round</span>(<span class="pl-s1">x</span>)) <span class="pl-k">if</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">0</span> <span class="pl-c1">or</span> <span class="pl-s1">i</span> <span class="pl-c1">&gt;=</span> <span class="pl-s1">self</span>.<span class="pl-s1">n</span>: <span class="pl-k">return</span> <span class="pl-s">''</span> <span class="pl-k">else</span>: <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-s1">labels</span>[<span class="pl-s1">i</span>]</pre></div> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Matplotlib version: 3.1.3</li> </ul>
0
<p dir="auto">Using</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pmap(sqrt,[-1]); &quot;some other return val&quot;"><pre class="notranslate"><code class="notranslate">pmap(sqrt,[-1]); "some other return val" </code></pre></div> <p dir="auto">hides the error to be displayed to stdout.</p> <p dir="auto">This also partially applied to warnings, but I couldn't find a simple way to reproduce it (<code class="notranslate">pmap(warn,["warning"])</code> actually shows the warning, but nested warnings in my real life code actually don't get displayed).</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@everywhere function do_work(i) r = [1,2,3][i] println(r) return r end for r in pmap(do_work, [3,2,1,0]) println(&quot;pmap got result&quot;) println(typeof(r)) end"><pre class="notranslate"><span class="pl-c1">@everywhere</span> <span class="pl-k">function</span> <span class="pl-en">do_work</span>(i) r <span class="pl-k">=</span> [<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>][i] <span class="pl-c1">println</span>(r) <span class="pl-k">return</span> r <span class="pl-k">end</span> <span class="pl-k">for</span> r <span class="pl-k">in</span> <span class="pl-c1">pmap</span>(do_work, [<span class="pl-c1">3</span>,<span class="pl-c1">2</span>,<span class="pl-c1">1</span>,<span class="pl-c1">0</span>]) <span class="pl-c1">println</span>(<span class="pl-s"><span class="pl-pds">"</span>pmap got result<span class="pl-pds">"</span></span>) <span class="pl-c1">println</span>(<span class="pl-c1">typeof</span>(r)) <span class="pl-k">end</span></pre></div> <p dir="auto">The <code class="notranslate">pmap()</code> call above returns a RemoteException object in the result array instead of re-throwing it.</p> <p dir="auto">The output is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./julia -p4 test.jl From worker 3: 2 From worker 4: 1 From worker 2: 3 pmap got result Int64 pmap got result Int64 pmap got result Int64 pmap got result RemoteException"><pre class="notranslate"><code class="notranslate">./julia -p4 test.jl From worker 3: 2 From worker 4: 1 From worker 2: 3 pmap got result Int64 pmap got result Int64 pmap got result Int64 pmap got result RemoteException </code></pre></div> <p dir="auto">Changing <code class="notranslate">pmap()</code> to <code class="notranslate">map()</code> results in BoundsError as expected.</p>
1
<p dir="auto">I got the following two errors running "nosetests pandas":</p> <h2 dir="auto">FAIL: test_fred_multi (pandas.io.tests.test_data.TestFred)</h2> <p dir="auto">Traceback (most recent call last):<br> File "/Users/hbi16088/python-virtual-env/basic/lib/python2.7/site-packages/pandas/util/testing.py", line 1135, in wrapper<br> return t(_args, *_kwargs)<br> File "/Users/hbi16088/python-virtual-env/basic/lib/python2.7/site-packages/pandas/io/tests/test_data.py", line 455, in test_fred_multi<br> assert_frame_equal(received, expected, check_less_precise=True)<br> File "/Users/hbi16088/python-virtual-env/basic/lib/python2.7/site-packages/pandas/util/testing.py", line 509, in assert_frame_equal<br> check_less_precise=check_less_precise)<br> File "/Users/hbi16088/python-virtual-env/basic/lib/python2.7/site-packages/pandas/util/testing.py", line 458, in assert_series_equal<br> assert_almost_equal(left.values, right.values, check_less_precise)<br> File "testing.pyx", line 58, in pandas._testing.assert_almost_equal (pandas/src/testing.c:2464)<br> File "testing.pyx", line 93, in pandas._testing.assert_almost_equal (pandas/src/testing.c:1716)<br> File "testing.pyx", line 140, in pandas._testing.assert_almost_equal (pandas/src/testing.c:2300)<br> AssertionError: expected 217.47800 but got 217.46600</p> <h1 dir="auto"></h1> <h2 dir="auto">FAIL: test_fred_parts (pandas.io.tests.test_data.TestFred)</h2> <p dir="auto">Traceback (most recent call last):<br> File "/Users/hbi16088/python-virtual-env/basic/lib/python2.7/site-packages/pandas/util/testing.py", line 1135, in wrapper<br> return t(_args, *_kwargs)<br> File "/Users/hbi16088/python-virtual-env/basic/lib/python2.7/site-packages/pandas/io/tests/test_data.py", line 424, in test_fred_parts<br> self.assertEqual(df.ix['2010-05-01'][0], 217.23)<br> AssertionError: 217.29900000000001 != 217.23</p>
<p dir="auto">Note the duplication of the assignment is not a copy/paste error-- the first one works, the second one fails, presumably because a different path is taken if the column already exists than if it doesn't.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; pd.__version__ '0.12.0-1081-ge684bdc' &gt;&gt;&gt; df = pd.DataFrame({&quot;A&quot;: [1,2]}) &gt;&gt;&gt; df._is_copy False &gt;&gt;&gt; df.to_pickle(&quot;tmp.pk&quot;) &gt;&gt;&gt; df2 = pd.read_pickle(&quot;tmp.pk&quot;) &gt;&gt;&gt; hasattr(df2, &quot;_is_copy&quot;) False &gt;&gt;&gt; df2[&quot;B&quot;] = df2[&quot;A&quot;] &gt;&gt;&gt; df2[&quot;B&quot;] = df2[&quot;A&quot;] Traceback (most recent call last): File &quot;&lt;ipython-input-155-e1fb2db534a8&gt;&quot;, line 1, in &lt;module&gt; df2[&quot;B&quot;] = df2[&quot;A&quot;] File &quot;/usr/local/lib/python2.7/dist-packages/pandas-0.12.0_1081_ge684bdc-py2.7-linux-i686.egg/pandas/core/frame.py&quot;, line 1841, in __setitem__ self._set_item(key, value) File &quot;/usr/local/lib/python2.7/dist-packages/pandas-0.12.0_1081_ge684bdc-py2.7-linux-i686.egg/pandas/core/frame.py&quot;, line 1907, in _set_item self._check_setitem_copy() File &quot;/usr/local/lib/python2.7/dist-packages/pandas-0.12.0_1081_ge684bdc-py2.7-linux-i686.egg/pandas/core/generic.py&quot;, line 1001, in _check_setitem_copy if self._is_copy: File &quot;/usr/local/lib/python2.7/dist-packages/pandas-0.12.0_1081_ge684bdc-py2.7-linux-i686.egg/pandas/core/generic.py&quot;, line 1525, in __getattr__ (type(self).__name__, name)) AttributeError: 'DataFrame' object has no attribute '_is_copy'"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; pd.__version__ '0.12.0-1081-ge684bdc' &gt;&gt;&gt; df = pd.DataFrame({"A": [1,2]}) &gt;&gt;&gt; df._is_copy False &gt;&gt;&gt; df.to_pickle("tmp.pk") &gt;&gt;&gt; df2 = pd.read_pickle("tmp.pk") &gt;&gt;&gt; hasattr(df2, "_is_copy") False &gt;&gt;&gt; df2["B"] = df2["A"] &gt;&gt;&gt; df2["B"] = df2["A"] Traceback (most recent call last): File "&lt;ipython-input-155-e1fb2db534a8&gt;", line 1, in &lt;module&gt; df2["B"] = df2["A"] File "/usr/local/lib/python2.7/dist-packages/pandas-0.12.0_1081_ge684bdc-py2.7-linux-i686.egg/pandas/core/frame.py", line 1841, in __setitem__ self._set_item(key, value) File "/usr/local/lib/python2.7/dist-packages/pandas-0.12.0_1081_ge684bdc-py2.7-linux-i686.egg/pandas/core/frame.py", line 1907, in _set_item self._check_setitem_copy() File "/usr/local/lib/python2.7/dist-packages/pandas-0.12.0_1081_ge684bdc-py2.7-linux-i686.egg/pandas/core/generic.py", line 1001, in _check_setitem_copy if self._is_copy: File "/usr/local/lib/python2.7/dist-packages/pandas-0.12.0_1081_ge684bdc-py2.7-linux-i686.egg/pandas/core/generic.py", line 1525, in __getattr__ (type(self).__name__, name)) AttributeError: 'DataFrame' object has no attribute '_is_copy' </code></pre></div>
0
<p dir="auto">Added in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="614861812" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/5157" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/5157/hovercard" href="https://github.com/denoland/deno/pull/5157">#5157</a> but had to be reverted in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="700144044" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/7432" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/7432/hovercard" href="https://github.com/denoland/deno/pull/7432">#7432</a> because it breaks <code class="notranslate">.tsbuildinfo</code>.</p>
<p dir="auto">Tracking issue for <code class="notranslate">deno lsp</code> subcommand.</p> <p dir="auto">Given that a lot of code in <a href="https://github.com/denoland/vscode_deno"><code class="notranslate">vscode_code</code></a> duplicates logic inside <code class="notranslate">deno</code> binary (eg. module resolution algorithm, DENO_DIR path hashing) it becomes obvious that deno should provide its own LSP.</p> <p dir="auto">Implementing LSP inside the binary should make maintaining the extension easier, as well as it will allow us to provide the same benefits and experience to other editors.</p> <p dir="auto"><em>This feature is being worked on</em></p>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <p dir="auto">des_table = df_final_S1415.describe(percentiles=[.05, .25, .5, .75, .95 ]).T</p> <h4 dir="auto">Expected Output</h4> <p dir="auto">In version 18.0 describe function will return percentiles when columns contain nan.</p> <h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4> <p dir="auto">But in version 18.1 describe function will not return percentiles when columns contain nan.</p>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd import numpy s = pd.Series([1, 2, 3, 4, numpy.nan]) s.quantile(0.5) nan"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <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-c1">4</span>, <span class="pl-s1">numpy</span>.<span class="pl-s1">nan</span>]) <span class="pl-s1">s</span>.<span class="pl-en">quantile</span>(<span class="pl-c1">0.5</span>) <span class="pl-s1">nan</span></pre></div> <h4 dir="auto">Expected Output</h4> <p dir="auto">I would expect 2.5 as output (as with version 0.17.1).</p> <h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4> <p dir="auto">commit: None<br> python: 2.7.6.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 3.13.0-85-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: de_DE.UTF-8</p> <p dir="auto">pandas: 0.18.1<br> nose: None<br> pip: 1.5.4<br> setuptools: 2.2<br> Cython: None<br> numpy: 1.11.0<br> scipy: 0.16.1<br> statsmodels: None<br> xarray: None<br> IPython: None<br> sphinx: None<br> patsy: None<br> dateutil: 2.5.3<br> pytz: 2016.4<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> matplotlib: 1.5.1<br> openpyxl: 2.3.2<br> xlrd: 0.9.4<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: None<br> httplib2: None<br> apiclient: None<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: None<br> boto: None<br> pandas_datareader: None</p>
1
<p dir="auto">[steps to reproduce:]</p> <ol dir="auto"> <li>Launch Atom with no project and no file, just the "unitled"</li> <li>right clic on the tabs bar, where no tabs open, just the empty bar</li> </ol> <p dir="auto"><strong>Atom Version</strong>: 0.198.0<br> <strong>System</strong>: Windows 8.1<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\rcdsm06\AppData\Local\atom\app-0.198.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\rcdsm06\AppData\Local\atom\app-0.198.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br> at EventEmitter. (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.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\rcdsm06\AppData\Local\atom\app-0.198.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.&lt;anonymous&gt; (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.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\rcdsm06\AppData\Local\atom\app-0.198.0\resources\atom.asar\browser\lib\rpc-server.js:116:18) at EventEmitter.&lt;anonymous&gt; (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\atom.asar\browser\lib\rpc-server.js:208:14) at emitMany (events.js:108:13) at metaToValue (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\atom.asar\renderer\api\lib\remote.js:77:15) at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\atom.asar\renderer\api\lib\remote.js:111:26) at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\app.asar\src\context-menu-manager.js:170:31) at HTMLDocument.&lt;anonymous&gt; (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\app.asar\src\window-event-handler.js:149:33) at HTMLDocument.handler (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\app.asar\src\space-pen-extensions.js:112:34) at HTMLDocument.jQuery.event.dispatch (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9) at HTMLDocument.elemData.handle (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46) "><pre class="notranslate"><code class="notranslate">At C:\Users\rcdsm06\AppData\Local\atom\app-0.198.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.&lt;anonymous&gt; (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.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\rcdsm06\AppData\Local\atom\app-0.198.0\resources\atom.asar\browser\lib\rpc-server.js:116:18) at EventEmitter.&lt;anonymous&gt; (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\atom.asar\browser\lib\rpc-server.js:208:14) at emitMany (events.js:108:13) at metaToValue (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\atom.asar\renderer\api\lib\remote.js:77:15) at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\atom.asar\renderer\api\lib\remote.js:111:26) at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\app.asar\src\context-menu-manager.js:170:31) at HTMLDocument.&lt;anonymous&gt; (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\app.asar\src\window-event-handler.js:149:33) at HTMLDocument.handler (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\app.asar\src\space-pen-extensions.js:112:34) at HTMLDocument.jQuery.event.dispatch (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9) at HTMLDocument.elemData.handle (C:\Users\rcdsm06\AppData\Local\atom\app-0.198.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=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <h3 dir="auto">Config</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: {}, &quot;editor&quot;: { &quot;invisibles&quot;: {} } }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: {}, <span class="pl-ent">"editor"</span>: { <span class="pl-ent">"invisibles"</span>: {} } }</pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User No installed packages # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> <span class="pl-en">No</span> <span class="pl-en">installed</span> packages <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
<p dir="auto">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.&lt;anonymous&gt; (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.&lt;anonymous&gt; (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.&lt;anonymous&gt; (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.&lt;anonymous&gt; (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.&lt;anonymous&gt; (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.&lt;anonymous&gt; (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="{ &quot;core&quot;: { &quot;ignoredNames&quot;: [ &quot;node_modules&quot; ], &quot;themes&quot;: [ &quot;atom-dark-ui&quot;, &quot;seti-syntax&quot; ], &quot;disabledPackages&quot;: [ &quot;Tern&quot; ], &quot;projectHome&quot;: &quot;Y:\\app-tfoumax&quot; }, &quot;editor&quot;: { &quot;invisibles&quot;: {}, &quot;softWrap&quot;: true, &quot;showIndentGuide&quot;: 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
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [11]: a = np.dtype({'names':['time','data','pad'], 'formats':['&lt;f8',('&lt;f8', (3, 2)),'&lt;f8'], 'offsets':[0,8,56], 'itemsize':64, 'aligned':True}) In [12]: b = np.zeros(10, dtype=a) In [13]: b[3][1] = np.ones((3, 2)) In [14]: b Out[14]: array([(0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0)], dtype={'names':['time','data','pad'], 'formats':['&lt;f8',('&lt;f8', (3, 2)),'&lt;f8'], 'offsets':[0,8,56], 'itemsize':64, 'aligned':True}) In [15]: b[3][1][:] = np.ones((3, 2))"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">11</span>]: <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">dtype</span>({<span class="pl-s">'names'</span>:[<span class="pl-s">'time'</span>,<span class="pl-s">'data'</span>,<span class="pl-s">'pad'</span>], <span class="pl-s">'formats'</span>:[<span class="pl-s">'&lt;f8'</span>,(<span class="pl-s">'&lt;f8'</span>, (<span class="pl-c1">3</span>, <span class="pl-c1">2</span>)),<span class="pl-s">'&lt;f8'</span>], <span class="pl-s">'offsets'</span>:[<span class="pl-c1">0</span>,<span class="pl-c1">8</span>,<span class="pl-c1">56</span>], <span class="pl-s">'itemsize'</span>:<span class="pl-c1">64</span>, <span class="pl-s">'aligned'</span>:<span class="pl-c1">True</span>}) <span class="pl-v">In</span> [<span class="pl-c1">12</span>]: <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">10</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">a</span>) <span class="pl-v">In</span> [<span class="pl-c1">13</span>]: <span class="pl-s1">b</span>[<span class="pl-c1">3</span>][<span class="pl-c1">1</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">ones</span>((<span class="pl-c1">3</span>, <span class="pl-c1">2</span>)) <span class="pl-v">In</span> [<span class="pl-c1">14</span>]: <span class="pl-s1">b</span> <span class="pl-v">Out</span>[<span class="pl-c1">14</span>]: <span class="pl-en">array</span>([(<span class="pl-c1">0.0</span>, [[<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>]], <span class="pl-c1">0.0</span>), (<span class="pl-c1">0.0</span>, [[<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>]], <span class="pl-c1">0.0</span>), (<span class="pl-c1">0.0</span>, [[<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>]], <span class="pl-c1">0.0</span>), (<span class="pl-c1">0.0</span>, [[<span class="pl-c1">1.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>]], <span class="pl-c1">0.0</span>), (<span class="pl-c1">0.0</span>, [[<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>]], <span class="pl-c1">0.0</span>), (<span class="pl-c1">0.0</span>, [[<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>]], <span class="pl-c1">0.0</span>), (<span class="pl-c1">0.0</span>, [[<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>]], <span class="pl-c1">0.0</span>), (<span class="pl-c1">0.0</span>, [[<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>]], <span class="pl-c1">0.0</span>), (<span class="pl-c1">0.0</span>, [[<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>]], <span class="pl-c1">0.0</span>), (<span class="pl-c1">0.0</span>, [[<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.0</span>, <span class="pl-c1">0.0</span>]], <span class="pl-c1">0.0</span>)], <span class="pl-s1">dtype</span><span class="pl-c1">=</span>{<span class="pl-s">'names'</span>:[<span class="pl-s">'time'</span>,<span class="pl-s">'data'</span>,<span class="pl-s">'pad'</span>], <span class="pl-s">'formats'</span>:[<span class="pl-s">'&lt;f8'</span>,(<span class="pl-s">'&lt;f8'</span>, (<span class="pl-c1">3</span>, <span class="pl-c1">2</span>)),<span class="pl-s">'&lt;f8'</span>], <span class="pl-s">'offsets'</span>:[<span class="pl-c1">0</span>,<span class="pl-c1">8</span>,<span class="pl-c1">56</span>], <span class="pl-s">'itemsize'</span>:<span class="pl-c1">64</span>, <span class="pl-s">'aligned'</span>:<span class="pl-c1">True</span>}) <span class="pl-v">In</span> [<span class="pl-c1">15</span>]: <span class="pl-s1">b</span>[<span class="pl-c1">3</span>][<span class="pl-c1">1</span>][:] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">ones</span>((<span class="pl-c1">3</span>, <span class="pl-c1">2</span>))</pre></div> <p dir="auto">But this works:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [16]: b Out[16]: array([(0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[1.0, 1.0], [1.0, 1.0], [1.0, 1.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0)], dtype={'names':['time','data','pad'], 'formats':['&lt;f8',('&lt;f8', (3, 2)),'&lt;f8'], 'offsets':[0,8,56], 'itemsize':64, 'aligned':True})"><pre class="notranslate"><code class="notranslate">In [16]: b Out[16]: array([(0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[1.0, 1.0], [1.0, 1.0], [1.0, 1.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0), (0.0, [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], 0.0)], dtype={'names':['time','data','pad'], 'formats':['&lt;f8',('&lt;f8', (3, 2)),'&lt;f8'], 'offsets':[0,8,56], 'itemsize':64, 'aligned':True}) </code></pre></div>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/2006" rel="nofollow">http://projects.scipy.org/numpy/ticket/2006</a> on 2011-12-23 by trac user kevin000, assigned to unknown.</em></p> <p dir="auto">Using a recarray with member assignment fails if any column uses the object data type. I don't understand why this fails, especially since the dictionary style assignment works.</p> <h1 dir="auto">Brief example showing what recarray assignments succeed or fail</h1> <p dir="auto">import numpy as np</p> <h1 dir="auto">recarray with integer datatypes</h1> <p dir="auto">dt = np.dtype([('foo', 'i8'), ('bar', 'i8')])<br> r = np.zeros((1,3), dtype=dt).view(np.recarray)<br> r['foo'] = np.array([1, 2, 3]) # OK<br> r.foo = np.array([1, 2, 3]) # OK</p> <h1 dir="auto">recarray with an object datatype</h1> <p dir="auto">dt = np.dtype([('foo', 'i8'), ('bar', 'O8')])<br> r = np.zeros((1,3), dtype=dt).view(np.recarray)<br> r['foo'] = np.array([1, 2, 3]) # OK<br> r.foo = np.array([1, 2, 3]) # RuntimeError</p> <p dir="auto">For the relevant C code search for "cannot call setfield on an object array" in this file:</p> <p dir="auto"><a href="https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/methods.c">https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/methods.c</a></p> <p dir="auto">Thanks!</p> <p dir="auto">Kevin</p>
1
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [run &quot;ver&quot; at a command prompt] PowerToys version: 0.13.0 PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: [run "ver" at a command prompt] PowerToys version: 0.13.0 PowerToy module for which you are reporting the bug (if applicable): FancyZones </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Press <kbd>Windows</kbd>+<kbd>Left</kbd></p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Window snaps to the left</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Window snaps to the right</p> <h1 dir="auto">Screenshots</h1>
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.17134.1069] PowerToys version: 0.11.0 PowerToy module for which you are reporting the bug (if applicable): FancyLayout"><pre class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.17134.1069] PowerToys version: 0.11.0 PowerToy module for which you are reporting the bug (if applicable): FancyLayout </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Enable "Override Windows Snap hotkeys"</li> <li>Select a three column layout</li> <li>Click on any window not currently in a layout.</li> <li>Click Win+Left Arrow .</li> <li>Window will jump to the right-most column.</li> </ol> <p dir="auto">(Same problem reversed with Win + Right Arrow)</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Window should be placed in the left-most layout when the Win+Left key is used, and right-most layout when Win+Right is used.</p>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.4.1</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Actual Result</h3> <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/apache/dubbo/blob/938a46641ce76df26a01d5f7543b474219c78240/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/javassist/JavassistProxyFactory.java#L28">dubbo/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/javassist/JavassistProxyFactory.java</a> </p> <p class="mb-0 color-fg-muted"> Line 28 in <a data-pjax="true" class="commit-tease-sha" href="/apache/dubbo/commit/938a46641ce76df26a01d5f7543b474219c78240">938a466</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="L28" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="28"></td> <td id="LC28" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"> * JavaassistRpcProxyFactory</span> </td> </tr> </tbody></table> </div> </div> <p></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/** * JavaassistRpcProxyFactory */"><pre class="notranslate"><code class="notranslate">/** * JavaassistRpcProxyFactory */ </code></pre></div> <h3 dir="auto">Expected Result</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/** * JavassistRpcProxyFactory */"><pre class="notranslate"><code class="notranslate">/** * JavassistRpcProxyFactory */ </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/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.2</li> <li>Operating System version: windows 10</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>using generic types(say List&lt;PersonTest&gt; or Map&lt;String, List&lt;PersonTest&gt;&gt;) as method parameters</li> <li>call this RPC method<br> the similar problem with generic return type has been fixd in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="426818578" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo/issues/3771" data-hovercard-type="pull_request" data-hovercard-url="/apache/dubbo/pull/3771/hovercard" href="https://github.com/apache/dubbo/pull/3771">#3771</a></li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">the provider side with receive the correct parameter type</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">the actual result is as the following<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12162539/55305082-4cf2b680-5481-11e9-8893-3c21a14701a6.png"><img src="https://user-images.githubusercontent.com/12162539/55305082-4cf2b680-5481-11e9-8893-3c21a14701a6.png" alt="image" style="max-width: 100%;"></a><br> and when I trying to do some with it, it will throw an exception</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="java.lang.ClassCastException: com.alibaba.fastjson.JSONObject cannot be cast to org.apache.dubbo.demo.PersonTest at java.util.ArrayList.forEach(ArrayList.java:1257) at org.apache.dubbo.demo.provider.DemoServiceImpl.fastjsonTest1(DemoServiceImpl.java:67) at org.apache.dubbo.common.bytecode.Wrapper1.invokeMethod(Wrapper1.java) at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47) at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:86) at org.apache.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:56) at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56) at org.apache.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:63) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:88) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:54) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:80) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:79) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:137) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:39) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:128) at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:103) at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:200) at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51) at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)"><pre class="notranslate"><code class="notranslate">java.lang.ClassCastException: com.alibaba.fastjson.JSONObject cannot be cast to org.apache.dubbo.demo.PersonTest at java.util.ArrayList.forEach(ArrayList.java:1257) at org.apache.dubbo.demo.provider.DemoServiceImpl.fastjsonTest1(DemoServiceImpl.java:67) at org.apache.dubbo.common.bytecode.Wrapper1.invokeMethod(Wrapper1.java) at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47) at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:86) at org.apache.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:56) at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56) at org.apache.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:63) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:88) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:54) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:80) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:79) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:137) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:39) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73) at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:128) at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:103) at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:200) at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51) at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) </code></pre></div>
0
<p dir="auto">Consider implementing an asynchronous file system API.</p> <p dir="auto">On the Web, the Native File System API implements an API surface that provides file and directory access.</p> <ul dir="auto"> <li>Spec: <a href="https://wicg.github.io/native-file-system/" rel="nofollow">https://wicg.github.io/native-file-system/</a></li> <li>Explainer: <a href="https://github.com/WICG/native-file-system/blob/master/EXPLAINER.md">https://github.com/WICG/native-file-system/blob/master/EXPLAINER.md</a></li> </ul> <p dir="auto">A similar API shape for asynchronous file access would be great for interop between server/command-line and web code.</p> <p dir="auto">The API has a shape that allows streaming to a file, creating new files, opening an existing file, cloberring or not, iterating through directories, etc.</p> <p dir="auto">Adapted from the explainer, here's an example:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const dir_ref = ... // Some mechanism to obtain a directory handle TBD. for await (const [name, entry] of dir_ref) { // Iterate through a directory. // entry is a FileSystemFileHandle or a FileSystemDirectoryHandle. // name is equal to entry.name } const new_file = await dir_ref.getFile('foo.txt', {create: true}); // Create a file. // Write to a file using an API resembling something like pwrite. const new_file_writer = await new_file.createWritable(); await new_file_writer.write(await file_ref.getFile()); await new_file_writer.close(); // Or using streams. const file_ref = await dir_ref.getFile('foo.js'); // Get a file from a directory. const copy2 = await dir_ref.getFile('foo2.txt', {create: true}); (await file_ref.getFile()).stream().pipeTo(await copy2.createWritable()); ... "><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">dir_ref</span> <span class="pl-c1">=</span> ... <span class="pl-c">// Some mechanism to obtain a directory handle TBD.</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-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">,</span> <span class="pl-s1">entry</span><span class="pl-kos">]</span> <span class="pl-k">of</span> <span class="pl-s1">dir_ref</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// Iterate through a directory.</span> <span class="pl-c">// entry is a FileSystemFileHandle or a FileSystemDirectoryHandle.</span> <span class="pl-c">// name is equal to entry.name</span> <span class="pl-kos">}</span> <span class="pl-k">const</span> <span class="pl-s1">new_file</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">dir_ref</span><span class="pl-kos">.</span><span class="pl-en">getFile</span><span class="pl-kos">(</span><span class="pl-s">'foo.txt'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">create</span>: <span class="pl-c1">true</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Create a file.</span> <span class="pl-c">// Write to a file using an API resembling something like pwrite.</span> <span class="pl-k">const</span> <span class="pl-s1">new_file_writer</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">new_file</span><span class="pl-kos">.</span><span class="pl-en">createWritable</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">new_file_writer</span><span class="pl-kos">.</span><span class="pl-en">write</span><span class="pl-kos">(</span><span class="pl-k">await</span> <span class="pl-s1">file_ref</span><span class="pl-kos">.</span><span class="pl-en">getFile</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">new_file_writer</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-c">// Or using streams.</span> <span class="pl-k">const</span> <span class="pl-s1">file_ref</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">dir_ref</span><span class="pl-kos">.</span><span class="pl-en">getFile</span><span class="pl-kos">(</span><span class="pl-s">'foo.js'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Get a file from a directory.</span> <span class="pl-k">const</span> <span class="pl-s1">copy2</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">dir_ref</span><span class="pl-kos">.</span><span class="pl-en">getFile</span><span class="pl-kos">(</span><span class="pl-s">'foo2.txt'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">create</span>: <span class="pl-c1">true</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">(</span><span class="pl-k">await</span> <span class="pl-s1">file_ref</span><span class="pl-kos">.</span><span class="pl-en">getFile</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">stream</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">pipeTo</span><span class="pl-kos">(</span><span class="pl-k">await</span> <span class="pl-s1">copy2</span><span class="pl-kos">.</span><span class="pl-en">createWritable</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">The proposal for <a href="https://github.com/WICG/native-file-system">native file system</a> is out.<br> Where does deno stand?</p>
1
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">playbook, tags</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2.4.0"><pre class="notranslate"><code class="notranslate">2.4.0 </code></pre></div> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Fact_gathering is run for plays that do not match a tag.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- hosts: node-1 gather_facts: yes tags: - node-tag"><pre class="notranslate">- <span class="pl-ent">hosts</span>: <span class="pl-s">node-1</span> <span class="pl-ent">gather_facts</span>: <span class="pl-s">yes</span> <span class="pl-ent">tags</span>: - <span class="pl-s">node-tag</span></pre></div> <p dir="auto">To skip the play run either<br> <code class="notranslate">ansible-playbook -i node-1, play.yml --skip-tags="node-tag"</code><br> or<br> <code class="notranslate">ansible-playbook -i node-1, play.yml --tags="mismatch"</code></p> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Works fine with <code class="notranslate">--skip tags=node-tag</code>: the play is matched and skipped.<br> I have expected the same behaviour with --tags=mismatch.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">When run with <code class="notranslate">--tags=mismatch</code>, the play is mismatched and is skipped. However, ansible still tries to gather the facts. It fails because node-1 does not exist.</p>
<p dir="auto">With modules taking advantage of module_utils/{ec2,rax}.py there is a lot of duplicated documentation that has to be managed per module. This is especially true of the rax modules.</p> <p dir="auto">Currently all rax modules, have documentation references to the following attributes:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" api_key credentials region username"><pre class="notranslate"><code class="notranslate"> api_key credentials region username </code></pre></div> <p dir="auto">The docs for these get copy/pasted into all new modules. Additionally the 'notes' portion of the DOCUMENTATION is identical or should be identical between all rax modules.</p> <p dir="auto">I'm not sure if it possible, but I am wondering if we could find a way to not have to duplicate all of those docs.</p> <p dir="auto">Especially, as I have plans to add a bit more standard attributes for all rax modules that revolve around authentication.</p> <p dir="auto">Since currently we just open/read the module files and parse with ast I don't have an answer for this, and haven't dug into it deeply, but if there are any recommendations, I'd be happy to look into the required changes.</p>
0
<p dir="auto">First I want to apologize if I've done anything wrong with this bug report, I'm still new to development and any mistakes made are unintentional.</p> <p dir="auto">Environment:</p> <ul dir="auto"> <li>Python version: 3.11.3</li> <li>Flask version: 2.3.0</li> </ul>
<p dir="auto"><a href="https://github.com/pallets/flask/blob/c5900a1adf8e868eca745225f3cf32218cdbbb23/flask/json.py#L23">This code</a> is always import error.<br> (<code class="notranslate">simplejson</code> is not included in the <code class="notranslate">itsdangerous</code>.)<br> See: <a href="https://github.com/pallets/itsdangerous/blob/master/itsdangerous.py">https://github.com/pallets/itsdangerous/blob/master/itsdangerous.py</a></p>
0
<p dir="auto"><strong>Context:</strong></p> <ul dir="auto"> <li>Playwright Version: 1.20.0</li> <li>Operating System: Mac</li> <li>Node.js version: 12.22</li> <li>Browser: Chromium, WebKit</li> <li>Extra: [any specific details about your environment]</li> </ul> <p dir="auto"><strong>Code Snippet</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" test('example test', async ({ page }) =&gt; { await page.goto(&lt;MY_URL&gt;); // can share the url privately });"><pre class="notranslate"> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'example test'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-c1">goto</span><span class="pl-kos">(</span><span class="pl-c1">&lt;</span><span class="pl-ent">MY_URL</span><span class="pl-c1">&gt;</span>); // can share the url privately <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// config.js use: { headless: true, trace: 'retain-on-failure', screenshot: 'on', }, projects: [ { name: 'Desktop Chrome', use: { ...devices['Desktop Chrome'] }, }, ]"><pre class="notranslate"><span class="pl-c">// config.js</span> use: <span class="pl-kos">{</span> <span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">trace</span>: <span class="pl-s">'retain-on-failure'</span><span class="pl-kos">,</span> <span class="pl-c1">screenshot</span>: <span class="pl-s">'on'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">projects</span>: <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">]</span></pre></div> <p dir="auto"><strong>Describe the bug</strong><br> Navigating to MY_URL times out and reports the following error:<br> <code class="notranslate">Timeout of 20000ms exceeded while shutting down environment</code></p> <p dir="auto">Browser logs:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" pw:browser &lt;launching&gt; /Users/test/Library/Caches/ms-playwright/chromium-978106/chrome-mac/Chromium.app/Contents/MacOS/Chromium --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,AcceptCHFrame,AutoExpandDetailsElement --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --enable-use-zoom-for-dsf=false --no-sandbox --user-data-dir=/var/folders/z0/5n6p2nrn1p7_q6x11nb1ck1m0000gq/T/playwright_chromiumdev_profile-zUHo3B --remote-debugging-pipe --no-startup-window +0ms pw:browser &lt;launched&gt; pid=23926 +7ms pw:browser [pid=23926][err] [23926:68355:0321/104018.011736:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for tags.knewz.com failed: +6s pw:browser [pid=23926][err] ----- Certificate i=0 (CN=tags.knewz.com) ----- +0ms pw:browser [pid=23926][err] ERROR: Time is after notAfter +0ms pw:browser [pid=23926][err] +0ms pw:browser [pid=23926][err] +0ms pw:browser [pid=23926][err] [23926:51715:0321/104018.011955:ERROR:ssl_client_socket_impl.cc(996)] handshake failed; returned -1, SSL error code 1, net_error -201 +0ms pw:browser [pid=23926][err] [23989:259:0321/104026.452691:ERROR:system_services.cc(31)] SetApplicationIsDaemon: Error Domain=NSOSStatusErrorDomain Code=-50 &quot;paramErr: error in user parameter list&quot; (-50) +8s pw:browser [pid=23926][err] 2022-03-21 10:40:31.443 Chromium Helper[23989:567532] In -[NSApplication(NSQuietSafeQuit) _updateCanQuitQuietlyAndSafely], _LSSetApplicationInformationItem(NSCanQuitQuietlyAndSafely) returned error -50 +"><pre class="notranslate"><code class="notranslate"> pw:browser &lt;launching&gt; /Users/test/Library/Caches/ms-playwright/chromium-978106/chrome-mac/Chromium.app/Contents/MacOS/Chromium --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,AcceptCHFrame,AutoExpandDetailsElement --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --enable-use-zoom-for-dsf=false --no-sandbox --user-data-dir=/var/folders/z0/5n6p2nrn1p7_q6x11nb1ck1m0000gq/T/playwright_chromiumdev_profile-zUHo3B --remote-debugging-pipe --no-startup-window +0ms pw:browser &lt;launched&gt; pid=23926 +7ms pw:browser [pid=23926][err] [23926:68355:0321/104018.011736:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for tags.knewz.com failed: +6s pw:browser [pid=23926][err] ----- Certificate i=0 (CN=tags.knewz.com) ----- +0ms pw:browser [pid=23926][err] ERROR: Time is after notAfter +0ms pw:browser [pid=23926][err] +0ms pw:browser [pid=23926][err] +0ms pw:browser [pid=23926][err] [23926:51715:0321/104018.011955:ERROR:ssl_client_socket_impl.cc(996)] handshake failed; returned -1, SSL error code 1, net_error -201 +0ms pw:browser [pid=23926][err] [23989:259:0321/104026.452691:ERROR:system_services.cc(31)] SetApplicationIsDaemon: Error Domain=NSOSStatusErrorDomain Code=-50 "paramErr: error in user parameter list" (-50) +8s pw:browser [pid=23926][err] 2022-03-21 10:40:31.443 Chromium Helper[23989:567532] In -[NSApplication(NSQuietSafeQuit) _updateCanQuitQuietlyAndSafely], _LSSetApplicationInformationItem(NSCanQuitQuietlyAndSafely) returned error -50 + </code></pre></div>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v1.33]</li> <li>Operating System: [Windows 10]</li> <li>Browser: [Chrome]</li> <li>Other info:</li> </ul> <h3 dir="auto">Source code</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="await Page.GetByRole(AriaRole.Textbox, new() { Name = &quot;Email or phone&quot; }).ClickAsync(); **await Page.GetByRole(AriaRole.Textbox, new() { Name = &quot;Email or phone&quot; }).FillAsync(_config.GoogleUser);** await Page.GetByRole(AriaRole.Button, new() { Name = &quot;Next&quot; }).ClickAsync(); await Page.GetByRole(AriaRole.Textbox, new() { Name = &quot;Enter your password&quot; }).ClickAsync(); await Page.GetByRole(AriaRole.Textbox, new() { Name = &quot;Enter your password&quot; }).FillAsync(_config.GooglePassword); await Page.GetByRole(AriaRole.Button, new() { Name = &quot;Next&quot; }).ClickAsync(); "><pre class="notranslate"><code class="notranslate">await Page.GetByRole(AriaRole.Textbox, new() { Name = "Email or phone" }).ClickAsync(); **await Page.GetByRole(AriaRole.Textbox, new() { Name = "Email or phone" }).FillAsync(_config.GoogleUser);** await Page.GetByRole(AriaRole.Button, new() { Name = "Next" }).ClickAsync(); await Page.GetByRole(AriaRole.Textbox, new() { Name = "Enter your password" }).ClickAsync(); await Page.GetByRole(AriaRole.Textbox, new() { Name = "Enter your password" }).FillAsync(_config.GooglePassword); await Page.GetByRole(AriaRole.Button, new() { Name = "Next" }).ClickAsync(); </code></pre></div> <p dir="auto"><strong>Steps</strong></p> <ul dir="auto"> <li>[Run the test]</li> </ul> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">the test logs in via google openID</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">gets stuck on the ** line with a timeout</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" System.TimeoutException : Timeout 30000ms exceeded. =========================== logs =========================== waiting for GetByRole(AriaRole.Textbox, new() { Name = &quot;Email or phone&quot; }) ============================================================"><pre class="notranslate"><code class="notranslate"> System.TimeoutException : Timeout 30000ms exceeded. =========================== logs =========================== waiting for GetByRole(AriaRole.Textbox, new() { Name = "Email or phone" }) ============================================================ </code></pre></div>
0
<p dir="auto">The api for tesitng with pointer events looks something like this:</p> <div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Point start = new Point(...); Point end = new Point(...); tester.dispatchEvent(pointer.down(start), start); tester.pump(); tester.dispatchEvent(pointer.move(end), start); tester.pump(); tester.dispatchEvent(pointer.up(), start); tester.pump();"><pre class="notranslate"><span class="pl-c1">Point</span> start <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">Point</span>(...); <span class="pl-c1">Point</span> end <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">Point</span>(...); tester.<span class="pl-en">dispatchEvent</span>(pointer.<span class="pl-en">down</span>(start), start); tester.<span class="pl-en">pump</span>(); tester.<span class="pl-en">dispatchEvent</span>(pointer.<span class="pl-en">move</span>(end), start); tester.<span class="pl-en">pump</span>(); tester.<span class="pl-en">dispatchEvent</span>(pointer.<span class="pl-en">up</span>(), start); tester.<span class="pl-en">pump</span>();</pre></div> <p dir="auto">The fact you need to pass your starting point for all of the events - especially after having moved the pointer - is weird.</p>
<p dir="auto">Driving a pointer in a test right now requires pumping, continually giving the original location, etc.</p> <p dir="auto">Instead the API should look something like:</p> <div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="TestGesture gesture = tester.startGesture(downLocation); gesture.moveTo(newPoint1); gesture.moveTo(newPoint2); gesture.moveTo(newPoint3); gesture.up(); // or gesture.cancel();"><pre class="notranslate"><span class="pl-c1">TestGesture</span> gesture <span class="pl-k">=</span> tester.<span class="pl-en">startGesture</span>(downLocation); gesture.<span class="pl-en">moveTo</span>(newPoint1); gesture.<span class="pl-en">moveTo</span>(newPoint2); gesture.<span class="pl-en">moveTo</span>(newPoint3); gesture.<span class="pl-en">up</span>(); <span class="pl-c">// or gesture.cancel();</span></pre></div> <p dir="auto">moveTo would dispatch a pointer move event with the new point, at downLocation, then pump.</p> <p dir="auto">gesture would also expose the TestPointer.</p> <p dir="auto">moveTo() would take optional argument "pump: false" or maybe "duration" which is how long to pump (and null would mean don't pump).</p>
1
<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/npm/cli/blob/4dbeb007d0d6350284c7b1edbf4d5b0030c67c66/package.json#L72">cli/package.json</a> </p> <p class="mb-0 color-fg-muted"> Line 72 in <a data-pjax="true" class="commit-tease-sha" href="/npm/cli/commit/4dbeb007d0d6350284c7b1edbf4d5b0030c67c66">4dbeb00</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="L72" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="72"></td> <td id="LC72" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-ent">"cli-table3"</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.6.0<span class="pl-pds">"</span></span>, </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">vulnerability found in "ansi-regex", child dependency of cli-table3<br> +-- cli-table3@0.6.0<br> | -- string-width@4.2.2 (at 4.2.3 it upgrades problematic dependencies)<br> | ---- strip-ansi@6.0.0<br> | ------ ansi-regex@5.0.0 (vulnerable version)</p> <p dir="auto">while updating npm it keep installing "ansi-regex@5.0.0" .<br> please remove or replace this package.</p>
<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">Security scans fail do to high warning of a security vulnerability in ansi-regex.</p> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">Security scan pass.</p> <h3 dir="auto">Steps To Reproduce</h3> <p dir="auto">We use twistlock to do vulnerability detection, which relies on NVD to get vulnerability data.</p> <p dir="auto">The issue can be found here, <a href="https://nvd.nist.gov/vuln/detail/CVE-2021-3807" rel="nofollow">https://nvd.nist.gov/vuln/detail/CVE-2021-3807</a> and here, <a href="https://snyk.io/vuln/npm:ansi-regex" rel="nofollow">https://snyk.io/vuln/npm:ansi-regex</a>.</p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>OS: Mac 11.5.2</li> <li>Node: v12.21.0</li> <li>npm: 7.21.1</li> </ul>
1
<h1 dir="auto">Description of the new feature/enhancement</h1> <p dir="auto">Allow the users to add new languages into terminal, or create "extensions" like exist in VSCode</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1> <p dir="auto">No problem currently, other than end-user inconvenience. I've downloaded several different language libraries, and each one comes with their own console shells. It would be so much easier, and convenient if there were a way to "link" the terminal app to these other consoles (e.g. python) so that I could work within one location. I've got compilers and such already downloaded in VS and VSCode, but if I want to try something basic, I've found console to be quicker and easier than starting VS</p>
<h1 dir="auto">Description of the new feature/enhancement</h1> <p dir="auto">When I open File explorer from terminal using command such as <code class="notranslate">start .</code> control should shift to explorer window but it remains in terminal.</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1> <p dir="auto">when file explorer starts control should shift to explorer and any further keyboard interaction should be targeted to explorer window.<br> You can verify how <code class="notranslate">ConEmu</code> or <code class="notranslate">cmd</code> works to validate this.</p>
0
<p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/guenhter/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/guenhter">@guenhter</a> on 2016-10-13T15:58:27Z</p> <h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">docker_network</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0.0 (detached HEAD 44faad0593) last updated 2016/10/13 13:41:31 (GMT +000) lib/ansible/modules/core: (detached HEAD d66983b43e) last updated 2016/10/13 13:41:31 (GMT +000) lib/ansible/modules/extras: (detached HEAD 35132b892f) last updated 2016/10/13 13:41:31 (GMT +000) config file = configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.0.0 (detached HEAD 44faad0593) last updated 2016/10/13 13:41:31 (GMT +000) lib/ansible/modules/core: (detached HEAD d66983b43e) last updated 2016/10/13 13:41:31 (GMT +000) lib/ansible/modules/extras: (detached HEAD 35132b892f) last updated 2016/10/13 13:41:31 (GMT +000) config file = configured module search path = Default w/o overrides </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">no changes in environment</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Debian 8.6<br> Linux machine0 3.16.0-4-amd64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3525390" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/1" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/1/hovercard" href="https://github.com/ansible/ansible/issues/1">#1</a> SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Docker network can't be created with driver <code class="notranslate">overlay</code>.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <ol dir="auto"> <li>Setup docker in swarm mode (e.g. with <a href="https://github.com/atosatto/ansible-dockerswarm">https://github.com/atosatto/ansible-dockerswarm</a>)</li> <li>Just execute this task in a environment where docker 1.12.1 runs in swarm mode.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Sample network docker_network: name: my-net1 driver: overlay"><pre class="notranslate"><code class="notranslate">- name: Sample network docker_network: name: my-net1 driver: overlay </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">New network is created</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">Runtime error when playbook is executed and task is reached</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [ansible-dockerswarm : Sample network] ************************************ task path: /vagrant/service-playbooks/roles/ansible-dockerswarm/tasks/swarm_cluster.yml:15 Using module file /home/vagrant/ansible/lib/ansible/modules/core/cloud/docker/docker_network.py &lt;192.168.77.202&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.202&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.202 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759 `&quot; &amp;&amp; echo ansible-tmp-1476374253.85-52715585730759=&quot;` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;'' Using module file /home/vagrant/ansible/lib/ansible/modules/core/cloud/docker/docker_network.py &lt;192.168.77.203&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.203&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.203 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119 `&quot; &amp;&amp; echo ansible-tmp-1476374253.86-156181693682119=&quot;` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;'' Using module file /home/vagrant/ansible/lib/ansible/modules/core/cloud/docker/docker_network.py &lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.201 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690 `&quot; &amp;&amp; echo ansible-tmp-1476374253.86-87520848410690=&quot;` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;'' &lt;192.168.77.203&gt; PUT /tmp/tmpHAeuPH TO /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119/docker_network.py &lt;192.168.77.203&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.77.203]' &lt;192.168.77.202&gt; PUT /tmp/tmptFUA_b TO /home/deploy/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759/docker_network.py &lt;192.168.77.202&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.77.202]' &lt;192.168.77.201&gt; PUT /tmp/tmpDZd6Bx TO /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690/docker_network.py &lt;192.168.77.201&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.77.201]' &lt;192.168.77.203&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.203&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.203 '/bin/sh -c '&quot;'&quot;'chmod u+x /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119/ /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119/docker_network.py &amp;&amp; sleep 0'&quot;'&quot;'' &lt;192.168.77.202&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.202&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.202 '/bin/sh -c '&quot;'&quot;'chmod u+x /home/deploy/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759/ /home/deploy/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759/docker_network.py &amp;&amp; sleep 0'&quot;'&quot;'' &lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.201 '/bin/sh -c '&quot;'&quot;'chmod u+x /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690/ /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690/docker_network.py &amp;&amp; sleep 0'&quot;'&quot;'' &lt;192.168.77.203&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.77.201 '/bin/sh -c '&quot;'&quot;'/usr/bin/python /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690/docker_network.py; rm -rf &quot;/home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690/&quot; &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'&quot;'&quot;'' &lt;192.168.77.202&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.202&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.77.202 '/bin/sh -c '&quot;'&quot;'/usr/bin/python /home/deploy/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759/docker_network.py; rm -rf &quot;/home/deploy/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759/&quot; &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'&quot;'&quot;'' &lt;192.168.77.203&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.77.203 '/bin/sh -c '&quot;'&quot;'/usr/bin/python /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119/docker_network.py; rm -rf &quot;/home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119/&quot; &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'&quot;'&quot;'' fatal: [machine_3]: FAILED! =&gt; { &quot;changed&quot;: false, &quot;failed&quot;: true, &quot;invocation&quot;: { &quot;module_name&quot;: &quot;docker_network&quot; }, &quot;module_stderr&quot;: &quot;OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 10854\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.77.203 closed.\r\n&quot;, &quot;module_stdout&quot;: &quot;Traceback (most recent call last):\r\n File \&quot;/tmp/ansible_UmI8My/ansible_module_docker_network.py\&quot;, line 378, in &lt;module&gt;\r\n main()\r\n File \&quot;/tmp/ansible_UmI8My/ansible_module_docker_network.py\&quot;, line 371, in main\r\n cm = DockerNetworkManager(client)\r\n File \&quot;/tmp/ansible_UmI8My/ansible_module_docker_network.py\&quot;, line 211, in __init__\r\n self.present()\r\n File \&quot;/tmp/ansible_UmI8My/ansible_module_docker_network.py\&quot;, line 335, in present\r\n self.create_network()\r\n File \&quot;/tmp/ansible_UmI8My/ansible_module_docker_network.py\&quot;, line 283, in create_network\r\n ipam=ipam_config)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/utils/decorators.py\&quot;, line 35, in wrapper\r\n return f(self, *args, **kwargs)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/api/network.py\&quot;, line 62, in create_network\r\n return self._result(res, json=True)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/client.py\&quot;, line 178, in _result\r\n self._raise_for_status(response)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/client.py\&quot;, line 174, in _raise_for_status\r\n raise errors.APIError(e, response, explanation=explanation)\r\ndocker.errors.APIError: 500 Server Error: Internal Server Error (\&quot;{\&quot;message\&quot;:\&quot;datastore for scope \\\&quot;global\\\&quot; is not initialized \&quot;}\&quot;)\r\n&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot; } fatal: [machine_2]: FAILED! =&gt; { &quot;changed&quot;: false, &quot;failed&quot;: true, &quot;invocation&quot;: { &quot;module_name&quot;: &quot;docker_network&quot; }, &quot;module_stderr&quot;: &quot;OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 10849\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.77.202 closed.\r\n&quot;, &quot;module_stdout&quot;: &quot;Traceback (most recent call last):\r\n File \&quot;/tmp/ansible_gJEa7t/ansible_module_docker_network.py\&quot;, line 378, in &lt;module&gt;\r\n main()\r\n File \&quot;/tmp/ansible_gJEa7t/ansible_module_docker_network.py\&quot;, line 371, in main\r\n cm = DockerNetworkManager(client)\r\n File \&quot;/tmp/ansible_gJEa7t/ansible_module_docker_network.py\&quot;, line 211, in __init__\r\n self.present()\r\n File \&quot;/tmp/ansible_gJEa7t/ansible_module_docker_network.py\&quot;, line 335, in present\r\n self.create_network()\r\n File \&quot;/tmp/ansible_gJEa7t/ansible_module_docker_network.py\&quot;, line 283, in create_network\r\n ipam=ipam_config)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/utils/decorators.py\&quot;, line 35, in wrapper\r\n return f(self, *args, **kwargs)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/api/network.py\&quot;, line 62, in create_network\r\n return self._result(res, json=True)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/client.py\&quot;, line 178, in _result\r\n self._raise_for_status(response)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/client.py\&quot;, line 174, in _raise_for_status\r\n raise errors.APIError(e, response, explanation=explanation)\r\ndocker.errors.APIError: 500 Server Error: Internal Server Error (\&quot;{\&quot;message\&quot;:\&quot;datastore for scope \\\&quot;global\\\&quot; is not initialized \&quot;}\&quot;)\r\n&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot; } fatal: [machine_1]: FAILED! =&gt; { &quot;changed&quot;: false, &quot;failed&quot;: true, &quot;invocation&quot;: { &quot;module_name&quot;: &quot;docker_network&quot; }, &quot;module_stderr&quot;: &quot;OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 10754\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.77.201 closed.\r\n&quot;, &quot;module_stdout&quot;: &quot;Traceback (most recent call last):\r\n File \&quot;/tmp/ansible_kgQpcW/ansible_module_docker_network.py\&quot;, line 378, in &lt;module&gt;\r\n main()\r\n File \&quot;/tmp/ansible_kgQpcW/ansible_module_docker_network.py\&quot;, line 371, in main\r\n cm = DockerNetworkManager(client)\r\n File \&quot;/tmp/ansible_kgQpcW/ansible_module_docker_network.py\&quot;, line 211, in __init__\r\n self.present()\r\n File \&quot;/tmp/ansible_kgQpcW/ansible_module_docker_network.py\&quot;, line 335, in present\r\n self.create_network()\r\n File \&quot;/tmp/ansible_kgQpcW/ansible_module_docker_network.py\&quot;, line 283, in create_network\r\n ipam=ipam_config)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/utils/decorators.py\&quot;, line 35, in wrapper\r\n return f(self, *args, **kwargs)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/api/network.py\&quot;, line 62, in create_network\r\n return self._result(res, json=True)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/client.py\&quot;, line 178, in _result\r\n self._raise_for_status(response)\r\n File \&quot;/usr/local/lib/python2.7/dist-packages/docker/client.py\&quot;, line 174, in _raise_for_status\r\n raise errors.APIError(e, response, explanation=explanation)\r\ndocker.errors.APIError: 500 Server Error: Internal Server Error (\&quot;{\&quot;message\&quot;:\&quot;rpc error: code = 3 desc = driver name: if driver is specified name is required\&quot;}\&quot;)\r\n&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot; }"><pre class="notranslate"><code class="notranslate">TASK [ansible-dockerswarm : Sample network] ************************************ task path: /vagrant/service-playbooks/roles/ansible-dockerswarm/tasks/swarm_cluster.yml:15 Using module file /home/vagrant/ansible/lib/ansible/modules/core/cloud/docker/docker_network.py &lt;192.168.77.202&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.202&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.202 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759 `" &amp;&amp; echo ansible-tmp-1476374253.85-52715585730759="` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759 `" ) &amp;&amp; sleep 0'"'"'' Using module file /home/vagrant/ansible/lib/ansible/modules/core/cloud/docker/docker_network.py &lt;192.168.77.203&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.203&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.203 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119 `" &amp;&amp; echo ansible-tmp-1476374253.86-156181693682119="` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119 `" ) &amp;&amp; sleep 0'"'"'' Using module file /home/vagrant/ansible/lib/ansible/modules/core/cloud/docker/docker_network.py &lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.201 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690 `" &amp;&amp; echo ansible-tmp-1476374253.86-87520848410690="` echo $HOME/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690 `" ) &amp;&amp; sleep 0'"'"'' &lt;192.168.77.203&gt; PUT /tmp/tmpHAeuPH TO /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119/docker_network.py &lt;192.168.77.203&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.77.203]' &lt;192.168.77.202&gt; PUT /tmp/tmptFUA_b TO /home/deploy/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759/docker_network.py &lt;192.168.77.202&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.77.202]' &lt;192.168.77.201&gt; PUT /tmp/tmpDZd6Bx TO /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690/docker_network.py &lt;192.168.77.201&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.77.201]' &lt;192.168.77.203&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.203&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.203 '/bin/sh -c '"'"'chmod u+x /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119/ /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119/docker_network.py &amp;&amp; sleep 0'"'"'' &lt;192.168.77.202&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.202&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.202 '/bin/sh -c '"'"'chmod u+x /home/deploy/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759/ /home/deploy/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759/docker_network.py &amp;&amp; sleep 0'"'"'' &lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.201 '/bin/sh -c '"'"'chmod u+x /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690/ /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690/docker_network.py &amp;&amp; sleep 0'"'"'' &lt;192.168.77.203&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.77.201 '/bin/sh -c '"'"'/usr/bin/python /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690/docker_network.py; rm -rf "/home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-87520848410690/" &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'"'"'' &lt;192.168.77.202&gt; ESTABLISH SSH CONNECTION FOR USER: deploy &lt;192.168.77.202&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.77.202 '/bin/sh -c '"'"'/usr/bin/python /home/deploy/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759/docker_network.py; rm -rf "/home/deploy/.ansible/tmp/ansible-tmp-1476374253.85-52715585730759/" &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'"'"'' &lt;192.168.77.203&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.77.203 '/bin/sh -c '"'"'/usr/bin/python /home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119/docker_network.py; rm -rf "/home/deploy/.ansible/tmp/ansible-tmp-1476374253.86-156181693682119/" &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'"'"'' fatal: [machine_3]: FAILED! =&gt; { "changed": false, "failed": true, "invocation": { "module_name": "docker_network" }, "module_stderr": "OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 10854\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.77.203 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_UmI8My/ansible_module_docker_network.py\", line 378, in &lt;module&gt;\r\n main()\r\n File \"/tmp/ansible_UmI8My/ansible_module_docker_network.py\", line 371, in main\r\n cm = DockerNetworkManager(client)\r\n File \"/tmp/ansible_UmI8My/ansible_module_docker_network.py\", line 211, in __init__\r\n self.present()\r\n File \"/tmp/ansible_UmI8My/ansible_module_docker_network.py\", line 335, in present\r\n self.create_network()\r\n File \"/tmp/ansible_UmI8My/ansible_module_docker_network.py\", line 283, in create_network\r\n ipam=ipam_config)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/utils/decorators.py\", line 35, in wrapper\r\n return f(self, *args, **kwargs)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/api/network.py\", line 62, in create_network\r\n return self._result(res, json=True)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/client.py\", line 178, in _result\r\n self._raise_for_status(response)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/client.py\", line 174, in _raise_for_status\r\n raise errors.APIError(e, response, explanation=explanation)\r\ndocker.errors.APIError: 500 Server Error: Internal Server Error (\"{\"message\":\"datastore for scope \\\"global\\\" is not initialized \"}\")\r\n", "msg": "MODULE FAILURE" } fatal: [machine_2]: FAILED! =&gt; { "changed": false, "failed": true, "invocation": { "module_name": "docker_network" }, "module_stderr": "OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 10849\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.77.202 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_gJEa7t/ansible_module_docker_network.py\", line 378, in &lt;module&gt;\r\n main()\r\n File \"/tmp/ansible_gJEa7t/ansible_module_docker_network.py\", line 371, in main\r\n cm = DockerNetworkManager(client)\r\n File \"/tmp/ansible_gJEa7t/ansible_module_docker_network.py\", line 211, in __init__\r\n self.present()\r\n File \"/tmp/ansible_gJEa7t/ansible_module_docker_network.py\", line 335, in present\r\n self.create_network()\r\n File \"/tmp/ansible_gJEa7t/ansible_module_docker_network.py\", line 283, in create_network\r\n ipam=ipam_config)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/utils/decorators.py\", line 35, in wrapper\r\n return f(self, *args, **kwargs)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/api/network.py\", line 62, in create_network\r\n return self._result(res, json=True)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/client.py\", line 178, in _result\r\n self._raise_for_status(response)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/client.py\", line 174, in _raise_for_status\r\n raise errors.APIError(e, response, explanation=explanation)\r\ndocker.errors.APIError: 500 Server Error: Internal Server Error (\"{\"message\":\"datastore for scope \\\"global\\\" is not initialized \"}\")\r\n", "msg": "MODULE FAILURE" } fatal: [machine_1]: FAILED! =&gt; { "changed": false, "failed": true, "invocation": { "module_name": "docker_network" }, "module_stderr": "OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 10754\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.77.201 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_kgQpcW/ansible_module_docker_network.py\", line 378, in &lt;module&gt;\r\n main()\r\n File \"/tmp/ansible_kgQpcW/ansible_module_docker_network.py\", line 371, in main\r\n cm = DockerNetworkManager(client)\r\n File \"/tmp/ansible_kgQpcW/ansible_module_docker_network.py\", line 211, in __init__\r\n self.present()\r\n File \"/tmp/ansible_kgQpcW/ansible_module_docker_network.py\", line 335, in present\r\n self.create_network()\r\n File \"/tmp/ansible_kgQpcW/ansible_module_docker_network.py\", line 283, in create_network\r\n ipam=ipam_config)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/utils/decorators.py\", line 35, in wrapper\r\n return f(self, *args, **kwargs)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/api/network.py\", line 62, in create_network\r\n return self._result(res, json=True)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/client.py\", line 178, in _result\r\n self._raise_for_status(response)\r\n File \"/usr/local/lib/python2.7/dist-packages/docker/client.py\", line 174, in _raise_for_status\r\n raise errors.APIError(e, response, explanation=explanation)\r\ndocker.errors.APIError: 500 Server Error: Internal Server Error (\"{\"message\":\"rpc error: code = 3 desc = driver name: if driver is specified name is required\"}\")\r\n", "msg": "MODULE FAILURE" } </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="182830446" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/5254" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/5254/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/5254">ansible/ansible-modules-core#5254</a></p>
<ul dir="auto"> <li>Feature Idea</li> </ul> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.0.1.0 config file = /Users/do3cc/dev/ansible/ansible.cfg configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.0.1.0 config file = /Users/do3cc/dev/ansible/ansible.cfg configured module search path = Default w/o overrides </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">N/A</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">It would be nice to be able to provide a seed for random, so that I get a predictible random number<br> Use case:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Periodic restart of workers cron: name: &quot;restart worker {{item}}&quot; minute: &quot;{{60|random(item)}}&quot; hour: */4 job: &quot;restart {{item}}&quot; "><pre class="notranslate"><code class="notranslate">- name: Periodic restart of workers cron: name: "restart worker {{item}}" minute: "{{60|random(item)}}" hour: */4 job: "restart {{item}}" </code></pre></div> <p dir="auto">Given that the item name does not change with each invocation, I would always get the same random number, and my cronjob would not be changed with each invocation.</p>
0
<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>: Binary</li> <li><strong>TensorFlow version (use command below)</strong>: 1.8.0</li> <li><strong>Python version</strong>: 2.7.12</li> <li><strong>Bazel version (if compiling from source)</strong>: n/a</li> <li><strong>GCC/Compiler version (if compiling from source)</strong>: n/a</li> <li><strong>CUDA/cuDNN version</strong>: n/a</li> <li><strong>GPU model and memory</strong>: n/a</li> <li><strong>Exact command to reproduce</strong>: n/a</li> </ul> <h3 dir="auto">Describe the problem</h3> <p dir="auto">Currently <code class="notranslate">tf.estimator.train_and_evaluate</code> makes it easy to use an <code class="notranslate">Estimator</code> to perform both training and evaluation, possibly in a distributed environment. However, this function only supports a single evaluation dataset. This makes the function suboptimal because we oftentimes want to evaluate on both the training and the validation set in order to get a sense for the amount of overfitting that is happening. It would be ideal if we could perhaps pass a list of <code class="notranslate">EvalSpec</code> objects to <code class="notranslate">train_and_evaluate</code>.</p>
<p dir="auto">Sometimes could be useful to evaluate on different clusters of the evaluation set with distinct metrics, summaries etc.<br> Do you plan that this interface will accept a list of <code class="notranslate">eval_spec</code> in the future?</p>
1
<p dir="auto">I have 3 nodes in my cluster and two are master cum data nodes and one node is client node. When I issues stats api(_cluster/stats), I still see the count of client as 0 even though its is up and working.</p> <p dir="auto">Below is the response of stats API</p> <p dir="auto">nodes: {<br> count: {<br> total: 3,<br> master_only: 0,<br> data_only: 0,<br> master_data: 2,<br> client: 0<br> },<br> versions: [<br> "2.0.1"<br> ],</p> <p dir="auto">jvm: {<br> max_uptime_in_millis: 1181282,<br> versions: [<br> {<br> version: "1.8.0_73",<br> vm_name: "Java HotSpot(TM) 64-Bit Server VM",<br> vm_version: "25.73-b02",<br> vm_vendor: "Oracle Corporation",<br> count: 3<br> }<br> ],</p> <p dir="auto">OS is<br> name: "Linux",<br> arch: "amd64",<br> version: "2.6.18-308.4.1.0.1.el5",<br> available_processors: 32<br> :</p>
<p dir="auto">From a cluster running ES 2.1.1 (or ES 1.x) with 8 nodes, two of which were client nodes:</p> <div class="highlight highlight-source-httpspec notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="GET _cluster/stats"><pre class="notranslate"><span class="pl-k">GET</span> <span class="pl-ii">_cluster/stats</span></pre></div> <p dir="auto">produces:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;nodes&quot;: { &quot;count&quot;: { &quot;total&quot;: 8, &quot;master_only&quot;: 2, &quot;data_only&quot;: 4, &quot;master_data&quot;: 0, &quot;client&quot;: 0 } ... }"><pre class="notranslate"><span class="pl-ent">"nodes"</span>: { <span class="pl-ent">"count"</span>: { <span class="pl-ent">"total"</span>: <span class="pl-c1">8</span>, <span class="pl-ent">"master_only"</span>: <span class="pl-c1">2</span>, <span class="pl-ent">"data_only"</span>: <span class="pl-c1">4</span>, <span class="pl-ent">"master_data"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"client"</span>: <span class="pl-c1">0</span> } <span class="pl-ii">...</span> }</pre></div> <p dir="auto">These nodes were set to being client nodes implicitly by using</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="node.master: false node.data: false"><pre class="notranslate"><span class="pl-ent">node.master</span>: <span class="pl-c1">false</span> <span class="pl-ent">node.data</span>: <span class="pl-c1">false</span></pre></div> <p dir="auto">It appears that the node.client count is only tripped when using <code class="notranslate">node.client: true</code>, but it should be <code class="notranslate">node.client || (node.master || node.data || node.ingest) == false</code>. This should be done at the source where ever we do that check initially. The annoying thing is that it kind of prevents other types of nodes from being dynamically added without "lying" if we change that check.</p>
1
<p dir="auto">When trying to open a link via <code class="notranslate">shell.openExternal('https://www.google.com')</code> it causes Atom to freeze in case the default browser is Chromium (<code class="notranslate">chromium-browser</code>).</p> <p dir="auto">After getting the prompt that Atom has freezed and hitting the kill button I get the following dump on my console on which I've invoked Atom</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[9784:0416/151609:ERROR:browser_main_loop.cc(170)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on. App load time: 224ms ... The setuid sandbox is not running as root. Common causes: * An unprivileged process using ptrace on it, like a debugger. * A parent process set prctl(PR_SET_NO_NEW_PRIVS, ...) Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted The program 'atom' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 789 error_code 3 request_code 40 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.)"><pre lang="text" class="notranslate"><code class="notranslate">[9784:0416/151609:ERROR:browser_main_loop.cc(170)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on. App load time: 224ms ... The setuid sandbox is not running as root. Common causes: * An unprivileged process using ptrace on it, like a debugger. * A parent process set prctl(PR_SET_NO_NEW_PRIVS, ...) Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted The program 'atom' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 789 error_code 3 request_code 40 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) </code></pre></div> <p dir="auto">I'm running Xubuntu 14.10 (64bit) with the latest Chromium installed available via apt-get and Atom 0.192.0</p> <p dir="auto">Edit: See also discussion here <a href="https://discuss.atom.io/t/open-url-in-external-browser/16179/5" rel="nofollow">https://discuss.atom.io/t/open-url-in-external-browser/16179/5</a></p>
<p dir="auto">On Ubuntu 14.04 with Atom Shell 0.22.3 <code class="notranslate">require('shell').openExternal('http://github.com')</code> does not seem to work. I have both Firefox and Chromium installed on that VM.</p> <p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="66002267" data-permission-text="Title is private" data-url="https://github.com/atom-archive/feedback/issues/40" data-hovercard-type="issue" data-hovercard-url="/atom-archive/feedback/issues/40/hovercard" href="https://github.com/atom-archive/feedback/issues/40">atom-archive/feedback#40</a> for other reports.</p> <p dir="auto">Similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="41648590" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/623" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/623/hovercard" href="https://github.com/electron/electron/issues/623">#623</a></p>
1
<p dir="auto"><strong>System information</strong></p> <ul dir="auto"> <li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04</li> <li>TensorFlow installed from (source or binary): source</li> <li>TensorFlow version: 1.13.1</li> <li>Python version: 2.7</li> <li>Bazel version (if compiling from source): 0.21.0</li> <li>GCC/Compiler version (if compiling from source): 7.3.0</li> <li>CUDA/cuDNN version: 10.0</li> <li>GPU model and memory: GeForce GTX 970</li> </ul> <p dir="auto"><strong>Describe the problem</strong></p> <p dir="auto">The set of CUDA compute capabilities (CCC from now on) is set as {3.0, 5.2} during configuration. File <code class="notranslate">.tf_configure.bazelrc</code> contains <code class="notranslate">build --action_env TF_CUDA_COMPUTE_CAPABILITIES="3.0,5.2"</code> (full file: <a href="https://github.com/tensorflow/tensorflow/files/3043058/tf_configure.bazelrc.txt">tf_configure.bazelrc.txt</a>). After transfering the resulting pip package to a PC with CCC 3.0, tensorflow will reject a GPU with CCC lower than 3.5.</p> <p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong></p> <ol dir="auto"> <li><code class="notranslate">./configure</code> (resulting in <a href="https://github.com/tensorflow/tensorflow/files/3043058/tf_configure.bazelrc.txt">tf_configure.bazelrc.txt</a>)</li> <li><code class="notranslate">bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package</code></li> <li><code class="notranslate">./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg</code></li> <li>move <code class="notranslate">/tmp/tensorflow_pkg/tensorflow-1.13.1-cp27-cp27mu-linux_x86_64.whl</code> to other PC with CCC 3.0</li> </ol>
<p dir="auto">Error message occurs when applying L2 loss weight decay with 1080ti gpu activated<br> No Error message occurs when applying weight decay with only cpu running<br> The error message always come out if training with all the Optimizer in anaconda, win10, gpu 1080ti, tensorflow 1.6.0. CUDA 9 CUDNN 7.0</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;train_ADAM_add1CNN.py&quot;, line 89, in &lt;module&gt; _ = sess.run([train_step_adam],feed_dict={img_in:X_mb, label_gt:y_gt}) File &quot;D:\ProgramData\Anaconda4\envs\tff\lib\site-packages\tensorflow\python\client\session.py&quot;, line 905, in run run_metadata_ptr) File &quot;D:\ProgramData\Anaconda4\envs\tff\lib\site-packages\tensorflow\python\client\session.py&quot;, line 1137, in _run feed_dict_tensor, options, run_metadata) File &quot;D:\ProgramData\Anaconda4\envs\tff\lib\site-packages\tensorflow\python\client\session.py&quot;, line 1355, in _do_run options, run_metadata) File &quot;D:\ProgramData\Anaconda4\envs\tff\lib\site-packages\tensorflow\python\client\session.py&quot;, line 1374, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: AttrValue must not have reference type value of float_ref for attr 'tensor_type'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "train_ADAM_add1CNN.py", line 89, in &lt;module&gt; _ = sess.run([train_step_adam],feed_dict={img_in:X_mb, label_gt:y_gt}) File "D:\ProgramData\Anaconda4\envs\tff\lib\site-packages\tensorflow\python\client\session.py", line 905, in run run_metadata_ptr) File "D:\ProgramData\Anaconda4\envs\tff\lib\site-packages\tensorflow\python\client\session.py", line 1137, in _run feed_dict_tensor, options, run_metadata) File "D:\ProgramData\Anaconda4\envs\tff\lib\site-packages\tensorflow\python\client\session.py", line 1355, in _do_run options, run_metadata) File "D:\ProgramData\Anaconda4\envs\tff\lib\site-packages\tensorflow\python\client\session.py", line 1374, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: AttrValue must not have reference type value of float_ref for attr 'tensor_type' </code></pre></div> <p dir="auto">Here is the example code that can duplicate the issue:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="... def optimize_adam(loss, learning_rate, LRdecaysteps, LRdecayrate): decay_learning_rate = tf.train.exponential_decay(learning_rate, global_step, LRdecaysteps, LRdecayrate, staircase=True) update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS) with tf.control_dependencies(update_ops): return tf.train.AdamOptimizer(decay_learning_rate).minimize(loss, global_step=global_step), decay_learning_rate regularization_loss = tf.add_n(tf.losses.get_regularization_losses()) total_loss = total_loss + regularization_loss train_step_adam,decay_learning_rate = optimize_adam(total_loss,learning_rate,LRdecaysteps,LRdecayrate) ..."><pre class="notranslate"><code class="notranslate">... def optimize_adam(loss, learning_rate, LRdecaysteps, LRdecayrate): decay_learning_rate = tf.train.exponential_decay(learning_rate, global_step, LRdecaysteps, LRdecayrate, staircase=True) update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS) with tf.control_dependencies(update_ops): return tf.train.AdamOptimizer(decay_learning_rate).minimize(loss, global_step=global_step), decay_learning_rate regularization_loss = tf.add_n(tf.losses.get_regularization_losses()) total_loss = total_loss + regularization_loss train_step_adam,decay_learning_rate = optimize_adam(total_loss,learning_rate,LRdecaysteps,LRdecayrate) ... </code></pre></div> <p dir="auto">it can be run with :<br> session_conf = tf.ConfigProto(<br> device_count={'CPU' : 1, 'GPU' : 0},<br> allow_soft_placement=True,<br> log_device_placement=False<br> )</p> <p dir="auto">But it will come out this error message with:<br> session_conf = tf.ConfigProto(<br> device_count={'CPU' : 1, 'GPU' : 1},<br> allow_soft_placement=True,<br> log_device_placement=False<br> )</p>
0
<p dir="auto">As everyone knows, Electron is great in terms of easiness of designing GUIs, but has some severe security and memory issues. The need to lock a version of Chromium and Node.js into each app means no easy way to quickly solve security issues (each developer has to update their own app's version manually) and it also means a system running several Electron apps will have 150 MB in it's memory multiplied by the number of open apps, even if they require the same version of the framework. This could also mean more than 1 GB of memory used for stuff as simple as desktop widgets.</p> <p dir="auto">A possible solution was proposed by the <a href="https://medium.com/dailyjs/put-your-electron-app-on-a-diet-with-electrino-c7ffdf1d6297" rel="nofollow">Electrino</a> project, but I think it's kind of an overkill.</p> <p dir="auto">What I think would be the ideal fix to all of the aforementioned, would be to provide an installable "Electron libraries" distribution, which would ideally also be able to receive automatic updates, and an option for developers to release a "lite" version of their app. When the first electron-lite app is loaded, the system starts the installed "Electron libraries", and when another app is started, the same libraries are called. This way not only every app weights less on storage, but also on memory, and we're sure that none of them executes old, security-flawed versions of Node and Chromium.</p> <p dir="auto">Of course this won't (at least immediately) replace the default way of installing electron apps, but developers could suggest, in their install site, to download the lite version + the electron libraries (if the user doesn't already have them installed), so that the amount of informed users who will prefer the safest option will increase.</p>
<ul dir="auto"> <li>Electron version: 1.82</li> <li>Operating system: Windows 10 - Windows Subsystem for Linux</li> </ul> <p dir="auto">With Windows Subsystem for Linux it is now possible to run Windows executables from bash.</p> <p dir="auto">To reproduce the <code class="notranslate">%HOMEDRIVE%%HOMEPATH%</code> folder creation issue:</p> <ol dir="auto"> <li>Enable Windows Subsystem for Linux in Windows 10</li> <li>Download and extract Electron to <code class="notranslate">C:\Program Files\Electron\</code></li> <li>Add a convenience alias to bash to run electron by just typing 'electron' and pressing enter:</li> </ol> <p dir="auto">Update your <code class="notranslate">.bashrc</code> file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="alias electron=&quot;/mnt/c/Program\ Files/Electron/electron.exe&quot;"><pre class="notranslate"><code class="notranslate">alias electron="/mnt/c/Program\ Files/Electron/electron.exe" </code></pre></div> <ol start="4" dir="auto"> <li> <p dir="auto">Close out and reenter your bash shell for Windows Subsystem for Linux. Run your newly aliased <code class="notranslate">electron</code> command.</p> </li> <li> <p dir="auto">The current folder you were in when you ran <code class="notranslate">electron</code> will now have a new folder titled <code class="notranslate">%HOMEDRIVE%%HOMEPATH%</code>.</p> </li> </ol> <p dir="auto">It looks like the folder is intended to store some logs, as its complete structure is:</p> <p dir="auto"><code class="notranslate">%HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Electron\logs</code></p> <p dir="auto">Would love to find a solution to this to stop these directories from being created.</p> <p dir="auto">Thanks!</p>
0
<p dir="auto">When a crate re-exports something from deep in its internal structure with "pub use", you can only find the thing at its original path. A case in point (that just happened on IRC) is searching for something like <code class="notranslate">uid_t</code> in the libc crate; you get the path <code class="notranslate">libc::types::os::arch::posix88::uid_t</code> when actually <code class="notranslate">libc::uid_t</code> suffices, but to know that you have to scan through the list of re-exports. Is it feasible for rustdoc to index these re-exported use paths?</p>
<p dir="auto">Currently, resolve does a lot of redundant error reporting. For example,</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: unresolved name /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~ /home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: use of undeclared module `ast` /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~ /home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: `ast::ident` does not name a structure /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~"><pre class="notranslate"><code class="notranslate">/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: unresolved name /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~ /home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: use of undeclared module `ast` /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~ /home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: `ast::ident` does not name a structure /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~ </code></pre></div> <p dir="auto">This should be a single error, "error: use of undeclared module <code class="notranslate">ast</code>".</p> <p dir="auto">Another example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: unresolved name /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~ /home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: use of undeclared module `ast` /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~ /home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: `ast::ident` does not name a structure /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~"><pre class="notranslate"><code class="notranslate">/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: unresolved name /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~ /home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: use of undeclared module `ast` /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~ /home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: `ast::ident` does not name a structure /home/cmr/hacking/rust/src/libextra/interner.rs:161 ast::ident { repr: off, ctxt: 0 } ^~~~~~~~~~ </code></pre></div> <p dir="auto">Fixing this will require careful finagling of resolve. The best way to handle this is probably some central error reporting infrastructure, and as soon as <em>one</em> error is reported, stop making new errors for the current span. This is going to be tricky because every error path needs to be followed to ensure that an error is reported, and that if only one error is reported, it is the right error. Needs vastly improved test coverage in compile-fail. Shouldn't be hard, but will take time.</p> <p dir="auto">Nominating for production-ready.</p>
0
<p dir="auto"><strong>Elasticsearch version</strong>:<br> 1.7.5</p> <p dir="auto"><strong>JVM version</strong>:<br> 1.8.0_40-64</p> <p dir="auto"><strong>OS version</strong>:<br> centos6</p> <p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:<br> The current merge count is different between _cat/nodes and _stats/merges. We show multiple merges being performed on the _cat/nodes api, however, _stats/merges shows no merges being performed for any index. We are not sure what is the true merge activity on the cluster. Also, is there a way to see what shards are bing merged?</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6633418/14191693/f8057626-f75e-11e5-9a62-10c0c76de164.png"><img src="https://cloud.githubusercontent.com/assets/6633418/14191693/f8057626-f75e-11e5-9a62-10c0c76de164.png" alt="cat-nodes" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6633418/14191712/0a9e1cf2-f75f-11e5-85f9-27187f099f09.png"><img src="https://cloud.githubusercontent.com/assets/6633418/14191712/0a9e1cf2-f75f-11e5-85f9-27187f099f09.png" alt="stats-merges" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Steps to reproduce</strong>:<br> We are not sure how the cluster gets into this state. We have experienced this multiple times. We have not found a way to clear what we think are stuck merges without bouncing the nodes.</p> <p dir="auto"><strong>Provide logs (if relevant)</strong>:</p>
<p dir="auto">Marvel Sense is not working over ssl, it hangs when it tried to connect to the elasticsearch API.The rest of Marvel seems to be working fine, as does the elasticsearch API if called directly.</p> <p dir="auto">I am using a freshly installed elasticsearch 1.4.1 and the latest Marvel.</p> <p dir="auto">Elasticsearch is exposed on the internet over SSL as <a href="https://mydomain/" rel="nofollow">https://mydomain/</a>.</p> <p dir="auto">When I profile the javascript in the browser, I can see that Marvel Sense actually tries to make the calls to the API over http, even though the API and Marval are using https. My Elasticsearch installation is not available over the internet to anything other than https. I have nginx installed, which passes the elasticsearch calls from 443 to 9200. Again this all works fine when calling the Elasticsearch API or the plugins etc.</p> <p dir="auto">Marvel Sense ignores the url that is in the config file (plugins/marvel/_site/kibana/config.js). It goes to http even if I hardcode the elasticsearch with a https prefix.</p>
0
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">The profiles.json file is hard to find when you don't click the Settings button within the Terminal. Let's move the default location to somewhere more accessible.</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">The area in which my cursor will shift from a pointer to a double-sided arrow for resizing is very small right now, which makes it more difficult than it needs to be to resize the window.</p> <p dir="auto">I'd like to see this area be increased so it's not so difficult to resize.</p>
0
<p dir="auto">deno: 0.10.0<br> v8: 7.7.37<br> typescript: 3.5.1</p> <p dir="auto">When you try to import an ecmascript module using the <a href="https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop" rel="nofollow">REPL</a>, you get an Uncaught SyntaxError:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; import Drash from &quot;https://deno.land/x/drash@v0.8.6/mod.ts&quot;; error: Uncaught SyntaxError: Unexpected identifier ► &lt;unknown&gt;:1:8 at evaluate (js/repl.ts:87:34) at replLoop (js/repl.ts:145:13)"><pre class="notranslate"><code class="notranslate">&gt; import Drash from "https://deno.land/x/drash@v0.8.6/mod.ts"; error: Uncaught SyntaxError: Unexpected identifier ► &lt;unknown&gt;:1:8 at evaluate (js/repl.ts:87:34) at replLoop (js/repl.ts:145:13) </code></pre></div> <p dir="auto">Node.js allows CommonJS module loading using their REPL, but I'm unable to import ES modules there either: <a href="https://stackoverflow.com/questions/56963708/" rel="nofollow">https://stackoverflow.com/questions/56963708/</a>.</p>
<p dir="auto">When in the Deno REPL and executing:<br> <code class="notranslate">import { env } from "deno";</code></p> <p dir="auto">The output is:<br> <code class="notranslate">SyntaxError: Unexpected token {</code></p> <p dir="auto">Probably related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="377593861" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1158" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1158/hovercard" href="https://github.com/denoland/deno/issues/1158">#1158</a></p> <p dir="auto">Executing: <code class="notranslate">deno -v</code> on the commandline returns:<br> <code class="notranslate">deno: 0.2.1</code><br> <code class="notranslate">v8: 7.1.302.4</code><br> <code class="notranslate">typescript: 3.2.1</code></p>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pd.date_range(pd.Timestamp('2015-1-1', tz='US/Eastern'), pd.Timestamp('2016-1-1', tz='US/Eastern'), freq='H') + pd.DateOffset(days=1) Traceback (most recent call last): File &quot;/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py&quot;, line 3066, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File &quot;&lt;ipython-input-21-9574a4185a77&gt;&quot;, line 1, in &lt;module&gt; pd.date_range(pd.Timestamp('2015-1-1', tz='US/Eastern'), pd.Timestamp('2016-1-1', tz='US/Eastern'), freq='H') + pd.DateOffset(days=1) File &quot;/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/pandas/tseries/base.py&quot;, line 412, in __add__ return self._add_delta(other) File &quot;/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/pandas/tseries/index.py&quot;, line 731, in _add_delta new_values = self._add_offset(delta).asi8 File &quot;/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/pandas/tseries/index.py&quot;, line 750, in _add_offset result = result.tz_localize(self.tz) File &quot;/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/pandas/util/decorators.py&quot;, line 89, in wrapper return func(*args, **kwargs) File &quot;/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/pandas/tseries/index.py&quot;, line 1724, in tz_localize ambiguous=ambiguous) File &quot;pandas/tslib.pyx&quot;, line 3781, in pandas.tslib.tz_localize_to_utc (pandas/tslib.c:64980) NonExistentTimeError: 2015-03-08 02:00:00"><pre class="notranslate"><code class="notranslate">pd.date_range(pd.Timestamp('2015-1-1', tz='US/Eastern'), pd.Timestamp('2016-1-1', tz='US/Eastern'), freq='H') + pd.DateOffset(days=1) Traceback (most recent call last): File "/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 3066, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "&lt;ipython-input-21-9574a4185a77&gt;", line 1, in &lt;module&gt; pd.date_range(pd.Timestamp('2015-1-1', tz='US/Eastern'), pd.Timestamp('2016-1-1', tz='US/Eastern'), freq='H') + pd.DateOffset(days=1) File "/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/pandas/tseries/base.py", line 412, in __add__ return self._add_delta(other) File "/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/pandas/tseries/index.py", line 731, in _add_delta new_values = self._add_offset(delta).asi8 File "/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/pandas/tseries/index.py", line 750, in _add_offset result = result.tz_localize(self.tz) File "/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/pandas/util/decorators.py", line 89, in wrapper return func(*args, **kwargs) File "/home/jeff/.virtualenvs/omnipotent/local/lib/python2.7/site-packages/pandas/tseries/index.py", line 1724, in tz_localize ambiguous=ambiguous) File "pandas/tslib.pyx", line 3781, in pandas.tslib.tz_localize_to_utc (pandas/tslib.c:64980) NonExistentTimeError: 2015-03-08 02:00:00 </code></pre></div> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 2.7.6.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 3.13.0-61-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8</p> <p dir="auto">pandas: 0.17.1<br> nose: None<br> pip: 7.1.0<br> setuptools: 18.0.1<br> Cython: None<br> numpy: 1.10.4<br> scipy: 0.16.1<br> statsmodels: None<br> IPython: 4.0.3<br> sphinx: None<br> patsy: None<br> dateutil: 2.4.2<br> pytz: 2015.7<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> matplotlib: 1.5.0<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: 4.4.1<br> html5lib: None<br> httplib2: None<br> apiclient: None<br> sqlalchemy: 1.0.11<br> pymysql: None<br> psycopg2: 2.6.1 (dt dec pq3 ext lo64)<br> Jinja2: None</p>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import pandas as pd &gt;&gt;&gt; idx = pd.DatetimeIndex(['2000-03-26 04:00'], tz='Europe/Berlin') # Switch to DST was on that day &gt;&gt;&gt; idx DatetimeIndex(['2000-03-26 04:00:00+02:00'], dtype='datetime64[ns, Europe/Berlin]', freq=None) &gt;&gt;&gt; idx + pd.DateOffset(hours=-2) Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;/var/local/conda/envs/pandas-debug/lib/python3.7/site-packages/pandas/core/indexes/datetimelike.py&quot;, line 510, in __add__ result = self._data.__add__(maybe_unwrap_index(other)) File &quot;/var/local/conda/envs/pandas-debug/lib/python3.7/site-packages/pandas/core/arrays/datetimelike.py&quot;, line 1212, in __add__ result = self._add_offset(other) File &quot;/var/local/conda/envs/pandas-debug/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py&quot;, line 832, in _add_offset result = result.tz_localize(self.tz) File &quot;/var/local/conda/envs/pandas-debug/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py&quot;, line 1151, in tz_localize self.asi8, tz, ambiguous=ambiguous, nonexistent=nonexistent File &quot;pandas/_libs/tslibs/tzconversion.pyx&quot;, line 276, in pandas._libs.tslibs.tzconversion.tz_localize_to_utc pytz.exceptions.NonExistentTimeError: 2000-03-26 02:00:00 &gt;&gt;&gt; idx[0] + pd.DateOffset(hours=-2) Timestamp('2000-03-26 01:00:00+0100', tz='Europe/Berlin')"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">idx</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DatetimeIndex</span>([<span class="pl-s">'2000-03-26 04:00'</span>], <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">'Europe/Berlin'</span>) <span class="pl-c"># Switch to DST was on that day</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">idx</span> <span class="pl-v">DatetimeIndex</span>([<span class="pl-s">'2000-03-26 04:00:00+02:00'</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'datetime64[ns, Europe/Berlin]'</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-c1">None</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">idx</span> <span class="pl-c1">+</span> <span class="pl-s1">pd</span>.<span class="pl-v">DateOffset</span>(<span class="pl-s1">hours</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">2</span>) <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"&lt;stdin&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-v">File</span> <span class="pl-s">"/var/local/conda/envs/pandas-debug/lib/python3.7/site-packages/pandas/core/indexes/datetimelike.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">510</span>, <span class="pl-s1">in</span> <span class="pl-s1">__add__</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_data</span>.<span class="pl-en">__add__</span>(<span class="pl-en">maybe_unwrap_index</span>(<span class="pl-s1">other</span>)) <span class="pl-v">File</span> <span class="pl-s">"/var/local/conda/envs/pandas-debug/lib/python3.7/site-packages/pandas/core/arrays/datetimelike.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1212</span>, <span class="pl-s1">in</span> <span class="pl-s1">__add__</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_add_offset</span>(<span class="pl-s1">other</span>) <span class="pl-v">File</span> <span class="pl-s">"/var/local/conda/envs/pandas-debug/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">832</span>, <span class="pl-s1">in</span> <span class="pl-s1">_add_offset</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">result</span>.<span class="pl-en">tz_localize</span>(<span class="pl-s1">self</span>.<span class="pl-s1">tz</span>) <span class="pl-v">File</span> <span class="pl-s">"/var/local/conda/envs/pandas-debug/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1151</span>, <span class="pl-s1">in</span> <span class="pl-s1">tz_localize</span> <span class="pl-s1">self</span>.<span class="pl-s1">asi8</span>, <span class="pl-s1">tz</span>, <span class="pl-s1">ambiguous</span><span class="pl-c1">=</span><span class="pl-s1">ambiguous</span>, <span class="pl-s1">nonexistent</span><span class="pl-c1">=</span><span class="pl-s1">nonexistent</span> <span class="pl-v">File</span> <span class="pl-s">"pandas/_libs/tslibs/tzconversion.pyx"</span>, <span class="pl-s1">line</span> <span class="pl-c1">276</span>, <span class="pl-s1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">_libs</span>.<span class="pl-s1">tslibs</span>.<span class="pl-s1">tzconversion</span>.<span class="pl-s1">tz_localize_to_utc</span> <span class="pl-s1">pytz</span>.<span class="pl-s1">exceptions</span>.<span class="pl-v">NonExistentTimeError</span>: <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">03</span><span class="pl-c1">-</span><span class="pl-c1">26</span> <span class="pl-c1">02</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">idx</span>[<span class="pl-c1">0</span>] <span class="pl-c1">+</span> <span class="pl-s1">pd</span>.<span class="pl-v">DateOffset</span>(<span class="pl-s1">hours</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">2</span>) <span class="pl-v">Timestamp</span>(<span class="pl-s">'2000-03-26 01:00:00+0100'</span>, <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">'Europe/Berlin'</span>)</pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">The vectorized operation <code class="notranslate">DatetimeIndex + DateOffset</code> is broken around the DST switching time. However, the same operation works element-wise (<code class="notranslate">Timestamp + DateOffset</code>), so I would expect either both versions to work (preferably) or both versions to fail with the same error.</p> <h4 dir="auto">Expected Output</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="DatetimeIndex(['2000-03-26 01:00:00+01:00'], dtype='datetime64[ns, Europe/Berlin]', freq=None)"><pre class="notranslate"><span class="pl-v">DatetimeIndex</span>([<span class="pl-s">'2000-03-26 01:00:00+01:00'</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'datetime64[ns, Europe/Berlin]'</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-c1">None</span>)</pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit : None<br> python : 3.7.4.final.0<br> python-bits : 64<br> OS : Linux<br> OS-release : 5.0.0-29-generic<br> machine : x86_64<br> processor : x86_64<br> byteorder : little<br> LC_ALL : None<br> LANG : en_US.UTF-8<br> LOCALE : en_US.UTF-8</p> <p dir="auto">pandas : 0.25.1<br> numpy : 1.16.5<br> pytz : 2019.2<br> dateutil : 2.8.0<br> pip : 19.2.3<br> setuptools : 41.2.0<br> Cython : None<br> pytest : None<br> hypothesis : None<br> sphinx : None<br> blosc : None<br> feather : None<br> xlsxwriter : None<br> lxml.etree : None<br> html5lib : None<br> pymysql : None<br> psycopg2 : None<br> jinja2 : None<br> IPython : None<br> pandas_datareader: None<br> bs4 : None<br> bottleneck : None<br> fastparquet : None<br> gcsfs : None<br> lxml.etree : None<br> matplotlib : None<br> numexpr : None<br> odfpy : None<br> openpyxl : None<br> pandas_gbq : None<br> pyarrow : None<br> pytables : None<br> s3fs : None<br> scipy : None<br> sqlalchemy : None<br> tables : None<br> xarray : None<br> xlrd : None<br> xlwt : None<br> xlsxwriter : None</p> </details>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=skaffman" rel="nofollow">Kenny MacLeod</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6234?redirect=false" rel="nofollow">SPR-6234</a></strong> and commented</p> <p dir="auto">With EhCach you can register event listeners with individual caches. Unfortunately, Spring's EhCacheFactoryBean does not provide the facility for configuring these.</p> <p dir="auto">We still have the option of configuring the caches in ehcache.xml (see <a href="http://ehcache.org/EhcacheUserGuide.html#id.s28" rel="nofollow">http://ehcache.org/EhcacheUserGuide.html#id.s28</a>), but I much prefer doing this via EhCacheFactoryBean.</p> <p dir="auto">I suggest being able to inject a List of CacheEventListenerFactory objects into EhCacheFactoryBean, which would then register them with the cache it creates.</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.5.6, 3.0 M4</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="398094211" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10312" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10312/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10312">#10312</a> EhCacheFactoryBean should support CacheEventListener (<em><strong>"duplicates"</strong></em>)</li> </ul> <p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/747300f34ce80dca644b82d314b8ebb727b4882e/hovercard" href="https://github.com/spring-projects/spring-framework/commit/747300f34ce80dca644b82d314b8ebb727b4882e"><tt>747300f</tt></a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jhaile" rel="nofollow">Jeremy Haile</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5324?redirect=false" rel="nofollow">SPR-5324</a></strong> and commented</p> <p dir="auto">The "scanPackages" property requires the package name to have a trailing "." which is inconsistent with the component-scan. This feature was adding by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398087697" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9415" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9415/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9415">#9415</a></p> <p dir="auto">ClassPathScanningCandidateComponentProvider (used by component-scan) constructs the scanning pattern like this:<br> String packageSearchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + resolveBasePackage(basePackage) + "/" + this.resourcePattern;</p> <p dir="auto">AnnotationSessionFactoryBean constructs the scanning pattern like this:<br> String pattern = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + ClassUtils.convertClassNameToResourcePath(pkg) + RESOURCE_PATTERN;</p> <p dir="auto">Notice the missing "/" in the hibernate class. This means that the resource pattern is constructed like classpath*:myPackage**/<strong>.class instead of classpath</strong>:myPackage/**/*.class</p> <p dir="auto">This works when all persistence classes are in the package to be scanned, but fails to scan subclasses. AnnotationSessionFactoryBean should be changed to construct its pattern like component-scan does.</p> <p dir="auto">A workaround is to append a trailing "." onto the end of your package name.</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.5.6</p> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398097073" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10711" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10711/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10711">#10711</a> AnnotationSessionFactoryBean packagesToScan in a OSGi environment (<em><strong>"is duplicated by"</strong></em>)</li> </ul> <p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/71df72d6341015c8b27f574c2d1a2be926e4fadb/hovercard" href="https://github.com/spring-projects/spring-framework/commit/71df72d6341015c8b27f574c2d1a2be926e4fadb"><tt>71df72d</tt></a></p>
0
<h4 dir="auto">In a nutshell:</h4> <ul dir="auto"> <li><code class="notranslate">groupby</code> on a single categorical column with prescribed categories incorrectly returns results for <strong>all</strong> categories, even those that are not actually present in the DataFrame.</li> <li>In addition, when aggregating after grouping on categoricals (<code class="notranslate">groupby.sum</code> and the likes), with both prescribed and non-prescribed categories, we get values for <strong>all possible combinations</strong> of categories, including those not present in the DataFrame.</li> </ul> <h4 dir="auto">Problem description and code samples</h4> <h5 dir="auto">Case 1: group by a single column</h5> <p dir="auto">Consider the following code where we define a DataFrame with a categorical column with prescribed categories.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd labels = pd.Series(list('abcbabcab')) df = pd.DataFrame({'label1': labels, 'x': [0, 1, 1, 1, 1, 0, 1, 1, 1]}) df.label1 = labels.astype('category', categories=list('abcdef'))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-s1">labels</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-en">list</span>(<span class="pl-s">'abcbabcab'</span>)) <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'label1'</span>: <span class="pl-s1">labels</span>, <span class="pl-s">'x'</span>: [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>]}) <span class="pl-s1">df</span>.<span class="pl-s1">label1</span> <span class="pl-c1">=</span> <span class="pl-s1">labels</span>.<span class="pl-en">astype</span>(<span class="pl-s">'category'</span>, <span class="pl-s1">categories</span><span class="pl-c1">=</span><span class="pl-en">list</span>(<span class="pl-s">'abcdef'</span>))</pre></div> <p dir="auto">When we group by the categorical <code class="notranslate">label1</code> column and aggregate, we incorrectly get results for <strong>all</strong> prescribed categories, including those that are not present in the DataFrame (see rows below where the value of x is <code class="notranslate">NaN</code>):</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In[6]: df.groupby('label1').sum() Out[6]: x label1 a 2.0 b 3.0 c 2.0 d NaN e NaN f NaN"><pre class="notranslate"><span class="pl-v">In</span>[<span class="pl-c1">6</span>]: <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>(<span class="pl-s">'label1'</span>).<span class="pl-en">sum</span>() <span class="pl-v">Out</span>[<span class="pl-c1">6</span>]: <span class="pl-s1">x</span> <span class="pl-s1">label1</span> <span class="pl-s1">a</span> <span class="pl-c1">2.0</span> <span class="pl-s1">b</span> <span class="pl-c1">3.0</span> <span class="pl-s1">c</span> <span class="pl-c1">2.0</span> <span class="pl-s1">d</span> <span class="pl-v">NaN</span> <span class="pl-s1">e</span> <span class="pl-v">NaN</span> <span class="pl-s1">f</span> <span class="pl-v">NaN</span></pre></div> <p dir="auto">The elements in excess are already present in the <code class="notranslate">groupby</code> object:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In[7]: df.groupby('label1').groups Out[7]: {'a': Int64Index([0, 4, 7], dtype='int64'), 'b': Int64Index([1, 3, 5, 8], dtype='int64'), 'c': Int64Index([2, 6], dtype='int64'), 'd': Int64Index([], dtype='int64'), 'e': Int64Index([], dtype='int64'), 'f': Int64Index([], dtype='int64')}"><pre class="notranslate"><span class="pl-v">In</span>[<span class="pl-c1">7</span>]: <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>(<span class="pl-s">'label1'</span>).<span class="pl-s1">groups</span> <span class="pl-v">Out</span>[<span class="pl-c1">7</span>]: {<span class="pl-s">'a'</span>: <span class="pl-v">Int64Index</span>([<span class="pl-c1">0</span>, <span class="pl-c1">4</span>, <span class="pl-c1">7</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>), <span class="pl-s">'b'</span>: <span class="pl-v">Int64Index</span>([<span class="pl-c1">1</span>, <span class="pl-c1">3</span>, <span class="pl-c1">5</span>, <span class="pl-c1">8</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>), <span class="pl-s">'c'</span>: <span class="pl-v">Int64Index</span>([<span class="pl-c1">2</span>, <span class="pl-c1">6</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>), <span class="pl-s">'d'</span>: <span class="pl-v">Int64Index</span>([], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>), <span class="pl-s">'e'</span>: <span class="pl-v">Int64Index</span>([], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>), <span class="pl-s">'f'</span>: <span class="pl-v">Int64Index</span>([], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>)}</pre></div> <p dir="auto">The above doesn't happen if the categories for the <code class="notranslate">label1</code> column are not prescribed or if the column is not converted to a categorical at all.</p> <h5 dir="auto">Case 2: group by multiple columns</h5> <p dir="auto">Consider now the case where we have two categorical columns:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df = pd.DataFrame({'label1': labels, 'label2': labels, 'x': [0, 1, 1, 1, 1, 0, 1, 1, 1]}) df.label1 = labels.astype('category', categories=list('abcdef')) df.label2 = labels.astype('category', categories=list('abcdef'))"><pre class="notranslate"><span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'label1'</span>: <span class="pl-s1">labels</span>, <span class="pl-s">'label2'</span>: <span class="pl-s1">labels</span>, <span class="pl-s">'x'</span>: [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>]}) <span class="pl-s1">df</span>.<span class="pl-s1">label1</span> <span class="pl-c1">=</span> <span class="pl-s1">labels</span>.<span class="pl-en">astype</span>(<span class="pl-s">'category'</span>, <span class="pl-s1">categories</span><span class="pl-c1">=</span><span class="pl-en">list</span>(<span class="pl-s">'abcdef'</span>)) <span class="pl-s1">df</span>.<span class="pl-s1">label2</span> <span class="pl-c1">=</span> <span class="pl-s1">labels</span>.<span class="pl-en">astype</span>(<span class="pl-s">'category'</span>, <span class="pl-s1">categories</span><span class="pl-c1">=</span><span class="pl-en">list</span>(<span class="pl-s">'abcdef'</span>))</pre></div> <p dir="auto">Contrary to the single column case above, we do get the correct group labels when we group by both categorical columns <code class="notranslate">label1</code> and <code class="notranslate">label2</code>:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In[11]: df.groupby(['label1', 'label2']).groups Out[11]: {('a', 'a'): Int64Index([0, 4, 7], dtype='int64'), ('b', 'b'): Int64Index([1, 3, 5, 8], dtype='int64'), ('c', 'c'): Int64Index([2, 6], dtype='int64')}"><pre class="notranslate"><span class="pl-v">In</span>[<span class="pl-c1">11</span>]: <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s">'label1'</span>, <span class="pl-s">'label2'</span>]).<span class="pl-s1">groups</span> <span class="pl-v">Out</span>[<span class="pl-c1">11</span>]: {(<span class="pl-s">'a'</span>, <span class="pl-s">'a'</span>): <span class="pl-v">Int64Index</span>([<span class="pl-c1">0</span>, <span class="pl-c1">4</span>, <span class="pl-c1">7</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>), (<span class="pl-s">'b'</span>, <span class="pl-s">'b'</span>): <span class="pl-v">Int64Index</span>([<span class="pl-c1">1</span>, <span class="pl-c1">3</span>, <span class="pl-c1">5</span>, <span class="pl-c1">8</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>), (<span class="pl-s">'c'</span>, <span class="pl-s">'c'</span>): <span class="pl-v">Int64Index</span>([<span class="pl-c1">2</span>, <span class="pl-c1">6</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>)}</pre></div> <p dir="auto">But we still get incorrect results if we aggregate:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In[12]: df.groupby(['label1', 'label2']).sum() Out[12]: x label1 label2 a a 2.0 b NaN c NaN d NaN e NaN f NaN b a NaN b 3.0 c NaN d NaN e NaN f NaN c a NaN b NaN c 2.0 d NaN e NaN f NaN d a NaN b NaN c NaN d NaN e NaN f NaN e a NaN b NaN c NaN d NaN e NaN f NaN f a NaN b NaN c NaN d NaN e NaN f NaN"><pre class="notranslate"><span class="pl-v">In</span>[<span class="pl-c1">12</span>]: <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s">'label1'</span>, <span class="pl-s">'label2'</span>]).<span class="pl-en">sum</span>() <span class="pl-v">Out</span>[<span class="pl-c1">12</span>]: <span class="pl-s1">x</span> <span class="pl-s1">label1</span> <span class="pl-s1">label2</span> <span class="pl-s1">a</span> <span class="pl-s1">a</span> <span class="pl-c1">2.0</span> <span class="pl-s1">b</span> <span class="pl-v">NaN</span> <span class="pl-s1">c</span> <span class="pl-v">NaN</span> <span class="pl-s1">d</span> <span class="pl-v">NaN</span> <span class="pl-s1">e</span> <span class="pl-v">NaN</span> <span class="pl-s1">f</span> <span class="pl-v">NaN</span> <span class="pl-s1">b</span> <span class="pl-s1">a</span> <span class="pl-v">NaN</span> <span class="pl-s1">b</span> <span class="pl-c1">3.0</span> <span class="pl-s1">c</span> <span class="pl-v">NaN</span> <span class="pl-s1">d</span> <span class="pl-v">NaN</span> <span class="pl-s1">e</span> <span class="pl-v">NaN</span> <span class="pl-s1">f</span> <span class="pl-v">NaN</span> <span class="pl-s1">c</span> <span class="pl-s1">a</span> <span class="pl-v">NaN</span> <span class="pl-s1">b</span> <span class="pl-v">NaN</span> <span class="pl-s1">c</span> <span class="pl-c1">2.0</span> <span class="pl-s1">d</span> <span class="pl-v">NaN</span> <span class="pl-s1">e</span> <span class="pl-v">NaN</span> <span class="pl-s1">f</span> <span class="pl-v">NaN</span> <span class="pl-s1">d</span> <span class="pl-s1">a</span> <span class="pl-v">NaN</span> <span class="pl-s1">b</span> <span class="pl-v">NaN</span> <span class="pl-s1">c</span> <span class="pl-v">NaN</span> <span class="pl-s1">d</span> <span class="pl-v">NaN</span> <span class="pl-s1">e</span> <span class="pl-v">NaN</span> <span class="pl-s1">f</span> <span class="pl-v">NaN</span> <span class="pl-s1">e</span> <span class="pl-s1">a</span> <span class="pl-v">NaN</span> <span class="pl-s1">b</span> <span class="pl-v">NaN</span> <span class="pl-s1">c</span> <span class="pl-v">NaN</span> <span class="pl-s1">d</span> <span class="pl-v">NaN</span> <span class="pl-s1">e</span> <span class="pl-v">NaN</span> <span class="pl-s1">f</span> <span class="pl-v">NaN</span> <span class="pl-s1">f</span> <span class="pl-s1">a</span> <span class="pl-v">NaN</span> <span class="pl-s1">b</span> <span class="pl-v">NaN</span> <span class="pl-s1">c</span> <span class="pl-v">NaN</span> <span class="pl-s1">d</span> <span class="pl-v">NaN</span> <span class="pl-s1">e</span> <span class="pl-v">NaN</span> <span class="pl-s1">f</span> <span class="pl-v">NaN</span></pre></div> <p dir="auto"><strong>Note</strong>: The aggregation shows the same inccorect behaviour also when we <em>don't</em> prescribe the categories:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In[13]: df.label1 = labels.astype('category') ...: df.label2 = labels.astype('category') In[14]: df.groupby(['label1', 'label2']).sum() Out[14]: x label1 label2 a a 2.0 b NaN c NaN b a NaN b 3.0 c NaN c a NaN b NaN c 2.0 "><pre class="notranslate"><span class="pl-v">In</span>[<span class="pl-c1">13</span>]: <span class="pl-s1">df</span>.<span class="pl-s1">label1</span> <span class="pl-c1">=</span> <span class="pl-s1">labels</span>.<span class="pl-en">astype</span>(<span class="pl-s">'category'</span>) ...: <span class="pl-s1">df</span>.<span class="pl-s1">label2</span> <span class="pl-c1">=</span> <span class="pl-s1">labels</span>.<span class="pl-en">astype</span>(<span class="pl-s">'category'</span>) <span class="pl-v">In</span>[<span class="pl-c1">14</span>]: <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s">'label1'</span>, <span class="pl-s">'label2'</span>]).<span class="pl-en">sum</span>() <span class="pl-v">Out</span>[<span class="pl-c1">14</span>]: <span class="pl-s1">x</span> <span class="pl-s1">label1</span> <span class="pl-s1">label2</span> <span class="pl-s1">a</span> <span class="pl-s1">a</span> <span class="pl-c1">2.0</span> <span class="pl-s1">b</span> <span class="pl-v">NaN</span> <span class="pl-s1">c</span> <span class="pl-v">NaN</span> <span class="pl-s1">b</span> <span class="pl-s1">a</span> <span class="pl-v">NaN</span> <span class="pl-s1">b</span> <span class="pl-c1">3.0</span> <span class="pl-s1">c</span> <span class="pl-v">NaN</span> <span class="pl-s1">c</span> <span class="pl-s1">a</span> <span class="pl-v">NaN</span> <span class="pl-s1">b</span> <span class="pl-v">NaN</span> <span class="pl-s1">c</span> <span class="pl-c1">2.0</span></pre></div> <h4 dir="auto">Expected Output</h4> <p dir="auto">For <strong>Case 1</strong>:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In[6]: df.groupby('label1').sum() Out[6]: x label1 a 2 b 3 c 2"><pre class="notranslate"><span class="pl-v">In</span>[<span class="pl-c1">6</span>]: <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>(<span class="pl-s">'label1'</span>).<span class="pl-en">sum</span>() <span class="pl-v">Out</span>[<span class="pl-c1">6</span>]: <span class="pl-s1">x</span> <span class="pl-s1">label1</span> <span class="pl-s1">a</span> <span class="pl-c1">2</span> <span class="pl-s1">b</span> <span class="pl-c1">3</span> <span class="pl-s1">c</span> <span class="pl-c1">2</span></pre></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In[7]: df.groupby('label1').groups Out[7]: {'a': Int64Index([0, 4, 7], dtype='int64'), 'b': Int64Index([1, 3, 5, 8], dtype='int64'), 'c': Int64Index([2, 6], dtype='int64')}"><pre class="notranslate"><span class="pl-v">In</span>[<span class="pl-c1">7</span>]: <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>(<span class="pl-s">'label1'</span>).<span class="pl-s1">groups</span> <span class="pl-v">Out</span>[<span class="pl-c1">7</span>]: {<span class="pl-s">'a'</span>: <span class="pl-v">Int64Index</span>([<span class="pl-c1">0</span>, <span class="pl-c1">4</span>, <span class="pl-c1">7</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>), <span class="pl-s">'b'</span>: <span class="pl-v">Int64Index</span>([<span class="pl-c1">1</span>, <span class="pl-c1">3</span>, <span class="pl-c1">5</span>, <span class="pl-c1">8</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>), <span class="pl-s">'c'</span>: <span class="pl-v">Int64Index</span>([<span class="pl-c1">2</span>, <span class="pl-c1">6</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'int64'</span>)}</pre></div> <p dir="auto">For <strong>Case 2</strong>:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In[19]: df.groupby(['label1', 'label2']).sum() Out[19]: x label1 label2 a a 2 b b 3 c c 2"><pre class="notranslate"><span class="pl-v">In</span>[<span class="pl-c1">19</span>]: <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s">'label1'</span>, <span class="pl-s">'label2'</span>]).<span class="pl-en">sum</span>() <span class="pl-v">Out</span>[<span class="pl-c1">19</span>]: <span class="pl-s1">x</span> <span class="pl-s1">label1</span> <span class="pl-s1">label2</span> <span class="pl-s1">a</span> <span class="pl-s1">a</span> <span class="pl-c1">2</span> <span class="pl-s1">b</span> <span class="pl-s1">b</span> <span class="pl-c1">3</span> <span class="pl-s1">c</span> <span class="pl-s1">c</span> <span class="pl-c1">2</span></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.6.1.final.0<br> python-bits: 64<br> OS: Windows<br> OS-release: 10<br> machine: AMD64<br> processor: Intel64 Family 6 Model 69 Stepping 1, GenuineIntel<br> byteorder: little<br> LC_ALL: None<br> LANG: None<br> LOCALE: None.None</p> <p dir="auto">pandas: 0.20.3<br> pytest: 3.0.7<br> pip: 9.0.1<br> setuptools: 27.2.0<br> Cython: 0.25.2<br> numpy: 1.12.1<br> scipy: 0.19.0<br> xarray: None<br> IPython: 5.3.0<br> sphinx: 1.5.6<br> patsy: 0.4.1<br> dateutil: 2.6.0<br> pytz: 2017.2<br> blosc: None<br> bottleneck: 1.2.1<br> tables: 3.2.2<br> numexpr: 2.6.2<br> feather: None<br> matplotlib: 2.0.2<br> openpyxl: 2.4.7<br> xlrd: 1.0.0<br> xlwt: 1.2.0<br> xlsxwriter: 0.9.6<br> lxml: 3.7.3<br> bs4: 4.6.0<br> html5lib: 0.999<br> sqlalchemy: 1.1.9<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.9.6<br> s3fs: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd df = pd.DataFrame({'a': ['x','x','y'], 'b': [0,1,0], 'c': [7,8,9]}) print(df.groupby(['a','b']).mean().reset_index()) df['a'] = df['a'].astype('category') print(df.groupby(['a','b']).mean().reset_index())"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'a'</span>: [<span class="pl-s">'x'</span>,<span class="pl-s">'x'</span>,<span class="pl-s">'y'</span>], <span class="pl-s">'b'</span>: [<span class="pl-c1">0</span>,<span class="pl-c1">1</span>,<span class="pl-c1">0</span>], <span class="pl-s">'c'</span>: [<span class="pl-c1">7</span>,<span class="pl-c1">8</span>,<span class="pl-c1">9</span>]}) <span class="pl-en">print</span>(<span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s">'a'</span>,<span class="pl-s">'b'</span>]).<span class="pl-en">mean</span>().<span class="pl-en">reset_index</span>()) <span class="pl-s1">df</span>[<span class="pl-s">'a'</span>] <span class="pl-c1">=</span> <span class="pl-s1">df</span>[<span class="pl-s">'a'</span>].<span class="pl-en">astype</span>(<span class="pl-s">'category'</span>) <span class="pl-en">print</span>(<span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s">'a'</span>,<span class="pl-s">'b'</span>]).<span class="pl-en">mean</span>().<span class="pl-en">reset_index</span>())</pre></div> <p dir="auto">Returns two different results:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" a b c 0 x 0 7 1 x 1 8 2 y 0 9 a b c 0 x 0 7.0 1 x 1 8.0 2 y 0 9.0 3 y 1 NaN"><pre class="notranslate"><code class="notranslate"> a b c 0 x 0 7 1 x 1 8 2 y 0 9 a b c 0 x 0 7.0 1 x 1 8.0 2 y 0 9.0 3 y 1 NaN </code></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">Performing a groupby with a categorical type returns all combination of the groupby columns. This is a problem in my actual application as it results in a massive dataframe that is mostly filled with nans. I would also prefer not to move off of category dtype since it provides necessary memory savings.</p> <h4 dir="auto">Expected Output</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" a b c 0 x 0 7 1 x 1 8 2 y 0 9 a b c 0 x 0 7 1 x 1 8 2 y 0 9"><pre class="notranslate"><code class="notranslate"> a b c 0 x 0 7 1 x 1 8 2 y 0 9 a b c 0 x 0 7 1 x 1 8 2 y 0 9 </code></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.6.1.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.10.0-26-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8<br> LOCALE: en_US.UTF-8</p> <p dir="auto">pandas: 0.20.3<br> pytest: None<br> pip: 9.0.1<br> setuptools: 33.1.1<br> Cython: None<br> numpy: 1.13.1<br> scipy: 0.19.0<br> xarray: None<br> IPython: 6.1.0<br> sphinx: None<br> patsy: None<br> dateutil: 2.6.1<br> pytz: 2017.2<br> blosc: None<br> bottleneck: None<br> tables: 3.4.2<br> numexpr: 2.6.2<br> feather: None<br> matplotlib: 2.0.2<br> openpyxl: None<br> xlrd: 1.0.0<br> xlwt: None<br> xlsxwriter: 0.9.6<br> lxml: None<br> bs4: 4.5.3<br> html5lib: 0.999999999<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: 2.7.1 (dt dec pq3 ext lo64)<br> jinja2: 2.9.6<br> s3fs: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
1
<pre class="notranslate">What steps will reproduce the problem? If possible, include a link to a program on play.golang.org. 1. Run the code at <a href="http://play.golang.org/p/Z2aaevAIbN" rel="nofollow">http://play.golang.org/p/Z2aaevAIbN</a> What is the expected output? map[0:2] What do you see instead? map[1:2 0:1] Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? Linux Which version are you using? (run 'go version') go1.0.3/tip devel +c0a5b4ad0895 Please provide any additional information below. Raised here: <a href="https://groups.google.com/d/msg/golang-nuts/qOIyn4PXli0/VxhopTqhYtcJ" rel="nofollow">https://groups.google.com/d/msg/golang-nuts/qOIyn4PXli0/VxhopTqhYtcJ</a> The almost equivalent slice code gives the expected output (<a href="http://play.golang.org/p/4vRaPGs63w)" rel="nofollow">http://play.golang.org/p/4vRaPGs63w)</a>, as the equivalent map literal assignment (<a href="http://play.golang.org/p/jqzQ7MsRS4)" rel="nofollow">http://play.golang.org/p/jqzQ7MsRS4)</a>.</pre>
<pre class="notranslate">The Go compiler version does not match the Mercurial repository version. $ hg id dd31a3b56536 tip $ 6g -V 6g version weekly.2011-06-23 8948</pre>
0
<p dir="auto">Currently <code class="notranslate">pd.read_sql_query()</code> accepts an <code class="notranslate">sqlalchemy.engine.base.Engine</code> instance as the <code class="notranslate">con</code> parameter. Using that, it presumably creates a new <code class="notranslate">sqlalchemy.engine.base.Connection</code> to connect to the DB server and issue the query.<br> However, as most (all?) DB servers associate a session with a connection, this precludes issuing queries for an existing session/connection.</p> <p dir="auto">For example, it is common to break up large queries into a series of steps that create TEMPorary intermediate result tables, possibly joining some into further intermediate tables, and then querying for the final result. The lifetime and scope of a TEMP table is that of the session/connection.</p> <p dir="auto">Hence, something like:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="con = engine.connect() con.execute('CREATE TEMP TABLE tmptable ...') result = pd.read_sql_query('SELECT * FROM tmptable ..', engine)"><pre class="notranslate"><span class="pl-s1">con</span> <span class="pl-c1">=</span> <span class="pl-s1">engine</span>.<span class="pl-en">connect</span>() <span class="pl-s1">con</span>.<span class="pl-en">execute</span>(<span class="pl-s">'CREATE TEMP TABLE tmptable ...'</span>) <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_sql_query</span>(<span class="pl-s">'SELECT * FROM tmptable ..'</span>, <span class="pl-s1">engine</span>)</pre></div> <p dir="auto">will fail as the tmptable isn't available to the connection/session created by read_sql_query().</p> <p dir="auto">Concatenating the SQL statements into one query string with ';' statement seperator, or using the SQLAlchemy <code class="notranslate">text</code> class to attempt to create the table and query it in one SQL <em>query</em> also fails as leads to SQLAlchemy claiming the query doesn't return results (perhaps because it doesn't being with "SELECT"?)</p> <p dir="auto">This, and other similar use-cases involving multiple queries within a single session/connection context, could be easily supported by allowing a <code class="notranslate">sqlalchemy.engine.base.Connection</code> to be passed to the <code class="notranslate">read_sql_query()</code> and similar functions, whereby they would use the supplied connection rather than creating a new one. An added benefit would be the reduction in overhead of repeatedly creating and tearing down connections to the DB server and also allowing users to implement connection pooling when necessary.</p> <p dir="auto">(Issue created at suggestion of <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/joris/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/joris">@joris</a> in this <a href="http://stackoverflow.com/questions/26286615/how-can-pandas-read-sql-query-query-a-temp-table" rel="nofollow">StackOverflow question</a> )</p>
<p dir="auto">related <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="36794262" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/7615" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/7615/hovercard" href="https://github.com/pandas-dev/pandas/issues/7615">#7615</a></p> <p dir="auto">Bit of a UI problem here (although it's behaving as the docstring says it does, so it doesn't quite qualify as a bug):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; df = pd.DataFrame({&quot;A&quot;: [1,2,3], &quot;B&quot;: [4,5,6]}) &gt;&gt;&gt; df.to_csv(&quot;tmp.csv&quot;, sep=&quot;;&quot;) &gt;&gt;&gt; !cat tmp.csv ;A;B 0;1;4 1;2;5 2;3;6 &gt;&gt;&gt; df.to_csv(&quot;tmp.csv&quot;, delimiter=&quot;;&quot;) &gt;&gt;&gt; !cat tmp.csv ,A,B 0,1,4 1,2,5 2,3,6"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; df = pd.DataFrame({"A": [1,2,3], "B": [4,5,6]}) &gt;&gt;&gt; df.to_csv("tmp.csv", sep=";") &gt;&gt;&gt; !cat tmp.csv ;A;B 0;1;4 1;2;5 2;3;6 &gt;&gt;&gt; df.to_csv("tmp.csv", delimiter=";") &gt;&gt;&gt; !cat tmp.csv ,A,B 0,1,4 1,2,5 2,3,6 </code></pre></div> <p dir="auto"><code class="notranslate">read_csv</code> accepts both <code class="notranslate">sep</code> and <code class="notranslate">delimiter</code> but <code class="notranslate">to_csv</code> silently ignores <code class="notranslate">delimiter</code>. Someone was recently tripped up by this on SO. I'm fine with either teaching <code class="notranslate">to_csv</code> to behave the same way <code class="notranslate">read_csv</code> does or, alternatively, raising if <code class="notranslate">delimiter</code> is found as a keyword.</p> <p dir="auto">That is, I'm less bothered by the inconsistency than the silent unexpected behaviour.</p>
0
<p dir="auto">Numerous Warnings and Errors occur when including LibTorch in .cu files. I think maybe some compiling settings are wrong...</p> <p dir="auto">One of error is as following.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/home/libtorch/include/torch/csrc/api/include/torch/nn/cloneable.h:68:61: error: invalid static_cast from type ‘const torch::OrderedDict&lt;std::__cxx11::basic_string&lt;char&gt;, std::shared_ptr&lt;torch::nn::Module&gt; &gt;’ to type ‘torch::OrderedDict&lt;std::__cxx11::basic_string&lt;char&gt;, std::shared_ptr&lt;torch::nn::Module&gt; &gt;&amp;’"><pre class="notranslate"><code class="notranslate">/home/libtorch/include/torch/csrc/api/include/torch/nn/cloneable.h:68:61: error: invalid static_cast from type ‘const torch::OrderedDict&lt;std::__cxx11::basic_string&lt;char&gt;, std::shared_ptr&lt;torch::nn::Module&gt; &gt;’ to type ‘torch::OrderedDict&lt;std::__cxx11::basic_string&lt;char&gt;, std::shared_ptr&lt;torch::nn::Module&gt; &gt;&amp;’ </code></pre></div> <p dir="auto">Most of errors are similar as this one.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Easily to reproduce, just set all things as following and compile the cmake project</p> <p dir="auto">files</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="src |-- test.cu |-- CMakeLists.txt"><pre class="notranslate"><code class="notranslate">src |-- test.cu |-- CMakeLists.txt </code></pre></div> <p dir="auto">test.cu</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#include &lt;torch/torch.h&gt; #include &lt;cuda.h&gt; #include &lt;cuda_runtime.h&gt; #include &lt;vector&gt;"><pre class="notranslate"><code class="notranslate">#include &lt;torch/torch.h&gt; #include &lt;cuda.h&gt; #include &lt;cuda_runtime.h&gt; #include &lt;vector&gt; </code></pre></div> <p dir="auto">CMakeLists.txt</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cmake_minimum_required(VERSION 3.8 FATAL_ERROR) set(CMAKE_CUDA_COMPILER &quot;nvcc&quot;) set(CMAKE_CUDA_COMPILER_VERSION &quot;10.1&quot;) project(cmake_and_cuda LANGUAGES CXX CUDA) set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}&quot;) find_package(Torch REQUIRED) file(GLOB_RECURSE SRC_FILES_TEMP ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.cu) add_library(main_lib STATIC ${SRC_FILES_TEMP}) target_include_directories(main_lib PUBLIC ${TORCH_INCLUDE_DIRS}) target_compile_features(main_lib PUBLIC cxx_std_14) set_target_properties( main_lib PROPERTIES CUDA_SEPARABLE_COMPILATION ON ) add_executable(main test.cu) set_target_properties(main PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_link_libraries(main PUBLIC main_lib) target_link_libraries(main PUBLIC ${TORCH_LIBRARIES})"><pre class="notranslate"><code class="notranslate">cmake_minimum_required(VERSION 3.8 FATAL_ERROR) set(CMAKE_CUDA_COMPILER "nvcc") set(CMAKE_CUDA_COMPILER_VERSION "10.1") project(cmake_and_cuda LANGUAGES CXX CUDA) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}") find_package(Torch REQUIRED) file(GLOB_RECURSE SRC_FILES_TEMP ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.cu) add_library(main_lib STATIC ${SRC_FILES_TEMP}) target_include_directories(main_lib PUBLIC ${TORCH_INCLUDE_DIRS}) target_compile_features(main_lib PUBLIC cxx_std_14) set_target_properties( main_lib PROPERTIES CUDA_SEPARABLE_COMPILATION ON ) add_executable(main test.cu) set_target_properties(main PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_link_libraries(main PUBLIC main_lib) target_link_libraries(main PUBLIC ${TORCH_LIBRARIES}) </code></pre></div> <p dir="auto">make command</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cmake ../src/ -DCMAKE_PREFIX_PATH=/path/to/libtorch &amp;&amp; make"><pre class="notranslate"><code class="notranslate">cmake ../src/ -DCMAKE_PREFIX_PATH=/path/to/libtorch &amp;&amp; make </code></pre></div> <h2 dir="auto">Expected behavior</h2> <p dir="auto">&lt;torch/torch.h&gt; can be included in .cu files and we can implement some self-defined CUDA+Torch layers to construct NNs in C++ front-end without pybind11 and python.</p> <h2 dir="auto">Environment</h2> <ul dir="auto"> <li>PyTorch Version: LibTorch 1.4.0</li> <li>OS: Ubuntu 16.04.6 LTS</li> <li>How you installed PyTorch: Source</li> <li>Python version: 3.7</li> <li>CUDA/cuDNN version: 10.1</li> <li>GPU models and configuration: 2x Titan V</li> <li>GCC version: 5.5.0</li> <li>CMake version: version 3.14.7</li> </ul> <h2 dir="auto">Additional context</h2> <p dir="auto">I am highly appreciated for you guys developing the torch C++ Library. For me, I want to define some CUDA forward/backward layers with Torch C++ Library, such layers will be used in my c++/cuda based torch model. It is to say, I will construct/train/predict my neural networks in .cpp and .cu files totally, instead of using pybind11 and python. So I need to include &lt;torch/torch.h&gt; in .cu files.<br> (By now, I can only include libtorch in .cpp files, but it is not enough for me...)</p>
<p dir="auto">Hello, i'm try to build simple project in CMake with libtorch, but <strong>by default</strong> i get some errors.</p> <p dir="auto">Firstly, my <strong>CMakeLists.txt</strong> (of course, i change path to libtorch):</p> <div class="highlight highlight-source-cmake notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="cmake_minimum_required(VERSION 3.12 FATAL_ERROR) project(torch-start LANGUAGES CXX CUDA) set(CMAKE_PREFIX_PATH &quot;absolute\path\to\libtorch&quot;) find_package(Torch REQUIRED) set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}&quot;) add_executable(torch-start torch-start.cpp kernel.cu) target_link_libraries(torch-start &quot;${TORCH_LIBRARIES}&quot;) set_property(TARGET torch-start PROPERTY CXX_STANDARD 14) set_target_properties(torch-start PROPERTIES CUDA_SEPARABLE_COMPILATION ON) # The following code block is suggested to be used on Windows. # According to https://github.com/pytorch/pytorch/issues/25457, # the DLLs need to be copied to avoid memory errors. if (MSVC) file(GLOB TORCH_DLLS &quot;${TORCH_INSTALL_PREFIX}/lib/*.dll&quot;) add_custom_command(TARGET torch-start POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${TORCH_DLLS} $&lt;TARGET_FILE_DIR:torch-start&gt;) endif (MSVC)"><pre class="notranslate"><span class="pl-c1">cmake_minimum_required</span>(<span class="pl-k">VERSION</span> 3.12 <span class="pl-k">FATAL_ERROR</span>) <span class="pl-c1">project</span>(torch-start <span class="pl-k">LANGUAGES</span> CXX CUDA) <span class="pl-c1">set</span>(CMAKE_PREFIX_PATH <span class="pl-s">"absolute<span class="pl-cce">\p</span>ath<span class="pl-cce">\t</span>o<span class="pl-cce">\l</span>ibtorch"</span>) <span class="pl-c1">find_package</span>(Torch <span class="pl-k">REQUIRED</span>) <span class="pl-c1">set</span>(CMAKE_CXX_FLAGS <span class="pl-s">"<span class="pl-smi">${CMAKE_CXX_FLAGS}</span> <span class="pl-smi">${TORCH_CXX_FLAGS}</span>"</span>) <span class="pl-c1">add_executable</span>(torch-start torch-start.cpp kernel.cu) <span class="pl-c1">target_link_libraries</span>(torch-start <span class="pl-s">"<span class="pl-smi">${TORCH_LIBRARIES}</span>"</span>) <span class="pl-c1">set_property</span>(<span class="pl-k">TARGET</span> torch-start <span class="pl-k">PROPERTY</span> CXX_STANDARD 14) <span class="pl-c1">set_target_properties</span>(torch-start <span class="pl-k">PROPERTIES</span> CUDA_SEPARABLE_COMPILATION <span class="pl-k">ON</span>) <span class="pl-c"><span class="pl-c">#</span> The following code block is suggested to be used on Windows.</span> <span class="pl-c"><span class="pl-c">#</span> According to https://github.com/pytorch/pytorch/issues/25457,</span> <span class="pl-c"><span class="pl-c">#</span> the DLLs need to be copied to avoid memory errors.</span> <span class="pl-k">if</span> (MSVC) <span class="pl-c1">file</span>(<span class="pl-k">GLOB</span> TORCH_DLLS <span class="pl-s">"<span class="pl-smi">${TORCH_INSTALL_PREFIX}</span>/lib/*.dll"</span>) <span class="pl-c1">add_custom_command</span>(<span class="pl-k">TARGET</span> torch-start <span class="pl-k">POST_BUILD</span> <span class="pl-k">COMMAND</span> <span class="pl-smi">${CMAKE_COMMAND}</span> -E copy_if_different <span class="pl-smi">${TORCH_DLLS}</span> $&lt;TARGET_FILE_DIR:torch-start&gt;) <span class="pl-k">endif</span> (MSVC)</pre></div> <hr> <p dir="auto">So, as you can see, i include two source files in project...</p> <p dir="auto"><strong>torch-start.cpp</strong>:</p> <div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#include &lt;torch/torch.h&gt; #include &lt;iostream&gt; void test(torch::Tensor tensor); int main() { torch::Tensor tensor = torch::rand({2, 3}, torch::device(torch::kCUDA)); std::cout &lt;&lt; &quot;Input: \n&quot; &lt;&lt; tensor &lt;&lt; std::endl; test(tensor); std::cout &lt;&lt; &quot;Output: \n&quot; &lt;&lt; tensor &lt;&lt; std::endl; }"><pre class="notranslate">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>torch/torch.h<span class="pl-pds">&gt;</span></span> #<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>iostream<span class="pl-pds">&gt;</span></span> <span class="pl-k">void</span> <span class="pl-en">test</span>(torch::Tensor tensor); <span class="pl-k">int</span> <span class="pl-en">main</span>() { torch::Tensor tensor = <span class="pl-c1">torch::rand</span>({<span class="pl-c1">2</span>, <span class="pl-c1">3</span>}, <span class="pl-c1">torch::device</span>(torch::<span class="pl-c1">kCUDA</span>)); std::cout &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>Input: <span class="pl-cce">\n</span><span class="pl-pds">"</span></span> &lt;&lt; tensor &lt;&lt; std::endl; <span class="pl-c1">test</span>(tensor); std::cout &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>Output: <span class="pl-cce">\n</span><span class="pl-pds">"</span></span> &lt;&lt; tensor &lt;&lt; std::endl; }</pre></div> <p dir="auto"><strong>kernel.cu</strong>:</p> <div class="highlight highlight-source-cuda-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#include &lt;torch/torch.h&gt; __global__ void kernel(float *tensor) { int idx = threadIdx.x; tensor[idx] += idx; } void test(torch::Tensor tensor) { const dim3 threads = tensor.size(0) * tensor.size(1); kernel&lt;&lt;&lt;1, threads&gt;&gt;&gt;(tensor.data&lt;float&gt;()); }"><pre class="notranslate">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>torch/torch.h<span class="pl-pds">&gt;</span></span> <span class="pl-k">__global__</span> <span class="pl-k">void</span> <span class="pl-en">kernel</span>(<span class="pl-k">float</span> *tensor) { <span class="pl-k">int</span> idx = <span class="pl-c1">threadIdx</span>.<span class="pl-smi">x</span>; tensor[idx] += idx; } <span class="pl-k">void</span> <span class="pl-en">test</span>(torch::Tensor tensor) { <span class="pl-k">const</span> <span class="pl-c1">dim3</span> threads = tensor.<span class="pl-c1">size</span>(<span class="pl-c1">0</span>) * tensor.<span class="pl-c1">size</span>(<span class="pl-c1">1</span>); kernel<span class="pl-k">&lt;&lt;&lt;<span class="pl-c1">1</span>, threads&gt;&gt;&gt;</span>(tensor.<span class="pl-smi">data</span>&lt;<span class="pl-k">float</span>&gt;()); }</pre></div> <hr> <p dir="auto">CMake successfully configure and generate project files. After that, i try to build project...<br> <code class="notranslate">&gt; cmake --build . --config Release</code><br> ... and get an error:</p> <blockquote> <p dir="auto">nvcc fatal : Unknown option 'openmp'</p> </blockquote> <p dir="auto"><strong>Question 1: Why -openmp is unknown option for me and is it really need?</strong></p> <p dir="auto">I found this option in <code class="notranslate">.\libtorch\share\cmake\Caffe2\Caffe2Targets.cmake</code>, try remove it, build project again and get new error:</p> <blockquote> <p dir="auto">nvcc fatal : A single input file is required for a non-link phase when an output file is specified</p> </blockquote> <p dir="auto">Well, i know that NVCC is very sensible to command line syntax. It interpret any non <em>well-forming</em> commands as file name. Anyway, i found problem in property from which i removed <em>-openmp</em> option.<br> Piece of <code class="notranslate">.\libtorch\share\cmake\Caffe2\Caffe2Targets.cmake</code>:</p> <div class="highlight highlight-source-cmake notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="set_target_properties(torch PROPERTIES INTERFACE_COMPILE_DEFINITIONS &quot;AT_PARALLEL_OPENMP=1&quot; #INTERFACE_COMPILE_OPTIONS &quot;/Z7;/EHa;/DNOMINMAX;/wd4267;/wd4251;/wd4522;/wd4522;/wd4838;/wd4305;/wd4244;/wd4190;/wd4101;/wd4996;/wd4275;/bigobj&quot; INTERFACE_INCLUDE_DIRECTORIES &quot;C:/Program Files/NVIDIA Corporation/NvToolsExt/include;${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include&quot; INTERFACE_LINK_LIBRARIES &quot;protobuf::libprotobuf;c10;Threads::Threads;caffe2::mkl;torch::cudart;c10_cuda;C:/Program Files/NVIDIA Corporation/NvToolsExt/lib/x64/nvToolsExt64_1.lib;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/cudart_static.lib;caffe2::cufft;caffe2::curand;caffe2::cublas;caffe2::cudnn&quot; )"><pre class="notranslate"><span class="pl-c1">set_target_properties</span>(torch <span class="pl-k">PROPERTIES</span> INTERFACE_COMPILE_DEFINITIONS <span class="pl-s">"AT_PARALLEL_OPENMP=1"</span> <span class="pl-c"><span class="pl-c">#</span>INTERFACE_COMPILE_OPTIONS "/Z7;/EHa;/DNOMINMAX;/wd4267;/wd4251;/wd4522;/wd4522;/wd4838;/wd4305;/wd4244;/wd4190;/wd4101;/wd4996;/wd4275;/bigobj"</span> INTERFACE_INCLUDE_DIRECTORIES <span class="pl-s">"C:/Program Files/NVIDIA Corporation/NvToolsExt/include;<span class="pl-smi">${_IMPORT_PREFIX}</span>/include;<span class="pl-smi">${_IMPORT_PREFIX}</span>/include"</span> INTERFACE_LINK_LIBRARIES <span class="pl-s">"protobuf::libprotobuf;c10;Threads::Threads;caffe2::mkl;torch::cudart;c10_cuda;C:/Program Files/NVIDIA Corporation/NvToolsExt/lib/x64/nvToolsExt64_1.lib;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/cudart_static.lib;caffe2::cufft;caffe2::curand;caffe2::cublas;caffe2::cudnn"</span> )</pre></div> <p dir="auto">If i comment out <code class="notranslate">INTERFACE_COMPILE_OPTIONS</code> property (already did that in code above), CMake successfully build project, so...</p> <p dir="auto"><strong>Question 2: Where is the problem in syntax of this property?</strong></p> <hr> <h3 dir="auto">Environment:</h3> <ul dir="auto"> <li>Windows 10</li> <li>VS2019 with compiler 19.24.28316 for x64 architecture</li> <li>PyTorch 1.4.0</li> <li>CUDA 10.1.168</li> <li>cuDNN 7.6.1.34</li> <li>CMake 3.15.19101501-MSVC_2</li> <li>NVIDIA GeForce GTX 1060 6GB</li> </ul> <hr> <p dir="auto"><em>Offtop question 3: is there some links where i can find info about reduce size of output files?</em></p>
1
<h3 dir="auto">Version</h3> <p dir="auto">2.5.21</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://github.com/phil294/vue-hackernews-ssr-alternative-data-fetching">https://github.com/phil294/vue-hackernews-ssr-alternative-data-fetching</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">In SSR docs, option 2, <a href="https://ssr.vuejs.org/guide/data.html#client-data-fetching" rel="nofollow">Fetch data after the matched view is rendered</a>, calls <code class="notranslate">asyncData</code> in <code class="notranslate">beforeMount</code>.</p> <p dir="auto">The pseudo-syntax is</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if (asyncData) asyncData()"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">asyncData</span><span class="pl-kos">)</span> <span class="pl-en">asyncData</span><span class="pl-kos">(</span><span class="pl-kos">)</span></pre></div> <p dir="auto">This does not check if <code class="notranslate">asyncData</code> was already called by the server. Thus, guided by the official docs, this leads to duplicate fetches. In the case of dynamic module registration, even to duplicate modules.</p> <p dir="auto">In the linked repro, I cloned vue-hackernews and <a href="https://github.com/phil294/vue-hackernews-ssr-alternative-data-fetching/commit/bc6e1195789a3b0f61f92eeb99c4b8fb908638a8">changed the fetch method accordingly</a>. I also added a console.log to when <code class="notranslate">fetchIdsByType</code> is called which happens when <code class="notranslate">asyncData</code> is called.</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">Data is fetched on server, client does not fetch it again (as is the case with the usual <code class="notranslate">router.beforeResolve</code> solution (step 1).</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">Data is fetched twice, also on client, because there is no check on whether the data is already there, effectively making option 2 unusable.</p>
<p dir="auto">From knockout to angular to react, now i'm new to Vue. Really love this library, feels like "angular+react for humans".</p> <p dir="auto">:class now support array <strong>OR</strong> object, but sometimes it's still a little tedious<br> if :class support classnames(<a href="https://github.com/JedWatson/classnames">https://github.com/JedWatson/classnames</a>) like syntax will be better.</p> <p dir="auto">example:<br> from<br> <code class="notranslate">:class="[type, checked?'checked':'', readOnly?'read-only':'', disabled?'disabled':'', fitted?'fitted':''"</code><br> into<br> <code class="notranslate">:class="type, {checked, disabled, fitted}, readOnly&amp;&amp;'read-only'"</code></p> <p dir="auto">Sure, I can always use a computed method, but by doing this class names are defined in one more place(props+template -&gt; props+template+computed), which harms readability.</p>
0
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18363.900 PowerToys version: 0.19.1 PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.18363.900 PowerToys version: 0.19.1 PowerToy module for which you are reporting the bug (if applicable): FancyZones </code></pre></div> <p dir="auto">Whenever I try to use FancyZones, the overlay looks kinda weird. The numbers are duplicated and in different spots, which results in FancyZones looking like <a href="https://file.coffee/u/TrewTBwIw.jpeg" rel="nofollow">this</a>.</p> <p dir="auto">These are my FancyZones settings: <a href="https://file.coffee/u/B1jT80Lil.png" rel="nofollow"></a> &amp; <a href="https://file.coffee/u/xzWJkxIAb.png" rel="nofollow"></a>. I do not have any custom layouts and encountered the issue when using the default grid style. Other styles also seem to give the issue, but the grid style is then "on top" of the chosen style, as seen <a href="https://file.coffee/u/AdcY5zJTp.png" rel="nofollow">here</a>.</p> <p dir="auto">By the way, it seems to only be a visual issue, as it will always apply the correct zone, e.g. when using rows and grid style is on top, the window snaps to the row format, not to the grid format.</p>
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.19041.329] PowerToys version: v0.19.0 and v0.19.1 PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.19041.329] PowerToys version: v0.19.0 and v0.19.1 PowerToy module for which you are reporting the bug (if applicable): FancyZones </code></pre></div> <ul dir="auto"> <li>Screen Count: 4 (1 is not landscape)</li> </ul> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Activate Fancy Zones</li> <li>Make sure PowerToy is started when windows starts, is did this by adding PowerToy to the start menu Startup folder.</li> <li>Put your computer (Laptop) to sleep</li> <li>Awake your computer and logon</li> </ol> <ul dir="auto"> <li>you got duplicate zones.</li> </ul> <p dir="auto">Possibly important info</p> <ul dir="auto"> <li>I use a USB-C dock with 2 displays</li> <li>1 display use the laptops own HDMI port</li> <li>The displays are connected before the laptop comes on</li> <li>The displays are disconnected before the laptop goes to sleep</li> </ul> <h1 dir="auto">Expected behavior</h1> <p dir="auto">No, zone duplication</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Zone duplication</p> <h1 dir="auto">Screenshots</h1> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17082189/86889164-9a85b680-c0fb-11ea-8daa-e008f2a666a1.png"><img src="https://user-images.githubusercontent.com/17082189/86889164-9a85b680-c0fb-11ea-8daa-e008f2a666a1.png" alt="2020-07-08 (2)" style="max-width: 100%;"></a></p> <p dir="auto">I hope this is helpful.</p>
1
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-target-html-elements-with-selectors-using-jquery" rel="nofollow">Waypoint: Target HTML Elements with Selectors Using jQuery</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E)</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.</p> <p dir="auto">My code:</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;script&gt; $(document).ready(function() { }); &lt;/script&gt; &lt;!-- Only change code above this line. --&gt; &lt;div class=&quot;container-fluid&quot;&gt; &lt;h3 class=&quot;text-primary text-center&quot;&gt;jQuery Playground&lt;/h3&gt; &lt;div class=&quot;row&quot;&gt; &lt;div class=&quot;col-xs-6&quot;&gt; &lt;h4&gt;#left-well&lt;/h4&gt; &lt;div class=&quot;well&quot; id=&quot;left-well&quot;&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target1&quot;&gt;#target1&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target2&quot;&gt;#target2&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target3&quot;&gt;#target3&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;col-xs-6&quot;&gt; &lt;h4&gt;#right-well&lt;/h4&gt; &lt;div class=&quot;well&quot; id=&quot;right-well&quot;&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target4&quot;&gt;#target4&lt;/button&gt; &lt;button class=&quot;btn btn-default target&quot; id=&quot;target"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">ready</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-c">&lt;!-- Only change code above this line. --&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">container-fluid</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h3</span> <span class="pl-c1">class</span>="<span class="pl-s">text-primary text-center</span>"<span class="pl-kos">&gt;</span>jQuery Playground<span class="pl-kos">&lt;/</span><span class="pl-ent">h3</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">row</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span>#left-well<span class="pl-kos">&lt;/</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">left-well</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target1</span>"<span class="pl-kos">&gt;</span>#target1<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target2</span>"<span class="pl-kos">&gt;</span>#target2<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target3</span>"<span class="pl-kos">&gt;</span>#target3<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">col-xs-6</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span>#right-well<span class="pl-kos">&lt;/</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">well</span>" <span class="pl-c1">id</span>="<span class="pl-s">right-well</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target4</span>"<span class="pl-kos">&gt;</span>#target4<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">btn btn-default target</span>" <span class="pl-c1">id</span>="<span class="pl-s">target</span> <span class="pl-s"></span></pre></div>
<p dir="auto">Can't run code because of this error error: plugin failed to initialize it is showing in the lower left corner. Tried different browsers, computer, and devices same error. Have a really slow internet connection</p>
1
<h3 dir="auto">Describe the issue with documentation</h3> <p dir="auto"><strong>Apache Version</strong>: 2.2.3</p> <p dir="auto"><strong>OS</strong>:macOS Catalina Version 10.15.7</p> <p dir="auto"><strong>Apache Airflow Provider versions</strong>:</p> <p dir="auto"><strong>Deployment</strong>:</p> <p dir="auto"><strong>Web browser</strong>: Google Chrome Version 98.0.4758.80 (Official Build) (x86_64)<br> Also happened with Safari Version 13.1.3 (15609.4.1)</p> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">The <a href="https://airflow.apache.org/docs/apache-airflow/stable/tutorial.html#pipeline-example" rel="nofollow">Pipeline example of the tutorial</a> (in the website) looked like the following:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/75472729/153197308-4a5e9cb8-2a56-49c2-8f06-32c97f861ca3.png"><img src="https://user-images.githubusercontent.com/75472729/153197308-4a5e9cb8-2a56-49c2-8f06-32c97f861ca3.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">I was wondering why there was so little information about the connection to Postgres and why there were no <code class="notranslate">import</code> statements in the code.</p> <h3 dir="auto">How to solve the problem</h3> <p dir="auto">Then, I realized that in the GitHub repo the <a href="https://github.com/apache/airflow/blob/main/docs/apache-airflow/tutorial.rst">tutorial file</a> was way more extensive:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/75472729/153198129-542888c8-c142-4fd0-905d-19ac98822aac.png"><img src="https://user-images.githubusercontent.com/75472729/153198129-542888c8-c142-4fd0-905d-19ac98822aac.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">I marked in red the parts of the tutorial that can't be seen on the website. There are probably more missing details.</p> <p dir="auto">Thanks in advance!</p> <h3 dir="auto">Anything else</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Are you willing to submit PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.2.3 (latest released)</p> <h3 dir="auto">What happened</h3> <p dir="auto">With a docker setup <a href="https://github.com/apache/airflow/blob/958860fcd7c9ecdf60b7ebeef4397b348835c8db/docs/apache-airflow/start/docker-compose.yaml">as defined by this compose file</a>, the <code class="notranslate">airflow-worker</code> service <code class="notranslate">healthcheck.test</code> command causes a general increase in memory use overtime, even when idle. This was observed with Airflow 2.1.4 and 2.2.3.</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/apache/airflow/blob/958860fcd7c9ecdf60b7ebeef4397b348835c8db/docs/apache-airflow/start/docker-compose.yaml#L131-L137">airflow/docs/apache-airflow/start/docker-compose.yaml</a> </p> <p class="mb-0 color-fg-muted"> Lines 131 to 137 in <a data-pjax="true" class="commit-tease-sha" href="/apache/airflow/commit/958860fcd7c9ecdf60b7ebeef4397b348835c8db">958860f</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="L131" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="131"></td> <td id="LC131" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-ent">healthcheck</span>: </td> </tr> <tr class="border-0"> <td id="L132" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="132"></td> <td id="LC132" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-ent">test</span>: </td> </tr> <tr class="border-0"> <td id="L133" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="133"></td> <td id="LC133" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> - <span class="pl-s"><span class="pl-pds">"</span>CMD-SHELL<span class="pl-pds">"</span></span> </td> </tr> <tr class="border-0"> <td id="L134" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="134"></td> <td id="LC134" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> - <span class="pl-s"><span class="pl-pds">'</span>celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"<span class="pl-pds">'</span></span> </td> </tr> <tr class="border-0"> <td id="L135" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="135"></td> <td id="LC135" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span> </td> </tr> <tr class="border-0"> <td id="L136" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="136"></td> <td id="LC136" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-ent">timeout</span>: <span class="pl-c1">10s</span> </td> </tr> <tr class="border-0"> <td id="L137" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="137"></td> <td id="LC137" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-ent">retries</span>: <span class="pl-c1">5</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">We observed this in our AWS ECS cluster which has a 0.5 CPU/1 GB Mem Worker setup. We strangely had a task fail (at the 2nd dip in memory use of the picture below), which prompted further investigation. The task had actually succeeded, but for some reason notified dependent tasks as failed. Subsequent tasks were marked as upstream failure, but the webserver reported the task as success. We noticed the metrics page looked like the image below.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5741321/150593627-3bf63cfc-e8b2-492d-b8e6-5cc2933a3150.png"><img src="https://user-images.githubusercontent.com/5741321/150593627-3bf63cfc-e8b2-492d-b8e6-5cc2933a3150.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">We raised the CPU &amp; Memory to 2 CPU / 4 GB Mem and restarted the service, which still produced a gradual increase in memory.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5741321/150593887-d02b454a-d51a-42ad-8479-3f7cce8291f5.png"><img src="https://user-images.githubusercontent.com/5741321/150593887-d02b454a-d51a-42ad-8479-3f7cce8291f5.png" alt="image" style="max-width: 100%;"></a></p> <h3 dir="auto">What you expected to happen</h3> <p dir="auto">It should not increase in memory when the system is idle, but rather spike during healthcheck and release memory back to the host.</p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">We use a modified version of the compose file and instead favor docker stack, but the same setup should apply to the documented <a href="https://github.com/apache/airflow/blob/958860fcd7c9ecdf60b7ebeef4397b348835c8db/docs/apache-airflow/start/docker-compose.yaml">compose file</a>. A slimmed down compose file is below. It has 2 workers, one with a healthcheck and one without.</p> <p dir="auto">A secondary script was written to scrape the docker statistics in 10 second intervals and write them to a CSV file.</p> <p dir="auto">Executing both commands can be done like so:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ docker stack deploy -c docker-compose.yaml airflow $ nohup ./collect_stats.sh &gt; stats.csv &amp;"><pre class="notranslate">$ docker stack deploy -c docker-compose.yaml airflow $ nohup ./collect_stats.sh <span class="pl-k">&gt;</span> stats.csv <span class="pl-k">&amp;</span></pre></div> <p dir="auto">The necessary files are below. I'm also including a sample of the CSV file run locally.<br> <a href="https://github.com/apache/airflow/files/7916422/worker_stats.csv">worker_stats.csv</a></p> <p dir="auto">It shows that over a ~2 hour time period the general increase of <code class="notranslate">airflow_worker_healthcheck</code>. It consumes ~45 MB per hour if the healthcheck occurs at 10 second intervals.</p> <table role="table"> <thead> <tr> <th></th> <th></th> <th></th> <th></th> <th></th> </tr> </thead> <tbody> <tr> <td>Date</td> <td>Container</td> <td>CPU Percent</td> <td>Mem Usage</td> <td>Mem Percent</td> </tr> <tr> <td>2022-01-21T19:17:57UTC</td> <td>airflow_worker_no_healthcheck.1.z3lwru6mh22tzpe6dc8h8ekvi</td> <td>0.47%</td> <td>1.108GiB / 14.91GiB</td> <td>7.43%</td> </tr> <tr> <td>2022-01-21T19:17:57UTC</td> <td>airflow_worker_healthcheck.1.vw9d1q18dx75v7w3zcfb7fypt</td> <td>0.57%</td> <td>1.1GiB / 14.91GiB</td> <td>7.38%</td> </tr> <tr> <td>2022-01-21T20:34:01UTC</td> <td>airflow_worker_no_healthcheck.1.z3lwru6mh22tzpe6dc8h8ekvi</td> <td>0.28%</td> <td>1.108GiB / 14.91GiB</td> <td>7.43%</td> </tr> <tr> <td>2022-01-21T20:34:01UTC</td> <td>airflow_worker_healthcheck.1.vw9d1q18dx75v7w3zcfb7fypt</td> <td>0.76%</td> <td>1.157GiB / 14.91GiB</td> <td>7.76%</td> </tr> </tbody> </table> <p dir="auto"><em>collect_stats.sh</em></p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#!/usr/bin/env sh echo &quot;Date,Container,CPU Percent,Mem Usage,Mem Percent&quot; while true; do time=$(date --utc +%FT%T%Z) docker stats \ --format &quot;table {{.Name}},{{.CPUPerc}},{{.MemUsage}},{{.MemPerc}}&quot; \ --no-stream \ | grep worker \ | awk -vT=&quot;${time},&quot; '{ print T $0 }' sleep 10 done"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#!</span>/usr/bin/env sh</span> <span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span>Date,Container,CPU Percent,Mem Usage,Mem Percent<span class="pl-pds">"</span></span> <span class="pl-k">while</span> <span class="pl-c1">true</span><span class="pl-k">;</span> <span class="pl-k">do</span> time=<span class="pl-s"><span class="pl-pds">$(</span>date --utc +%FT%T%Z<span class="pl-pds">)</span></span> docker stats \ --format <span class="pl-s"><span class="pl-pds">"</span>table {{.Name}},{{.CPUPerc}},{{.MemUsage}},{{.MemPerc}}<span class="pl-pds">"</span></span> \ --no-stream \ <span class="pl-k">|</span> grep worker \ <span class="pl-k">|</span> awk -vT=<span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">${time}</span>,<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">'</span>{ print T $0 }<span class="pl-pds">'</span></span> sleep 10 <span class="pl-k">done</span></pre></div> <p dir="auto"><em>docker-compose.yaml</em></p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--- version: '3.7' networks: net: driver: overlay attachable: true volumes: postgres-data: redis-data: services: postgres: image: postgres:13.2-alpine volumes: - postgres-data:/var/lib/postgresql/data environment: POSTGRES_USER: airflow POSTGRES_PASSWORD: airflow POSTGRES_DB: airflow healthcheck: test: pg_isready -U airflow -d airflow interval: 10s timeout: 3s start_period: 15s ports: - '5432:5432' networks: - net redis: image: redis:6.2 volumes: - redis-data:/data healthcheck: test: redis-cli ping interval: 10s timeout: 3s start_period: 15s ports: - '6379:6379' networks: - net webserver: image: apache/airflow:2.2.3-python3.8 command: - bash - -c - 'airflow db init &amp;&amp; airflow db upgrade &amp;&amp; airflow users create --username admin --firstname Admin --lastname User --password admin --role Admin --email test@admin.org &amp;&amp; airflow webserver' environment: AIRFLOW__API__AUTH_BACKEND: airflow.api.auth.backend.basic_auth AIRFLOW__CELERY__BROKER_URL: redis://redis:6379/1 AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres:5432/airflow AIRFLOW__CORE__EXECUTOR: CeleryExecutor AIRFLOW__CORE__FERNET_KEY: yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s= AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://airflow:airflow@postgres:5432/airflow AIRFLOW__LOGGING__LOGGING_LEVEL: INFO AIRFLOW__WEBSERVER__SECRET_KEY: 0123456789 healthcheck: test: curl --fail http://localhost:8080/health interval: 10s timeout: 10s retries: 10 start_period: 90s ports: - '8080:8080' networks: - net scheduler: image: apache/airflow:2.2.3-python3.8 command: scheduler environment: AIRFLOW__API__AUTH_BACKEND: airflow.api.auth.backend.basic_auth AIRFLOW__CELERY__BROKER_URL: redis://redis:6379/1 AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres:5432/airflow AIRFLOW__CORE__EXECUTOR: CeleryExecutor AIRFLOW__CORE__FERNET_KEY: yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s= AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://airflow:airflow@postgres:5432/airflow AIRFLOW__LOGGING__LOGGING_LEVEL: INFO AIRFLOW__WEBSERVER__SECRET_KEY: 0123456789 healthcheck: test: airflow db check interval: 20s timeout: 10s retries: 5 start_period: 40s networks: - net worker_healthcheck: image: apache/airflow:2.2.3-python3.8 command: celery worker environment: AIRFLOW__API__AUTH_BACKEND: airflow.api.auth.backend.basic_auth AIRFLOW__CELERY__BROKER_URL: redis://redis:6379/1 AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres:5432/airflow AIRFLOW__CORE__EXECUTOR: CeleryExecutor AIRFLOW__CORE__FERNET_KEY: yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s= AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://airflow:airflow@postgres:5432/airflow AIRFLOW__LOGGING__LOGGING_LEVEL: DEBUG AIRFLOW__WEBSERVER__SECRET_KEY: 0123456789 healthcheck: test: - &quot;CMD-SHELL&quot; - 'celery --app airflow.executors.celery_executor.app inspect ping -d &quot;celery@$${HOSTNAME}&quot;' interval: 10s timeout: 10s retries: 5 start_period: 40s networks: - net worker_no_healthcheck: image: apache/airflow:2.2.3-python3.8 command: celery worker environment: AIRFLOW__API__AUTH_BACKEND: airflow.api.auth.backend.basic_auth AIRFLOW__CELERY__BROKER_URL: redis://redis:6379/1 AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres:5432/airflow AIRFLOW__CORE__EXECUTOR: CeleryExecutor AIRFLOW__CORE__FERNET_KEY: yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s= AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://airflow:airflow@postgres:5432/airflow AIRFLOW__LOGGING__LOGGING_LEVEL: DEBUG AIRFLOW__WEBSERVER__SECRET_KEY: 0123456789 networks: - net"><pre class="notranslate">--- <span class="pl-ent">version</span>: <span class="pl-s"><span class="pl-pds">'</span>3.7<span class="pl-pds">'</span></span> <span class="pl-ent">networks</span>: <span class="pl-ent">net</span>: <span class="pl-ent">driver</span>: <span class="pl-s">overlay</span> <span class="pl-ent">attachable</span>: <span class="pl-c1">true</span> <span class="pl-ent">volumes</span>: <span class="pl-ent">postgres-data</span>: <span class="pl-ent">redis-data</span>: <span class="pl-ent">services</span>: <span class="pl-ent">postgres</span>: <span class="pl-ent">image</span>: <span class="pl-s">postgres:13.2-alpine</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">postgres-data:/var/lib/postgresql/data</span> <span class="pl-ent">environment</span>: <span class="pl-ent">POSTGRES_USER</span>: <span class="pl-s">airflow</span> <span class="pl-ent">POSTGRES_PASSWORD</span>: <span class="pl-s">airflow</span> <span class="pl-ent">POSTGRES_DB</span>: <span class="pl-s">airflow</span> <span class="pl-ent">healthcheck</span>: <span class="pl-ent">test</span>: <span class="pl-s">pg_isready -U airflow -d airflow</span> <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span> <span class="pl-ent">timeout</span>: <span class="pl-c1">3s</span> <span class="pl-ent">start_period</span>: <span class="pl-c1">15s</span> <span class="pl-ent">ports</span>: - <span class="pl-s"><span class="pl-pds">'</span>5432:5432<span class="pl-pds">'</span></span> <span class="pl-ent">networks</span>: - <span class="pl-s">net</span> <span class="pl-ent">redis</span>: <span class="pl-ent">image</span>: <span class="pl-s">redis:6.2</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">redis-data:/data</span> <span class="pl-ent">healthcheck</span>: <span class="pl-ent">test</span>: <span class="pl-s">redis-cli ping</span> <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span> <span class="pl-ent">timeout</span>: <span class="pl-c1">3s</span> <span class="pl-ent">start_period</span>: <span class="pl-c1">15s</span> <span class="pl-ent">ports</span>: - <span class="pl-s"><span class="pl-pds">'</span>6379:6379<span class="pl-pds">'</span></span> <span class="pl-ent">networks</span>: - <span class="pl-s">net</span> <span class="pl-ent">webserver</span>: <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:2.2.3-python3.8</span> <span class="pl-ent">command</span>: - <span class="pl-s">bash</span> - <span class="pl-s">-c</span> - <span class="pl-s"><span class="pl-pds">'</span>airflow db init</span> <span class="pl-s"> &amp;&amp; airflow db upgrade</span> <span class="pl-s"> &amp;&amp; airflow users create --username admin --firstname Admin --lastname User --password admin --role Admin --email test@admin.org</span> <span class="pl-s"> &amp;&amp; airflow webserver<span class="pl-pds">'</span></span> <span class="pl-ent">environment</span>: <span class="pl-ent">AIRFLOW__API__AUTH_BACKEND</span>: <span class="pl-s">airflow.api.auth.backend.basic_auth</span> <span class="pl-ent">AIRFLOW__CELERY__BROKER_URL</span>: <span class="pl-s">redis://redis:6379/1</span> <span class="pl-ent">AIRFLOW__CELERY__RESULT_BACKEND</span>: <span class="pl-s">db+postgresql://airflow:airflow@postgres:5432/airflow</span> <span class="pl-ent">AIRFLOW__CORE__EXECUTOR</span>: <span class="pl-s">CeleryExecutor</span> <span class="pl-ent">AIRFLOW__CORE__FERNET_KEY</span>: <span class="pl-s">yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=</span> <span class="pl-ent">AIRFLOW__CORE__SQL_ALCHEMY_CONN</span>: <span class="pl-s">postgresql://airflow:airflow@postgres:5432/airflow</span> <span class="pl-ent">AIRFLOW__LOGGING__LOGGING_LEVEL</span>: <span class="pl-s">INFO</span> <span class="pl-ent">AIRFLOW__WEBSERVER__SECRET_KEY</span>: <span class="pl-c1">0123456789</span> <span class="pl-ent">healthcheck</span>: <span class="pl-ent">test</span>: <span class="pl-s">curl --fail http://localhost:8080/health</span> <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span> <span class="pl-ent">timeout</span>: <span class="pl-c1">10s</span> <span class="pl-ent">retries</span>: <span class="pl-c1">10</span> <span class="pl-ent">start_period</span>: <span class="pl-c1">90s</span> <span class="pl-ent">ports</span>: - <span class="pl-s"><span class="pl-pds">'</span>8080:8080<span class="pl-pds">'</span></span> <span class="pl-ent">networks</span>: - <span class="pl-s">net</span> <span class="pl-ent">scheduler</span>: <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:2.2.3-python3.8</span> <span class="pl-ent">command</span>: <span class="pl-s">scheduler</span> <span class="pl-ent">environment</span>: <span class="pl-ent">AIRFLOW__API__AUTH_BACKEND</span>: <span class="pl-s">airflow.api.auth.backend.basic_auth</span> <span class="pl-ent">AIRFLOW__CELERY__BROKER_URL</span>: <span class="pl-s">redis://redis:6379/1</span> <span class="pl-ent">AIRFLOW__CELERY__RESULT_BACKEND</span>: <span class="pl-s">db+postgresql://airflow:airflow@postgres:5432/airflow</span> <span class="pl-ent">AIRFLOW__CORE__EXECUTOR</span>: <span class="pl-s">CeleryExecutor</span> <span class="pl-ent">AIRFLOW__CORE__FERNET_KEY</span>: <span class="pl-s">yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=</span> <span class="pl-ent">AIRFLOW__CORE__SQL_ALCHEMY_CONN</span>: <span class="pl-s">postgresql://airflow:airflow@postgres:5432/airflow</span> <span class="pl-ent">AIRFLOW__LOGGING__LOGGING_LEVEL</span>: <span class="pl-s">INFO</span> <span class="pl-ent">AIRFLOW__WEBSERVER__SECRET_KEY</span>: <span class="pl-c1">0123456789</span> <span class="pl-ent">healthcheck</span>: <span class="pl-ent">test</span>: <span class="pl-s">airflow db check</span> <span class="pl-ent">interval</span>: <span class="pl-c1">20s</span> <span class="pl-ent">timeout</span>: <span class="pl-c1">10s</span> <span class="pl-ent">retries</span>: <span class="pl-c1">5</span> <span class="pl-ent">start_period</span>: <span class="pl-c1">40s</span> <span class="pl-ent">networks</span>: - <span class="pl-s">net</span> <span class="pl-ent">worker_healthcheck</span>: <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:2.2.3-python3.8</span> <span class="pl-ent">command</span>: <span class="pl-s">celery worker</span> <span class="pl-ent">environment</span>: <span class="pl-ent">AIRFLOW__API__AUTH_BACKEND</span>: <span class="pl-s">airflow.api.auth.backend.basic_auth</span> <span class="pl-ent">AIRFLOW__CELERY__BROKER_URL</span>: <span class="pl-s">redis://redis:6379/1</span> <span class="pl-ent">AIRFLOW__CELERY__RESULT_BACKEND</span>: <span class="pl-s">db+postgresql://airflow:airflow@postgres:5432/airflow</span> <span class="pl-ent">AIRFLOW__CORE__EXECUTOR</span>: <span class="pl-s">CeleryExecutor</span> <span class="pl-ent">AIRFLOW__CORE__FERNET_KEY</span>: <span class="pl-s">yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=</span> <span class="pl-ent">AIRFLOW__CORE__SQL_ALCHEMY_CONN</span>: <span class="pl-s">postgresql://airflow:airflow@postgres:5432/airflow</span> <span class="pl-ent">AIRFLOW__LOGGING__LOGGING_LEVEL</span>: <span class="pl-s">DEBUG</span> <span class="pl-ent">AIRFLOW__WEBSERVER__SECRET_KEY</span>: <span class="pl-c1">0123456789</span> <span class="pl-ent">healthcheck</span>: <span class="pl-ent">test</span>: - <span class="pl-s"><span class="pl-pds">"</span>CMD-SHELL<span class="pl-pds">"</span></span> - <span class="pl-s"><span class="pl-pds">'</span>celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"<span class="pl-pds">'</span></span> <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span> <span class="pl-ent">timeout</span>: <span class="pl-c1">10s</span> <span class="pl-ent">retries</span>: <span class="pl-c1">5</span> <span class="pl-ent">start_period</span>: <span class="pl-c1">40s</span> <span class="pl-ent">networks</span>: - <span class="pl-s">net</span> <span class="pl-ent">worker_no_healthcheck</span>: <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:2.2.3-python3.8</span> <span class="pl-ent">command</span>: <span class="pl-s">celery worker</span> <span class="pl-ent">environment</span>: <span class="pl-ent">AIRFLOW__API__AUTH_BACKEND</span>: <span class="pl-s">airflow.api.auth.backend.basic_auth</span> <span class="pl-ent">AIRFLOW__CELERY__BROKER_URL</span>: <span class="pl-s">redis://redis:6379/1</span> <span class="pl-ent">AIRFLOW__CELERY__RESULT_BACKEND</span>: <span class="pl-s">db+postgresql://airflow:airflow@postgres:5432/airflow</span> <span class="pl-ent">AIRFLOW__CORE__EXECUTOR</span>: <span class="pl-s">CeleryExecutor</span> <span class="pl-ent">AIRFLOW__CORE__FERNET_KEY</span>: <span class="pl-s">yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=</span> <span class="pl-ent">AIRFLOW__CORE__SQL_ALCHEMY_CONN</span>: <span class="pl-s">postgresql://airflow:airflow@postgres:5432/airflow</span> <span class="pl-ent">AIRFLOW__LOGGING__LOGGING_LEVEL</span>: <span class="pl-s">DEBUG</span> <span class="pl-ent">AIRFLOW__WEBSERVER__SECRET_KEY</span>: <span class="pl-c1">0123456789</span> <span class="pl-ent">networks</span>: - <span class="pl-s">net</span></pre></div> <h3 dir="auto">Operating System</h3> <p dir="auto">Ubuntu 20.04.3 LTS</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto">Using the base Python 3.8 Docker images from,<br> <a href="https://hub.docker.com/layers/apache/airflow/2.2.3-python3.8/images/sha256-a8c86724557a891104e91da8296157b4cabd73d81011ee1f733cbb7bbe61d374?context=explore" rel="nofollow">https://hub.docker.com/layers/apache/airflow/2.2.3-python3.8/images/sha256-a8c86724557a891104e91da8296157b4cabd73d81011ee1f733cbb7bbe61d374?context=explore</a><br> <a href="https://hub.docker.com/layers/apache/airflow/2.1.4-python3.8/images/sha256-d14244034721583a4a2d9760ffc9673307a56be5d8c248df02c466ca86704763?context=explore" rel="nofollow">https://hub.docker.com/layers/apache/airflow/2.1.4-python3.8/images/sha256-d14244034721583a4a2d9760ffc9673307a56be5d8c248df02c466ca86704763?context=explore</a></p> <h3 dir="auto">Deployment</h3> <p dir="auto">Docker-Compose is included above.</p> <h3 dir="auto">Deployment details</h3> <p dir="auto">Tested with Python 3.8 images</p> <h3 dir="auto">Anything else</h3> <p dir="auto">We did not see similar issues with the Webserver or Scheduler deployments.</p> <p dir="auto">I and my colleague think this might be related to some underlying Celery memory leaks. He has informed me of an upcoming release which includes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1058421992" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/19703" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/19703/hovercard" href="https://github.com/apache/airflow/pull/19703">#19703</a>. I'd be interested to see if a similar issue occurs with the newer version.</p> <p dir="auto">I don't believe there's much else that can be done on Airflow's part here besides upgrading Celery. I just wanted to bring awareness to this outstanding issue. We are currently in search for a different healthcheck which potentially avoids Celery. If there are suggestions, I would gladly create a PR to update the documented compose file.</p> <p dir="auto">Other related issues may be:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="335069356" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4843" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/4843/hovercard" href="https://github.com/celery/celery/issues/4843">celery/celery#4843</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1086281567" data-permission-text="Title is private" data-url="https://github.com/celery/kombu/issues/1470" data-hovercard-type="pull_request" data-hovercard-url="/celery/kombu/pull/1470/hovercard" href="https://github.com/celery/kombu/pull/1470">celery/kombu#1470</a></p> <h3 dir="auto">Are you willing to submit PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
0
<p dir="auto">When you have .col-xs-11 and .col-xs-1 in a single row, it will break into two rows for very small resolution. .col-xs-10 and .col-xs-2 are okay.</p>
<p dir="auto">See the screenshot: I thougt that these blocks must be in one row, but they are not. Why? XS layout must have 12-rows grid too.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/cf31b8d774cd4582c58da9b23f899613c27f069146cd584b1828cdac7d3fe2e0/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353430363032392f313130313139392f37313138326536382d313762312d313165332d393435382d3961393337643766383365302e706e67"><img src="https://camo.githubusercontent.com/cf31b8d774cd4582c58da9b23f899613c27f069146cd584b1828cdac7d3fe2e0/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f353430363032392f313130313139392f37313138326536382d313762312d313165332d393435382d3961393337643766383365302e706e67" alt="bootstrap-wrap" data-canonical-src="https://f.cloud.github.com/assets/5406029/1101199/71182e68-17b1-11e3-9458-9a937d7f83e0.png" style="max-width: 100%;"></a></p>
1
<p dir="auto">This issue is just tracking <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="165843501" data-permission-text="Title is private" data-url="https://github.com/JuliaStats/Rmath.jl/issues/7" data-hovercard-type="issue" data-hovercard-url="/JuliaStats/Rmath.jl/issues/7/hovercard" href="https://github.com/JuliaStats/Rmath.jl/issues/7">JuliaStats/Rmath.jl#7</a>. I believe this issue here needs to be added to the 0.5.0 milestone, and that is why I added a duplicate here in the julia repo.</p> <p dir="auto">My understanding is that StatsFuns.jl relies on rmath. Previously rmath was part of base and worked on all platforms. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="29285302" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6131" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/6131/hovercard" href="https://github.com/JuliaLang/julia/issues/6131">#6131</a> moved it out into JuliaStats/Rmath.jl, but that package doesn't work on Windows, so now StatsFuns.jl doesn't work anymore on Windows, and with that essentially the whole julia statistics stack.</p>
<p dir="auto">My main grudge with the 1-based array indexing common in scientific programming languages is that it makes cyclic array-indexing a pain:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="n = length(a) a[mod(i-1,n)+1]"><pre class="notranslate"><code class="notranslate">n = length(a) a[mod(i-1,n)+1] </code></pre></div> <p dir="auto">The only language I know which solves this problem reasonably elegantly is Mathematica whose <code class="notranslate">Mod</code> function <a href="https://reference.wolfram.com/language/ref/Mod.html" rel="nofollow">takes an optional third argument</a> which is an offset that shifts the representatives of the remainder classes. E.g. <code class="notranslate">mod(x,3,1)</code> would return a number in <code class="notranslate">3, 1, 2</code> instead of <code class="notranslate">0, 1, 2</code>. This makes cyclic 1-based indexing a lot neater:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="n = length(a) a[mod(i,n,1)]"><pre class="notranslate"><code class="notranslate">n = length(a) a[mod(i,n,1)] </code></pre></div> <p dir="auto">I don't know if this would also be a useful feature for <code class="notranslate">rem</code>, especially because <code class="notranslate">rem(x,n)</code> doesn't come with the semantics "this function will always return one of <code class="notranslate">n</code> values".</p>
0
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">Lastest Commit</p> <p dir="auto"><strong>Code</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const a = [5, 6, &quot;7&quot;, &quot;8&quot;] const b = a.filter(x =&gt; typeof x === &quot;number&quot;) "><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">5</span><span class="pl-kos">,</span> <span class="pl-c1">6</span><span class="pl-kos">,</span> <span class="pl-s">"7"</span><span class="pl-kos">,</span> <span class="pl-s">"8"</span><span class="pl-kos">]</span> <span class="pl-k">const</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-s1">x</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">typeof</span> <span class="pl-s1">x</span> <span class="pl-c1">===</span> <span class="pl-s">"number"</span><span class="pl-kos">)</span></pre></div> <p dir="auto"><strong>Expected behavior:</strong><br> b is <code class="notranslate">number[]</code><br> <strong>Actual behavior:</strong><br> b is <code class="notranslate">(number|string)[]</code></p>
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">nightly (1.9.0-dev.20160323)</p> <p dir="auto"><strong>Code</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let numbers: number[] = [1, '2', 3, '4'].filter(x =&gt; typeof x !== 'string'); declare function isNumber(arg: any): arg is number; let numbers2: number[] = [1, '2', 3, '4'].filter(isNumber);"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">numbers</span>: <span class="pl-smi">number</span><span class="pl-kos">[</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-s">'2'</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">,</span> <span class="pl-s">'4'</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-s1">x</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">typeof</span> <span class="pl-s1">x</span> <span class="pl-c1">!==</span> <span class="pl-s">'string'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">declare</span> <span class="pl-k">function</span> <span class="pl-s1">isNumber</span><span class="pl-kos">(</span><span class="pl-s1">arg</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span>: <span class="pl-s1">arg</span> is <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-k">let</span> <span class="pl-s1">numbers2</span>: <span class="pl-smi">number</span><span class="pl-kos">[</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-s">'2'</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">,</span> <span class="pl-s">'4'</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-s1">isNumber</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><a href="http://www.typescriptlang.org/Playground#src=let%20numbers%3A%20number%5B%5D%20%3D%0A%20%20%20%20%5B1%2C%20'2'%2C%203%2C%20'4'%5D.filter%28x%20%3D%3E%20typeof%20x%20!%3D%3D%20'string'%29%3B%0A%0Adeclare%20function%20isNumber%28arg%3A%20any%29%3A%20arg%20is%20number%3B%0Alet%20numbers2%3A%20number%5B%5D%20%3D%20%5B1%2C%20'2'%2C%203%2C%20'4'%5D.filter%28isNumber%29%3B" rel="nofollow">Playground</a></p> <p dir="auto"><strong>Expected behavior:</strong><br> .filter with a type guard returns an array of the specified type. This would be especially useful with <code class="notranslate">--strictNullChecks</code>, so we could do something like <code class="notranslate">foo.map(maybeReturnsNull).filter(x =&gt; x != null)....</code></p> <p dir="auto"><strong>Actual behavior:</strong><br> .filter returns an array of the same type, and the two <code class="notranslate">let</code>s above are errors.</p>
1