Panic when opening file via dicom_object::file::open_file

File - compressed.zip
thread 'main' panicked at /home/runner/.cargo/git/checkouts/dicom-rs-165e2a1669724caa/239cba5/parser/src/stateful/decode.rs:729:45:
index out of bounds: the len is 0 but the index is 0
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d9284afea99e0969a0e692b9e9fd61ea4ba21366/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /rustc/d9284afea99e0969a0e692b9e9fd61ea4ba21366/library/core/src/panicking.rs:74:14
   2: core::panicking::panic_bounds_check
             at /rustc/d9284afea99e0969a0e692b9e9fd61ea4ba21366/library/core/src/panicking.rs:276:5
   3: <usize as core::slice::index::SliceIndex<[T]>>::index
             at /rustc/d9284afea99e0969a0e692b9e9fd61ea4ba21366/library/core/src/slice/index.rs:301:10
   4: core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
             at /rustc/d9284afea99e0969a0e692b9e9fd61ea4ba21366/library/core/src/slice/index.rs:17:9
   5: <smallvec::SmallVec<A> as core::ops::index::Index<I>>::index
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smallvec-1.13.2/src/lib.rs:2031:18
   6: dicom_parser::stateful::decode::StatefulDecoder<D,S,BD,TC>::read_value_us
             at /home/runner/.cargo/git/checkouts/dicom-rs-165e2a1669724caa/239cba5/parser/src/stateful/decode.rs:729:45
   7: <dicom_parser::stateful::decode::StatefulDecoder<D,S,BD> as dicom_parser::stateful::decode::StatefulDecode>::read_value_preserved
             at /home/runner/.cargo/git/checkouts/dicom-rs-165e2a1669724caa/239cba5/parser/src/stateful/decode.rs:989:32
   8: dicom_parser::dataset::read::DataSetReader<S>::read_value
             at /home/runner/.cargo/git/checkouts/dicom-rs-165e2a1669724caa/239cba5/parser/src/dataset/read.rs:568:45
   9: <dicom_parser::dataset::read::DataSetReader<S> as core::iter::traits::iterator::Iterator>::next
             at /home/runner/.cargo/git/checkouts/dicom-rs-165e2a1669724caa/239cba5/parser/src/dataset/read.rs:393:35
  10: dicom_object::mem::InMemDicomObject<D>::build_object
             at /home/runner/.cargo/git/checkouts/dicom-rs-165e2a1669724caa/239cba5/object/src/mem.rs:1845:38
  11: dicom_object::mem::<impl dicom_object::FileDicomObject<dicom_object::mem::InMemDicomObject<D>>>::open_file_with_all_options
             at /home/runner/.cargo/git/checkouts/dicom-rs-165e2a1669724caa/239cba5/object/src/mem.rs:376:22
  12: dicom_object::file::OpenFileOptions<D,T>::open_file
             at /home/runner/.cargo/git/checkouts/dicom-rs-165e2a1669724caa/239cba5/object/src/file.rs:130:9
  13: dicom_object::file::open_file
             at /home/runner/.cargo/git/checkouts/dicom-rs-165e2a1669724caa/239cba5/object/src/file.rs:31:28
  14: dicom::check_file
             at ./src/crates/dicom/src/main.rs:26:15
  15: dicom::main
             at ./src/crates/dicom/src/main.rs:21:9
  16: core::ops::function::FnOnce::call_once
             at /rustc/d9284afea99e0969a0e692b9e9fd61ea4ba21366/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
timeout: the monitored command dumped core

##### Automatic Fuzzer note, output status "None", output signal "Some(6)"

Thank you for reporting. That file is clearly corrupted, with the DICOM data ending shortly after the Pixel Representation attribute header. Can you please double check that you are producing and/or providing the sample file correctly?


Update shasum

Every time the file changes (so, until a release is done, every time something is merged to master), the shasum needs to be updated.
Download the master.zip file with curl or something and run shasum -a 256 master.zip on MacOS or Linux and update this file.
It could probably also be added to Travis if you want.

Just realized, even changing the brew formula will update the master.zip and therefor be a loop itself... So this formula will never really work in its current form. Will think about that.

The way that the homebrew project advices doing this is by having a separate repo. Either homebrew-loop for just this one, of homebrew-miserlou or whatever if you have multiple apps you'd like to package for homebrew.
https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap

not going to be working like thise


Make wsdl2java part of Quarkus code generation phase

Fix #714
This is 99% based on https://github.com/quarkiverse/quarkus-cxf/pull/731 by @scrocquesel
The modifications are:

Removed commented code
Adapted CxfClientTest.wsdlUpToDate()
Renamed WsdlCodeGen to Wsdl2JavaCodeGen, same with providerId(): wsdl -> wsdl2java

Thanks a lot for your great work, @scrocquesel !

We also need to adapt the documentation.


Tf 12064 and 12067 / create base for tests

Ticket(s)
Required unless this is just a change to documentation.

1264 1267

Type of change

[x] Documentation or testing

