text:
WHIP/WHEP: DELETE not properly handled

Which version are you using?
v1.6.0
Which operating system are you using?

[ ] Linux amd64 standard
[ ] Linux amd64 Docker
[x ] Linux arm64 standard
[ ] Linux arm64 Docker
[ ] Linux arm7 standard
[ ] Linux arm7 Docker
[ ] Linux arm6 standard
[ ] Linux arm6 Docker
[ ] Windows amd64 standard
[ ] Windows amd64 Docker (WSL backend)
[ ] macOS amd64 standard
[ ] macOS amd64 Docker
[ ] Other (please describe)

Describe the issue
Description
Describe how to replicate the issue
First of all: BIG, BIG THANKS for supporting WHIP/WHEP :) That's really a big improvement for this project. Didn't check that for a couple of months, but when did you add that?
However, I think I'm having a little issue with the current realisation. According the the standard a TEAR DOWN of a WHIP session (and most likely also a WHEP session, but not explicitly checked) has to be done with a HTTP DELETE to the resource published (or subscribed) so far.
I might do a mistake but it seems, this request is not properly handled at the moment. At least I'm catching a 404.
DELETE /whip/0822db29-fe7b-49e9-b8c5-8601c716e274 HTTP/1.1
Host: jetson:8889
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Accept: */*
dnt: 1
Origin: null
Accept-Encoding: gzip, deflate
Accept-Language: de-US,de;q=0.9,en-US;q=0.8,en;q=0.7,es-AR;q=0.6,es;q=0.5,de-DE;q=0.4

HTTP/1.1 404 Not Found
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: text/plain
Server: mediamtx
Date: Fri, 29 Mar 2024 14:44:09 GMT
Content-Length: 18

404 page not found

EDIT: Updated the Wireshark trace. WHIP client is OBS Studio 30.1.0, MacOS
Just a minor issue, but should be corrected, I guess.
Did you attach the server logs?
no
Did you attach a network dump?
yes, inline

OK, I got some thumbs up, but no ack.
Anyway, MediaMTX definitely behaves incorrectly here. According to the RFC https://datatracker.ietf.org/doc/html/draft-murillo-whep-02 (here for WHEP, but that's no diff to WHIP) ...

To explicitly terminate a session, the WHEP Player MUST perform an HTTP DELETE request to the resource URL returned in the Location header field of the initial HTTP POST. Upon receiving the HTTP DELETE request, the WHEP resource will be removed and the resources freed on the Media Server, terminating the ICE and DTLS sessions.

That means to me, that the returned "location" header MUST contain a FQDN, not only a part of a path. I think OBS - as strong reference - does see it the same way, because it does this to terminate a session initiated via WHIP (in my case to http://jetson:8889/mystream/whip):

It gets a 201 CREATED from MediaMTX, containing just a part of the FQDN required: `Location: whip/d470351d-1380-437b-9de9-6ad6aca49bc4``
It then issues a HTTP DELETE to this partly URL, which fails with 404

// MediaMTX response to WHIP
HTTP/1.1 201 Created
Accept-Patch: application/trickle-ice-sdpfrag
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, ID, Accept-Patch, Link, Location
Content-Type: application/sdp
Etag: *
Id: d4befba0-c478-4187-8a27-75efe24e99b6
Location: whip/d470351d-1380-437b-9de9-6ad6aca49bc4
Server: mediamtx
Date: Wed, 03 Apr 2024 11:16:23 GMT
Content-Length: 1301

// OBS Delete request and MediaMTX response
DELETE /whip/d470351d-1380-437b-9de9-6ad6aca49bc4 HTTP/1.1
Host: jetson:8889
Accept: */*
User-Agent: Mozilla/5.0 (OBS-Studio/30.1.0; Mac OS X; en-US)

HTTP/1.1 404 Not Found
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: text/plain
Server: mediamtx
Date: Wed, 03 Apr 2024 11:18:35 GMT
Content-Length: 18

404 page not found

In fact, if the DELETE request is directed to a string concatenation of the stream name plus the returned "location", it works.
Like:
curl http://jetson:8889/mystream/whip/d470351d-1380-437b-9de9-6ad6aca49bc4 -X DELETE

But as said: This is not correct.

An - admittedly clumsy - request to solve this. What do you think? Worth a PR?
diff --git a/internal/servers/webrtc/http_server.go b/internal/servers/webrtc/http_server.go
index 95bddf2b..1b6614d5 100644
--- a/internal/servers/webrtc/http_server.go
+++ b/internal/servers/webrtc/http_server.go
@@ -203,7 +203,11 @@ func (s *httpServer) onWHIPPost(ctx *gin.Context, path string, publish bool) {
        ctx.Writer.Header().Set("ID", res.sx.uuid.String())
        ctx.Writer.Header().Set("Accept-Patch", "application/trickle-ice-sdpfrag")
        ctx.Writer.Header()["Link"] = webrtc.LinkHeaderMarshal(servers)
-       ctx.Writer.Header().Set("Location", sessionLocation(publish, res.sx.secret))
+       scheme := ctx.Request.URL.Scheme
+       if scheme == "" {
+               scheme = "http"
+       }
+       ctx.Writer.Header().Set("Location", scheme + "://" + ctx.Request.Host + ctx.Request.URL.Path + "/" + res.sx.secret.String())
        ctx.Writer.WriteHeader(http.StatusCreated)
        ctx.Writer.Write(res.answer)
 }

Created a PR with not much hope https://github.com/bluenviron/mediamtx/pull/3195

Hello,
The WHIP/WHEP specification doesn't explicitly state that an absolute URL is required inside the location header, although in all examples there's an absolute URL, thus this behavior is recommended.
The OBS implementation is incorrect, since relative paths that don't start with a slash, inside the Location header, should be appended to the path of the request, discarding anything after the last slash, per RFC3986:
http://a/b/c/d;p?q + g;x = http://a/b/c/g;x
Therefore
http://jetson:8889/mystream/whip + whip/d470351d-1380-437b-9de9-6ad6aca49bc4 = http://jetson:8889/mystream/whip/d470351d-1380-437b-9de9-6ad6aca49bc4
Therefore this issue is not about specifications, but is about switching to a common practice in order to broaden compatibility.
The server prefers to send relative paths in place of absolute URLs in order to support reverse proxies and gateways, therefore the effects of switching to absolute URLs must be investigated further.

Thanks for the follow up. In fact, it's not only OBS. I have at least three OS projects which do exactly the same: Taking the location header "as is" and do a DELETE on this.

But let me check your proposal quickly...

I think that's going to work. Let me adjust my PR accordingly. I have tested it with OBS and one of the mentioned OS apps and it worked for me. Even behind NGINX as reverse proxy

Updated PR https://github.com/neilyoung/mediamtx/commit/2cec9d747cfcf3370c7d7909420e06ab91e638b7

That works for WHIP and WHEP
I found another little issue while testing this, maybe you have an idea. It's not 100% related, but because I ran into this, I will try to explain it here.
My server has a UFW firewall which is configured like so (just the IPv4 rules):
22/tcp                     ALLOW       Anywhere
8554/tcp                   ALLOW       Anywhere
8889/tcp                   ALLOW       Anywhere
8189/udp                   ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere

With this setup I'm able to use one of the 3rdparty apps, but not OBS. OBS cannot establish the RTP connection as long as the firewall is up. Would you know, what else I would have to open for OBS?

As another idea: Why don't just add a configuration for the public IP/port of the server? This would remove the requirement for STUN/TURN at all (like Mediasoup does it). This has two advantages: The public IP doesn't have to be retrieved by STUN server-side and there is no need for opening a potentially wide range of UDP ports.
Other than that - and unrelated again - I would suggest to publish the Link header for WHEP responses only. There is no need for publishing possibly volatile long term TURN credentials to everybody in the world.
It would also be great, if you would provide - maybe a callable interface - for creating time limited credentials instead of a fix TURN credential provisioning.
Sorry for the long post(s)

As another idea: Why don't just add a configuration for the public IP/port of the server? This would remove the requirement for STUN/TURN at all (like Mediasoup does it). This has two advantages: The public IP doesn't have to be retrieved by STUN server-side and there is no need for opening a potentially wide range of UDP ports.

This is already implemented, enabled by default and can be tuned in this way:
# Address of a local UDP listener that will receive connections.
# Use a blank string to disable.
webrtcLocalUDPAddress: :8189
# Address of a local TCP listener that will receive connections.
# This is disabled by default since TCP is less efficient than UDP and
# introduces a progressive delay when network is congested.
webrtcLocalTCPAddress: ''

You also need to remove all STUN/TURN servers in order to use it.

Maybe worth another issue, but we are in a discussion here. OBS is not sending any PATCH request, which would point to that they where doing trickle-ice (even though the SDP contains that claim). They send my PC's local network address. That doesn't harm for WHIP, I guess, because they are just supposed to SEND to MediaMTX.

Remove all STUN/TURN servers and set the IP manually, as mentioned in the README:
webrtcAdditionalHosts: [my.ip.add.ress]

Other than that - and unrelated again - I would suggest to publish the Link header for WHEP responses only. There is no need for publishing possibly volatile long term TURN credentials to everybody in the world.

TURN credentials are not broadcasted publicly but are sent in WHIP and WHEP responses only. Turning them off for WHIP responses would have the effect of preventing people from publishing.

It would also be great, if you would provide - maybe a callable interface - for creating time limited credentials instead of a fix TURN credential provisioning.

This is already implemented, take a look at the part about "secret-based authentication" in the README.

This is already implemented, enabled by default and can be tuned in this way:

I think I don't understand. In which way is webrtcLocalTCPAddress the configuration point for the public IP of the server, given the comment provided?

webrtcAdditionalHosts

Sorry, what purpose has this setting?

TURN credentials are not broadcasted publicly but are sent in WHIP and WHEP responses only.

Well, that's what I meant by "broadcast"

Turning them off for WHIP responses would have the effect of preventing people from publishing.

Nope. In which way? It makes on sense to return TURN servers or even STUN servers in the 201 response header. This information is meant to support the client to gather its candidates. But for what purpose should a WHIP (I don't talk about WHEP) client send any candidate at all? There is no media traffic from the server back to the WHIP client, which would make this information necessary.
I have causally removed the provisioning of TURN/STUN information from the Link header in WHIP case and could not find any problem over various types of connections.

This is already implemented, take a look at the part about "secret-based authentication" in the README.

OK, this wasn't obvious to me. I'll give it a try.
BTW: GH Actions sent me a problem https://github.com/bluenviron/mediamtx/actions/runs/8615767557. The problem is: I was doing the changes completely in the web editor of github. How am I supposed to run the formatter on this after the change?

You can configure a fixed public IP and a fixed port, either TCP or UDP, by using together webrtcLocalUDPAddress, webrtcLocalTCPAddress and webrtcAdditionalHosts, this is explained in the README:
https://github.com/bluenviron/mediamtx?tab=readme-ov-file#connectivity-issues

Nope. In which way? It makes no sense to return TURN servers or even STUN servers in the 201 response header.

Now i understand the observation, i checked the code and i think you're right! i will remove the Link header from POST responses ASAP.

Thank you very much for your patience with me and have a nice weekend :)

I checked again all the places in which STUN/TURN servers are returned to users which are

in POST responses, after a successful authentication:
https://github.com/bluenviron/mediamtx/blob/5a39e07eb7478ce19e6ea1a4a5e03357487504ce/internal/servers/webrtc/http_server.go#L205

