text:
Cheery-pick bugs fix to Release 1.5.0

Fix bug 4665 project admin cannot change the role of some user.
Add query string when getting members
ix UI/UX issues and manually refresh component when fresh
Fix configure save err #4698

Coverage increased (+0.04%) to 64.335% when pulling 939dd14091554da484eeaa1088e656980c816c54 on ninjadq:release-1.5.0 into e67dbd00b7831056d097c5e01977d7430ccc7ec2 on vmware:release-1.5.0.

Please rebase

It’s dq’s commits
From: Daniel Jiang notifications@github.com
Sent: Wednesday, April 18, 2018 4:35 PM
To: vmware/harbor harbor@noreply.github.com
Cc: Fuhui Peng (c) pengf@vmware.com; Review requested review_requested@noreply.github.com
Subject: Re: [vmware/harbor] Cheery-pick bugs fix to Release 1.5.0 (#4696)
Please rebase
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_vmware_harbor_pull_4696-23issuecomment-2D382309164&d=DwMCaQ&c=uilaK90D4TOVoH58JNXRgQ&r=aeIUxwdoJfj5RkcI5m5zAw&m=d_KAl2GfyjmO7UearkOxwaUbUYjsbkHqrHFO5nFslgQ&s=8QG6YFBrMOZchDPDCvMwc8FJ9FCSYVD-SvYsjPiNfcs&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_Acfv7fPL2XzgO87ssWV6tf7k0r386Sdjks5tpvqigaJpZM4TYIWL&d=DwMCaQ&c=uilaK90D4TOVoH58JNXRgQ&r=aeIUxwdoJfj5RkcI5m5zAw&m=d_KAl2GfyjmO7UearkOxwaUbUYjsbkHqrHFO5nFslgQ&s=RLk3jIrDmfaJlceYTHu1yDXE2ao8gNVb2R4WdS1nWaQ&e=.

authors: coveralls ninjadq pengpengshui reasonerjt

repo: vmware/harbor


text:
LICENSE.txt is missing

Describe the bug
pip install vsphere-automation-sdk-python
Collecting vsphere-automation-sdk-python
Using cached vsphere-automation-sdk-python-0.0.1.tar.gz (981 bytes)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
Traceback (most recent call last):
File "/root/pyvim/lib64/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/root/pyvim/lib64/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/root/pyvim/lib64/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-eirgs6zl/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-eirgs6zl/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-eirgs6zl/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-eirgs6zl/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 13, in
File "", line 5, in read
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-exnz_899/vsphere-automation-sdk-python_98bd34e4c264408db8dffa5a7a7ee47f/LICENSE.txt'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Reproduction steps

...
Expected behavior
The file is needed to pip install acording to setuptools standards
Additional context
No response

The package on pypi is just the reserved namespace, there are no deliverables in it. If you want to install the sdk, you can follow these steps.

source: gharchive/issue

repo: vmware/vsphere-automation-sdk-python

license: MIT

license_type: permissive

license_source: github-api


text:
Supplying custom allocation/deallocation routines

I am usually working in an environment where custom allocators are used for various reasons and usage of plain malloc/free is frowned upon. Thankfully many libraries allow their users to supply custom (de)allocation routines.
While support for this can be as simple as some defines that default to malloc/free, I always found that in practice it is way more convenient to be able to pass some user data (often just a void*) to the (de)allocation routines (similar to what is suggested in #356). See for example PCRE2 that does this upon context creation (e.g. pcre2_general_context_create).
If you feel that this would fit MIR and is worth pursuing, I could try to put together a pull request for this :-)

Sorry for long delay with the answer, I overlooked your message.  I think custom allocation would be useful for some applications.  So it is worth to pursue this.  I only have one important requirement is to save somehow the old library interface for compatibility.

Thanks for your feedback :-)
I am currently a bit busy with some other stuff, so it might be a while until I have something to show.
Just to clarify: by library interface you mean the functions/types in mir.h and mir-gen.h and the like, but not e.g. mir-htab.h and mir-varr.h, correct?

authors: ningvin vnmakarov

repo: vnmakarov/mir


text:
[K8s-series] - Kubernetes Probes

Add: Configs K8s Probes with spring boot contents.
Anh @qmau94  review giúp em nhé.

@hungran cross review vs e nhe =))

source: gharchive/pull-request

repo: vntechies/blog


text:
play/pause inside/outside viewport inconsistency

I am using multiple video instances on a single page – also using the fullpage.js script (http://alvarotrigo.com/fullPage/).
Some videos behave as expected, playing when in viewport and pausing when not, while some keep playing also when not in the viewport.
Any ideas what could cause this issue?

how did you solve this @ummocrono ?

authors: lesrpo ummocrono

repo: vodkabears/Vide


text:
typeahead-callback doesn't show autocomplete prompts

I use "@voerro/vue-tagsinput": "^2.7.1" in my "vue": "^2.6.11" proj to find that typeahead-callback doesn't show autocomplete prompts.
Some code snippets are as follows:
<el-col :span="20" style="margin: auto">
  <tags-input
    element-id="tags"
    v-model="selectedTags"
    :existing-tags="existingTags"
    :typeahead="true"
    :typeahead-callback="search_tags"
    @tag-added="on_tag_added"
    @tag-removed="on_tag_removed"
    :add-tags-on-comma="true"
    :delete-on-backspace="true"
    typeahead-style="badges"
    value-fields="value"
  ></tags-input>
</el-col>

search_tags(query) {
  console.log(query);
  return new Promise((resolve) => {
    this.$axios
      .get( ... )
      .then((res) => {
        let result = [];
        for (let key in res.data) {
          result.push({ key: key, value: res.data[key] });
        }
        console.log(result);
        resolve(result);
      });
  });
},

I notice that console.log(result); prints correct results but no autocomplete prompts are shown.
Any  help is appreciated :)
Creling

I have the same problem.
Looking for an alternative package now.

I had the same problem. In VoerrorTagsInput.vue,
if (this.typeaheadCallback) {                         this.typeaheadCallback(searchQuery)                             .then((results) => {                                 this.typeaheadTags = results;                             });                     }
has to be changed to this:
if (this.typeaheadCallback) {                         this.typeaheadCallback(searchQuery)                             .then((results) => {                                 this.typeaheadTags = results;                                 this.doSearch(searchQuery);                             });                     }
Then it works for me.

As another workaround until the PR is merged, you can add a ref to the components (e.g. ref="tagsinput") and then call doSearch after resolving the promise.
autocomplete(q) {
  const p = this.searchRemoteServer({ query: q })
  return new Promise((resolve) => {
    p.then((results) => {
      resolve(results)
      this.$refs.tagsinput.doSearch(q)
    })
  })
},

authors: Creling elmage hodbn peinkofer

repo: voerro/vue-tagsinput


text:
test sdks

Please add a meaningful description for your change here

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

Run Python PreCommit (3.8)

Run Python PreCommit (3.8)

Run Python PreCommit (3.10)

Run PythonDocker PreCommit (3.8)

Run Run PythonDocker PreCommit (3.8)

Run Python PreCommit (3.9)

Run Python PreCommit (3.9)

Run Python PreCommit (3.9)

Run Python PreCommit (3.9)

Run Python PreCommit (3.9)

Run Python PreCommit (3.9)

Run Python PreCommit (3.9)

Run Python PreCommit (3.9)

Run Python PreCommit (3.8)

Run Python PreCommit (3.10)

Run Go PreCommit

repo: volatilemolotov/beam


text:
DataView does not exist even though it is included in the scripts

I am trying to use a dataview but when trying to create a new instance the reference cannot be found. I have included the script in the _LayoutHead
   protected createSlickGrid() {
            var grid = super.createSlickGrid();

            var dataView = new Slick.Data.DataView({ inlineFilters: true });

            return grid;
        }

I keep getting Slick.Data does not contain DataView

First, you should have included its script file. And you shouldn't actually use a DataView, not sure if it is compatible with Serenity DataGrid.

I'm trying to add an aggregate to the dialog but how can I do that without using a DataView?

See grouping sample

repo: volkanceylan/Serenity

license: mit

license_source: bigquery


text:
InsertDate, InsertedById,UpdateDate, UpdatedBy

How do you deal with these fields (InsertDate, InsertedById,UpdateDate, UpdatedBy) for purpose of tracking logs.
Kind regards,
Dan

See https://github.com/volkanceylan/Serene/blob/master/Serene/Serene.Web/Modules/Administration/User/LoggingRow.cs
Best Regards

authors: doyuga edson


text:
Avoid handling the error flow

There is a nice construct named with in Elixir to handle the {:ok, _} and {:error, _} pattern.
To something like this should not be necessary:
def save( image = { :ok, options }, dest_path ) do
If you want to keep it, add a match that does not expect a tuple as first argument:
def save( image, dest_path ) do

@h4cc , could you please check it out if it's okay so I can close the issue?

repo: voodoo-child/gmex


text:
github actions macos-14 build

#80 makes our macos CI pass by pinning to the macos-13 image. Ideally we'd work on macos-14 too.

https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md and https://github.com/actions/runner-images/blob/main/images/macos/macos-13-arm64-Readme.md do not differ that much with regards to SSL/TLS.

repo: voorkant/voorkant-core


text:
Missing Support for MariaDB 10.x for Linux

Please upgrade the support to 10.x also for Linux. Thx.

Hello, Thanks for your interest. Can you propose a pull request for this?
On Fri, 14 Aug 2015 16:23 HaVonTe1 notifications@github.com wrote:

Please upgrade the support to 10.x also for Linux. Thx.
—
Reply to this email directly or view it on GitHub
https://github.com/vorburger/MariaDB4j/issues/28.

Could you describe what steps would be necessary to add 10.x support?

Why does Windows already has 10.x support?
What would have to be changed?

Why does Windows already has 10.x support?

because someone contributed it

What would have to be changed?

add it here https://github.com/vorburger/MariaDB4j/tree/master/mariaDB4j-db-linux64/src/main/resources/ch/vorburger/mariadb4j, and change this https://github.com/vorburger/MariaDB4j/blob/master/mariaDB4j-core/src/main/java/ch/vorburger/mariadb4j/DBConfigurationBuilder.java#L188

==> https://github.com/vorburger/MariaDB4j/pull/32 and/or https://github.com/vorburger/MariaDB4j/pull/33 ..


text:
Puppetserver container manifest unknown

Received an error trying to pull the puppetserver container
podman image pull voxpupuli/container-puppetserver

Resolving "voxpupuli/container-puppetserver" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/voxpupuli/container-puppetserver:latest...
Error: initializing source docker://voxpupuli/container-puppetserver:latest: reading manifest latest in docker.io/voxpupuli/container-puppetserver: manifest unknown

ho hi, yes, this is a problem atm, we don't have a "latest" tag yet.
pls look here a grab a tag. the tagging will be reworked soon, and then there will also be a "latest" tag.
https://github.com/voxpupuli/container-puppetserver/pkgs/container/container-puppetserver

