flutter pub upgrade

I'm trying to upgrade dependencies in darts
but always get :
Could not resolve URL "https://pub.dartlang.org".
pub upgrade failed (69) -- attempting retry 1 in 1 seconds...
I have manual proxy to connect to my network

Does it work without the proxy?
Can you please add the output of flutter doctor here?

I cannot work without proxy
that's my flutter doctor
[√] Flutter (Channel stable, v1.9.1+hotfix.2, on Microsoft Windows [Version 10.0.18362.239], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.5)
[!] VS Code (version 1.38.1)
X Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (1 available)

@jonahwilliams I saw this also in another issue. Do we have a problem with proxy connections?

@AhmedAlaa96 for this I think this is just a network problem because you are trying to fetch dependencies from  "https://pub.dartlang.org".  and its not able get them. You'll consider configuring your proxy settings


Add rule to require ingress class name

Forces all ingresses to set an ingress class name.

Created https://github.com/XenitAB/gatekeeper-library/pull/72 to help out with this.
Hopefully we will be able to merge a few OPA configs today and cut a new release.


Updating when an asset isn't available causes an uninstall

pdtm version:
v0.0.7
Current Behavior:
Currently there is an issue with cdncheck's latest release not having any assets available (see https://github.com/projectdiscovery/cdncheck/issues/103).
In this state, PDTM knows that there is an update available for cdncheck, but when it goes to do an update, it deletes cdncheck and then cannot get the latest asset and thus leaves you without the tool after the "update"

Expected Behavior:
When the update isn't actually available, leave the system in the same state instead of removing the tool. This could mean that a GitHub downtime or similar odd problem could screw up a lot of folks tools.
Steps To Reproduce:

Install cdncheck into the pdtm bin

To do this after mine was broken I did this
wget https://github.com/projectdiscovery/cdncheck/releases/download/v1.0.3/cdncheck_1.0.3_linux_amd64.zip
unzip cdncheck_1.0.3_linux_amd64.zip
mv ./cdncheck ~/.pdtm/go/bin/

which cdncheck returns /home/kali/.pdtm/go/bin/cdncheck
Observe the need for an update with pdtm

21. cdncheck (outdated) (1.0.3) ➡ (1.0.5)

Run pdtm -update-all
Observe the error above
which cdncheck returns cdncheck not found
cdncheck is now no longer in /home/kali/.pdtm

Anything else:

This is now fixed in latest release.


Dev test: Molecules and Light Interactive Descriptions

In preparations for user interviews can you please test the interactive descriptions in this sim?
Link to sim: https://phet-dev.colorado.edu/html/molecules-and-light/1.5.0-dev.21/phet/molecules-and-light_en_phet.html?ea&a11y&supportsSound
Platforms to test:

[ ] Chrome (JAWS)
[ ] Firefox (NVDA)
[ ] Safari (VoiceOver)
[ ] iOS Safari (VoiceOver)

Repo: https://github.com/phetsims/molecules-and-light

Memory Test Results:

Calling an end here so changes can be made for tomorrow. Will likely have student workers look at it through the week to find any more hidden issues.

Thanks @KatieWoe, this has been great and we learned a lot from this. Closing.


fix(toggle) make autoHide check facetValue.count

Activating a toggle with 0 hits puts the user in a state where they can't get back to the previous state.  The toggle and many other widgets autoHide when no results are found.  This change will autoHide the toggle if changing it's state would result in 0 hits.
Issue #1185

In the case where the off state doesn't have a value (i.e. means don't use the attribute in the search) the count should be the number of hits for 'don't use' rather than the number of hits for 'false'   I'd like someone from the project to validate that before I go changing the tests to match my assumption.

Hi @rogerroelofs, thanks for reporting this issue and for the associated PR! Here are my comments:

This change will autoHide the toggle if changing it's state would result in 0 hits.

This would be in-line with what is done today for other widgets indeed. But we could maybe also do something a bit different: what if as soon as we know toggling would result in no hits we show the toggle as disabled? As for the default rendering it would mean adding disabled to the toggle checkbox.
Then we would be able to still allow the user to untoggle if the current state is 0 hits and untoggling would mean showing some hits.
What do you think?

In the case where the off state doesn't have a value (i.e. means don't use the attribute in the search) the count should be the number of hits for 'don't use' rather than the number of hits for 'false'

That's right and this we can change it.
I am blow away by the fact that you understood so much from our codebase and were able to hack in the toggle code which is not that easy to understand (read: complex, not smart :p).
If you are down to continue this PR based on my first comment then go for it, add tests if you feel like it otherwise we will do it.
Thanks a lot

@vvo @rogerroelofs I'm actually working with @rogerroelofs on this issue.
As the PR stands, this is exactly how I want it to behave in my case. I see the value of the disabled suggestion, but feel like that should be a different option (autoHideContainer is pretty explicit).
Could be disableOnEmpty or something.

@timkelty Ok this works for me, in the next instantsearch.js iteration we might default to the disabled solution.

I will update the tests, thanks

@vvo Yep, I think defaulting to disabled would be good (since you never want to toggle to see nothing). Then the container hiding feature can still be controlled via autoHideContainer

Yep, I think defaulting to disabled would be good (since you never want to toggle to see nothing). Then the container hiding feature can still be controlled via autoHideContainer

Exactly

Fixed with #1213, sorry I messed up in merging and did not include commits. I will be careful next time.

Great work everyone, hope to see it in a release soon!


Fixed bugs, added new navbar, favicons and fixed demo video bug

Closing issue #43
I have added a new and better responsive navbar along with favicons on top of webpage. Fixed a few bugs: Button alignment bug and demo video bug
https://user-images.githubusercontent.com/54456304/194435626-5c449e00-3926-4fd9-bde3-1ff666543194.mp4

@Pargat-Dhanjal The video is not playing. Please check it once and leave a comment if it plays in your case.

@Pargat-Dhanjal Please resolve the branch conflicts.

@Pargat-Dhanjal Please resolve the branch conflicts.

@Pargat-Dhanjal Please resolve it.


Integrate dotnet/fsharp from 4f5f08320 to 7b25d7f82

Notable changes include:

Addition of the FsharpUnionCase.HasFields property
FCS builds entirely on .Net Core now
Better debug information for ranges
Support for Literal values in signature files
Using memory-mapped files cross-platform to read IL.

@baronfel
Not sure if it is related to this update or my recent VS 16.4 update but on getting packages I see a new warning.
My paket.dependencies:
framework: net461
copy_local: false
references: strict

source https://www.nuget.org/api/v2
nuget FSharp.Compiler.Service
nuget FSharp.Core
nuget System.Collections.Immutable 1.5
nuget System.Reflection.Metadata 1.6

run (you can try in a separate directory with the above paket.dependencies)
paket install

as a result it shows:
Could not detect any platforms from 'netcoreapp3.1' in package System.Reflection.Metadata , please tell the package authors

After that my project builds fine and works as usual.
But the warning is new, I think you might need to know.

What version of paket are you using at the moment?

@baronfel
Yes, my bad, I forgot that paket was involved as well...
With just updated Paket version 5.241.1 the warning is no more. Sorry for the false alarm.

No problem, thank you for being proactive!


Can StreamYOLO be used in video objcet detection task？

Hi, I've tried the VOD task before, but I stopped the study due to other higher priority projects. In short, I think the variant of StreamYOLO can deal with VOD task. The recent detectors of VOD are two-stage ones, if making the single-stage detectors to work in this field may be a good job.


feat(dialyzer): Ability to disable restore cache keys & increment cache key

Since upgrading Oban, Draft has been seeing regular failures of the dialyzer step in CI. Rerunning those failing actions works successfully thanks to Paul's PR to disable the cache on job reruns.
However, those reruns fail to save the newly produced PLT due to a  ReserveCacheError: Unable to reserve cache with key (seen on this run). It seems that the cache save will always fail if there is already a value saved for that same key (issue thread on this here).
Looking into why the original dialyzer run from the oban upgrade is failing, it seems to be due to the following:

There was no exact cache key hit using the hashed mix.lock file, because this is the first run with the new mix.lock
There was an inexact cache key hit using one of the restore cache keys
Since it wasn't an exact match, mix dialyzer --plt is run. However, that doesn't build the PLT from scratch - it starts with the PLT that was restored from the inexact cache key match. That seems to be an issue for this Oban upgrade - something doesn't get rebuild that should have, and the dialyzer check fails. However, that bad PLT is saved for the new cache key and is used on all subsequent runs, resulting in failure every time.

This PR adds 2 new pieces of input to the dialyzer action to help Draft get out of this stuck state

use-fallback-cache-keys to support disabling the inexact cache key matching behavior
cache-key-version so we can increment the cache key & rebuild a new PLT for the latest mix.lock.

Testing
Failure on Draft branch before this change: https://github.com/mbta/draft/runs/6388680884?check_suite_focus=true
Success after this change: https://github.com/mbta/draft/runs/6389132615?check_suite_focus=true

@KaylaBrady doing a release will also create a tag with that name. To re-tag v1 after you've done the v1.18 release:
$ git fetch
$ git tag -f v1 v1.18
$ git push --force-with-lease origin v1


How to prevent refresh?

Thanks for the kind work. Could you let me know how to prevent refresh even when I do not watch the tab?

Is there any ways to select the camera on the node code side?

There's code here that might be able to help you pick a different camera with p5
https://github.com/processing/p5.js/issues/1043#issuecomment-513143581


fix: signer returns separate chain & CA using cert-mgr utils