in OPTIONS responses, after a successful authentication:
https://github.com/bluenviron/mediamtx/blob/5a39e07eb7478ce19e6ea1a4a5e03357487504ce/internal/servers/webrtc/http_server.go#L163

Although it's apparently useless to send TURN servers in POST responses, this is dictated by the specification (https://datatracker.ietf.org/doc/draft-ietf-wish-whip/) and also helpful to perform ICE restarts, as you mentioned.
Therefore, the way in which servers are sent to users is right and the server doesn't seem to need any improvement.
TURN servers cannot be sent in preflight responses since the latter are unauthenticated.

Although it's apparently useless to send TURN servers in POST responses, this is dictated by the specification

I think the spec says MAY...

TURN servers cannot be sent in preflight responses since the latter are unauthenticated.

TURN credentials are part of the response, and if it is sent in OPTIONS it could be used for the creation of the ICE candidates to be sent in the initial offer. When it comes to the offer it is too late.

in POST responses, after a successful authentication:

I'm not using auth at all at the moment and it is not sent in OPTIONS then. I don't see a reason for having to be authenticated just for that. If the TURN credentials are life-time limited there is no danger of abuse.
Regarding AUTH: Is it correct, you are supporting Basic Auth? I'm 10% sure, this is not part of the spec, since this requires token authentication.

Remove all STUN/TURN servers and set the IP manually, as mentioned in the README:
webrtcAdditionalHosts: [my.ip.add.ress]

Confirmed. That works fine. Thanks for pointing me to that. IMHO, completely obsoletes STUN/TURN. However, there is still the IP of the used network propagated, which is misleading in my case, because AWS local. Can this be prevented?

This is already implemented, take a look at the part about "secret-based authentication" in the README.

OK, this wasn't obvious to me. I'll give it a try.

That works too. The lifetime of 24h is a bit too generous in my eyes, but ok. That's fine.
Also thanks for pointing me on that :) You know, I'm a fan of your solution, so please don't get me wrong.

Can this be prevented?

yes, there is webrtcIPsFromInterfaces: no, i think you better take a look at the configuration file and scroll through all available options.
Since both OBS and the Eyevinn WHIP demo are both working without changing anything, can you write the name of a WHIP client that is currently not liking relative Locations?

Since both OBS and the Eyevinn WHIP demo are both working without changing anything, can you write the name of a WHIP client that is currently not liking relative Locations?

OBS 30.1.2 on Mac

i think you better take a look at the configuration file and scroll through all available options.

Yes, you are right. Sorry for bother.

Since both OBS and the Eyevinn WHIP demo are both working without changing anything, can you write the name of a WHIP client that is currently not liking relative Locations?

OBS 30.1.2 on Mac

DELETE is also and still not working with the latest commit a18bebfa58616ffdc5fed8f83f284585d1744ab8. I'm really sorry

Hello, you're right and DELETE requests sent by both OBS and Eyevinn/whip were not working. This is definitively fixed by #3240. The reason why i forgot to check is that there are too many topics mentioned in this issue, therefore i just checked for connectivity and CORS.
Next time feel free to create an issue for each single issue (for instance, separate ones for connectivity, CORS and DELETE), in this way each topic can be handled separately.

Hehe, sorry for the mess. Thanks for the fix. Will checkout later

Working. Thanks

repo: bluenviron/mediamtx


text:
Better docs for deployment process and removing bad deployments

Better Docs for deployment process

A lot of users in the issues page are complaining of issues in their deployment.
Most of these have to due to confusion about what FEEDGEN_HOSTNAME env variable represents
Do I need my own private server to publish feeds, or can I resolve them to be published to bluesky's servers? This is not made clear in the docs.

Docs do not include steps for unpublishing a feed

I was able to figure it out by reading the code
It might help to have docs for people who are less experienced with using typescript
Its just one command

Update docs for new command line process for deploying

The docs are out of date and ask people to edit the code to provide variables
Now the variables are collected by the command line interface
Update the docs to match the current process.

I found better docs here, but it should be included in the readme.

Also would love documentation on the creation of /.well-known/did.json or automation of this process. I was so confused by this as someone who has never used web3, I had to read closed issues to understand what format it was expecting for this.

source: gharchive/issue

repo: bluesky-social/feed-generator

license: MIT

license_type: permissive

license_source: github-api


text:
Android Bsky app crash pressing bottom icons 5-7 times

You're running a build that uses the React Native New Architecture, right?

[X] I am running a build that uses the New Architecture

Steps to Reproduce

Open up the Bluesky Android application.
Proceed to press the bottom icons within 3 seconds of each other at random.
On the 5th to 7th presses of the bottom icons, the application will crash and the starry sky background will freeze.

Attachments
https://github.com/user-attachments/assets/9ff24ee0-d23e-4776-b6d1-081e30719f8c
What platform(s) does this occur on?
Android
Device Info
Honor 90 (REA-NX9), Android 14, Magic OS 8, Resolution (2664x1200)
What version of the app are you using?
Build version: 1.92.0-na-rc.2.2; Bundle info:  (tf); Bundle date: 0; Platform: android
Additional Information
The appearance settings in app are:

Dark
Dim
System
Small

Closing this. Issue not showing on Android 1.92.0.

repo: bluesky-social/social-app


text:
RE Widgets: horizontal scrolling issue in Queue Widget

If the plan parameters are represented as one long string (e.g. parameters are represented as kwargs argument), the 3rd column of the Queue Widget table is very wide. Clicking on an item in the 3rd column activates the item and makes the table automatically scroll to the right to display most of the activated item in column 3, making columns 1 and 2 invisible until user manually scrolls the table to the left. This behavior is not expected occurs if the plans are properly annotated and parameters are represented as short string, but it is may be annoying to the user when it happens.
Expected Behavior
The table should not automatically adjust horizontal scrolling to display active item. Horizontal scrolling change only if the user manually manipulates the scroll bar.

Addressed in PR https://github.com/bluesky/bluesky-widgets/pull/143

repo: bluesky/bluesky-widgets


text:
🛑 Skytalks SSL Website (v6) is down

In 3d5b9a0, Skytalks SSL Website (v6) (https://skytalks.info) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Skytalks SSL Website (v6) is back up in d17b291 after 17 minutes.

repo: bluknight/skytalks-monitor


text:
Can't find asset files in salad.init

When following the steps in the readme, I get the following exception when executing mix salad.init
$ mix salad.init
Enter the path to the components folder (lib/glhub_web/components):
Select the color scheme to use (gray): green
Using color scheme: green
Writing components path to dev.exs
Writing tails config to config.exs
Patching app.css
** (File.Error) could not read file "/home/hiasr/code/glhub/_build/dev/lib/salad_ui/priv/static/assets/colors/green.css": no such file or directory
    (elixir 1.16.3) lib/file.ex:384: File.read!/1
    (salad_ui 0.9.0) lib/salad_ui/patcher/css_patcher.ex:8: SaladUI.Patcher.CSSPatcher.patch/2
    (salad_ui 0.9.0) lib/mix/tasks/salad.init.ex:138: Mix.Tasks.Salad.Init.patch_css/2
    (salad_ui 0.9.0) lib/mix/tasks/salad.init.ex:45: Mix.Tasks.Salad.Init.init/3
    (mix 1.16.3) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.16.3) lib/mix/cli.ex:96: Mix.CLI.run_task/2
    /nix/store/wg94j29n69xjidwsgnm2274ljw3lwlcn-elixir-1.16.3/bin/mix:2: (file)

When looking in the build directory, I only found the following files:
$ ls _build/dev/lib/salad_ui
ebin

Thank you for your help in advance!

Having the exact same problem, was just going to try out SaladUI.

@hiasr , @daic0r Thanks for reporting this issue. This caused by missing package config when publish to hex.
Please try again with version "0.10.0", in this version, I also release Accordion too

authors: bluzky daic0r hiasr


text:
add(wiki): #37 - wiki skeleton

Description
Please include a summary of the change (features and fixes)
Related issues

#37

Type of change

[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] New feature (non-breaking change which adds functionality)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] This change requires a documentation update

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

The repository Documentation has been updated without any commit

source: gharchive/pull-request

authors: Shawnuke blyndusk

repo: blyndusk/flamingops


text:
gyromagnetic_anomaly

Suggested names:
gyromagnetic_anomaly  - For (g_spin-2)/2
g_spin - For 2*m * mu / (q * S)  where m is the particle mass and mu is the magnetic moment.
g_nuclear - For 2* m_p  / (e * S) where m_p is the proton mass.

the magnetic moment \mu here is not already defined for arbitrary particles in the package; should it be?
I'm currently defining g_spin in terms of gyromagnetic_anomaly, which seems a little circular.

Having some trouble getting the magnetic moments from NIST to load; once I figure it out I have functions to generate the g factors and gyromagnetic anomalies ready to go

Magnetic moments for all the subatomic particles are implemented; is there a preferred way to get the overall magnetic moment for an arbitrary charge state of an atom?

I do not know about this. I imagine the presence of the
electrons quite complicates matters. So much so that
I would avoid this for now. If we have an expert (I can
ask Des) then we might move forward on atomic nuclei
that are not fully stripped.

On Sep 20, 2024, at 06:38, Alex Coxe @.***> wrote:
Magnetic moments for all the subatomic particles are implemented; is there a preferred way to get the overall magnetic moment for an arbitrary charge state of an atom?
—
Reply to this email directly, view it on GitHub https://github.com/bmad-sim/AtomicAndPhysicalConstants.jl/issues/34#issuecomment-2363641700, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXTUHFXX7USKTANQ2WUKOTZXQJLNAVCNFSM6AAAAABJJKPLQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRTGY2DCNZQGA.
You are receiving this because you are subscribed to this thread.

authors: DavidSagan dtabell rot4te


text:
Click on Save & Nothing Happens

Hello. I just downloaded HSTracker last night. I'm new to hearthstone tracking and addons. I don't know if I am doing something wrong or if this is a bug? When I click save after the end of the match nothing happens.
Also - How long should it take for my matches to show up on hearthstats? None of my game from today show under Recent Matches. The only match it shows is the one from last night when I was testing it.
Aside from these two issues - are there any tutorials or guides on how to best use HSTracker?
Thanks

I saw someone else was having an issue on OS X with HSTracker reporting to hearthstats. On the site it lists my matches and shows win/loss but when I try to get detailed turn by turn information its always blank.  I contacted hearthstats support to. I'm not sure if its the same people as here?

repo: bmichotte/HSTracker

license: mit

license_source: bigquery


text:
The triangle cannot be completed.

The first operation is done when the transaction is captured, but the second operation is stuck because it does not expect the first operation to end.

Can you please provide the execution.log of this issue occurring?
Logging in debug mode would be great if possible

Please reopen if you are still experiencing trouble

authors: bmino fatihkokay

repo: bmino/binance-triangle-arbitrage


text:
Version bump for v5.0.5 parity

Version bump for v5.0.5 parity

Pull Request Test Coverage Report for Build 2258632819

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 78.051%

Totals

Change from base Build 2254887036:
0.0%

Covered Lines:
2458

Relevant Lines:
3082

💛  - Coveralls

authors: coveralls murlokito


text:
missing quote

found a missing closing quote

Good find, thanks.

authors: jamaa vocatus

repo: bmrf/tron


text:
Get rid of polars extensions

At the moment used because of this bug in polars:
polars issue 7627

Closing since polars support is a lot better now and original issue is resolved

authors: aersam dominikpeter

repo: bmsuisse/lakeapi


text:
isoCluster: Ensure IPU netdevs on host are up