latest tag will be added with #19

latest tag is now available, but check in the container releases to which build (7 or 8) it refers.

thank you for fixing this

authors: mitchdubdub rwaffen

repo: voxpupuli/container-puppetserver


text:
Wsp-1479 admin page designs

Designed Dashboard Page
Replace Schedule with Help Page
Added assets folder for CS and JS
Modification main.php
Enqueue CSS and JS for the admin pages

@Padminia This admin UI is for the Malware Scanner Plugin, and since it's a newly designed interface, there is no previous version to compare it with.

Can you attach the before and after?

@Padminia we don't have anything before that. Its a new plugin

Looks good

authors: manishsubachchanyadav rajanvijayan

repo: vplugins/wsp-malware-scanner


text:
Allow configurable download URL

This allows for local mirroring, since upstream removes versions from availability.

Nice change!  Can you also update the README to show the new attribute?  Then happy to merge.

Done. 😄

👍

repo: vptheron/chef-idea


text:
sync optimizer problem

hi Vincent,
I have another problem, I use 0 1 as training GPU and numbatches_to_aggregate=0 in default config standardtrainer.cfg , but I found 3 Start master session in log. Is this behavior right?
2018-08-21 07:20:16.556159: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered          [286/1991]
/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gradients_impl.py:100: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gradients_impl.py:100: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
2018-08-21 07:20:22.265699: I tensorflow/core/distributed_runtime/master_session.cc:1136] Start master session 6066331584d0d493 with config: gpu_optios { allow_growth: true } allow_soft_placement: true
2018-08-21 07:20:22.711547: I tensorflow/core/distributed_runtime/master_session.cc:1136] Start master session 51400be6a5c9e9bc with config: gpu_optios { allow_growth: true } allow_soft_placement: true
WORKER 0: step 0/15600 loss: 3.890086, learning rate: 0.001000
         time elapsed: 8.318348 sec
         peak memory usage: 21/22604 MB
WORKER 0: step 1/15600 loss: 3.776481, learning rate: 0.001000
         time elapsed: 1.858370 sec
         peak memory usage: 688/22604 MB
WORKER 0: step 2/15600 loss: 3.670535, learning rate: 0.001000
         time elapsed: 1.519805 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 3/15600 loss: 3.695373, learning rate: 0.001000
         time elapsed: 1.608191 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 4/15600 loss: 3.627747, learning rate: 0.000999
         time elapsed: 2.627351 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 5/15600 loss: 3.646843, learning rate: 0.000999
         time elapsed: 1.744121 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 6/15600 loss: 3.629820, learning rate: 0.000999
         time elapsed: 1.468782 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 7/15600 loss: 3.638589, learning rate: 0.000999
         time elapsed: 1.179851 sec
         peak memory usage: 893/22604 MB
2018-08-21 07:20:52.899330: I tensorflow/core/distributed_runtime/master_session.cc:1136] Start master session c5b480c57e96eea5 with config: gpu_optios { allow_growth: true } allow_soft_placement: true
WORKER 0: step 8/15600 loss: 3.618140, learning rate: 0.000999
         time elapsed: 1.060105 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 9/15600 loss: 3.596526, learning rate: 0.000999
         time elapsed: 2.330892 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 10/15600 loss: 3.601762, learning rate: 0.000999
         time elapsed: 1.179645 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 11/15600 loss: 3.615230, learning rate: 0.000998
         time elapsed: 0.954928 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 12/15600 loss: 3.602469, learning rate: 0.000998
         time elapsed: 1.251472 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 13/15600 loss: 3.601032, learning rate: 0.000998
         time elapsed: 0.886364 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 14/15600 loss: 3.603386, learning rate: 0.000998
         time elapsed: 1.565970 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 15/15600 loss: 3.622668, learning rate: 0.000998
         time elapsed: 0.885060 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 16/15600 loss: 3.613049, learning rate: 0.000998
         time elapsed: 1.336841 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 17/15600 loss: 3.610620, learning rate: 0.000997
         time elapsed: 0.818247 sec
         peak memory usage: 893/22604 MB
WORKER 0: step 18/15600 loss: 3.618244, learning rate: 0.000997
         time elapsed: 0.795765 sec
         peak memory usage: 893/22604 MB
WORKER 1: step 17/15600 loss: 3.590606, learning rate: 0.000997
         time elapsed: 8.500966 sec
         peak memory usage: 893/22604 MB

In Contrast, When I set numbatches_to_aggregate=2 use sync replicas optimizer, there is a error msg like
Traceback (most recent call last):
  File "nabu/scripts/train.py", line 112, in <module>
    testing=False)
  File "nabu/scripts/train.py", line 90, in train
    tr.train(testing)
  File "/opt/cephfs1/asr/users/fanlu/mfs/nabu/nabu/neuralnetworks/trainers/trainer.py", line 607, in train
    outputs = self._create_graph()
  File "/opt/cephfs1/asr/users/fanlu/mfs/nabu/nabu/neuralnetworks/trainers/trainer.py", line 187, in _create_graph
    cluster=cluster)
  File "/opt/cephfs1/asr/users/fanlu/mfs/nabu/nabu/neuralnetworks/trainers/trainer.py", line 569, in _update
    name='apply_gradients')
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/sync_replicas_optimizer.py", line 238, in apply_gradients
    raise ValueError("Global step is required to check staleness")
ValueError: Global step is required to check staleness

So I add param global_step to apply_gradients_op in func _update
# opperation to apply the gradients
        apply_gradients_op = optimizer.apply_gradients(
            grads_and_vars=grads_and_vars,
            name='apply_gradients', global_step=global_step)

and start training, but there is no training log print anymore.
How to set global_step to apply_gradients_op? @vrenkens

About your first question: it is normal that 3 sessions are started when using 2 GPUs. There is one for each GPU worker and one for the parameter server that holds the parameters.
About the second question: I will check it out when I have the time

@AzizCode92 I use docker with Centos version 7.4, I have met
TF GPU device with id 0 was not registered

either.

@vrenkens
plus ps, the count is 4
2018-08-21 08:29:04.230358: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N
2018-08-21 08:29:04.312654: I tensorflow/core/distributed_runtime/master_session.cc:1136] Start master session 0314965d18d48a0e with config:
2018-08-21 08:29:04.314325: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered
2018-08-21 08:29:04.314370: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered
2018-08-21 08:29:04.317363: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered
2018-08-21 08:29:04.317405: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered
2018-08-21 08:29:04.703447: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/device:GPU:0 with 21557 MB memory) -> physical GPU (device: 0, name: Tesla P40, pci bus id: 0000:02:00.0, compute capability: 6.1)
2018-08-21 08:29:04.703531: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/device:GPU:0 with 21557 MB memory) -> physical GPU (device: 0, name: Tesla P40, pci bus id: 0000:03:00.0, compute capability: 6.1)
2018-08-21 08:29:05.458095: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered
2018-08-21 08:29:05.458151: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered
2018-08-21 08:29:05.462393: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered
2018-08-21 08:29:05.462629: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered
2018-08-21 08:29:05.470015: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered
2018-08-21 08:29:05.470082: E tensorflow/core/grappler/clusters/utils.cc:127] Not found: TF GPU device with id 0 was not registered
/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gradients_impl.py:100: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gradients_impl.py:100: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
2018-08-21 08:29:10.788696: I tensorflow/core/distributed_runtime/master_session.cc:1136] Start master session 843a2ba3e9062528 with config: gpu_options { allow_growth: true } allow_soft_placement: true
2018-08-21 08:29:12.074345: I tensorflow/core/distributed_runtime/master_session.cc:1136] Start master session b7a26beb96e7ca5a with config: gpu_options { allow_growth: true } allow_soft_placement: true
WORKER 0: step 0/15600 loss: 3.883478, learning rate: 0.001000
         time elapsed: 7.911287 sec
         peak memory usage: 22/22604 MB
WORKER 0: step 2/15600 loss: 3.766951, learning rate: 0.001000
         time elapsed: 1.964389 sec
         peak memory usage: 731/22604 MB
WORKER 0: step 4/15600 loss: 3.677392, learning rate: 0.000999
         time elapsed: 1.568714 sec
         peak memory usage: 884/22604 MB
WORKER 0: step 6/15600 loss: 3.674108, learning rate: 0.000999
         time elapsed: 2.856795 sec
         peak memory usage: 884/22604 MB
WORKER 0: step 8/15600 loss: 3.673018, learning rate: 0.000999
         time elapsed: 1.789929 sec
         peak memory usage: 884/22604 MB
WORKER 0: step 10/15600 loss: 3.652077, learning rate: 0.000999
         time elapsed: 1.303749 sec
         peak memory usage: 884/22604 MB
WORKER 0: step 12/15600 loss: 3.645280, learning rate: 0.000998
         time elapsed: 1.514070 sec
         peak memory usage: 884/22604 MB
WORKER 0: step 14/15600 loss: 3.627352, learning rate: 0.000998
         time elapsed: 1.308973 sec
         peak memory usage: 884/22604 MB
WORKER 0: step 16/15600 loss: 3.628558, learning rate: 0.000998
         time elapsed: 1.871332 sec
         peak memory usage: 884/22604 MB
2018-08-21 08:29:41.694464: I tensorflow/core/distributed_runtime/master_session.cc:1136] Start master session c98110034232ee37 with config: gpu_options { allow_growth: true } allow_soft_placement: true
WORKER 0: step 18/15600 loss: 3.619331, learning rate: 0.000997
         time elapsed: 1.154132 sec
         peak memory usage: 884/22604 MB
WORKER 0: step 20/15600 loss: 3.636102, learning rate: 0.000997
         time elapsed: 1.139632 sec
         peak memory usage: 884/22604 MB

@vrenkens When I use 3GPU, I found the number is 5, So I guess except ps and chief worker, on the other worker master session start twice on each gpu.

can you share please what is the output of

ps aux | grep python

@AzizCode92
root     3130930 3130927  0 16:28 pts/20   00:00:04 python nabu/scripts/prepare_train.py --recipe=config/recipes/LAS/TIMIT --expdir=/opt/cephfs1/asr/users/fanlu/mfs/timit_train2 --mode=single_machine
root     3130987 3130930 22 16:28 pts/20   00:02:18 python -u nabu/scripts/train.py --clusterfile=/opt/cephfs1/asr/users/fanlu/mfs/timit_train2/cluster/cluster --job_name=ps --task_index=0 --ssh_command=None --expdir=/opt/cephfs1/asr/users/fanlu/mfs/timit_train2
root     3130988 3130930 99 16:28 pts/20   00:34:05 python -u nabu/scripts/train.py --clusterfile=/opt/cephfs1/asr/users/fanlu/mfs/timit_train2/cluster/cluster --job_name=worker --task_index=0 --ssh_command=None --expdir=/opt/cephfs1/asr/users/fanlu/mfs/timit_train2
root     3130989 3130930 99 16:28 pts/20   00:32:22 python -u nabu/scripts/train.py --clusterfile=/opt/cephfs1/asr/users/fanlu/mfs/timit_train2/cluster/cluster --job_name=worker --task_index=1 --ssh_command=None --expdir=/opt/cephfs1/asr/users/fanlu/mfs/timit_train2