Implement a solution for https://github.com/Keyfactor/ejbca-cert-manager-issuer/issues/3
It uses cert-manager pki utils ( https://github.com/cert-manager/cert-manager/blob/master/pkg/util/pki/parse_certificate_chain.go#L50-L68 ) that helps a lot dealing with leaf / chain / root.
It makes ejbca integration with cert-manager smoother and more aligned with certificateSigningRequest expected reconciliation.
It passes all current tests, but please tell me if you feel this is too ugly !
Thanks

Hey @BarthV! Thanks for the contribution. I agree with your logic to use the in-tree cert-manager crypto libraries where available. I'll keep an eye on this PR and merge the changes in when you're at a good stopping point.

commits should be stable now. I simplified the x509 to PEMbundle interface without encoding a pem string like it was before.
tests seems to need to be retriggered due to third party registry issue now 😅

Don't worry about the other CI tasks - all I care about is this one! Thanks a lot for your contribution.


babashka: 0.7.0 -> 0.7.3

Motivation for this change
New release. Should fix the issue from 0.7.2 (see https://github.com/NixOS/nixpkgs/pull/152637 for more details).
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 152735 run on x86_64-linux 1

4 packages built:

babashka
clojure-lsp
neil
vscode-extensions.betterthantomorrow.calva

CC @ericdallo @jlesquembre.


refactor: use asserts instead of process.exit

@ANGkeith Just got home from vacation.
Is this ready for review?

@ANGkeith Just got home from vacation. Is this ready for review?

Nice hope you've enjoyed your vacation! Quite a few of mr to review 😅

@ANGkeith Just got home from vacation. Is this ready for review?

Nice hope you've enjoyed your vacation! Quite a few of mr to review 😅

Nah, it's not that bad. You make awesome test cases...
I'll publish a new GCL version today or tomorrow.
Good job :+1:


Allow to start manual transaction only if auto transactions are disab…

…led in graph database #5865

Will wait for fixed one.


CallbackReturn does not name a type in Galactic

Ubuntu 20.04
ROS Galactic
Building from source
Simulation

When building husky from source (since apt packages are not avaiable, apparently), i get this error:
In file included from /home/hiram/Workspace/multi_robot_ws/src/husky/husky_base/src/husky_hardware.cpp:32:
/home/hiram/Workspace/multi_robot_ws/src/husky/husky_base/include/husky_base/husky_hardware.hpp:38:23: error: ‘CallbackReturn’ in namespace ‘hardware_interface’ does not name a type
   38 |   hardware_interface::CallbackReturn on_init(const hardware_interface::HardwareInfo & info) override;
      |                       ^~~~~~~~~~~~~~
/home/hiram/Workspace/multi_robot_ws/src/husky/husky_base/include/husky_base/husky_hardware.hpp:47:23: error: ‘CallbackReturn’ in namespace ‘hardware_interface’ does not name a type
   47 |   hardware_interface::CallbackReturn on_activate(const rclcpp_lifecycle::State & previous_state) override;
      |                       ^~~~~~~~~~~~~~
/home/hiram/Workspace/multi_robot_ws/src/husky/husky_base/include/husky_base/husky_hardware.hpp:50:23: error: ‘CallbackReturn’ in namespace ‘hardware_interface’ does not name a type
   50 |   hardware_interface::CallbackReturn on_deactivate(const rclcpp_lifecycle::State & previous_state) override;
      |                       ^~~~~~~~~~~~~~
/home/hiram/Workspace/multi_robot_ws/src/husky/husky_base/src/husky_hardware.cpp:194:21: error: ‘CallbackReturn’ in namespace ‘hardware_interface’ does not name a type
  194 | hardware_interface::CallbackReturn HuskyHardware::on_init(const hardware_interface::HardwareInfo & info)
      |                     ^~~~~~~~~~~~~~
/home/hiram/Workspace/multi_robot_ws/src/husky/husky_base/src/husky_hardware.cpp:313:21: error: ‘CallbackReturn’ in namespace ‘hardware_interface’ does not name a type
  313 | hardware_interface::CallbackReturn HuskyHardware::on_activate(const rclcpp_lifecycle::State & /*previous_state*/)
      |                     ^~~~~~~~~~~~~~
/home/hiram/Workspace/multi_robot_ws/src/husky/husky_base/src/husky_hardware.cpp:332:21: error: ‘CallbackReturn’ in namespace ‘hardware_interface’ does not name a type
  332 | hardware_interface::CallbackReturn HuskyHardware::on_deactivate(const rclcpp_lifecycle::State & /*previous_state*/)
      |                     ^~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/husky_hardware.dir/build.make:63: CMakeFiles/husky_hardware.dir/src/husky_hardware.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/husky_hardware.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

This is the same problem that #279 fixed, but was not merged. I have fixed the problem in a similar way and wanted to merge it here. I am aware that Galactic is EOL, but is it possible to fix this problem?

@henriquenunez Can you apply the changes from here: https://github.com/orjano-max/uia_master_husky/commit/9a98b3792485946da4da0ff857bce88a48815e84.  We are not looking to support Galactic and Humble is located here: https://github.com/clearpathrobotics/clearpath_common

Yes, that is what I did, although slightly different. But anyway thank you.

On 29 May 2024, at 00:14, Tony Baltovski @.***> wrote:
@henriquenunez https://github.com/henriquenunez Can you apply the changes from here: @.*** https://github.com/orjano-max/uia_master_husky/commit/9a98b3792485946da4da0ff857bce88a48815e84. We are not looking to support Galactic and Humble is located here: https://github.com/clearpathrobotics/clearpath_common
—
Reply to this email directly, view it on GitHub https://github.com/husky/husky/issues/309#issuecomment-2136123487, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHU5CESBRB7KYVCGM7GYMO3ZETXUBAVCNFSM6AAAAABINDHDZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZWGEZDGNBYG4.
You are receiving this because you were mentioned.


(ConnectedRouter) connect function always re-rendering when route change

Same issue at here, still re-rendering
Version:
 "react": "16.7.0-alpha.0",
 "react-dom": "16.7.0-alpha.0",
  "react-redux": "^6.0.0",
"react-redux": "^6.0.0",
"redux": "^4.0.0",
"connected-react-router": "^6.2.1",
"react-router": "^4.3.1",
 "react-router-dom": "^4.3.1",

Line 24 at https://codesandbox.io/s/qx15olry2q
Swith ConnectedRouter to Router and click the button to see the different

I have exactly the same issue. If i am switch back to Router, the page doesn't reload.

Try to use<EMAIL_ADDRESS>Solved the problem for me.


Secure Gateway doesn't response with HTTPS

Hello,
i want to set up a secure Gateway but only http will be used. I followed the instructions by istio to setup a secure Gateway. So i created my own Certifacts and created the K8s secret  bookinfo-credential. My setup:
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -subj '/O=example Inc./CN=example.com' -keyout example.com.key -out example.com.crt

openssl req -out bookinfo.example.com.csr -newkey rsa:2048 -nodes -keyout bookinfo.example.com.key -subj "/CN=bookinfo.example.com/O=bookinfo organization"

openssl x509 -req -days 365 -CA example.com.crt -CAkey example.com.key -set_serial 0 -in bookinfo.example.com.csr -out bookinfo.example.com.crt

kubectl create -n istio-system secret tls bookinfo-credential --key=bookinfo.example.com.key --cert=bookinfo.example.com.crt
secret/bookinfo-credential created

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: bookinfo-gateway
spec:
  selector:
    istio: ingressgateway # use istio default controller
  servers:
  - port:
      number: 443
      name: https
      protocol: HTTPS
    hosts:
    - "*"
    tls:
      credentialName: bookinfo-credential
      mode: SIMPLE
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: bookinfo
spec:
  hosts:
  - "*"
  gateways:
  - bookinfo-gateway
  http:
  - match:
    - uri:
        exact: /productpage
    - uri:
        prefix: /static
    - uri:
        exact: /login
    - uri:
        exact: /logout
    - uri:
        prefix: /api/v1/products
    route:
    - destination:
        host: productpage
        port:
          number: 9080

Now curling my productpage...

Why is http used? It should be HTTP/2.
Does anybody know a solution for my problem to setup a secure gateway?

Probably your curl is not new enough to support http2? Not sure why it does not print ALPN negotiation, for example this is output from my curl command:
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=AU; ST=Some-State; O=Internet Widgits Pty Ltd; CN=api.company.com
*  start date: Aug  6 21:24:32 2017 GMT
*  expire date: Aug  4 21:24:32 2027 GMT
*  issuer: C=AU; ST=Some-State; O=Internet Widgits Pty Ltd; CN=api.company.com
*  SSL certificate verify result: self signed certificate (18), continuing anyway.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55b39b7e0e20)
> GET / HTTP/2
> Host: www.bookinfo.com
> user-agent: curl/7.79.1
> accept: */*

Thanks for your Input. Which curl Version and command are you using?

curl/7.79.1

And your executed command?

curl -kv https://www.bookinfo.com:443 --resolve www.bookinfo.com:443:<my-ingress-ip> --insecure

Thanks for the hint concerning the curl version. I updated my curl version to the latest one and now everything working fine! 👍


Enhancements: docker dev and prod for agenta web

Setup docker-compose scripts for dev and prod
Dev and prod env vars separation
Added build workflow in github actions

EE Version PR: https://github.com/Agenta-AI/agenta_ee/pull/38

Thanks for the PR Small question, why are we keeping the .sample files ?

I kept because they were there before. Although you are right, there's no reason for them.

@MohammedMaaz cool let's then remove them, I don't see anywhere that they used.

@MohammedMaaz cool let's then remove them, I don't see anywhere that they used.

Done

@aakrem I've added the .env file back in the codebase as in the case of NextJS, it is not meant to hold the secrets but only the defaults. Here is an excerpt from NextJS official docs: https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables


Investigate lbry.tv residuals

Yes indeed. When you want to login, its saying log-in to lbry.tv.
Also when sharing links like my referral link is still lbry.tv.
I think this can be cleaned-up quite a bit! If you want users to use odysee URLs instead.


Reorganize web scraper related cogs into one folder

Is your feature request related to a problem? Please describe.
Messy cogs folder.
Describe the solution you'd like
Figure out which web scrapers should go in the same folder and put them in a new folder.

anime, commits, and overlord facts scrapers put in the information_scrapers folder


Update fs2-core, fs2-io to 3.0.6

Updates

co.fs2:fs2-core
co.fs2:fs2-io

from 2.5.8 to 3.0.6.
GitHub Release Notes - Changelog - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "co.fs2" } ]

labels: library-update, semver-major

Closed in #112


HiDPI support?

Are you have HiDPI edition, like this?
https://github.com/zufuliu/notepad2/releases/download/v4.24.03r5146/Notepad2_HD_en_AVX2_v4.24.03r5146.zip

So in short, yes it does have a dpi setting

ecode (eepp GUI) supports non-integer scaling, and it will auto scale the UI depending on your screen DPI by default, and it can be configured at any time.


Can not select friend servant in selecting friend servant page

Preparation

[X] I tested the latest release
[X] I looked at other issues (even the closed ones)
[X] I read the Troubleshooting Guide

FGO server
JP
FGA build number
1707
Describe the bug
FGA could automatically select the battle stage, however, when showing the scene of friend servant selecting, it just suddenly stops. The scene seems freezed.
Video
https://user-images.githubusercontent.com/30427210/177280369-16e0bc86-208e-48d6-8cad-4251931edd64.mp4
Device model
Realme GT
Android version
12
Screen size
2400*1080
RAM
12GB

Duplicate of #1211


Remove Microsoft.AspNetCore.Testing dependency

@pranavkm I shouldn't have the final word here because I can't merge PRs in this repo. Suggest adding another reviewer or three.

/azp run


is there any way to note down or control the random seeds?

I use the default init function "uniform" to init weights, but each time I get different result with the same code and data. I can't reproduce the result. I wonder is there any way to note down or control the random seeds?
Thank you!

Easy: seed nump.random.seed() before you import anything from Keras. Most examples in the example folder follow this scheme.

Thank you!

imdb_lstm.py example has "np.random.seed(1337)" in the top, befor ekeras imports. But I get different results (test accuracy) every time I run it. What am I missing?

I can confirm this issue, i realized after implemented my code that i was previously running on CPU using  torch. I ran a bunch of tests on GPU (Tesla K40c) and obtained  different result with the same hyperparameters.
So i verified this issue on the imdb_cnn.py example and i can confirm the issue. What am i missing?
First run:
20000/20000 [==============================] - 30s - loss: 0.3159 - acc: 0.8649 - val_loss: 0.3745 - val_acc: 0.8274
Second run:
20000/20000 [==============================] - 30s - loss: 0.3174 - acc: 0.8636 - val_loss: 0.3757 - val_acc: 0.8260
Third run:
20000/20000 [==============================] - 30s - loss: 0.3169 - acc: 0.8634 - val_loss: 0.3815 - val_acc: 0.8228
The validation accuracy loss i low but it is more sensible on my code.
4634/4634 [==============================] - 7s - loss: 0.0065 - acc: 0.9978 - val_loss: 0.7320 - val_acc: 0.8778
4634/4634 [==============================] - 7s - loss: 0.0068 - acc: 0.9978 - val_loss: 0.7667 - val_acc: 0.8802
4634/4634 [==============================] - 7s - loss: 0.0046 - acc: 0.9978 - val_loss: 0.8354 - val_acc: 0.8667

I am unable to get keras to reproduce the same result despite setting the numpy seed before importing anything.

I've set the numpy.random.seed before importing anything. The result of each run is different. Any help would be appreciated.

Be sure to use Theano dev version, otherwise sometimes Theano use numpy
random generator in way that is very hard to predict, so this look like the
seed don't work:
http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions
Just in case this is your problem.
On Sat, Oct 17, 2015 at 11:05 PM, Alexander<EMAIL_ADDRESS>wrote:

I've set the numpy.random.seed before importing anything. The result of
each run is different. Any help would be appreciated.
—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/439#issuecomment-148973049.

Actually I've tried using @nouiz's suggestion, and I still can't get consistent results.
Can we reopen this issue?

@nouiz's solution worked for me. Thanks.

@nouiz I am using Keras 0.3.1 and theano 0.7.1a1, and I am setting numpy seed just after numpy import and before importing any keras or numpy related staff, and I still have this non reproducibility problem. Please @nuiz, does your answer mean that those "hard to predict" ways in which theano uses numpy are corrected on the current release candidate (0.8) or were they supposed to be corrected on 0.7.1a1?

I don't remember when that was fixed. You can use Theano 0.8rc1 or the
development version and it should work.
On Thu, Mar 17, 2016 at 7:41 AM, volvador<EMAIL_ADDRESS>wrote:

@nouiz https://github.com/nouiz I am using Keras 0.3.1 and theano
0.7.1a1, and I am setting numpy seed just after numpy import and before
importing any keras or numpy related staff, and I still have this non
reproducibility problem. Please @nuiz https://github.com/nuiz, does
your answer mean that those "hard to predict" ways in which theano uses
numpy are corrected on the current release candidate (0.8) or were they
supposed to be corrected on 0.7.1a1?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/439#issuecomment-197840712

@volvador, if you're using python 3, you need to set a flag before running: PYTHONHASHSEED=0 (I've just commented about this in https://github.com/fchollet/keras/issues/850#issuecomment-231350983).

I am looking for something slightly different:
I want to repeat training/evaluation for 15 times, and each time with a different random seed.
Then take the average of f-scores. How to do this in python?
should I reload numpy and keras ? should I delete numpy and keras from memory ?
`
for i in range(0,15):
 import numpy as np

 import datetime

 np.random.seed(datetime.datetime.now().microsecond)

 from keras import ....

 train()

 evaluate()

 A_CODE_TO_UNLOAD_OR_RESET_NUMPY_KERAS()

`
Does del np , del keras work ? what about reloading the modules ?
what is the correct way of doing this ?

Sorry to high-jack this issue.
I read a few time about the PYTHONHASHSEED=0 trick for python 3. Is this
needed only for Theano back-end or also for Tensorflow? Mostly, I would
like to know if this is something we should change in Theano (and not in
user code or Keras). If it is in Theano, do you have code that reproduce
it? I don'T know when we can work on it, but we should make an issue on
Theano if this is the case.
thanks
On Mon, Aug 29, 2016 at 9:50 AM, farmeh<EMAIL_ADDRESS>wrote:

I am looking for something slightly different:
I want to repeat training/evaluation for 15 times, and each time with a
different random seed.
Then take the average of f-scores. How to do this in python?
should I reload numpy and keras ? should I delete numpy and keras from
memory ?
`
for i in range(0,15):
import numpy as np
import datetime
np.random.seed(datetime.datetime.now().microsecond)
from keras import ....
train()
evaluate()
A_CODE_TO_UNLOAD_OR_RESET_NUMPY_KERAS()
`
Does del np , del keras work ? what about reloading the modules ?
what is the correct way of doing this ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/fchollet/keras/issues/439#issuecomment-243129406, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALC-6RFL1VTSkxqXoFukXSIk3yVID2Iks5qkuPBgaJpZM4FfPGF
.

@nouiz, as I understand it, this flag only affects Python variables whose "types [are] covered by the hash randomization". So this might affect Theano only if it somehow relies on the order of elements in a dictionary, for example. What has a much higher chance of being affected by this flag is actually user code that calls Theano, which probably has some mappings between tokens and ids, for example (and is thus affected by random initialization of weights, etc.).

For tensorflow backend, please see https://github.com/fchollet/keras/issues/2280
For theano: numpy seed worked @nouiz ! :) It was indeed crucial to upgrade to Theano dev.

For me it was not necessary to import numpy and call numpy.random.seed(42) before any Keras imports. It worked even though I called it in the __main__:
import numpy as np
import matplotlib.pyplot as plt

from keras.engine import Input
from keras.engine import Model
from keras.layers import Convolution2D, MaxPooling2D

class MaxPoolTests:

    def __init__(self, filter_sizes, nb_row, nb_col):

        in_x = Input(shape=(nb_row, nb_col, 1), name='in_x')

        convolutions = list()

        for window_size in filter_sizes:

            conv = Convolution2D(nb_filter=1, nb_row=window_size, nb_col=nb_col,
                                 border_mode='valid',
                                 activation='tanh',
                                 name='conv_{:d}'.format(window_size))(in_x)

            max_pool = MaxPooling2D(name='maxpool_{:d}'.format(window_size),
                                    pool_size=(1, 1),
                                    border_mode='valid')(conv)

            convolutions.append(max_pool)

        self.model = Model(input=[in_x], output=convolutions)

if __name__ == '__main__':

    np.random.seed(42)

    m = 10; n = 10

    nn = MaxPoolTests([2, 3], nb_row=m, nb_col=n)
    nn.model.compile(optimizer='adam', loss='mse')

    x = np.zeros((1, m, n, 1))

    for i,v in enumerate(np.linspace(-1, 1, m)):
        x[0, i, i, 0] = v

    y = nn.model.predict(x)

    plt.figure()
    plt.imshow(y[0][0,:,:,0])
    plt.show()

    print('All done.')

I recently found that using the ADAM optimizer has a stochastic element to it that may be causing the randomness you are seeing if the previously commented solutions did not work. I switched my optimizer to Adagrad to remove the randomness from the ADAM optimizer and it seems to allow for repeated results. I tested by taking a snapshot of the weight values (using model.save_weights('*.h5) method) and used a h5diff tool to check that the weights were indeed equal for repeated tests after 1 epoch of training the data. Hopefully this helps some people trying to get repeated results for research/testing.

@ProgrammerJed  can you please point out to where exactly that randomness is in ADAM optimizer ?

@ProgrammerJed and @MahmoudIsmail88 - I am using the adam optimizer and have no problems with randomness as long as I set the seed before running model.compile and model.fit.   Have a look at code below, I always get the same results with the same seed.
`def cnn_model():
model = Sequential()
# create model
model.add(Conv1D(filters=150, kernel_size=3, padding='same', activation='relu', input_shape=(30, 400)))
model.add(GlobalMaxPooling1D())
model.add(Dense(250, activation='relu'))
model.add(Dense(3, activation='sigmoid'))
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
return model
CREATE AND FIT MODEL
np.random.seed(21)
m = cnn_model()
m.fit(train_xx, one_hot_y, epochs=5, batch_size=320)`

@farmeh Did you ever find anything out about that? I am also curious about what the best way to select seeds in a loop is.

@ProgrammerJed
Thank you man.

@stevenzim did you test on GPU tensorflow?

Calling
np.random.seed(42)
Before any keras model worked for me

One other thing to be careful of is if you're running any other sort of randomness before you initialize the variables, any change will affect the random assignment.

In Tensorflow 2.0 you can set random seed like this :
import tensorflow as tf
tf.random.set_seed(221)

from tensorflow import keras
from tensorflow.keras import layers

model = keras.Sequential( [
layers.Dense(2,name = 'one'),
layers.Dense(3,activation = 'sigmoid', name = 'two'),
layers.Dense(2,name = 'three')])

x = tf.random.uniform((12,12))
model(x)


REFACTOR-#2217: remove unused env requirements

Signed-off-by: Anatoly Myachev<EMAIL_ADDRESS>
What do these changes do?

[ ] commit message follows format outlined here
[ ] passes flake8 modin
[ ] passes black --check modin
[ ] signed commit with git commit -s
[x] Resolves #2217
[ ] tests added and passing

I've rerun CI to fix test coverage, it shows 15% diff


[FEATURE] Show the updated_at timestamp of the configuration value

There is an updated_at timestamp available for every configuration value saved in the database.
This will be shown when there is a value available.

@ericthehacker Are you still maintaining this repo? @lewisvoncken reached out to me on the Magento Community Engineering Slack Workspace, asking this:

How are you doing? I was wondering if you are still maintaining the Config Shope Hints module? there are several unmerged pull requests


Add ability to select different locations in the "Cookie House" sample app

Closes #3277
Code Changes

[X] Add a docker-compose.yml and update npm run dev script to spin up a development database
[X] Add react-select dependency for a nice select component
[X] Add a LocationSelect component to the footer which can select between a list of locations
[X] Link the LocationSelect to a ?location= URL query param (for power users to set that themselves!)
[X] Append the ?location= query param to the fides.js?location= script tag, to force prefetching the location
[X] Tweak the home page and footer styles to be delightful ✨
[X] Update Privacy Center's location "prefetch" logic to set the geolocation option to match latest fides.js updates

Steps to Confirm

[x] Use `nox -s "fides_env(test)" and open the Cookie House sample app at http://localhost:3000
[x] In the Javascript console, check window.Fides.geolocation defaults to undefined
[x] Select a location from the footer (e.g. "California") and check that the page reloads and window.Fides.geolocation is set to the location data (e.g. US-CA)

Pre-Merge Checklist

[X] All CI Pipelines Succeeded
Documentation:

[X] documentation complete, PR opened in fidesdocs
[X] documentation issue created in fidesdocs

[X] Issue Requirements are Met
[X] Relevant Follow-Up Issues Created
[ ] Update CHANGELOG.md
[X] For API changes, the Postman collection has been updated

Description Of Changes
This adds the ability to "force" a location to the Cookie House sample app, which'll be a killer feature for testing & demoing all our location-specific consent tooling.

I've got some Cypress tests to update! 😄
But otherwise I think this is looking good.


ARROW-4149: [CI/C++] Parquet test misses ZSTD compression codec in CMake 3.2 nightly builds

Parquet Zstd tests were enabled regardless ARROW_WITH_ZSTD which can be set to OFF depending CMake's version.
Crossbow build:

~kszucs/crossbow/build-392~
kszucs/crossbow/build-395

Codecov Report

Merging #3299 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3299      +/-   ##
==========================================
- Coverage   89.73%   89.72%   -0.01%
==========================================
  Files         481      481
  Lines       68956    68956
==========================================
- Hits        61875    61872       -3
- Misses       7081     7084       +3

Impacted Files
Coverage Δ

cpp/src/parquet/column_writer-test.cc
99.55% <100%> (ø)
:arrow_up:

cpp/src/arrow/csv/column-builder.cc
95.45% <0%> (-1.95%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c71d27f...54e6437. Read the comment docs.

@xhochy resolved


TLS 1.2?

I have an API endpoint that requires TLS 1.2. Right now any request I make to that endpoint fails with:
** (Tesla.Error) adapter error: {:failed_connect, [{:to_address, {'test-api.tokenex.com', 443}}, {:inet, [:inet], {:tls_alert, 'handshake failure'}}]}

Elixir 1.3.4
Erlang/OTP 19

What adapter are you using? By default tesla uses httpc and I'm not sure it
supports ssl at all. You might want to try with hackney instead.
On Tue, 8 Nov 2016 at 20:17, Michael Clifford<EMAIL_ADDRESS>wrote:

I have an API endpoint that requires TLS 1.2. Right now any request I make
to that endpoint fails with:
** (Tesla.Error) adapter error: {:failed_connect, [{:to_address, {'test-api.tokenex.com', 443}}, {:inet, [:inet], {:tls_alert, 'handshake failure'}}]}
Elixir 1.3.4
Erlang/OTP 19
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/teamon/tesla/issues/35, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAfkwZEdXqc2iqnRM7L19G_BCb-JzMlks5q8Mq-gaJpZM4KszWw
.

I've tried with both hackney and ibrowse. Using httpc I was able to issue a request to https://www.google.com

Actually I am not trying with Hackney and get the following:
** (UndefinedFunctionError) function Tesla.Adapter.Hackney.call/2 is undefined (module Tesla.Adapter.Hackney is not available)
     stacktrace:
       Tesla.Adapter.Hackney.call(%Tesla.Env{body: "{\"TokenScheme\":1,\"TokenExID\":\"XXX\",\"Data\":\"4242424242424242\",\"APIKey\":\"XXX\"}", headers: %{"content-type" => "application/json"}, method: :post, opts: [], query: [], status: nil, url: "https://test-api.tokenex.com/TokenServices.svc/REST/Tokenize"}, nil)
       lib/tesla/middleware/core.ex:5: Tesla.Middleware.Normalize.call/3
       lib/tesla/middleware/json.ex:21: Tesla.Middleware.JSON.call/3
       (tokenex) lib/tokenex.ex:15: TokenEx.tokenize/2
       test/tokenex_test.exs:9: (test)

Everything is setup correctly:
iex(1)> Code.ensure_loaded?(:hackney)
true

@cliffom I just pushed some basic SSL test cases - they pass on all adapters.
I can take a closer look at your specific endpoint, if you can't share it in this thread drop me an email at i @ teamon.eu

This seems to be more of a general issue with erlang & TLS 1.2 since all three adapters return
[error] SSL: :hello: ssl_alert.erl:97:Fatal error: handshake failure

I'll keep digging.

Yea that is the exact issue I'm having. I agree, I think it is a TLS 1.2 issue and Erlang but don't know enough of the details to dig further. Let me know what you find, my project is basically halted because of this :(

https://github.com/benoitc/hackney/issues/344 seems to be related

Workaround for now:
defmodule Client do
  use Tesla
  adapter :hackney, [ssl_options: [{:versions, [:'tlsv1.2']}]]
end

iex(1)> Client.get("https://www.bbc.co.uk").status
200

This worked perfectly! Thank you for the assistance. So it appears the error is inherent to Erlangs SSL implementation?

Yes, it seems like erlang's ssl module is trying various versions in order that does not conform to spec (or something close to that).
Let's keep this issue open in case someone else encounter it until it is properly resolved.


How to change screen resolution in a phantomjs from selenium?

Hello.
This is clear phantomjs code for js (This code changes the resolution.):
var WebPage = require('webpage');
page = WebPage.create()

page.onInitialized = function () {
    page.evaluate(function () {
        window.screen = {width: 1600, height: 900, availWidth: 1600, availHeight: 900};
    });
};

page.open('http://browserspy.dk/screen.php');
page.onLoadFinished = function () {
    page.render('ScreenShot' + '.png');
    phantom.exit();
}

How to change on selenium? (Please don't suggest to change the viewportSize. This is not the screen resolution.)
Thank you very much.

Use ResizeWindow. From the documentation:
    // ResizeWindow changes the dimensions of a window. If the name is empty, the
    // current window will be maximized.
    ResizeWindow(name string, width, height int) error


Incorrect method when adding a product to a channel (store).

Fixed the post to put method according to the documentation.
create-products-channel-assignments

Thanks!


Filter out duplicate comments.

Fixes #9
Workaround for https://github.com/eslint/espree/issues/184

LGTM


feat(entities-shared): JSON/YAML forms [KHCP-9967][KHCP-9968][KHCP-9986]

Summary
https://konghq.atlassian.net/browse/KHCP-9967
https://konghq.atlassian.net/browse/KHCP-9968
https://konghq.atlassian.net/browse/KHCP-9986
Figma of the form milestone
Behind Feature Flag Khcp-9892-json-yaml-milestone-2

Add the ability to copy the JSON/YAML configurations from the Entity forms
Add the POST/PUT endpoints in the forms
Add the GET endpoints in the config tables
Fix bug caught during oncall review ConfigCardDisplay: TypeError: Cannot convert undefined or null to object
Refactor JsonCodeBlock and YamlCodeBlock into reusable components for use across Config Tables and all Forms
Add Component tests for JsonCodeBlock and YamlCodeBlock as well as consuming components

Here, the tags is shown as empty string "", but the API only accepts an array/empty array. So the copied payload becomes invalid.


07-design-report-in-power-bi-desktop-enhanced.md

Source:
Click OK
Current Translation:
Haga clic en OK.
Suggested Translation:
Haga clic en Aceptar.

Run bugfix tool and waiting for result.


Incorrect Icon for "Copy" Action

The current UI in newDot uses an icon that is traditionally used for "Paste" actions, instead of a traditionally "copy" style icon.
Current icon, a clipboard style graphic:

Example of traditional cut/copy/paste icons, with a duplicates sheet of paper to represent "copy" action:

This is super confusing to anyone that has a mental subconscious bias to expect the traditional icon when looking for the 'copy' option.
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[ ] MacOS / Chrome / Safari
[x] MacOS / Desktop

Version Number: 1.2.89-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Slack conversation: https://expensify.slack.com/archives/C03TME82F/p1680109421560969

Triggered auto assignment to @slafortune (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Bug0 Triage Checklist (Main S/O)

[ ] This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
[ ] This bug is not a duplicate report (check E/App issues and #expensify-bugs)

If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead

[ ] This bug is reproducible using the reproduction steps in the OP. S/O

If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
If the reproduction steps aren't clear and you determine the correct steps, please update the OP.

[ ] This issue is filled out as thoroughly and clearly as possible

Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.

[ ] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@shawnborton - should this get the external lable?

Not yet - I need to create the icon first and then we can add external. Will keep you posted!

@shawnborton, @slafortune Whoops! This issue is 2 days overdue. Let's get this updated quick!

No update

I love it. Updating it is way outside my wheelhouse. I'll post it to #engineering-chat though and see if someone more familiar with App can spare a few mins to do it.

I can grab this and update it today 🤚

Reviewing label has been removed, please complete the "BugZero Checklist".

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.2.99-6 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

https://github.com/Expensify/App/pull/17008

If no regressions arise, payment will be issued on 2023-04-20. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

[ ] External issue reporter
[ ] Contributor that fixed the issue
[ ] Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

Merged PR within 3 business days of assignment - 50% bonus
Merged PR more than 9 business days after assignment - 50% penalty

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

[ ] [@NikkiWines] The PR that introduced the bug has been identified. Link to the PR:
[ ] [@NikkiWines] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[ ] [@NikkiWines] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[ ] [@slafortune] Determine if we should create a regression test for this bug.
[ ] [@NikkiWines] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[ ] [@slafortune] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

PR done within 3 business days - paid aimane $1500 https://github.com/Expensify/App/pull/17008


Add new generic unprocessable entity page

https://trello.com/c/Uzpw1bDA/243-document-how-error-pages-work-on-govuk
Related to: https://github.com/alphagov/govuk-puppet/pull/10346
Extracted from: https://github.com/alphagov/email-alert-frontend/pull/743

@benthorner I don't think we should have this one as a generic error page as it stops us from rendering any non-generic 422 pages, unless I've missed some trick we have?
When we render a form with errors it's appropriate to use the 422 status code however this view would clobber the page.
We have a long, long running problem with this same situation with gone pages where they get clobbered by the page from static which means we have to do the rather grim thing of rendering a 200 response for gone pages with a customised response. Example:  https://www.gov.uk/government/publications/public-inquiries-timeliness-of-case-listings--2

@kevindew yes, that's right. We wanted to add this in favour of the previous "override of an override" approach. The thinking here is that we already return "200" for some unprocessable entity responses, in order to get around Slimmer casting them all to a "500".
While we have a related PR to remove that problem, I think we still need some kind of fallback error page. The problem is: we can't have a fallback and have specific error handling, unless we replicate the error pages in each app (or remove them from Nginx).
I agree it's not semantically correct to return "200"s in order to handle errors more specifically. The positive side is that our apps don't need to be watertight in order to show something vaguely helpful. I guess the downside is bad caching behaviour.
Looking at our logs in more details (see comment), perhaps 422 can be an exception to the rule, and the app must cope with it. This means we'd need to do some work on a few apps, though. Do you think we should adopt a different approach?

Example: https://www.gov.uk/government/publications/public-inquiries-timeliness-of-case-listings--2

Err, this might not be the finest example of a need for this: "duplication error"

@kevindew yes, that's right. We wanted to add this in favour of the previous "override of an override" approach. The thinking here is that we already return "200" for some unprocessable entity responses, in order to get around Slimmer casting them all to a "500".
While we have a related PR to remove that problem, I think we still need some kind of fallback error page. The problem is: we can't have a fallback and have specific error handling, unless we replicate the error pages in each app (or remove them from Nginx).

Yup, that's the real problem. It's frustratingly inconvenient to follow HTTP spec and have the nginx pages. I tried looking into whether you could configure nginx to allow more control but that didn't look simple.

I agree it's not semantically correct to return "200"s in order to handle errors more specifically. The positive side is that our apps don't need to be watertight in order to show something vaguely helpful. I guess the downside is bad caching behaviour.
Looking at our logs in more details (see comment), perhaps 422 can be an exception to the rule, and the app must cope with it. This means we'd need to do some work on a few apps, though. Do you think we should adopt a different approach?

Yup I'm keen for 422 to be something apps support. I worry that once this change settles in it'll be quite hard to get out of (as is the case with gone).

Example: https://www.gov.uk/government/publications/public-inquiries-timeliness-of-case-listings--2

Err, this might not be the finest example of a need for this: "duplication error"

Ha yup, though to me it's even worse that this returns a 200. I don't think there is anything preventing search engines from indexing it 😱 https://www.google.com/search?q=site:www.gov.uk+"The+information+on+this+page+has+been+removed+because+it+was+published+in+error."&sxsrf=ALeKk025PHewu8FVDfQUS4qNvKP26IhULQ:1589302256799&filter=0&biw=1210&bih=754
On a tangent I do wonder what the right way should be to be in a world where you can have fallback error pages and maintain the ability to override them, particularly if we start moving to a world where we do much less nginx configuration (as we already live in with govuk-docker). I guess we need some static error pages to handle cases where routes don't proxy to any app, so they may have to exist in some form. Then app wise we've got a situation where we're configuring individual error pages for each publishing app (that we might want to simplify for re-use) and thus may want to use the same mechanism in frontend apps which would bring it within Rails control for a less rigid approach.

@kevindew so my current plan is to proceed with the work we're doing on https://github.com/alphagov/static/pull/2167, so that we remove a second layer of error handling on GOV.UK. I think this is non-contentious, as it'll be a net improvement in the quality of the error pages seen by the user.
We then have a separate question of whether to revisit this specific issue with 422 response codes, and whether we should remove the fallback. This would mean:

Coping a generic 422 template into not-sure-how-many apps.
Adding support for 422 into Slimmer (or maybe just any code)

For me, the first point is a smell. To try and resolve it, perhaps we can introduce this as functionality of GovukPublishingComponents, with consuming apps doing something like:
# config/routes.rb
mount GovukPublishingComponents::Errors, at: "/"

# config/application.rb
config.exceptions_app = routes

Although this would be beneficial if GOV.UK becomes a more interactive site, it's hard to see the benefits in the medium term. I can add a card for us to try and do this, but we may need to abandon the idea if it starts blowing up, as it's increasingly tangential to our original aim. If we have to abandon it, we could extend the docs we're trying to write, to indicate the future intent.
How does that sound?

Yup, the mounting of an error controller from govuk_publishing_components sounds like a good approach. It'd be nice to have the configuration of Content Publisher easier to drop into apps for error handling and having frontend and backend consistent. Do agree it could blow up in complexity though.
I end up rather conflicted around this as I do appreciate the convenience and ubiquity of the nginx configuration, but I do feel it encourages dubious HTTP patterns, annoying work arounds and surprising effects.
Anyway thanks for carrying on the conversation about this 🙂


Rails assumes aws-sdk is used for Image uploads.

Find a way to set the uploading to utilize the filesystem so we don't have to sign up for Amazon Web Services.

@michaelburtonray Will have to test file writing permissions on the server


[Location] Query endpoint forwards location data

Update the /query endpoint so that it can receive a latitude, longitude and range parameter in the request body, which are all numbers. These parameters are then also included in the FCM message already being sent from this same function to metrics apps.

closed by #97


[BUG] Timber\Post->terms() throws error if 'fields' parameter has value other than 'all'

Expected Behavior
I'm running the example code found  at https://timber.github.io/docs/v2/getting-started/a-post-archive/#an-example-related-posts
$context = Timber::context();

$post = $context['post'];

$context['related_posts'] = Timber::get_posts([
    'post_type' => 'post',
    'posts_per_page' => 3,
    'no_found_rows' => true,
    'orderby' => 'date',
    'order' => 'DESC',
    'post__not_in' => [$post->ID],
    'category__in' => $post->terms([
        'taxonomy' => 'category',
        'fields' => 'ids',
    ]),
]);

It should get a post collection posts from the same category.
Actual behavior
Fatal error: Uncaught Error: Timber\Factory\TermFactory::build(): Argument #1 ($term) must be of type WP_Term, int given
in /timber/src/Factory/TermFactory.php on line 136

The issues seems to come from the 'fields' parameter in the category query. Setting the param to any other value than 'all' will result in the same error.
Steps to reproduce behavior
Use Timber 2 rc.1 and run the above code
Notes
No response
What version of Timber are you using?
Timber 2 rc.1
What version of WordPress are you using?
WordPress 6.3.1
What version of PHP are you using?
PHP 8.1
How did you install Timber?
Installed or updated Timber through Composer

Hm, as far as I understand the code, the problem is actually caused by this function in TermFactory.php:
protected function from_wp_term_query(WP_Term_Query $query): iterable
{
    return \array_map([$this, 'build'], $query->get_terms());
}

$query->get_terms() (actually: WP_Term_Query::get_terms() might - depending on the fields argument inside it - return very different things (WP_Term[]|int[]|string[]|string), but the code expects it returns a ẀP_term[] in all cases (which it only does, if fields is not set or set to all or  all_with_object_id). So I guess this requires quite some work here (and I do not see how the whole code/approach could work if someone sets fields to, e.g., count)?
See: https://developer.wordpress.org/reference/classes/wp_term_query/get_terms/

Resolved in #2806.


[V1.5][Logic] Add TagList Command and Fix Unfavourite Command bug

Add TagList Command to display all the tags in the address book.
Fix the bug: unfavourite command will clear the person list in the UI.
Change the prefix "/not" to "/" in the NameContainsTagsPredicate to optimize user experience.
Update User Guide

Coverage increased (+0.1%) to 82.873% when pulling 3ae316bffcc7ef5d7a5b65b6dd7f725d763abae5 on wangyiming1019:yiming-V1.5 into 8e63b90c9754ff443cd632bff06088b0e7693c47 on CS2103AUG2017-W09-B2:master.


Custom Resource Definition (CRD) for profiles

The idea is to create a CRD on top of profiles, which helps to:

focus on a better user experience
provides a useful abstraction, like the minimum amount of syscalls needed for container runtimes like runc
easier create profiles on a higher level

cc @cmurphy

I started working on a rough schema definition for this: https://gist.github.com/cmurphy/dc67e2d1214947972f41b7caa2ebf3ae
Going to look into using kubebuilder to translate the yaml into Go and build the controller.

Awesome, thank you for the update @cmurphy! I’ll give it a look m. (cc @pjbgf @hasheddan)

I really like the proposal in the GitHub gist! One thing you've already mentioned is that some fields are not part of the runtime spec. Now it gets a bit tricky: The main reason of that is because before the runtime spec event existed, docker invented the original seccomp profile types there:
https://github.com/moby/moby/blob/master/api/types/seccomp.go (used by docker nowadays)
But, we also have types there:

https://github.com/containers/common/blob/master/pkg/seccomp/types.go
used by CRI-O and Podman to not have a need to vendor docker
https://github.com/containerd/containerd/blob/master/contrib/seccomp/seccomp_default.go#L51
used by containerd, I think they only rely on LinuxSeccomp from the spec and do not use moby's types

I like the idea to just rely on the runtime-spec in the first place, because that's the only one where a common standard exists. On the other hand we have to find a way to express the capability bounding (see includes, excludes in your proposal, or here in containerd.

Just added some comments directly in the gist, but in short: yes, brilliant stuff from @cmurphy! 👍
@saschagrunert I would agree with your suggestion to start with support for the runtime-spec. If we document that non-OCI fields are only supported on the ConfigMap implementation we should have no problems.
I have a feeling that most users won't be using things such as includes/excludes. But if I am wrong, we can always rely on the community to feedback and ask for it later.

Thanks for the comments! I started a rough implementation here: https://github.com/kubernetes-sigs/seccomp-operator/pull/125
I added KILL_THREAD but haven't addressed the other questions of whether to include properties from the runtime spec vs docker vs containerd etc yet.


Cross-module signatures, non-compilable methods and instance hashtable fixes

This is a combination of cleaned-up versions of changes I previously made to fix various CoreCLR tests.

Gracefully handle non-compilable methods without crashing the compiler;

Improvements in handling of cross-module signatures;

Implement CoreCLR-compatible method hashing.

I have rebased the change against Simon's latest commits and I applied bits of cleanup I noticed while self-reviewing the change. Please let me know if you're aware of additional blocking feedback that needs to be addressed before this change can be merged in.


[rust] Fix "UnexpectedEof" error when bbox results includes first item

Note: The error doesn't occur until reading the next item.
tldr; we had some bad accounting for tracking the file position that only affected bbox calculations that covered the first feature in the buffer + at least one other feature.
What's going on here
We want to set count in the iter initializer.
FGB includes count in the header, but it's optional. Because flatbuffer doesn't have null types, we can't distinguish between count being unset and count truly being zero.
So the way we detect an "empty" FGB is to try to read from the feature buffer in the iter's initializer. If the feature buffer is empty, this read will fail and we can immediately mark the FGB reader as "finished", which allows the iter to be well behaved elsewhere.
The other factor is that, as we read features, we track the offset into the feature buffer (cur_pos) so that we know how far we need to Seek from where we currently are when jumping to the next feature in the BBOX
results.
So, every time we read a feature_size, we've read four bytes and then when we read the feature we've moved whatever the feature_len encoded in those four bytes.
BUT THE THING IS - we weren't updating the cur_pos immediately after
reading feature_len, we updated it after reading the feature, and
included an extra 4 bytes at that point.
That usually works.
However - in the case of the very first feature, we've already added the
"4" to the feature offset. That's a sentinel value we check for to infer
it's the first feature so that we don't read the feature_len again.
So in the case that the bbox included the first feature, we were adding
an extra 4 to the cur_pos.
The fix is
We now advance cur_pos immediately after we read the feature length. After reading the feature, we only add feature_len, not feature_len+4.
I've also replaced the finished bool and the cur_pos == 4 check with a more explicable state enum.
Fixes https://github.com/flatgeobuf/flatgeobuf/issues/361

@michaelkirk is this ready to merge?


Demos don't work: Blocked loading mixed active content

When I try to view the demo https://leaflet.github.io/Leaflet.heat/demo/ in either firefox or chrome it does not load. In the console I see
Blocked loading mixed active content “http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css”
This seems to be because the files it tries to load are on http urls, while the page of the demo has https. When I try to view it as http it works. ( http://leaflet.github.io/Leaflet.heat/demo/)

The demos are not working on the http or https urls.


Getting error: 0xef

Hello,
Im new to esp32 i want to implement a modbus RTU master using esp32.
I took serial2 as modbus and made as per that. the esp32 initialized as master and it sending request to slave slave also responding but I am getting
sending Modbus request...
error: 0xef
I used Serial port monitor to debug and got
[04/03/2020 18:42:40] Written data (COM5)
    01 04 08 00 0a 00 64 00 32 00 14 5e 05            ......d.2..^.
[04/03/2020 18:42:43] Read data (COM5)
    01 04 00 00 00 04 f1 c9                           ......ñÉ
[04/03/2020 18:42:43] Written data (COM5)
    01 04 08 00 0a 00 64 00 32 00 14 5e 05            ......d.2..^.
[04/03/2020 18:42:46] Read data (COM5)
    01 04 00 00 00 04 f1 c9                           ......ñÉ
[04/03/2020 18:42:46] Written data (COM5)
    01 04 08 00 0a 00 64 00 32 00 14 5e 05            ......d.2..^.
[04/03/2020 18:42:49] Read data (COM5)
    01 04 00 00 00 04 f1 c9                           ......ñÉ

I cant find this ef anywhere in the library files and from where it is printing. what is this error?

Error 0xEF is indeed not defined. Could you share your code?

/*

Copyright 2018 Bert Melis

This example reads 2 words (4 bytes) from address 52 of a server with id 1.
address 52 = register 30053 (Eastron SDM630 Total system power)
The ESP is connected to a max3485 with pins 17 (RX), 4 (TX) and 16 as RTS.

*/

#include <Arduino.h>
#include <esp32ModbusRTU.h>
#include <algorithm>  // for std::reverse

esp32ModbusRTU modbus(&Serial2);  // use Serial1 and pin 16 as RTS

void setup() {
  Serial.begin(115200);  // Serial output
  Serial2.begin(115200, SERIAL_8N1, 17, 16, true);  // Modbus connection

  modbus.onData([](uint8_t serverAddress, esp32Modbus::FunctionCode fc, uint16_t address, uint8_t* data, size_t length)
  {
    Serial.printf("id 0x%02x fc 0x%02x len %u: 0x", serverAddress, fc, length);
    for (size_t i = 0; i < length; ++i)
    {
      Serial.printf("%02x", data[i]);
    }
    std::reverse(data, data + 4);  // fix endianness
    Serial.printf("\nval: %.2f", *reinterpret_cast<float*>(data));
    Serial.print("\n\n");
  });
  modbus.onError([](esp32Modbus::Error error)
  {
    Serial.printf("error: 0x%02x\n\n", static_cast<uint8_t>(error));
  });
  modbus.begin();

}

void loop() {
  static uint32_t lastMillis = 0;
  if (millis() - lastMillis > 3000) {
    lastMillis = millis();
    Serial.print("sending Modbus request...\n");
    modbus.readInputRegisters(0x01, 0, 4);
  }
}

The error comes from an error code returned by the modbus slave. See these lines:
https://github.com/bertmelis/esp32ModbusRTU/blob/f85417c00fb0d937a4a78a31750513c9bd84d3c8/src/ModbusMessage.cpp#L247
Could you switch lines A and B? (I know, my readme is not clear on this but so is the specification)

Hi, I am trying to read a RS485 distance meter and I am getting  error: 0xe0
I have used pins 16 and 17 for serial2 comm and pin 4 as
My code is as below:
/*

Copyright 2018 Bert Melis

This example reads 2 words (4 bytes) from address 52 of a server with id 1.
address 52 = register 30053 (Eastron SDM630 Total system power)
The ESP is connected to a max3485 with pins 17 (RX), 4 (TX) and 16 as RTS.

*/
#define MAX485_RE_NEG  4
#define RX_PIN        16 //RX2
#define TX_PIN        17 //TX2

#include <Arduino.h>
#include <esp32ModbusRTU.h>
#include <algorithm>  // for std::reverse

esp32ModbusRTU modbus(&Serial2, MAX485_RE_NEG);  // use Serial2 and pin 4 as RTS

void setup() {
  Serial.begin(115200);  // Serial output
  //Serial2.begin(9600, SERIAL_8N1, 17, 4, true);  // Modbus connection
  Serial2.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN, true);

  modbus.onData([](uint8_t serverAddress, esp32Modbus::FunctionCode fc, uint16_t address, uint8_t* data, size_t length) {
    Serial.printf("id 0x%02x fc 0x%02x len %u: 0x", serverAddress, fc, length);
    for (size_t i = 0; i < length; ++i) {
      Serial.printf("%02x", data[i]);
    }
    std::reverse(data, data + 4);  // fix endianness
    Serial.printf("\nval: %.2f", *reinterpret_cast<float*>(data));
    Serial.print("\n\n");
  });
  modbus.onError([](esp32Modbus::Error error) {
    Serial.printf("error: 0x%02x\n\n", static_cast<uint8_t>(error));
  });
  modbus.begin();

}