Currently, we need to cold boot the IPU host anytime the IMC reboots to ensure the netdevs are available.
Ensure the netdevs are available when isocluster deployment completes.

@vrindle this should fix the issue where the netdevs are not there when the IPU deployment finishes.


text:
backends: Major refactorization

This includes the following changes:

Split backend clients into different packages
Use 'mock' backend for testing all the time
Import 'go-homedir' as 'homedir'
Rename some variables
Turn some variables into constants

@bndw please take your time to thoroughly review this. It's a big improvement and makes adding new backends much easier.

🎉 The backend impls not being their own package has been nagging at me! Thank you and excited to review

authors: bndw leonklingele

repo: bndw/pick


text:
Need to a void a horrible stack dump from asking for chunk addresses from an unchunked file

Currently we get a horrible stack dump for
import pyfive
f = pyfive.File('zero.nc')
v = f['var']
d = v._dataobjects
d._get_chunk_addresses()

which gives:
File ~/Repositories/pyfive/pyfive/dataobjects.py:743, in DatasetDataObject._get_chunk_addresses(self)
    739 if self._zchunk_index == {}:
    741     self._get_chunk_params()
--> 743     self.chunk_btree = BTreeV1RawDataChunks(
    744         self.fh, self._chunk_address, self._chunk_dims)
    746     count = np.prod(self.shape)
    747     itemsize = np.dtype(self.dtype).itemsize

File ~/Repositories/pyfive/pyfive/btree.py:129, in BTreeV1RawDataChunks.__init__(self, fh, offset, dims)
    127 """ initalize. """
    128 self.dims = dims
--> 129 super().__init__(fh, offset)

File ~/Repositories/pyfive/pyfive/btree.py:25, in AbstractBTree.__init__(self, fh, offset)
     22 self.depth = None
     23 self.all_nodes = {}
---> 25 self._read_root_node()
     26 self._read_children()

File ~/Repositories/pyfive/pyfive/btree.py:39, in AbstractBTree._read_root_node(self)
     38 def _read_root_node(self):
---> 39     root_node = self._read_node(self.offset, None)
     40     self._add_node(root_node)
     41     self.depth = root_node['node_level']

File ~/Repositories/pyfive/pyfive/btree.py:133, in BTreeV1RawDataChunks._read_node(self, offset, node_level)
    131 def _read_node(self, offset, node_level):
    132     """ Return a single node in the b-tree located at a give offset. """
--> 133     node = self._read_node_header(offset, node_level)
    134     keys = []
    135     addresses = []

File ~/Repositories/pyfive/pyfive/btree.py:81, in BTreeV1._read_node_header(self, offset, node_level)
     79 def _read_node_header(self, offset, node_level):
     80     """ Return a single node header in the b-tree located at a give offset. """
---> 81     self.fh.seek(offset)
     82     node = _unpack_struct_from_file(self.B_LINK_NODE, self.fh)
     83     assert node['signature'] == b'TREE'

TypeError: 'NoneType' object cannot be interpreted as an integer

for a file with the following signature:
netcdf zero {
dimensions:
	y = 3 ;
	x = 4 ;
variables:
	float var(y, x) ;
		var:_Storage = "contiguous" ;
		var:_Endianness = "little" ;

// global attributes:
		:_NCProperties = "version=2,netcdf=4.9.2,hdf5=1.14.3" ;
		:_SuperblockVersion = 2 ;
		:_IsNetcdf4 = 1 ;
		:_Format = "netCDF-4" ;
}

In fixing this we might want to change the name of this method to _load_chunk_indexes to better represent what it does. We might also ask, do we need to go to the b-tree given it seems the b-tree is already loaded at this point?

this is long fixed!

repo: bnlawrence/pyfive


text:
Licening / copyright

Hi Sreeni @bnsreenu ,
you're maintaining a fantastic resource here in this repository! I was just wondering under which conditions one could reuse the code published here. Would you mind adding a LICENSE file? If you're new to licensing and/or wonder which license to use, you can read more in this blob post: https://focalplane.biologists.com/2023/05/06/if-you-license-it-itll-be-harder-to-steal-it-why-we-should-license-our-work/
Thanks!
Best,
Robert

I initially created this repository without expecting its widespread adoption and didn't mind if others used my code without attribution. However, given its popularity, it's now important to include a license file to formally convey my intentions. I will proceed with adding a license file. Thank you to Robert and Majed for their valuable input.

An MIT license was obviously added. Big thanks Sreeni!

authors: bnsreenu haesleinhuepf


text:
Error trying to export

Bug report
Describe the bug
When Trying to export from the GUI a change made to the user roles, the GUI displayed both an error message and a success message, and in the logs there is an error
Steps to reproduce the behavior

Go to Users & Permission Plugin, make a change on a role for a content-type
Go to config-sync plugin and clich "Export" (see screenshot)
Click "Yes, export" in the confirmation popup
See error (see screenshot)

Expected behavior
Only the success message should appear
Screenshots