I doubt that this is the case. I have only tested it with 2 workers and 1 ps, because I don't have bigger machine's to play with. The overview of you jobs look normal. From your first post it seems that both workers are working, no?

See here the task_index=0 is shared between the worker and the ps.
I thought that the the ps will be working on a different task

@AzizCode92 The task_name is different. The indices for different task names can be the same

@vrenkens  Yes, the first two master session start, only one worker is working, when last master session start, the second GPU start working.

That is pretty normal behavior, it can take a while before all workers are online.

Yes, So pls help me find the sync replica optimizer can‘t applyer_gradient error.
Why do you use increment_step op significantly, I think it's odd.
How about tf.train.get_or_create_global_step()?

I will take a look when I have the time

Hi, everyone:
On the tf website, SyncReplicasOptimizer has a sync_replicas_hook, that should be managed by MonitoredTrainingSession.

authors: AzizCode92 HawkAaron fanlu vrenkens

repo: vrenkens/nabu


text:
Support cjs/json5 config file extension for prettier

Changes proposed:

[x] Add
[ ] Delete
[ ] Fix
[ ] Prepare

See Prettier release note

My bad. Code updated. Removed .mjs and added json5.

repo: vscode-icons/vscode-icons


text:
bug: Not updating cursor position while running keymap

Did you check docs and existing issues?

[X] I have read all the vscode-neovim docs
[X] I have searched the existing issues of vscode-neovim
[X] I can reproduce the issue with an empty init.vim/init.lua and no other vscode extensions (when applicable)

Neovim version (nvim -v)
0.9.1
Operating system/version
Ubuntu 20.04.6 LTS (through WSL 2 on Windows 10)
Describe the bug
This was supposed to be fixed by the 1358 pull request, but it didn't resolve the issue for me.
The following mapping is running the 'editor.action.reindentselectedlines' command on the line the cursor started on instead of the line it is on at the time the command is run. I am basing this conclusion on the fact that the cursor is left at the very start of the new line. Also, if I intentionally mess up the indention of the line the cursor is on before pressing o, the indentation of that line does get fixed. Here is the mapping I am using from my init.lua:
vim.keymap.set('n', 'o', "ocall VSCodeNotify('editor.action.reindentselectedlines')")
Steps To Reproduce

Add vim.keymap.set('n', 'o', "o<Cmd>call VSCodeNotify('editor.action.reindentselectedlines')<CR>") to init.lua
Place cursor on a line that is not indented properly (not really necessary, but helps illustrate problem better)
Press o while in normal mode

Expected Behavior
The wrongly indented line the cursor started on should not get changed, but it does because the cursor position is not being updated (educated guess). The cursor should be left properly indented on the next line, instead it is at the very beginning of the line because VSCodeNotify() is called against the old cursor position (educated guess).

I really need some way to get o working better for indenting the cursor at the new line. It had it working better when I was able to call VSCodeNotifyRange() and pass in specific line number.

Currently the easist way is add delay to execute command in the mapping. Of course, this is not the perfect solution, but the delay can indeed solve many problems.
vim.keymap.set('n', 'o', function ()
  vim.api.nvim_feedkeys('o', 'n', false)
  vim.defer_fn(function ()
    vim.fn.VSCodeNotify('editor.action.reindentselectedlines')
  end, 20)
end)

@xiyaowong thanks, I will try it out. I'm going to close this issue as it is a duplicate of my other issue https://github.com/vscode-neovim/vscode-neovim/pull/1358 which recently got re-opened.

@xiyaowong Actually that worked! Interestingly enough, even if I change the delay from 20 to 1, it still resolves my issue.

repo: vscode-neovim/vscode-neovim


text:
layout/makeup issue

In context, Location and Other Hardware should follow up iBeacon in Hardware category, but they are actually after Layout. Need to rearrange these two items to the right place.

@arasu01 @serhii-londar can u guys help with the above if u have time?

authors: Mylittleswift dkhamsing

repo: vsouza/awesome-ios


text:
Capitalization in elsarticle-num

The first character in “note” fields is forced to lower case. This is almost always a mistake.
In article titles lower case in enforced in inline equations ($…$).
In article titles lower case is enforced even after full stops.  This turns titles like “… equilibrium calculations. III. Algorithms” into
“… equilibrium calculations. iii. algorithms”
This misbehavior can, of course, be turned off by enclosing everything in braces, but I would prefer an improvement of the bibstyle over modifying my literature data base.

Hi, thanks for the issue report. I will look into it.

The "note" field is in lowercase as it is preceded with a comma, not a full stop.
The  "title" field is in lowercase (in math and after period) as the change.case$
transformation is applied.
As you say, it's a common way to control capitalization (and sorting) with
additional braces {}. So, please use the braces if appropriate.
I do not find anything wrong with the style itself.
Closing.

authors: dgalcius ukd


text:
Document the exposed player instance

Hi, this is a great library, and I like it very much, including the concise documentation.
I want to further control the youtube instance, with seek operations and getting the current position, thus I was looking on how to extend this library.
However, after a moment at looking into the code I found that you already expose the player instacance, via the instance shallow ref. This makes it very easy for me. Thanks for that, but I ask you also to please document this, as I am sure, other will benefit from it too.

Sure, I can document the usage of instance more prominently. This will be online as soon as I implement your requested feature https://github.com/vue-youtube/vue-youtube/issues/8 as it also needs documentation adjustments.

This is now documented here: https://vue-youtube.github.io/docs/usage/composable#player-instance
Let me know if you want to improve the documentation even further.

Thanks, this will benefit this great component!

authors: Techassi suterma

repo: vue-youtube/docs


text:
Uncaught TypeError: Cannot read properties of undefined (reading 'value')

"nuxt": "^3.8.2"
"@ant-design-vue/nuxt": "^1.2.0"

app.vue里面添加
<script lang="ts" setup>
const handleMessage = () => {
  message.info("This is a normal message");
};
</script>
<template>
  <a-button @click="handleMessage"> button </a-button>
</template>

点击按钮时，控制台会报一个错

包裹一层config-provider试一下

update 4.0.8

感谢

repo: vueComponent/ant-design-vue-nuxt


text:
Custom blocks in single file components

According to https://vue-loader.vuejs.org/en/configurations/custom-blocks.html
it should be possible to configure webpack to parse custom blocks like:
<docs>
## This is an Example component.
</docs>

<template>

{{msg}}

</template>

into a separate file using the following configuration:
var ExtractTextPlugin = require("extract-text-webpack-plugin")

module.exports = {
  module: {
    rules: [
      {
        test: /\.vue$/,
        loader: 'vue-loader',
        options: {
          loaders: {
            // extract all <docs> content as raw text
            'docs': ExtractTextPlugin.extract('raw-loader'),
          }
        }
      }
    ]
  },
  plugins: [
    // output all docs into a single file
    new ExtractTextPlugin('docs.md')
  ]
}

I am trying to make it work with the template (version 1.3.0) but I'm not sure how to do it.
Should i put it in vue-loader.conf.js ?
Can you help?

Please ask Rhiannon the forum.vuejs.oeg

authors: LinusBorg rhymes

repo: vuejs-templates/webpack


text:
What is the best practice to build for QA environment instead of Production environment?

Before pushing the changes to production environment, we should have a QA environment for the test team to have necessary tests.
And in QA environment we should call the APIs for QA environment instead of Production environment,
for example: https://api.qa.example.com for QA environment, and https://api.example.com for Production environment.
So, I have to configure different API base URL for Prod and QA. As mentioned in the document Environment Variables,
I can set the variables in config/prod.env.js, but where should I put the configurations for QA environment?

Seems I found the answer, just use the config/test.env.js and change one line in build/build.js, and use cross-env NODE_ENV=testing npm run build instead of nom run build to build for QA environment for testing:
diff --git a/build/build.js b/build/build.js
index 6b8add1..04087fc 100644
--- a/build/build.js
+++ b/build/build.js
@@ -1,6 +1,6 @@
require('./check-versions')()
-process.env.NODE_ENV = 'production'
+process.env.NODE_ENV = process.env.NODE_ENV || 'production'
var ora = require('ora')
var rm = require('rimraf')
diff --git a/config/test.env.js b/config/test.env.js
index 89f90de..5638b9c 100644
--- a/config/test.env.js
+++ b/config/test.env.js
@@ -2,5 +2,7 @@ var merge = require('webpack-merge')
var devEnv = require('./dev.env')
module.exports = merge(devEnv, {

NODE_ENV: '"testing"'

NODE_ENV: '"testing"',
ROUTER_BASE: '"/"',
BASE_API: '"https://api.qa.example.com"'
})

Does this work for webpack 3?

authors: kgrosvenor sutra


text:
Comments inside Transition are considered as a node

Version
3.2.31
Reproduction link
sfc.vuejs.org/
Steps to reproduce
Just add comments inside Transition and you can see it breaks by showing a <transition> can only be used on a single element or component error
What is expected?
The transition component should work as expected since comments are not real DOM elements.
What is actually happening?
Vue shows an error saying:
 can only be used on a single element or component

duplicate of https://github.com/vuejs/core/issues/5266

use transition-group instead. see sfc

Duplicate of https://github.com/vuejs/core/issues/5266

@posva I tested this one on my PR of #5266, its not duplicate.

authors: HassanZahirnia edison1105 posva

repo: vuejs/core


text:
Imported components within "<script setup" are not renderable dynamically

Vue version
3.2.47
Link to minimal reproduction
https://sfc.vuejs.org/#eNqVU91O8zAMfRWTm4FEW3FblU/6xGvkJks9GshPlbgb1bR3x0kLmwZCcJfYzjn28clR/B/Hej+haEVH6EarCP9JD9AND5BotvgohQ42xBZ6FV8j9lKUAoCnKVFw8BTcGDx6gjSEyfawRYjoe+RauO1nr5zRytr5jjM2HCB4jeDC5An7tnA1w8NCelNVcPGCn0/OzXBQ/JjiDBRWaKABQS8N6I8GWqgqxpHUfYagNYkn2Kto1NaiFNAUpsK2jcvlN4cC+70mzxHR/02VRIp+JwqzZlHOD/6mQ8lUZznyMF1zsWm+Jh3NyH0iTSNHDNdGgiMz7OAEu8jQG7bI5jO1jHiesJRIUTfXdNlZUmQSHXwi+FgDPGbw2811/eYud7f0w52Ie7EwVk6N9UsKnm16LNtYE0mKFkokxwpby4eBaExt06Sdzi28pDrE54ZPdWSBjcMak6u2MRwSRgaW4v4Co+HgHmO1riv+hHlV+gU3w56kP/Eo34lz9e14Y73Zr0bixFtWofRFX2xl0tlPyvdl+8byJU1aY0q7ic1ys0LxxlesrlkYLkwgTu9ey2a4
Steps to reproduce