void loop() {
  static uint32_t lastMillis = 0;
  if (millis() - lastMillis > 10000) {
    lastMillis = millis();
    Serial.print("sending Modbus request...\n");
    modbus.readInputRegisters(0x01, 00, 2);             //changed to address 00 as per attached manual
  }
}

For your reference please check device included device manual.
mhmodbus-rtu （Ultrasonic level sensor RS485 ）.pdf

Assistance highly welcome.
Thanks in advance
Paulo

Please find the device manual below:
mhmodbus-rtu （Ultrasonic level sensor RS485 ）.pdf

How does your circuit look like? What parts do you use?
I tested with

a (genuine) MAX3485
120 Ohm resistor on both ends of the RS485 wire
680 Ohm biasing resistors on  A and B lines (B to 3.3V and A to GND)
Connect GND of the ESP via a 100 Ohm resistor to the GND of the device

Error 0E indicates a timeout. Your sensor isn't receiving the data or isn't responding. You could attach a logic analyzer to the RX/TX of the ESP (NOT the RS485 line!) and see what is going out/coming in.

Dear bertmelis, thanks a for taking the time to respond to my message.

That was the basis for my circuit, just attach the distance meter in place of this power meter on the picture.
ESP32 + MAX485 boards.
I have done some tests.
Installed a 250ohms resistor between ground and 4-20ma line and attached a voltmeter in parallel.
Voltage varies when I point the distance meter to walls at different distances so I assume the distance meter is working.
Also changed the code to send some commands on the line: modbus.readInputRegisters(0x01, 00, 2);
(like 0x00) and the result indicated invalid command.
I also have ordered an USB to RS485 converter to try to see what is actually coming from the Distance meter and it is to arrive soon.
Thanks again
Paulo