Code snippets
This is the error in the logs:
[2022-01-17 11:42:40.494] error: TypeError: Cannot read properties of undefined (reading 'type')
Error: TypeError: Cannot read properties of undefined (reading 'type')
    at Object.exportSingleConfig (/srv/app/node_modules/strapi-plugin-config-sync/server/services/main.js:252:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /srv/app/node_modules/strapi-plugin-config-sync/server/controllers/config.js:22:9
    at async Promise.all (index 0)
    at async Object.exportAll (/srv/app/node_modules/strapi-plugin-config-sync/server/controllers/config.js:21:7)
    at async returnBodyMiddleware (/srv/app/node_modules/@strapi/strapi/lib/services/server/compose-endpoint.js:52:18)
    at async policiesMiddleware (/srv/app/node_modules/@strapi/strapi/lib/services/server/policy.js:24:5)
    at async /srv/app/node_modules/@strapi/strapi/lib/middlewares/body.js:24:7
    at async /srv/app/node_modules/@strapi/strapi/lib/middlewares/logger.js:22:5
    at async /srv/app/node_modules/@strapi/strapi/lib/middlewares/powered-by.js:16:5
    at async cors (/srv/app/node_modules/@koa/cors/index.js:95:16)
    at async /srv/app/node_modules/@strapi/strapi/lib/middlewares/errors.js:13:7
    at async session (/srv/app/node_modules/koa-session/index.js:41:7)
    at async /srv/app/node_modules/@strapi/strapi/lib/services/metrics/middleware.js:29:5

System

Node.js version: v16.13.0
Strapi version: 4.0.4
Plugin version: 1.0.0-beta.4
Operating system: bullseye

Additional context
The "importOnBootstrap" option is used

Hey @emillo,
I was unable to replicate the issue.
Can you confirm a couple of things with me:

Does it work when you try to export from the CLI?
If you just delete the entire config/sync/ folder and export everything again. Do you still have the issue?

Hello @boazpoolman

If I try to export from CLI it says that there are no changes to export although there is one.
If I delete the config/sync folder and do Make the initial export everything seems to go well but I get the error in the GUI saying Warning: an error occurred and no error in the logs
If I disable the importOnBootstrap setting the observable behaviour from the GUI is the same, but got no error in logs: on further inspection it seems that the error in the logs appears only if you click a second time on the Export button (because after the first it shows that there are still differences, but this seems to be false: so the GUI is not in sync with the state)

So the CLI says no changes.
I think you are right; the GUI is not in sync with the actual state.
This must be some kind of edgecase because I can't reproduce it.
If you, or somebody else having this issue, finds a solution for it I'd be happy to merge it.

@boazpoolman the culprit was the setting watchIgnoreFiles in config/admin.js that was still pointing to the old dir structure :
watchIgnoreFiles: ["**/config-sync/files/**"]
changed it to
watchIgnoreFiles: ['**/config/sync/**']
solved the problem
Thanks

authors: boazpoolman emillo

repo: boazpoolman/strapi-plugin-config-sync


text:
Switch to gopkg.in/ns1/ns1-go.v1

cc @sarguru FYI @pashap

👍

authors: bobtfish sarguru

repo: bobtfish/terraform-provider-nsone


text:
Wrong readme link

Hello, the readme link is broken.
Link point to https://github.com/prometheus/node-exporter instead of https://github.com/prometheus/node_exporter

Thanks.
I will fix this soon.

repo: bodsch/ansible-node-exporter


text:
Govee erscheint nicht

Hallo,
hab bei meinem Govee LED Strip die Option "LAN Steuerung" aktiviert.
Aber er erscheint nicht im Adapter. Muss ich da noch irgendwas einstellen?
Vielen Dank.

Eventuell kann der Adapter für Homebridge hier weiterhelfen.
Dort sind so gut wie alle LED Strips integriert
https://github.com/bwp91/homebridge-govee

In was für einer Umgebung läuft es denn? Gibt es im Log irgendetwas?
Da zwangsläufig UDP verwendet werden muss, können Netzwerkbeschränkungen ein Problem sein, auch unter Windows war es etwas umständlich, das überhaupt zum Laufen zu bekommen. Daher wären ein paar mehr Informationen über die Umgebung ganz hilfreich

Hab den LED Strip gegen einen anderen getauscht. jetzt klappt es einwandfrei.


text:
error responses without detailed information

What version of the module is the issue happening on? Does the issue happen on latest version?
0.22.0
What platform and Node.js version? (For example Node.js 6.9.1 on Mac OS X)
node js 12 netlify functions
Does the action work when you manually perform request against mailgun using curl (or other means)?
Thats the thing, let me explain in the description
Sample source code or steps to reproduce

use mailgun.messages().send() with a delivery time further than 3 days ahead of time
response code/response from mailgun will be (as told by their support) Specific delivery time must not be farther than 3 days from now
response code from this library (the send function error callback): {"statusCode":400}

(Write description of your issue here, stack traces from errors and code that reproduces the issue are helpful)
So the issue is that some of mailguns helpful response error message gets lost through this library.
I read the package is no longer maintained, so this is just a note for myself and maybe others who find it useful

I saw your posting while I was going to write about a similar issue and with your posting I solved it.
I think the documentation or callback naming is misleading.
The error contains the status code (as you said) but the body still exists.
So I use something like:
if(error) {
        reject(JSON.stringify(body));
      } else {
        resolve(body);
      }

I had the problem in a different direction, I checked first for if(body) and found it strange that I get an error from mailgun but no error.
Yeah because body exists always (and contains the propper API feedback) and error only if there was an error. So if you want to use the error message you have to parse the body if the error object exists
hth

authors: SHoogland pfiadDi

repo: bojand/mailgun-js


text:
Feature/ie11 deprecation

Jira
http://vjira2:8080/browse/BDS-2026
Summary
Remove IE11 support from build tools, config files, and theming system.
Details
Build tools

Remove IE11 from @bolt/browserslist-config
Replace legacy/modern config with single config in @bolt/babel-preset-bolt
Remove esModules and compat flags
Remove "modern" from filenames

Theming

Remove @bolt/postcss-themify and @bolt/components-critical-css-vars

Remove option to pass map() to bolt-theme() in _tools.themes.scss
Replace uses of map() with a single CSS variable, make necessary component updates (detailed below)

Component updates

Accordion: update snapshot to reflect CSS formatting changes, no visual difference (see file).
Card Replacement: replace background-color map() with single CSS variable; results in background-color that is semi-transparent, not solid on light theme (see file).
Nav Priority: Replace background-color map() with single CSS variable; Add styles to approximate what was previously done via map(), which is to make the menu lighter on dark themes. The result is slightly lighter than it previously was on xdark, slightly darker than it was on dark.

Follow up
More work queued up once this is approved:

Removed Polyfills
Updated PL and Integrations

How to test

Review changes
Tests are passing
Review Card Replacement demo and verify light theme looks ok
Review Priority Nav demo and verify dropdown menu (seen on smaller screens) looks ok
Run the branch locally and do a spot check of other components (be sure to run yarn)
For @remydenton, pull into Bolt Build Release and see how it runs (created ticket)

Check out my comment regarding the @bolt/polyfills package that's auto-added to the Webpack entry (might need to switch the path)
Replied with a question.

Any reason why you didn't remove this entire package as well in this PR? https://github.com/boltdesignsystem/bolt/tree/master/packages/components/bolt-critical-path-polyfills
I have a follow-up PR that removes unused Polyfills and dependencies. I'll remove it there, just trying to keep this initial PR as slim as possibile.

Make sure to resolve the merge conflicts + pull in the latest from master (probably resolving using your code vs the code from master...)
Done 👍

Lets make sure to merge in https://github.com/boltdesignsystem/bolt/pull/1846 before this gets merge

authors: colbytcook danielamorse

repo: boltdesignsystem/bolt


text:
BioClip answer without relevant score

There is not tag in the reply
https://bsky.app/profile/botensky.bsky.social/post/3ladnqmobdl2c
Maybe could we add some plugins related tags

no keep negative case without tags is ok


text:
"Suppr" key does not update immediateley

The "suppr" key (which deletes the character under the cursor) does not update the editor immediately (you need to hit another key for the visual feedback), it's missing a DoChange call I guess.
The "backspace" key (which delete the character left of the cursor) is not affected

I can't repeat. Delete is deleting the character immediately.

Yes, still XE, I fixed it by adding a DoChange at the end of the "ecBackspace" case in TBCBaseEditor.ExecuteCommand
(ecDeleteChar case has one call to DoChange already, but ecBackspace does not)

Indeed, there should be a DoChange call at line 10865.

Fixed.

authors: EricGrange bonecode

repo: bonecode/TBCEditor


text:
Admission controller to validate our resources

We could prevent some simple errors by creating an admission controller plugin.
Some conditions we might want to check:

only one shipment order active per application at once?
edits to clusters or secrets: check that we can create a working client with that combination of credentials/hostame
read-only fields (Release.Environment)
... ?

We have the admission controller done and in production now.

authors: ksurent parhamdoustdar

repo: bookingcom/shipper


text:
pydocca: conditional noexcept specifications

Conditional noexcept specifications are not rendered correctly - they're always rendered as plain noexcept.
This may require a level of heuristics to solve as, once again, Doxygen offers misleading information about the topic. For instance, this is the representation of basic_format_context::basic_format_context, which is noexcept(std::is_nothrow_default_constructible<OutputString>::value):
      <memberdef kind="function" id="classboost_1_1mysql_1_1basic__format__context_1aa0fbc6a27a0b13dea8de517702df4b5a" prot="public" static="no" const="no" explicit="yes" inline="yes" noexcept="yes" virt="non-virtual">
        <type></type>
        <definition>boost::mysql::basic_format_context< OutputString >::basic_format_context</definition>
        <argsstring>(format_options opts) noexcept(std::is_nothrow_default_constructible< OutputString >::value)</argsstring>
        <name>basic_format_context</name>
        <qualifiedname>boost::mysql::basic_format_context::basic_format_context</qualifiedname>
        <param>
          <type><ref refid="structboost_1_1mysql_1_1format__options" kindref="compound">format_options</ref></type>
          <declname>opts</declname>
        </param>
        <briefdescription>
<para>Constructor. </para>
        </briefdescription>
        <detaileddescription>
<para>Uses a default-constructed <computeroutput>OutputString</computeroutput> as output string, and an empty error code as error state. This constructor can only be called if <computeroutput>OutputString</computeroutput> is default-constructible.</para>
<para><simplesect kind="par"><title>Exception safety</title><para>Strong guarantee: exceptions thrown by default-constructing <computeroutput>OutputString</computeroutput> are propagated. </para>
</simplesect>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="boost/mysql/format_sql.hpp" line="343" column="14" bodyfile="boost/mysql/format_sql.hpp" bodystart="343" bodyend="347"/>
      </memberdef>

The rendered section looks weird, because it states noexcept and then has a section on how possible exceptions are propagated.

Yeah, I can add logic that pulls out conditional noexcept from argstring.

Hang on, I've just seen that Doxygen has made improvements in the latest version. Once I manage to fix all things that the new version broke, I'll let you know whether the upgrade fixed the noexcept issue.

Doxygen 1.12 includes a noexceptexpression attribute, so no parsing is required. However, using this probably requires addressing #170 first.
<memberdef kind="function" id="classboost_1_1mysql_1_1basic__format__context_1aa0fbc6a27a0b13dea8de517702df4b5a" prot="public" static="no" const="no" explicit="yes" inline="yes" noexcept="yes" noexceptexpression="std::is_nothrow_default_constructible< OutputString >::value" virt="non-virtual">
        <type></type>
        <definition>boost::mysql::basic_format_context< OutputString >::basic_format_context</definition>
        <argsstring>(format_options opts)</argsstring>
        <name>basic_format_context</name>
        <qualifiedname>boost::mysql::basic_format_context::basic_format_context</qualifiedname>
        <param>
          <type><ref refid="structboost_1_1mysql_1_1format__options" kindref="compound">format_options</ref></type>
          <declname>opts</declname>
        </param>
        <briefdescription>
<para>Constructor. </para>
        </briefdescription>
        <detaileddescription>
<para>Uses a default-constructed <computeroutput>OutputString</computeroutput> as output string, and an empty error code as error state. This constructor can only be called if <computeroutput>OutputString</computeroutput> is default-constructible.</para>
<para><simplesect kind="par"><title>Exception safety</title><para>Strong guarantee: exceptions thrown by default-constructing <computeroutput>OutputString</computeroutput> are propagated. </para>
</simplesect>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="boost/mysql/format_sql.hpp" line="343" column="14" bodyfile="boost/mysql/format_sql.hpp" bodystart="343" bodyend="347"/>
      </memberdef>
``

authors: anarthal grisumbras

repo: boostorg/docca


text:
wrong hash function

It looks like boost.json implemented fnv-1a wrong:
https://en.wikipedia.org/wiki/Fowler–Noll–Vo_hash_function

nope.. fnv-1a is implemented correctly

repo: boostorg/json


text:
Cannot start using docker-compose up: json: cannot unmarshal string into Go value of type []string

Hi guys, thanks for great tool. Somehow, docker-compose up in my mac does not work anymore. I just get the error: json: cannot unmarshal string into Go value of type []string. Is it because of the latest OSX update. I think it was working fine before that update.
My machine is: OSX 10.10.3, Boot2docker 1.6.2, Virtualbox 4.3.26 (Not even working with 4.3.28)
I tried boot2docker 1.7 and it's still not working.

I have the same problem under Ubuntu 14.04:
$ docker --version
Docker version 1.7.1-rc3, build c2e658d
$ docker info
Containers: 16
Images: 676
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 708
 Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.13.0-53-generic
Operating System: Ubuntu 14.04.2 LTS
CPUs: 8
Total Memory: 31.41 GiB
Name: piane
ID: XRYW:UJTU:3ZZU:KFHG:GI5W:ZEEL:MRLM:C7JB:T4Z7:SR7J:RPX5:LHJQ
WARNING: No swap limit support
$ docker-compose up
Creating svn_svndisk_1...
json: cannot unmarshal bool into Go value of type string

My MWE
$ cat docker-compose.yml
foodisk:
  image: ubuntu
  entrypoint: true
  volumes:
  - /var/opt/foo:/var/foo:rw
$ ls -al /var/opt/foo
total 8
drwxr-xr-x 2 root root 4096 Jul 13 10:08 .
drwxr-xr-x 4 root root 4096 Jul 13 10:08 ..

For me somehow, this line in docker-compose.xml caused the error: dns: 8.8.8.8

+1

Just put quotes around the string dns: "8.8.8.8"

authors: bitliner keithdwilliams shabbychef tuanmh


text:
paymentNotification 验证返回签名失败

参考一个返回的数据（生产环境的微信回调数据）：
<xml><appid><![CDATA[wx8b33756ca20faafa]]></appid><attach><![CDATA[58ec7f141497af0a3d38]]></attach><bank_type><![CDATA[HRBB_DEBIT]]></bank_type><cash_fee><![CDATA[26842]]></cash_fee><coupon_count><![CDATA[1]]></coupon_count><coupon_fee>58</coupon_fee><coupon_fee_0><![CDATA[58]]></coupon_fee_0><coupon_id_0><![CDATA[2000000000276621044]]></coupon_id_0><fee_type><![CDATA[CNY]]></fee_type><is_subscribe><![CDATA[Y]]></is_subscribe><mch_id><![CDATA[1360993902]]></mch_id><nonce_str><![CDATA[CrB7044SHiP3DXgV]]></nonce_str><openid><![CDATA[opa33wOoUVMnrYOOIO2rUDYV2x8I]]></openid><out_trade_no><![CDATA[59341bac1497af61be6eb40e947479]]></out_trade_no><result_code><![CDATA[SUCCESS]]></result_code><return_code><![CDATA[SUCCESS]]></return_code><sign><![CDATA[035A6D26A2AE461F84C0750C2DD092A2]]></sign><time_end><![CDATA[20170604224238]]></time_end><total_fee>26900</total_fee><trade_type><![CDATA[JSAPI]]></trade_type><transaction_id><![CDATA[4001952001201706044309990415]]></transaction_id></xml>
可以看到里面还有几个字段：coupon_fee_0,coupon_id_0等，这些似乎在weixin-pay中的paymentNotification.java没有定义。会导致回调时校验签名失败吧？
请参考微信的官方文档

的确有这个问题，之前的难点在与代金券的数量是不固定的，PaymentNotification里面比较难处理，所以有些字段被忽略了。
不过现在可以参考RefundQuery里面对动态数据的处理，需要点时间。。

@borball 我刚修复了一个项目中出现的这种情况.最近微信在大力推广鼓励金,出现这种情况还是蛮高频的.
临时的解决方案是在paymentNotification里面增加coupon_fee_0,coupon_id_0的映射(例如0...3),虽然不太优雅但是能立即解决问题.因为目前微信鼓励金(coupon)不会出现同时超过三条的情况.

@borball 如果没有很好的方案,建议临时先这么解决,起码可以保障现有项目可以正常运转.

fixed at https://github.com/borball/weixin-sdk/commit/d2b337b3e98b787a38229a94f99ea1bce83eaa71

@wodenwang 试一下

能不能把coupon_id_x这里的节点直接转换成map，让其在业务中自己去get节点

已经是这样了，都在others里面。

嗯，应该是可以的 ~

authors: borball dannyxu2015 kkomge wodenwang

repo: borball/weixin-sdk


text:
Consider indicating whether "black" color is explicitly specified or assigned as a default

In our application, we'd like to use the color defined in the format string if it is explicitly specified, falling back to some other default if not.
Unfortunately it seems numfmt returns black in both of these cases and there's no way to discern whether black has been explicitly specified for the given value or not. Formatter.info almost does this, but only for negative values.
Might you consider either providing more detail in formatter.info for the non-negative cases, or providing some metadata at format time to indicate whether black was specified?
More drastically, maybe it could not return black in the unspecified case? (I suppose this would be a breaking change).
Happy to try to cut a PR if we can agree on a direction.

I think both having better details in info and not returning a value if none was specified are better than the current behavior is. 🙂  There is the possibility of having this as an option as well. I've done that for a few backwards incompatible things recently.
I am currently looking more critically at the library. There are a number of things that can be simplified quote a lot and so I may just do a breaking major version update and fix the color function.

authors: borgar madrev

repo: borgar/numfmt


text:
acorn: Add getLineInfo() function type defintion

This commit adds the getLineInfo() function type definition for
acorn.
Below is the link to the exported function for reference:
https://github.com/marijnh/acorn/blob/f91990989104eb1558a1dc42364415403874153c/src/locutil.js#L31

thanks mate!

authors: ericvw vvakame

repo: borisyankov/DefinitelyTyped


text:
RPC: RPCConnections can now handle requests in both directions

No concurrent request in the same direction.

I see the main problem is that it creates a dependency between the NetworkManager and the calling node. Will take a deeper look tomorrow after the release.

Yeah, I don't like that either. I'll update it if I find a cleaner solution.

RPC: Remove RPC client lookup table

Why ?

Yeah, but the worrying part is integration: Maybe my rebase was incorrect, as it seems to always re-establish connections.

Yeah, but the worrying part is integration: Maybe my rebase was incorrect, as it seems to always re-establish connections.

That wasnt the case, I will take a look.

Ok, I see what is happening. Incoming connections from FullNodes cannot be merged as they can not be identified by a key. So every time a FullNode initiates a connections, that is registered as a different peer. Which easily maxes the listener limit of a node.

Why does it keeps on initiating connections tho ?

repo: bosagora/agora


text:
docs(README): Fix date

I suppose this should be 09-02.

Hahaha, sharply spotted! Thank you. <3

authors: dzvon timonv

repo: bosun-ai/swiftide


text:
BadStatusLine("HEAD / HTTP/1.1")

We use bottle as a convenient wrapper for a transient service. (We have client code in multiple languages and this service lets us have a single implementation for this functionality.)
Client bootstrap code starts a bottle application and enter a loop where it sends a HEAD / request until it gets a good response status.
An abbreviated version of this check looks like:
while not bottle_up:
    try:
        conn = http.client.HTTPConnection(host)
        conn.request('HEAD', '/')
        status = conn.getresponse().status
        conn.close()
    except http.client.BadStatusLine as bsl:
        ...
    bottle_up = status in [http.client.OK, http.client.FOUND]

Once in a very long while, getresponse().status raises BadStatusLine with
HEAD / HTTP/1.1

where the original request is included in the response and the HTTP version is missing.
We expect to see something like:
HTTP/1.1 200

We have only ever seen this happen in our regression machinery where we have multiple testcases executing in parallel.
Now this is, admittedly, an old version of 0.13-dev and I am in the process of updating to a newer version of either stable or dev. But I reviewed bottle's open and closed issues and see no mention of BadStatusLine so I am wondering if this was ever seen by other users. Conceivably it is a bug in the http.client library but this is doubtful since we have encountered this problem with several different versions of python3.
Thanks for the great tool. Apart from this intermittent issue, bottle has been rock solid and a joy to work with.

That's a very odd error and I have no idea how that is even possible. The code that sets the status line is not very complicated and did not change recently: https://github.com/bottlepy/bottle/blob/master/bottle.py#L1714 Setting a status that does not start with a numeric code should not be possible.

Thank you for your reply @defnull.
I agree that this is quite peculiar. I will update to the latest 0.13-dev version and monitor it closely for a few weeks. If the problem does not recur, then I will assume that it was magically "fixed" sometime in the past four years (our version dates to May or early June 2016). If it does recur, then I will instrument the http.client code and gather more data. You're welcome to reject this ticket. I'll let you know if I find a smoking gun.
Best regards from Ottawa,
Keith

Please reopen if you find more information.

authors: KeithHanlan defnull

repo: bottlepy/bottle


text:
custom coco format panoramic segmentation dataset

Do you kown how to create wwn custom coco format panoramic segmentation dataset? for examlple panoramic_{}2017.json.
I would appreciate it if you could help me

Please follow Detectron2 document for registering custom dataset: https://detectron2.readthedocs.io/tutorials/datasets.html
COCO format for panoptic segmentation is here: https://cocodataset.org/#format-data

@bowenc0221  I think what @wshilaji tried to ask was "how to create custom annotations for COCO panoptic format".
I also have the same question.
Is there any decent tool for custom panoptic annotation? (into COCO format or Cityscapes format)
There are many annotation/labeling tools for object detection or semantic segmentation,
but I haven't found one for panoptic segmentation.

AFAIK there are no open-sourced labeling tools for panoptic annotation. All panoptic segmentation datasets are created from existing semantic and instance annotations.

@bowenc0221  Thanks.
So it is possible to make custom panoptic annotation by making semantic & instance annotations with existing labeling tools and then convert them into panoptic annotation?
Is there any script for converting semantic & instance annotations to panoptic annotation?
I wanna train Panoptic Deeplab with my custom dataset... Thank you in advance :)

