CIS Benchmarks

If we want to build out CIS benchmark policies using existing scanner and/or Config Validator
what is the process to do so?
Earlier in the in the year I added some CIS examples however they were put on hold pending legal review etc.

Closing this as I see how CIS benchmarks are being implemented in config validator examples.


[haskell-updates] haskellPackages.stan: Fix build

Motivation for this change
The stan build failure was causing an evaluation error.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg build haskellPackages.stan
@GrahamcOfBorg build haskellPackages.trial
@GrahamcOfBorg build haskellPackages.extensions

Looks like everything is building on Linux, thanks for fixing this up!


Wrong accented characters in Portuguese Brazilian subtitles

Hello,
First of all, thanks for Subliminal. ;)
Some accented characters are wrong in pt-BR subtitles.
I've noticed this encoding problem today for the second time.
Some examples:

O quЖ? (should be "O quê?");
Eu disse que sз queria falar. (should be "Eu disse que só queria falar.");
Legal nж? (should be "Legal né?");
╔ eu vi. Agora vр sentar! (should be "É eu vi. Agora vá sentar!").

I'm not sure if this is a problem with a specific .srt file, or if it happens with all of them.
I manually downloaded one pt-BR subtitle of this movie from OpenSubtitles.org, and the accented characters are right.
I tried the verbose mode, but it doesn't show the full URL of the subtitle being downloaded.
I was planning to check directly against OpenSubtitles.org, to see if there are wrong subtitles among the 10 existing ones.
Here is the verbose output:
$ subliminal . -l en pt-BR --color -v
INFO     [subliminal.video] Scanning directory u'/mnt/Movies/All/Oldboy [2003]'
INFO     [subliminal.video] Scanning video u'Oldboy [2003].avi' in u'/mnt/Movies/All/Oldboy [2003]'
INFO     [subliminal.api] Skipping provider 'tvsubtitles': no video to search for
INFO     [subliminal.api] Skipping provider 'addic7ed': no video to search for
INFO     [subliminal.api] Skipping provider 'bierdopje': no language to search for
INFO     [subliminal.api] Skipping provider 'thesubdb': no language to search for
INFO     [subliminal.api] Listing subtitles with provider 'opensubtitles' for video <Movie [u'Oldboy', 2003]> with languages set([<Language [pt-BR]>])
INFO     [subliminal.api] Found 10 subtitles
INFO     [subliminal.api] Listing subtitles with provider 'podnapisi' for video <Movie [u'Oldboy', 2003]> with languages set([<Language [pt-BR]>])
INFO     [subliminal.api] Found 4 subtitles
INFO     [subliminal.subtitle] Computed score 31 with matches set([u'title', u'hash', u'year'])
INFO     [subliminal.subtitle] Computed score 31 with matches set([u'title', u'hash', u'year'])
INFO     [subliminal.subtitle] Computed score 31 with matches set([u'title', u'hash', u'year'])
INFO     [subliminal.subtitle] Computed score 31 with matches set([u'hash', u'year'])
INFO     [subliminal.subtitle] Computed score 31 with matches set([u'hash', u'year'])
INFO     [subliminal.subtitle] Computed score 31 with matches set([u'title', u'hash', u'year'])
INFO     [subliminal.subtitle] Computed score 31 with matches set([u'title', u'hash', u'year'])
INFO     [subliminal.subtitle] Computed score 31 with matches set([u'title', u'hash', u'year'])
INFO     [subliminal.subtitle] Computed score 31 with matches set([u'title', u'hash', u'year'])
INFO     [subliminal.subtitle] Computed score 31 with matches set([u'hash', u'year'])
INFO     [subliminal.subtitle] Computed score 20 with matches set([u'year', u'title'])
INFO     [subliminal.subtitle] Computed score 20 with matches set([u'year', u'title'])
INFO     [subliminal.subtitle] Computed score 20 with matches set([u'year', u'title'])
INFO     [subliminal.subtitle] Computed score 20 with matches set([u'year', u'title'])
INFO     [subliminal.api] Downloading subtitle <OpenSubtitlesSubtitle [pt-BR]> with score 31 into u'/mnt/Movies/All/Oldboy [2003]/Oldboy [2003].pt.srt'
1 subtitle downloaded

This is my locale configuration:
$ export | grep LC_
declare -x LC_ADDRESS="pt_BR.UTF-8"
declare -x LC_IDENTIFICATION="pt_BR.UTF-8"
declare -x LC_MEASUREMENT="pt_BR.UTF-8"
declare -x LC_MONETARY="pt_BR.UTF-8"
declare -x LC_NAME="pt_BR.UTF-8"
declare -x LC_NUMERIC="pt_BR.UTF-8"
declare -x LC_PAPER="pt_BR.UTF-8"
declare -x LC_TELEPHONE="pt_BR.UTF-8"
declare -x LC_TIME="pt_BR.UTF-8"

If there is some other information I could provide to make it easier to find the problem, please let me know.
Thanks in advance.

I'm having the same issues with french subtitles files that get corrupted when converted to UTF8 by subliminal 0.7.5.
Actually I managed to reproduce the issue on chardet 2.3.0 : chardet identifies my file as a Windows-1255 where it should be Latin1 encoding (confirmed using vim). When converting to utf8 I get the same scrambled accents as the version downloaded by subliminal.
Is there an option to force subliminal not to change the encoding of files downloaded ?
It might be a quick fix as my TV can read the original file without any issues.

Just had a look at the code of the master branch : the issue might have been fixed. I will give it a try.

@Diaoul maybe use codecs.open instead of open ??  It should auto detect the encoding if you do not specify.

I doubt that as it is not mentioned in the docs. Where did you get that information?

From: https://docs.python.org/2/howto/unicode.html#reading-and-writing-unicode-data
encoding is a string giving the encoding to use; if it’s left as None, a regular Python file object that accepts 8-bit strings is returned. Otherwise, a wrapper object is returned, and data written to or read from the wrapper object will be converted as needed.

You're mistaken in your interpretation of that sentence, it won't autodetect anything, it will just return bytes if no encoding is specified, unicode otherwise. Here is a quick example:
>>> import codecs
>>> open('test.srt', 'wb').write('ééé'.encode('latin-1'))  # a file with latin-1 encoding
>>> codecs.open('test.srt').read()
b'\xe9\xe9\xe9'  # plain bytes here, no auto detection
>>> codecs.open('test.srt', encoding='latin-1').read()
'ééé'  # now we have string

It is supposed to be bytes, use print:
>>> open('test.srt', 'wb').write('ééé')
>>> codecs.open('test.srt').read()
'\xc3\xa9\xc3\xa9\xc3\xa9'
>>> print codecs.open('test.srt').read()
ééé
>>>

So if it's supposed to be bytes where is the encoding detection here? You are writing bytes and reading bytes, nothing crazy here. I suggest you practice a little bit more with encoding and use python3 to do it because unicode and python2 don't really get along and you might get wrong ideas like thinking you're manipulating strings while actually you're just manipulating bytes.
Here is with python3:
>>> open('test.srt', 'wb').write('ééé')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'str' does not support the buffer interface

You don't need to be encoding or decoding anything, because you are downloading the file as bytes into a variable, and you want to write the file directly from the variable without any conversion at all. This eliminates any possible encode/decode conversion issues altogether.
Python 3 screws that method up I see, but there must be a way to avoid the conversion like in Python2
'wb' should be taking bytes, not strings.
Python 3.1 this would work.

@Diaoul codecs.open just handles it properly.
>>> open('test.srt', 'wb').write('ééé'.encode('latin-1'))
3
>>> open('test.srt').read()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.4/codecs.py", line 313, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 0: invalid continuation byte
>>> codecs.open('test.srt').read()
b'\xe9\xe9\xe9'

Open the srt in something other than terminal (gedit here) and it will not display right in utf-8, but it does if you let it switch to displaying as latin-1.

So maybe im getting twisted around here =P

There's already an option for that: https://github.com/Diaoul/subliminal/blob/master/subliminal/cli.py#L62-L63
Subliminal is not only about saving subtitles to file, one might want to edit the subtitles, save only as utf-8, search in content or I don't know what. Language gives a good indication on which encoding is used so I provide that guessed_encoding property: https://github.com/Diaoul/subliminal/blob/master/subliminal/subtitle.py#L38-L74
You rely on your media player for guessing file encoding and luckily for you it works. Some others player refuse to play something encoded differently than utf-8.

You know more about it than I do, just trying to help since we use subliminal in our app xD

Same problem for me with French subtitles. Details :
On my Synology DS214Play (DSM 5.2-5565), some subtitles are written with bad encoding.
For example, in French --> The.Shawshank.Redemption.1994.720p.BluRay.x264-SiNNERS.srt.

Download from Subliminal with OpenSubtitles provider --> ANSI as UTF8 (said by NotePad++)
Direct download from OpenSubtitles --> ANSI (said by NotePad++)

Differences (hex) :
GOOD ENCODING (direct dl from OpenSubtitles), extract
00000060: 3A 30 32 3A 31 31 2C 36 30 30 0D 0A 76 6F 74 72 :02:11,600..votr
00000070: 65 20 64 69 73 70 75 74 65 20 61 76 65 63 20 76 e dispute avec v
00000080: 6F 74 72 65 20 66 65 6D 6D 65 2C 0D 0A 6C 61 20 otre femme,..la
00000090: 6E 75 69 74 20 6F F9 20 65 6C 6C 65 20 61 20 E9 nuit où elle a é
000000A0: 74 E9 20 74 75 E9 65 2E 0D 0A 0D 0A 33 0D 0A 30 té tuée.....3..0
BAD ENCODING (from Subliminal with OpenSubtitles provider), extract
00000060: 3A 30 32 3A 31 31 2C 36 30 30 0D 0A 76 6F 74 72 :02:11,600..votr
00000070: 65 20 64 69 73 70 75 74 65 20 61 76 65 63 20 76 e dispute avec v
00000080: 6F 74 72 65 20 66 65 6D 6D 65 2C 0D 0A 6C 61 20 otre femme,..la
00000090: 6E 75 69 74 20 6F D1 89 20 65 6C 6C 65 20 61 20 nuit oÑ‰ elle a
000000A0: D0 B6 74 D0 B6 20 74 75 D0 B6 65 2E 0D 0A 0D 0A Ð¶tÐ¶ tuÐ¶e.....
& It is not related to Synology : https://github.com/SynoCommunity/spksrc/issues/1697#issuecomment-105829100

@cosades what codepage is your syno using?

@Diaoul A lot of encoding errors in SR were fixed when I updated chardet.
It was guessing a thai encoding for pt_BR/pt_PT instead of utf-8 with 99% score
The new one guesses utf-8 with 50.5% score.
I know you only use it as a last resort, but maybe it helps point in the right direction.

@miigotu : locale :
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8
My HMI is in french...
So, do I have to understand that Subliminal make its guesses in function of the locale ?
If not, what are the setting for the best guess ?
Subliminal could be more adaptive with advanced settings for users who want to tune input/output subtitles. Settings for guesses could be an interesting option & it could externalize some variables from code...