Use SFC.
Use <script setup>.
Import a custom component (e.g., CustomComponent). Now CustomComponent should be exposed to the template. As per the docs

With

Yeah that won't work, and is expected. The ref should not contain a component name, it should contain the component itself.
https://sfc.vuejs.org/#eNqVU9tOwzAM/RWTF0CirXitChLiN/KSpR4N5FIl7kY17d9x0sKmgRC8JbZzjn18chBP41jvJhSt6AjdaBXho/QA3XAPiWaLD1LoYENsoVfxLWIvRSkAeJ4SBQfPwY3BoydIQ5hsDxuEiL5HroWbfvbKGa2snW85Y8MegtcILkyesG8LVzPcL6RXVQVnL/j55NwMe8WPKc5AYYUGGhD00oD+bKCFqmIcSd1XCFqTeIKdikZtLEoBTWEqbJu4XP5yKLA/a/ISEf3/VEmk6G+iMGsW5fTgfzqUTHWSIw/TNWeb5mvS0YzcJ9I0csRwbSQ4MMMWjrCNDH3NFrn+Si0jniYsJVLUzSVddpYUmUQHnwg+1wAPGfzmAuc2t7Y0w22IO7HQVU6N9WsKnj16KKtYE0mKFkokxwpVy4eBaExt06StzvyvqQ7xpeFTHVld47DG5KpNDPuEkYGluDvDaDi4w1itu4q/YV6UfsPNsEfpjzzKT8pc/DleV292q4s48Z5VKH3RN0+ZdDKT8n1ZvbF8SZPWmNJ2YqdcrVC87hWraxaGMweI4wejCWX9

@LinusBorg that works! Thanks!
But actually this makes it not consistent as a built-in component or a globally-registered component should be rendered by pass only the component name, not the component raw!

authors: LinusBorg MajedMuhammad


text:
在模板中对字符串 replace 时，参数含 '&' 符号不生效

Vue version
latest
Link to minimal reproduction
https://play.vuejs.org/#eNqNks1OwzAQhF9l8aFppZAceitpJUCVgAMgQOLiS5RsQ9rEtvxTKkV5d9auUoooFTd75xt7du2OXSuVbB2yGctMoWtlwaB1asFF3SqpLXSgcRVDIVvlLJbQw0rLFiIyRVxwUUhhLLSmgrknx9EdNo2EUd6qK3iXuikvosmAyQ1Rw1Hj8QTmC29NtnnjMNGomrzAcRrMaQzRKJqQN0v30SgUbSy2hFmkHUCmFl0Xjjhphr7PUt/MQP5OF/3HKf+85PLEJT/IcyCNYyhl6VFfLGbW0MRWdZWsjRT0Op13ceZnVzeon5StaaKczSAoXsups8+HULPaYTzUiw8sNifqa7PzNc6eNRrUW+TsoNlcV2j38vL1EXe0PoitLF1D9BnxBY1snM+4x26cKCn2ERfS3oc/VovqzSx3FoUZmvJBPdkHnjP6bbdnWv+OO02mwcdFz/ov06/tAw==
Steps to reproduce

<template>

{{ msg.replace(/&/, '&') }}

{{ 'Hello & World'.replace(/&/, '&') }}

o{{ msg.replace(/&/, '-') }}

{{ msg.replace(/amp;/, '-') }}

{{ ok }}

</template>

What is expected?

{{ msg.replace(/&/, '&') }}

should be result to:

 Hello & World!

What is actually happening?
but this code

{{ msg.replace(/&/, '&') }}

has the following result:

 Hello & World!

System Info
No response
Any additional comments?
No response

Vue template follows HTML syntax so & inside your template is already decoded into & in your JavaScript code. You can see this from the compiled output:
return (_ctx, _cache) => {
  return (_openBlock(), _createElementBlock(_Fragment, null, [
    _createElementVNode("p", null, _toDisplayString(msg.value.replace(/&/, '&')), 1 /* TEXT */),
    _createElementVNode("p", null, _toDisplayString('Hello & World'.replace(/&/, '&')), 1 /* TEXT */),
    _createElementVNode("p", null, "o" + _toDisplayString(msg.value.replace(/&/, '-')), 1 /* TEXT */),
    _createElementVNode("p", null, _toDisplayString(msg.value.replace(/amp;/, '-')), 1 /* TEXT */),
    _createElementVNode("p", null, _toDisplayString(ok.value), 1 /* TEXT */)
  ], 64 /* STABLE_FRAGMENT */))
}

authors: Justineo youthlin


text:
Malfunction upon creating a new Vue SFC.

In my Nuxt application, whenever I create a new component during development, all the features that come with Volar, including the Intesllisense simply stop working until I reload my workspace.

+1. I have the same issue but only when I create a new page.

Tracking in https://github.com/vuejs/language-tools/issues/4424

authors: CHIBX DouglasAR01 davidmatter

repo: vuejs/language-tools


text:
Store reset while query was in flight (not completed in link chain)

Describe the bug
I regularly receive the ApolloError: "Store reset while query was in flight (not completed in link chain)".
This seems to be intermittent, and subsequent queries still work.
I can't figure out how to reproduce it.
To Reproduce
I do not know the cause.
Expected behavior
The ability to make Apollo queries & mutations at any time.
Versions
nuxt: 2.10.2
vue-apollo: ^3.0.0
Additional context
I believe I am making all queries with a single Apollo Client instance.

If it happens inside the onError you might be need to wait until all the queries are completed with the following code:
                      await apolloProvider.defaultClient.queryManager.fetchQueryRejectFns;
                      await apolloProvider.defaultClient.resetStore();

Hi @dmitry  i am getting this error from my error hook, what do you suggest to prevent this?

@pouyamiralayi any details, code? Are you calling the resetStore function?

hi @dmitry  my environment is as same as @firstaml-dima. i am using smart-queries and i am using clearStore inside below code which is placed in my apollo default config file:
const errorLink = onError(({graphQLErrors, networkError}) => {
    try{
      if (graphQLErrors)
        graphQLErrors.map(async ({message, locations, path}) => {
          if(message.toLowerCase().includes("user not found")){
            const client = context.app.apolloProvider.defaultClient
            await client.clearStore()
            context.store.commit('auth/logout')
            context.app.router.push("/")
          }
          console.log(
            `[GraphQL error]: Message: ${message}, Location: ${JSON.stringify(locations)}, Path: ${JSON.stringify(path)}`
          )
        }

        )
    }
    catch (e) {
      console.log("errorLink: ", e)
    }
  })

worth mentioning that i am not getting this error from the above code (based on my console logs) but i am getting this error while i am starting or re fetching smart queries. my app was fine before i add the above code to my config file. as you said, it might be from clearing the store. i have already applied your suggestion but it does not work for me (basically as i said i am not getting the error at above). btw my queries are working fine even with this issue but the trouble is that i change my ui based on the error hook behavior and that is causing me some pain. ;)
cheers!

So you have tried to do the following:
const client = context.app.apolloProvider.defaultClient
await client.queryManager.fetchQueryRejectFns;
await client.clearStore()

and it still doesn't work without an exception?

Hi! i have applied your suggestion snippet every time i want to start or  re fetch the smart queries, and since then the number of times that i have seen that error is reduced to 1, only when i start the query for the first time; and that is tolerable. thanks @dmitry
i know that queries each have a separate cache (forgive me here if i am wrong!) but i guess that cache is not aware of the components life cycle.
cheers!

@pouyamiralayi what kind of cache do you mean? You can control cache via fetchPolicy.

Yes dear @dmitry i just realized that when the query is completed (ui has been updated by the results) and i make a transition to another page (router push), this error happens!
from apollo's perspective it seems that even i have the result in my cache, but it is still doing something in the background and by making transitions it will be interrupted!
for the fetchPolicy you suggested i set it to no-cache but nothing changed so i guess this is not a cache related issue, sorry for my misunderstanding.
cheers!

authors: dmitry firstaml-dima pouyamiralayi

repo: vuejs/vue-apollo


text:
Escape code in vue ui page

Version
3.0.0-rc.10
Node and OS info
node v10.7.0 / yarn 1.9.2 / macOS 10.13.3
Steps to reproduce

vue ui and open the page
create a new project
choose 'Manual' in 'Presets' step
enable 'Router' in 'Features' step and click 'Next'

