error: legacy-install-failure

WARNING: Ignoring invalid distribution -ffi (c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages)
WARNING: Ignoring invalid distribution -ffi (c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages)
Collecting pybluemonday
  Using cached pybluemonday-0.0.9.tar.gz (8.4 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: cffi~=1.1 in c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages (from pybluemonday) (1.15.1)
Requirement already satisfied: pycparser in c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages (from cffi~=1.1->pybluemonday) (2.20)
Building wheels for collected packages: pybluemonday
  Building wheel for pybluemonday (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [84 lines of output]
      uname_result(system='Windows', node='brix', release='10', version='10.0.18362', machine='AMD64', processor='Intel64 Family 6 Model 122 Stepping 1, GenuineIntel')
      make: *** No rule to make target 'clean'.  Stop.
      make: *** No rule to make target 'so'.  Stop.
        Stop.
      C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win32-cpython-38
      creating build\lib.win32-cpython-38\pybluemonday
      copying pybluemonday\__init__.py -> build\lib.win32-cpython-38\pybluemonday
      creating build\lib.win32-cpython-38\tests
      copying tests\test_memory_leaks.py -> build\lib.win32-cpython-38\tests
      copying tests\__init__.py -> build\lib.win32-cpython-38\tests
      creating build\lib.win32-cpython-38\tests\bluemonday
      copying tests\bluemonday\test_policies.py -> build\lib.win32-cpython-38\tests\bluemonday
      copying tests\bluemonday\test_sanitize.py -> build\lib.win32-cpython-38\tests\bluemonday
      copying tests\bluemonday\__init__.py -> build\lib.win32-cpython-38\tests\bluemonday
      creating build\lib.win32-cpython-38\tests\html_sanitizer
      copying tests\html_sanitizer\test_sanitize.py -> build\lib.win32-cpython-38\tests\html_sanitizer
      copying tests\html_sanitizer\__init__.py -> build\lib.win32-cpython-38\tests\html_sanitizer
      running build_ext
      $ GOPATH='C:\Users\user\AppData\Local\Temp\tmpxsp8wog7' go get -d
      $ CGO_CFLAGS='-IC:\Users\user\AppData\Local\Programs\Python\Python38-32\include -IC:\Users\user\AppData\Local\Programs\Python\Python38-32\Include' CGO_LDFLAGS='-LC:\Users\user\AppData\Local\Programs\Python\Python38-32\libs -lpython38' GOPATH='C:\Users\user\AppData\Local\Temp\tmpxsp8wog7' go build -buildmode=c-shared -o 'C:\Users\user\AppData\Local\Temp\pip-install-08xdknnw\pybluemonday_05c8b3035fc2444aae9eef8a37462acc\build\lib.win32-cpython-38\pybluemonday\bluemonday.cp38-win32.pyd'
      # runtime/cgo
      cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\user\AppData\Local\Temp\pip-install-08xdknnw\pybluemonday_05c8b3035fc2444aae9eef8a37462acc\setup.py", line 49, in <module>
          setuptools.setup(
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\dist.py", line 1208, in run_command
          super().run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wheel\bdist_wheel.py", line 325, in run
          self.run_command("build")
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\dist.py", line 1208, in run_command
          super().run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
          self.run_command(cmd_name)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\dist.py", line 1208, in run_command
          super().run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
          _build_ext.run(self)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
          self.build_extensions()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 468, in build_extensions
          self._build_extensions_serial()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 494, in _build_extensions_serial
          self.build_extension(ext)
        File "c:\users\user\appdata\local\temp\pip-install-08xdknnw\pybluemonday_05c8b3035fc2444aae9eef8a37462acc\.eggs\setuptools_golang-2.3.0-py3.8.egg\setuptools_golang.py", line 166, in build_extension
          _check_call(cmd_build, cwd=pkg_path, env=env)
        File "c:\users\user\appdata\local\temp\pip-install-08xdknnw\pybluemonday_05c8b3035fc2444aae9eef8a37462acc\.eggs\setuptools_golang-2.3.0-py3.8.egg\setuptools_golang.py", line 111, in _check_call
          subprocess.check_call(cmd, cwd=cwd, env=dict(os.environ, **env))
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '('go', 'build', '-buildmode=c-shared', '-o', 'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-08xdknnw\\pybluemonday_05c8b3035fc2444aae9eef8a37462acc\\build\\lib.win32-cpython-38\\pybluemonday\\bluemonday.cp38-win32.pyd')' returned non-zero exit status 2.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pybluemonday
  Running setup.py clean for pybluemonday
Failed to build pybluemonday
WARNING: Ignoring invalid distribution -ffi (c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages)
Installing collected packages: pybluemonday
  Running setup.py install for pybluemonday ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pybluemonday did not run successfully.
  │ exit code: 1
  ╰─> [88 lines of output]
      uname_result(system='Windows', node='brix', release='10', version='10.0.18362', machine='AMD64', processor='Intel64 Family 6 Model 122 Stepping 1, GenuineIntel')
      make: *** No rule to make target 'clean'.  Stop.
      make: *** No rule to make target 'so'.  Stop.
        Stop.
      C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win32-cpython-38
      creating build\lib.win32-cpython-38\pybluemonday
      copying pybluemonday\__init__.py -> build\lib.win32-cpython-38\pybluemonday
      creating build\lib.win32-cpython-38\tests
      copying tests\test_memory_leaks.py -> build\lib.win32-cpython-38\tests
      copying tests\__init__.py -> build\lib.win32-cpython-38\tests
      creating build\lib.win32-cpython-38\tests\bluemonday
      copying tests\bluemonday\test_policies.py -> build\lib.win32-cpython-38\tests\bluemonday
      copying tests\bluemonday\test_sanitize.py -> build\lib.win32-cpython-38\tests\bluemonday
      copying tests\bluemonday\__init__.py -> build\lib.win32-cpython-38\tests\bluemonday
      creating build\lib.win32-cpython-38\tests\html_sanitizer
      copying tests\html_sanitizer\test_sanitize.py -> build\lib.win32-cpython-38\tests\html_sanitizer
      copying tests\html_sanitizer\__init__.py -> build\lib.win32-cpython-38\tests\html_sanitizer
      running build_ext
      $ GOPATH='C:\Users\user\AppData\Local\Temp\tmp48a9ww70' go get -d
      $ CGO_CFLAGS='-IC:\Users\user\AppData\Local\Programs\Python\Python38-32\include -IC:\Users\user\AppData\Local\Programs\Python\Python38-32\Include' CGO_LDFLAGS='-LC:\Users\user\AppData\Local\Programs\Python\Python38-32\libs -lpython38' GOPATH='C:\Users\user\AppData\Local\Temp\tmp48a9ww70' go build -buildmode=c-shared -o 'C:\Users\user\AppData\Local\Temp\pip-install-08xdknnw\pybluemonday_05c8b3035fc2444aae9eef8a37462acc\build\lib.win32-cpython-38\pybluemonday\bluemonday.cp38-win32.pyd'
      # runtime/cgo
      cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\user\AppData\Local\Temp\pip-install-08xdknnw\pybluemonday_05c8b3035fc2444aae9eef8a37462acc\setup.py", line 49, in <module>
          setuptools.setup(
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\dist.py", line 1208, in run_command
          super().run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\command\install.py", line 68, in run
          return orig.install.run(self)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\command\install.py", line 698, in run
          self.run_command('build')
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\dist.py", line 1208, in run_command
          super().run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
          self.run_command(cmd_name)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\dist.py", line 1208, in run_command
          super().run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
          _build_ext.run(self)
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
          self.build_extensions()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 468, in build_extensions
          self._build_extensions_serial()
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 494, in _build_extensions_serial
          self.build_extension(ext)
        File "c:\users\user\appdata\local\temp\pip-install-08xdknnw\pybluemonday_05c8b3035fc2444aae9eef8a37462acc\.eggs\setuptools_golang-2.3.0-py3.8.egg\setuptools_golang.py", line 166, in build_extension
          _check_call(cmd_build, cwd=pkg_path, env=env)
        File "c:\users\user\appdata\local\temp\pip-install-08xdknnw\pybluemonday_05c8b3035fc2444aae9eef8a37462acc\.eggs\setuptools_golang-2.3.0-py3.8.egg\setuptools_golang.py", line 111, in _check_call
          subprocess.check_call(cmd, cwd=cwd, env=dict(os.environ, **env))
        File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '('go', 'build', '-buildmode=c-shared', '-o', 'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-08xdknnw\\pybluemonday_05c8b3035fc2444aae9eef8a37462acc\\build\\lib.win32-cpython-38\\pybluemonday\\bluemonday.cp38-win32.pyd')' returned non-zero exit status 2.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pybluemonday

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: Ignoring invalid distribution -ffi (c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages)
WARNING: Ignoring invalid distribution -ffi (c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages)
WARNING: Ignoring invalid distribution -ffi (c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages)

I fixed it when i turned python version from 3.12 to 3.10. But now i'm trying to fix another problem


[Feat] Sidebar Navigation menu

Description
Description:
The website would benefit from the addition of a collapsible sidebar navigation menu to improve the user experience. A collapsible sidebar provides users with easy access to different sections of the website while keeping the interface clean and uncluttered when not in use.
Suggested features for the collapsible sidebar:

Expandable categories and subcategories for better content organization.
A responsive design that adapts to different screen sizes (desktop and mobile).
Smooth animations for collapsing and expanding the sidebar.
An intuitive toggle button for users to show or hide the menu as needed.

Implementing this feature will streamline navigation, enhance accessibility, and provide a more modern, user-friendly design.
Please @mdazfar2 assign me this task with labels "GSSOC-Ext", "hacktoberfest-accepted" and "level2".
Screenshots
No response
Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I'm a GSSoC'24-Extd contributor
[X] I'm a Hacktoberfest'24 contributor
[X] I am willing to work on this issue (optional)

@archanasingh11 could me provide a screenshot of it

@archanasingh11 could me provide a screenshot of it

Are you a contributor or this project owner


vscode use subrocess,check_output 'utf-8' codec can't decode byte 0xd3 in position 79: invalid continuation byte error

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: 2024.4.1
OS Version: windows

Steps to Reproduce:
import subprocess
# import io
import sys
file_path = "./test.py"
open(file_path, 'w',encoding='utf-8').close()
code = "print('It is error')"
with open(file_path, 'w',encoding='utf-8') as fout:
            fout.write(code)
# 假设你有一个名为 script.bat (Windows) 或 script.sh (Linux) 的脚本文件
# 你需要确保这个脚本文件的路径是正确的
batcmd = 'timeout 7 ' + sys.executable + ' '+file_path  # 或者 './script.sh' 对于Linux
# batcmd = f'python3 {file_path}'
# 执行脚本文件，并获取输出结果
# 确保脚本文件有执行权限
try:
    # it is error
    output = subprocess.check_output(batcmd, shell=True).decode('utf8')
    # .decode('utf8')
    # it is error
    # output = subprocess.check_output(batcmd, shell=True).decode('utf8',errors = "ignore")
    print(output)
    print("It is OK 1")
except subprocess.CalledProcessError as e:
    # 'utf-8' codec can't decode byte 0xd3 in position 79: invalid continuation byte
    print(1,e)
    print(e.returncode)
    print(e.output)
    # print(e.output.decode(sys.getdefaultencoding()))
    # print(e.output.decode('gbk'))
    print(e.output.decode('utf8',errors = "ignore"))
except Exception as e:
    print(2,e)
# 将输出结果解码为 UTF-8 编码的文本
# 如果你预期脚本输出可能不是UTF-8编码，你可以添加错误处理参数
batcmd = 'echo It is OK 2'
output_echo = subprocess.check_output(batcmd, shell=True).decode('utf8')

print(output_echo)

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.88.1. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

@VSCodeTriageBot 你还需要改进。2024.4.1 比 1.88.1 更新。

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.88.1. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

No.AI. 2024.4.1 is a newer version than 1.88.1

This looks like an issue with your code. If you think it's an issue with vscode's python support, please file an issue on the python extension with more detail

This has nothing to do with my code. It's the issue with vscode code. Creating a new empty file also has this error. Firstly, even without adding or ignoring, this error should not have been reported. Secondly, if we add ignore, we shouldn't have this error even more

If I run these code in windows vscode. It is get
1 Command 'timeout 7 [d:\my\env\python3.10.10\python.exe](file:///D:/my/env/python3.10.10/python.exe) [./test.py](https://file+.vscode-resource.vscode-cdn.net/d%3A/my/work/test/python_test/test.py)' returned non-zero exit status 1.
1
b''

It is OK 2

It is error
If I run these code in wsl vscode. It is get.
It is error

It is OK 1
It is OK 2

It is True

vscode doesn't run your code, this sounds like an issue with your code, or python, or your configuration

@roblourens You didn't understand the reason for the problem. It is a bug related to reading file encoding. It is not related to running code. That's why I doubt vscode. Of course, it could also be an issue with Python 3.10.10


Add my first file

I have created a new branch, created a file, and made a commit!

I have completed the pull request and i have succefully merged my branch


Add timestamp to the batch report file

The timestamp is the modified time of the "artifacts"/ansible.log represented in the system's timezone.
Sample report file:
0 /path/to/rhel-system-roles.kernel_settings/tests/tests_bool_not_allowed.yml :: [ 01:25:19 ]
0 /path/to/rhel-system-roles.kernel_settings/tests/tests_change_settings.yml :: [ 01:26:35 ]

Sample output from testsuite:
:: [ 01:27:09 ] :: [   PASS   ] :: /path/to/rhel-system-roles.kernel_settings/tests/tests_bool_not_allowed.yml :: [ 01:25:19 ] (Expected 0, got 0)
:: [ 01:27:09 ] :: [   PASS   ] :: /path/to/rhel-system-roles.kernel_settings/tests/tests_change_settings.yml :: [ 01:26:35 ] (Expected 0, got 0)

@richm , @spetrosi, @xjezda00, @jharuda, could you please share your feedback about the above outputs?
Also... @richm, for some reason, the upstream testsuite fails unless commenting out this call:
https://github.com/nhosoi/tox-lsr/blob/timestamp/src/tox_lsr/test_scripts/runqemu.py#L1056. I tried to reproduce the failure by running this command-line tox -e qemu-ansible-core-2.12 -- --image-name rhel-8 --batch-file kernel_settings_batch.txt --batch-report kernel_settings_batch.report, but it was successful. Unfortunately, I cannot find any errors or stacktraces in the upstream testsuite results. Do you happen to know how to debug runqemu.py in the upstream testsuite?

What is the error?

Here it is...
:: [ 01:31:07 ] :: [  BEGIN   ] :: Test kernel_settings (/tmp/tmp.yGHyJZzeJq/roles/rhel-system-roles.kernel_settings/te
sts/tests_bool_not_allowed.yml /tmp/tmp.yGHyJZzeJq/roles/rhel-system-roles.kernel_settings/tests/tests_change_settings.
yml /tmp/tmp.yGHyJZzeJq/roles/rhel-system-roles.kernel_settings/tests/tests_default.yml /tmp/tmp.yGHyJZzeJq/roles/rhel-
system-roles.kernel_settings/tests/tests_include_vars_from_parent.yml /tmp/tmp.yGHyJZzeJq/roles/rhel-system-roles.kerne
l_settings/tests/tests_simple_settings.yml) with ANSIBLE-2 against RHEL_8_6_TESTING :: actually running 'python3 runqem
u.py --config=NONE --cache=/tmp/tmp.yGHyJZzeJq                                 --inventory=/usr/share/ansible/inventory
/standard-inventory-qcow2 --image-file=/tmp/tmp.yGHyJZzeJq/image.qcow2
                 --use-snapshot                                 --use-yum-cache                                 --batch
-file kernel_settings_batch.txt --batch-report kernel_settings_batch.report --skip-tags tests::nvme,tests::infiniband
                               --setup-yml=/tmp/tmp.yGHyJZzeJq/_setup.yml --setup-yml=roles/rhel-system-roles.kernel_se
ttings/tests/setup-snapshot.yml --'
Traceback (most recent call last):
  File "runqemu.py", line 1349, in <module>
    main()
  File "runqemu.py", line 1321, in main
    runqemu(
  File "runqemu.py", line 1052, in runqemu
    run_ansible_playbooks(
  File "runqemu.py", line 817, in run_ansible_playbooks
    refresh_snapshot(
  File "runqemu.py", line 671, in refresh_snapshot
    internal_run_ansible_playbooks(
  File "runqemu.py", line 589, in internal_run_ansible_playbooks
    subprocess.check_call(  # nosec
  File "/usr/lib64/python3.8/subprocess.py", line 359, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python3.8/subprocess.py", line 340, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib64/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.8/subprocess.py", line 1626, in _execute_child
    env_list.append(k + b'=' + os.fsencode(v))
  File "/usr/lib64/python3.8/os.py", line 806, in fsencode
    filename = fspath(filename)  # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not NoneType
:: [ 01:31:07 ] :: [   FAIL   ] :: Test kernel_settings (/tmp/tmp.yGHyJZzeJq/roles/rhel-system-roles.kernel_settings/tests/tests_bool_not_allowed.yml /tmp/tmp.yGHyJZzeJq/roles/rhel-system-roles.kernel_settings/tests/tests_change_settings.yml /tmp/tmp.yGHyJZzeJq/roles/rhel-system-roles.kernel_settings/tests/tests_default.yml /tmp/tmp.yGHyJZzeJq/roles/rhel-system-roles.kernel_settings/tests/tests_include_vars_from_parent.yml /tmp/tmp.yGHyJZzeJq/roles/rhel-system-roles.kernel_settings/tests/tests_simple_settings.yml) with ANSIBLE-2 against RHEL_8_6_TESTING (Expected 0, got 1)


fix(DASH): Fix bad error on DASH DAI

Fixes https://github.com/shaka-project/shaka-player/issues/6010

@theodab the regression was introduced in https://github.com/shaka-project/shaka-player/commit/24e32559bff6457aa8a1b356f26d83b6a320b9b2
Review with the asset Tears of Steel (live, DASH, Server Side ads)


[backport] Add extension to kill training when NaN or Inf is detected (FailOnNonNumber)

Backport of #4545

LGTM


Consider CLI for saving account

Context
We have a problem with users storing their account tokens in their source code or Jupyter notebook. We're currently writing a guide explaining that you shouldn't do this, but we could probably avoid the situation without additional documentation if we improve the user experience.
A pretty common approach to save user accounts is a CLI. Benefits to user are:

Less documentation reading needed; they just run a command that guides them through setting up their account
No temptation to leave token in source code or Jupyter notebook
Token isn't saved to REPL history

What is the expected feature or enhancement?
A CLI to save your account, made available on install.
Workflow would be along these lines:

User runs command such as:$ qiskit-runtime-save-account

CLI asks whether to use platform or cloud
CLI prompts for token
CLI prompts again for group and hub. If you wanted to get fancy you could work out which ones they have access to and provide them as options, but just entering the string is fine.
Finally, we write this to file and explain it to the user.

The process could look something like:
$ qiskit-runtime-save-account
Would you like to use (1) ibm_quantum or (2) ibm_cloud?
Type the number and press enter (default ibm_quantum) 1
Using ibm_quantum
Please enter your IBM Quantum token, you can get this from https://quantum.ibm.com/
Please enter the instance you'd like to use (default ibm-q/open/main)
Account saved to ~/.qiskit/qiskit-ibm.json
⚠ Note your token is saved to disk in plain text. If on a shared computer, make sure to regenerate your token when you're finished.

This CLI can easily be created using built-in Python functionality.

Make CLI available on installing qiskit-ibm-runtime
Use getpass to securely enter the token.

The original .save_account() method can still be public, we'd just recommend the CLI as a better user experience.
Acceptance criteria
Super simple CLI that guides a user through getting account information and saves it to disk. CLI should explain where the information is saved and that it's in plain text.
Nice to have:

Select from available options (e.g. we could show the user their available instances and have them enter the list number of the one they want)
Choose storing to environment variables rather than disk (if they're using a shared computer and want variables to disappear after their session).

If accepted, I'm happy to work on this.


request: RSS feeds

Is your feature request related to a problem? Please describe.
A schedule to periodically check rss feeds for new articles and post them in designated channels.
A command to add a RSS feed along the lines of !rss add {link} {channel} {time} etc etc
Describe the solution you'd like
A command will be needed to add/remove/list rss feeds for a server.
When an rss feed is added a schedule is started to fetch the current news and post new articles in the designated channel.
A new table would be needed to store the rss feeds
id | guild_id | channel_id | feed | period | last_time
A scheduleTask will need to be added to pick up these rss feeds, check for new articles which were published after the last time the schedule ran, post the newest, store the current time and reschedule based on the provided time.
Describe alternatives you've considered
None
Additional context
Command set
!rss add {link} {channel} {time} - !rss add http://feeds.bbci.co.uk/news/world/rss.xml @news 15m
Start a schedules task to check the rss feed for new articles and post new ones in the channel supplied
Time could be optional with a default of 1 hour
Link and channel should be required.
!rss list
List all active rss feeds for the server
!rss remove {id} - delete a rss feed
Delete an rss feed for a server by its unique identifier.
Commands should be limited to moderator roles.
Open for discussion

Interesting idea. @Tylertron1998 something you may be interested in making after YT notifs is fully done? You're quite into the whole periodic checking and such now.

Very interesting - could make for a good microservice. Though, it does beg the question if there should be one central event microservice that forwards events from other smaller microservices, such as youtube notifications, rss feeds, etc.

Very interesting - could make for a good microservice. Though, it does beg the question if there should be one central event microservice that forwards events from other smaller microservices, such as youtube notifications, rss feeds, etc.

Skyra.Notifier maybe?

is that a good setup? In that case, there would be Skyra.Notifier, that takes in all notifications from all other services and forwards them to the actual bot - Skyra.Youtube which takes in notifications from youtube, and forwards it to Skyra.Notifier - and now Skyra.RSS - which takes RSS feed notifications and forwards it to Skyra.Notifier

Sounds good to me

is that a good setup? In that case, there would be Skyra.Notifier, that takes in all notifications from all other services and forwards them to the actual bot - Skyra.Youtube which takes in notifications from youtube, and forwards it to Skyra.Notifier - and now Skyra.RSS - which takes RSS feed notifications and forwards it to Skyra.Notifier

Since we on the topic of what could use these services Skyra.twitch to announce if a channel is live, Skyra.Twitter to post new tweets.
When you think about it, the notification service could be used to expand a lot of functionality.

Since we on the topic of what could use these services Skyra.twitch to announce if a channel is live,

Twitch notifications are already in Skyra, albeit it through TS. It can be moved to C# I guess, but it's lower priority than new features.

Skyra.Twitter to post new tweets.

This is something that's been a long time request and I think the API for it is finally free so I think we can use it. Used to be it was a paid API with exorbitant prices.


Various fixes when using specific Connections

Type

[X] Bug Fix
[ ] New Feature
[ ] Sample

Related Issues?
Fixes #1857
Fixes #1729
Fixes #1724
What is in this Pull Request ?
Lots of cleanup and refactoring around using a specific connection retrieved by Connect-PnPOnline -ReturnConnection or Get-PnPConnection. Things were getting completely mixed up. It should now completely be separated from the current context which even would allow having multiple connections at once, each with a different authentication method or user.

I so hope that this is the solution for https://github.com/pnp/powershell/issues/1949
@KoenZomers Is this already going to the prerelease builds?

@heinrich-ulbricht, this is already in the latest nightly builds, yes. I did find a regression with this PR that prevents one from using disconnect-pnponline and then connect-pnponline again after that. I know where the issue lies, just need to discuss within the team what makes most sense in how to fix it.

@KoenZomers Ok I'll have to wait for that because I use Disconnect-PnPOnline followed by Connect-PnPOnline (i.e. connect for all connections, I ran into https://github.com/pnp/powershell/issues/1857 as well).

@KoenZomers I would totally expect that I would have to authenticate again. Like the first time. Disconnect is disconnect.

Thanks for your extensive input. I agree that it would be most intuitive to work this way. Problem we're facing is that it hasn't worked this way and even was deliberately coded not to work this way, so to do automatically authenticate when connecting to the same tenant again. Thereby changing this would/could be seen as a non-backwards compatible change, which is something we really try to stay away from with all the scripts people have running unattended. Tricky one. We'll give it some more thoughts what's wise here.

I think this PR create a breaking change in the flow. We had a script using $myconnec = Connect-PnPOnline -ReturnConnection and then later Disconnect-PnPOnline -Connection $myconnec
Before we get a warning, but now it throws an exception

Should breaking change like this not only be integrated in major version change, not minor one ?

@Nathaire This is an unintended regression. Will look into fixing this.

@KoenZomers thanks a lot

The disconnect situation will be fixed by this PR: https://github.com/pnp/powershell/pull/2093


To restore workflow step of items in ImportService

Motivation
Why is this feature required? What problems does it solve?
As there can be multiple workflow steps associated with a project and localisation flow depends on the workflow step of an item, we request you to add this to your backup and restore functionality. Additionally if the content items are archived and not used anymore, having redundant content items can prove problematic.
Proposed solution
An ideal solution for the above problems.
Ideally, during backup the workflow step of each item should also be preserved in the zip file created and restored from the file.
Additional context
Add any other context, screenshots, or reference links about the feature request here.

Hi @jheelbharambe,
I've added support for exporting workflows and preserving workflow steps of language variants in version 4.0.0. We have rebranding packages so you can now find it under new name - see https://www.npmjs.com/package/@kontent-ai/backup-manager
Preserving workflow is a bit more complex than I thought, so please try it and let me know if you encounter some issues.

Thanks for providing a solution for this! I will try it out and revert back to you :)

The changes seem to be working fine! Thanks a lot!


feat: generate wasm caching helper

fix https://github.com/denoland/wasmbuild/issues/67
@dsherret

The file is based on your implementation just 2 differences mentioned above

Another option is just to keep the file in the repo and point to it in the docs

I'm in favour. (I need caching in deno_swc)
WDYT @dsherret?

I'd like this, but I think we should try to generate it without any external dependencies. It looks like we don't need them.

Nice thanks for this, really useful


The network is too slow for download helm.

why helm is at https://get.helm.sh?  in china ,it's hard to download，The network is too slow。
[root@kmaster ~]# curl -LO https://get.helm.sh/helm-${version}-linux-amd64.tar.gz
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  5 11.5M    5  623k    0     0    982      0  3:25:04  0:10:50  3:14:14     0

and i can't get the latest version of helm from github
[root@localhost harbor]# curl -s https://api.github.com/repos/helm/helm/releases/latest | grep browser_download_url
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-darwin-amd64.tar.gz.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-darwin-amd64.tar.gz.sha256.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-386.tar.gz.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-386.tar.gz.sha256.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-amd64.tar.gz.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-amd64.tar.gz.sha256.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-arm.tar.gz.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-arm.tar.gz.sha256.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-arm64.tar.gz.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-arm64.tar.gz.sha256.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-ppc64le.tar.gz.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-ppc64le.tar.gz.sha256.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-s390x.tar.gz.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-linux-s390x.tar.gz.sha256.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-windows-amd64.zip.asc"
      "browser_download_url": "https://github.com/helm/helm/releases/download/v3.0.0/helm-v3.0.0-windows-amd64.zip.sha256.asc"

can you put it at github,then i can awlays use a automatic command download the latest version and put it in my local network.

Thanks for your feedback!
A bit of background context on the move to get.helm.sh can be found here: https://helm.sh/blog/get-helm-sh/
Our previous infrastructure was hosted on Google Cloud Storage, which is completely blocked in China.
One of the main goals with the migration was availability in China. Azure CDN can serve content to China users with point-of-presence (POP) locations near China. I believe the POP originates from Singapore, if I'm not mistaken.
If there's a large enough demand, we can consider hosting them from Azure CDN China which has POPs inside China.

I think the download speed in China is totally unbearable. Most people in China are using some mirrors like https://mirror.azure.cn/kubernetes/helm/, but those mirrors are often outdated and unsafe.
I am sure there's a large enough demand but those people with a poor net condition may does not know how to share their voice.
I'm thanksful the helm community had done something for China users.
But to be honest, something happened is not something worked. The problem is not resolved for now.

I find the mirror of china ， it's huawei! so greate!
version=v3.1.2
#从华为开源镜像站下载
curl -LO https://repo.huaweicloud.com/helm/${version}/helm-${version}-linux-amd64.tar.gz
tar -zxvf helm-${version}-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/helm
``

Had the same issue that the download speed is to slow using https://get.helm.sh in China and often the download just collapses.
Using the Huawai mirror works great, but we would prefer having an official China mirror recommended by Helm.

The problem is that most CDN services serve content globally except for China. To have an "official" CDN, we would need another CDN service specifically within China such as Azure CDN China:
https://docs.microsoft.com/en-us/azure/cdn/cdn-china-delivery
For the time being, I would recommend checking and verifying the PGP signatures of any release assets. That way you can ensure that the release assets have not been tampered with.
Every release's PGP signatures are attached to the official release page. You can fetch them from there, then you can verify the signature against the release tarball fetched from Huawei's mirror. If the verification succeeds, then you know it has not been tampered with.
For example:
https://github.com/helm/helm/releases/tag/v3.5.4

This release was signed with 672C 657B E06B 4B30 969C 4A57 4614 49C2 5E36 B98E and can be found at mattfarina keybase account. Please use the attached signatures for verifying this release using gpg.

Hope that helps.

I’ll pose the same question I asked in another ticket here as well:
What CDN services are available within China? Which ones work best, and why?

Re-opening for further discussion/visibility.

Appart from the slowness of the download, the IP behind https://get.helm.sh (<IP_ADDRESS>) is also blacklisted by some corporate security tools.
More precisely, it was identified as a "Command and Control" server for ransomware attack using Emotet.
Can't you simply add github release assets and keep https://get.helm.sh in current CDN too?


Ability to edit any SVG files

Hello,
I love the fact that diagrams could quickly added to the notes using the plugin. But what is a bummer is the fact that you can't edit your SVG.
For example, I had https://en.wikipedia.org/wiki/Horizon#/media/File:Horizons.svg saved & embedded in my obsidian notes. When I right click and edit it says "Diagram is not valid (missing XML file)"
If only diagrams created with it can be opened and edited then it is limiting the possibilities to great extent. Can you please find a way to edit any SVG file?

Thanks for the feedback!
What you are requesting is a feature that must be solved in diagrams.net itself, not this integration plugin.
Diagrams.net has a note about importing svg-files: https://www.diagrams.net/doc/faq/svg-insert
It describes how you can insert svg-files as scalable elements in diagrams, but also states:

You cannot import an SVG representation of a diagram and edit it as a diagram. SVG does not save the connector information needed to be able to determine which elements are shapes and which are connectors.

The most relevant solution I can see to your problem would be to create a diagram, insert your svg-file, and make annotation on top of that.


[NFC] Rename ExtInfo::Uncommon to ExtInfo::ClangTypeInfo.

The previous name was poorly chosen (by me). Time to fix that.
I broke off this commit out of the ExtInfo builder-pattern refactoring (that one's pretty large, like 1k+, 1k-).

@swift-ci please smoke test

In the future, I will be adding more fields to ClangTypeInfo, specifically an "isDerivable" bit in this PR. https://github.com/apple/swift/pull/29349
The ExtInfo builder-pattern refactoring is here: https://github.com/apple/swift/pull/33118.

Force pushed because changing some comments above/below created merge conflicts.
@swift-ci please smoke test

Oh wait, some whitespace changes snuck in. 🤦

@swift-ci please smoke test


ComfyUI SVD Pipline Error

Describe the bug
A clear and concise description of what the bug is.

File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/graph.py", line 1577, in __build_graph
outputs = self.build(*lazy_args, **lazy_kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/onediff/infer_compiler/oneflow/graph.py", line 19, in build
return self.model(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 188, in call
result = self.__block_forward(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 238, in __block_forward
result = unbound_forward_of_module_instance(self, *args, **kwargs)
File "/data/ComfyUI/custom_nodes/onediff_comfy_nodes/modules/oneflow/infer_compiler_registry/register_comfy/openaimodel.py", line 96, in forward
h = forward_timestep_embed(
File "/data/ComfyUI/comfy/ldm/modules/diffusionmodules/openaimodel.py", line 36, in forward_timestep_embed
x = layer(x, emb, num_video_frames, image_only_indicator)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 188, in call
result = self.__block_forward(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 238, in __block_forward
result = unbound_forward_of_module_instance(self, *args, **kwargs)
File "/data/ComfyUI/custom_nodes/onediff_comfy_nodes/modules/oneflow/infer_compiler_registry/register_comfy/openaimodel.py", line 223, in forward
x = self.time_stack(x, emb.unflatten(0, shape=(batch_size, -1)))
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 188, in call
result = self.__block_forward(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 238, in __block_forward
result = unbound_forward_of_module_instance(self, *args, **kwargs)
File "/data/ComfyUI/comfy/ldm/modules/diffusionmodules/openaimodel.py", line 230, in forward
return checkpoint(
File "/data/ComfyUI/comfy/ldm/modules/diffusionmodules/util.py", line 191, in checkpoint
return func(*inputs)
File "/data/ComfyUI/comfy/ldm/modules/diffusionmodules/openaimodel.py", line 261, in _forward
emb_out = rearrange(emb_out, "b t c ... -> b c t ...")
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/einops.py", line 487, in rearrange
return reduce(tensor, pattern, reduction='rearrange', **axes_lengths)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/einops.py", line 410, in reduce
return _apply_recipe(recipe, tensor, reduction_type=reduction)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/einops.py", line 231, in _apply_recipe
backend = get_backend(tensor)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/_backends.py", line 52, in get_backend
raise RuntimeError('Tensor type unknown to einops {}'.format(type(tensor)))
RuntimeError: Tensor type unknown to einops <class 'oneflow.Tensor'>
Your environment
Linux
OneDiff git commit id
6b54c0872079dec578ca266b82fbb5f03f6b44b8
OneFlow version info
Run python -m oneflow --doctor and paste it here.
Ignoring PCI device with non-16bit domain.
Pass --enable-32bits-pci-domain to configure to support such devices
(warning: it would break the library ABI, don't enable unless really needed).
path: ['/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow']
version: 0.9.1.dev20240415+cu118
git_commit: 67341c9
cmake_build_type: Release
rdma: True
mlir: True
enterprise: False
How To Reproduce
Steps to reproduce the behavior(code or script):
run a svd comfyui workflow
The complete error message
Additional context
Add any other context about the problem here.

full stack trace:
Traceback (most recent call last):
File "/data/ComfyUI/execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/data/ComfyUI/execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "/data/ComfyUI/execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/data/ComfyUI/nodes.py", line 1344, in sample
return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
File "/data/ComfyUI/nodes.py", line 1314, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
File "/data/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 22, in informative_sample
raise e
File "/data/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 9, in informative_sample
return original_sample(*args, **kwargs)  # This code helps interpret error messages that occur within exceptions but does not have any impact on other operations.
File "/data/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/sampling.py", line 248, in motion_sample
return orig_comfy_sample(model, noise, *args, **kwargs)
File "/data/ComfyUI/comfy/sample.py", line 37, in sample
samples = sampler.sample(noise, positive, negative, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "/data/ComfyUI/comfy/samplers.py", line 755, in sample
return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "/data/ComfyUI/comfy/samplers.py", line 657, in sample
return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
File "/data/ComfyUI/comfy/samplers.py", line 644, in sample
output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
File "/data/ComfyUI/comfy/samplers.py", line 623, in inner_sample
samples = sampler.sample(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
File "/data/ComfyUI/comfy/samplers.py", line 534, in sample
samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/torch/utils/contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/data/ComfyUI/comfy/k_diffusion/sampling.py", line 580, in sample_dpmpp_2m
denoised = model(x, sigmas[i] * s_in, **extra_args)
File "/data/ComfyUI/comfy/samplers.py", line 272, in call
out = self.inner_model(x, sigma, model_options=model_options, seed=seed)
File "/data/ComfyUI/comfy/samplers.py", line 610, in call
return self.predict_noise(*args, **kwargs)
File "/data/ComfyUI/comfy/samplers.py", line 613, in predict_noise
return sampling_function(self.inner_model, x, timestep, self.conds.get("negative", None), self.conds.get("positive", None), self.cfg, model_options=model_options, seed=seed)
File "/data/ComfyUI/comfy/samplers.py", line 258, in sampling_function
out = calc_cond_batch(model, conds, x, timestep, model_options)
File "/data/ComfyUI/comfy/samplers.py", line 216, in calc_cond_batch
output = model_options['model_function_wrapper'](model.apply_model, {"input": input_x, "timestep": timestep, "c": c, "cond_or_uncond": cond_or_uncond}).chunk(batch_chunks)
File "/data/ComfyUI/custom_nodes/onediff_comfy_nodes/modules/oneflow/utils/deep_cache_speedup.py", line 119, in apply_model
model_output, cache_h = model_patcher.deep_cache_unet(
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1561, in _call_impl
result = forward_call(*args, **kwargs)
File "/data/onediff/src/onediff/infer_compiler/utils/online_quantization_utils.py", line 48, in wrapper
output = func(self, *args, **kwargs)
File "/data/onediff/src/onediff/infer_compiler/utils/args_tree_util.py", line 50, in wrapper
output = func(self, *mapped_args, **mapped_kwargs)
File "/data/onediff/src/onediff/infer_compiler/oneflow/utils.py", line 27, in wrapper
return func(self, *args, **kwargs)
File "/data/onediff/src/onediff/infer_compiler/utils/graph_management_utils.py", line 91, in wrapper
ret = func(self, *args, **kwargs)
File "/data/onediff/src/onediff/infer_compiler/oneflow/deployable_module.py", line 99, in forward
output = dpl_graph(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/graph.py", line 295, in call
self._compile(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/graph.py", line 861, in _compile
return self._dynamic_input_graph_cache._compile(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/cache.py", line 121, in _compile
return graph._compile(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/graph.py", line 865, in _compile
return self._compile_new(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/graph.py", line 884, in _compile_new
_, eager_outputs = self.build_graph(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/graph.py", line 1429, in build_graph
outputs = self.__build_graph(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/graph.py", line 1577, in __build_graph
outputs = self.build(*lazy_args, **lazy_kwargs)
File "/data/onediff/src/onediff/infer_compiler/oneflow/graph.py", line 19, in build
return self.model(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 188, in call
result = self.__block_forward(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 238, in __block_forward
result = unbound_forward_of_module_instance(self, *args, **kwargs)
File "/data/ComfyUI/custom_nodes/onediff_comfy_nodes/modules/oneflow/infer_compiler_registry/register_comfy/deep_cache_unet.py", line 71, in forward
h = forward_timestep_embed(
File "/data/ComfyUI/comfy/ldm/modules/diffusionmodules/openaimodel.py", line 36, in forward_timestep_embed
x = layer(x, emb, num_video_frames, image_only_indicator)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 188, in call
result = self.__block_forward(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 238, in __block_forward
result = unbound_forward_of_module_instance(self, *args, **kwargs)
File "/data/ComfyUI/custom_nodes/onediff_comfy_nodes/modules/oneflow/infer_compiler_registry/register_comfy/openaimodel.py", line 223, in forward
x = self.time_stack(x, emb.unflatten(0, shape=(batch_size, -1)))
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 188, in call
result = self.__block_forward(*args, **kwargs)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/oneflow/nn/graph/proxy.py", line 238, in __block_forward
result = unbound_forward_of_module_instance(self, *args, **kwargs)
File "/data/ComfyUI/comfy/ldm/modules/diffusionmodules/openaimodel.py", line 230, in forward
return checkpoint(
File "/data/ComfyUI/comfy/ldm/modules/diffusionmodules/util.py", line 191, in checkpoint
return func(*inputs)
File "/data/ComfyUI/comfy/ldm/modules/diffusionmodules/openaimodel.py", line 261, in _forward
emb_out = rearrange(emb_out, "b t c ... -> b c t ...")
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/einops.py", line 487, in rearrange
return reduce(tensor, pattern, reduction='rearrange', **axes_lengths)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/einops.py", line 410, in reduce
return _apply_recipe(recipe, tensor, reduction_type=reduction)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/einops.py", line 231, in _apply_recipe
backend = get_backend(tensor)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/_backends.py", line 52, in get_backend
raise RuntimeError('Tensor type unknown to einops {}'.format(type(tensor)))
RuntimeError: Tensor type unknown to einops <class 'oneflow.Tensor'>

What is your ComfyUI version (commit id)? @arthursunbao

Based on the version information you provided, I tested the same workflow and could not reproduce the error. 🙂
You can try updating the versions of onediff and Comfy.
Additionally, in your error stack, I noticed calls to "deep_cache", but the current workflow does not use any Deep Cache nodes. This is a bit strange.
You can try deleting the cache of the previous graph and test again. The location of the graph cache is:

@arthursunbao

我遇到了同样的问题，卸载einops后重新安装就可以了

我遇到了同样的问题，卸载einops后重新安装就可以了

What is the einops version number after you reinstall it？

File "/data/ComfyUI/comfy/ldm/modules/diffusionmodules/openaimodel.py", line 261, in _forward
emb_out = rearrange(emb_out, "b t c ... -> b c t ...")
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/einops.py", line 487, in rearrange
return reduce(tensor, pattern, reduction='rearrange', **axes_lengths)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/einops.py", line 410, in reduce
return _apply_recipe(recipe, tensor, reduction_type=reduction)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/einops.py", line 231, in _apply_recipe
backend = get_backend(tensor)
File "/data/miniconda3/envs/env-novelai/lib/python3.10/site-packages/einops/_backends.py", line 52, in get_backend
raise RuntimeError('Tensor type unknown to einops {}'.format(type(tensor)))
RuntimeError: Tensor type unknown to einops <class 'oneflow.Tensor'>

The error is in enops @lixiang007666 @dk994023477

I will close this issue. If the issue still cannot be resolved, you can reopen it.
@arthursunbao


Support Velodyne Lidar on Windows

Customer request for Velodyne lidar support on Windows:
https://stackoverflow.com/questions/64263546/catkin-make-on-the-velodyne-drivers-fails-in-the-windows-10-environemnt

this should be tracked as a ROS node rather than core ROS on Windows


Update response handling documenation

Contributes to #1531

coverage: 94.437% (-0.01%) from 94.447% when pulling 5f791fa19ac012525f47f81f1943e01e52bea28c on feature/response-docs into b102ad9f6c8d1ec5b613bc13def835a27bacc993 on main.


ObjectType > Make fields optional

Just like everything else. It can default to an empty array.

I don't think this change is right. See http://spec.graphql.org/draft/#sec-Objects.Type-Validation

An Object type must define one or more fields.

Good point, thanks.


on_blast entity api sketch

this is just an untested sketch

Ability to use on_blast added to api, immortal check shoudl be removed from tnt's entity_physics function though so that damage is dealt by default.

No, because that would erase all node drops. If you are immortal, you need to apply damage yourself.

Exactly my thinking, if immortal then use on_blast, which is why I would add it to builtin item drops to stop them being destroyed

that would push the TNT API into builtin, which isn't a good idea.

It's grown from what was a simple damage system to having to include a new blast damage system and knockback inside mobs api to compensate.


use textwrap module to replace fml in process_schemas.py

issue #115
When generating the embedded text representing the JSON schema of a protocol element, the process_schemas.py script pipes the text through fmt to wrap the text. The textwrap module from the standard library provides a much better way to do this.

Can you commit the new protocol definitions file simultaneously? I'm surprised that you don't have to set up indentation and wrap-width the way I had to for __slots__; I'd expect PEP8/FLAKE errors on the output.

I agree with @Naburimannu

@dcolligan and @Naburimannu , I added the new _protocol_definitions.py script. It seems that it does pass the travis test, but I am not sure about whether the text wrapping is stable.

When you run it repeated times, does it produce the same file?
You could automate this by setting up some kind of script for yourself that ran the process 100 (or whatever times) and compares the contents of the file.

@dcolligan OK I am working on this

It also may be the case that there's some kind of machine-dependent setting that is making this produce slightly different output.

I wrote this following script to test generating the output 100 times, and they are the same. Not sure different machine will give different output.
import filecmp
import tempfile
import subprocess
REPEAT = 100
def main():
tmpDir = tempfile.mkdtemp(prefix="process_schemas_output_test_")
files = []
all_files_same = True
for i in range(REPEAT):
files.append("{0}/{1}.py".format(tmpDir, i))
args = ["python",
"/Users/Molly/PycharmProjects/server/scripts/process_schemas.py",
"-o", files[-1], "v0.5.1", "--avro-tools-jar",
"/Users/Molly/Downloads/avro-tools-1.7.7.jar"]
subprocess.check_call(args)
if i > 0:
print "comparing file {0}.py with file 0.py".format(i)
if filecmp.cmp(files[0], files[i]) is not True:
all_files_same = False
print "{0} and {1} is different".format(files[0], files[1])
break
print "same"
print "all files are same?: {0}".format(all_files_same)

if name == "main":
main()

Your script is kind of hard to read... in the future use triple-backticks to
make it look like this
           and preserve formatting

You can read more about that in the markdown documentation.

@MollyZhang, can you please re-edit the code above with proper indentation?  To post as python code use the triple back-ticks at the beginning and at the end, and then post inside that section, below is a link describing this:
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code
Thanks,
Paul

Another thing you could do would be to upload the file to gist, if you didn't want to fiddle with markdown, and paste the link in the comments.

@MollyZhang, can you also include the following file:
process_schemas.py

It would probably better to have a Readme to ensure what the requirements for a proper setup and successful running are.
~p

@MollyZhang, found it :)

I checked out a branch with this branch's changes and ran the tool and I didn't see any difference in the generated file from the one committed to this branch so... @MollyZhang after you fix my nit and the tests pass:
+1

@pgrosu  I added some comments in the script and included the process_schemas.py file and avro tools, thanks for the feedback

@dcolligan  fixed the nit

@MollyZhang, thank you for the added comments.  It also works for me, based on my output below:
comparing file 97.py with file 0.py
same
comparing file 98.py with file 0.py
same
comparing file 99.py with file 0.py
same
all files are same?: True
$
[process_schemas_output_test_t9lTFo]$ for file in ./*.py; do diff "$file" "./0.py"; done
[process_schemas_output_test_t9lTFo]$

Thanks,
Paul

+1


proposal: Go 2: explicit exports

Add support for explicitly exporting symbols with an export keyword instead of implicitly exporting upper case symbols.
package package1

export (
    symbol1
    symbol2
    Symbol3
)

func symbol1() {
}

(...)

Why ?
The main motivation is allowing to export lower case symbols. Secondary motivation is to have a more fine grained export control.
My opinion on current state is that golang forces usage of camel case and mixed case coding styles (not really true in theory but true in practice). I don't like using mixed case both due to personal reasons (I think it's ugly) and technical reasons (it tends to break case sensitive searches, which I think are better suited for code than case insensitive searches), and I very much prefer using coding styles analogous to Python's PEP8[1].
Suggested implementation
There are two approaches, one is compatible with go 1 and another breaks compatibility.

Compatible with go 1: if there's no top-level export keyword, then symbol exporting works exactly like in go 1. If there's a top-level export keyword, then symbol exporting only exports explicit symbols.

Incompatible with go 1: all exports must become explicit.

In any case, implementation would work with a new top level parsed element that would replace current (constant) export logic with a table search.
Extras
Export wildcards:
export all uppercase
export all lowercase
export a*
(etc.)

References
[1] https://www.python.org/dev/peps/pep-0008/

This decreases the readability.
We can use the export keyword elsewhere.
For example, I use the export keyword in my generics proposal to export some elements from a gen.
A gen can be viewed as mini-package.

This decreases the readability.

Agreed, it slightly decreases readability. So the proposal is a compromise. A good one, I believe, that's why I proposed it.

We can use the export keyword elsewhere. For example, I use the export keyword in my generics proposal to export some elements

I'm definitely not bikeshedding over a keyword name and I'm sorry I've stolen export from your proposal. So here we go:
provide (
    symbol1
)

from a gen. A gen can be viewed as mini-package.

I'm not sure if you're suggesting this proposable is replaced by a generic mini-package (whatever that might mean), but if so I disagree. This proposal is neither about generic nor mini-packages, it's about full featured packages.

The main motivation is allowing to export lower case symbols.

See also #22188.

The main motivation is allowing to export lower case symbols.

See also #22188.

Agreed and will edit proposal motivation.

Speaking just for myself, I have spent a long time worrying about this general topic and doing research about it. So have others. And I have concluded it's not worth fixing, if indeed it's broken at all. The clarity of the current rules, not only in their expression but also in their use in the source code of the package but also, perhaps more important, the source code of the user's code, is just too high to compromise here.
Using case to distinguish export status is one of Go's most radical but most important features. The huge positive effect on readability is profound.

@bcmills note that for Go 2 proposals only the Go 2 proposal review group should add NeedsFix or NeedsInvestigation labels.  They are how we track the state of proposals.  Thanks.

Speaking just for myself, I have spent a long time worrying about this general topic and doing research about it. So have others. And I have concluded it's not worth fixing, if indeed it's broken at all. The clarity of the current rules, not only in their expression but also in their use in the source code of the package but also, perhaps more important, the source code of the user's code, is just too high to compromise here.

Disagreed. Comparing it with pretty much every other language, I think it's a very slight readability decrease and a pretty small compromise. I think the export status of a symbol within a package is mostly searched when refactoring the API, otherwise it's just directly used without additional concerns, while outside the package finding a symbol requires reading the docs or source code, both of which would have an explicit export section in this case.

but also, perhaps more important, the source code of the user's code, is just too high to compromise here.

I didn't understand here. In user's code, to use imported symbols they must be of exported type. There's no choice here. What do you mean ?

Using case to distinguish export status is one of Go's most radical but most important features. The huge positive effect on readability is profound.

Disagreed.

In Oberon, from which git borrows much of the inspiration for it's module system, identifiers that are marked with * after them are exported. The issue #22188 and this one could be solved in a backwards compatible way, by allowing a similar marker in front of or perhaps after the identifier to export it, regardless of whether or not the following identifier is upper or lower case.
Ideally, this should only be used for Unicode identifiers in scripts that don't have the upper case  and lower case distinction, but that is a policy that go vet could check, not something that the compiler would have to enforce.

@robpike
Using case to distinguish export status is one of Go's most radical but most important features. The huge positive effect on readability is profound.
I do not think so.

@robpike I agree that using case to distinguish export status is a great feature of Go.
However, seeing #22188, and also this issue, I think that we need a way to make an exception to this general rule and allow certain identifiers that do not begin with an uppercase character to be exported. An Oberon like marker seems the simplest, most backwards compatible way to do this.

This and alternative suggestions were considered extensively in the early days of Go.  We seem to have made a choice that at least for most people is working well.  We aren't going to change it now.


Use GetGradient to provide an analytical Jacobian while using PetscPreconditionerFactory

Is it possible to still use GetGradient to provide an analytical Jacobian for PetscNonlinearSolver while using PetscPreconditionerFactory to provide my own preconditioner.
My understanding is the current petsc interface use GetGradient to communicate mfem matrices with petsc inside PetscPreconditionerFactory. So it naturally uses JFNK. But in my very refined simulations, the JFNK struggles to provide a good matrix vector product. So I want to provide Jacobian by myself. Matrix manipulation ("physics-based" preconditioning) can be done when initializing PetscPreconditionerFactory::NewPreconditioner. Thus, I only need to provide one GetGradient for both Jacobian and preconditioner. Is this possible in the current interface? Or does PetscPreconditionerFactory require JFNK being called, so it will skip GetGradient in Newton solve?

I will let the experts answer, but have you looked at examples/petsc/ex10p.cpp?

The factory is not limited to JFNK: it is a small layer in between MFEM and PETSc that is able to return control to the user's  code, which may setup the solver the way they prefer. The factory creates preconditioners using the pmat passed to PETSc, see here https://github.com/mfem/mfem/blob/master/linalg/petsc.cpp#L4511, which is the one obtained from GetGradient, see here https://github.com/mfem/mfem/blob/master/linalg/petsc.cpp#L4187.

Great. That's good news! So if I want to use both analytical Jacobian and pcshell preconditioner, I should remove the flag -snes_mf_operator in rc_ex10p_jfnk and still use the original flag for jfnk:
-m ../../data/beam-quad.mesh --usepetsc --petscopts rc_ex10p_jfnk -jfnk -tf 6 -s 3 -rs 0 -dt 3
Is that right?
It does report linear system matrix = precond matrix instead of mffd while the _jfnk shell preconditioner is still called.


Comparing durations

Hello!
TL;DR is it ok to unwrap the Int value from Duration? If not, should there be a duration.compare function?

Given a package release date, I need to check if it was released within the last hour. I didn't find a function for comparing durations in the duration module, so I'm wondering if there is a preferred way of doing that?
First, I chose to unwrap the underlying integer values and compare them, but I thought I shouldn't be depending on the implementation details of the Duration type.
fn format_date(datetime: Time) -> String {
  let now = birl.now()
  let Duration(package_age_ms) = birl.difference(now, datetime)
  let Duration(age_threshold_ms) = duration.hours(1)
  case package_age_ms < age_threshold_ms {
    True -> "Just now!"
    False -> birl.legible_difference(now, datetime)
  }
}

Then I noticed there is a blur_to function, which lets me write less code, but its behavior is somewhat uncommon

if the duration is not an integer multiple of the unit, the remainder will be disgarded if it’s less than two thirds of the unit

fn format_date(datetime: Time) -> String {
  let now = birl.now()
  let package_age = birl.difference(now, datetime)
  case duration.blur_to(package_age, duration.Hour) < 1 {
    True -> "Just now!"
    False -> birl.legible_difference(now, datetime)
  }
}

Do you think adding a new function such as fn compare(a: Duration, b: Duration) -> Bool is warranted?

Just FYI: While writing this and collecting my thoughts, I noticed the birl.compare function and found a third solution to this
fn format_date(datetime: Time) -> String {
  let now = birl.now()
  let one_hour_ago = birl.subtract(now, duration.hours(1))
  case birl.compare(datetime, one_hour_ago) {
    order.Gt -> "Just now!"
    _ -> birl.legible_difference(now, datetime)
  }
}

Thanks for the suggestion. I agree, duration.compare could be helpful.

Then I noticed there is a blur_to function, which lets me write less code, but its behavior is somewhat uncommon

Well, that's kind of because of legible_difference. It uses blur under the hood, so I wrote blur in a way that is useful for legible_difference and part of that is making it behave in a way that is natural to how we think about time. It feels to me like we wouldn't say e.g. 8 days ago is two weeks ago! So when I wrote blur_to, I just did the same for approximations as for blur.

I can add the compare function then. On that note, would you also want to change Duration to an opaque type?
The blur functions do make sense for the legible_difference use case and I wouldn't change anything about them. I mentioned them because they seemed like a potential solution before I discovered there is also birl.compare 👍

Thanks for the offer, but I've already written duration.compare, along with some other minor changes.
But I don't think making Duration an opaque type is a good idea. I only make a type opaque if there is a possibility that the developer can create an invalid/unacceptable(for whatever reason) instance of it, so it's better to be able to create new instances only using predefined functions.
But there is no such possibility for Duration. Any integer is acceptable for a Duration so it seems to me making it opaque is an unnecessary restriction. There is no reason that developers shouldn't be able to destruct or create a new instance of a Duration directly.

Thanks for the explanation. In addition I don't image that the implementation of the Duration type might change in the future, so opaque type is not necessary indeed.
Just tried out the v1.5 release, works great. Thank you 🙂


How to do a list_append? How to push / add / append an item to an array / list?

Hi,
I'm trying to add a string to an array of strings. How to do this without fetching the entire array first, then updating it in JS, then overwriting the entire array?
With the "regular" dynamoDB language I would use list_append. How to do such a thing?
const dogSchema = new dynamoose.Schema({
  ID: {
    type: String,
    hashKey: true,
    default: uuid,
    forceDefault: true,
    required: true
  },
  owners: {
    type: Array,
    default: []
  }
});

export const Dog = dynamoose.model('Dog', dogSchema);

How to add an owner to the owners array?
await Dog.update(
  { ID: 'dogID' }
  // And now?
);

@fishcharlie I'm looking for something similar - removing an item from the list. This is how it's done from the terminal - https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.DELETE
If I understand correctly, to add a new follower to the list of followers for a user I would do:
User.update(
  { username }, // hashKey
  { $ADD: {
    followers: { 'Jean Valjean' },
    followersCount: 1,
    },
  }
);

and this would add Jean Valjean to the set and increment the counter by 1? And then to remove him from that list I would do:
User.update(
  { username }, // hashKey
  { $DELETE: {
    followers: { 'Jean Valjean' },
    followersCount: 1,
    },
  }
);

, removing Jean Valjean from the list and decrementing the counter? Is this correct? Also, suppose I change followers from a set to a map. 'Jean Valjean' becomes the key of a user object. How do I need to update my statements to make it work?

@dolsem I didn't notice that until now. The $ADD update expression can be used to append an item to a DynamoDB list.

@dolsem okay, and can I use $ADD and $DELETE to add and remove items from a map (i.e. javascript object in my schema)?

@arthurvi try
await Dog.update(
  { ID: 'dogID' },
  { $ADD:
    { owners: [newOwner] }
  }
);

As I've mentioned in #398 , I had a similar case and it worked, except that my list type was [String], not Array. Not sure if this will work for Array.

Closing this due to no recent activity. If this is still a problem or you have questions please feel free to comment again and we can try to help further.

@fishcharlie @dolsem
Do you know if it is possible to add an object to an array?
Something like this
await Dog.update(
  { ID: 'dogID' },
  { $ADD:
    { owners:
           owner: {
                 ownerid:'1'
                 ownername: 'username'
            }
 }
  }
);

With an schema like this

var DogSchema = new Schema({
  owners: [ {
   owner: {
    ownerid: String,
    ownername: String
}
  }],


Decide on tool for generating hierarchical SBOMs

As discussed in #17, we need a way to create a hierarchical SBOM that can point to an application and container SBOM. This is a requirement for Phase 1 (Python), but also for Phase 2.
sbomasm and bomctl are candidates for this.

I demo'd a workflow for this a long long time ago: https://github.com/vmware-archive/containers-with-sboms
It mostly uses buildah and tern, but it should work for any sbom generation tool. It still requires buildah to do the container stuff.

We decided to scrap the hierarchical SBOMs as the acceptance criteria for this Tiger Team. There's code for doing this with CycloneDX in a PR, but it was removed since we couldn't (easily) make it work for both CycloneDX and SPDX.

I demo'd a workflow for this a long long time ago: https://github.com/vmware-archive/containers-with-sboms It mostly uses buildah and tern, but it should work for any sbom generation tool. It still requires buildah to do the container stuff.

Vagrant! That's a blast from the past :)
Nice one. It does however seem like tern has been more or less abandoned though.

It does however seem like tern has been more or less abandoned though.
Not abandoned. But everyone uses syft anyway, so there is no incentive to contribute here.

We decided to scrap the hierarchical SBOMs as the acceptance criteria for this Tiger Team. There's code for doing this with CycloneDX in a PR, but it was removed since we couldn't (easily) make it work for both CycloneDX and SPDX.

Doesn't bomctl do this?

We decided to scrap the hierarchical SBOMs as the acceptance criteria for this Tiger Team. There's code for doing this with CycloneDX in a PR, but it was removed since we couldn't (easily) make it work for both CycloneDX and SPDX.

Doesn't bomctl do this?

Not to my knowledge, but @idunbarh can confirm.

We decided to scrap the hierarchical SBOMs as the acceptance criteria for this Tiger Team. There's code for doing this with CycloneDX in a PR, but it was removed since we couldn't (easily) make it work for both CycloneDX and SPDX.

Doesn't bomctl do this?

Not to my knowledge, but @idunbarh can confirm.

I guess not yet.


Make the code doc floating panel closable using the escape key

VSCode Version: 1.7.2
OS Version: OSX 10.12 (Sierra)

When using Typescript, the floating code documentation window will pop up and float above the code, but I cannot close it using (naturally) the escape key. I have to use the mouse to click somewhere within the code window to then hide the popup, which is more effort and hinders typing efficiency.
It would be nice if the escape key could be used to hide this popup.
Example of the popup that I'm talking about:

Steps to Reproduce:

When using Typescript, type some code that would access some imported class or object which has documentation comments associated with it
Observe that the popup cannot be closed using the escape key

@elkdanger I cannot reproduce. When I hit Escape, and the parameter hints is shown, it goes away. Is it possible you have installed an extension that overwrites what Escape does? i.e. Can you reproduce this after disabling all extensions:

@alexandrudima You're right, the issue seems to be with vscodevim which, given the very nature of how Vim works, makes complete sense. There's a similar issue open dealing with intellisense, snippets and the escape key, so I'll try and interject something over there.
Cheers

Actually while I'm here, can another key be used or bound to an action which can cancel intellisense popups? Is that available in the keybindings currently?

@elkdanger Please give our documentation a quick read :) https://code.visualstudio.com/docs/customization/keybindings#_customizing-shortcuts
TL;DR you can customize each and every keypress in each and every context. It requires a basic understanding of how the keybindings are dispatched.
I'd like to use this issue as a test to see if our documentation is good enough. Can you (given you read the explanation at that link) come up with a keybinding rule that does what you ask for? If not, I can simply write one for you, or better yet, can we try figuring out what's wrong with the documentation :).
Thank you!

Closing until more information is provided.


Reduced redundant null checks

I'm afraid I don't get the point of this PR. It says to remove redundancy, yet we end up with ~60 lines of added code?

By redundancy, I meant at runtime overhead. Some places where checking null on both sides of a method call (e.g. one more basic overload of Subscribe calling another overload with similar arguments). Other places were invoking a public AnonymousObserver constructor with null checks on arguments which cannot be null.
I assumed that it would be best to eliminate such instances, but given 1) that a majority of the changes seem to be in initialization methods, 2) that such null checks aren't going to kill performance, and 3) that the CLR could easily optimize most of these duplicate checks away when inlining, I realize that these changes are not necessarily helpful and would understand if you would prefer to close this pull request.


How to dim in steps from 1-6

Hi,
it seems like a ceiling fan with speed steps 1-6 with summer and winter mode, timer function and light is hard to control in one device as there is only on, off, dim and color available.
So far I can turn it on the fan with speed level one (or different depending on the called command) by a shell sript. The light control is managed in another device called "Ceiling Fan Light".
I would love to make it more flexible by passing a number as parameter e.g "/home/pi/fanspeed.sh [1-6]".
Is it possible to realize this with dim? Would it be done with the intense.math function? If yes, I honestly don't get how to use it. Apart from that I am unsure if ha-bridge variables can be used to pass paramters to scripts.
I the end it should work like this expample:
"Alexa, turn on ceiling fan speed level 3"
Thank you for your help.
Kay

I could be totally wrong, but isn't this totally analagous to what happens with a thermostat?
What's the script you run currently?
C

Not sure. But possibly as you need to pass specific values like "22" for 22°C. The script is a simple bash script:
#!/bin/bash case $1 in 	0|1|2|3|4|5|6) /usr/local/bin/pilight-send -p raw -c "$(< /home/pi/ceiling-fan/commands/level$1.raw)";; 	*) echo "Value for speed level not provided or wrong. Valid values are 0 (stop), 1, 2, 3, 4, 5 or 6 (maximum speed). Setting speed level 1 (default)."            /usr/local/bin/pilight-send -p raw -c "$(< /home/pi/ceiling-fan/commands/level1.raw)";; esac
In HA-Bridge it looks like this currently:
DimUrl: [{"item":"/home/pi/ceiling-fan/scripts/fanspeed.sh ${intensity.math(X)}","type":"cmdDevice"}]
But simply using X is not working as expected. When I say "Alexa, Ceiling Fan 3" the fan changes to speed level one only if it was higher before. So I guess the value which the script gets is wrong. Maybe the command line in HA Bridge is wrong as I might still not completely understand how HA-Bridge works.

OK I think we are talking at cross purposes, but I am NOT a coder. More a practical sort of guy

So far I can turn it on the fan with speed level one (or different depending on the called command) by a shell sript.

Can you share that script. That works? The one above seems to be your attempt at passing your variable?
The Dim ULR looks like it's calling fanspeed.sh? Is this the one you're using?
C

So far I can turn it on the fan with speed level one (or different depending on the called command) by a shell sript.

Can you share that script. That works? The one above seems to be your attempt at passing your variable?
It's the one I posted above.
The Dim ULR looks like it's calling fanspeed.sh? Is this the one you're using?
Correct.

Ahh right
Can you share
/usr/local/bin/pilight-send
C

The program pilight-send is just part of Pilight. I am using this to send the signbal to the fan. It only works with 433MHz radio signals. There is a 433MHz sender module connected to the raspberry pi where everything is running on.

OK with you. The options for pilight appear badly thought out. I count -c used 3 times so maybe expressly state --code?
OK if this was me, I'd start by trying to make it work manually as it were.
Have you established the value of /home/pi/ceiling-fan/commands/level$1.raw ?
I'm probably not being much help :(
C

I use HEYU to control my X10 modules, they only accept dim level values of 0-22, so I use:
${intensity.math(((X*-22)/255)+22)}
however, HEYU accepts 0 as no dim, 22 as full dim - probably opposite your needs.  So I think this may work for your 1-6 dim level:
${intensity.math((X*6)/255)}
What the above does is multiply the given dim X value from HA-Bridge by 6, then divide it by 255 - the max value, to get the fraction of 6 of the given HA-Bridge dim value.  The math() will provide a whole number.
Hope this helps?

NOTE: With ${intensity.math((X*6)/255)}, you can naturally ask for values of 0 to 100% with the Alexa, rather than 1 through 6.

Right and that works great. Thank you very much!
So I guess that means Alexa can only work with values in percent.

Allright, thanks a lot.


Feedback footer displays in print view

The footer feedback bar displays in print view - it probably shouldn't since you can't do anything with it.
Screenshot:

Seen in Chrome 56.0.29

I can't reproduce this – what URL are you seeing this on?

Ah sorry, may be a bogus report.
Just realised it was on integration. I'd assume they'd work the same, but it looks like they don't?

Whoops. Yep. Broken it as part of #110, which is currently on integration. Pushed a fix to that branch now. Thanks.


On logout Loot Tracker deletes all loot tracker data tied to accountId tied to deleted session

This seems very wrong.

Looks like this is the issue:
FOREIGN KEY (accountId) REFERENCES sessions(user) ON DELETE CASCADE

Fixed in 55395b67084747457cd3b7057da9bc937afa2802


submodules updated

I've updated submodules and make chat works fine now

Hi @skuzminoff, could you please revert changed imports and leave only submodules changes? ) Thank you for contributing.


Upgrade AjaxHelpers to match edx-platform

Description
I've updated the AjaxHelpers class to adopt all the changes that have been made in edx-platform. My goal is to be able to then use the UI Toolkit's version in platform, and thus be able to remove the duplicated copy.
The one challenge I had is that AjaxHelpers.requests had been converted into a wrapper function that simplified its usage. To avoid having to change every caller in platform, I renamed the UI Toolkit version to be AjaxHelpers.withFakeRequests.
Post-review

[ ] Squash commits into discrete sets of changes with descriptive commit messages.

Reviewers

[ ] @bjacobel
[ ] @dan-f

If you've been tagged for review, please check your corresponding box once you've given the :+1:.

Coverage decreased (-0.3%) to 92.575% when pulling 2e2ec89ae7980f263e7d62701899813a578ef544 on andya/update-ajax-helpers into 2b9ee85b131f27e12429ed9c6100e4e7049837dd on master.

Coverage increased (+0.07%) to 92.948% when pulling f63c73151cf2d26bddc989f58b422ab37c621980 on andya/update-ajax-helpers into 2b9ee85b131f27e12429ed9c6100e4e7049837dd on master.

:thumbsup:

I see that we're using currentRequest in a lot of places. I like that it simplifies things, but there are real cases in which code will fire multiple requests concurrently. In those cases it would be useful for these APIs to support a way of specifying which request to operate on. This could be by passing in an optional request object or optional request index.

I feel like there's a bit of asymmetry between respondWithJson, respondWithError, respondWithTextError, and respondWithNoContent.

respondWithJson explicitly calls out that it converts an object to a JSON string in the response while respondWithError does this implicitly.
There's a respondWithTextError, but no respondWithText.

Furthermore, I wonder if we could consolidate this logic into a single helper method, respond:
(This same pattern can be extended to expect*Request)
var respond = function (requests, status, body) {
    var responseBody;

    if (_.isString(body)) {
        responseBody = body;
    } else if (_.isObject(body)) {
        responseBody = JSON.stringify(body);
    } else if (_.isUndefined(body)){
        responseBody = '';
    } else {
        // maybe throw an error...
    }

    // ...
};

// Respond with JSON:
AjaxHelpers.respond(requests, 200, {foo: 'bar'});

// Respond with text:
AjaxHelpers.respond(requests, 200, 'foo, bar');

// Respond with error, no body:
AjaxHelpers.respondWithError(requests, 500);

// Respond with error, JSON body:
AjaxHelpers.respondWithError(requests, 500, {error_code: 'Server error: something awful happened.'});

// Respond with error, text body:
AjaxHelpers.respondWithError(requests, 500, "We're sorry, but our servers are on fire!");

@andy-armstrong thanks for doing this! I finished my first pass on this PR.
I really like the idea of strengthening the UITK's AjaxHelpers module! Since this repository codifies our best practices and patterns, I'd like to make sure that these APIs are as flexible and consistent as possible before merging them in.

Thanks for all the great feedback @dan-f. I'm just getting to your comments now.
I love your suggested simplification of the various fake response functions. It will make it harder to just start using in edx-platform, so I think I might keep the other methods but mark them as deprecated (if that works for you). I don't want to go too long without removing edx-platform's copy of this class, because it will just keep diverging.

Regarding currentRequest, it was actually deliberate to force developers to handle each request in turn. You can see the original platform PR here:
https://github.com/edx/edx-platform/pull/9858
I'd rather not allow folks to pick and choose which request they handle. If you have three requests, you just need to verify and respond to each one in turn. Let me know what you think.

Coverage increased (+0.07%) to 93.43% when pulling 87b372b6952155352350d43bc0be12c624851ba5 on andya/update-ajax-helpers into 418df7e9d45c3ef7573e145417c7875535d49872 on master.

Coverage increased (+0.07%) to 93.43% when pulling 3ad5afe7da481b19a300b89d844bd63ba72b67e5 on andya/update-ajax-helpers into 789203b6912d17eeab4a8a752d2e7ce46f2bbf82 on master.

@bjacobel @cahrens I've finally got back to this PR. I've merged in the latest changes from edx-platform, and I've addressed Dan's feedback. Please review.

Coverage increased (+0.8%) to 94.248% when pulling f2397b06096239d9f012e14087b278cb999e25a8 on andya/update-ajax-helpers into 5257dbde90a4710c01c339738df5f38cd9bccb74 on master.

Hmmm, I don't get any of these failures locally... I'm investigating.

Coverage increased (+0.8%) to 94.254% when pulling 2b56ca6e0b96a204c406ec3c21a060366461559a on andya/update-ajax-helpers into 5257dbde90a4710c01c339738df5f38cd9bccb74 on master.

Coverage increased (+0.8%) to 94.235% when pulling 24b022ff4b3e92ba354fe1db42444029c8627be2 on andya/update-ajax-helpers into 5257dbde90a4710c01c339738df5f38cd9bccb74 on master.

@bjacobel @cahrens OK, I accidentally re-enabled some tests that clearly were still failing. I've left those lines unchanged and now I have a green build again.

LGTM.

👍 After you clean up the documentation issue I noticed.

Coverage increased (+0.8%) to 94.235% when pulling 6fc2c6530573c5d815fc712f6cf7b6f352edc7d7 on andya/update-ajax-helpers into 5257dbde90a4710c01c339738df5f38cd9bccb74 on master.

Coverage increased (+0.8%) to 94.235% when pulling dc6d6fe3e03ee656fbe2b8e9445fd2fd30cf9781 on andya/update-ajax-helpers into 5257dbde90a4710c01c339738df5f38cd9bccb74 on master.


Homebridge support

The bulbs are pretty cool and your code works just perfect through SSH, thanks for that!
Is there any chance / plans on porting it or creating plugin for homebridge?
This way would make the bulbs available on homekit and bringing control over siri

I have no experience with homebridge or homekit. I control my bulbs by using my kodi plugin that it also available in github and by using the android app "SSH button"

Thanks for the answer and your time!
Homebridge is nodejs server that allows to add custom devices to homekit and allow siri to control them.
Do you have any ideas if the playbulbs can be controlled via BLE http protocol?
Maybe combining your code with bluetooth plugin could work.. https://www.npmjs.com/package/homebridge-bluetooth

I guess that there are plugins for homebridge in order to integrate shell scripts, e.g. cmdswitch2
Some people integrated my other scripts this way: https://forum.smartapfel.de/forum/thread/3134-cmdswitch2-lässt-homebridge-abstürzen/

Didn’t think that way before. Thanks a million! Will try it 🙂

I guess that this was also the reason why people  ask me also to provide status in json format.
$ mipow Bedr json
{
  "device" : {
    "mac" : "A9:D5:4B:0D:AC:E6",
    "name" : "Bedroom",
    "battery" : "(not supported)",
    "vendor" : "Mipow Limited",
    "id" : "BTL201",
    "version" : "BTL201_v2",
    "software" : "Application version <IP_ADDRESS>",
    "cpu" : "CSR101x A05"
  },
  "state" : {
    "color" : "WRGB(255,255,0,0)",
    "effect" : {
      "effect" : "halt",
      "color" : "off",
      "time" : {
        "raw" : "255",
        "human" : "n/a"
      }
    },
    "time" : "05:32"
  },
  "timer" : [
    {
      "type" : "turnon",
      "start" : "n/a",
      "runtime" : "32",
      "color" : "WRGB(0,0,0,20)"
    },
    {
      "type" : "turnon",
      "start" : "n/a",
      "runtime" : "16",
      "color" : "WRGB(0,0,60,255)"
    },
    {
      "type" : "off",
      "start" : "n/a",
      "runtime" : "5",
      "color" : "WRGB(255,255,0,0)"
    },
    {
      "type" : "turnoff",
      "start" : "06:23",
      "runtime" : "8",
      "color" : "off"
    }
  ],
  "random" : {
    "status" : "off"
  }
}

It took me a bit to figure everything out but now I have the playbulbs working perfectly with Siri and Home app.
I've used homebridge-cmdswitch2 plugin to make it work.
Had a problem at first: was trying to launch commands within .exp extension and an unknown error was occurring. Switching to bulb.sh and copying the ~Known-bulbs to root folder fixed things up.
Thanks for your detailed help & support!
P.S. is there a way to assign a single name for 2 or more bulbs? (like bedroom could be 2 bulbs). I can probably execute 2 commands, but if there's a quick solution - it would be awesome.

No, there is no way to control two bulbs at the same time by giving the same name. The reason is that there is only one connection possible by using gatttool, which is the base of this script, at the same time.


Improve support for alternative package repositories

This PR aims at improving support for alternative repositories.
It introduces a way to specify which repository to use when looking for a dependency by providing a source like the following:
[tool.poetry.dependencies]
pendulum = {version = "^2.0", source = "custom-pypi"}

[[tool.poetry.source]]
name = "custom-pypi"
url = "https//example.com/simple"

TODO

[x] Add support for specifying a source for a specific dependency
[ ] Improve installation from alternative repositories

Pull Request Check List

[x] Added tests for changed code.
[ ] Updated documentation for changed code.

Since this is a draft, maybe its not too late to add some comment.
First of all, I like that you can configure from which repository a package should be pulled.
I feel like what I want in my daily life is probably a solution that is similar to what maven does for the Java world.  Maven allows you to

configure several repositories and give them a name with an identifier.
configure mirrors for these repositories.

The config is a bit verbose and spread over pom.xml (for the repositories) and settings.xml (https://maven.apache.org/guides/mini/guide-mirror-settings.html), but I think one should be able to map it to nice toml syntax in principle.
Examples
Company Setup
Company uses packages from pypi and a local artifact store that contains their local builds, local-index. They run a pypi-cache on a local artifactory server, but if that service is unavailable they are perfectly happy to pull packages from pypi. So they would define two remote pypi repositories, one for pypi, one for local-index. For pypi, they define a local-pypi-mirror.
Self-built packages
A developer wants to have all packages built from source on their machines (so that they can profit from optimizations). They run a local devpi service, and upload packages to an index on that devpi using devpi-builder. They don't want a fallback to remote pypi, because that would mean pulling in artifacts that did not go through their build process.


What does it do?

Hi I am in the middle of exploring UF sprinkles, i read your document but can you tell me briefly what does this sprinkle do because i cannot completely tell from Docu. Thanks :)

I originally intended make an alternative to the built in 'account' sprinkle, offloading all the authentication to services like Google Account, Microsoft Account, GitHub, or any other services that utilise OAuth 2. It also serves as a place for me to test out some overhauls of various UF systems (like permissions) that would introduce breaking changes.
However while working on this I discovered that OAuth is frankly a terrible standard, hence work stopping.
I still intend to get this to a finished production-ready state, but for the time being its on hold while I take care of other projects. (plus this project only really sprang up for a group project at uni, need some down time!)


permission denied bandit level 0

i know this sounds like such a noobish issue but when logging into the game via ssh using kali linux i am getting a permission denied when entering the correct password. is this because of an error on your end or mearly a mistake in the command

most likely, you neglected to specify the username in your ssh command. You must specify the username "bandit0". If you have more questions, please join us on IRC