It's not subliminal who makes the assumption based on locale, python does. That's why I was discussing it with Diaoul beforem about codecs.open.

@cosades curious which provider this is, and if it is only either opensubtitles or only the other ones. The other 4 use requests, opensubtitles does not. Might help pinpoint an issue if it is limited to either opensubtitles or non-opensubtitles.
@Diaoul podnapisi line 95 (and in other providers):
r.content returns an ascii result string (pre-encoded???)
r.text returns the unicode result string (or pre-decoded???)
Make a difference ?

Yes content is bytes and text is string with guessed encoding by requests.
Except requests guesses encoding using http headers and html meta. There is
none of this for subtitles downloads so it gives pretty bad results.
If you don't care about subtitle file encoding and want to leave the
encoding guess to your media center save subtitle.content and not
subtitle.text property as bytes (open with wb mode).
Le 18 juil. 2015 12:19 AM, "miigotu"<EMAIL_ADDRESS>a écrit :

@cosades https://github.com/cosades curious which provider this is, and
if it is only either opensubtitles or only the other ones. The other 4 use
requests, opensubtitles does not. Might help pinpoint an issue if it is
limited to either opensubtitles or non-opensubtitles.
@Diaoul https://github.com/Diaoul podnapisi line 95 (and in other
providers):
r.content returns an ascii result string (pre-encoded???)
r.text returns the unicode result string (or pre-decoded???)
Make a difference ?
—
Reply to this email directly or view it on GitHub
https://github.com/Diaoul/subliminal/issues/375#issuecomment-122433798.

Closing in favor of #528


chore(build): use ngc for build

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Build tooling change

What is the current behavior? (You can also link to an open issue here)

Library uses tsc to compile before deployment, and does not generate the necessary metadata to allow consumers to ahead-of-time (AoT) compile their apps if they are using ng2-dnd

What is the new behavior (if this is a feature change)?

For npm prepublish, use ngc (@angular/compiler-cli) to generate the metadata.json files - they contain the information in decorators that is lost during transpilation. This allows users to AoT compile their apps.

Other information:

Removed @Injectable() decorators from non-Injected classes, as this is unnecessary, and breaks AoT compilation, as angular tries to resolve string HTMLElement etc as injectable providers.

@robwormald  Also closes #84. Thanks!

This works... except for typescript version 2.1 has a breaking change to ngc, I locally pinned TS to 2.0.2 and was able to get it all working! Thanks @robwormald!


Sync with the last version for kubernetes 1.7.x

Check CLA

The commit message is a bit misleading since you just update the version. Also please bump the chart version as well.

/ok-to-test

What chart version you want?

/cc @mgoodness

/lgtm


term request 'pipette pressure clamp'

new term request by Brenda Farrell for 'pipette pressure clamp'
definition: A device that measures and clamps pressure to a desired level
parent class: device
post OBI conference call 4/23/2018 for<EMAIL_ADDRESS>

Discussed on the OBI developer call 2020-01-13: We don't think this is needed any more, so we're closing the issue.


Add large/small card

Add large card and small card components. Change card style on homepage.

Included in another PR.


[DO NOT MERGE] forking vespolina/workflow for proof of concept

I am thinking for speed reasons I will fork and create our own flavor of the library. But I will contributing if I can to this repo. This is for speed reasons only. Maybe if I have time I can work out independent PRs based on this to merge here. But no promises.

I probably will try something different nowadays so closing.


Updated fs2 version to 0.9.4

New Version Is Out Which Solves the Memory leak in 0.9.3
Closes #922

Codecov Report

Merging #923 into cats will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             cats     #923   +/-   ##
=======================================
  Coverage   66.86%   66.86%
=======================================
  Files         209      209
  Lines        4041     4041
  Branches      409      409
=======================================
  Hits         2702     2702
  Misses       1339     1339

Impacted Files
Coverage Δ

core/src/main/scala/org/http4s/Uri.scala
85.45% <ø> (ø)
:white_check_mark:

Continue to review full report at Codecov.

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

Thanks @bryce-anderson wanted to get this out quick.


Add retrieveUser and retrieveMessage helper methods

Pull Request Etiquette

[x] I have checked the PRs for upcoming features/bug fixes.
[x] I have read the contributing guidelines.

Changes

[ ] Internal code
[x] Library interface (affecting end-user code)
[ ] Documentation
[ ] Other: _____

Closes Issue: NaN
Description
This PR implements some helper retrieve methods for private reaction events.

@arynxd bump

Thanks for the bump :D

I broke my fork so will re-open this PR


⚠ RPC server - xDai has degraded performance

In 3b37bd4, RPC server - xDai ($XDAI_RPC_URL) experienced degraded performance:

HTTP code: 200
Response time: 620 ms

Resolved: RPC server - xDai performance has improved in 0b24279 after 2 hours, 25 minutes.


lastModifiedTime is always null for all Tables in the dataset list client call

lastModifiedTime is always null for all Tables in the dataset list client call, please find the code sample attatched:
DatasetId datasetIdFQDN = DatasetId.of(projectId, datasetId);
Dataset dataset = bigQuery.getDataset(datasetIdFQDN);

Page<Table> tableList = dataset.list(BigQuery.TableListOption.pageSize(1000));
tableList.getValues().forEach(table -> {
    // lastModifiedTime is always null
    Long lastModifiedTime = table.getLastModifiedTime();
});

As a workaround we are using bigQuery.getTable(tableId); to get the lastModifiedTime. Is this behaviour expected?

I'm able to repro this. Checking with the backend team. (b/203444616)


Jetty console build is not on the 4.7.3 release page

https://github.com/fcrepo4/fcrepo4/releases/tag/fcrepo-4.7.3

https://s-media-cache-ak0.pinimg.com/originals/99/a3/fa/99a3fa5b9888b556153fc2d09f331c87.gif

@ruebot Thanks Nick.  I appreciate the work. 😉


Commit an edit to README with your name

Dr. Balouek-Thomert recommended this so I know you guys have proper access to the repository. Make this edit on the develop branch, and push the commit directly to the branch.

You can either edit the README directly on the github website, or clone the repository and edit the branch using github desktop.

Both names have been added!


remove op Save also in remove_training_nodes method

Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System information

TensorFlow version (you are using): master branch
Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.
In current remove_training_nodes method, we just remove CheckNumerics and Identity (conditional).
As Save is a training nodes, I think we should remove it also.
Will this change the current api? How?
No.
Who will benefit with this feature?
remove_training_nodes users.

I think remove_training_nodes is being removed in 2.0, so it might not make sense to update it. @martinwicke do you know what's going on with this?

Yeah, let's not touch this. In any case, this would be a breaking change, so we'd need a new option, and I don't think this is worth doing.


[Pick up city UBS.UBS Admin Cabinet] Email in the 'Sender email' column in orders table isn't changed when admin edits Sender email in the ' Information about client' section of order form

Environment: Windows 10 Pro v.21H2, Google Chrome 111.0.5563.65 (64-bit).
Reproducible: always.
Build found: 19/03/23
Preconditions
User is logged in as administrator.
The orders tab is opened.
At least 1 order is in the orders table.
Steps to reproduce

Click on the particular order.
Click on the 'Information about client' menu.
Change the sender email in the 'Email' field.
<EMAIL_ADDRESS>Click on the 'Save' button.
Click on the 'Back" button.
Pay attention to the email in the 'Sender email' column.
Pay attention to the email in the 'Client email' column.

Actual result
Sender email is changed in the 'Client email' column.
https://user-images.githubusercontent.com/119864646/226208170-72aed0fa-818e-4f89-a7e5-cbb908b88b25.mp4
Expected result
Sender email is changed in the 'Sender email' column in the orders table.
Addition information
The same behavior of the system for the Sender name and Sender phone.
User story and test case links
User story #2787
Labels to be added
"Bug", Priority ("pri: High"), Severity ("severity: Minor"), Type ("Functional").

the issue is still present, same result as on previous video


DRILL-7164: KafkaFilterPushdownTest is sometimes failing to pattern m…

…atch correctly

@aravi5 / @HanumathRao - Please review this PR

The changes look good! +1

Changes look good to me +1.


Add package.json for installation via npm

Currently, the lack of a package.json file in the root folder causes an error when trying to install this package via npm install.
Reference: https://docs.npmjs.com/cli/install

https://github.com/jwaliszko/ExpressiveAnnotations/pull/133

@ruant, @galvarez421: I have a question related to version numbers of package.json.
Since this package contains expressive.annotations.validate.js script only (as opposite to MVC NuGet package, which in fact contains all 3 components - the script and 2 DLLs), shouldn't it reflect the version of the script file alone (currently it would be 2.6.8, instead the version of the entire product, i.e. 2.9.1)?
Do you have any recommendations (pros/cons) regarding versioning in such a case?

That seems to make sense, assuming that you want the npm package to include only the script. It mirrors the approach for versioning being used for the "ExpressiveAnnotations core assembly" NuGet package, which is also just a part of the entire package and is versioned separately (2.7.0), right?

@galvarez421: Right.
My thinking is separate versioning is better here, and reflects what such a package actually contains.
Suppose we go the other way around, and put entire product version into package.json. Next, we change some DLL, and increase product version to, e.g. 2.10. Necessity of upgrading package.json to reflect that new product would be confusing, since the actual script component, the only part of this npm package, stays unchanged.
Unless I've missed something (never used npm ;) we should most likely stick to the separate versioning.

I think that makes sense.

A bit late, but npm package with the EA script is published.


⚠ Bofrost.fr has degraded performance

In 0697bec, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 2542 ms

Resolved: Bofrost.fr performance has improved in d6ebd3b after 307 days, 19 hours, 52 minutes.


don't wait for replication, avoid non-replicated dbs to hang

@c-castillo let's wait with continuing on this until #135 is merged :)

Seems fair. I'll leave this paused until #135 is merged. Then we can address a better way without repeteating ourselves too much.

Closing this in favor of #142


Proposal: Community Audit of App Mining Rankings

In its current state, there is some opacity around the app mining rankings and the payouts until after the payouts are complete. Would like to add a community QA element before the payouts are done.
Open question is methodology:

should we include the whole community, or rotate individuals?
Should there be a reviewer who specifically works on this every month?
What are the necessary criteria to result in changing the draft of rankings?

cc @hstove @cuevasm

Duplicate of https://github.com/blockstack/app-mining/issues/50


Commerce->department resets unique values

https://github.com/mbezhanov/faker-provider-collection/blob/1d9df5b44297d93327b3eadd8babd3458945cac2/src/Faker/Provider/Commerce.php#L36
true should be false or omitted.

I also belive productName has problems with uniqueness but I will have yet to verify.