In 'Configuration' step, the prompt of router will be:  Use history mode for router? [33m(Requires proper server setup for index fallback in production)[39m  .
What is expected?
Use history mode for router? (Requires proper server setup for index fallback in production)
What is actually happening?
Use history mode for router? [33m(Requires proper server setup for index fallback in production)[39m

@Akryum I think we need to handle potential color codes in UI (maybe strip-ansi?)

Closed in 8c96c15682e9f616aa0f027185f3705a3ab66b81

authors: Akryum run-ze yyx990803

repo: vuejs/vue-cli


text:
Import css error in a project created with yarn workspaces

Version
3.0.3
Reproduction link
https://github.com/mqhe2007/error-yarn-workspaces
Node and OS info
Node 8.11.2/ yarn 1.9.4 / macOS 10.13.6
Steps to reproduce
in project root directory run:

yarn install
yarn workspace frame run serve

What is expected?
no error
What is actually happening?

used iView ui

As a workaround, add these lines to vue.config.js
module.exports = {
  css: {
    loaderOptions: {
      postcss: {
        path: __dirname
      }
    }
  }
}

@sodatea 果然是配置问题，但是当时没有找到具体改哪个地方，非常感谢！Thank you very much!

@sodatea, you just saved me from a major migraine after running around in circles trying to solve this issue. Thank you so much 👍

authors: EnSabanNur mqhe2007 sodatea


text:
'vue' is not recognized as an internal or external command on windows

Node version : v6.9.5
npm version: 3.10.10
vue version: vue@2.1.10
vue-cli version: vue-cli@2.8.1

Commands fired
npm install -g vue-cli
npm install -g vue
vue install wepack test
Following error is thrown
'vue' is not recognized as an internal or external command,
operable program or batch file.
Tried workouts (but same failure result)

npm unistall -g vue-cli ➡npm install -g vue-cli
npm cache clean

npm install -g vue

That's not necessary 🙂 It installs the vue packages
You're probably missing the the bin path. You can find some help here: http://stackoverflow.com/questions/27864040/fixing-npm-path-in-windows-8

@posva Thanks for the spontaneous reply :+1:
This thread solved the issue from the same page :arrow_down:
http://stackoverflow.com/a/32159233/5133699
Thanks a lot!

Thanks for sharing it! It may help other people

It's just add in your variable path of windows the path of Vue.js

Hi,
I'm having the same issue, I've set up: System > Enviroment Variables > System Variables > Path >
C:\Users\Admin\AppData\Roaming\npm\node_modules\vue-cli\bin
npm install -g vue-cli, looks to have installed the files in the AppData folder.
I'm running the following:
node -v
v8.1.2
npm --version
5.0.4
Windows 10.
I'm getting the following error: 'vue' is not recognized as an internal or external command,
operable program or batch file.
I followed the same idea and got the zf cli working by adding the bin to the path in Enviroment Variables, not sure why this isn't working.
Can someone advise on what I'm missing.

A fix for the issue, that worked for me.
On the Vue JS website the following is used to install vue-cli
install vue-cli
$ npm install --global vue-cli
create a new project using the "webpack" template
$ vue init webpack my-project
install dependencies and go!
$ cd my-project
$ npm install
$ npm run dev
Instead of installing: npm install --global vue-cli
I used: yarn global add vue-cli
Before I did the above, I uninstalled node js version v8.1.2 and installed the recommended version v6.11.0 (not sure this really made a difference, but it was part of what I did). Then I reinstalled Git from the Git website using the downloadable installer.

I had the same issue.
Here the quick fix.
after running the following command
npm install --global vue-cli
It will place the vue.cmd in the following directory
C:\Users\YourUserName\AppData\Roaming\npm
at least for me it's there.
To use vue as command in cmd. Open the cmd as admin and the the following command.
setx /M path "%path%;%appdata%\npm"
Now restart the cmd and run the vue again. It should work just fine.

thanks hujjat. you saved a life.

hi @Hujjat i have no vue.cmd inside by /AppData/Roaming/npm after installing vue-cli. How to fix this?
I already follow all the instruction above, nothing works for me

@gohance Do you have npm ? you must face any error if it's not working for you ???

@Hujjat is awesome.. in my case command: setx /M path "%path%;%appdata%\npm" first did not work for me.. then i gave path to Path then it works properly.. my final command was. etx /M Path "%path%;%appdata%\npm" . it is just for your environment variables.. it may be Path or path just see what it is in your pc.. and if not create one . using Path or path. and use 1)setx /M path "%path%;%appdata%\npm" or 2)setx /M Path "%path%;%appdata%\npm"

@suvrodattamitu thanks for posting that. I was trying everything from the start and saw your comment when nothing actually worked for me. Then I went back and changed the variable path from 'PATH' to 'path' which worked like a charm. Didn't realize that case sensitive would be such a big deal. Glad I saw your comment, cheers!

Thanks @Hujjat !

I've read and found that running npm config set prefix /usr/local then re-running npm install -g vue-cli has fixed my issue? Not sure whether this was necessary though?

I am running a windows 8.1 64bit architecture.
This problem seems to be cos I used a combo of nvm-windows and Yarn.
I installed nvm-windows
Then Installed node version 8
Then Yarn
Then used Yarn to install Vue-cli
Then when I do 'vue --version' it throws an error : vue is not recognized as an internal ...
My current fix is installing vue-cli via npm instead of Yarn.

thanks @Hujjat

Keep in mind that the package is no longer vue-cli.
Use:
npm install -g @vue/cli

delete "node_modules" folder
run - npm install

I had the same issue.
Here the quick fix.
after running the following command (as Admin)
npm install --global vue-cli
It will place the vue.cmd in the following directory
C:\Users\YourUserName\AppData\Roaming\npm
at least for me it's there.
To use vue as command in cmd. Open the cmd as admin and run the the following command.
setx /M path "%path%;%appdata%\npm"
Now restart the cmd and run the vue again. It should work just fine.

Thank you so much! I debugged this for 2 hrs and this was very very helpful. Thanks again.

thanks too
On Sun, Mar 17, 2019 at 11:45 PM palakvasani notifications@github.com
wrote:

I had the same issue.
Here the quick fix.
after running the following command (as Admin)
npm install --global vue-cli
It will place the vue.cmd in the following directory
C:\Users\YourUserName\AppData\Roaming\npm
at least for me it's there.
To use vue as command in cmd. Open the cmd as admin and run the the
following command.
setx /M path "%path%;%appdata%\npm"
Now restart the cmd and run the vue again. It should work just fine.
Thank you so much! I debugged this for 2 hrs and this was very very
helpful. Thanks again.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/vuejs/vue-cli/issues/347#issuecomment-473688443, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ASWZ_IwnDu_tMymtK6_4nVqP0Ky2VkNaks5vXn8pgaJpZM4L-NlJ
.

I had the same issue.
Here the quick fix.
after running the following command (as Admin)
npm install --global vue-cli
It will place the vue.cmd in the following directory
C:\Users\YourUserName\AppData\Roaming\npm
at least for me it's there.
To use vue as command in cmd. Open the cmd as admin and run the the following command.
setx /M path "%path%;%appdata%\npm"
Now restart the cmd and run the vue again. It should work just fine.

Thank you so much! I debugged this for 2 hrs and this was very very helpful. Thanks again.

Works very well!!! TKS

If you are using yarn, C:\Users\{username}\AppData\Local\Yarn\bin also needs to be in PATH.

That is what I was missing @xzyaoi

To use vue as command in cmd. Open the cmd as admin and run the the following command.
setx /M path "%path%;%appdata%\npm"
Now restart the cmd and run the vue again. It should work just fine.

You need to make it clear that this command will completely replace everything in PATH

I had the same issue.
Here the quick fix.
after running the following command (as Admin)
npm install --global vue-cli
It will place the vue.cmd in the following directory
C:\Users\YourUserName\AppData\Roaming\npm
at least for me it's there.
To use vue as command in cmd. Open the cmd as admin and run the the following command.
setx /M path "%path%;%appdata%\npm"
Now restart the cmd and run the vue again. It should work just fine.

Thank you very much!!

Been reading through all these comments. Seems this one solution is a fix.
setx /M path "%path%;%appdata%\npm" .. THIS DOES NOT WORK.
Anyone else try anything else with success?

Thanks Hujjat and yinka7 ...I had this problem but with your help fix.

Thanks Hujjat and yinka7 ...I had this problem but with your help fix.

Just for information, If you are using yarn, C:\Users\{username}\AppData\Local\Yarn\bin also needs to be in PATH.

how then do I set this path please? I've been struggling with it but no help. I installed vue with yarn

Hujjat's answer is from 2017,
´npm install --global vue-cli´ will install vue cli 2, for cli 3 use ´npm install -g @vue/cli´

@Lazy-poet If you are still struggling with this, take a look at https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/
A quick google search on how to set path on windows should help.

I had the same issue. Here the quick fix.
after running the following command (as Admin) npm install --global vue-cli
It will place the vue.cmd in the following directory C:\Users\YourUserName\AppData\Roaming\npm
at least for me it's there.
To use vue as command in cmd. Open the cmd as admin and run the the following command. setx /M path "%path%;%appdata%\npm"
Now restart the cmd and run the vue again. It should work just fine.

Dude what the ...!please test and then answer!!!! dont run the last command its erase all your paths in environment variables windows 10!

Just for information, If you are using yarn, C:\Users\{username}\AppData\Local\Yarn\bin also needs to be in PATH.

Thank you soy much!

Thank you.
I found very happy line of code by you.

thank u

authors: Adxell Alphapluse AntonShumin CelticParser Daltimore Hujjat Lazy-poet SimeonVSimeonov TimonDev0220 aankittcoolest alanlcardoso alfiesalano001 amulyachennaboyena colinlancasterodoe fede-2110 fernandoSalome frequency-design gohance ialirezaei mockingloris palakvasani posva rodolfoberlezi suvrodattamitu swapmeet25 web-developer1 xzyaoi yinca7 zahafyou


text:
4.0 not yet available on npmjs.com

Just got a release alert for 4.0.. wtg on the long awaited launch!
Tried following the migration guide and npm install -g @vue/cli still installed 3.12
I guess that's because 4.0 is not yet published on https://www.npmjs.com/package/@vue/cli

Thanks for the report!
There was a bug in the release script that incorrectly set the dist-tag to next. I've manually added the packages to the latest dist-tag now.

no problem! I guess it takes a while before it propagates? It's still not updated on npmjs.com

Isn't it? On my side, it's all updated.

hrmm.. it is? I just checked again on https://www.npmjs.com/package/@vue/cli.. using incognito to make sure it isn't cached

Weird…
Here's what I saw:

hrmm. very weird indeed
I just tried running npm install -g @vue/cli again and unlike before where it just installed 3.12, this time I got this error:
npm install -g @vue/cli
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @vue/cli-ui-addon-widgets@^4.0.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of '@vue/cli'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/redacted/.npm/_logs/2019-10-16T13_05_09_432Z-debug.log

I have the exact same error, fwiw

after running npm remove -g @vue/cli and then again npm install -g @vue/cli I am now on @vue/cli@4.0.1

Maybe NPM needs the new package to propagate through some caching layer to make it to different people in different parts of the globe. It looks like @vue/cli-ui-addon-widgets@4.0.1 got published just 40 minutes ago.

authors: shaqq sodatea vesper8


text:
Empty devtools tab content after latest update

Hi
Weird thing after latest update (3.0.1 from the chrome web store) - the devtools tab content is empty for me:

95341fde886de7285e45611aeb689fd878653047 didn't have this problem. In next commits I started to get an error during npm run build ("localStorage is not defined"), so I'm not sure from which commit the problem started.
I'm on Debian Stretch, Chrome 55.0.2883.87.

Similar for me, just a plain white box during npm run dev on devtools 3.0.1
macOS Sierra 10.12.2, Chrome 55.0.2883.95

@ksdev-pl are you building this from source yourself or are you just using it over the Chrome web store?

I have removed the unpacked extension that I've used and installed the devtools from chrome web store. The tab with this extension was empty, so to check what is happening I've disabled the extension from chrome web store, cloned the repository and npm run dev it to load unpacked extension. The unpacked extension also was empty. So I started to checkout commits to see which one is last working; the 95341fd works for sure, in next commit I've had a problem during build.

The npm run dev on master looks correctly for me on http://localhost:8080/, but when I npm run build on master and load unpacked extension (or use the extension from chrome web store), the tab is empty.

It most likely has to do with your application. Try replacing shells/dev/target with your application (may need configuration changes) and then npm run dev to see what errors you get.

I thought about that - so I've removed the unpacked extension again and installed official extension from the chrome shop - and used it on https://vuejs.org. Still the tab content is empty.
Maybe it's just some hard to debug problem related to my configuration, let's wait. I can try to debug it of course, I just need some tips what to do because I don't know much about debugging chrome extensions (I will try what you have written with shells/dev/target to be sure).

Hmm that's weird indeed, I'm suspecting it maybe a different issue from what @quagliero is running into. Maybe something with Linux Chrome only...

It doesn't work for me even on the https://vuejs.org/v2/guide/ site. Must be browser or ad blocker related then, rather than something within my own application.

Can be, I will install the devtools on windows and on another linux vm and will let you know.

Do you happen to have any sort of security settings that prevents access to localStorage?

Ublock origin + ublock origin extra, but I've disabled them to test if it is related, without success. But maybe it's something else? I need some time to check it in a pure chrome on another linux. In windows 10 chrome it works without problem.

@yyx990803 Yeah, just figured it out. Chrome's "block 3rd party cookies and site data" will prevent it from working. Untick and all is fine.. so may have to add an exception for it (if possible).

Thank you quagliero! It works.
But it would be nice to have a possibility to block the third party cookies ;) Or maybe exceptions will work, indeed, must try.

Yeah I think I just need to add a try catch for localStorage access.

Thanks @yyx990803 👍

Sorry, did not see the question. After update it works with third-party blocked, thanks!

authors: ksdev-pl quagliero yyx990803

repo: vuejs/vue-devtools


text:
Vuex: keep inspected mutation selected if there is a new mutation

Version
5.0.3
Browser and OS info
Chrome / Windows 10
Steps to reproduce

Create a Vuex enabled App
In a created component, create an setInterval that updates the state via a mutation at a regular interval
Try to inspect the Vuex state

What is expected?
If an entry in the vuex log is explicitly clicked on to be inspected, it shouldn't be changed due to a mutation.
What is actually happening?
When a mutation occurs the 'inspected' Vuex item is updated to the latest value

I added a screen capture of what is occurring here: https://imgur.com/a/QfKAI9N

The screen capture

IMHO Seems more like a bug than an enhancement, since viewing state is pretty much unusable, and it’s also a regression of behaviorfrom prior dev tools version.

I have to agree with @jacobg
Our only solution at the moment is to disable the time based features of our app in order to get any use out of the Vuex tab.

@jacobg Git agrees with me that the inspected mutation was always reset to the last one when a mutation was received, even 2 years ago 😸

@Akryum Thanks for resolving. I thought I remember in the old version I could look at state even when new mutations come in. Perhaps the state was getting updated with new mutations. The current version changes to Loading State spinner when new mutation comes in.

@jacobg I think your are talking about something different, OP was about selecting a mutation other than the last one and keeping it selected when a new mutation is received.

authors: Akryum jacobg robodude


text:
Error: Component is missing template or render function.

Error:
[Vue warn]: Component is missing template or render function.
  at <Anonymous ref="VTU_COMPONENT" >
  at <VTUROOT>

My setup (simplified):
import test from 'ava'
import { mount } from '@vue/test-utils'
import { createApp } from 'vue/dist/vue.cjs.js'

test('expected behaviour computed prop lifecycle - no reactivity', async t => {
  const vue = createApp({
    template: `<pre>{{ myComputed }}</pre>`,
    computed: {
      myComputed () {
        return 1
      },
    },
  })
  const wrapper = mount(vue)
  // @ts-ignore
  console.log(`wrapper.vm.myComputed → `, wrapper.vm.myComputed)
})

Reproduction:
git clone https://github.com/vue-sync/simple-store
cd simple-store
npm i
npm run test test/internal/vueComputed.ts

Please let me know if I need to give more background or explain what it is exactly what I'm trying to do and why!

Hi! 👋  VTU-next is creating the App for you, so I think you should use defineComponent (example) instead of createApp.
Let me know if that helped!

@afontcu that worked!
is there anywhere I can contribute this knowledge to the vue-test-utils alpha for vue 3 docs?

Hi! I do believe content is mostly there: the example in Introduction shows how to pass a component to mount(), and so does the API docs for mount().

authors: afontcu mesqueeb

repo: vuejs/vue-test-utils-next


text:
field does not accept dynamic variables

When using the field attribute with v-validate, variables are not parsed as part of the field definition. Expressions are taken as static text instead and not parsed.

Can you share the reproduction codes with jsfiddle (or codepen ... etc) please?

will provide

Close (inactivity)

authors: kazupon uptownhr

repo: vuejs/vue-validator


text:
Vue.JS Cache Refresh if there's new update in production

What problem does this feature solve?
Good day,
I'm trying to find a solution if there's a package or practice on implementing cache refresh whenever I release a new version in the production. Any help please?
What does the proposed API look like?
Good day,
I'm trying to find a solution if there's a package or practice on implementing cache refresh whenever I release a new version in the production. Any help please?

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.

authors: ethlyseria posva

repo: vuejs/vue


text:
Can't signup on vuejs forum

Vue.js version
2.0.2
Reproduction Link

Steps to reproduce

Go to https://forum.vuejs.org
Try to signup with github account.

What is Expected?
I should be able to sign up for forum.
What is actually happening?
Getting following error:

Could not file a repo for codebase for https://forum.vuejs.org/, so filing the issue here.

I can confirm the issue.
Scott

Do you have a public email address associated with your GitHub account?

@yyx990803 I have selected "Don't show public email" in my github account settings.

Couple of folks in Gitter channel also confirmed the issue happening for them.

Can also confirm this issue. I'm guessing by your comment @yyx990803 that we need to have a public email address in order to sign up using GitHub?

It may have to do with the auth callback URL not using HTTPS - I just updated the settings, can you try again?

Works fine for me now. Thanks @yyx990803!

Worked. @yyx990803

I think it's fixed now, ref: https://github.com/vuejs/vue/issues/4734

authors: g-patel liam-potter smolinari sqal yyx990803


text:
Need types for Vue v1.0.28 and Typescript v1.8.5

What problem does this feature solve?
My project need to use Typescript v1.8.5 and Vue v1.0.28, but I can't find a typed interface to use.
Anyone who use similar feature, could "pull request" this feature (I thought someone might have these files)
Sorry for my english and if I can help with these implementation files, contact me!
What does the proposed API look like?
In Vue2, a folder "types" contains types for this version. Something Similar?

Sorry, but Vue 1 is now in maintenance mode and will only receive critical/security bug fixes. Typing Vue 1 (which itself has un-typed source code) is considerable amount of work and unlikely to be a priority for the team. We are obviously open to community contribution if anyone wants to do it though.


text:
Fix: Demystified markdown logic

I have changes jsfiddle link with a similar jsfiddle.
The difference between two jsfiddle is in javascript code, marked() has a comment mentioning its source as external library.
This is important because it is easy to overlook that marked() comes from an external library instead of Vue, especially for a beginner.

Good idea! I made a slight modification: added the dependencies to the HTML, so that it would be more apparent that we're using external libraries here.

authors: chrisvfritz prog-rajkamal


text:
docs(README.md): fix grammar typo

This PR fixes a tiny grammar typo.

Thanks for your contribution 🙂

authors: devCrossNet manuasir

repo: vuesion/vuesion


text:
Prevent creating a new swapchain from a stale one

This pull request prevents creating a swapchain from an old one, if the old one has already been used to recreate another one.
It does so by checking the swapchain.stale property, and sets it correctly. Also added a new SwapchainCreationError::OldSwapchainAlreadyUsed error to report this situation.
Fixes #735.

Thanks for the PR.
Please add a comment saying something like this:

According to the documentation of VkSwapchainCreateInfoKHR:

Upon calling vkCreateSwapchainKHR with a oldSwapchain that is not VK_NULL_HANDLE, any images not acquired by the application may be freed by the implementation, which may occur even if creation of the new swapchain fails.
Therefore we set stale to true and keep it to true even if vkCreateSwapchain fails.

Done, added the comment and also updated the docs with the information.

authors: GabrielMajeri tomaka

repo: vulkano-rs/vulkano


text:
./toolchain-wrapper: cannot execute: required file not found

Steps I ran:
./scripts/build_toolchain --skip-install-pkgs
./scripts/cmake_run -DTERM_BIG_SCROLL_BUF=1 -DKERNEL_SHOW_LOGO=0
make -j12
I get this output:
/bin/sh: /root/tilck-master/toolchain2/host/gcc_8_4_0_i386_musl/bin/i686-linux-gcc: not found
Which is actually the command 'toolchain-wrapper' being run with the error message: ./toolchain-wrapper: cannot execute: required file not found

Hello @pantantrant, I guess that the error is self explanatory: the cross compiler is missing. Also, you run the ‘build_toolchain’ with the option to skill the installation of the system dependencies. Did you at least once run that script without any options first? Also, Tilck has no toolchain-wrapper script. That must be part of your scripts. I cannot debug that.

@pantantrant I took a 2nd look and searched for toolchain-wrapper in Tilck just in case. Yeah, it's a binary in the GCC toolchain, not in my project. It looks like you simply don't have a GCC toolchain downloaded or you deleted it. I don't know.
To be super sure, just delete the whole toolchain2 directory, checkout the repo to the master branch and start over again. Run ./scripts/build_toolchain without any arguments and let it install what it needs. Then run ./scripts/cmake_run and so on.
Also note, there are many good reasons for me to ask all the questions in the issue template for the bug report: https://github.com/vvaltchev/tilck/blob/master/.github/ISSUE_TEMPLATE/bug_report.md
People do all sort of mistakes and have all the sort of weird system configurations. If you don't answer all the questions, I cannot tell you more.

authors: pantantrant vvaltchev

repo: vvaltchev/tilck


text:
Multi Chain Block Explorer

FYI we're hoping that our bounty in the Polkadot North American Hackathon will allow us to incubate a team that can solve the current RFP for the multi chain explorer

That's great to hear! We recently had a couple of teams showing interest in implementing it, but none have applied, as far as I remember. Let us know if you need help applying: grants at web3.foundation

We have one application, see https://github.com/w3f/Grants-Program/pull/1039 But we would definitely be willing to support additional implementations. Let me know if you have any questions, apart from this I’m closing the issue.

authors: Noc2 jamesbayly semuelle


text:
Level 1 application for MintoCrypto

Project Abstract
Turn your ideas into investments with MintoCrypto. Ideas are essential to the tech industry. But ideas are just as fragile as they are valuable. We want to disrupt the market with MintoCrypto aims to make it easy for anyone to mint their idea, a trademark, a phrase, or even a new feature for an existing product on the block chain.
Grant level

[x] Level 1:  Up to $10,000, 2 approvals
[ ] Level 2:  Up to $30,000, 3 approvals
[ ] Level 3:  Unlimited, 5 approvals (for >$100k: Web3 Foundation Council approval)

Application Checklist

[x] The application template has been copied and aptly renamed (project_name.md).
[x] I have read the application guidelines.
[x] A BTC, Ethereum (USDT/USDC/DAI) or Polkadot/Kusama (aUSD) address for the payment of the milestones is provided inside the application.
[x] The software delivered for this grant will be released under an open-source license specified in the application.
[x] The initial PR contains only one commit (squash and force-push if needed).
[x] The grant will only be announced once the first milestone has been accepted (see the announcement guidelines).
[x] I prefer the discussion of this application to take place in a private Element/Matrix channel. My username is: @therealroomio:matrix.org

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

I’m closing this due to inactivity. Let me know if you want to re-open it.

authors: CLAassistant Noc2 therealroomio


text:
Accounting

Could you add an output.csv which summarises the payouts with 3 columns: Address, Amount, txid - This would make it easy for me to report how the funds were used.
Thanks!

@lamafab FYI


text:
Color for empty values

Hi,
if I load my data with unset value (null) and if I set a lengendColors such as:
legendColors: { min: "red",
max: "blue",
empty: "grey" }
the cell with null value are not filled properly.
But it works if in addStyle function I add an extra check (d.v === 0 || d.v === null)
such as:
if ((d.v === 0 || d.v === null) && options.legendColors !== null && options.legendColors.hasOwnProperty("empty"))
I hope I didn't misunderstood how lengendColors works.
Regards
Marc

@marcopovitch
I encountered this bug today and use this code to set the rest rect to grey or whatever color u want.
$(".graph>svg>svg>g>rect:not(.r1,.r2,.r3,.r4,.r5)").css("fill","#ededed")
Hope it's useful for u

If anyone is still interested on this, this was my solution.
css:
rect.r0 {
    fill: #ededed;
}

authors: andresDarriens marcopovitch vlux


text:
🛑 Wayback Archiver is down

In 559d753, Wayback Archiver (https://wabarc.eu.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Wayback Archiver is back up in 2e8073e.

repo: wabarc/status


text:
Added CMake Support

I am using your library in several projects with CMake and therefore added CMake support. I thought this might be interesting for you as well, so here we go ;)
Tested on Windows with MSVC16.

Thanks!

authors: LeStahL waddlesplash

repo: waddlesplash/QMidi


text:
trading.py: fix get_today_ticks()

Signed-off-by: Ning Yao zay11022@gmail.com

close this PR, since it is already fix in master

repo: waditu/tushare


text:
Use different response types

So, looks like openapi supports using a schema for error types, including different schemas for each error code.
See: https://swagger.io/docs/specification/2-0/describing-responses/
I can see we can add error descriptions as per: https://paperclip.waffles.space/actix-status-codes.html
Looking at the code doesn't look like we can do it but I'll ask anyway in case I missed it:
Is it possible to add a type to the error?
Can we specify a type for each status code?

@dunnock would you happen to know?

Ok so after having a better look, looks like it really doesn't exist.
Missing things:

ability to add error codes not just to an error type but to a handler
Why? If we have a generic error type, will all the possible error codes, then all handlers will report an error response which may not make sense for a given handler.
ability to associate an error type with the status code/description pair which gets added to the response, allowing us to send back errors with additional information in the body

Any thoughts?

I got a noddy example going with adding response codes to the handler. I wonder if that work in isolation, as in, not related to the api_v2_errors, or if that should work as a "filter".
Eg, if no responses are specified in the handler then you get all the error codes from your error type; if response codes are specified in the handler then those codes are the only ones from the error type that actually make it into the spec?

I've raised #307 to experiment. Here's how the error type works now:
#[api_v2_errors(
    code = 400,
    code = 401,
    description = "Unauthorized: Can't read session from header",
    code = 500,
    scheme = "RestError2",
    code = 404,
   // default_scheme = "ErrorFormat
)]
pub struct Error { ... }