https://github.com/mcordts/cityscapesScripts/blob/master/cityscapesscripts/preparation/createPanopticImgs.py

@wshilaji  I also have the same question for converting converting semantic & instance annotations to panoptic annotation. Can you provide your script with some instructions in your github?  I will star it.   I would appreciate it if you could help me.

https://github.com/wshilaji/panoptic_coco_scipt .
The instruction manual is not detailed. You can reseach code  for a while .
COCO format for panoptic segmentation is here: https://cocodataset.org/#format-data

@LiWentomng
https://github.com/wshilaji/panoptic_coco_scipt .
The instruction manual is not detailed. You can reseach code for a while .
COCO format for panoptic segmentation is here: https://cocodataset.org/#format-data

@wshilaji Thanks a lot!

Hello @mvdelt , I am trying to train Panoptic with my custom data. How did you create the panoptic annotation? Please help me.

authors: LiWentomng bowenc0221 mvdelt userwatch wshilaji


text:
I upload file or folder with --token fail

I create a limited access app on box and choose app token auth(server auth), because boxcli only support jwt token, I have to run boxcli command with --token, but encounter following error.
Thanks!
lis-MacBook-Pro:~ liwanjie$ box files:upload box/private-key --token="***********" --parent-id="*******" -v -s
  box:@box/cli:hooks:init done +0ms
  box init version: @oclif/command@1.5.5 argv: [ 'files:upload', 'box/private-key', '--token=****************', '--parent-id=**********', '-v', '-s' ] +0ms
  box-cli:init Initializing Box CLI +0ms
  box-cli:init Loaded settings {
  box-cli:init   boxReportsFolderPath: '/Users/liwanjie/Documents/Box-Reports',
  box-cli:init   boxReportsFileFormat: 'txt',
  box-cli:init   boxDownloadsFolderPath: '/Users/liwanjie/Downloads/Box-Downloads',
  box-cli:init   outputJson: false,
  box-cli:init   enableProxy: false,
  box-cli:init   proxy: { url: null, username: null, password: null }
  box-cli:init } +1ms
  box-cli:init Using passed in token *********** +1ms
  box-cli:execute Starting execution command: files:upload argv: [
  box-cli:execute   'box/private-key',
  box-cli:execute   '--token=*************',
  box-cli:execute   '--parent-id=**********',
  box-cli:execute   '-v',
  box-cli:execute   '-s'
  box-cli:execute ] +0ms

  box-cli:execute Running framework error handler +1m
  box-cli:execute Handling re-thrown error in base command handler +22ms
Error: ESOCKETTIMEDOUT
    at ClientRequest.<anonymous> (/usr/local/lib/@box/cli/node_modules/request/request.js:816:19)
    at Object.onceWrapper (node:events:482:28)
    at ClientRequest.emit (node:events:376:20)
    at TLSSocket.emitRequestTimeout (node:_http_client:808:9)
    at Object.onceWrapper (node:events:482:28)
    at TLSSocket.emit (node:events:388:22)
    at TLSSocket.Socket._onTimeout (node:net:476:8)
    at listOnTimeout (node:internal/timers:556:17)
    at processTimers (node:internal/timers:499:7)

@invent-lwj Is this still an issue?

@invent-lwj Is this still an issue?

@invent-lwj Have not got a response in a while, so assuming this is no longer an issue. Feel free to re-open this if it is still an issue.

authors: invent-lwj sujaygarlanka

repo: box/boxcli


text:
Indicates what state are considered as translated when pulling

When specifying REMOVE_UNTRANSLATED for the pull command this allows the ability to only retrieve the approved translations. Defaults to including the ones needing review as well. This allows to match the functionality offered by competing translations software (Crowdin, Transifex), as they only bring reviewed translations.

Hi @dragosv!
I'm not commenting on the detail of the implementation as I fell like this can be implemented in a different way.
You just want a way to pull only "approved" translation? You don't care about the XLIFF state do you?

Yes, this is the goal. Ignore the first commit, as it was wrong (my git foo betrayed me)

I mean I want to mimic the other providers. Outputting xliff state would be nice (I was able to output approved, but not state), but it would be limited only to xliff. Also noticed that when doing that the PO will output the fuzzy state.

Again, the 3 paid translation services I have working serge.io serializers output only the approved translations, and I would like to limit that as I do not want to bring translations that need review.

Speaking of xliff state there is some commented code in TranslateStep.java that should be removed, but again it does not worked as expected (setStateProperty).

authors: aurambaj dragosv

repo: box/mojito


text:
🛑 DDNS is down

In 04d5a68, DDNS ($SEC_DDNS) was down:

HTTP code: 0
Response time: 0 ms

Resolved: DDNS is back up in 1ecb861 after 20 minutes.

repo: boyercam/boyercam-upptime


text:
Use with Eleventy and relative paths in Markdown files

I'm trying to use markdown-it-image-size in my Eleventy projects, where

Markdown files are in sub folders
Markdown code for images is relative (no path at all when the image is in the same folder as the Markdown file)

For example with the pack11ty project, there is a Markdown file in this sub folder with this content:
---
title: Pack11ty now has a clean layout and design
date: 2020-04-14 22:38:27 +02:00
description: Pack11ty looks better with Every Layout!
tags: [layout, design]
---

Pack11ty now uses some of [Every Layout](https://every-layout.dev/) layouts and starts looking much better!

![Pack11ty screenshot](pack11ty-screenshot.png "Pack11ty's design as of 14th April 2020")

The image file pack11ty-screenshot.png is in the same folder.
However, markdown-it-image-size doesn't work, it doesn't find the image, which it's trying to find in the root of the project's folder:
markdown-it-image-size: Could not get dimensions of image with url pack11ty-screenshot.png Error: ENOENT: no such file or directory, open '/Users/nicolashoizey/Devs/eleventy/pack11ty/pack11ty-screenshot.png'
    at Object.openSync (node:fs:590:3)
    at syncFileToBuffer (/Users/nicolashoizey/Devs/eleventy/eleventy-plugin-pack11ty/node_modules/markdown-it-image-size/dist/index.js:1325:28)
    at imageSize (/Users/nicolashoizey/Devs/eleventy/eleventy-plugin-pack11ty/node_modules/markdown-it-image-size/dist/index.js:1364:25)
    at getImageDimensions (/Users/nicolashoizey/Devs/eleventy/eleventy-plugin-pack11ty/node_modules/markdown-it-image-size/dist/index.js:1418:18)
    at Object.md.renderer.rules.image (/Users/nicolashoizey/Devs/eleventy/eleventy-plugin-pack11ty/node_modules/markdown-it-image-size/dist/index.js:1393:15)
    at Renderer.renderInline (/Users/nicolashoizey/Devs/eleventy/eleventy-plugin-pack11ty/node_modules/markdown-it/lib/renderer.js:275:28)
    at Renderer.render (/Users/nicolashoizey/Devs/eleventy/eleventy-plugin-pack11ty/node_modules/markdown-it/lib/renderer.js:330:22)
    at MarkdownIt.render (/Users/nicolashoizey/Devs/eleventy/eleventy-plugin-pack11ty/node_modules/markdown-it/lib/index.js:544:24)
    at /Users/nicolashoizey/Devs/eleventy/pack11ty/node_modules/@11ty/eleventy/src/Engines/Markdown.js:79:38
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/Users/nicolashoizey/Devs/eleventy/pack11ty/pack11ty-screenshot.png'
}