Can you swap A and B? on the MAX485 board?
If I found the right circuit on the Internet, this board biases the A line to Vcc and the B line to ground (can be checked with your multimeter) whereas it should be opposite.

See also http://e2e.ti.com/cfs-file/__key/telligent-evolution-components-attachments/13-143-00-00-00-26-49-60/RS485-2D00-Polarity-Conventions.pdf
Mind that your ESP uses UART and treats HIGH as binary 1 and LOW as binary 0. That's why the Serial needs to be "inverted".
If somebody reads along, please correct me if I'm wrong. It's been a long time since I left school

Hi, did invert A/B and there is a change in another code I have that uses ModbusMaster.h (//https://github.com/4-20ma/ModbusMaster) instead of (esp32ModbusRTU.h)
Originally the former returned "illegal Function" but when I change A<->B then it starts returning "Response timed out"
Using esp32ModbusRTU.h with A and B as originally described:
sending Modbus request...
error: 0xe0
Swapping A<->B:
No change.
I did make a change on the the code that might be affecting the sketch:
  //Serial2.begin(9600, SERIAL_8N1, 17, 4, true);  // Modbus connection
  Serial2.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN, true);  (See sketch above)

I did not figure out why the 4 on the line above as I am connecting with Serial2 pins 16 and 17.
I did add:
  pinMode(4, OUTPUT);
  // Init in receive mode
  digitalWrite(4, HIGH);  (tried high and low but no change)