Hi Oskar, we reset the unique values here, so that each new department may contain a combination of unique categories, even if a previous department also had some of these categories.
Without $this->generator->unique(), calling $this->faker->department may return nonsense like: Books, Books & Books.
With $this->generator->unique()  it will always return a combination of different categories e.g. "Books, Movies & Music". However, a subsequent call to $this->faker->department will not be able to use any of these three categories, unless we use unique(true) to reset the generator. Without unique(true) the provider will quickly run out of categories and throw an error.
$this->faker->department is not meant to enforce uniqueness of the departments. In other words, it is expected and normal to have two subsequent calls return the same department, e.g. "Books, Movies & Music"
I hope this clarifies how the department generation was meant to work. Let me know if I can assist you further with this and what issue you are facing because of this.
Thank you!

Interesting. Maybe one could implement a private copy of https://github.com/fzaninotto/Faker/blob/master/src/Faker/UniqueGenerator.php and use that internally and leave original functionally from Faker alone, that though wouldn't be a one line fix. Closing as it works as intended.


Material icons allignment issues with Android Kitkat

This is a (multiple allowed):

[x] bug

[ ] enhancement

[ ] feature-discussion (RFC)

Framework7 Version: 1.6.4

Platform and Target: Android Kitkat 4.2.2

What you did
Using Material Icons in Cordova Android App
Expected Behavior
Icons should look normal and work same as Android higher versions.
Actual Behavior
Icons changing entire alignment of app and difficult to use the app, because of this user not able to install
the app Androd kitkat version
Before you open an issue, please check if a similar issue already exists or has been closed before.

Issue is closed because of outdated/irrelevant/not actual
If this issue is still actual and reproducible for latest version of Framework7, please create new issue and fill the issue template correctly:

Clearly describe the issue including steps to reproduce when it is a bug.
Make sure you fill in the earliest version that you know has the issue.
Provide live link or JSFiddle/Codepen or website with issue


Add tests for Pet Service

In an ongoing effort for 100% code coverage (from https://github.com/vspedr/developets/issues/19).
This adds a fairly simple test to get full coverage of the src/services/pets.js file by ensuring it fetches from a specific endpoint and returns the data retrieved.

Nice! Thanks for the contribution!


simplify & close file handler

I do not found shortening the variable names helpful. They are additional "overhead" when trying to understand the code.

英文太差，如你在知乎上所说github上交流也比较麻烦，所以在此我用中文表达下我的看法，怕英文说不清楚，在这个及以前的pr中，我基于了以下一些原则对一些变量名进行了简化

代码中有的地方你使用了execStatus,有的地方使用了executionStatus,我将他们统一到了execStatus
有些名字是go代码中约定俗成的，比如request/response -> req/resp
3.有的函数本身比较短小，比如withClient中的grpcConection这个变量，在此处，此变量名的长度相对于此函数的体量，感觉有点臃肿
4.在有些方法中，比如translateToStepGroups这个方法中，foundStepId/hasParentIdId这两个bool标示，只是用以判定是否找到，而找的内容，从findAncestorStepId这个函数名可以得到，同时基于"comma,ok",惯用法，此处更详细的foundStepId/hasParentIdId，个人觉得，除开让代码数变多之外，可能没有达到你想要的效果，以我这几天阅读gleam的经验，很多新知识，术语，因为暂时注释的缺失，只能通过代码去推，而看到密密麻麻的代码，让人有一种很压抑的感觉

Codecov Report

Merging #70 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #70   +/-   ##
=======================================
  Coverage   55.37%   55.37%
=======================================
  Files           9        9
  Lines         186      186
=======================================
  Hits          103      103
  Misses         81       81
  Partials        2        2

Continue to review full report at Codecov.

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

I am from Java camp, and find the full name is better to denote the meaning and variable types.
Smaller number of lines is dense, but you can have better understanding of the code framework. I usually want to put one line of logic into one line, without wraps if the IDE or readability allows.

need your email to send the invites.

tempvar$163$com

i had reverted the prev pr, and just fix the bug & change something which does not match the coding style


Memory problem

Hi, I'm currently having similar problem initially posted by ArjunSa786.
When I select multiple images (around 20), it crashes on my iPhone 6.
Here is the code involved, I know I'm doing  something wrong can you help me please?
        pickerController.didSelectAssets = { (assets: [DKAsset]) in
            for a in assets {
                let date = a.originalAsset!.creationDate!
                let dateFormatter: NSDateFormatter = NSDateFormatter()
                dateFormatter.dateFormat = "YYYY-MM-dd_hh-mm-ss"
                let pictureDate: String = dateFormatter.stringFromDate(date)

                a.fetchOriginalImageWithCompleteBlock({ (image, info) in
                    let filename = documentsDirectory.stringByAppendingPathComponent("\(pictureDate).jpg")
                    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) {
                        UIImageJPEGRepresentation(image!, 0.65)!.writeToFile(filename, atomically: true)
                    }
                })
            }
        }

For each iteration in the loop the memory increase significally (arround 30-50mB by image)
Here is the message received on the output:

Message from debugger: Terminated due to memory issue

Hope you can help,
Kind regards,

More information:

Problem still occurs with version 3.2 freshly installed
The code bellow gives me a memory warning and starts to crash when I select around 25 pictures:

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) {
   pickerController.didSelectAssets = { (assets: [DKAsset]) in
        for a in assets {
            a.fetchOriginalImageWithCompleteBlock({ (image, info) in
            })
        }
    }
}

I met same problem too.
I used fetchFullScreenImageWithCompleteBlock, much better now.

@RainbowMango: I can't use this solution, because I need to upload the picture with its original quality.
I fixed the problem partially, it's now working with fetchOriginalImageWithCompleteBlock regardless how much pictures are selected, but it kinda freeze the application (probably doing something wrong with threads).
Here is my code :
    func DKImagePicker(sourceType: DKImagePickerControllerSourceType) {
        let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)
        let documentsDirectory: NSString = paths[0]
        let pickerController = DKImagePickerController()
        pickerController.sourceType = sourceType

        pickerController.didSelectAssets = { (assets: [DKAsset]) in
            for a in assets {
                let dateFormatter: NSDateFormatter = NSDateFormatter()
                dateFormatter.dateFormat = "YYYY-MM-dd_hh-mm-ss"
                let pictureDate: String = dateFormatter.stringFromDate(a.originalAsset!.creationDate!)

                dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) {
                        a.fetchOriginalImage(false, completeBlock: { (image, info) in
                            let filename = documentsDirectory.stringByAppendingPathComponent("\(pictureDate).jpg")
                            UIImageJPEGRepresentation(image!, 1)!.writeToFile(filename, atomically: true)
                        })
                }
            }
        }
        self.presentViewController(pickerController, animated: true) {}
    }

Some help could be nice :)
Kind regards!

@leobouilloux I think Your approach is right 👍 Some images are pretty big, so writeToFile is a good idea :)
Just want to add a little optimization to it:
Creating an NSDateFormatter is very slow. Instead, you can create the date formatter once and reuse it.

@zhangao0086 That's a good point thanks! After correcting that, I still have the UI blocked for 5-10 sec (depending on the number of images picked), but it's a bit faster. Thank you again for your time 👍

Try this:
let dateFormatter: NSDateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "YYYY-MM-dd_hh-mm-ss"
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) {
    let group = dispatch_group_create()

    for a in assets {
        dispatch_group_enter(group);

        let pictureDate: String = dateFormatter.stringFromDate(a.originalAsset!.creationDate!)
        a.fetchOriginalImageWithCompleteBlock({ (image, info) in
            let filename = documentsDirectory.stringByAppendingPathComponent("\(pictureDate).jpg")
            UIImageJPEGRepresentation(image!, 1)!.writeToFile(filename, atomically: true)

            dispatch_group_leave(group)
        })
    }

    dispatch_group_notify(group, dispatch_get_main_queue(), {
        // finished ...
    })
}

@zhangao0086 Still lagging on my side. I did not observe any improvement with your code.
To perform the test, I picked 30 pictures from the library.
If there is any information useful that I forgot to tell you,  let me know, but I'm okay with this lag, it's not a huge problem. I'll investigate on this problem on my side, thanks for your help :)

Do you use dispatch_async  instead of using dispatch_sync?

Sure, here is my code with your modifications:
pickerController.didSelectAssets = { (assets: [DKAsset]) in
            let dateFormatter: NSDateFormatter = NSDateFormatter()
            dateFormatter.dateFormat = "YYYY-MM-dd_hh-mm-ss"
            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) {
                let group = dispatch_group_create()
                for a in assets {
                    dispatch_group_enter(group)
                    let pictureDate: String = dateFormatter.stringFromDate(a.originalAsset!.creationDate!)

                    a.fetchOriginalImage(false, completeBlock: { (image, info) in
                            let filename = documentsDirectory.stringByAppendingPathComponent("\(pictureDate).jpg")
                            UIImageJPEGRepresentation(image!, 1)!.writeToFile(filename, atomically: true)
                            dispatch_group_leave(group)
                        })
                    }
                dispatch_group_notify(group, dispatch_get_main_queue(), {
                    print("Done")
                })
            }
}

"Done" is printed when the UI is no longer blocked.

Got. The completeBlock of the fetchOriginalImageWithCompleteBlock is executed on the main thread.
pickerController.didSelectAssets = { (assets: [DKAsset]) in
    let dateFormatter: NSDateFormatter = NSDateFormatter()
    dateFormatter.dateFormat = "YYYY-MM-dd_hh-mm-ss"

    let group = dispatch_group_create()

    for a in assets {
        dispatch_group_enter(group);

        let pictureDate: String = dateFormatter.stringFromDate(a.originalAsset!.creationDate!)
        a.fetchOriginalImageWithCompleteBlock({ (image, info) in
            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) {

                let filename = documentsDirectory.stringByAppendingPathComponent("\(pictureDate).jpg")
                UIImageJPEGRepresentation(image!, 1)!.writeToFile(filename, atomically: true)

                dispatch_group_leave(group)
            }
        })
    }

    dispatch_group_notify(group, dispatch_get_main_queue(), {
        // finished ...
    })
}

It's no longer blocking the UI, but I now got memory issues.
2016-05-19 16:09:17.962 Pydio[1793:570725] Received memory warning.
2016-05-19 16:09:19.237 Pydio[1793:570725] Received memory warning.
Message from debugger: Terminated due to memory issue
I returned to my initial problem.

😅😅😅
I'll give you a perfect solution later.

Hahaha, sorry :) I now that I must have a very specific demand. For now I'll keep my code with dispatch_sync, it maybe block the UI for a few sec, but it doesn't crash.
And again, thank you very much for your time 👍 👍 👍

I've added two utility methods:
public func writeImageToFile(path: String, completeBlock: (success: Bool) -> Void)

public func writeAVToFile(path: String, presetName: String, completeBlock: (success: Bool) -> Void)

Now you can try this:
let dateFormatter: NSDateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "YYYY-MM-dd_hh-mm-ss"