Is there a way to tell markdown-it-image-size to find the image file in a path relative to the Markdown file path (here the same folder)?

MarkdownIt usually doesn't know about paths, as the render method only accepts file contents, but I'll gladly update the plugin if 11ty sends extra meta information! Let me know if your 11ty issue gets any promising answers!

It looks like there is a solution described here:
https://github.com/11ty/eleventy/issues/1510#issuecomment-1046128400

Nice! Fixed in @13.3.0

@boyum wow, it works perfectly, thank you so much! 😍🙏

authors: boyum nhoizey

repo: boyum/markdown-it-image-size


text:
d20200328_UEYAMA_TESHIO

Metadata, email link sent.

Report sent.

repo: bpbond/cosore


text:
Document how bpfd users can interact with bpfd on Openshift with 0 privileges

Currently (as of release v0.4.0) we still do not support applications running on Openshift with zero permissions, part of this was fixed in #829  However this still needs to be verified and any other bugs worked out.

In the OLM documentation

Done in #1097

repo: bpfd-dev/bpfd


text:
Big string / big record support

Take, for example, this:
  $ sudo ./build/src/bpftrace -e 'BEGIN { print(*curtask); exit() }'
  error: <unknown>:0:0: in function BEGIN i64 (ptr): A call to built-in function 'memset' is not supported.

The reason is curtask dereference puts the entire struct on the stack.
Which not only doesn't fit, but does not qualify for unrolled memset builtin.
One potential way to handle this is to use the new createGetScratchMap()
infrastructure to "allocate" memory in unop_ptr() instead of from the stack.
But the drawback is that we can only have a single live allocation at a time.
Meaning, something like this would not be possible:
  $one = *curtask;
  $two = *curtask;
  print(($one, $two));

However, something like this could be possible:
  $one = *curtask;
  print($one);
  $two = *curtask;
  print($two);

That is b/c in the second example the lifetimes of $one and $two are disjoint.
I think above is a good starting point for big string / big record support.
We can do some basic lifetime analysis in semantic analyser (or a new pass?)
and error out if there's overlap.
In the future we can allocate as many scratch maps as we need (perhaps up
to a certain limit).
I'm not sure I've covered all the cases. But I think this is something good
to think about.

Could create a scratch-map per big-string/big-record. It's a bit wasteful but we won't need to do lifetime analysis.
Another option is to disallow storing big-string/big-records on the stack. So for example, only allow them to be copied into maps or output ring buffers.

We'll tackle the memset() issue in #3229. Big record support is rather esoteric, so we can address that if users ever ask for it

repo: bpftrace/bpftrace


text:
关于软链接直链和 strm 直链的问题

我仔细对比过 strm 直链和软链接直链时候nginx 中的日志，有些不太一样，因为之前一直 strm 现在向换成软链 ，
strm 直链的日志如下：

软链接 直链的日志如下：

自己直观的使用感受是好像 strm 直链更好一些， 软链接直链的时候最后又返回了局域网 alist 的文件地址，请问一下，我这个是不是软连接的时候配置不对呢？ 看日志的话两种方式都配置合适了吗？ 请大佬空闲里帮忙解惑一下哈

软链接配置是对的，只有获取到了指向文件的原始路径就是生效的，关于提到的差一点，主要是这个clientSelfAlistRule 参数影响的，下边也提到的了几个特殊的客户端，假如不存在客户端拖动进度条花屏问题时，可以注释下方默认的规则禁用，这样和 strm 的日志行为应该就是差不多的了，strm 直链和软链接直链这两种各有优缺点，需要自己主观感觉选择了
// 指定客户端自己请求并获取 alist 直链的规则,代码优先级在 redirectStrmLastLinkRule 之后
// 特殊情况使用,则此处必须使用域名且公网畅通,用不着请保持默认
// 参数1: 分组名,组内为与关系(全部匹配),多个组和没有分组的规则是或关系(任一匹配),然后下面参数序号-1
// 参数2: 匹配类型或来源(字符串参数类型),优先级高"filePath": 文件路径(Item.Path),默认为"alistRes": alist 返回的链接 raw_url
// ,有分组时不可省略填写,可为表达式
// 参数3: 0: startsWith(str), 1: endsWith(str), 2: includes(str), 3: match(/ain/g)
// 参数4: 匹配目标,为数组的多个参数时,数组内为或关系(任一匹配)
// 参数5: 指定转发给客户端的 alist 的 host 前缀,兼容 sign 参数
const clientSelfAlistRule = [
  // "Emby for iOS"和"Infuse"对于 115 的进度条拖动依赖于此
  // 如果 nginx 为 https,则此 alist 也必须 https,浏览器行为客户端会阻止非 https 请求
  [2, strHead["115"], alistPublicAddr],
];

好的 ，谢谢您的解惑

软链接配置是对的，只有获取到了指向文件的原始路径就是生效的，关于提到的差一点，主要是这个clientSelfAlistRule 参数影响的，下边也提到的了几个特殊的客户端，假如不存在客户端拖动进度条花屏问题时，可以注释下方默认的规则禁用，这样和 strm 的日志行为应该就是差不多的了，strm 直链和软链接直链这两种各有优缺点，需要自己主观感觉选择了
// 指定客户端自己请求并获取 alist 直链的规则,代码优先级在 redirectStrmLastLinkRule 之后
// 特殊情况使用,则此处必须使用域名且公网畅通,用不着请保持默认
// 参数1: 分组名,组内为与关系(全部匹配),多个组和没有分组的规则是或关系(任一匹配),然后下面参数序号-1
// 参数2: 匹配类型或来源(字符串参数类型),优先级高"filePath": 文件路径(Item.Path),默认为"alistRes": alist 返回的链接 raw_url
// ,有分组时不可省略填写,可为表达式
// 参数3: 0: startsWith(str), 1: endsWith(str), 2: includes(str), 3: match(/ain/g)
// 参数4: 匹配目标,为数组的多个参数时,数组内为或关系(任一匹配)
// 参数5: 指定转发给客户端的 alist 的 host 前缀,兼容 sign 参数
const clientSelfAlistRule = [
  // "Emby for iOS"和"Infuse"对于 115 的进度条拖动依赖于此
  // 如果 nginx 为 https,则此 alist 也必须 https,浏览器行为客户端会阻止非 https 请求
  [2, strHead["115"], alistPublicAddr],
];

大佬 还有个事情请教一下，我现在这种情况把 115 用 cd2 挂载到本地 nas，然后  如果用symlink 软连接， 生成的软连接生成到nas 本地硬盘上面，这样 emby 在扫软连接的时候也跟 strm 一样 减少对网盘挂载的扫库的吗？ 还是有些想换成软链接，之前是看您有推荐用软链接来着

这样 emby 在扫软连接的时候也跟 strm 一样 减少对网盘挂载的扫库的吗？

1.虽然理论上软链接会减少自动扫库，不过是取决于该软链接这个文件本身的最后修改时间不会发生变化，这个需要自己留意下的，我这边并没有过多测试过软链接和STRM，自用一直是使用最老的挂载媒体的方式，媒体量太多已经无法轻易切换了

还是有些想换成软链接

2.是的，单论软链接和STRM，还是推荐软链接，推荐理由是比较符合这些媒体服务器的文件系统方式，而STRM仅在 emby 上支持较好，jellyfin/plex 体验上会差点儿(每次播放都会慢一点)，所以说推荐软链接仅是考虑可迁移性和潜在的兼容性稍微好点儿，假如暂时不用考虑这几点，STRM也是可以日常使用的

这样 emby 在扫软连接的时候也跟 strm 一样 减少对网盘挂载的扫库的吗？

1.虽然理论上软链接会减少自动扫库，不过是取决于该软链接这个文件本身的最后修改时间不会发生变化，这个需要自己留意下的，我这边并没有过多测试过软链接和STRM，自用一直是使用最老的挂载媒体的方式，媒体量太多已经无法轻易切换了

还是有些想换成软链接

2.是的，单论软链接和STRM，还是推荐软链接，推荐理由是比较符合这些媒体服务器的文件系统方式，而STRM仅在 emby 上支持较好，jellyfin/plex 体验上会差点儿(每次播放都会慢一点)，所以说推荐软链接仅是考虑可迁移性和潜在的兼容性稍微好点儿，假如暂时不用考虑这几点，STRM也是可以日常使用的

好的  谢谢哈


text:
Consider adding codecov

What should we do?
Since the codebase and the properties support becomes bigger, we could consider adding code coverage (as codecov) to this library.
Why should we do it?
Like we have in other projects, it would increase our confidence we also cover different edge cases.

Let's not consider, let's do it :).
I did the same thing for form-js just a few days ago. Codecov + decent test story (we have that one) is our baseline.

authors: nikku pinussilvestrus

repo: bpmn-io/properties-panel-next


text:
Comparison w/ original

Similar t-sne plot is good for a sanity check. But what kind of numeric figure of merit can you use in an ablation study to see impact of GloVe, concat and fully connected layers vs sigmoid of dot, LSTM vs summation, etc.?

So noted. Next step is to reproduce emoji-description classification as discussed in section 4.1 of [1].

authors: bradleypallen rdaniel

repo: bradleypallen/keras-emoji-embeddings


text:
🛑 gifsb.in is down