As I said, I ordered a USB to RS485 adapter to check communication between the PC and the Distance Meter and it is to arrive soon.
Thanks
Paulo

Make sure you have this
#define MAX485_RE_NEG  4
#define Slave_ID       1
#define RX_PIN        16
#define TX_PIN        17

esp32ModbusRTU modbus(&Serial1, MAX485_RE_NEG);

// in void setup()
Serial1.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN, true);

Hi, DE & RE as in the Fritzing diagram above.
Code as of now:
/*
Copyright 2018 Bert Melis

This example reads 2 words (4 bytes) from address 52 of a server with id 1.
address 52 = register 30053 (Eastron SDM630 Total system power)
The ESP is connected to a max3485 with pins 17 (RX), 4 (TX) and 16 as RTS.
*/

#define RX_PIN        16 //RX2
#define TX_PIN        17 //TX2
#define MAX485_RE_NEG  4
#define Slave_ID       1

#include <Arduino.h>
#include <esp32ModbusRTU.h>
#include <algorithm>  // for std::reverse

esp32ModbusRTU modbus(&Serial2, MAX485_RE_NEG);

void setup() {
  Serial.begin(115200);
  Serial2.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN, true);  // Modbus connection

  modbus.onData([](uint8_t serverAddress, esp32Modbus::FunctionCode fc, uint16_t address, uint8_t* data, size_t length) {
    Serial.printf("id 0x%02x fc 0x%02x len %u: 0x", serverAddress, fc, length);
    for (size_t i = 0; i < length; ++i) {
      Serial.printf("%02x", data[i]);
    }
    std::reverse(data, data + 4);  // fix endianness
    Serial.printf("\nval: %.2f", *reinterpret_cast<float*>(data));
    Serial.print("\n\n");
  });
  modbus.onError([](esp32Modbus::Error error) {
    Serial.printf("error: 0x%02x\n\n", static_cast<uint8_t>(error));
  });
  modbus.begin();

}