pickerController.didSelectAssets = { (assets: [DKAsset]) in
	let group = dispatch_group_create()

	for a in assets {
		dispatch_group_enter(group);

		let pictureDate: String = dateFormatter.stringFromDate(a.originalAsset!.creationDate!)

		if a.isVideo {
			let filename = documentsDirectory.stringByAppendingPathComponent("\(pictureDate).mov")
			a.writeAVToFile(filename, presetName: AVAssetExportPresetHighestQuality, completeBlock: { (success) in
				dispatch_group_leave(group)
			})
		} else {
			let filename = documentsDirectory.stringByAppendingPathComponent("\(pictureDate).jpg")
			a.writeImageToFile(filename, completeBlock: { (success) in
				dispatch_group_leave(group)
			})
		}
	}

	dispatch_group_notify(group, dispatch_get_main_queue(), {
		// finished ...
		print("finished")
	})
}

Hi there, thank you for your update!
I've seen you added these new functions to the develop branch, so I had to modify my Podfile.
It's working perfectly thank you very much.
I only have one suggestion that could be useful in my case and maybe for everyone else.
Adding a "quality rate" parameter will be perfect (is it already the case for video?)
I mean something like this function :
UIImageJPEGRepresentation(image: UIImage, compressionQuality: Float)

Gonna check when you'll push the code to the stable branch!
Thank you very much, you rock!

Closing this thread...


v4l2(camera) fail to seek

This is an interesting project. great job !
As far as I know playbin can support v4l2 (camera) images by using uri="v4l2:///dev/video0" ,
but after I  tested it,
the message I got was "fail to seek"
did I miss something ?

There is a seek function in the restart_stream function. I should not call restart_stream.


Server video fileplay in COG downloads video locally on everytime at /var/tmp/XXX - imx8mp

Hi,
I am running COG with below environment setup,
Hardware
Toradex verdin - imx8mp - 2 GiB (memory)
Software
BSP - 5.4.161 (dunfell)
COG - v0.12.3
WPEwebkit - 2.34.6
I have created one ngnix server on x86 machine, wrote index.html (attached index.html.txt - index.html.txt) and kept H264 video in the same directory.
On target hardware when I run cog <http://ip of server> , it plays video from server with below observations.
Observation

Video on target hardware plays with the help of GStreamer plugin downloadbuffer.

It to cache video from server to /var/tmp/XXX directory.

Now After stopping and starting it again this caching of video happens again (same video, no restart of hardware or server)

Also I observed that in this particulate time of caching ,
user can see high pick in CPU % utilisation in top command for WPENetworkProce process until full cached download, this be the separate utilization apart from multimedia processing.
Is there anything I can do to avoid multiple time caching for the same setup on multiple run ?
Appreciate your guidance.
--
Thanks

I suspect that, while not optimal, this is might be the expected behaviour... So you reload the page and download starts over, right?
One workaround, in case download buffering is not so useful for you, is to disable it... <video preload=none ....>.

Hi @philn,
Thank you for an option ,
The problem i am facing is in both the case restart and reload the page.
Also I tried this in index.html as
<body>     <video **preload=none** muted autoplay controls>     <source src="BBB-720p-30fps.mp4" type="video/mp4" **preload="none"**>
However No difference , the caching still happens every time in restart and in re-load of page in cog.

Can you set this env var and try again? WPE_SHELL_DISABLE_MEDIA_DISK_CACHE=1 ?

Still no luck , WPENetworkProce does the downloading again.

And tmp files are still written on disk or not?


Exception has occurred. FirebaseAuthException

Steps to reproduce
I have call the auth methods --
final UserCredential userCredential = await _auth.signInWithEmailAndPassword(
      email: email,
      password: password,
    );