And of course Error format must impl the schema:
#[derive(Apiv2Schema)]
pub struct ErrorFormat { ... }

The resulting response:
"responses": {"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Nexus"}}},"201":{},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized: Can't read session from header"},"404":{"description":"Not Found"},"500":{"schema":{"$ref":"#/definitions/ErrorFormat"}}

👍

Would it be possible to do something like the overloads for Json like JsonCreated used in response part?

I haven't really used those Json types, but do you mean having an error wrapper type for the actual error, eg: Response<Json, Error> ?

Yes, something like that. If I've understood properly the Json and CreatedJson etc classes are basically type wrappers which provide more type information hints to the introspection engine.

In the error case it may need to be a union object of some type because of the possibility of returning one of several different codes

It should be possible to provide a macro that receives the codes/descriptions/schemes and creates a type similar to those you mentioned, eg:
    #[api_v2_error_overlay(
        400,
        description = "Sorry, bad request",
        code = 401,
        code = 403,
        schema = "PetErrorScheme1",
        description = "Forbidden, go away",
        500,
        description = "Internal Server Error",
        default_schema = "PetErrorScheme2"
    )]
    #[derive(Debug)]
    struct MyErrorOverlay {} // gets translated to struct MyErrorOverlay<T: HttpResponse + Ser + ...>(pub T);

    #[api_v2_operation]
    async fn echo_pet_with_errors(body: web::Json<Pet>) -> Result<web::Json<Pet>, MyErrorOverlay<PetError>> { }