void loop() {
  static uint32_t lastMillis = 0;
  if (millis() - lastMillis > 10000) {
    lastMillis = millis();
    Serial.print("sending Modbus request...\n");
    modbus.readInputRegisters(0x00, 02, 2);
  }
}

Console output still:
sending Modbus request...
error: 0xe0
USB to RS485 will arrive tomorow and will provide additional info to aid finding the problem.

What you can do is use Serial as Modbus interface, connect the board via USB to your computer and look in your terminal what the ESP is actually sending. The ESP should be sending a modbus message. Mind that you don't invert the signal.
I use Termite (in Windows) for that, with the Hexadecimal view plugin (https://www.compuphase.com/software_termite.htm). You might as well use Realterm.

Do you mean the A and B from the USB to Serial adapter in parallel with the Arduino Serial2 (in my case)?
Sounds like a good idea.
I have Putty in my PC, I will try it and see if it works otherwise go to one of your suggestions.
Thanks

I'm not completely following...
When you pass Serial instead of Serial1 to the modbus object, the modbus messages will show up on your terminal. You'll want to display them in hex instead of ASCII, but that depends on your terminal software.
You then just leave out Serial1 as it is not used.

I am also a bit lost here.
ESP32 has 3 serial. I am using "Serial", that is connected to the USB and the PC as serial console monitor.
I am using "Serial2" on GPIO16 and 17 to connect to the RS232 to RS485 (*) converter as shown on the sketch above.
I am not using "Serial1" in my project.
I understood your suggestion to be attaching  the USB to RS485 converter that is arriving on the PC and the A&B wires to the A&B wired of the Distance meter (that are currently connected to the RS232 to RS486 (*) converter to see what the ESP32 is sending and receiving as the sketch executes.
Is that what you meant?
In any case I will first connect the USB to RS485 adapter to the PC and A&B to the Distance meter and send the commands directly to it and see if it is working as expected.
Then I will try the connection above or even remove the distance meter all together and try the two RS485 between them to see what happens.
Will keep you posted, thanks so far
Paulo

I have got the RS485 to USB converter but no good comunication so far.
My circuit:

First I tested with a simple sketch to transfer console input:
#define TX             17
#define RX             16

void setup() {
  Serial.begin(115200);
  Serial2.begin(9600, SERIAL_8N1, RX, TX);
}

void loop() {
  char text[1];
  if (Serial2.available()) {
    Serial.write(Serial2.read());
  }
  if (Serial.available()) {
    char c = Serial.read();
    Serial2.write(c);
    Serial.write(c);
  }
}

Output as below:

What I type on the Serial Console goes through the ESP32 and reaches Termite.
What I type on Termite is not shown on the ESP32 console.
Now with the main sketch as below:
/*
Copyright 2018 Bert Melis

This example reads 2 words (4 bytes) from address 52 of a server with id 1.
address 52 = register 30053 (Eastron SDM630 Total system power)
The ESP is connected to a max3485 with pins 17 (RX), 4 (TX) and 16 as RTS.
*/

#define RX_PIN        16 //RX2
#define TX_PIN        17 //TX2
#define Slave_ID       1
#define MAX485_RE_NEG  4

#include <Arduino.h>
#include <esp32ModbusRTU.h>
#include <algorithm>  // for std::reverse

esp32ModbusRTU modbus(&Serial2, MAX485_RE_NEG);

void setup() {
  Serial.begin(115200);
  Serial2.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN, true);  // Modbus connection

  modbus.onData([](uint8_t serverAddress, esp32Modbus::FunctionCode fc, uint16_t address, uint8_t* data, size_t length) {
    Serial.printf("id 0x%02x fc 0x%02x len %u: 0x", serverAddress, fc, length);
    for (size_t i = 0; i < length; ++i) {
      Serial.printf("%02x", data[i]);
    }
    std::reverse(data, data + 4);  // fix endianness
    Serial.printf("\nval: %.2f", *reinterpret_cast<float*>(data));
    Serial.print("\n\n");
  });
  modbus.onError([](esp32Modbus::Error error) {
    Serial.printf("error: 0x%02x\n\n", static_cast<uint8_t>(error));
  });
  modbus.begin();

}

void loop() {
  static uint32_t lastMillis = 0;
  if (millis() - lastMillis > 10000) {
    lastMillis = millis();
    Serial.print("sending Modbus request...\n");
    modbus.readInputRegisters(0x00, 02, 2);
  }
}

Did not find a reason for, in the first test with just a serial input and Termite input, why what I type on Termite is not echoed on the ESP32 serial console.
Also cannot understand what the main sketch is sending to the Termite terminal.
Can you make something out of it?
Thanks
Paulo

You've connected the level converter wrong. high voltage is MAX485 side, low is ESP. The MAX485 should be powered with 5V, not 3.3V. You might as well fried your pins doing this.

Sorry, my mistake on the drawing, level converter is inverted on the drawing.
MAX485 is been powered by 5v.
Here is the corrected diagram:

Paulo

Still testing with the manual input of commands.
With the following code I can, but not simultaneously, send data in both directions for testing purposes:
#define MAX485_RE_NEG  4
#define TX             17
#define RX             16

void setup() {
  Serial.begin(115200);
  Serial2.begin(9600, SERIAL_8N1, RX, TX);
  pinMode(MAX485_RE_NEG, OUTPUT);
  // Init in receive mode
  //digitalWrite(MAX485_RE_NEG, LOW);     //When enabled Termite to Serial Console OK
  digitalWrite(MAX485_RE_NEG, HIGH);      //When enabled Serial Console to Termite OK,
                                                                    //To work as defined above only one can be active at a time
}

void loop() {
  if (Serial2.available()) {
    while (Serial2.available()){
      Serial.write(Serial2.read());
    }
  }
  if (Serial.available()) {
    while(Serial.available()){
      char c = Serial.read();
      Serial2.write(c);
      Serial.write(c);
    }
  }
}

Strange. Maybe some task priority issues. I'll check things out. You can fiddle yourself if you alter the task priority directly in the code.

Just to be sure: how much time passes between sending the request and receiving the error? Should be about 5 secs.

I am not that advanced, don't know how to change task priority.
It does not feel it takes that long, looks like it is immediate.

Just tested again.
From the moment I see the message "sending Modbus request..." on the console screen to see the "ff f7 ff fb ff fb 5d 89                          ÿ÷ÿûÿû]‰   " at Termite takes less than 1 second. From te Termite message showing to the Console screen showing "error: 0xe0" about 5 seconds as you anticipated.

Just tested with another sketch I have for modbus.
Code as below:
#include "ModbusMaster.h" //https://github.com/4-20ma/ModbusMaster
/*!
  http://www.bizkit.ru/en/2019/02/21/12563/
  We're using a MAX485-compatible RS485 Transceiver.
  Rx/Tx is hooked up to the hardware serial port at 'Serial'.
  The Data Enable (DE) and Receiver Enable (RE) pins are hooked up as follows:
*/
#define MAX485_RE_NEG  4 //D4 RS485 has a enable/disable pin to transmit or receive data. Arduino Digital Pin 2 = Rx/Tx 'Enable'; High to Transmit, Low to Receive
#define Slave_ID       1
#define RX_PIN        16 //RX2
#define TX_PIN        17 //TX2
// instantiate ModbusMaster object
ModbusMaster modbus;
void preTransmission(){
  digitalWrite(MAX485_RE_NEG, HIGH); //Switch to transmit data
}
void postTransmission(){
  digitalWrite(MAX485_RE_NEG, LOW); //Switch to receive data
}
long lastMillis = 0;

void setup(){
  pinMode(MAX485_RE_NEG, OUTPUT);
  // Init in receive mode
  digitalWrite(MAX485_RE_NEG, LOW);
  Serial.begin(115200);
  // Modbus communication runs at 9600 baud
  Serial2.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN);
  modbus.begin(Slave_ID, Serial2);
  // Callbacks allow us to configure the RS485 transceiver correctly
  modbus.preTransmission(preTransmission);
  modbus.postTransmission(postTransmission);
}