In c0d4114, gifsb.in (https://gifsb.in) was down:

HTTP code: 0
Response time: 0 ms

Resolved: gifsb.in is back up in da41e0f.

repo: bradp/uptime


text:
update

adding resource for color picker
, Pull request TITLE should look like this: [uicolorpicker] -> [https://uicolorpicker.com]
uicolorpicker
Use click to copy/paste color
Link: https://uicolorpicker.com
Checklist:

[x] I have performed a self-review of submitted resource and its follows the guidelines of the project.

Closing as we have many other color picker tools that have superior features.


text:
Dear author, how to generate the label? thx where is the "generate_label" script in the dir?

where is the "generate_label" script?

I also couldn't find the script of  "generate_label.py" in Label Generation, is this the same file as cross_view_transformers/scripts/generate_data.py?

nuscenes_dataset_generated.py?

Hello,
As @Bosszhe says, is the file generate_data.py
Just change the command to:
python3 scripts/generate_data.py
    data=nuscenes \
    data.version=v1.0-trainval \
    data.dataset_dir=/media/datasets/nuscenes \
    data.labels_dir=/media/datasets/cvt_labels_nuscenes \
    visualization=nuscenes_viz

authors: Bosszhe emilyemliyM gsg213 xiaoxiongzzz


text:
S5. Creating a public release of AIT99

Epic:
Description
User: The same Scientist from Use Case 1 #98
Use Case: All the annotations are done for AIT99 from me and from the experts and we are ready to release the taxonomy publicly.
What I have:

A link to final AIT99 file(s) with all the TDT annotations
My starting h5ad file in AIT format, potentially with updated TDT annotations

What I need to know:

How do I make this taxonomy public?
I’d like to publish this taxonomy on cellxgene. Is it ready to go or do I need to do additional formatting?
I’m submitting a paper with this taxonomy. What links should I include in it?

Tasks

[ ] Task1
[ ] Task2
[ ] Task3

How do I make this taxonomy public?

Export to h5ad - checks will run to ensure consistency and report any problems in need of fixing before making release.
Press the Publish button to make a final release
Make the GitHub repo public (will need someone with Admin permissions - currently members of our group + some of the Allen team, including Patrick & Tim Fliss)
Publish AnnData file via some mechanism at Allen????

I’d like to publish this taxonomy on cellxgene. Is it ready to go or do I need to do additional formatting?

CxG requires a single Cell Ontology term per cell.  We will provide tooling to generate this (there may be some cases where users need to choose between terms.  We will support this.)
We don't curen

I’m submitting a paper with this taxonomy. What links should I include in it?

Link to final AnnData file with merged in taxonomy
PURL - supports reporting as DataFrames in combination with CAS-Tools - which can also pull h5ad file.
CxG link?

Note - one aim of all of this is to provide an infrastructure that ensures versions match across papers, platforms etc.  This can be tested via embedded version links but also via tests that check for consistency between taxonomy and linked AnnData file.

authors: dosumis hkir-dev

repo: brain-bican/taxonomy-development-tools


text:
Discrepancy in EEGNet Implementation: Extra Conv2D Layer

Description
I was reviewing the EEGNet implementation in this repository and I noticed that there seems to be an extra Conv2D layer compared to the original implementation of EEGNet provided by the authors at arl-eegmodels.
Details

Braindecode Implementation: https://braindecode.org/stable/_modules/braindecode/models/eegnet.html#EEGNetv4
Original Implementation: https://github.com/vlawhern/arl-eegmodels/blob/master/EEGModels.py

The additional Conv2D layer I am referring to is the conv_classifier layer, defined as follows:
self.add_module(
    "conv_classifier",
    nn.Conv2d(
        self.F2,
        self.n_classes,
        (n_out_virtual_chans, self.final_conv_length),
        bias=True,
    ),
)

Concern
This additional layer could potentially affect the performance and behavior of the model, and it might lead to results that are not consistent with the original EEGNet architecture. I wanted to bring this to your attention to clarify if this is an intentional modification or if it might be an oversight.
Request for Clarification
Could you please clarify the reason behind this additional layer? If it is indeed a discrepancy, would it be possible to update the implementation to align with the original EEGNet architecture?
Thank you for your time and attention to this matter.
Best,
sahand

Just to also leave an explanation here, this layer corresponds to the dense classification layer in the other implementation https://github.com/vlawhern/arl-eegmodels/blob/4a512e503198db2010848813ead9afbf8cd54c97/EEGModels.py#L151-L152
In many models in Braindecode, classification layers are implemented as convolutional layers to allow to output a timeseries of class predictions

authors: robintibor vak-sah

repo: braindecode/braindecode


text:
Set dynamic queue priority

Currently dynamic queues have lowest priority. Is it possible to set a specific priority to all dynamic queues? My use case needs the dynamic queue to have the highest priority.

@akshayrawat do you have weighted or strict queues?
The priority of weighted queue is defined by how many times it's present in an array: Sidekiq::LimitFetch::Queues.instance_variable_get(:@queues).
The priority of strict queue is defined by its position in the same array.
Dynamic queues are pushed just once to the end of this array.
To increase its priority in weighted scenario you'll need to push it a few more times to get appropriate balance. To increase its priority in strict scenario you'll need to move it to the beginning of array.

authors: akshayrawat brainopia


text:
template group config not allowed under entities?

as posted in the community:
needed some extra template sensors again, so I tried:
sensor:

  - platform: powercalc
    entities:

      - create_group: All lights
        include:
          template: >
            {{expand('light.all_lights_only')|map(attribute='entity_id')|list}}

      - create_group: All switches
        include:
          template: >
            {{expand('group.all_switches')|map(attribute='entity_id')|list}}

      - entity_id: light.corridor_pool

ofc the templates are correct, and listing all entities in dev tools. All individual entities exist (and, already have individual powercalc sensors)
And yet, I get this error at startup:
Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.powercalc.sensor
Source: custom_components/powercalc/sensor.py:238
Integration: Powercalc (documentation, issues)
First occurred: 11:21:12 (1 occurrences)
Last logged: 11:21:12
Could not resolve any entities in group 'All lights'

and no sensors are created. the switch template does not show an error, but Powercalc does not create any sensors for that config either.
added to that, all other utility integration entities are now unavailable…
configuring the template entities individually like:
sensor:

  - platform: powercalc
    create_group: All lights
    include:
      template: >
        {{expand('light.all_lights_only')|map(attribute='entity_id')|list}}

  - platform: powercalc
    create_group: All switches
    include:
      template: >
        {{expand('group.all_switches')|map(attribute='entity_id')|list}}

  - platform: powercalc
    entities:

      - entity_id: light.corridor_pool
      - entity_id: etcetc
      - etcetc

does create the sensors.
is this a bug, or to be expected?

unfortunately I must retract the statement above the second config works alright.
Nowe see this:
Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.powercalc.sensor
Source: custom_components/powercalc/sensor.py:238
Integration: Powercalc (documentation, issues)
First occurred: 22:34:34 (2 occurrences)
Last logged: 22:34:34

Could not resolve any entities in group 'All lights'
Could not resolve any entities in group 'All switches'

also using that config
sensor:

  - platform: powercalc
    create_group: All lights
    include:
      template: >
        {{expand('light.all_lights_only')|map(attribute='entity_id')|list}}

  - platform: powercalc
    create_group: All switches
    include:
      template: >
        {{expand('group.all_switches')|map(attribute='entity_id')|list}}

somehow I suspect the template errors when a single entity inside that template list is unavailable? Ikea Trqdfri currently suffering from some serious issues in core, and maybe that is causing this too. not sure.
will add a test to not allow unavailable, maybe that helps

Did you create this light group with GUI helper or YAML?

only YAML.
Ah that would indeed be even better, if it auto discards unavailable lights. My group is a light.all_lights_only light group (and made in the UI Helper), so no YAML light group. SHouldnt make a difference but mentioning just to be sure.

I did ask what methodology you used to create the light group (not the powercalc sensor), but it's GUI helper as you already indicated.
That combination is problematic with the templating logic. probably because of loading/intializing order. Normally you only use templates when HA has fully started, so that would behave differently.
But the solution is to use the group option as I shared above. This is working for me with the GUI lightgroups.
Currently it will also include unavailable entities, and set the group to unavailable when any of the underlying entities are unavailable. However I think we can also look at the ignore_unavailable_state option for group entities.
Like this:
- create_group: All lights
  include:
    group: light.all_lights_only
  ignore_unavailable_state: true

Then all entities will still be included in the power group, but only the entities which are available will be summed into the total. When a power sensor become available again it will also be included in the group, which is not true for the approach you used. It depends on which entities were available during startup of powercalc.

sorry, didnt see this when I posted the earlier update above..
complicating factor is I also have some earlier powerful groups I want to keep:
      - create_group: Terrace outdoors
        entities:
          - entity_id: light.terrace_spot_1
          - entity_id: light.terrace_spot_2
          - entity_id: light.terrace_spot_3
          - entity_id: light.terrace_spot_4
        ignore_unavailable_state: true

      - create_group: Kerststerren
        entities:
          - entity_id: light.ster_links
          - entity_id: light.ster_rechts

      - create_group: Dining table
        entities:
          - entity_id: light.dining_table_lamp_1
          - entity_id: light.dining_table_lamp_2
          - entity_id: light.dining_table_lamp_3
        ignore_unavailable_state: true

Can we somehow include those inside the all_lights light group config?

Your second example already includes all entities of group light.all_lights_only, which also contains light.terrace_spot_1 etc. Does you already try this? You might add the ignore_unavailable_state: true same as you did for all the other groups.
I don't think you third example using the nesting has any benefits. Also this combination is not really suggested or supported (nested groups + using the include function). Is don't know if it has any drawbacks, unforseen issues etc.

I only tried the nesting because this was mentioned in the docs?
it would have the benefit of being able to group some, and add those groups to the All lights, which would then automagically not double those in the group, but contain them...
anyways, it does not work, because this is the result:

it loads all the individual entities if the nested groups, but it does not see all the others.
My end goal was merely to create daily and yearly entities for the power/energy of All light. I dont need the daily and yearly for the individual lights... I do need the power and energy for the individual lights though, so I will keep those in the config.
Have to figure out how to create the utility meter entities most efficiently for the grouped power entities

You can also easily create a new group with the powercalc gui and select sensor.lights_inside_total_device_power and sensor.lights_outside_total_device_power as additional power sensors, and the energy sensors on additional energy sensors.

I'll need to have a look into why not all light sensors are added when you combine include with entities, but only the entities are added.

Ook belangrijk, zoals hier vermeld:
https://github.com/bramstroker/homeassistant-powercalc#dynamically-including-entities

Met de include functie worden alleen automatisch entiteiten toegevoegd die in powercalc library staan (dus automatisch gemaakt kunnen worden).
Dus als je zelf een entity hebt geconfigureerd met meer properties dan alleen entity_id, dan zullen die niet met de include functie meegaan.
Dus stel er is een light.test, maar die heeft geen profiel in powercalc library dan zal deze bijvoorbeeld niet include worden.
- platform: powercalc
  entity_id: light.test
  fixed:
    power: 50

Makkelijkste is toch denk ik gewoon een nested boom maken en de entities "hard" definieren, dat werkt gewoon en is ook het minst foutgevoelig.
Zoals uit het voorbeeld van de readme.
sensor:
  - platform: powercalc
    create_group: All lights
    entities:
      - entity_id: light.a
      - entity_id: light.b
      - create_group: Upstairs lights
        entities:
          - entity_id: light.c
          - create_group: Bedroom Bob lights
            entities:
              - entity_id: light.d
              - entity_id: light.e
                fixed:
                  power: 50
              - entity_id: light.f
                 manufacturer: signify
                 model: LCT010

Heb het voorbeeld van de readme nog uitgebreid met light_e en light_f zodat het ook duidelijk is dat je handmatig geconfigureerde sensors zo toe kan voegen. Die sensors worden dan dus ook aan de 3 groepen toegevoegd.

I don't know why I posted a whole reply in dutch lol. Anyway not going to translate now as we are both dutch anyway.

In order not to create a separate post, I will write with your permission here.
I have a kettle that has two switches. One is responsible for heating, the other is responsible for boiling. I wanted to combine them into one sensor, since they consume the same 1950W. But when I create a group, I have 3 sensors, one for boiling, the second for heating and one common. Can I somehow get only one shared?

hehe, nevermind, I got that ;-)
thing is, I dont use the GUI options , because that makes the startup slowdown (in the integration startup list, as we discussed some time ago)
Also, for Powercalc, I find it much easier to have all configs in Yaml in a single package. UI is ok, but when it comes to including more than a single entity there's nothing like Yaml....
In the end, I probably will (have to) look at that nested tree of all entities.
thanks for your support, as always, much appreciated.
if you add the ignore_unavailable to the templates, that would be a nice feature. (ofc we also need to guard in the template itself)
and find an answer to

I'll need to have a look into why not all light sensors are added when you combine include with entities, but only the entities are added.

In order not to create a separate post, I will write with your permission here. I have a kettle that has two switches. One is responsible for heating, the other is responsible for boiling. I wanted to combine them into one sensor, since they consume the same 1950W. But when I create a group, I have 3 sensors, one for boiling, the second for heating and one common. Can I somehow get only one shared?

Could you please make a new issue? that would also make it easier for others to find a solution for similar issues.
When done I will remove these comments to not pollute this issue too much with unrelated information.

I'll need to have a look into why not all light sensors are added when you combine include with entities, but only the entities are added.

I have added a test to the test suite of powercalc to test the combination of entities with include, but it's working fine.
Setup is as follows.
Have 3 lights, light.light_a, light.light_b and light.light_c.
light_a has manufacturer and model information in device registry and is supported by powercalc.
Created a light group light.lightgroup containing light.light_a, light.light_b and light.light_c.
Next I setup powercalc as follows:
sensor:
  - platform: powercalc
    create_group: PowercalcGroup
    include:
      group: light.lightgroup
    entities:
      - entity_id: light.light_b
         fixed:
           power: 50
      - entity_id: light.light_c
         fixed:
           power: 50

Now the newly created power group sensor.powercalcgroup_power contains all 3 power sensors from light a, b and c.
b and c are fixed 50W sensors, and a is controlled by powercalc library profile.
You should see something like this in the logs:
DEBUG:custom_components.powercalc.sensor:Including entities from group: light.light_group
DEBUG:custom_components.powercalc.sensor:Found include entities: [RegistryEntry(entity_id='light.light_a'.........
...
DEBUG:custom_components.powercalc.sensors.power:Creating power sensor (entity_id=light.light_a entity_category=None, sensor_name=light_a power strategy=LutStrategy manufacturer=lidl model=HG06462A standby_power=0.20 unique_id=99f899fefes)
DEBUG:custom_components.powercalc.sensors.power:Creating power sensor (entity_id=light.light_b entity_category=None, sensor_name=light_b power strategy=FixedStrategy manufacturer= model= standby_power=0.00 unique_id=fc7dbdca)
DEBUG:custom_components.powercalc.sensors.power:Creating power sensor (entity_id=light.light_c entity_category=None, sensor_name=light_c power strategy=FixedStrategy manufacturer= model= standby_power=0.00 unique_id=3db779de)
DEBUG:custom_components.powercalc.sensors.group:Creating grouped power sensor: Powercalc Group power (entity_id=sensor.powercalc_group_power)
DEBUG:custom_components.powercalc.sensors.group:Creating grouped energy sensor: Powercalc Group energy (entity_id=sensor.powercalc_group_energy)

@Mariusthvdb Did you see my last comment? I was not able to reproduce your issue. Maybe you can check with the additional information I provided?

still puzzling here.
I need the light.all_lights_only to be included, but also add some nested (powercalc) groups, which individual lights are already in the all_lights_only light group.
eg, I have these powercalc groups:
      - create_group: Terrace outdoors
        entities:
          - entity_id: light.terrace_spot_1
          - entity_id: light.terrace_spot_2
          - entity_id: light.terrace_spot_3
          - entity_id: light.terrace_spot_4
        ignore_unavailable_state: true

      - create_group: Dining table
        entities:
          - entity_id: light.dining_table_lamp_1
          - entity_id: light.dining_table_lamp_2
          - entity_id: light.dining_table_lamp_3
        ignore_unavailable_state: true

I need this to be grouped, because I also want those group power and energy sensors....
what will happen if I do:
  - platform: powercalc
    entities:
      - create_group: All lights powercalc
        include:
          group: light.all_lights_only
        entities:
          - create_group: Terrace outdoors
            entities:
              - entity_id: light.terrace_spot_1
              - entity_id: light.terrace_spot_2
              - entity_id: light.terrace_spot_3
              - entity_id: light.terrace_spot_4
            ignore_unavailable_state: true

          - create_group: Dining table
            entities:
              - entity_id: light.dining_table_lamp_1
              - entity_id: light.dining_table_lamp_2
              - entity_id: light.dining_table_lamp_3
            ignore_unavailable_state: true

ideally this config would create the groups and the grouped and individual sensors for the entities in those groups, and then check the light.all_lights_only entities to add the remaining individual light entities powercalc sensors, and ofc finally create the power/energy sensors for the All lights powercalc....

You second example should just work, as it is similar to the configuration I shared and is working for me and in the automatic test suite.
sensor:
  - platform: powercalc
    create_group: PowercalcGroup
    include:
      group: light.lightgroup
    entities:
      - entity_id: light.light_b
         fixed:
           power: 50
      - entity_id: light.light_c
         fixed:
           power: 50

restarting now.
btw, the last config with the multiple groups errors:
Invalid config for [sensor.powercalc]: value should be a string for dictionary value @ data['entities'][0]['include']['group']. Got ['light.all_lights_only', OrderedDict([('entity_id', 'light.dining_table'), ('igonore_unavailable_state', True)]), OrderedDict([('entity_id', 'light.terrace_outdoors'), ('igonore_unavailable_state', True)])]. (See ?, line ?). ```

apparently it wont accept the list.. (yet)

No you can't use the last config that way. The second example using nested groups is fully supported.

No you can't use the last config that way. The second example using nested groups is fully supported.

which 'last config' is that? I am confused now.

I didn't see your edit yet of the post.
I mean this configuration:
- platform: powercalc
    entities:
      - create_group: All lights powercalc
        include:
          group:
            - light.all_lights_only
            - entity_id: light.dining_table
              igonore_unavailable_state: true
            - entity_id: light.terrace_outdoors
              igonore_unavailable_state: true

You should not use that as it's not supported. As you already found out ;-)

You should not use that as it's not supported.

would be cool though. would you consider a FR for supporting the Hue light groups directly?

You should not use that as it's not supported.

would be cool though. would you consider a FR for supporting the Hue light groups directly?

Cannot implement that unfortunately as the information about which entities are in a hue group is not available to me. Did have a look into that before.

no, this config does not work, it simply shows all being unavailable.

Strange. Did you put igonore_unavailable_state: true in the root now?
Any clues in the logs?

yes, I tried this config:
sensor:

  - platform: powercalc
    entities:

      - create_group: All lights powercalc
        include:
          group: light.all_lights_only
        ignore_unavailable_state: true
        entities:
          - create_group: Terrace outdoors
            entities:
              - entity_id: light.terrace_spot_1
              - entity_id: light.terrace_spot_2
              - entity_id: light.terrace_spot_3
              - entity_id: light.terrace_spot_4
            ignore_unavailable_state: true

          - create_group: Dining table
            entities:
              - entity_id: light.dining_table_lamp_1
              - entity_id: light.dining_table_lamp_2
              - entity_id: light.dining_table_lamp_3
            ignore_unavailable_state: true

and see this in the attributes :

so all named entities in the nested create groups are taken into account (they are off power, so should be unavailable and hence ignored), but the light.all_lights_only (which is a compound HA light group containing other lights groups/lights, isnt take. into account:

maybe Powercalc can not iterate those like jinja can?

Might be because because the contained entity_id's in lights.all_lights_only are light groups as well? For example light.all_inside_light?

yes, that is what I said above. my suspicion too

I don't go recursively through that. Will have a look if I can implement that.

that would be very nice, and consistent with:
{{expand('light.all_lights_only')|map(attribute='entity_id')|list }}

which lists them all

Including multiple groups at once is not implemented and supported yet, as previously indicated. So you can try, but that won't work in any way. Maybe I will add support for that in the future.
I have worked since my last comment on supporting recursively expanding of the groups. See #1433.
You can give that a test run by installing the master branch. So your example with include: group: light.all_lights_only should work now hopefully.
The reason templates are not working for that, and I can't reuse the expand myself is because during startup the entities attribute of the light group is not available yet. This attribute is only populated after startup, so that makes things very complicated.
Global ignore_unavailable_state: true was already implemented long time ago on your request, that should work. It's also listed as global configuration option in the readme.

You can give that a test run by installing the master branch.

installing as I type this, thanks!

The reason templates are not working for that, and I can't reuse the expand myself is because during startup the entities attribute of the light group is not available yet. This attribute is only populated after startup, so that makes things very complicated.

Yes, I am aware. my remark about the
{{expand('light.all_lights_only')|map(attribute='entity_id')|unique|list }}
was merely directed at using some technique to filter out unique entities. not asking you to implement the templates as jinja literally.

Global ignore_unavailable_state: true was already implemented long time ago on your request, that should work.

Nice, missed that, will change right away, saving me again 3 lines of yaml. yeah.

That's very odd, do you have some other configuration for these lights somewhere?
You might put on debug logging and then search for occurances light.dining_table_lamp_1, that should give some pointers are to where power entity for this light is created duplicately.

Btw very strange some things were working for you already after updating to master, because I just merged to master 1 minute ago. I saw I hadn't merged the PR yet.

yeah, I saw that and downloaded the branch ;-)

Can you sent me the full log with debug enabled after startup. You can sent it on discord if you want. Might have a look later today or the weekend, have to go now.

will do.
Ive just reordered the sensor to:
      - create_group: All lights powercalc
        include:
          group: light.all_lights_only
        entities:

          - entity_id: light.boekenkast_marte
            standby_power: 0.18
            linear:
              attribute: brightness
              calibrate:
                - 1 -> 0.3
                - 3 -> 0.7
                - 13 -> 0.8
                - 26 -> 0.9
                - 38 -> 1.0
                - 51 -> 1.1
                - 64 -> 1.3
                - 76 -> 1.4
                - 89 -> 1.6
                - 102 -> 1.8
                - 115 -> 2.3
                - 128 -> 2.5
                - 140 -> 2.9
                - 153 -> 3.3
                - 166 -> 3.8
                - 178 -> 4.1
                - 191 -> 5.1
                - 204 -> 5.9
                - 217 -> 6.4
                - 230 -> 8.1
                - 242 -> 9.4
                - 255 -> 10.8

          - entity_id: light.licht_1
    #         model: TRADFRIbulbT120E27WSopal470lm

# Hue outdoor post
          - entity_id: light.backdoor_outdoors
            model: LWB010 #LWF002

          - create_group: Terrace outdoors
            entities:
              - entity_id: light.terrace_spot_1
              - entity_id: light.terrace_spot_2
              - entity_id: light.terrace_spot_3
              - entity_id: light.terrace_spot_4

          - create_group: Dining table
            entities:
              - entity_id: light.dining_table_lamp_1
              - entity_id: light.dining_table_lamp_2
              - entity_id: light.dining_table_lamp_3

and restarted, to see all individual entities listed in that group. so dining table group is blocking anything below that in the group.
all sensor entities now are available, the main group, and the embededd group, and all individual entities.
the error on the dining table remains, and yes, I'll pop the log over I discord.

Btw one idea to try.
What happens if you switch around Dining table and Terrace outdoors?

no difference. still the same error.
except the entities for terrace outdoors, which now come after the dining table config are no longer created.
Let me do this:
comment the dining table completely, restart, check whether the entities still are created. (which they shouldn't).
If yes, Ill try and delete them manually, and next add them back to the config

Closing this isuse as we did some further discussion and resolution on discord.

authors: Mariusthvdb bramstroker pafftis

repo: bramstroker/homeassistant-powercalc


text:
Add webview event for security state changes

Needed to address
https://github.com/brave/browser-laptop/issues/5490 and
https://github.com/brave/browser-laptop/issues/5238
Auditors: @bsclifton @bbondy

++

yup, i named it to be consistent with the did-navigate events but i can change it to security-style-changed after this release

authors: bridiver diracdeltas

repo: brave/electron