Description
We are not using any sort of tests on our code base, this can lead us to break some important things without noticing, in example, CV`s calculator.
We dont want that our users came to our website and cant access Calculator or receive a wrong result.
This PR aims to create our bases for creating e2e tests and creates an initial test
Screenshots

Review your work
Preview
Use your local build.

[x] Everything works as expected
[x] Check changed page(s)
[x] Click through calculator if changes were made
[x] Compare figma screenshot with the changes
[x] Compare linked Figma section to changes made
[x] Refresh the page, check that using the go-back button works as expected
[x] Check large screen size (>1400)
[x] Check tablet screen size (<786)
[x] Check mobile screen size (<375)
[x] Check that links work
[x] Check the console for errors or warnings
[x] Check the terminal for any errors or problems
[x] Check for any uncaught ESLint problems

Code Clarity and Readability

[x] Are variable and function names descriptive, meaningful, in the appropriate case (ex: snake, camel)?
[x] Is the code self-explanatory and easy to understand?
[x] Are comments used where necessary to explain complex logic or provide additional context?

Code Efficiency

[x] Is the code DRY?
[x] Are there any areas of unnecessary complexity or duplication that might benefit from refactoring?

Code Modularity and Reusability

[x] Is the code and any new components organized in a logical location in the directory?
[x] Can any code snippets be refactored into reusable components?
[x] Are there opportunities to abstract common functionality into separate functions or classes?
[x] Is there good use of CSS selectors when creating new components or refactoring old ones?

Best Practices and Coding Standards

[x] Does the code follow the established coding standards and style guide of the project?
[x] Are there any violations of best practices that should be addressed?
[x] Are there any hard-coded strings or UI elements that should be externalized?
[x] Are all measurement units in REM? (border-radius, borders should still be in px)
[x] Is there any unnecessary commented out code lingering?
[x] Are all files TypeScript?

Overall PR Checklist:
Please delete any options that are not relevant

[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 (if applicable)
[x] My changes generate no new warnings in the console
[x] There are no new linting errors/problems in my code
[x] I have added tests that prove my fix is effective or that my feature works (if applicable)
[x] I have filled out the new 3rd party dependency checklist (if applicable)
[x] I have filled this PR out fully, and cleaned up any extraneous items so that it is clear and easy to understand

This is great Leo! I like the test cases you chose for our first tests, they are very appropriate. Here are a few things to think about:

How can we incorporate this into our workflow?
Some documentation (ie: cy:open and cy:run commands, having dev server running to run tests)
This console warning when running the tests:

WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
Missing baseUrl in compilerOptions. tsconfig-paths will be skipped

For those questions:
1 - I have a task created that i will work on implement this in a workflow, so when a PR is open, we will test this new code.
2 - Yeah! I can work on this for sure, I will create a task in this task group to implement some docs to this.
3 - That warning seems to be related to your OS and some security config, i read something about MAC, its not something related to cypress.
I dont have this warning (I use linux).

This is great Leo! I like the test cases you chose for our first tests, they are very appropriate. Here are a few things to think about:

How can we incorporate this into our workflow?
Some documentation (ie: cy:open and cy:run commands, having dev server running to run tests)
This console warning when running the tests:

WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
Missing baseUrl in compilerOptions. tsconfig-paths will be skipped

For those questions: 1 - I have a task created that i will work on implement this in a workflow, so when a PR is open, we will test this new code. 2 - Yeah! I can work on this for sure, I will create a task in this task group to implement some docs to this. 3 - That warning seems to be related to your OS and some security config, i read something about MAC, its not something related to cypress. I dont have this warning (I use linux).

As long as it is just a me problem! lol everything sounds great, thanks @LeoFuna


Port and cross-compile tests for java.lang.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2530/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3272/
Test FAILed.

That's all.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2540/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3283/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2563/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3311/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2568/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3319/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2572/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3324/
Test FAILed.

That's all.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2580/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3332/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2579/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3331/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2578/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3330/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2575/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3328/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2583/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3336/
Test PASSed.

LGTM

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2586/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3339/
Test PASSed.


node-zookeeper-client EventEmitter-Leak

If you start multiple (four in my setup) Consumers in one process (using one client for each consumer), there will be a possible EventEmitter Leak in node-zookeeper-client/lib/WatcherManager.js(line 37):
https://github.com/alexguan/node-zookeeper-client/blob/master/lib/WatcherManager.js#L37
it seems that watchers[path].once("notification", watcher); is called more than 11 times.
My stacktrace:
(node) warning: possible EventEmitter memory leak detected. 11 notification listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at EventEmitter.addListener (events.js:239:17)
    at EventEmitter.once (events.js:265:8)
    at registerWatcher (/opt/nodejs/node_modules/node-zookeeper-client/lib/WatcherManager.js:37:24)
    at WatcherManager.registerDataWatcher (/opt/nodejs/node_modules/node-zookeeper-client/lib/WatcherManager.js:55:5)
    at ConnectionManager.registerDataWatcher (/opt/nodejs/node_modules/node-zookeeper-client/lib/ConnectionManager.js:173:25)
    at Object.callback (/opt/nodejs/node_modules/node-zookeeper-client/index.js:740:48)
    at ConnectionManager.onSocketData (/opt/nodejs/node_modules/node-zookeeper-client/lib/ConnectionManager.js:562:35)
    at ConnectionManager.onSocketData (/opt/nodejs/node_modules/node-zookeeper-client/lib/ConnectionManager.js:580:14)
    at ConnectionManager.onSocketData (/opt/nodejs/node_modules/node-zookeeper-client/lib/ConnectionManager.js:580:14)
    at ConnectionManager.onSocketData (/opt/nodejs/node_modules/node-zookeeper-client/lib/ConnectionManager.js:580:14)

I am having the same problem. @ansgarS were you able to find a solution for it?

1 for this issue, I get it with a single consumer but when the number of partitions I add >= 11

It's very old issue, AFAIK, it's not fixed still

I just came across this issue today.


[ci]: Adding five more self-hosted runners

Signed-off-by: BAStos525<EMAIL_ADDRESS>Description of the Change

Add four more self-hosted runners for I2::Dev::Tests workflow.
Add a new self-hosted runner for I2::Dev::Publish workflow.
Make load-rs job inside I2::Dev::Publish workflow conditional.

Issue

We can not run a two I2::Dev::Tests workflows in parallel on self-hosted runners (increase their amount from 4 to 8 for four tests jobs).
A dockerhub job  inside I2::Dev::Publish workflow takes a lot of time.
I2::Dev::Publish workflow fails if load-rs job was failed or load-rs job doesn't run.

Benefits

Now a twoI2::Dev::Tests workflows could be run in parallel.
Increase dockerhub job  inside I2::Dev::Publish speed.
Do not failI 2::Dev::Publish workflow if load-rs job was fails.

Possible Drawbacks
None.

@BAStos525 The idea is that the workflow must produce working docker images. While it would not be able to publish, the point is to confirm that it can produce the container and would be able to push if it needed to.
This was meant for debugging and I left it in, because we might need to experiment with cargo chef

@BAStos525 The idea is that the workflow must produce working docker images. While it would not be able to publish, the point is to confirm that it can produce the container and would be able to push if it needed to.
This was meant for debugging and I left it in, because we might need to experiment with cargo chef

Okay, thank you for clarification. We still keep the branch with cargo chef experiment within the closed related PR.
By the way, this PR is about just to add a self-hosted runner for iroha2-dev image build and push.


[Feature request] Add the app to the F-Droid repo

Because I, and a lot of people, use F-Droid, it would be very nice to have the app directly in the F-Droid repo. I'm sure that the app will be more popular :)
Is there a technical limitation to that?

Yep i was planning to do that, rn I'm working on new update with bunch of improvements and some necessary features such as search bar on home screen, and different tabs for completed and ongoing goals etc, will try to publish on fdroid after that.

Is there a technical limitation to that?

I don't think so. Will keep the issue open until then 🤞

Why not on play Store

status update: I've created a RFP in fdroid data repository https://gitlab.com/fdroid/rfp/-/issues/2125

Closing as F-droid has merged the RFP in fdroid data repository, the app should be available in fdroid in one or two days.

Congrats to the F-Droid inclusion! Now your app is there I'd usually remove it from my repo within 10 days – unless it was explicitly requested to keep it (see here for some background). So if you want it to stay, please speak out :wink:

OK, will do – just flipped the switch in the config for your app. With the next sync it sill show the hint on its details page that it's available in both places, and link here for details.


Paired computer isn't showing in the list

I'm trying to use this app to play audio from another computer, but that computer is not showing in the list so I can't connect. I can see my computer is already paired. For my phone, I can connect to it normally. Is playing audio from another computer not supported?

Is playing audio from another computer not supported?

I think so. I remembered I tested this case some months before and had same issue.

I have the same issue with a Google Nest Hub. The Nest Hub is paired, but I not shown in the device list of AudioPlaybackConnector. Will there be support other devices than phones?

This is a screenshot of the Bluetooth services offered by my phone, which works as a source for this sink.

Comparatively, when I connect another Windows 10 PC, running 21H2, I only see the following services. While it does include "Audio Source" - the device never shows up in the list of connections in this application.


React 17 support?

Hey there! Does HackerUI support React 17? I see that your peerDependencies range is React 16 only, and I'm having trouble using HackerUI on Skypack, which pins all versions of React to v17.
Example: https://codepen.io/fks/pen/ExgLRXy?editors=1010
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
I can confirm that React and React DOM versions match, the hook is called in a React component function, and only one version of React is running on the page. The error stack trace points to the useContext call inside of HackerUI core.js, which I could see changing between React v16 & v17

Hi @FredKSchott ,
Thanks for notifying me on this issue. I have yet to test this lib in React 17 so that could very well be the issue. There's also some intricacies with the styling system and its dependencies that could cause this however I currently don't have the time to fix it.
I've recently updated some of the landing pages and documentation to reflect.
My apologizes. I currently don't recommend anyone use this lib atm.

Hi @FredKSchott ,
Thanks for notifying me on this issue. I have yet to test this lib in React 17 so that could very well be the issue. There's also some intricacies with the styling system and its dependencies that could cause this however I currently don't have the time to fix it.
I've recently updated some of the landing pages and documentation to reflect.
My apologizes. I currently don't recommend anyone use this lib atm.

np, Thanks for the update! Landing page looks great, btw.

np, Thanks for the update! Landing page looks great, btw.


chore: move contents of explorer to top level (#4230)

Notes:

I wasn't really sure what do with the scripts directory that was already at the top level; I've renamed it to meta-scripts but I'm not sure if that's the best name
A few files that were edited as well as moved didn't register as renames in the change list:

explorer/.eslintignore
explorer/.gitignore (this one registered as an edit of the existing top-level gitignore)
scripts/update-archive-previews.js
scripts/update-sitemap.js

@hunterckx meta-scripts can be deleted. It's obsolete.


[Feature Request] Button to add item to top of column

This is a really handy plugin, thanks! I've got a lot of todo items and like to sort them with high priority stuff at the top and lower stuff at the bottom. But when I want to add a new high priority task, I need to scroll to the bottom of the column, add it, then drag it up.
Add a button at the top of each column (which could go next to the down arrow that collapses the column) which adds a new entry to the top of the column. This will help with adding important tasks that need to be done now!

It would be easier to add "Move to Top" button to item's menu. Would that be ok as an alternative?

Moving the item up is half the problem, but the other half is that the button to add an entry moves further and further down with each new item added to the todo! A button that rests at the top of the column would mean you never need to scroll to add elements. Though move to top is still handy!

Implemented in 240959d7a9cdaabc141fe6387f40f388ad9cd8d2
I went with a menu, because there isn't really space for a new button:

Thank you so much, looks great!


feat: create comment if signatures triggered

example https://github.com/josedonizetti/verified-build-tests/pull/63

I was trying to reason about the jq query, can you tell me what's wrong in this snippet?: https://jqplay.org/s/95EJyKzziZD


Getting an I/O operation error

🐛 Summary
I am getting an I/O operation error on running the script. This is after we input our choice of Azure and O365 environments. Prior to getting this error, I had just fixed an issue with TLS 1.2 communications.
Starting a command on the remote server failed with the following error message : The I/O operation has been aborted because of
either a thread exit or an application request. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo          : OperationStopped: (outlook.office365.com:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : JobFailure
+ PSComputerName        : outlook.office365.com

Did you restart the computer after fixing the TLS 1.2 issue?
If not, can you try doing that and re-running the script? If it still continues, please make sure your WinRM service is running by running this cmdlet in an administrator PowerShell window: Start-Service WinRM

Did you restart the computer after fixing the TLS 1.2 issue?
If not, can you try doing that and re-running the script? If it still continues, please make sure your WinRM service is running by running this cmdlet in an administrator PowerShell window: Start-Service WinRM

Restart worked and running the WinRM service worked! You can close this report. Thank you!

Restart worked and running the WinRM service worked! You can close this report. Thank you!

My Apologies. Although I see some logs in the ~\ExportDir\ looks like some of the modules failed. Here are the details:
Starting a command on the remote server failed with the following error message : The I/O operation has been aborted
because of either a thread exit or an application request. For more information, see the about_Remote_Troubleshooting
Help topic.
+ CategoryInfo          : OperationStopped: (outlook.office365.com:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : JobFailure
+ PSComputerName        : outlook.office365.com
Audit log search argument startDate should be after 1/7/2020 8:43:38 PM UTC.
+ CategoryInfo          : InvalidArgument: (:) [Search-UnifiedAuditLog], ArgumentException
+ FullyQualifiedErrorId : [Server=XXXXXXXXXXXXXX,RequestId=0846ce0c-ac5b-405c-a86e-1385c063f9af,TimeStamp=1/7/202
1 8:43:39 PM] [FailureCategory=Cmdlet-ArgumentException] F5DF40F7,Microsoft.Exchange.Management.SystemConfiguratio
nTasks.SearchUnifiedAuditLog
+ PSComputerName        : outlook.office365.com

My Apologies. Although I see some logs in the ~\ExportDir\ looks like some of the modules failed. Here are the details:
Starting a command on the remote server failed with the following error message : The I/O operation has been aborted
because of either a thread exit or an application request. For more information, see the about_Remote_Troubleshooting
Help topic.
+ CategoryInfo          : OperationStopped: (outlook.office365.com:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : JobFailure
+ PSComputerName        : outlook.office365.com
Audit log search argument startDate should be after 1/7/2020 8:43:38 PM UTC.
+ CategoryInfo          : InvalidArgument: (:) [Search-UnifiedAuditLog], ArgumentException
+ FullyQualifiedErrorId : [Server=XXXXXXXXXXXXXX,RequestId=0846ce0c-ac5b-405c-a86e-1385c063f9af,TimeStamp=1/7/202
1 8:43:39 PM] [FailureCategory=Cmdlet-ArgumentException] F5DF40F7,Microsoft.Exchange.Management.SystemConfiguratio
nTasks.SearchUnifiedAuditLog
+ PSComputerName        : outlook.office365.com

For the I/O issue, please read https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_troubleshooting to see if any other scenario is applicable.
For the StartDate issue, please download the latest Sparrow or ensure that your StartDate variable is set to the following value:
    [Parameter()]
    [datetime] $StartDate = [DateTime]::UtcNow.AddDays(-364),

For the I/O issue, please read https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_troubleshooting to see if any other scenario is applicable.
For the StartDate issue, please download the latest Sparrow or ensure that your StartDate variable is set to the following value:
    [Parameter()]
    [datetime] $StartDate = [DateTime]::UtcNow.AddDays(-364),


#2710

Plan One
update code:
from pygments import highlight
from pygments.lexers.dotnet import CSharpLexer
from pygments.formatters import TerminalFormatter
from pygments.token import Keyword

class CustomCSharpLexer(CSharpLexer):
    # Additional keywords to highlight
    EXTRA_KEYWORDS = {'file'}

    # Override the method to process custom keywords
    def get_tokens_unprocessed(self, text):
        for index, token, value in super().get_tokens_unprocessed(text):
            if value in self.EXTRA_KEYWORDS:
                yield index, Keyword, value
            else:
                yield index, token, value

# Your C# code
code = '''
file class K {}
public class Z {}
'''

# Create instances of the custom lexer and terminal formatter
lexer = CustomCSharpLexer()
formatter = TerminalFormatter()

# Highlight the code
highlighted_code = highlight(code, lexer, formatter)

# Print the highlighted code to the console
print(highlighted_code)

Before:

After:

Plan Two
Details changes：
path: pygments/lexers/dotnet.py

https://github.com/pygments/pygments/issues/2710

Plan Two is the only possible solution, in my opinion, since our goal is to improve a lexer, not to create a new custom lexer and, therefore, Plan One is not suitable.

Plan Two is the only possible solution, in my opinion, since our goal is to improve a lexer, not to create a new custom lexer and, therefore, Plan One is not suitable.

Okay, I will delete the first plan later. Thank you for your suggestion.

PR accepted: https://github.com/pygments/pygments/pull/2726#issuecomment-2156674192


How to pin Author app on side menu

Unable to pin Author app on side menu, any leads? Can pin User app.

Hi @siddiquiaslam,
Thank you for raising the query, are you able to access the author app successfully, if the author app is installed, then you should be able to pin the app as well

Hi @siddiquiaslam,
Thank you for raising the query, are you able to access the author app successfully, if the author app is installed, then you should be able to pin the app as well

Hi @Porkai-Pandian
I am able to access app, but when I right click on Author app, nothing happens. Note that I am able to pin user app. Thanks.

Thanks @siddiquiaslam for your response, author apps are installed to Teams channels and groups and not for the user chat, this is the reason you're able to pin user app whereas unable to pin author app. This is expected behavior, please let us know if you've any other queries if not we'll proceed with closing the issue.

Thanks @siddiquiaslam for your response, author apps are installed to Teams channels and groups and not for the user chat, this is the reason you're able to pin user app whereas unable to pin author app. This is expected behavior, please let us know if you've any other queries if not we'll proceed with closing the issue.

Thanks for response, closing issue.


Upgrade to support minimum of node.js v6

[ ] Upgrade to use latest es2015 features available (where it makes sense)
[ ] Upgrade dependencies to latest supported versions

Converted variables to const/let via PR #25.


Regional Load Balancer API is deprecated

Playing with the Scaleway Python SDK made me stumble when retrieving the list of loadbalancers.
Some digging showed, that the Python SDK uses the API paths based on regions, which is dprecated:
https://www.scaleway.com/en/docs/changelog/?product=load-balancers#regional-load-balancer-api-is-deprecated
Plase update the API to use the "zoned API".

I just learned about the LbV1ZonedAPI.
Since the LbV1API does not work reliable (doesn't list all LBs in my project) I propose to mark LbV1API as deprecated.


Wrong protocol message makes LiveQuery server crashed.

I am developing a mobile game using Unity3D and testing LiveQuery with REST API (HTTP.Request).
LiveQuery works well with REST API.
But when I send wrong protocol message like WebSocket.Send("wrong format"), LiveQuery server crashes.
Steps to reproduce

Unity C# Code
IEnumerator StartConnect () {
var ws = new HTTP.WebSocket ();
  //This lets the websocket connection work asynchronously.
  StartCoroutine (ws.Dispatcher ());

  //Connect the websocket to the server.
  ws.Connect (url);

  //Wait for the connection to complete.
  yield return ws.Wait();

  //Always check for an exception here!
  if(ws.exception != null) {
  	Debug.Log("An exception occured when connecting: " + ws.exception);
  }

  //Display connection status.
  Debug.Log("Connected? : " + ws.connected);

  //If websocket connected succesfully, we can send and receive messages.
  if(ws.connected) {
  	//This specified that our OnStringReceived method will be called when a message is received.
  	ws.OnTextMessageRecv += OnStringReceived;

  	ws.Send("{\"applicationId\" : \"app_id\", \"op\": \"connect\"}");

  	... Send subscribe message

  	ws.Send("hello"); <---- crash
  }

}
void OnStringReceived(string msg) {
Debug.Log ("From server -> " + msg);
}

Environment Setup

Server

parse-server version: 2.2.10
Operating System:  Mac OSX 10.11.4
Hardware: Intel Core i7 2.7 GHz  64bit
Localhost or remote server? Localhost

Database

MongoDB version: 3.0.12
Storage engine: Default
Hardware: Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
Localhost or remote server? Azure Ubuntu 14.04 LTS 64bit

Logs/Trace
/-----/parse-server/node_modules/parse-server/lib/ParseServer.js:339
throw err;
^
SyntaxError: Unexpected token h
at Object.parse (native)
at WebSocket. (/-----/parse-server/node_modules/parse-server/lib/LiveQuery/ParseLiveQueryServer.js:446:26)
at emitTwo (events.js:100:13)
at WebSocket.emit (events.js:185:7)
at Receiver.ontext (/-----/parse-server/node_modules/ws/lib/WebSocket.js:841:10)
at /-----/parse-server/node_modules/ws/lib/Receiver.js:536:18
at Receiver.applyExtensions (/-----/parse-server/node_modules/ws/lib/Receiver.js:371:5)
at /-----/parse-server/node_modules/ws/lib/Receiver.js:508:14
at Receiver.flush (/-----/parse-server/node_modules/ws/lib/Receiver.js:347:3)
at Receiver.opcodes.1.finish (/-----/parse-server/node_modules/ws/lib/Receiver.js:541:12)

We're closing this issue due to inactivity.
If this is a bug you care about that is not getting attention, consider opening a pull request with a fix.


#1093: Update stock quantity bug

Fix #1093

A unit test will be useful to ensure nothing broken in this case

Hello, @hishamco, there is a fully commented out StockServiceTests.cs file . Should I create a new file for the tests?

Seems it's commented :) you can uncomment the class and add your test cases, leave everything as it was

Why you are using MockQueryable.Moq

Because the FirstOrDefaultAsync method is used in UpdateStock. Calling FirstOrDefaultAsync with Moq throws an exception that this method works only with IAsyncQueryProvider. MockQueryable.Moq helps to solve it

I see, let me do a quick check today then merge
Thanks

Any updates?

Sorry I was sick last few days, that's why I didn't give you an update

It's okay, take care of yourself.


Improvement : Add Items in the Item Grid for Specter 1 and 2

Task

Add in "Levels" array the Specter 1 and Specter 2 items
New Icon to differentiate from actual monkeys (Already got the file extracted)

Added in #17


Fix #9: Error listing photos when trying to sync

This fixes #9 .  There are three parts to the fix, indicated in each commit.

I can confirm it works. Thanks alot!


Make HelperThread public

This is useful in contexts where threads need to be more manually managed.

FWIW I don't really have the time and energy to maintain this library any more (if you'd like to I can transfer it!). Along those lines I forget why this wasn't public and what the impact would be if it were made public, so I can rubber-stamp this but I'm not sure of its correctness

Closing b/c it's been a while since this was active.


ScanManager does not retrieve items on subsequent requests with cursor

In the example below it does not retrieve any items for the second request.
const firstResponse = getScanManager().find(Entity, { limit: 5 });
const cursor = firstResponse.cursor;
const secondResponse = getScanManager().find(Entity, { limit: 5, cursor });
It works if a higher limit is used on the second request (looks like private member itemsFetchedSoFarTotalParallelCount of ScanManager is not reset after successfully fetching the required number of items).
I used the following workaround (after each find() invocation):
const scanManager = getScanManager()
Object.assign(scanManager, { itemsFetchedSoFarTotalParallelCount = 0})

Thanks @florindragan-waterford
I can confirm I'm facing the same issue. The workaround fixed it.


[stable/rabbitmq] better way to add plugins

Is this a request for help?: no

Is this a BUG REPORT or FEATURE REQUEST?: feature request
Which chart: stable/rabbitmq
What happened:
I want to add an extra plugin, but rabbitmq.plugins already contains plugins by default, which are required for the chart to work (rabbitmq_management is used by the probes, rabbitmq_peer_discovery_k8s by the StatefulSet clustering).
To add my extra plugin, I have to duplicate the content of this field, making upgrades less robust (what if some additional plugins are required in the future?)
#10070 handled the same issue, but for generic rabbitmq.conf. We could do the same for rabbitmq.plugins: rabbitmq.plugins + rabbitmq.extraPlugins (to be retro-compatible).

Hi @thomas-riccardi
I agree it can be confusing for certain users and I'm pretty sure that some users will overwrite the plugins list (excluding the rabbitmq_management and rabbitmq_peer_discovery_k8s) so the installation will fail.
Do you want to do the corresponding PR to implement the approach you suggest? I can do it too but I'd rather give you the chance to contribute.

@juan131 following your message I was going to write a PR, but it's in fact trickier than with configuration (#10070): for configuration we just had to concatenate both values (with a newline).
For plugins, the value uses an erlang conf syntax: I have no idea how to merge both lists...

The plugin list follows the format: [xxx, yyy, zzz].
$ kubectl exec $(kubectl get pods -l app=rabbitmq -o jsonpath='{.items[0].metadata.name}') cat /opt/bitnami/rabbitmq/conf/enabled_plugins
[rabbitmq_management, rabbitmq_peer_discovery_k8s].

Please check the PR I create to change the approach to indicate the plugins to install.

@juan131

Please check the PR I create to change the approach to indicate the plugins to install.

It was merged too quickly, I didn't have time to review it before the merge. I hope you have since seen my post-merge review.

@juan131 bump; should I open a new issue to follow that?

It was merged too quickly, I didn't have time to review it before the merg

Opps!! Sorry I just saw this.

This seems to be a breaking change: the new format accepted for rabbitmq.plugins is incompatible with the old accept format. We could make it retro-compatible by first checking if the string starts with [ to detect the old format (in which case maybe raise an error if extraPlugins is not nil ?)
Or bump the major version number for the chart.

It's incompatible with the old-format but you can still upgrade the chart using the new format. E.g.
$ helm install -f old-format-values.yaml --version 5.0.0 --name rabbitmq stable/rabbitmq
$ helm upgrade -f new-format-values.yaml --version 5.1.0 rabbitmq stable/rabbitmq

We bump the major version when there's no way to run helm upgrade XXXX without error.

could have used a real yaml array of strings instead of implicitly documented list of tokens separated by space.

Both solutions are valid. I don't see any problem on using a string with list of space separated plugins but we can use an array if you prefer it.

is the empty string a valid value when constructing the erlang config value?
if not, maybe show a valid value for commented-out extraPlugins here.
if yes, maybe explicitly define it as empty string instead of implicit nil.

Wen can put an plugin as example instead of the empty string if you prefer it that way.

It was merged too quickly, I didn't have time to review it before the merg

Opps!! Sorry I just saw this.

That's OK; maybe I should have opened a new issue? Would it have been more visible?

This seems to be a breaking change: the new format accepted for rabbitmq.plugins is incompatible with the old accept format. We could make it retro-compatible by first checking if the string starts with [ to detect the old format (in which case maybe raise an error if extraPlugins is not nil ?)
Or bump the major version number for the chart.

It's incompatible with the old-format but you can still upgrade the chart using the new format. E.g.
$ helm install -f old-format-values.yaml --version 5.0.0 --name rabbitmq stable/rabbitmq
$ helm upgrade -f new-format-values.yaml --version 5.1.0 rabbitmq stable/rabbitmq

We bump the major version when there's no way to run helm upgrade XXXX without error.

I am surprised by this definition of "breaking change".
The only reference I have found is here:

Any breaking (backwards incompatible) changes to a chart should:

Bump the MAJOR version
In the README, under a section called "Upgrading", describe the manual steps necessary to upgrade to the new (specified) MAJOR version

It does not define what is a breaking change indeed..
SemVer is really defined against an API. I always assumed the API here is (notably) the input of the interactions with the chart; notably the values.yaml used with helm install or helm upgrade: If the change was not breaking, then any "old" values file should work as-is with the new chart; which is not the case here.
That's why I concluded with a breaking change.
I searched for MAJOR bumps in rabbitmq and redis:

rabbitmq 4.0.0: #9444 : just some values format change; breaking change not documented in the README
rabbitmq 3.0.0: #7848 : upgrade broken as you describe; breaking change & workaround documented in the README
redis 6.0.0: #11029 : just some values format change (in some cases a new value must be set, which was not required before: I categorize that as a values format change), breaking change documented in the README
redis 5.0.0: #7745 : just some values format change, breaking change documented in the README
redis 4.0.0: #7686: (same as rabbitmq 3.0.0): upgrade broken as you describe; breaking change & workaround documented in the README

I do understand that there are various types of breaking changes, and that it's important to document them with high visibility and clarity to the charts users. If we accept values format changes as breaking changes, maybe the type of breaking change should be required to be documented in the README too?
=> this would need more discussion with the other maintainers of stable/ in a new issue I suppose.

could have used a real yaml array of strings instead of implicitly documented list of tokens separated by space.

Both solutions are valid. I don't see any problem on using a string with list of space separated plugins but we can use an array if you prefer it.

Since we have a typed format (yaml), it seemed strange to me to re-invent our own serialization of lists; however, the usability for --set in the command-line may be important. I just found out we can easily pass lists of strings with the following (surprising) syntax: --set name={a, b, c}

is the empty string a valid value when constructing the erlang config value?
if not, maybe show a valid value for commented-out extraPlugins here.
if yes, maybe explicitly define it as empty string instead of implicit nil.

Wen can put an plugin as example instead of the empty string if you prefer it that way.

:+1: Useful working examples as commented-out values seems a great pattern to me.
But I also raised a second point: to we want to support multiple ways to express the empty list? And do we want to show their existence through commented-out examples (as documentation)?
With my previous suggestion to use a yaml array instead of string space separated list it would become more obvious (and we could even set the empty array as default value, instead of nil).

What about plugins like rabbitmq_message_timestamp that require you to install an .ez file?


Update index.astro

👷 Deploy Preview for famous-marshmallow-cfbd61 processing.

Name
Link

🔨 Latest commit
0f6e564382d9a904bb813c127f80458b59d63cfa

🔍 Latest deploy log
https://app.netlify.com/sites/famous-marshmallow-cfbd61/deploys/64a4c8a0b4862e000837881e


Automatically build and push docker image to docker.io/dashpay/dashd-develop

This builds and pushes a simplified docker image to dashpay/dashd-develop.
I plan to use this image to automatically deploy devnets via Ansible.
This conflicts with what we have in dashevo/dash already. I will update the dashevo version to this as well later. The reason I chose to create a bare/simplified version instead of what we had before is that we should continue developing the official Docker Images in https://github.com/dashpay/docker-dashd instead of duplicating stuff here. As the new image is only meant to be used from automatic deployments, it doesn't make much sense to have any default configs or helper scripts to bootstrap configs.

Fixed the new-line in .gitignore and also fixed a problem pushing the image (as seen in the pr_docker branch, not in the PR). @UdjinM6 Can you also re-push the pr_docker branch?
The build errors really look like internal problems.

Hmm... still fails 🤔

I added a few lines in .travis.yml to print out some system resources. The errors happen while print(stdout) is called, and as rpc-tests.py has been changed recently to write logs to a temporary file, it could be that /tmp is out of space.

Weird. Pushed updated pr_docker, let's see.

The issue we see here seems to be https://github.com/travis-ci/travis-ci/issues/4704. It behaves differently in the PR and in the branch build because secrets are only enabled on branch builds. The usual recommendation to set "filter_secrets: false" is not an option for us as I'd assume, as we are actually introduced the use of secrets with this PR.
I added a fix that found here: https://github.com/firehol/netdata/pull/3183
If that doesn't work, I'll look for another workaround.

Build is finally gree: https://travis-ci.org/dashpay/dash/builds/322244635?utm_source=github_status&utm_medium=notification
I rebased and reworded the fix for the Travis failure.

Rebased on develop and pushed a fix to make it work with develop.
Also removed a bogus example from .travis.yml and switched the branch on which we push to "develop".
Should be ready for merge now.

Now travis is timing out on the wine tests, but this time because the total run-time of the job exceeds 50 minutes.
I checked the Bitcoin code and they don't run the wine tests at all. What was the reason for enabling them? Maybe it's time to disable them?

IIRC there were some edge cases when dash-qt crashed in wine which were caught only by tests running in wine specifically. The main reason for slow tests in wine is performance of the boost, see https://github.com/bitcoin/bitcoin/pull/8650. Backporting 8650 (https://github.com/UdjinM6/dash/commit/d7791d9b206d91799b43e4f7a101d72ff71e6905) helps to speed things up significantly and lower the time of the test down to ~4 minutes https://travis-ci.org/UdjinM6/dash/jobs/323291048#L5708


Feature request: format all docs in a directory

As a happy user,
I would like to run your lovely formatter recursively over a directory
formatting each file that matches a user-configurable regexp/glob
When right-clicking the 'File Explorer',
Then an option is presented in the context menu to 'Format all' against directories
(and perhaps 'format' against files?

@leegee I can see how that would be useful. Would it really need the regexp/glob? The .eslintignore & .prettierignore would make sure to skip over files you don't want ever formatted.


decl_module should allow no return type

Currently all dispatchable functions declared in the decl_module macro require a -> Result snippet for the return type. They should also work without that snippet (i.e. no return type), with the body transformed such that:
fn foo() {
$body
}

becomes:
fn foo() -> Result {
let null: () = { $body };
Ok(())
}

I'm not convinced by this -- we should be adding less "magic", not more. There is no precedent in Rust for eliding return types


publishing extension is very ordering sensitive

I'm not sure this is intended, so I post it here for you to know.
If this is expected, please just close it.
The publishing extension is heavily dependent on ordering of stuff in your Gradle scripts.
I have two examples, for both it complains that the publishing extension cannot be modified after it was accessed.

The first example is with the new publication signing capabilities in 4.8.
If you put the signing { sign publishing.publications } anywhere before the publications are configuration completely, including in plugins, it fails.

The second example even happens with 4.6 (didn't test any other version besides 4.6 and a 4.8 nightly).
I wanted to do something similar to
task compileJava9(type: JavaCompile, dependsOn: sourceSets.main.runtimeClasspath) {
    description 'Compiles main Java 9 source'
    source sourceSets.main.java
    source 'src/main/java9/'
    classpath = files()
    destinationDir = file("$buildDir/classes/java9/main")
    sourceCompatibility = 9
    targetCompatibility = 9
    options.compilerArgs << '--module-path' << sourceSets.main.runtimeClasspath.asPath
}

But then again I got the error and instead needed to put the last line into an afterEvaluate block or move that configuration after the publishing configuration, where especially in this case I don't see the direct relationship.

Duplicate of #4997


JSONDecodeError and not a valid ColorMode Error during startup since v1.12.12

System Health details
System Information

version
core-2024.6.4

installation_type
Home Assistant OS

dev
false

hassio
true

docker
true

user
root

virtualenv
false

python_version
3.12.2

os_name
Linux

os_version
6.6.33-haos

arch
x86_64

timezone
Europe/Berlin

config_dir
/config

Home Assistant Community Store

GitHub API
ok

GitHub Content
ok

GitHub Web
ok

GitHub API Calls Remaining
5000

Installed Version
1.34.0

Stage
running

Available Repositories
1390

Downloaded Repositories
22

HACS Data
ok

Home Assistant Cloud

logged_in
false

can_reach_cert_server
ok

can_reach_cloud_auth
ok

can_reach_cloud
ok

Home Assistant Supervisor

host_os
Home Assistant OS 12.4

update_channel
beta

supervisor_version
supervisor-2024.06.2

agent_version
1.6.0

docker_version
26.1.4

disk_total
395.0 GB

disk_used
31.1 GB

healthy
true

supported
true

host_connectivity
true

supervisor_connectivity
true

ntp_synchronized
true

virtualization
kvm

board
ova

supervisor_api
ok

version_api
ok

installed_addons
ESPHome (2024.6.2), Samba share (12.3.1), Piper (1.5.0), openWakeWord (1.10.0), Terminal & SSH (9.14.0), Samba Backup (5.2.0), Studio Code Server (5.15.0), vosk (1.6.0)

Dashboards

dashboards
5

resources
15

views
36

mode
storage

Miele

component_version
2024.5.0

reach_miele_cloud
ok

Recorder

oldest_recorder_run
15. Juni 2024 um 15:09

current_recorder_run
25. Juni 2024 um 22:34

estimated_db_size
814.04 MiB

database_engine
sqlite

database_version
3.44.2

Checklist

[X] I have read the FAQ to see if there is a known solution to my problem.
[X] I have enabled debug logging for my installation.
[X] I have filled out the issue template to the best of my ability.
[X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
[X] This issue is not a duplicate issue of currently previous issues..

Describe the issue
Hello,
I get the an error in the log during startup of Home Assistant after direct updating of powercalc intergration regarding JSONDecodeError. After restarting again the JSONDecodeError disappears and invalid ColorMode error occurs.
Reproduction steps

Update powercalc
Restart Home Assistant
Check the log (first error occurs)
Restart Home Assistant
Check the log (another error occurs)

Debug logs
Error direct after update of powercalc and restart of Home Assistant

Logger: homeassistant.components.sensor
Quelle: helpers/entity_platform.py:366
Integration: Sensor (Dokumentation, Probleme)
Erstmals aufgetreten: 24. Juni 2024 um 22:35:52 (1 Vorkommnisse)
Zuletzt protokolliert: 24. Juni 2024 um 22:35:52

Error while setting up powercalc platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/powercalc/sensor.py", line 353, in async_setup_entry
    await _async_setup_entities(
  File "/config/custom_components/powercalc/sensor.py", line 375, in _async_setup_entities
    entities = await create_sensors(hass, config, discovery_info, config_entry)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/sensor.py", line 625, in create_sensors
    return await create_individual_sensors(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/sensor.py", line 755, in create_individual_sensors
    power_sensor = await create_power_sensor(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/sensors/power.py", line 121, in create_power_sensor
    return await create_virtual_power_sensor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/sensors/power.py", line 141, in create_virtual_power_sensor
    power_profile = await get_power_profile(
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/power_profile/factory.py", line 40, in get_power_profile
    profile = await library.get_profile(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/power_profile/library.py", line 104, in get_profile
    profile = await self.create_power_profile(model_info, custom_directory)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/power_profile/library.py", line 137, in create_power_profile
    result = await loader.load_model(manufacturer, resolved_model)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/power_profile/loader/composite.py", line 28, in load_model
    result = await loader.load_model(manufacturer, model)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/power_profile/loader/remote.py", line 128, in load_model
    json_data = await self.hass.async_add_executor_job(_load_json)  # type: ignore
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/power_profile/loader/remote.py", line 126, in _load_json
    return cast(dict[str, Any], json.load(f))
                                ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/__init__.py", line 293, in load
    return loads(fp.read(),
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

------------

Restarting of Home Assistant:

Logger: homeassistant
Quelle: custom_components/powercalc/strategy/lut.py:196
Integration: Powercalc (Dokumentation, Probleme)
Erstmals aufgetreten: 22:34:15 (17 Vorkommnisse)
Zuletzt protokolliert: 22:34:20

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/config/custom_components/powercalc/sensors/power.py", line 397, in initial_update
    await self._handle_source_entity_state_change(
  File "/config/custom_components/powercalc/sensors/power.py", line 490, in _handle_source_entity_state_change
    self._power = await self.calculate_power(state)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/sensors/power.py", line 542, in calculate_power
    power = await self._strategy_instance.calculate(entity_state)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/strategy/lut.py", line 130, in calculate
    color_mode = await self.get_selected_color_mode(attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/strategy/lut.py", line 196, in get_selected_color_mode
    color_mode = ColorMode(str(attrs.get(ATTR_COLOR_MODE)))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 744, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 1158, in __new__
    raise ve_exc
ValueError: 'None' is not a valid ColorMode

Diagnostics dump or YAML config
Two diagnostics as an example. I have different Hue lamps with powercal integration in use. Always use the library option:
config_entry-powercalc-c3e34bc1f7d5d4d24f32d1cf1492a1e6.json
config_entry-powercalc-9a2d46d3e74b7b4ca0b3846b2e8dd1c3.json

Seems somehow a json file for power profile which was downloaded is corrupted somehow.
I need to work on better error handling here, so the corrupted file is redownload in this case.
You might have a look in config/.storage/powercalc_profiles directory. You can remove all directories here and this will cause powercalc to redownload all the profiles.
Please also make sure you are on v1.12.13, which optimized download logic bug which was in v1.12.12, which probably caused the corruption in the first place.
Hope this helps.

Thank you for your response. In installed the latest version of powercalc. However, the deletion of the directories has no effect. I can see that the files are redownloded after restarting. The error "ValueError: 'None' is not a valid ColorMode" still occurs. All my hue lights are affected with the error.

Very strange how that broke all of a sudden.
Powercalc tries to get the current color mode of the light after a state change of the light.
Somehow there is no color mode, but that is mandatory state attribute for a light. Never seen reports about this error before, so very strange you run into it all of a sudden.
Could you have a look into developer tools that state attributes of your light?

yes, that is strange if color mode should be always available. I updated all my hue lamps to the newest firmware.
The developer tools section shows this for an inactive light:
min_color_temp_kelvin: 2202
max_color_temp_kelvin: 4504
min_mireds: 222
max_mireds: 454
effect_list:
  - blink
  - breathe
  - okay
  - channel_change
  - candle
  - finish_effect
  - stop_effect
  - stop_hue_effect
supported_color_modes:
  - color_temp
effect: null
color_mode: null
brightness: null
color_temp_kelvin: null
color_temp: null
hs_color: null
rgb_color: null
xy_color: null
icon: mdi:ceiling-light
friendly_name: Pendelleuchte KUE (L)
supported_features: 44

This is the status after activating the light:
min_color_temp_kelvin: 2202
max_color_temp_kelvin: 4504
min_mireds: 222
max_mireds: 454
effect_list:
  - blink
  - breathe
  - okay
  - channel_change
  - candle
  - finish_effect
  - stop_effect
  - stop_hue_effect
supported_color_modes:
  - color_temp
effect: null
color_mode: color_temp
brightness: 102
color_temp_kelvin: 2732
color_temp: 366
hs_color:
  - 28.327
  - 64.71
rgb_color:
  - 255
  - 167
  - 89
xy_color:
  - 0.524
  - 0.387
icon: mdi:ceiling-light
friendly_name: Pendelleuchte KUE (L)
supported_features: 44

My zigbee2mqtt stauts of the light looks like this:
{
    "brightness": 102,
    "color_mode": "color_temp",
    "color_temp": 366,
    "color_temp_startup": 65535,
    "linkquality": 216,
    "power_on_behavior": "on",
    "state": "OFF",
    "update": {
        "installed_version": 16786434,
        "latest_version": 16786434,
        "state": "idle"
    },
    "update_available": false,
    "device": {
        "applicationVersion": 2,
        "dateCode": "20240329",
        "friendlyName": "Hue Pendelleuchte KUE (L)",
        "hardwareVersion": 1,
        "ieeeAddr": "0x001788010b7f75f0",
        "manufacturerID": 4107,
        "manufacturerName": "Signify Netherlands B.V.",
        "model": "8719514301481",
        "networkAddress": 60641,
        "powerSource": "Mains (single phase)",
        "softwareBuildID": "1.116.3",
        "stackVersion": 1,
        "type": "Router",
        "zclVersion": 8
    }
}

In general, the color_mode status is set in Zigbee2MQTT. However, the status in Home Assistant is null if the light is off.

This looks fine. When the light is on there is a color mode and when off it's null. That's also on my HA instance and expected behaviour.
LUT calculation is only executed when the light is on. So looking at the exception there is a moment where the light is set to on but color mode missing in the attributes.
Do you get this error message everytime after toggling the light, or only sporadic?
Since when does this error message appear? Is this after you updated HA, powercalc or the firmware of your Hue lights.

I did some testing with different test scenarios. The answers to your questions:

One time, only after restart. During system running, I did not get this error.
I saw this error with the v.1.12.12, but I will not guarantee if this was the start of the error. I looked in the logs after installing v.1.12.12 (and v.1.12.13).
Only after restart, so yes after updating HA (with a restart) also. All my Hue lights are on the latest firmware. So I can not test this behaviour. I checked redownloading powercalc, then I get a warning, but no error (see below my tests).

Tests:
1) Toggle light
If I toggle the lights on and off, no error message will be created. I tested it with three Hue lights.
2) Reload integrations
If I reload all powercalc integrations with the home assistant service, then I get one warning twice. Maybe this is another "bug" / not related to my initial issue. This is the warning:
Logger: homeassistant.util.loop
Quelle: util/loop.py:86
Erstmals aufgetreten: 23:20:42 (2 Vorkommnisse)
Zuletzt protokolliert: 23:20:42

Detected blocking call to walk with args ('/config/.storage/powercalc_profiles/signify/LCX004',) inside the event loop by custom integration 'powercalc' at custom_components/powercalc/power_profile/power_profile.py, line 171: return sorted(next(os.walk(self.get_model_directory(True)))[1]) (offender: /config/custom_components/powercalc/power_profile/power_profile.py, line 171: return sorted(next(os.walk(self.get_model_directory(True)))[1])), please create a bug report at https://github.com/bramstroker/homeassistant-powercalc/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#walk Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/powercalc/sensor.py", line 353, in async_setup_entry await _async_setup_entities( File "/config/custom_components/powercalc/sensor.py", line 375, in _async_setup_entities entities = await create_sensors(hass, config, discovery_info, config_entry) File "/config/custom_components/powercalc/sensor.py", line 625, in create_sensors return await create_individual_sensors( File "/config/custom_components/powercalc/sensor.py", line 755, in create_individual_sensors power_sensor = await create_power_sensor( File "/config/custom_components/powercalc/sensors/power.py", line 121, in create_power_sensor return await create_virtual_power_sensor( File "/config/custom_components/powercalc/sensors/power.py", line 141, in create_virtual_power_sensor power_profile = await get_power_profile( File "/config/custom_components/powercalc/power_profile/factory.py", line 40, in get_power_profile profile = await library.get_profile( File "/config/custom_components/powercalc/power_profile/library.py", line 110, in get_profile await profile.select_sub_profile(sub_profile) File "/config/custom_components/powercalc/power_profile/power_profile.py", line 187, in select_sub_profile if not self.has_sub_profiles: File "/config/custom_components/powercalc/power_profile/power_profile.py", line 175, in has_sub_profiles return len(self.get_sub_profiles()) > 0 File "/config/custom_components/powercalc/power_profile/power_profile.py", line 171, in get_sub_profiles return sorted(next(os.walk(self.get_model_directory(True)))[1])
Detected blocking call to scandir with args ('/config/.storage/powercalc_profiles/signify/LCX004',) inside the event loop by custom integration 'powercalc' at custom_components/powercalc/power_profile/power_profile.py, line 171: return sorted(next(os.walk(self.get_model_directory(True)))[1]) (offender: <frozen os>, line 366: ?), please create a bug report at https://github.com/bramstroker/homeassistant-powercalc/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#scandir Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/powercalc/sensor.py", line 353, in async_setup_entry await _async_setup_entities( File "/config/custom_components/powercalc/sensor.py", line 375, in _async_setup_entities entities = await create_sensors(hass, config, discovery_info, config_entry) File "/config/custom_components/powercalc/sensor.py", line 625, in create_sensors return await create_individual_sensors( File "/config/custom_components/powercalc/sensor.py", line 755, in create_individual_sensors power_sensor = await create_power_sensor( File "/config/custom_components/powercalc/sensors/power.py", line 121, in create_power_sensor return await create_virtual_power_sensor( File "/config/custom_components/powercalc/sensors/power.py", line 141, in create_virtual_power_sensor power_profile = await get_power_profile( File "/config/custom_components/powercalc/power_profile/factory.py", line 40, in get_power_profile profile = await library.get_profile( File "/config/custom_components/powercalc/power_profile/library.py", line 110, in get_profile await profile.select_sub_profile(sub_profile) File "/config/custom_components/powercalc/power_profile/power_profile.py", line 187, in select_sub_profile if not self.has_sub_profiles: File "/config/custom_components/powercalc/power_profile/power_profile.py", line 175, in has_sub_profiles return len(self.get_sub_profiles()) > 0 File "/config/custom_components/powercalc/power_profile/power_profile.py", line 171, in get_sub_profiles return sorted(next(os.walk(self.get_model_directory(True)))[1])

I created a button to reload all powercalc integration which is using the homeassistant.reload_config_entry service:
type: entities
entities:
  - type: button
    icon: mdi:play-circle-outline
    name: Powercalc neustarten
    action_name: Ausführen
    tap_action:
      action: call-service
      confirmation:
        text: Reload config?
      service: homeassistant.reload_config_entry
      data: {}
      target:
        entity_id:
          - sensor.hue_lamp_02_energy
          - sensor.hue_lamp_03_energy
          - sensor.hue_lightstrip_01_energy
          - sensor.hue_lamp_05_part_01_energy
          - sensor.hue_lamp_05_part_02_energy
          - sensor.hue_lamp_05_part_03_energy
          - sensor.aza_outlet_ikea_01_energy
          - sensor.hue_light_01_part_01_energy
          - sensor.hue_light_01_part_02_energy
          - sensor.hue_light_01_part_03_energy
          - sensor.hue_light_01_part_04_energy
          - sensor.hue_lamp_01_energy
          - sensor.hue_lamp_04_energy
          - sensor.hue_lamp_08_energy
          - sensor.hue_lightstrip_02_energy
          - sensor.esp32_lightstrip_01_energy
          - sensor.bose_media_soundbar_300_energy
          - sensor.hue_lamp_07_energy
          - sensor.hue_lamp_06_energy
          - sensor.hue_lamp_05_energy
          - sensor.hue_lamp_09_energy
          - sensor.hue_light_01_energy

3) Restarting home assistant
I restart my home assistant instance (not only the YAML files). Then I got my errors from my first post again. This is the log after restarting:
home-assistant_2024-06-28T21-28-49.834Z.log
4) Redownloaded powercalc integration from HACS
After I reload the integration from HACS (v.1.12.13) I get a lot of warnings regarding powercalc integration. I did not restarted the home assistant system.
Logger: homeassistant.util.loop
Quelle: util/loop.py:86
Erstmals aufgetreten: 23:30:11 (58 Vorkommnisse)
Zuletzt protokolliert: 23:30:11

Detected blocking call to open with args ('/config/custom_components/powercalc/strategy/fixed.py', 'wb') inside the event loop by custom integration 'hacs' at custom_components/hacs/repositories/base.py, line 600: zip_file.extractall(self.content.path.local) (offender: /usr/local/lib/python3.12/zipfile/__init__.py, line 1801: open(targetpath, "wb") as target:), please create a bug report at https://github.com/hacs/integration/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response await func(hass, connection, msg) File "/config/custom_components/hacs/websocket/repository.py", line 234, in hacs_repository_download await repository.async_install() File "/config/custom_components/hacs/repositories/base.py", line 893, in async_install await self.async_install_repository(version=version) File "/config/custom_components/hacs/repositories/base.py", line 975, in async_install_repository await self.download_zip_files(self.validate) File "/config/custom_components/hacs/repositories/base.py", line 566, in download_zip_files await self.async_download_zip_file( File "/config/custom_components/hacs/repositories/base.py", line 600, in async_download_zip_file zip_file.extractall(self.content.path.local)
Detected blocking call to open with args ('/config/custom_components/powercalc/strategy/__init__.py', 'wb') inside the event loop by custom integration 'hacs' at custom_components/hacs/repositories/base.py, line 600: zip_file.extractall(self.content.path.local) (offender: /usr/local/lib/python3.12/zipfile/__init__.py, line 1801: open(targetpath, "wb") as target:), please create a bug report at https://github.com/hacs/integration/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response await func(hass, connection, msg) File "/config/custom_components/hacs/websocket/repository.py", line 234, in hacs_repository_download await repository.async_install() File "/config/custom_components/hacs/repositories/base.py", line 893, in async_install await self.async_install_repository(version=version) File "/config/custom_components/hacs/repositories/base.py", line 975, in async_install_repository await self.download_zip_files(self.validate) File "/config/custom_components/hacs/repositories/base.py", line 566, in download_zip_files await self.async_download_zip_file( File "/config/custom_components/hacs/repositories/base.py", line 600, in async_download_zip_file zip_file.extractall(self.content.path.local)
Detected blocking call to open with args ('/config/custom_components/powercalc/__init__.py', 'wb') inside the event loop by custom integration 'hacs' at custom_components/hacs/repositories/base.py, line 600: zip_file.extractall(self.content.path.local) (offender: /usr/local/lib/python3.12/zipfile/__init__.py, line 1801: open(targetpath, "wb") as target:), please create a bug report at https://github.com/hacs/integration/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response await func(hass, connection, msg) File "/config/custom_components/hacs/websocket/repository.py", line 234, in hacs_repository_download await repository.async_install() File "/config/custom_components/hacs/repositories/base.py", line 893, in async_install await self.async_install_repository(version=version) File "/config/custom_components/hacs/repositories/base.py", line 975, in async_install_repository await self.download_zip_files(self.validate) File "/config/custom_components/hacs/repositories/base.py", line 566, in download_zip_files await self.async_download_zip_file( File "/config/custom_components/hacs/repositories/base.py", line 600, in async_download_zip_file zip_file.extractall(self.content.path.local)
Detected blocking call to open with args ('/config/custom_components/powercalc/const.py', 'wb') inside the event loop by custom integration 'hacs' at custom_components/hacs/repositories/base.py, line 600: zip_file.extractall(self.content.path.local) (offender: /usr/local/lib/python3.12/zipfile/__init__.py, line 1801: open(targetpath, "wb") as target:), please create a bug report at https://github.com/hacs/integration/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response await func(hass, connection, msg) File "/config/custom_components/hacs/websocket/repository.py", line 234, in hacs_repository_download await repository.async_install() File "/config/custom_components/hacs/repositories/base.py", line 893, in async_install await self.async_install_repository(version=version) File "/config/custom_components/hacs/repositories/base.py", line 975, in async_install_repository await self.download_zip_files(self.validate) File "/config/custom_components/hacs/repositories/base.py", line 566, in download_zip_files await self.async_download_zip_file( File "/config/custom_components/hacs/repositories/base.py", line 600, in async_download_zip_file zip_file.extractall(self.content.path.local)
Detected blocking call to open with args ('/config/custom_components/powercalc/manifest.json', 'wb') inside the event loop by custom integration 'hacs' at custom_components/hacs/repositories/base.py, line 600: zip_file.extractall(self.content.path.local) (offender: /usr/local/lib/python3.12/zipfile/__init__.py, line 1801: open(targetpath, "wb") as target:), please create a bug report at https://github.com/hacs/integration/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response await func(hass, connection, msg) File "/config/custom_components/hacs/websocket/repository.py", line 234, in hacs_repository_download await repository.async_install() File "/config/custom_components/hacs/repositories/base.py", line 893, in async_install await self.async_install_repository(version=version) File "/config/custom_components/hacs/repositories/base.py", line 975, in async_install_repository await self.download_zip_files(self.validate) File "/config/custom_components/hacs/repositories/base.py", line 566, in download_zip_files await self.async_download_zip_file( File "/config/custom_components/hacs/repositories/base.py", line 600, in async_download_zip_file zip_file.extractall(self.content.path.local)

Could you please make a separate issue for 2 and 4, the mentioning about Detected blocking call?
Tens of them are already fixed in a few releases last month, but apparently there are still some cases I missed.
In v1.12.12 there was a bug which caused powercalc to redownload each and every profile again and again.
So I would suggest to not use that version anymore, as the Colormode error is 99.9% sure not related to any powercalc version.
Good to know you only get the color mode error at startup. Still strange and seem to maybe be a bug in the Hue integration which got introduced recently.
I will make that more failsafe so powercalc does not raise an error on it.

Error about color mode fixed with #2334. It should log a warning now (also with entity_id included), no error anymore.
Blocking call log fixed with #2335
Will have a further look into this error if I can make this more robust
This is not a Powercalc issue, but a HACS issue, you must report this at HACS

The errors about blocking calls is something HA added lately to detect that and it's hitting almost all custom integrations.
It's to further improve HA performance, to make it even more impressive than it is already.

Implemented retry mechanism for the JSON decode error with #2336
Will issue a new release soon with all the fixes.
Hope this solves everything for you.

Thank you very much for your great work and time!
I’m looking forward for the New Release.

v1.13.0-beta.0 was released. Could you please give that a test run?

After restarting and updating to the beta version, I got my initial error again as well as the following:
Logger: homeassistant.helpers.event
Quelle: helpers/event.py:342
Erstmals aufgetreten: 16:02:51 (12 Vorkommnisse)
Zuletzt protokolliert: 16:02:51

Error while dispatching event for sensor.hue_light_01_part_03_power to <Job track state_changed event ['sensor.hue_lightstrip_01_power', 'sensor.hue_light_01_part_02_power', 'sensor.hue_light_01_part_04_power', 'sensor.hue_light_01_part_03_power', 'sensor.hue_light_01_part_01_power'] HassJobType.Callback <bound method GroupedSensor.on_state_change of <entity sensor.hue_light_01_power=unknown>>>
Error while dispatching event for sensor.hue_lamp_05_part_01_power to <Job track state_changed event ['sensor.hue_lamp_05_part_01_power', 'sensor.hue_lamp_05_part_02_power', 'sensor.hue_lamp_05_part_03_power'] HassJobType.Callback <bound method GroupedSensor.on_state_change of <entity sensor.hue_lamp_05_power=unknown>>>
Error while dispatching event for sensor.hue_lightstrip_01_power to <Job track state_changed event ['sensor.hue_lightstrip_01_power', 'sensor.hue_light_01_part_02_power', 'sensor.hue_light_01_part_04_power', 'sensor.hue_light_01_part_03_power', 'sensor.hue_light_01_part_01_power'] HassJobType.Callback <bound method GroupedSensor.on_state_change of <entity sensor.hue_light_01_power=unknown>>>
Error while dispatching event for sensor.hue_lamp_05_part_03_power to <Job track state_changed event ['sensor.hue_lamp_05_part_01_power', 'sensor.hue_lamp_05_part_02_power', 'sensor.hue_lamp_05_part_03_power'] HassJobType.Callback <bound method GroupedSensor.on_state_change of <entity sensor.hue_lamp_05_power=unknown>>>
Error while dispatching event for sensor.hue_light_01_part_01_power to <Job track state_changed event ['sensor.hue_lightstrip_01_power', 'sensor.hue_light_01_part_02_power', 'sensor.hue_light_01_part_04_power', 'sensor.hue_light_01_part_03_power', 'sensor.hue_light_01_part_01_power'] HassJobType.Callback <bound method GroupedSensor.on_state_change of <entity sensor.hue_light_01_power=unknown>>>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 342, in _async_dispatch_entity_id_event
    hass.async_run_hass_job(job, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job
    hassjob.target(*args)
  File "/config/custom_components/powercalc/sensors/group.py", line 577, in on_state_change
    new_state = self.calculate_new_state(event.data["new_state"])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/powercalc/sensors/group.py", line 649, in calculate_new_state
    del self._states[state.entity_id]
        ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'sensor.hue_lamp_05_part_02_power'

After another restart I get the same errors.

Thanks for testing.
Hopefully fixed with #2339 and #2338.
Just released v1.13.0-beta.1
Please give it another go.

Yeah, that looks good! With beta.1 no errors or warnings occur.
Thank you very much!

nice good to hear


I am getting this error while runnibg my first app

What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not resolve io.flutter:flutter_embedding_debug:1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695.
  Required by:
      project :app
Could not resolve io.flutter:flutter_embedding_debug:1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695.
Could not get resource 'http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695/flutter_embedding_debug-1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695.pom'.
Could not GET 'http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695/flutter_embedding_debug-1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695.pom'.
            Read timed out

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 31s
Gradle task assembleDebug failed with exit code 1

Flutter doctor -v response :
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.418], locale en-IN)
    • Flutter version 1.12.13+hotfix.5 at C:\Program Files\flutter
    • Framework revision 27321ebbad (5 weeks ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\MAD\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    X Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[!] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.41.0)
    • VS Code at C:\Users\MAD\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.7.1

[√] Connected device (1 available)
    • SM G935F • ce0716073bace21503 • android-arm64 • Android 8.0.0 (API 26)

! Doctor found issues in 2 categories.
exit code 0

The error you've posted is a network error. Are you able to reach http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695/flutter_embedding_debug-1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695.pom in a web browser or from the command line?

in a web browser, yes
Also now i am using my office wifi, can that be a problem?

yes it did ran now, can you tell me why it does not work on my home network, i have no proxy or firewall issue,

possible duplicate of https://github.com/flutter/flutter/issues/41553

yes it did ran now, can you tell me why it does not work on my home network, i have no proxy or firewall issue

I can't really remotely debug a network issue. Since there isn't anything actionable here I'm closing the issue


Link to our community pictures

We have lots of pictures from conferences and meetups. Let's link to them so that people can easily find them later.

hey i'm a begineer can you explain the issue.

Hey @carolynvs is this issue open?

@shefali12-ab It is! Would you like to work on it?

@carolynvs yes sure I can work on it.

@carolynvs you can assign me this issue,also is there any slack or discord channel for communication?

You can find us on the CNCF slack in #tag-contributor-strategy

@shefali12-ab Slack is not a good way to communicate with a project about an issue as it's really easy to lose track of or miss a notification. What was your original question?

hey if no one is taking this issue can I take this
cncf contributors have a meetups section should I link there?


Documentation open-attestation-verify FALSE

Hi, I try to follow documentation:
https://www.openattestation.com/docs/developer-section/libraries/remote-files/open-attestation-verify/
I use your wrapped document, with similar piece of code (tried to select ropsten network):
`import { isValid, verify } from "@govtechsg/oa-verify";
import { verificationBuilder, openAttestationVerifiers } from "@govtechsg/oa-verify";
//import * as document from "./bill-ONE8888-ropsten.json";
import * as document from "./document.json";
const fragments1 = await verify(document);
console.log("verify1: "+isValid(fragments1));
console.log("fragments1", fragments1)
const verify2 = verificationBuilder(openAttestationVerifiers, { network: "ropsten" });
const fragments2 = await verify2(document);
console.log("verify2: "+isValid(fragments2));
console.log("fragments2", fragments2)`
The response is:
verify1: false fragments1 [   {     status: 'SKIPPED',     type: 'DOCUMENT_INTEGRITY',     name: 'OpenAttestationHash',     reason: {       code: 2,       codeString: 'SKIPPED',       message: 'Document does not have merkle root, target hash or data.'     }   },   {     status: 'SKIPPED',     type: 'DOCUMENT_STATUS',     name: 'OpenAttestationEthereumTokenRegistryStatus',     reason: {       code: 4,       codeString: 'SKIPPED',       message: Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method    }   },   {     status: 'SKIPPED',     type: 'DOCUMENT_STATUS',     name: 'OpenAttestationEthereumDocumentStoreStatus',     reason: {       code: 4,       codeString: 'SKIPPED',       message:Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method    }   },   {     status: 'SKIPPED',     type: 'DOCUMENT_STATUS',     name: 'OpenAttestationDidSignedDocumentStatus',     reason: {       code: 0,       codeString: 'SKIPPED',       message: 'Document was not signed by DID directly'     }   },   {     status: 'SKIPPED',     type: 'ISSUER_IDENTITY',     name: 'OpenAttestationDnsTxtIdentityProof',     reason: {       code: 2,       codeString: 'SKIPPED',       message:Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type    }   },   {     status: 'SKIPPED',     type: 'ISSUER_IDENTITY',     name: 'OpenAttestationDnsDidIdentityProof',     reason: {       code: 0,       codeString: 'SKIPPED',       message: 'Document was not issued using DNS-DID'     }   } ] verify2: false fragments2 [   {     status: 'SKIPPED',     type: 'DOCUMENT_INTEGRITY',     name: 'OpenAttestationHash',     reason: {       code: 2,       codeString: 'SKIPPED',       message: 'Document does not have merkle root, target hash or data.'     }   },   {     status: 'SKIPPED',     type: 'DOCUMENT_STATUS',     name: 'OpenAttestationEthereumTokenRegistryStatus',     reason: {       code: 4,       codeString: 'SKIPPED',       message:Document issuers doesn't have "tokenRegistry" property or TOKEN_REGISTRY method    }   },   {     status: 'SKIPPED',     type: 'DOCUMENT_STATUS',     name: 'OpenAttestationEthereumDocumentStoreStatus',     reason: {       code: 4,       codeString: 'SKIPPED',       message:Document issuers doesn't have "documentStore" or "certificateStore" property or DOCUMENT_STORE method    }   },   {     status: 'SKIPPED',     type: 'DOCUMENT_STATUS',     name: 'OpenAttestationDidSignedDocumentStatus',     reason: {       code: 0,       codeString: 'SKIPPED',       message: 'Document was not signed by DID directly'     }   },   {     status: 'SKIPPED',     type: 'ISSUER_IDENTITY',     name: 'OpenAttestationDnsTxtIdentityProof',     reason: {       code: 2,       codeString: 'SKIPPED',       message:Document issuers doesn't have "documentStore" / "tokenRegistry" property or doesn't use DNS-TXT type     }   },   {     status: 'SKIPPED',     type: 'ISSUER_IDENTITY',     name: 'OpenAttestationDnsDidIdentityProof',     reason: {       code: 0,       codeString: 'SKIPPED',       message: 'Document was not issued using DNS-DID'     }   }
Even if I try same example as in documentation, the response is still false? What could go wrong?
Thank you, Peter

could we look at the document you are trying to validate?
if its like what you've written, the example from the documentation, then using https://toolkit.openattestation.com/verify (just a front end to wrap around the functionality) shows that the document is valid.
in this case, verify1 will be false, as you are indicating to the verification builder that you want to validate on the mainnet, verify2 will be true as shown by the results of the the toolkit.


Rule: SA1122 UseStringEmptyForEmptyStrings

Rule summary

Value

Title
[SA1122 UseStringEmptyForEmptyStrings]

CheckId
[SA1122]

Category
[Readability Rules]

Link
https://documentation.help/StyleCop/SA1122.html

What is the problem
As a "Readability" rule, I would claim that exchanging "" with String.Empty actually decreases readability in many places.
Once upon a time, in ancient .Net 1.x days, there were optimisation reasons for using String.Empty as "" would instantiate a new String constant for every use, but to my knowledge this has long passed.
Also, there are quite a few places in CSharp where String.Empty is actually not a legal replacement for "" AFAIK. (like switch/case statements), so forcing people to learn this habit that can then not even be universally enforces seems plain wrong.
The only real downside of "" that I can think of, is the off chance that it can hide zero-width characters, but a) who has ever had that happen in the wild? , and b) if this is a problem, there should probably be a rule specifically for this case, forcing devs to write a very explicit local rule override if they ever needed to out a "<zero-width>xN" string in the code on purpose.
Suggestion
Suppress this rule in the standard ATC rule set.

I almost assume the compiler is smart enough to simply replace all "" with string.Empty at compile time.
A quick test in sharplab seems to indicate different LI is generated by the compiler, but the JIT produced assembler code is indeed the same. So it might be that there is a very so slight overhead during runtime for the JIT to do it's work.
That said, I do agree that this is not a readability concern, and more often than not I actually write "" in tests because it makes it easier to understand what is going on.

I almost assume the compiler is smart enough to simply replace all "" with string.Empty at compile time.
A quick test in sharplab seems to indicate different LI is generated by the compiler, but the JIT produced assembler code is indeed the same. So it might be that there is a very so slight overhead during runtime for the JIT to do it's work.
That said, I do agree that this is not a readability concern, and more often than not I actually write "" in tests because it makes it easier to understand what is going on.

Pr. meeting 05/02-2020, we agreed upon that we want this rule enabled for src/props and set to none for test/props.

https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/StyleCop/SA1122.md


Fix a bug where WeightedRandomDistributionEndpointSelector gets stuck in an infinite loop

Motivation:
I saw suspicious stack traces from the thread dump reported from LINE's
internal channel.
daemon prio=5 os_prio=0 cpu=14048767.37ms elapsed=148187.24s tid=0x00007f0c710eb000 nid=0xb556 runnable  [0x00007f06fbb8d000]
  java.lang.Thread.State: RUNNABLE
       at com.linecorp.armeria.client.endpoint.WeightedRandomDistributionEndpointSelector.selectEndpoint(WeightedRandomDistributionEndpointSelector.java:87)
       at com.linecorp.armeria.client.endpoint.WeightRampingUpStrategy$RampingUpEndpointWeightSelector.selectNow(WeightRampingUpStrategy.java:169)
       at com.linecorp.armeria.client.endpoint.DynamicEndpointGroup.selectNow(DynamicEndpointGroup.java:87)

Many threads in the thread dump got stuck in the same line.
It seemed that a WeightedRandomDistributionEndpointSelector couldn't
escape from for loop.
The two lines above can be a race condition.
While one thread updates entry.counter to 0 and before updates
currentTotalWeight, other threads can increase entry.counter.
https://github.com/line/armeria/blob/5b384fbe27e7e6f9225d6db91cbb684d09dfbb5e/core/src/main/java/com/linecorp/armeria/client/endpoint/WeightedRandomDistributionEndpointSelector.java#L93
https://github.com/line/armeria/blob/5b384fbe27e7e6f9225d6db91cbb684d09dfbb5e/core/src/main/java/com/linecorp/armeria/client/endpoint/WeightedRandomDistributionEndpointSelector.java#L115
It can make all entries are full and currentTotalWeight is positive.
If the two conditions are met, the for loop runs forever.
https://github.com/line/armeria/blob/5b384fbe27e7e6f9225d6db91cbb684d09dfbb5e/core/src/main/java/com/linecorp/armeria/client/endpoint/WeightedRandomDistributionEndpointSelector.java#L75-L88
Modifications:

Use synchronized to access currentEntries and atomically update
currentEntries
Remove a full Entry from currentEntries to avoid useless iterations.

Result:
You no longer see an infinite loop when selecting an Endpoint using
EndpointSelectionStrategy.rampingUp().

Thanks for the quick review! 🙇♂


Updated README and code improvements.

This pull request includes the following changes:
Updated the README to provide clearer instructions and information about the extension.
Made improvements to the code for better performance and readability.
Moved disable-scroll-wheel-zoom.js, disable-scroll-wheel-zoom.min.js, and disable-scroll-wheel-zoom.v3.js from the src directory to the root directory for easier access.
Added missing icon96.png to the images directory.
Removed redundant files and directories.
Ensured consistency in file naming and formatting.
Updated the manifest.json file to reflect the changes made in the project structure with the latest standards.

Reorganized the project structure as follows:
.
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── images
│   ├── icon128.png
│   ├── icon16.png
│   ├── icon48.png
│   ├── icon96.png
│   └── screenshot.png
├── manifest.json
├── package.json
└── src
    ├── disable-scroll-wheel-zoom.js
    ├── disable-scroll-wheel-zoom.min.js
    └── disable-scroll-wheel-zoom.v3.js