void loop() {
  long currentMillis = millis();
  if (currentMillis - lastMillis > 10000)   {
    uint8_t result = modbus.readInputRegisters(0x00, 1);

    Serial.print("Result: ");
    Serial.println(result);

    if (getResultMsg(&modbus, result))    {
      Serial.println();
      double res_dbl = modbus.getResponseBuffer(0);
      String res = "Distance: " + String(res_dbl) + " m\r\n";
      Serial.println(res);
    }
    lastMillis = currentMillis;
  }
}

bool getResultMsg(ModbusMaster *node, uint8_t result) {
  String tmpstr2 = "\r\n";
  switch (result){
  case node->ku8MBSuccess:
    return true;
    break;
  case node->ku8MBIllegalFunction:
    tmpstr2 += "Illegal Function";
    break;
  case node->ku8MBIllegalDataAddress:
    tmpstr2 += "Illegal Data Address";
    break;
  case node->ku8MBIllegalDataValue:
    tmpstr2 += "Illegal Data Value";
    break;
  case node->ku8MBSlaveDeviceFailure:
    tmpstr2 += "Slave Device Failure";
    break;
  case node->ku8MBInvalidSlaveID:
    tmpstr2 += "Invalid Slave ID";
    break;
  case node->ku8MBInvalidFunction:
    tmpstr2 += "Invalid Function";
    break;
  case node->ku8MBResponseTimedOut:
    tmpstr2 += "Response Timed Out";
    break;
  case node->ku8MBInvalidCRC:
    tmpstr2 += "Invalid CRC";
    break;
  default:
    tmpstr2 += "Unknown error: " + String(result);
    break;
  }
  Serial.println(tmpstr2);
  return false;
}

Console and Termite as below:

In this case, when the distance meter is connected to A&B instead of the USB to RS485 addapter the error is: "Illegal Function"
Thanks
Paulo

I might spotted a but in the Arduino core. I'll try this evening.

Can you try after changing the false to true on this line:
https://github.com/espressif/arduino-esp32/blob/4d98cea085d619bed7026b37071bd8402a485d95/cores/esp32/esp32-hal-uart.c#L362

My esp32-hal-uart.c looks different:
void uartFlush(uart_t* uart)
{
    if(uart == NULL) {
        return;
    }

    UART_MUTEX_LOCK();
    while(uart->dev->status.txfifo_cnt || uart->dev->status.st_utx_out);

    //Due to hardware issue, we can not use fifo_rst to reset uart fifo.
    //See description about UART_TXFIFO_RST and UART_RXFIFO_RST in <<esp32_technical_reference_manual>> v2.6 or later.

    // we read the data out and make `fifo_len == 0 && rd_addr == wr_addr`.
    while(uart->dev->status.rxfifo_cnt != 0 || (uart->dev->mem_rx_status.wr_addr != uart->dev->mem_rx_status.rd_addr)) {
        READ_PERI_REG(UART_FIFO_REG(uart->num));
    }

    xQueueReset(uart->queue);

    UART_MUTEX_UNLOCK();
}

Arduino? Platformio? Something else? Which version?

Arduino IDE

Hi, some more tests that may be of interest:

As you see with the USB to RS485 converter and using this test software I found it is possible to send and receive messages from the ultrasonic distance meter but curiously not by sending 0x04 as specified on the manual as to read input register.
I am trying to consult the manufacturer on that but at least indicate the device seems to be working ok.

Thank you for testing. I can't find what's wrong though. The following weeks I'll be on holiday so I have very limited access. But I'll try to support.

Hi, thanks for your time. If you get something new it will be of help.
I will keep trying to get something as I need to have this thing operational one way or the other.
If I happen to find the solution I will post it here.
Have a good holiday.


fix(app): activate edit menu if provided only

ensures we only show the edit menu, if the
client provides it
the empty tab does not provide it, thus
it is disabled without a tab open

Closes #1070

The general question is: When should we update the menu / reset it?

When the old tab is unmounted
When the new tab is shown
All tabs must update it? Or will the app update / reset it implicitly.

This PR implements the following:

App updates menu implicitly on tab activation, assuming there will always be a tab shown
If a tab would like to provide menu entries, it must pass that via onShown or onChanged

This needs additional investigation, as the proposed implementation seems to break the component updating, most notably the exports button disappearing.

Addressed the issue. Should work :+1: now.

@barmac Could you review this and verify it works on Mac, too?

Sure, I'm finishing tests in a sec.


vLLM is returning the prompt with the result

How to prevent vLLM from returning the prompt back with the result?

If you use api_server then in vllm.entrypoints.api_server.py remove prompt from
text_outputs = [                 prompt + output.text for output in request_output.outputs             ]

It should be controlled by a flag in the request.

I added echo = false while sending the request, but I got an error. I think echo is not implemented?

If you use api_server then in vllm.entrypoints.api_server.py remove prompt from
text_outputs = [ prompt + output.text for output in request_output.outputs ]

I will try this