The inner type must implement Serialize, HttpResponse and perhaps even Apiv2Error.

Here's my wip: https://github.com/wafflespeanut/paperclip/pull/307/commits/097de616bf7aa379812a369e39f7da8d916d8c8d.
It works, now we I just need to filter out the error codes.

The alternative macros: One for a specific type and another for a generic
macro_rules! api_v2_error_overlay_filter_typed {
        ($error:ident - $($status:literal)+ => $name:ident) => {
            #[derive(Debug)]
            struct $name(pub $error);

            impl std::fmt::Display for $name {
                fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                    std::fmt::Display::fmt(&self.0, f)
                }
            }

            impl actix_web::error::ResponseError for $name {
                fn status_code(&self) -> actix_web::http::StatusCode {
                    self.0.status_code()
                }
                fn error_response(&self) -> actix_web::HttpResponse {
                    self.0.error_response()
                }
            }

            impl paperclip::v2::schema::Apiv2Errors for $name {
                const ERROR_MAP: &'static [(u16, &'static str)] = &[];
                fn update_error_definitions(op: &mut paperclip::v2::models::DefaultOperationRaw) {
                    $error::update_error_definitions(op);
                    for code in &[ $($status,)+ ] {
                        op.responses.remove(&code.to_string());
                    }
                }
                fn update_definitions(
                    map: &mut std::collections::BTreeMap<
                        String,
                        paperclip::v2::models::DefaultSchemaRaw,
                    >,
                ) {
                    $error::update_definitions(map);
                }
            }
        };
    }
    macro_rules! api_v2_error_overlay_filter {
        (- $($status:literal)+ => $name:ident) => {
            #[derive(Debug)]
            struct $name<T: actix_web::error::ResponseError + paperclip::v2::schema::Apiv2Errors>(pub T);

            impl<T: actix_web::error::ResponseError + paperclip::v2::schema::Apiv2Errors> std::fmt::Display for $name<T> {
                fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                    std::fmt::Display::fmt(&self.0, f)
                }
            }

            impl<T: actix_web::error::ResponseError + paperclip::v2::schema::Apiv2Errors> actix_web::error::ResponseError for $name<T> {
                fn status_code(&self) -> actix_web::http::StatusCode {
                    self.0.status_code()
                }
                fn error_response(&self) -> actix_web::HttpResponse {
                    self.0.error_response()
                }
            }

            impl<T: actix_web::error::ResponseError + paperclip::v2::schema::Apiv2Errors> paperclip::v2::schema::Apiv2Errors for $name<T> {
                const ERROR_MAP: &'static [(u16, &'static str)] = &[];
                fn update_error_definitions(op: &mut paperclip::v2::models::DefaultOperationRaw) {
                    T::update_error_definitions(op);
                    for code in &[ $($status,)+ ] {
                        op.responses.remove(&code.to_string());
                    }
                }
                fn update_definitions(
                    map: &mut std::collections::BTreeMap<
                        String,
                        paperclip::v2::models::DefaultSchemaRaw,
                    >,
                ) {
                    T::update_definitions(map);
                }
            }
        };
    }

    api_v2_error_overlay_filter_typed!(PetError2 - 600 700 => PetErrorOverlay2);
    api_v2_error_overlay_filter!(-600 700 => PetErrorOverlay3);