i have passed wrong email and password for check and handle errors in code.
Expected results
 FirebaseAuthException catch (e) {
    // Handle Firebase authentication-related errors
    switch (e.code) {
      case 'email-already-in-use':
        return 'This email address is already in use. Please try logging in or use a different email.';
      case 'invalid-email':
        return 'The email address is invalid. Please check and enter a valid email.';
      case 'operation-not-allowed':
        return 'Email/password accounts are not enabled. Please contact support.';
      case 'weak-password':
        return 'The password provided is too weak. Please use a stronger password.';
      case 'too-many-requests':
        return 'Too many requests at the moment. Please try again later.';
      case 'user-token-expired':
        return 'Your session has expired. Please log in again.';
      case 'network-request-failed':
        return 'Network error occurred. Please check your internet connection.';
        case 'invalid-credential':
        return 'The supplied auth credential is incorrect, malformed or has expired.';
      default:
        return 'An unknown error occurred: ${e.message}';
    }

must be handle not the crash app or Exception has occurred.
Actual results
FirebaseAuthException catch (e) {
    // Handle Firebase authentication-related errors

always run this code  when any error coming from auth.
 // SIGN IN METHOD with password validation and saving user data
 Future<String?> signIn({
  required String email,
  required String password,
}) async {
  try {
    // Attempt to sign in the user with email and password
    final UserCredential userCredential = await _auth.signInWithEmailAndPassword(
      email: email,
      password: password,
    );

    // Check if the user credential is valid
    if (userCredential.user == null) {
      throw FirebaseAuthException(
        message: "User not found",
        code: "user-not-found",
      );
    }

    // Retrieve the user's UID
    String uid = userCredential.user!.uid;

    // Fetch the user's data from Firebase Realtime Database
    DatabaseEvent event = await _dbRef.child('users/$uid').once();
    DataSnapshot snapshot = event.snapshot;

    // Ensure that the user data exists in the database
    if (snapshot.value == null) {
      throw FirebaseAuthException(
        message: "User data not found",
        code: "user-not-found",
      );
    }

    // Cast snapshot value to Map
    Map<dynamic, dynamic> userData = snapshot.value as Map<dynamic, dynamic>;

    // Validate the user's password against the stored hashed password
    bool isValidPassword = BCrypt.checkpw(password, userData['password'] as String);
    if (!isValidPassword) {
      throw FirebaseAuthException(
        message: "Invalid password",
        code: "wrong-password",
      );
    }

    // Cast the Map<dynamic, dynamic> to Map<String, dynamic>
    Map<String, dynamic> userDataStringKey = Map<String, dynamic>.from(userData);

    // Convert the user data to a UserModel instance
    UserModel userModel = UserModel.fromMap(userDataStringKey);

    // Save the user data locally using SharedPreferences
    await SharedPrefsManager.instance.saveUser(userModel);

    // Return null if the sign-in is successful
    return null;
  } on FirebaseAuthException catch (e) {
    // Handle Firebase authentication-related errors
    switch (e.code) {
      case 'email-already-in-use':
        return 'This email address is already in use. Please try logging in or use a different email.';
      case 'invalid-email':
        return 'The email address is invalid. Please check and enter a valid email.';
      case 'operation-not-allowed':
        return 'Email/password accounts are not enabled. Please contact support.';
      case 'weak-password':
        return 'The password provided is too weak. Please use a stronger password.';
      case 'too-many-requests':
        return 'Too many requests at the moment. Please try again later.';
      case 'user-token-expired':
        return 'Your session has expired. Please log in again.';
      case 'network-request-failed':
        return 'Network error occurred. Please check your internet connection.';
        case 'invalid-credential':
        return 'The supplied auth credential is incorrect, malformed or has expired.';
      default:
        return 'An unknown error occurred: ${e.message}';
    }
  } on FirebaseException catch (e) {
    // Handle PlatformException
    if (e.code == 'ERROR_INVALID_CREDENTIAL') {
      return 'The supplied auth credential is incorrect, malformed, or expired.';
    }
    if (e.code == 'invalid-credential') {
      return 'The supplied auth credential is incorrect, malformed, or expired.';
    }
    else {
      return 'An unknown error occurred: ${e.message}';
    }
  } catch (e) {
    // Catch any other types of exceptions and return a general error message
    return 'An unknown error occurred: ${e.toString()}';
  }
}

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
I/flutter ( 7713): Main
I/flutter ( 7713): 3
I/flutter ( 7713): Main
I/flutter ( 7713): 0
E/flutter ( 7713): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
E/flutter ( 7713): #0      State.setState (package:flutter/src/widgets/framework.dart:1159)
E/flutter ( 7713): #1      _WrapperState.didChangeAppLifecycleState.<anonymous closure> (package:shoonya/ui/main_screen.dart:120)
E/flutter ( 7713): #2      TickerFuture.whenCompleteOrCancel.thunk (package:flutter/src/scheduler/ticker.dart:420)
E/flutter ( 7713): #3      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398)
E/flutter ( 7713): #4      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429)
E/flutter ( 7713): #5      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189)
E/flutter ( 7713):

Flutter Doctor output
demo % flutter doctor -v
[✓] Flutter (Channel stable, 3.24.2, on macOS 14.0 23A344 darwin-x64, locale en-GB)
    • Flutter version 3.24.2 on channel stable at /Users/madankumawat/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4cf269e36d (6 days ago), 2024-09-03 14:30:00 -0700
    • Engine revision a6bd3f1de1
    • Dart version 3.5.2
    • DevTools version 2.37.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/madankumawat/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version unknown)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.96.0
    ✗ Unable to determine VS Code version.

[✓] Connected device (4 available)
    • RMX3782 (mobile)   • S4BIYXTCDM95YXVW          • android-arm64  • Android 14 (API 34)
    • iPhone 11 (mobile) • 00008030-0014058611FA2345 • ios            • iOS 17.5.1 21F90
    • macOS (desktop)    • macos                     • darwin-x64     • macOS 14.0 23A344 darwin-x64
    • Chrome (web)       • chrome                    • web-javascript • Google Chrome 128.0.6613.120
    ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

• No issues found!

This is an issue with the firebase plugin not flutter. Closing from here as this should be filed on the flutterfire repo.
Thank you


remove [DEBUG] messages when starting up timeshape

Hi all,
I am using timeshape v2019b.8 in my spring-boot application and would like to remove the [DEBUG] messages it spews to the console to signal initialization of the library - which works great, by the way.
I have tried to set a different logging level in application.yml to no success with the following entry:
logging:
  level:
    net.iakovlev.timeshape.*: ERROR

How can I do so?

Hi and thanks for your feedback, I appreciate you find Timeshape useful. Unfortunately, I don't know how to configure logging in spring-boot applications.
What I do know is that current mechanism of changing the log level for Timeshape actually works, at least when Logback is used for logging. The test-app project in this build uses logging, and you can see how it's configured here: https://github.com/RomanIakovlev/timeshape/blob/master/test-app/src/main/resources/logback.xml. If you change the level of the root logger, Timeshape output is adjusted accordingly.
You can also add there something like this into that logback.xml:
    <logger name="net.iakovlev.timeshape" level="info">
        <appender-ref ref="SDTOUT" />
    </logger>

And the result would be that log level of Timeshape is set to info.
But, again, I don't know much about how logging in spring-boot applications works. If you can use Logback for logging in your application, then the approach described above is what you need.
Maybe you could publish a small self-contained example demonstrating this problem? I can check it out, and maybe give you some suggestion.
And by the way, could you please share what kind of application you build using Timeshape? It kind of motivating for me to know how different people use this library.

Hey @gtludwig, were you able to fix the logging? I'd like to help you with this, but if there isn't anything that must be done in Timeshape, I'd rather close this issue.

This is probably solved by now, so I'll just go ahead and close this issue.


Nokia Lumia 520 - Windows Phone 8.0 - ev.gesture object full of null values

On a Nokia Lumia 520 - Windows Phone 8.0, when using touch drag (ev.type="drag") the ev.gesture event return object contains mostly null values. This includes deltaX and deltaY. Considering it works on all other devices, I was thinking it was something to do with Nokia Windows browser. Have tried also with -ms-touch-action:none; on all containers, which does not fix the problem. Have also tried setting mstouchaction attribute programmatically according to Jorik's Wiki, using "none" and "pan-y", and still null values. When performing a console.log(JSON.stringify(ev.gesture)), the variables are there and the object is intact, however, the values of deltaX and deltaY in the object are null.

I had the same issue in 1.1.3. v2 works on Windows Phone however.


IKEA trådfri control outlet

Add missing support for the latest Trådfri product; a control outlet, https://www.ikea.com/se/sv/catalog/products/90356166/

Do you have any output from pytradfri from a gateway with the plug connected?

Do you have any output from pytradfri from a gateway with the plug connected?

I have, some debug info:
DEBUG:pytradfri.util:JSON file not found: tradfri_standalone_psk.conf
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> post ['15011', '9063']: {'9090': '...'}
DEBUG:pytradfri.api.libcoap_api:Received: {"9091":"zgFACimmFoKoqIjm","9029":"1.4.0015"}
Generated PSK:  ...
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001']
DEBUG:pytradfri.api.libcoap_api:Received: [65541,65540,65538,65542,65539,65543,65545,65546,65547,65548]
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001', 65541]
DEBUG:pytradfri.api.libcoap_api:Received: {"9001":"Muurlicht Rechts","9002":1529675918,"9020":1536890465,"9003":65541,"9054":0,"5750":2,"9019":1,"3311":[{"9003":0,"5850":1,"5851":147,"5717":0,"5711":454,"5709":32977,"5710":27105,"5706":"efd275"}],"3":{"0":"IKEA of Sweden","1":"TRADFRI bulb GU10 WS 400lm","3":"1.2.217","2":"","6":1}}
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001', 65540]
DEBUG:pytradfri.api.libcoap_api:Received: {"9001":"Plafond","9002":1529675179,"9020":1536927891,"9003":65540,"9054":0,"5750":2,"9019":1,"3311":[{"9003":0,"5850":0,"5851":254,"5717":0,"5711":370,"5709":30138,"5710":26909,"5706":"f1e0b5"}],"3":{"0":"IKEA of Sweden","1":"TRADFRI bulb E27 WS opal 980lm","3":"1.2.217","2":"","6":1}}
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001', 65538]
DEBUG:pytradfri.api.libcoap_api:Received: {"9001":"Stalamp Plafond","9002":1529674644,"9020":1536947136,"9003":65538,"9054":0,"5750":2,"9019":1,"3311":[{"9003":0,"5850":1,"5851":254,"5707":5440,"5708":49612,"5709":31976,"5710":27312,"5706":"0"}],"3":{"0":"IKEA of Sweden","1":"TRADFRI bulb E27 CWS opal 600lm","3":"1.3.002","2":"","6":1}}
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001', 65542]
DEBUG:pytradfri.api.libcoap_api:Received: {"9001":"Muurlicht Links","9002":1529675969,"9020":1536947725,"9003":65542,"9054":0,"5750":2,"9019":1,"3311":[{"9003":0,"5850":1,"5851":147,"5717":0,"5711":454,"5709":32977,"5710":27105,"5706":"efd275"}],"3":{"0":"IKEA of Sweden","1":"TRADFRI bulb GU10 WS 400lm","3":"1.2.217","2":"","6":1}}
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001', 65539]
DEBUG:pytradfri.api.libcoap_api:Received: {"9001":"Tafellicht","9002":1529674695,"9020":1536968433,"9003":65539,"9054":0,"5750":2,"9019":1,"3311":[{"9003":0,"5850":0,"5851":250,"5717":0,"5711":250,"5709":30138,"5710":26909,"5706":"f5faf6"}],"3":{"0":"IKEA of Sweden","1":"TRADFRI bulb GU10 WS 400lm","3":"1.2.217","2":"","6":1}}
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001', 65543]
DEBUG:pytradfri.api.libcoap_api:Received: {"9001":"Glazenkast","9002":1536962280,"9020":1536966396,"9003":65543,"9054":0,"5750":3,"9019":1,"9084":" 35 6a df dc d1 c0 e2 a6 4c 98 52 c6 87 6c ba 74","3":{"0":"IKEA of Sweden","1":"TRADFRI control outlet","3":"1.4.020","2":"","6":1},"3312":[{"9003":0,"5850":0,"5851":254}]}
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001', 65545]
DEBUG:pytradfri.api.libcoap_api:Received: {"9001":"TRADFRI remote control","9002":1536966391,"9020":1536966408,"9003":65545,"9054":0,"5750":1,"9019":1,"3":{"0":"IKEA of Sweden","9":60,"1":"TRADFRI remote control","3":"1.2.214","2":"","6":3}}
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001', 65546]
DEBUG:pytradfri.api.libcoap_api:Received: {"9001":"TV-Set","9002":1536966646,"9020":1536967295,"9003":65546,"9054":0,"5750":3,"9019":1,"9084":" af 5e bc 11 29 30 60 a2 4f 9e 5e b7 7 e 7e 95","3":{"0":"IKEA of Sweden","1":"TRADFRI control outlet","3":"1.4.020","2":"","6":1},"3312":[{"9003":0,"5850":1,"5851":254}]}
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001', 65547]
DEBUG:pytradfri.api.libcoap_api:Received: {"9001":"Buislamp Hoek","9002":1536966996,"9020":1536967987,"9003":65547,"9054":0,"5750":3,"9019":1,"9084":" d0 c9 f0 eb dd d3 a6 4c f1 80 b 16 4e f5 88 10","3":{"0":"IKEA of Sweden","1":"TRADFRI control outlet","3":"1.4.020","2":"","6":1},"3312":[{"9003":0,"5850":0,"5851":254}]}
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15001', 65548]
DEBUG:pytradfri.api.libcoap_api:Received: {"9001":"Audioset","9002":1536968250,"9020":1536968280,"9003":65548,"9054":0,"5750":3,"9019":1,"9084":" 43 86 6e b5 6a df dc da d6 ce 9c 5a b4 63 a4 2a","3":{"0":"IKEA of Sweden","1":"TRADFRI control outlet","3":"1.4.020","2":"","6":1},"3312":[{"9003":0,"5850":0,"5851":254}]}
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15004']
DEBUG:pytradfri.api.libcoap_api:Received: [131073,131074,131075]
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15005', <pytradfri.command.Command object at 0x7f211a2c2f98>]
DEBUG:pytradfri.api.libcoap_api:Received: [131073,131074,131075]
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15010']
DEBUG:pytradfri.api.libcoap_api:Received: []
DEBUG:pytradfri.api.libcoap_api:Executing <IP_ADDRESS> get ['15011', '15012']
DEBUG:pytradfri.api.libcoap_api:Received: {"9107":0,"9076":10,"9023":"1.tradfri.pool.ntp.org","9093":0,"9061":0,"9059":1536969079,"9060":"2018-09-14T23:51:19.028176Z","9062":0,"9092":0,"9075":37,"9029":"1.4.15","9066":5,"9081":"7e21455204400117","9069":1530560572,"9082":false,"9080":60,"9083":"N/A","9054":0,"9055":0,"9071":1,"9072":9,"9073":13,"9074":23,"9077":28,"9078":1,"9079":0,"9106":0,"9105":0,"9200":"248cf9a7-5158-44ed-b4a7-89c6aa42033d"}

Let me know if you want more.

{
   "9001":"Audioset",
   "9002":1536968250,
   "9020":1536968280,
   "9003":65548,
   "9054":0,
   "5750":3,
   "9019":1,
   "9084":" 43 86 6e b5 6a df dc da d6 ce 9c 5a b4 63 a4 2a",
   "3":{
      "0":"IKEA of Sweden",
      "1":"TRADFRI control outlet",
      "3":"1.4.020",
      "2":"",
      "6":1
   },
   "3312":[
      {
         "9003":0,
         "5850":0,
         "5851":254
      }
   ]
}

Anyone up for testing the branch supporting wall plugs? Should work in theory but as I don't have one, I can't test it.

Oh yes, I would love to test! I use the plugin for Domoticz (https://github.com/moroen/IKEA-Tradfri-plugin) which talks to pytradfri, but that plugin isn't ready yet.
If you have clear instructions on how I can test your branch of pytradfri then I would be happy to test it for you. I already cloned your fix_plug branch so I'm ready to go.

In the examples, you should be able to replace light_control with socket_control and light[0] with socket[0] and thus turn it on and off.
I've updated one of the examples to show what I mean:
https://gist.github.com/ggravlingen/17a9c39a40c70c1343fe2eedc944b364

I have installed it using the requirements file, with DTLSSocket. So yes, I guess the async version.
Thanks for the update, I will test it now!

It seems to do something. It lists all the devices (plugs included), but Is on doesn't match the status (tried with the plug on and off):
# python3 example_switches.py <IP_ADDRESS>
decrypt_verify(): found 24 bytes cleartext
decrypt_verify(): found 76 bytes cleartext
decrypt_verify(): found 311 bytes cleartext
decrypt_verify(): found 306 bytes cleartext
decrypt_verify(): found 301 bytes cleartext
decrypt_verify(): found 293 bytes cleartext
decrypt_verify(): found 214 bytes cleartext
decrypt_verify(): found 302 bytes cleartext
decrypt_verify(): found 287 bytes cleartext
decrypt_verify(): found 307 bytes cleartext
decrypt_verify(): found 295 bytes cleartext
decrypt_verify(): found 291 bytes cleartext
[<65541 - Muurlicht Rechts (TRADFRI bulb GU10 WS 400lm)>, <65540 - Plafond (TRADFRI bulb E27 WS opal 980lm)>, <65538 - Stalamp Plafond (TRADFRI bulb E27 CWS opal 600lm)>, <65542 - Muurlicht Links (TRADFRI bulb GU10 WS 400lm)>, <65539 - Tafellicht (TRADFRI bulb GU10 WS 400lm)>]
[<65543 - Glazenkast (TRADFRI control outlet)>, <65546 - TV-Set (TRADFRI control outlet)>, <65547 - Buislamp Hoek (TRADFRI control outlet)>, <65548 - Audioset (TRADFRI control outlet)>]
Is on: False
Name: Audioset
decrypt_verify(): found 294 bytes cleartext
Traceback (most recent call last):
  File "example_switches.py", line 146, in <module>
    asyncio.get_event_loop().run_until_complete(run())
  File "/usr/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "example_switches.py", line 142, in run
    yield from api(state_command)
  File "/usr/local/src/pytradfri/pytradfri/api/aiocoap_api.py", line 152, in request
    result = yield from self._execute(api_commands)
  File "/usr/local/src/pytradfri/pytradfri/api/aiocoap_api.py", line 109, in _execute
    if api_command.observe:
AttributeError: 'bool' object has no attribute 'observe'
Error in sys.excepthook:

Original exception was:

OK, let's simplify things a bit. Can you download and rnu the gist again?

Done! Here the complete output:
# python3 example_switches2.py <IP_ADDRESS>
decrypt_verify(): found 24 bytes cleartext
decrypt_verify(): found 76 bytes cleartext
decrypt_verify(): found 214 bytes cleartext
decrypt_verify(): found 302 bytes cleartext
decrypt_verify(): found 287 bytes cleartext
decrypt_verify(): found 307 bytes cleartext
decrypt_verify(): found 295 bytes cleartext
decrypt_verify(): found 291 bytes cleartext
decrypt_verify(): found 311 bytes cleartext
decrypt_verify(): found 306 bytes cleartext
decrypt_verify(): found 301 bytes cleartext
decrypt_verify(): found 293 bytes cleartext
[<65543 - Glazenkast (TRADFRI control outlet)>, <65546 - TV-Set (TRADFRI control outlet)>, <65547 - Buislamp Hoek (TRADFRI control outlet)>, <65548 - Audioset (TRADFRI control outlet)>]
Error in sys.excepthook:

Original exception was:

P.S. the original example_async.py works fine though.

OK, this statement works at least:
    # Print all sockets
    print(sockets)

I've updated the gist again to see if it works a few more lines.

Okay, now I don't have any errors, yippie! But.. also no responses yet.
I tried all the 4 switches through the IKEA app, but no output. Here is the complete output:
# python3 example_switches3.py <IP_ADDRESS>
decrypt_verify(): found 24 bytes cleartext
decrypt_verify(): found 76 bytes cleartext
decrypt_verify(): found 311 bytes cleartext
decrypt_verify(): found 306 bytes cleartext
decrypt_verify(): found 301 bytes cleartext
decrypt_verify(): found 293 bytes cleartext
decrypt_verify(): found 214 bytes cleartext
decrypt_verify(): found 302 bytes cleartext
decrypt_verify(): found 287 bytes cleartext
decrypt_verify(): found 307 bytes cleartext
decrypt_verify(): found 295 bytes cleartext
decrypt_verify(): found 291 bytes cleartext
[<65543 - Glazenkast (TRADFRI control outlet)>, <65546 - TV-Set (TRADFRI control outlet)>, <65547 - Buislamp Hoek (TRADFRI control outlet)>, <65548 - Audioset (TRADFRI control outlet)>]
Is on: False
Waiting for observation to end (2 mins)
Try altering any light in the app, and watch the events!

Observation isn't turned on in the script, that's why you're not seeing anything. I think I might have spotted an error. While I provide a fix, please download the updated gist.

Okay! The is the result with the updated gist (looks the same error as the first one):
# python3 example_switches4.py <IP_ADDRESS>
decrypt_verify(): found 24 bytes cleartext
decrypt_verify(): found 76 bytes cleartext
decrypt_verify(): found 214 bytes cleartext
decrypt_verify(): found 302 bytes cleartext
decrypt_verify(): found 287 bytes cleartext
decrypt_verify(): found 307 bytes cleartext
decrypt_verify(): found 295 bytes cleartext
decrypt_verify(): found 291 bytes cleartext
decrypt_verify(): found 311 bytes cleartext
decrypt_verify(): found 306 bytes cleartext
decrypt_verify(): found 301 bytes cleartext
decrypt_verify(): found 293 bytes cleartext
[<65543 - Glazenkast (TRADFRI control outlet)>, <65546 - TV-Set (TRADFRI control outlet)>, <65547 - Buislamp Hoek (TRADFRI control outlet)>, <65548 - Audioset (TRADFRI control outlet)>]
Is on: False
Name: Glazenkast
Traceback (most recent call last):
  File "example_switches4.py", line 122, in <module>
    asyncio.get_event_loop().run_until_complete(run())
  File "/usr/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "example_switches4.py", line 116, in run
    yield from api(state_command)
  File "/usr/local/src/pytradfri/pytradfri/api/aiocoap_api.py", line 152, in request
    result = yield from self._execute(api_commands)
  File "/usr/local/src/pytradfri/pytradfri/api/aiocoap_api.py", line 109, in _execute
    if api_command.observe:
AttributeError: 'bool' object has no attribute 'observe'
Error in sys.excepthook:

Original exception was:

I've pushed an update to the branch that might do the trick. Can you please pull it and try again?

Thanks, done! 😃
# git pull
remote: Counting objects: 4, done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/ggravlingen/pytradfri
   a9c6c79..0d60412  fix_plug   -> origin/fix_plug
Updating a9c6c79..0d60412
Fast-forward
 pytradfri/socket.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Just to be sure:
# git checkout fix_plug
Already on 'fix_plug'
Your branch is up to date with 'origin/fix_plug'.

And I did a fresh download of your gist.
Results:
# python3 example_switches5.py <IP_ADDRESS>
decrypt_verify(): found 24 bytes cleartext
decrypt_verify(): found 76 bytes cleartext
decrypt_verify(): found 214 bytes cleartext
decrypt_verify(): found 302 bytes cleartext
decrypt_verify(): found 287 bytes cleartext
decrypt_verify(): found 307 bytes cleartext
decrypt_verify(): found 295 bytes cleartext
decrypt_verify(): found 291 bytes cleartext
decrypt_verify(): found 311 bytes cleartext
decrypt_verify(): found 306 bytes cleartext
decrypt_verify(): found 301 bytes cleartext
decrypt_verify(): found 293 bytes cleartext
[<65543 - Glazenkast (TRADFRI control outlet)>, <65546 - TV-Set (TRADFRI control outlet)>, <65547 - Buislamp Hoek (TRADFRI control outlet)>, <65548 - Audioset (TRADFRI control outlet)>]
Is on: False
Name: Glazenkast
Traceback (most recent call last):
  File "example_switches5.py", line 122, in <module>
    asyncio.get_event_loop().run_until_complete(run())
  File "/usr/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "example_switches5.py", line 116, in run
    yield from api(state_command)
  File "/usr/local/src/pytradfri/pytradfri/api/aiocoap_api.py", line 152, in request
    result = yield from self._execute(api_commands)
  File "/usr/local/src/pytradfri/pytradfri/api/aiocoap_api.py", line 109, in _execute
    if api_command.observe:
AttributeError: 'bool' object has no attribute 'observe'
Error in sys.excepthook:

Original exception was:

Hmm

If you need SSH access, just let me know. I run it in a simple local Docker instance 😉

I added an example to the branch (in the examples folder) and put back some code that relates to observations. Please give it a go. :)

Hehehe done! Here's the output:
# git pull
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 4 (delta 2), reused 4 (delta 2), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/ggravlingen/pytradfri
   0d60412..a561269  fix_plug   -> origin/fix_plug
Updating 0d60412..a561269
Fast-forward
 examples/example_socket_async.py | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 136 insertions(+)
 create mode 100644 examples/example_socket_async.py
root@Ubuntu:/usr/local/src/pytradfri# cd examples/
root@Ubuntu:/usr/local/src/pytradfri/examples# python3 example_socket_async.py <IP_ADDRESS>
decrypt_verify(): found 24 bytes cleartext
decrypt_verify(): found 76 bytes cleartext
decrypt_verify(): found 311 bytes cleartext
decrypt_verify(): found 306 bytes cleartext
decrypt_verify(): found 301 bytes cleartext
decrypt_verify(): found 293 bytes cleartext
decrypt_verify(): found 214 bytes cleartext
decrypt_verify(): found 302 bytes cleartext
decrypt_verify(): found 287 bytes cleartext
decrypt_verify(): found 307 bytes cleartext
decrypt_verify(): found 295 bytes cleartext
decrypt_verify(): found 291 bytes cleartext
[<65543 - Glazenkast (TRADFRI control outlet)>, <65546 - TV-Set (TRADFRI control outlet)>, <65547 - Buislamp Hoek (TRADFRI control outlet)>, <65548 - Audioset (TRADFRI control outlet)>]
Is on: False
Name: Audioset
decrypt_verify(): found 294 bytes cleartext
Traceback (most recent call last):
  File "example_socket_async.py", line 136, in <module>
    asyncio.get_event_loop().run_until_complete(run())
  File "/usr/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "example_socket_async.py", line 130, in run
    yield from api(state_command)
  File "/usr/local/src/pytradfri/pytradfri/api/aiocoap_api.py", line 152, in request
    result = yield from self._execute(api_commands)
  File "/usr/local/src/pytradfri/pytradfri/api/aiocoap_api.py", line 109, in _execute
    if api_command.observe:
AttributeError: 'bool' object has no attribute 'observe'
Error in sys.excepthook:

Original exception was:

# python3 --version
Python 3.6.5

# uname -a
Linux Ubuntu 3.10.105 #23739 SMP Tue Jul 10 00:16:57 CST 2018 x86_64 x86_64 x86_64 GNU/Linux

I have to give this one a bit of a thought.

No problem. I'm happy to test further (although tomorrow afternoon I'll be gone until the night).  Thanks for your time and I'll keep an eye on my mail notifications.