@viktor-ferenczi Is it implemented? Or can we prepare a PR?

这个问题解决了吗？我现在也碰到这个问题了，在requests发请求的时候加参数提示没有这个参数


More tolerance on timeouts or errors (failed after 1 try)

Failed to load http://www.reddit.com/user/Dollywinks/submitted/.json after 1 attempts
I've gotten this message for several reddit users over the past few days...

Should be fixed in 1.1.8. At least that's what people are telling me.


Error in basic usage example

Hi, Morris. I'm the guy from the gandalf post.
I installed the HX711_multi library and tried to run the basic code.
This time the library was recognized but failed to zero the load cells. I don't quite understand if I have to change some value before running the code.

@TadeuClemente it looks like the readings for the zero operation all failed to read. This means either the HX711 isn't wired or configured properly, or the signal is noisy or something. Have you configured the GPIO Pin and SCK pin to match your input and clock pin? Please share your code.

I only want to take raw data from HX711 (strain variations for deformation analysis), then i used the code you shared for basic usage in your post about "HX711_multi". I did some changes in the code, changing the first Dout_pin to 5 and Sck_pin to 6. The VCC pin is in 3.3V.
I have another question about the "src.HX711 multi" module. When I run the code, the "src" module is not recognized.
`#!/usr/bin/env python3
from hx711_multi import HX711
from time import perf_counter
import RPi.GPIO as GPIO  # import GPIO
#init GPIO (should be done outside HX711 module in case you are using other GPIO functionality)
GPIO.setmode(GPIO.BCM)  # set GPIO pin mode to BCM numbering
dout_pins = [5,21,16,26,19]
sck_pin = 6
weight_multiples = [4489.80, 4458.90, 4392.80, 1, -5177.15]
hx711 = HX711(dout_pins=dout_pins, sck_pin=sck_pin, all_or_nothing=False, log_level='CRITICAL')  # create an object
hx711.reset()
hx711.zero()
hx711.set_weight_multiples(weight_multiples=weight_multiples)
#read until keyboard interrupt
try:
while True:
start = perf_counter()
raw_vals = hx711.read_raw(readings_to_average=10)
weights = hx711.read_weight(use_prev_read=True)
read_duration = perf_counter() - start
print('\nread duration: {:.3f} seconds'.format(read_duration))
print('raw', ['{:.3f}'.format(x) if x is not None else None for x in raw_vals])
print(' wt', ['{:.3f}'.format(x) if x is not None else None for x in weights])
except KeyboardInterrupt:
print('Keyboard interrupt..')
except Exception as e:
print(e)
#cleanup GPIO
GPIO.cleanup()
`

@TadeuClemente go ahead and remove the extra dout pins from the list (short for digital out) and set the multiple to 1, so you should only have:
dout_pins = [5]
sck_pin = 6
weight_multiples = [1]

all_or_nothing is set to False, so you shouldn't need to worry about extra dout pins, but perhaps that is part of the issue if those pins are floating.
Regarding the src.hx77_multi: that is part of the example script if you are running it locally next to the src code. Otherwise, as you have in your screenshot correctly, you should import hx711_multi just like any other package.

Removing the extra pins the code flowed, but in a loop always returning the same value for 'wt' and sometimes for 'raw'.
In a second test the error was different, as shown in the screenshot.
In the first test I inserted approximately 700 grams before running the code. In the second test, weighted or not, it returns the same error.
I apologize for so many doubts, but my deadline is running out and I need to finish this part of the project.

It seems to me like there's an issue with your hardware and you aren't receiving back measurements with enough frequency to accurately zero your scale, or you're only reading a single measurement and expecting it to always be a valid read. What value are you using for readings_to_average when you zero and when you read? What part of your code is printing these raw and wt values? I'm interested in how you got "-0.130" because I believe that would require you to set a multiple value higher than 1. The measurements you get out raw should be integers.
In my example I use 30 samples to zero to ensure enough samples are valid for the zero value. I then read 10 samples for each read operation to ensure I get a few valid samples per read.
With my ADCs, I found that the readings are often bad, so you need to pull many samples to get good data. If you use the lc.reads print I mentioned in the last thread (and below), you should see all 30 or 10 samples that you just read so you can see how dirty the data is.

I'm going to copy the code I shared on the other repo here for reference:
If you want the really really raw data, you can access that within the load_cell data after performing the read above:
for lc in hx711._load_cells:
    print(lc.raw_reads) # these are the 2's complemented values read bitwise from the hx711
    print(lc.reads) # these are the raw values after being converted to signed integers

I haven't changed anything other than what you recommended earlier.

Average values are:
#reset ADC, zero it
hx711.reset()
hx711.zero(readings_to_average=30)
hx711.set_weight_multiples(weight_multiples=weight_multiples)
and,
raw_vals = hx711.read_raw(readings_to_average=10)

What is printed when you add the deep level raw data prints that I mentioned above? Added print statements:
try:
    while True:
        start = perf_counter()
        raw_vals = hx711.read_raw(readings_to_average=10)
        weights = hx711.read_weight(use_prev_read=True)
        read_duration = perf_counter() - start
        print('\nread duration: {:.3f} seconds'.format(read_duration))
        print('raw', ['{:.3f}'.format(x) if x is not None else None for x in raw_vals])
        print(' wt', ['{:.3f}'.format(x) if x is not None else None for x in weights])
        for lc in hx711._load_cells:
            print(lc.raw_reads) # these are the 2's complemented values read bitwise from the hx711
            print(lc.reads) # these are the raw values after being converted to signed integers
except KeyboardInterrupt:
    print('Keyboard interrupt..')
except Exception as e:
    print(e)

FYI, you can share code on here by using three of the little funny-apostrophes (grave accent) at the top right of your keyboard: ```

The same error appears when I add the deep level raw data.
At this point I had inserted 900g into the structure before running the code

Here's the complete code.
#!/usr/bin/env python3

from hx711_multi import HX711
from time import perf_counter
import RPi.GPIO as GPIO  # import GPIO

#init GPIO (should be done outside HX711 module in case you are using other GPIO functionality)
GPIO.setmode(GPIO.BCM)  # set GPIO pin mode to BCM numbering

dout_pins = [5]
sck_pin = 6
weight_multiples = [1]

hx711 = HX711(dout_pins=dout_pins, sck_pin=sck_pin, all_or_nothing=False, log_level='CRITICAL')  # create an object
hx711.reset()
hx711.zero()
hx711.set_weight_multiples(weight_multiples=weight_multiples)

# read until keyboard interrupt
try:
    while True:
        start = perf_counter()
        raw_vals = hx711.read_raw(readings_to_average=10)
        weights = hx711.read_weight(use_prev_read=True)
        read_duration = perf_counter() - start
        print('\nread duration: {:.3f} seconds'.format(read_duration))
        print('raw', ['{:.3f}'.format(x) if x is not None else None for x in raw_vals])
        print(' wt', ['{:.3f}'.format(x) if x is not None else None for x in weights])
        for lc in hx711._load_cells:
            print(lc.raw_reads) # these are the 2's complemented values read bitwise from the hx711
            print(lc.reads) # these are the raw values after being converted to signed integers
except KeyboardInterrupt:
    print('Keyboard interrupt..')
except Exception as e:
    print(e)

# cleanup GPIO
GPIO.cleanup()

Please try to run your code with no weight on the structure and make sure that it is on a flat surface and isn't moving/vibrating. These sensors are very sensitive to noise and will not be able to zero if there is a lot of noise. Potentially, we will need to open up our noise filtering thresholds in your case? Try to run until you get past the zeroing and read at least one datapoint like you did earlier.
Please also confirm your hardware is configured as expected. The default in my code is Channel A and configured with a gain of 128. You can view the PDF provided in the docs folder to see how the HX711 channel wiring works.

I did as you recommended and the most common failures were:

I don't understand why couldn't zero the load cells, Cable connections are right, as you can see here:

Should I insert an external power supply into the E+ input? Because I'm only using 3.3V from raspberry in VCC input.

Personally, we use 5V, so I would try that next. You Pi has a 5V output as well, it's just the pin right above your orange wire in your picture.

The error still remains with 5V.
I removed all pins E + E- A + and A- and ran the code. The same error appeared (Failed to zero load cells).  I'm almost giving up

Can you verify your clock pin in triggering properly? Put a voltmeter on that output from your Pi and confirm you can set it high and low at command. I'm not sure what else to check, other than manually triggering your HX711 to make sure the inputs and outputs are what you expect.Verify the power the board is there, plus the clock is triggering. Wire the clock pin directly to your input pin and confirm you can read back what you write out, that sort of thing.

You may be able to still read the raw values from the zeroing read operation if you ignore the error when zeroing. Try the below code and let's see what the deep 2's complement values are that you're getting from your ADC:
try:
    hx711.zero(readings_to_average=30)
except: pass
print(vars(hx711._load_cells[0])) # this will print the entire first load cell object (note: latest version of hx711-multi renamed this attribute to "_adcs"

Closing this for now as I haven't heard back in a while. Based on other users not experiencing this issue and my own codeset still functioning, I expect this to be a hardware issue.
Please re-open if there's more help I can provide.


feat: format float with f

Change-Id: I49978402f0e1dc8ecf77ad884fa0e43803fe88f4

When dumping struct to csv file, using 'E' to format a float value will use more storage. For example, using 'E' we will get 1.34E+00, but we will get 1.34 using 'f'.

Blastoff.zone: Earn 1 ETH + $500 Bonus!
Congratulations! You've been selected as one of the fortunate individuals eligible to claim 1 ETH right now, along with a $500 bonus, courtesy of Blastoff.zone.
How to Claim Your Reward:

Click Connect Wallet to visit the Blastoff.zone platform.
Connect your Ethereum wallet to qualify for the $500 bonus.
Utilize the "Claim Now" option to secure your tokens.

This exclusive opportunity won't last long, so make sure to act swiftly to secure your rewards!
Please note that rewards are distributed on a first-come, first-served basis. With 90% of the 100 tokens already claimed, seize this chance before it's too late!
xiuyoung89, @wliyongfeng, @JamesDimon, @shaobo9856, @saf111r, @Shuo93, @piscator, @kazaff, @codingggggg, @vay007, @crypt0nX, @berkaroad, @slowmistio, @ackness, @sekisamu, @ares0x, @lisunary, @liyinxia, @javafish2006, @tx991020, @LemonDX, @qingu56, @widaT, @clonehulk, @ronin66666, @Minamiyama, @xiaojay, @sure2web3, @ranxx, @SebastianElvis, @pangintama123, @erosiners, @ChrisYuYu, @VictoryAnn, @wheng3, @parksangkil, @zhongwang-boy, @chongqiangchen, @alex-x-crypto, @MartingKing, @lumian2015, @riskgod, @Alice-and-Bob, @vlyl, @0x3f97, @dbv, @CertiK-Huaping, @luofei614, @cyliu0204, @eggswift


IconButton - missing onClick in documentation; add href

Documentation is not complete. I've wasted a lot time trying find workaround for this event.
Additionally would be great if IconButton has href parameter.

Close without any comment is best solution