@dunnock any input on whether this should be a proc-macro(https://github.com/wafflespeanut/paperclip/commit/097de616bf7aa379812a369e39f7da8d916d8c8d) or macro_rules macro (last comment)?

authors: cydergoth tiagolobocastro

repo: wafflespeanut/paperclip


text:
changes a indentation in file docs/index.rst

I am changed some python indentation in file docs/index.rst as a open source beginner

Hi @shubhadeepMH , I am going to close this PR. We should try to avoid commits that change indentation and formatting without justification and/or reproducibility. We will soon change the format of this documentation entirely (to markdown), and part of that will be adding a tool that automatically formats code snippets in line with the codebase's expectations. I encourage you to take a look at the issues, and see if you would like to make a contribution to them.

repo: wagtail/wagtail-factories


text:
V2 API Menu/Navigation endpoint

Curious if there are plans to implement an endpoint for menus.  As it is now I'm making recursive calls to the api and building out the menu that way. Is there a recommended way or any examples of handling menus in a headless setup?

Menus can be implemented in many different ways in Wagtail, so we haven't pushed for one particular method for the API.
If you want to build a menu from your page tree, I think the best way would be to fetch all the pages with &show_in_menus=true and build up the tree on the client side (By default, Wagtail API returns pages in Depth-first search order https://en.wikipedia.org/wiki/Depth-first_search).
Currently, it's not possible to limit the max depth so this method might not be a good fit if you have a deep hierachy and want to limit the number of tiers that appear in the main menu.

I'd like to take a long, hard look at the API, and maybe come up with a proposal for a somewhat cleaner and simpler version, based on the principles of HATEOAS. Maybe I should start a new version, say v3, next to v2, so as not to break stuff? Or is this a dumb idea anyway...

@ddokter It sounds like this might be a good candidate for an RFC... https://github.com/wagtail/rfcs

Okido. I'll play around a bit first, then come up with a proposal. Should I draft  new one? Given that there already is an API proposal in there?

Yep, it should be a new RFC - RFC8 is essentially about the introduction of the v2 API, and other proposed changes are handled in separate RFCs (RFC15 for example).

@gasman RFC 019 in da house. Pull request done on the wagtail/rfc repo.

Is there a way I can see that RFC? I only see up till the 18th one.

I’m unclear what there is to do here if anything, so will close this now. There’s certainly room for more API evolutions, some of which can be proposed as issues, or as RFCs. For menus specifically, I’d recommend following Define custom, hierarchical navigation menus #12470.

authors: Bulletninja ddokter gasman jmacaluso711 kaedroho thibaudcolas

repo: wagtail/wagtail


text:
before_delete_page unexpected behaviour

before_delete_page  hook runs on the confirm delete page, and before the real delete
Running a translation cleanup hook which deletes all translated pages runs before the confirmation. I expected this will run straight before the deletion and not before the confirm block.
So all my translated pages gets deleted even if i cancel, because the before_delete_page  hooks are running on the GET request (yea and afterwards on the POST again??)
@hooks.register('before_delete_page')
    def before_delete_page(request, page):
       ...
        page.specific.it_link.delete()
       ....

I think these are two completly different behaviours (before confirm and before delete). But they are mixed in one function.
I don't think the intend was to mirror the django before delete hook, but the naming is realy confusing.
Django Version: 2.0.2
Python Version: 3.6.1
Wagtail 2.0

The before_delete_page is indeed run on getting the confirmation page (GET call) and when actually deleting the page after confirmation (POST call).
My suggestion is to move both before_ and after_ to the POST call. And put the before_` call before the actual delete.
Maybe there can be put in another register tag on_conformation_delete_page that can be called when the conformation screen is opened? For now, i can't really see the point of having this, but maybe it can be useful in the future.
For this issue I think that last thing is out of scope. When needed, I think another ticket should be openend

The before/after_delete_page hooks are more for dealing with view-level workflow things - they were originally implemented as a way of providing a 'reduced' user level with a custom admin dashboard (the idea being that the hook would redirect them back to that custom dashboard, rather than going back to the explorer).
Any model-level handling, such as cleaning up translations, is better done through Django model signals - I don't think there's much value in replicating a mechanism that already exists in Django. (This could all be documented a lot better, I admit!)

authors: Nebulosar Speedy1991 gasman


text:
Calling add_error for a StreamField causes errors

Issue Summary
In a WagtailAdminPageForm subclass with a custom clean method, trying to use self.add_error with for a StreamField causes AttributeError 'NoneType' object has no attribute 'get'
Steps to Reproduce

Create a model (affects both django.db.models.Model and wagtail.core.models.Page subclasses) with an optional StreamField
Create a WagtailAdminPageForm with a clean method.
In the clean method call self.add_error with the name of the optional StreamField as the first arg.

Expected result:
I'd expect this to work like any other field, flagging the input as invalid and showing an error, and at least not cause a crash.
Actual result
AttributeError with the text 'NoneType' object has no attribute 'get'
and the line  {{ field|render_with_errors }} highlighted, see attached screenshot:

(This is with a Page model, but it works just the same with a normal model)
Technical details

Python version:  Python 3.6.8
Django version: 2.2.6
Wagtail version: 2.6.3
Browser version: Opera (but not relevant, as it's a crash in the backend)

A minimal example model and form that demonstrates the issue:
models.py:
from django.db import models
from django.utils.translation import ugettext_lazy as _
from wagtail.core.fields import StreamField
from django.core.exceptions import ValidationError
from wagtail.core import blocks
from wagtail.admin.edit_handlers import (
    FieldPanel,
    StreamFieldPanel,
    TabbedInterface,
    ObjectList,
)
from common.richtext import EXTENDED_RICHTEXT_FEATURES
from wagtail.admin.forms import WagtailAdminPageForm

class EventPageForm(WagtailAdminPageForm):

    def clean(self):
        cleaned_data = super().clean()
        title_nb = cleaned_data['title_nb']
        title_en = cleaned_data['title_en']
        content_nb = cleaned_data['content_nb']
        content_en = cleaned_data['content_en']

        # Make sure title and content exists for at least one language:
        if title_nb:
            if not content_nb:
                # THIS CAUSES THE ERROR
                # Fill in Norwegian title but not the content and save to trigger
                self.add_error('content_nb', _('This field is required.'))
                raise ValidationError([
                    ValidationError(_('You need to set a title and content for at least one language.')),
                ])
        elif title_en:
            if not content_en:
                # THIS CAUSES THE ERROR
                # Fill in English title but not the content and save to trigger
                self.add_error('content_en', _('This field is required.'))
                raise ValidationError([
                    ValidationError(_('You need to set a title and content for at least one language.')),
                ])

        else:
            # This works as expected:
            # Leave whole form blank to trigger
            self.add_error('title_nb', _('This field is required.'))
            self.add_error('title_en', _('This field is required.'))
            raise ValidationError([
                ValidationError(_('You need to set a title and content for at least one language.')),
            ])

        return cleaned_data

class Event(models.Model):

    active = models.BooleanField(verbose_name=_('active'), help_text=_('Check to publish'),)

    title_en = models.CharField(max_length=255, verbose_name=_('English title'), blank=True)
    title_nb = models.CharField(max_length=255, verbose_name=_('Norwegian title'), blank=True)

    COMMON_BLOCKS = [
        ('paragraph', blocks.RichTextBlock(label=_('Body text'), features=EXTENDED_RICHTEXT_FEATURES)),
    ]
    content_en = StreamField(COMMON_BLOCKS, verbose_name=_('content'), help_text=_('The main content of the page'), blank=True)

    content_nb = StreamField(COMMON_BLOCKS, verbose_name=_('content'), help_text=_('The main content of the page'), blank=True)

    common_panels = [
        FieldPanel('active'),
    ]
    en_panels = [
        FieldPanel('title_en'),
        StreamFieldPanel('content_en'),
    ]
    nb_panels = [
        FieldPanel('title_nb'),
        StreamFieldPanel('content_nb'),
    ]

    edit_handler = TabbedInterface([
        ObjectList(common_panels, heading=_('Metadata')),
        ObjectList(en_panels, heading=_('English')),
        ObjectList(nb_panels, heading=_('Norwegian')),
    ])

    base_form_class = EventPageForm

admin.py
from django.utils.translation import ugettext_lazy as _
from wagtail.contrib.modeladmin.options import (
    modeladmin_register,
    ModelAdmin,
)

from .models import Event

class EventAdming(ModelAdmin):
    model = Event
    menu_label = _('Events')
    list_display = ['title_en', 'title_nb']

modeladmin_register(EventAdming)

I think you also get the same error if you try to raise ValidationError inside a clean method of the model itself as well, cause that's the first thing I tried before rewriting using a WagtailAdminPageForm.
It seems to me the issue is with the StreamField or StreamFieldPanel when django tries to render it with custom errors, no matter how you set the custom errors.

I've run into this problem as well.

Possibly related to #5300 - validation errors thrown within StreamField blocks work on the assumption that the exception object passed to render_with_errors is the same one thrown by that block's clean method (which allows for the possibility of it stashing inner exceptions from child blocks in params), and it may well be that exceptions attached to the top-level StreamField object are being handled according to the same assumption.

This bug is still present on current Wagtail (5.0a0), but as of the Telepath rewrite in 2.13 the corresponding rendering code is client-side, and so it manifests as a Javascript error:
StreamBlock.js?5481:313 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
    at StreamBlock.setError (StreamBlock.js?5481:313:1)
    at new StreamBlock (StreamBlock.js?5481:182:1)
    at StreamBlockDefinition.render (StreamBlock.js?5481:346:1)
    at initBlockWidget (blocks.js?33ae:39:1)
    at (index):574:21

Specifically, BlockWidget.render_with_errors correctly recognises the presence of a validation error and telepath-serialises it to pass on the data-errors attribute, which is subsequently unpacked by the client-side StreamBlock class; only at this point does it fail because StreamBlock is expecting a StreamBlockValidationError.

authors: easherma gasman strindhaug


text:
When re-routing after deleting a page, wagtail-localize appends the locale pattern before /admin

I have a pretty standard wagtail-localize install. Whenever I delete a page in the admin interface, wagtail-localize routes me to that pages URL with the locale prepended. For example:

I delete the page at /admin/pages/1
It successfully deletes, but it brings me to /en/admin/pages/1 (with a 404)

Here is the relevant part of my root urls.py:
urlpatterns += i18n_patterns(
    path('search/', search_views.search, name='search'),
    url(r'^accounts/', include('allauth.urls')),
    path("", include(wagtail_urls)),
)

Thanks! this is a tricky one because it's actually Django's LocaleMiddleware doing this.
it intercepts 404 responses that don't have a locale prefix and redirects them to the URL with the prefix then checks if the locale-prefixed URL is a valid URL and forwards the user to that.
Normally, an app like Wagtail admin would fail this check since it's outside of i18n_patterns. However, Wagtail's catch-all URL at the end makes Django think this is valid, so redirects them anyway.
I feel like the only way to solve this would be to fork LocaleMiddleware and make it check if there's actually a published page there before redirecting? There might be a more elegant solution that I haven't thought of though!

The elegant solution is probably the same as https://github.com/wagtail/wagtail/pull/5806#issuecomment-623157402 - move Wagtail's URL routing into Django's URL resolution, so that paths that look like pages but aren't are identified during routing, rather than just throwing a 404 inside the wagtailcore_serve view.

authors: finnjbm gasman kaedroho


text:
🛑 Nextcloud platform is down

In 47a7679, Nextcloud platform (https://$NEXTCLOUD_HOST) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Nextcloud platform is back up in 2ce3ece after 11 minutes.

repo: waja/cyconet-upptime


text:
Crossing over some days causes number of days to be a decimal

Describe the bug
When showing the number of days it shows a decimal number of days over March 8th-9th 2019.
To Reproduce
Steps to reproduce the behaviour:

Go to https://wakirin.github.io/Litepicker/
Click on the date picker on the right.
Navigate until you see March 2020
Select March 8th as the start date and mouse over March 9th
See error

Expected behaviour
The days should show 2 days not 1.95 days
Screenshot
https://prnt.sc/q6n7w8

Hi,
check v1.0.16.
Math.round added to the diff function if the unit is days.
https://github.com/wakirin/Litepicker/blob/c5c5a92a7f251c8d52bcba2a7fc1da0f138c5c54/src/datetime.ts#L308

repo: wakirin/Litepicker


text:
Integrate Current Cost Envi data

https://github.com/guijemont/CucoLogger
https://github.com/greycubesgav/currentcost-envi
https://github.com/sanmi/powermon
https://github.com/mapkyca/Current-Cost-EnviR

I'm using Current-Cost-EnviR, but the problem I'm having is pretty fundamental. I can't see the device connected via USB. I ran cat /proc/bus/usb/devices both with and without the Envi plugged in, and it listed the same devices both times.

FWIW, the manufacturer is Prolific Technology Inc., the product ID is 0x2303, and the Vendor ID is 0x067b.

Ah-ha, here it is:
T:  Bus=01 Lev=01 Prnt=01 Port=99 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=067b ProdID=2303 Rev= 3.00
S:  Manufacturer=Prolific Technology Inc.
S:  Product=USB-Serial Controller
S:  SerialNumber=c6a3cfa3ccbecaa4cb88a8c4a5ccbedb
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=  10 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

I think it's /dev/usb1.1, because when I connect the cable, dmesg reports:
[47119.992719] usb 1-1: USB disconnect, device number 4
[47127.689134] usb 1-1: new full-speed USB device number 5 using ehci_marvell
[47127.874549] Got empty serial number. Generate serial number from product.

I gave up on installing this on my Synology, which is not /dev/ USB friendly, and set up powermon on a Raspberry Pi. Works great.

repo: waldoj/sound-of-sunshine


text:
Update BusinessWorker.php

fiexed ")"

thanks

authors: sky-L walkor

repo: walkor/workerman-chat