I just spotted another error I had made. It's been fixed and pushed to Github.

At least, Is on: False and Is on: True are working now, displaying the state of the socket (before the script ends with that Traceback). 👍🏻

Great! That was my last fix :)

@ggravlingen looks like a boolean is being passed to the observation, rather than the Command.
https://gist.github.com/ggravlingen/17a9c39a40c70c1343fe2eedc944b364#file-gistfile1-txt-L130
state_command is actually being assigned to a boolean.
Also yes, ATTR_LIGHT_STATE should be renamed to ATTR_DEVICE_STATE if it's used more widely.

@lwis OMG two equal signs in a row is never a good sign... Thanks! :blush:
I'll refactor to ATTR_DEVICE_STATE.

@HansVanEijsden can you please give the example script another go? I just updated it based on the suggestion made by @lwis.

Hi @ggravlingen thanks for your patience, I just came home.
Good news: it works! As soon as I run the script, the socket turns on. And if I turn off the socket by the app or external remote, the scripts displays the new state (and then it quits, but no problem). 👍🏻
i# git pull
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 22 (delta 13), reused 21 (delta 12), pack-reused 0
Unpacking objects: 100% (22/22), done.
From https://github.com/ggravlingen/pytradfri
   4bde50f..361c39b  fix_plug   -> origin/fix_plug
Updating 4bde50f..361c39b
Fast-forward
 examples/example_socket_async.py |  7 ++++---
 pytradfri/const.py               |  2 +-
 pytradfri/device.py              |  6 +++---
 pytradfri/group.py               |  6 +++---
 pytradfri/smart_task.py          | 10 +++++-----
 pytradfri/socket.py              |  6 +++---
 tests/test_device.py             | 31 +++++++++++++++----------------
 7 files changed, 34 insertions(+), 34 deletions(-)

# python3 example_socket_async.py <IP_ADDRESS>
decrypt_verify(): found 24 bytes cleartext
decrypt_verify(): found 76 bytes cleartext
decrypt_verify(): found 311 bytes cleartext
decrypt_verify(): found 306 bytes cleartext
decrypt_verify(): found 301 bytes cleartext
decrypt_verify(): found 293 bytes cleartext
decrypt_verify(): found 214 bytes cleartext
decrypt_verify(): found 302 bytes cleartext
decrypt_verify(): found 287 bytes cleartext
decrypt_verify(): found 307 bytes cleartext
decrypt_verify(): found 295 bytes cleartext
decrypt_verify(): found 291 bytes cleartext
[<65543 - Glazenkast (TRADFRI control outlet)>, <65546 - TV-Set (TRADFRI control outlet)>, <65547 - Buislamp Hoek (TRADFRI control outlet)>, <65548 - Audioset (TRADFRI control outlet)>]
Is on: False
Name: Audioset
decrypt_verify(): found 294 bytes cleartext
Received message for: <Socket #0 - name: Glazenkast, state: off>
decrypt_verify(): found 288 bytes cleartext
Received message for: <Socket #0 - name: TV-Set, state: off>
decrypt_verify(): found 296 bytes cleartext
Received message for: <Socket #0 - name: Buislamp Hoek, state: off>
decrypt_verify(): found 292 bytes cleartext
Received message for: <Socket #0 - name: Audioset, state: off>
decrypt_verify(): found 8 bytes cleartext
Waiting for observation to end (10 secs)
decrypt_verify(): found 294 bytes cleartext
Received message for: <Socket #0 - name: Audioset, state: on>
decrypt_verify(): found 294 bytes cleartext
Received message for: <Socket #0 - name: Audioset, state: off>
WARNING:root:Observation deleted without explicit cancellation
WARNING:root:Observation deleted without explicit cancellation
WARNING:root:Observation deleted without explicit cancellation
WARNING:root:Observation deleted without explicit cancellation
Error in sys.excepthook:

Original exception was:

Great news, then it works! It should quit after 10 seconds (there's a sleep somewhere near the end of the script.) You can try turning on the socket by changing the last False to True.
I'll clean up the code and merge the pr.

5.6.0 (available in pypi) has basic support for wall plugs. Thanks for helping out adding support!


Outputting to css grid element

Hi,
Is there anyway to output to css grid. e.g id like to use the customiser to change the 400px part of this :
grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
Is that possible ?
Thanks,
Scott

I can't tell you exactly what to do unless I have a more complete picture of the CSS rule (including element) and what kind of control you're using.
You should be able to use the value_pattern argument.
You can read the docs on https://aristath.github.io/kirki/docs/arguments/output.html#arguments-you-can-use-inside-each-output-array

Hi,
Thanks for the response and sorry for my slow reply.  Heres the whole thing, I'm trying to create a slider that will change the value of the minmax ( 200px in this example )
.alfie-product-grid ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-column-gap: 5px;
    grid-row-gap: 20px;
}

Couldn't quite get my head around the value pattern you mentioned :(
Thanks,
Scott

Something like this should do it:
Kirki::add_field( 'my_config', array(
	'type'     => 'slider',
	'settings' => 'my_setting',
	'label'    => esc_attr__( 'This is the label', 'my_textdomain' ),
	'section'  => 'my_section',
	'default'  => 200,
	'choices'  => array(
		'min'  => 50,
		'max'  => 500,
		'step' => 1,
	),
	'output'   => array(
		array(
			'element'       => '.alfie-product-grid ul.products',
			'property'      => 'grid-template-columns',
			'value_pattern' => 'repeat(auto-fill, minmax($px, 1fr))',
		),
	),
) );

The $ in the value_pattern is used as a placeholder and gets replaced by the value of the slider.
You'll have to tweak the min, max & step values to your liking.
If you wanted to allow users to use other values too besides pixels, (such as 20% for example or 10em) you could use a dimension control instead of a slider.
Dimension controls will give users the ability to enter any valid CSS value they want. In that case it would look like this:
Kirki::add_field( 'my_config', array(
	'type'     => 'dimension',
	'settings' => 'my_setting',
	'label'    => esc_attr__( 'This is the label', 'my_textdomain' ),
	'section'  => 'my_section',
	'default'  => '200px',
	'output'   => array(
		array(
			'element'       => '.alfie-product-grid ul.products',
			'property'      => 'grid-template-columns',
			'value_pattern' => 'repeat(auto-fill, minmax($, 1fr))',
		),
	),
) );

Note that here in the value_pattern we don't use $px but instead plain $ because the unit will be contained in the value entered by the user.
Both of the above options will generate this CSS:
.alfie-product-grid ul.products {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}


Enable various workflows for github

This enables support for

bors
dependabot
github workflows

The github workflow in particular is copied from obs-gitlab-runner to build docker images with the runner after doing all the tests
Signed-off-by: Sjoerd Simons<EMAIL_ADDRESS>

bors r+

bors retry


B2C Sample + E2E Test 2.0

I removed the 2.0 sample from #1775 so I could merge the 1.x sample/test. This PR is for the 2.0 sample/test
Wait to merge until CORS issue is resolved.
Future enhancements:

Test social account login
Add forgot password flow and test

Coverage remained the same at 81.907% when pulling 38fdb64dbb48845321516a4ef63322dc5a51f097 on b2c-e2e-sample2.0 into b3ec7ee29bc4a7ee50505b77d707d781e95ce31c on dev.

I'm working through an Angular setup with MSAL.js 2.0 and B2C for a client, and found my way to the angular10-browser-sample in this PR. First, thank you for all the great work on this! :) Second, can you provide some guidance on how to call a B2C-protected API from Angular in that sample? The sample currently has:
protectedResourceMap.set('https://graph.microsoft.com/v1.0/me', ['user.read'])

This doesn't work since B2C tokens can't be used to make MS Graph API calls. I tried setting up my own but the following doesn't seem to work correctly, and instead I get an infinite redirect loop with B2C and the app -- I'm guessing the app doesn't consider the signed-in user to have the required scopes? I did grant admin consent to the app and ensured that the redirect URLs are configured with SPA, and that the implicit grant is disabled.
protectedResourceMap.set('https://aspnetcoreapib2c.azurewebsites.net/hello', ['https://vibraniumtechdemob2c.onmicrosoft.com/api/demo.read'])

@LarsKemmann Can you please open an issue? Thanks!


Missing client->files->delete method

Deleting keys is not supported by the project type (HTML), so I am trying to find a way to delete HTML files via API as described here: https://developers.lokalise.com/reference/delete-a-file

I just wanted to implement the same, but also found out it doesnt exist.
The workaround to delete all keys from a file did also not work since the API is still returning the file.


Some VMs Boot into initramfs

/kind bug
What steps did you take and what happened:
I create a cluster as described in the quick-start. I changed the replicas to 3 for md and controlplane. I also changed the storage for the vm-disks to a lvm-thin storage.
Some VMs (in this example two and three) do not boot correctly instead there a going into the initramfs.
Therefore the machines does not go into running state.
Its random which VMs run into the error. Sometimes its even the first controlplane VM.

first try
k get machines
NAME                           CLUSTER       NODENAME                         PROVIDERID                                       PHASE         AGE     VERSION
cappx-test-6dqst               cappx-test    cappx-test-controlplane-llwfx    proxmox://c6244ce6-be79-4073-a378-8b0fd75a79cf   Running       6m47s   v1.27.3
cappx-test-kw42b               cappx-test    cappx-test-controlplane-zj9b7    proxmox://81616cfd-df41-4d1a-aeab-c0fdb76c2987   Running       10m     v1.27.3
cappx-test-md-0-cnslp-45tvt    cappx-test                                     proxmox://a15e2fb3-5d6f-4b1f-84fd-7fb49c91abf8   Provisioned   13m     v1.27.3
cappx-test-md-0-cnslp-c28nt    cappx-test                                     proxmox://1c38b356-fa5a-4343-8cd9-e28f013cd55f   Provisioned   13m     v1.27.3
cappx-test-md-0-cnslp-td5hh    cappx-test    cappx-test-md-0-2fmq7            proxmox://6cf85bbb-c1d8-46df-a38e-b5b6f25dbf68   Running       13m     v1.27.3
cappx-test-tnrmr               cappx-test    cappx-test-controlplane-4fds9    proxmox://dc4da772-23a6-4446-80e8-40527dc8ac55   Running

second try
k get machines
NAME                           CLUSTER       NODENAME                         PROVIDERID                                       PHASE         AGE     VERSION
cappx-test-cbbp8               cappx-test    cappx-test-controlplane-gkpbx    proxmox://cea53be2-dd58-4902-80c5-3eab7ba9e3d5   Running       3m17s   v1.27.3
cappx-test-md-0-85954-9ctbs    cappx-test                                     proxmox://3c92d086-7bce-4f4e-8986-2e1d43629aa5   Provisioned   6m51s   v1.27.3
cappx-test-md-0-85954-g6lnk    cappx-test                                     proxmox://0d6f79a8-867d-4a79-af75-3b7970dc498d   Provisioned   6m51s   v1.27.3
cappx-test-md-0-85954-j82jv    cappx-test                                     proxmox://5764bd21-660c-42aa-9466-bf4fe321cbeb   Provisioned   6m51s   v1.27.3
cappx-test-qdpkj               cappx-test    cappx-test-controlplane-v92sr    proxmox://3e631789-3aa5-4e05-846f-31e3a6a0a857   Running       6m50s   v1.27.3

What did you expect to happen:
The VMs should start as the others.
Anything else you would like to add:
I'm not sure if this is cappx related if not maybe this is something which can maybe be caught by a MachineHealthCheck.
(Will investigate in this)
Environment:

Cluster-api-provider-proxmox version:  0.3.3
Proxmox VE version:  Virtual Environment 8.0.4
Kubernetes version: (use kubectl version):

Client Version: v1.28.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.3

OS (e.g. from /etc/os-release): debian(client) ubuntu(default, server)

hmmm I have no idea for it. for me, it looks not related cappx but proxmox.


Disabled field styles are not accessible/visable

Form fields marked as disabled adopt styles that make them next to impossible to read for anyone and certainly don't meet colour contrast for accessibility requirements

Realised this was fixed in 2.8 sorry.


Parsing of boolean additonalProperties inconsistent with OpenAPI 3.0.0 specification

I'm used to setting "additionalProperties": false from JsonSchema, hence did so in an OpenAPI 3.0.0 file, especially as it's allowed by the specification.
Using version 2.0.0-SNAPSHOT of swagger-parser-v3 as found on oss.sonatype.org for OpenAPI file validation, I get a parse result message saying that additonalProperties is not of type object.
I'm aware of issue #366, but I think either

the parser should accept boolean values for additionalProperties as well
or
it must be clearly stated in the specification if the parser is supposed to frown upon such values.

In addition, the message is a bit misleading because it is reported only once and only for the top level of the object definiton, even though there were several occurences of "additonalProperties": false on deeper levels of this definition. Providing a more precise location would have helped a lot with debugging this issue.

Thanks for the feedback, @mbeko. The parser should definitely allow it.
Can you provide us with a sample spec to help test it?
Better yet, if you can submit a PR (against the 2.0 branch) adding a test to the test suite, we'll make sure it passes.

Great, thanks! I'll reduce my specification to a minimal example exposing the problem and submit a pull request.
Since I should do it against the 2.0 branch: Should I keep the specification in the 3.0.0 format or rewrite it as 2.0?

Should be 3.0.0.
2.0 did not allow boolean values to additionalProperties.

What about that bug?

I have added the sample specification and the test, but haven't received feedback since then.
Concerning news about the overall adaptation of the tools to 3.0.0, issue #4669 on swagger-codegen indicates that it lags behind the specification.

Sorry about this - just got lost in the mass emails. We'll try to take a look shortly.

No problem and thank you :)

Hi! This bug appears to have returned in a recent release of swagger-parser. I'll open a new issue.


Which method is the most accurate?

Hi,
Have you done any analysis on which method is the most accurate in judging similarity in phonetic sounds between two words?

I'm not an expert, but my understanding is that they all have their strengths and weaknesses. To cover my bases, I use more than one algo and consider it a match if any one is a match. hth.


Show family item class

It would be helpful if you showed what that "familyItem" class actually looked like.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 40462fee-eb9e-5874-35b8-26d4605e390f
Version Independent ID: bccb7915-dca2-7f10-9ccc-33fdf26baf65
Content: Node.js tutorial for the SQL API for Azure Cosmos DB
Content Source: articles/cosmos-db/sql-api-nodejs-get-started.md
Service: cosmos-db
Sub-service: cosmosdb-sql
GitHub Login: @deborahc
Microsoft Alias: dech

Found it.   Maybe link to if from page?

@LarsLiden Thanks for the feedback and glad that you were able to find the relevant information.


Logo and readme

Wow, the readme looks so much nicer now. Thank you for making the world of developers a bit brighter when researching libraries and reading readmes :+1:

Im happy that you like it :)
Do you need more help? I was looking to your repos, do you need logotypes for this projects: sloth; mycelium; scribe; covenant.
Greetings.

Nice, sloth could definitely use a logo, it is about being lazy and letting the library do some repetitive work for you. If you find the time and have an idea, I would be happy to see it.


scrypt optional dependency

Hey @davidmurdoch,
As you probably know, we are working with Tenderly (/cc @nebojsa94 ) to migrate the Ethereum ecosystem away from native dependencies that need to be recompiled when you install them.
Most of this work is ready, and we are now waiting for new versions of ganache-core and ganache-cli, but we just noticed that scrypt is now an optional dependency of ganache-cli.
We wonder if this dependency can be reconsidered/removed. It won't prevent your users to use ganache without a compiler, but it will degrade the installation speed.
As scrypt has been deprecated for two years and fails to install in most modern node versions, I believe most of your users are actually using the js version, so this change shouldn't have a big impact.
If using a javascript version of this function is a no go, we can also help with that.
Thanks!

Merged. Thanks!


feature:  Adding hover functionality in SearchBox

A hover feature can be added to the search bar to display the full video title when it doesn’t fit in the box. Currently, longer titles are truncated with ellipses ("..."), but with this improvement, users will be able to hover over the title to see the complete text.

https://github.com/user-attachments/assets/f122b462-700a-4459-b170-befcb51a292c

@devsargam please assign this to me.
I am doing this

Hey @devsargam Please look at this PR #1553

Hey is this still open i would love to work on this issue @devsargam

@Jatingupta9120 there's already a pr raise for this so that will get the preference


one property is now public, causing exception

a 2nd method was renamed

Thanks! Should be published in 18e82ce


How to capture changes from specific tables?

I have specified mysql tables(LogicalSources) I want to capture changes from in sources.json .
When databus is getting an event for a table which is not specified in logical sources, I am getting null pointer exception in ORListener as I have not added schemas for these tables and have not configured these logical sources.
These are the exact lines -
VersionedSchema vs = _schemaRegistryService.fetchLatestVersionedSchemaBySourceName(_tableUriToSrcNameMap.get(tableName));
Schema schema = vs.getSchema(); // Here NullPointer
The application is running fine after this exception. Major concern here is, it is updating scn as -1 after handling non specified table events. So if the application stops after parsing events for unspecified tables, in the next run it will start from SCN -1.
Is there any good way to register specific tables and ignore others?

Thanks for reporting this.
I have a fix which I will merge.
On Fri, Jan 20, 2017 at 7:56 AM, rahuljoshi123<EMAIL_ADDRESS>wrote:

I have specified mysql tables(LogicalSources) I want to capture changes
from in sources.json .
When databus is getting an event for a table which is not specified in
logical sources, I am getting null pointer exception in ORListener.
These are the exact lines -
VersionedSchema vs = _schemaRegistryService.fetchLatestVersionedSchemaBySo
urceName(_tableUriToSrcNameMap.get(tableName));
Schema schema = vs.getSchema(); // Here NullPointer
The application is running fine after this exception but its updating scn
as -1 after handling non specified table events. So if the application
stops after parsing events for unspecified tables. It will start from SCN
as -1.
Is there any way to register specific tables and ignore others?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/linkedin/databus/issues/84, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA4sG1iH2qPIGKRw0HMtO6QffRYyKVjgks5rUNkygaJpZM4LpdE6
.

Hi,
Thanks for the reply. Please let me know once you merge the fix.
Meanwhile if you share the fix branch, I can help in testing the fix.
Thanks,
Rahul

Done.
On Tue, Jan 24, 2017 at 1:43 AM, rahuljoshi123<EMAIL_ADDRESS>wrote:

Hi,
Thanks for the reply. Please let me know once you merge the fix.
Meanwhile if you share the fix branch, I can help in testing the fix.
Thanks,
Rahul
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/linkedin/databus/issues/84#issuecomment-274755462,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA4sG51HnpmCHs5wfoITxdlh0K4_KbiLks5rVcfCgaJpZM4LpdE6
.

Hi,
Fix you did is avoiding framing of avro records and the earlier exception of 'schema not available'.
But SCN is updated as -1 after processing a ignored source events. If relay restart after this, it will try to read events from scn -1.
I have done a fix - https://github.com/linkedin/databus/pull/85.
Please let me know your thoughts on this.

Merged. Thanks for the fix!
On Wed, Feb 1, 2017 at 2:01 AM, rahuljoshi123<EMAIL_ADDRESS>wrote:

Hi,
Fix you did is avoiding framing of avro records and the earlier exception
of 'schema not available'.
But SCN is updated as -1 after processing a ignored source events. If
relay restart after this, it will try to read events from scn -1.
I have done a fix - #85 https://github.com/linkedin/databus/pull/85.
Please let me know your thoughts on this.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/linkedin/databus/issues/84#issuecomment-276617700,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA4sG1hBD2p9cdJ2SqsvX2ZYelHAlsz9ks5rYFf4gaJpZM4LpdE6
.


New version: Microsoft.Edge.Beta version 110.0.1587.22

Result: Installation Failed

Manifest
Add/Remove Programs

Name
Microsoft Edge Beta

Version
110.0.1587.22

Publisher
Microsoft Corporation

ProductCode

Auto-updated by vedantmgoyal2009/winget-pkgs-automation in workflow run 5517
Microsoft Reviewers: Open in CodeFlow

This package consistently fails to install with error:

Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action DoInstall, location: C:\Windows\Installer\MSI74CD.tmp, command: /silent /install "appguid={2CD8A..."


Create a Resource Manager template for each environment- Fill in the values step details on connection strings are not clear

In this section https://docs.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment#create-a-resource-manager-template-for-each-environment
when trying to fill in the "Custom Deployment Settings" values I'm unable to identify the format of a connection string, for example what if I access a SQL server database on-prem using a windows authentication service account and a password, I know how to do this in ADF itself but unable to get the right format in these settings, same question for the other data source types.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 1e22e4d6-366f-fbf8-e141-8905ca7ab7ae
Version Independent ID: 5be2acf2-66e7-cadf-6666-5a85a65b9771
Content: Continuous integration and deployment in Azure Data Factory
Content Source: articles/data-factory/continuous-integration-deployment.md
Service: data-factory
GitHub Login: @douglaslMS
Microsoft Alias: douglasl

@saulcruz
Thanks for the feedback! We are currently investigating and will update you shortly.

@saulcruz For the properties of a SQL Server linked service, see Copy data to and from SQL Server using Azure Data Factory | Linked service properties. Connection strings for other linked services are documented in separate pages for each service.
The easiest way to verify the correct connection string for a linked service is to

Create the linked service in the Data Factory UI,
export the linked service as a Resource Manager template, and
check the connection string in the template.

I'll be adding a notation to the article with this suggestion.

@saulcruz Thanks for the info. This is not something that I've experimented with personally. Are you saying that if you create the linked service in the UI and generate an ARM template for it, that the connection string doesn't work? Or simply that the format isn't identical?

The format isn't identical, it looks like this:
 {
            "name": "[concat(parameters('factoryName'), '/ls_sql_dev_MyName')]",
            "type": "Microsoft.DataFactory/factories/linkedServices",
            "apiVersion": "2018-06-01",
            "properties": {
                "annotations": [],
                "type": "SqlServer",
                "typeProperties": {
                    "connectionString": "[parameters('ls_sql_dev_MyName_connectionString')]",
                    "userName": "[parameters('ls_sql_dev_MyName_properties_typeProperties_userName')]",
                    "password": {
                        "type": "SecureString",
                        "value": "[parameters('ls_sql_dev_MyName_password')]"
                    }
                },
                "connectVia": {
                    "referenceName": "iriisvm",
                    "type": "IntegrationRuntimeReference"
                }
            },
            "dependsOn": [
                "[concat(variables('factoryId'), '/integrationRuntimes/iriisvm')]"
            ]
        }

@saulcruz Uh ... I see. Let me ask for clarification about the advice that was passed on to me.

Correct, I understand why this is parameterized as much as possible, thanks a lot though for taking the time to look this up, your link really solved my problem @douglaslMS

@saulcruz Thanks to your question, we have added a bit of guidance to the article. Please see the paragraph titled "Connection strings" at the end of the section. Continuous integration and deployment in Azure Data Factory | Create a Resource Manager template for each environment. We're now going to close this issue.

#please-close