Unable to create BC OnPrem container

I'm struggling to create my first NavContainer (for BC OnPrem ES), because the New-NavContainer always stalls (last successful output: Assign Premium Plan...), before throwing an error, trying to initialize again and finally aborting execution.
If I try to debug, I'm always taken to Wait-NavContainerReady where it starts outputting log content (basically saying "Warning: operation successful but took too long" on SQL issues).
I don't get this output if I don't enter in debug mode (see below).
I'm using an up-to-date Windows Server 2016 on a Virtual machine.
I've already run troubleshooting scripts on my Docker EE installation to discard any installation-related issues, and they all come out fine.
This happens both in <IP_ADDRESS> and <IP_ADDRESS>.
I run the command with these parameters:
PS C:> New-NavContainer -containerName BCOnPremES -accept_eula -assignPremiumPlan -auth Windows -authenticationEMail<EMAIL_ADDRESS>-Credential administrador -doNotExportObjectsToText -enableSymbolLoading -imageName mcr.microsoft.com/businesscentral/onprem:es -includeCSide -includeTestLibrariesOnly -includeTestToolkit -isolation process -shortcuts Desktop -timeout 7200 -updateHosts
(I increased timeout to 7200 to see if it would write the log Warnings to the console, and I don't have any personalized scripts in the shared folders).
This is the output I get:
Host is Windows Server 10.0.14393.0 - ltsc2016
Using image mcr.microsoft.com/businesscentral/onprem:es
Removing container BCOnPremES
Removing BCOnPremES from hosts
Removing C:\ProgramData\NavContainerHelper\Extensions\BCOnPremES
Creating Nav container BCOnPremES
NAV Version: 13.0.24630.0-es
Generic Tag: <IP_ADDRESS>
Container OS Version: 10.0.14393.2430 (ltsc2016)
Host OS Version: 10.0.14393.0 (ltsc2016)
Creating container BCOnPremES from image mcr.microsoft.com/businesscentral/onprem:es
1491429e70a39f8b9e39309de07e9cf62bc314086939b34873e3694a5ba5484c
Waiting for container BCOnPremES to be ready
Initializing...
Starting Container
Hostname is BCOnPremES
PublicDnsName is BCOnPremES
Using Windows Authentication
Starting Local SQL Server
Starting Internet Information Server
Modifying Service Tier Config File with Instance Specific Settings
Starting NAV Service Tier
Creating DotNetCore Web Server Instance
Creating http download site
Creating Windows user administrador
Setting SA Password and enabling SA
Creating SUPER user
Assign Premium plan for BCONPREMES\ADMINISTRADOR
Cannot index into a null array.
at , C:\Run\navstart.ps1: line 172
at , C:\Run\start.ps1: line 107
at , : line 1Error
Initializing...
Starting Container
Hostname is BCOnPremES
PublicDnsName is BCOnPremES
Using Windows Authentication
Starting Local SQL Server
Starting Internet Information Server
Modifying Service Tier Config File with Instance Specific Settings
Starting NAV Service Tier
Creating DotNetCore Web Server Instance
Creating http download site
Creating Windows user administrador
Setting SA Password and enabling SA
Creating SUPER user
Assign Premium plan for BCONPREMES\ADMINISTRADOR
Cannot index into a null array.
at , C:\Run\navstart.ps1: line 172
at , C:\Run\start.ps1: line 107
at , : line 1
Initialization of container BCOnPremES failed
En C:\Program
Files\WindowsPowerShell\Modules\navcontainerhelper\<IP_ADDRESS>\ContainerHandling\Wait-NavContainerReady.ps1:
45 Carácter: 17

...             throw "Initialization of container $containerName failed" ...

            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : OperationStopped: (Initialization ...OnPremES failed:String) [], RuntimeExc
eption
FullyQualifiedErrorId : Initialization of container BCOnPremES failed

Please advise

You are using a tons of parameters :) Have you tried a more simple approach like this ?
$Licensefile = "C:\Docker\YourLincense365.flf"
$ImageName = "mcr.microsoft.com/businesscentral/onprem:es"
$ContainerName = "nav365bc"
$PlainTextPw = "Passw0rd"
$Credential = New-Object -TypeName PSCredential -ArgumentList $env:USERNAME,(ConvertTo-SecureString -String $PlainTextPw -AsPlainText -Force)
New-NavContainer -containerName $ContainerName -memoryLimit "3g" -accept_eula -accept_outdated -auth NavUserPassword -Credential $Credential -imageName $ImageName -licenseFile $Licensefile -includeCSide -shortcuts Desktop -verbose
Palle

Palle is right, your problem is probably some of the parameters - I guess it is -credential, it needs to be a pscredential - or leave it out, then new-navcontainer will ask you

Tusind tak til begge to!
I had a look at the logs and found out they still contained entries from my former intents (this struggle has gone on for days now). Therefore I decided to have a clean start.
I've also pruned both containers and images before continuing and restarted the docker service.
Following your instructions, I've done several attempts with simplified parameters, and I now think the parameters can be outruled as a cause to my problems. Now it stalls after "Creating SUPER user":
(line breaks come out a bit strange on here, but they're right in PS).
PS C:> $MyImageName = "mcr.microsoft.com/businesscentral/onprem:es"
$MyContainerName = "BCOnPremES4"
New-NavContainer -accept_eula                  -containerName $MyContainerName
-imageName $MyImageName                  -auth Windows
-enableSymbolLoading                  -includeCSide
-doNotExportObjectsToText                  -shortcuts Desktop
-updateHosts
Host is Windows Server 10.0.14393.0 - ltsc2016
Using image mcr.microsoft.com/businesscentral/onprem:es
Creating Nav container BCOnPremES4
NAV Version: 13.0.24630.0-es
Generic Tag: <IP_ADDRESS>
Container OS Version: 10.0.14393.2430 (ltsc2016)
Host OS Version: 10.0.14393.0 (ltsc2016)
Creating container BCOnPremES4 from image mcr.microsoft.com/businesscentral/onprem:es
5913853f32443c87f015efa876e5b9fc5c0aae274c8ba388f115435a933898ae
Waiting for container BCOnPremES4 to be ready
Initializing...
Starting Container
Hostname is BCOnPremES4
PublicDnsName is BCOnPremES4
Using Windows Authentication
Starting Local SQL Server
Starting Internet Information Server
Modifying Service Tier Config File with Instance Specific Settings
Starting NAV Service Tier
Creating DotNetCore Web Server Instance
Creating http download site
Creating Windows user administrador
Setting SA Password and enabling SA
Creating SUPER user
Cannot index into a null array.
at , C:\Run\navstart.ps1: line 172
at , C:\Run\start.ps1: line 107
at , : line 1Error
Initializing...
Starting Container
Hostname is BCOnPremES4
PublicDnsName is BCOnPremES4
Using Windows Authentication
Starting Local SQL Server
Starting Internet Information Server
Modifying Service Tier Config File with Instance Specific Settings
Starting NAV Service Tier
Creating DotNetCore Web Server Instance
Creating http download site
Creating Windows user administrador
Setting SA Password and enabling SA
Creating SUPER user
**Cannot index into a null array.
at , C:\Run\navstart.ps1: line 172
at , C:\Run\start.ps1: line 107
at , : line 1
Initialization of container BCOnPremES4 failed
En C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\<IP_ADDRESS>\ContainerHandling\Wait-NavContainerReady.ps1: 45
Carácter: 17

...             throw "Initialization of container $containerName failed" ...

            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : OperationStopped: (Initialization ...nPremES4 failed:String) [], RuntimeException
FullyQualifiedErrorId : Initialization of container BCOnPremES4 failed**

Logs:
I'm afraid my Host & Image are ES so most of it's in spanish.
I'm now contemplating creating a new VM in EN to start all over, but due to resource problems that probably won't be until tomorrow (I've been struggling like crazy to get some hands-on experience with this environment before NTD, but I suppose I must accept that I've run out of time).

I've attached the "docker logs BCOnPremES4" output in .txt. It only contains 9 warnings and they all seem to originate from the same source: "Long running SQL statements".
Could this be the cause of the array error?
DockerLogsBCOnPremES4.txt

I've also attached a more interesting .xlsx with the Event Log content for this last attempt (Get-NAVContainerEventLog BCOnPremES4). (Full: includes all entries. ErrorWarning: filtered).
The .xlsx also contains the host Event Log specifically for Docker in the same way.
Event logs for BCOnPremES4.xlsx

As to container specific entries (.xlsx), they identify a few issues:
- The   service could not add service principal names because the service account could not be found in Active Directory. Account NT AUTHORITY\SYSTEM (when defining ports 7045..7048.
This surprises me a bit: in the spanish localization of Win, this account translates into "Sistema local".
Is it possible that there could be some kind of a language mismatch when searching for the account?
(It definitely exists on my host VM and I use it for many running services).

Several Warnings on "long running" SQL statement
Begin IsolationLevel=65536 is attempted several times
License activation error (slui.exe)
Automatic startup of DefAppPool failed

Apart from the log findings, I doubt about a few things me and maybe either of you can help me clarify them:

Docker installation didn't go as expected: I cannot start the service if I let Docker create my nat network automatically, so I had to include a { "bridge" : "none" } instruction in daemon.json and create my own nat manually. Furthermore, it only works if I specify subnet and gateway. (It's all within the hosts range and at least the troubleshooting script for docker accepts it and comes away 100% right).
I've gone over the different pre-requisites a dozen times and I don't understand why I need the "bridge" :"none" statement (maybe server language causes problems?).
Apart from harrassing FK on Yammer the other day (!!), I've also sought help on MSDN, but I'm still using "my personalized nat" network. (Inspect/NetNat details further below).

A few days ago, I successfully created a container, although based on the wrong image (sandbox).
That time, the script was completed (I didn't get the errors I'm getting now), but a) I couldn't connect it to my network (inspite of using --attachable param) and b) it wasn't the image I wanted.
Therefore, somehow I relate the current errors to the difference between sandbox and onprem, although I haven't been able to figure out why they happen (image?/deployment platform?/language?).

The VM I'm using, already has NAV2018 installed (the traditional way) - I don't know if that can cause any serious conflict that might be preventing the container creation (as a Docker rookie I assumed I might perhaps face some port conflicts, etc. but would still be able to create the container and resolve any issues afterwards). At least it didn't prevent me from creating the sandbox container.
It also has a full SQL Server 2016 Standard installed (and not SQL Server Express).

Docker network inspect output:
"Name": "bclan01",
"Id": "cfedbd619131d23d78d20b872b747f46850e164e06d5f56000dcbc9c29bca1b7",
"Created": "2018-11-20T09:58:28.7694311+01:00",
"Scope": "local",
"Driver": "nat",
"EnableIPv6": false,
"IPAM": {
"Driver": "windows",
"Options": null,
"Config": [
{
"Subnet": "<IP_ADDRESS>/24",
"Gateway": "<IP_ADDRESS>"
}
]
},
"Internal": false,
"Attachable": true,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {},
"Options": {
"com.docker.network.windowsshim.hnsid": "271205af-bcfd-4e71-8f58-19a88efaba29",
"com.docker.network.windowsshim.networkname": "bclan01"
},
"Labels": {}
Get-NetNat:
Name                             : Hf1e9e4b7-43e9-4954-b27d-da8d41e5987e
ExternalIPInterfaceAddressPrefix :
InternalIPInterfaceAddressPrefix : <IP_ADDRESS>/24
IcmpQueryTimeout                 : 30
TcpEstablishedConnectionTimeout  : 1800
TcpTransientConnectionTimeout    : 120
TcpFilteringBehavior             : AddressDependentFiltering
UdpFilteringBehavior             : AddressDependentFiltering
UdpIdleSessionTimeout            : 120
UdpInboundRefresh                : False
Store                            : Local
Active                           : True
Tak igen (og god rejse - jeg tror vi træffes på torsdag),
Eyrún

If you try again and add -alwaysPull to your new-navcontianer - it will download cu1 and that will probably work.
The reason for the error is probably network setting, like this: https://github.com/Microsoft/nav-docker/issues/281
which was fixed in a later generic version - which was used for business central on prem cu1
All older versions will be updated with this fix as well.

Tak igen Freddy og undskyld: jeg burde have fundet det selv...
The error on issue #281 is a close fit to my situation - the only difference is that my network problems are nat related.
I tried again with the following command:
$MyContainerName = "BCOnPremES5"
$MyDBServer = "BCServer"
New-NavContainer -accept_eula                  -containerName $MyContainerName
-imageName $MyImageName                  -auth Windows
-databaseServer $MyDBServer                  -enableSymbolLoading
-includeCSide                  -doNotExportObjectsToText
-shortcuts Desktop                  -timeout 7200
-updateHosts                  -alwaysPull
-verbose
That went much better: I've gotten rid of the array error and now I only have some network related issues.
Most relative script output:
WARNING: DNS resolution not working from within the container.
Container IP Address: UNKNOWN
I've run out of time to dig deeper into the networking issues - I'll continue after NTD.
Also, it won't let me include the TestToolkit related parameters (I suspect a mismatch in the server name), but it's not important right now.
Thanks again,
Eyrún

You're right - the -databaseServer parameter is superfluos in my case - I'll omit it in my next test (hopefully it'll avoid the TestToolkit error).
The network issue in Docker is really annoying.
I'd have thought that an up-to-date WinServer should be perfectly compatible and the install should have been a straight forward and easy task. More so, since I understand I'm deploying the simplest scenario.
However, even though all troubleshooting/inspect tests come out clean, I'm unable to get docker running unless I disable the automatic network creation (bridge:none).
Last news from MSDN is a suggestion to downgrade Docker to ver. 17.06 (I'm using 18.09).
I won't do that until I've had a chance to see if I can connect my new container to the personalized nat network.

Hi there
A few suggestions on the DNS-matter. What I have done is the following.

I ran SCONFIG as administrator and changed the DNS to <IP_ADDRESS>. and <IP_ADDRESS>
Set a fixed IP-address for the Virtual machine
added -additionalParameters @("--network=tlan","--ip <IP_ADDRESS>") <- 10 an ip-address for each container
Right click in Hyper-V, Settings on Network, Advanced, Enable Mac-address spoofing.

If it still does not work. Then try to find me on tomorrow or friday.

Thanks Palle,
I've finally been able to "solve" this: it seems that the HNS on my localized version of my VM in combination with Docker caused the error...
I now have an identical VM (exact same build and config) BUT in English.
Installing Docker the exact same way did not cause an error with HNS when I started the service.
Therefore, Docker was able to create the default networks.
I pulled the same images as before and repeated the last used syntax for navcontainerhelper:
The container was created correctly and connected automatically to the default network.
In the meanwhile I received different suggestions like to use Docker 17.06, but since I have a workaround on my EN VM I'm not trying them out for now - I've already lost a weeks work on this issue and derived problems


Allow format issue output text within individual sections and in general

Hi everyone! Here is a simple solution for issue #47

Allow format issue output text within individual sections and in general
Removed generateLinks flag

Removed generateLinks flag

Even if a custom format allows the links to be omitted, having a flag that controls the behavior when using the default format is a useful convenience that I think should be kept.

@wilkinsona Could you describe the scenario of how format should work in the case where it has ${number} but the generateLinks flag is set to false. I suggest another way to eliminate these conflicts by setting the default-format parameter to ${title}, which is equivalent to generateLinks=true.
Another option would be to use generateLinks=true to internally set the default format to ${title}, but not allow generateLinks and default-format to be set at the same time.
Thank you for your feedback, please say me if you have any other ideas

I would only apply generateLinks to the default format and ignore it when a custom format has been supplied.
When using a custom format, I don't think ${number} should generate a link. It should only output the issue's number. If you want a link, I would expect the format to be something like ${title} [${number}](${url}). This should provide complete control over the link and its text. You could then also do something like [${title} ${number}](${url}) if you want the issue's title to be part of the link text.

Hi again @wilkinsona. I've put generate-links back the way it worked before. Now, if default-format is explicitly specified, the generate-links flag is ignored. If default-format is not specified, generate-links then "${title}" will be used as the default format, as it worked before. Is it what you wanted?

Hi everyone! So what is with this pull request?

@Dinozavvvr nothing except the team is very busy and has other priorities right now.


Problem to import Basemap (1.2.0) in Spyder - KeyError: 'PROJ_LIB' - Windows 10

Issue:
Dear all,
I am using spyder 3.3.1 with python 3.6.5, Ipython 6.4.0 and I am having problem with Basemap.
I tried to install the new anaconda with python 3.7 and I have the same problem.
I do not problems with other packages, like cartopy, which uses proj/proj.
Can you help me?
Below is the issue.
Traceback (most recent call last):
File "", line 1, in
from mpl_toolkits.basemap import Basemap
File "C:\Users\pedruzzi\anaconda3\lib\site-packages\mpl_toolkits\basemap_init_.py", line 155, in
pyproj_datadir = os.environ['PROJ_LIB']
File "C:\Users\pedruzzi\anaconda3\lib\os.py", line 669, in getitem
raise KeyError(key) from None
KeyError: 'PROJ_LIB'

Environment (conda list):

$ conda list
# packages in environment at C:\Users\pedruzzi\anaconda3:
#
# Name                       Version                   Build               Channel
basemap                        1.2.0            py36h5987640_0     conda-forge
basemap-data-hires      1.2.0                         0                  conda-forge
anaconda-project          0.8.2            py36hfad2e28_0
proj4                              4.9.3                hfa6e2cd_8            conda-forge
pyproj                             <IP_ADDRESS>                  py36_0             conda-forge

Details about  conda and system ( conda info ):
$ conda info
 active environment : base
       conda version : 4.5.11
conda-build version : 3.10.5
     python version : 3.6.5.final.0
                 platform : win-64
         user-agent : conda/4.5.11 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.17134
      administrator : False
         netrc file : None
       offline mode : False

Same as #30

have you solved this?  @rpedruzzi

@jamessong,
Yeah, I changed the init file of basemap.
this is what I did:
At the begging of the file, I added the os and conda libraries:
import os, conda
at the line 155, I commented the:
#pyproj_datadir = os.environ['PROJ_LIB']
and added the following lines:
if 'PROJ_DIR' in os.environ:
pyproj_datadir = os.environ['PROJ_DIR']
else:
conda_file_dir = conda.CONDA_PACKAGE_ROOT
conda_dir = conda_file_dir.split('lib')[0]
pyproj_datadir = os.path.join(os.path.join(conda_dir, 'Library'),'share')
The user just need to check the path to where the python system saved the epsg of pyproj/proj,
which is usually in Library/share or inside the the pyproj folder.
For the record, I'm using win10, anaconda 5.3.1, python 3.7.0 and I changed my first level channel to conda-forge.
regards

thanks! Did you install anaconda with admin account or local user account? Somehow I can't modify that init file
On Monday, November 26, 2018 11:01 AM, Rizzieri Pedruzzi<EMAIL_ADDRESS>wrote:

@jamessong,
Yeah, I changed the init file of basemap.
this is what I did:
At the begging of the file, I added the os and conda libraries:
import os, condaat the line 155, I commented the:
#pyproj_datadir = os.environ['PROJ_LIB']and added the following lines:if 'PROJ_DIR' in os.environ:
pyproj_datadir = os.environ['PROJ_DIR']
else:
conda_file_dir = conda.CONDA_PACKAGE_ROOT
conda_dir = conda_file_dir.split('lib')[0]
pyproj_datadir = os.path.join(os.path.join(conda_dir, 'Library'),'share')The user just need to check the path to where the python system saved the epsg of pyproj/proj,
which is usually in Library/share or inside the the pyproj folder.For the record, I'm using win10, anaconda 5.3.1, python 3.7.0 and I changed my first level channel to conda-forge.regards—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@jamessong
I'm in the admin group in my computer, so I have some permissions, even being a normal user. Additionally, I installed my python/anaconda inside my personal folder (e.g. C:\Users\your_user) instead in ~\AppData, where usually anaconda install it.
try to install your python/anaconda inside your user folder, like C:\Users\jamessong

somehow I couldn't get spyder or jupyter notebook to work with it:
KeyError: 'PROJ_LIB'
On Monday, November 26, 2018 11:21 AM, Rizzieri Pedruzzi<EMAIL_ADDRESS>wrote:

@jamessongI'm in the admin group in my computer, so I have some permissions, even being a normal user.
Reply to this email directly, view it on GitHub, or mute the thread.

Of all the solutions I found online the solution from @rpedruzzi was the only one that worked for me with the missing 'PROJ_LIB'. I had to reinstall Ananconda in a different path though.
For reference I use Anaconda 3 (version 2018.12) and Python 3.7.

@jamessong,
Yeah, I changed the init file of basemap.
this is what I did:
At the begging of the file, I added the os and conda libraries:
import os, conda
at the line 155, I commented the:
#pyproj_datadir = os.environ['PROJ_LIB']

and added the following lines:
if 'PROJ_DIR' in os.environ:
    pyproj_datadir = os.environ['PROJ_DIR']
else:
    conda_file_dir = conda.CONDA_PACKAGE_ROOT
    conda_dir = conda_file_dir.split('lib')[0]
    pyproj_datadir = os.path.join(os.path.join(conda_dir, 'Library'),'share')

The user just need to check the path to where the python system saved the epsg of pyproj/proj,
which is usually in Library/share or inside the the pyproj folder.
For the record, I'm using win10, anaconda 5.3.1, python 3.7.0 and I changed my first level channel to conda-forge.
regards

Seconding that after having wasted a couple hours on this, the only solution that worked for me also, was @rpedruzzi's. I'm running on Windows 10, Python 3.6.

@jamessong,
Yeah, I changed the init file of basemap.
this is what I did:
At the begging of the file, I added the os and conda libraries:
import os, conda
at the line 155, I commented the:
#pyproj_datadir = os.environ['PROJ_LIB']

and added the following lines:
if 'PROJ_DIR' in os.environ:
    pyproj_datadir = os.environ['PROJ_DIR']
else:
    conda_file_dir = conda.CONDA_PACKAGE_ROOT
    conda_dir = conda_file_dir.split('lib')[0]
    pyproj_datadir = os.path.join(os.path.join(conda_dir, 'Library'),'share')

The user just need to check the path to where the python system saved the epsg of pyproj/proj,
which is usually in Library/share or inside the the pyproj folder.
For the record, I'm using win10, anaconda 5.3.1, python 3.7.0 and I changed my first level channel to conda-forge.
regards

Seconding that after having wasted a couple hours on this, the only solution that worked for me also, was @rpedruzzi's. I'm running on Windows 10, Python 3.6.

Hi I was trying to follow the steps but i am getting ModuleNotFoundError: No module named 'conda'.
File "C:/Users/Dipankar/Anaconda2/envs/t1/lib/site-packages/mpl_toolkits/basemap/init.py", line 2, in
import os,conda
ModuleNotFoundError: No module named 'conda'.
Can you please give me some suggestion on it

You just have to add 'import conda' with the other imported packages in the top of the file.

You just have to add 'import conda' with the other imported packages in the top of the file.

I did that even after that I am getting the error. Do you want me to import conda in init file I have done so

Weird, this worked for me. Do you have the conda package installed and have you checked if you can import conda in a normal python script?

Dear all,
I found out that the correct way to open Spyder in Win10 is opening the Anaconda prompt and open it using this command:
spyder --hide-console
the -- hide-console is to close the anaconda prompt after launch spyder.
When you do this, Spyder gets all environment variables, including the PROJ_LIB and all others.
This step are necessary because there some config scripts which is run when you open Anaconda prompt that creates all this variables, so Spyder can get it. Open it directly on the app icon will not assign these variables and paths causing errors.
I got this information in other Spyder issues comments by @ccordoba12
Regards

In the spyder code write the following line:
import os
os.environ ['PROJ_LIB'] = '/ home / 'name_user'/ anaconda3 / share / proj'
from mpl_toolkits.basemap import Basemap

Hi. l have similar problem while import mpl in spyder and got No module named 'mpl_toolkits.basemap' in spyder.
How may solve this issue on windows 7?


Headers already sent

Hi Waifung,
I admire this project and forked it.
I changed config/database.php to connect to my database and tested the code as it is today (18-jun-2015).
The site works fine. Changing language works fine. Going to login page (or forms example), I get this error presented bellow.
Do you have any clue on why this might be happening? Don't know if this is an issue or just me not doing something correctly.
Thank you
--- Begin of what appears on the page
Fatal error: Can't use method return value in write context in /home/my_app_path/application/controllers/Account.php on line 33
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/my_app_path/application/controllers/Account.php:33)
Filename: core/Common.php
Line Number: 564
Backtrace:
A PHP Error was encountered
Severity: Compile Error
Message: Can't use method return value in write context
Filename: controllers/Account.php
Line Number: 33
Backtrace:
--- End of what appears on the page

I suspect the error is caused by redirection when doing form validation, which you can find from my Form Builder class (application/libraries/Form_builder.php > find from validate() function).
Or maybe you can share your server info (web server, php version) since some others also mentioned similar issue and their environment is using IIS server - which I am not that familiar with.

Hi,
thank you, I using PHP version 5.2.17 on a linux host (running apache).

Hi, i did some digging and it seems that the problem goes away if you change
if ( !empty($this->input->post()) &&  $form->validate() )
by
if ( $this->input->post() &&  $form->validate() )
I tried this solution and it worked.
According to the php docs the empty() function only works on variables, not objects.
References:
http://stackoverflow.com/questions/16882684/empty-function-not-working-in-codeignitor
http://stackoverflow.com/questions/1075534/cant-use-method-return-value-in-write-context
http://php.net/manual/en/function.empty.php
Note: there may be other uses of empty() that need to be changed on the project...

Replaced:
application/controllers/Account.php: 3 times
application/controllers/Example.php: 1 time
application/modules/admin/controllers/Login.php: 1 time

Thanks for detailed reporting - yes I have used empty() quite a lot throughout the application, but I wonder if the PHP version matters since I don't have the issue in my hosting environment (PHP 5.5+).
Anyway I will try to beware of the issue and fixed them when I have time. Thanks again.


add a onceFlushed() promise function to handler queues

This is useful for a graceful closedown where you want to close empty a queue before closing stuff down.

No plans to fix this in the forseeable future.


Structural hash - Incorporating the Var hash into generating hash

Currently, the BindVar function does not take Var type into account. This causes
two same graph structures with different var shapes to have same hash.
Structural hash is used for keeping track of which operators we have
already compiled. Because of this, two operators with different shapes end up
pointing to same compiled code. The failure is encountered at runtime, where the
expected input shape asserts are not met.
Thanks for contributing to TVM!   Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers.

@jroesch @zhiics @yzhliu

Great catch, probably due to the type annotation field changing after the hashing code was written by me. LGTM.


Comment out code-generation during the release

Purpose
Comment out the code-generation execution during the release process.

This is a temporary fix I guess to stop automated building of connectors (due to manual edits until we fix the code gneration tool). So I will merge with the comment out code.


Is it possible to merge http access logs and slow logs in rest?

1. Is it possible to merge http access logs and slow logs in rest?
When a request is too slow, the slow call log is triggered, and the access log of the request is also triggered, the information of these two logs is almost exactly the same, is it possible to consider not printing the access log anymore after outputting the slow call log?
2. Is it possible to configure an exception path for slow call logs?
In my project using websocket, the connection time is usually more than 60 seconds and almost every request prints the slow call log when the connection is closed, this is normal, tell me that the request is too slow is completely pointless and is a distraction.
2024-02-13T14:53:27.102+08:00    slow   [HTTP]  200  -  GET  /user/chat/ws?k_sso_token=l5NVP1jEaOOjavdlXAaY0GxW-vnBV9_Dga4SqIDSsnPqJXtO3x17TLLCm5N9tPOC86M7yzQ5nDNvuKBpJknkBC_cN4ifK9_KdmfupEWDiMFO700L-2NiYorNK65IrCPb4X4pOnq-ZIjbs_imlOebdhbYVm_RkD-Z3fHfttyoccQ.cv0 - <IP_ADDRESS>:56662 - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15 - slowcall(19439.3ms)      duration=19439.3ms      caller=handler/loghandler.go:131        trace=a136e9df9c8329e8f22723e849c869e8    span=e2f34239c27f457d
2024-02-13T14:53:27.102+08:00    info   [HTTP]  200  -  GET  /user/chat/ws?k_sso_token=l5NVP1jEaOOjavdlXAaY0GxW-vnBV9_Dga4SqIDSsnPqJXtO3x17TLLCm5N9tPOC86M7yzQ5nDNvuKBpJknkBC_cN4ifK9_KdmfupEWDiMFO700L-2NiYorNK65IrCPb4X4pOnq-ZIjbs_imlOebdhbYVm_RkD-Z3fHfttyoccQ.cv0 - <IP_ADDRESS>:56662 - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15    duration=19439.3ms      caller=handler/loghandler.go:147        trace=a136e9df9c8329e8f22723e849c869e8  span=e2f34239c27f457d

You can set the log writer, check out the example here: https://github.com/zeromicro/zero-contrib/tree/main/logx/zapx

I got the same problem, is there any good solution?


Enforce literal string for connection execute methods

In the same way that we enforce passing literal string to QueryBuilder methods in https://github.com/phpstan/phpstan-doctrine/blob/1.4.x/stubs/bleedingEdge/ORM/QueryBuilder.stub
I wonder if we shouldn't enforce literal string to for Connection::execute* methods which executes SQL directly.
This would help chaning query like
->executeQuery('SELECT foo where foo.bar = '.$nonLiteralValue);

to
->executeQuery('SELECT foo where foo.bar = :value', ['value' => $nonLiteralValue]);

Hi, WDYT about it @ondrejmirtes ?

I'm waiting for Craig Francis to react to this.

Friendly ping @craigfrancis if you find some time

Hi @VincentLanglet, sorry for the delay.
I've been meaning to look at these, as you're right, the $sql param really needs be a literal-string.
But, partially due to laziness, partially down to lack of sleep, can you explain why there are several stub files? As in, Connection.stub makes sense, but why are the others there (I suspect there is a simple/obvious explanation, but my brain isn't working at the moment).

The reason for that is probably the last orange box on this page https://phpstan.org/user-guide/stub-files

Thanks Ondřej, yep that makes perfect sense :-)

The reason for that is probably the last orange box on this page phpstan.org/user-guide/stub-files

Yes it is.

Great, in which case it looks good to me.
At a later date I'll check and do a PR for prepare(), the 13 functions that use string $query, array $params (e.g. fetchAssociative); and maybe convertExceptionDuringQuery and expandArrayParameters (source).

Thank you.


Feat #4

From #4

just calling vim.lsp.buf.format might be a bit problematic, because it's argument such as timeout and filter would need to be configurable

I checked it again.
filter like argument in vim.lsp.buf.format has no effect when lsp-client hasn't formatter (just notifying what 'no lsp attached').
timeout_ms 1000 ms by default and it enough, I think.
I added a wrapper with filtering lsp-clients.
If no one client has no formatter for that buffer,  vim.lsp.buf.format just no call. When formatter is present, the action will be the same if the user called it himself.

The problem is that if you have multiple LSPs attached then it will ask which one to use for formatting, I think it's easier to  leave creating this function up to the user
I might create a function that allows to range format with formatters that don't support it, then I'll be able to better integrate this plugin into null-ls and it will be one of the sources

The problem is that if you have multiple LSPs attached then it will ask which one to use for formatting, I think it's easier to leave creating this function up to the user

Yes, I understand reason.
Just in recent time prompt with ask no shown more (at least at me with nvim 0.8). And I tested with two formatters for buffer (null-ls with tidy and html-lsp) - by default calling last at order without asking.
Need this feature or not – on your view.
Maybe make sense add note to README, how to format entire buffer by one keymap, until you don't add it in sources null-ls.

refactor is now merged into main


[Port dspace-7_x] Ensures CSRF token is initialized prior to first modifying (non-GET) request

Description

Manual port of #2886 to dspace-7_x
Also includes commit d2ec558ac24332085d97a1a0ec1b962ac80354e5 of #2897, which refactored that new CSRF token code into a request effect.
Requires backend port in DSpace/DSpace#9599
Fixes DSpace/DSpace#9236

Instructions for Reviewers

Install this PR and Backend PR DSpace/DSpace#9599
Verify bug DSpace/DSpace#9236 no longer occurs.  This issue is easily reproducible on https://demo.dspace.org

NOTE: The e2e test failures in this PR are the result of the Backend PR (DSpace/DSpace#9599) not yet being merged.  I've verified locally (via yarn e2e) that all e2e tests succeed when run against the Backend PR.

👍 I've tested this locally alongside https://github.com/DSpace/DSpace/pull/9599 and verified that this functionality is successfully backported.  Namely:

On first request to the homepage, the POST /server/api/statistics/viewevents call always succeeds now.  Previously it would often fail because the CSRF token would not yet be initialized.
When that first request occurs, I can verify (from the backend dspace.log that the new /api/security/csrf endpoint was called to obtain the initial token.  In that scenario, you'll see this in the logs:2024-05-17 16:47:45,267 INFO  unknown 373bb807-3346-4813-8120-bc6942b629cc org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request [GET /server/api/security/csrf] originated from /

I rebased this on dspace-7_x after a very minor merge conflict with latest dspace-7_x (in a edit-relationship-list.component.spec.ts).

Briefly closing & reopening to trigger tests to run again.  They should now succeed since the backend PR (https://github.com/DSpace/DSpace/pull/9599) was merged

Merging immediately as all tests pass, and was tested by @kshepherd as described in https://github.com/DSpace/DSpace/pull/9599#pullrequestreview-2149601390


Kill transcode

And other fixes. This will require a review.

We need a landscape file we so it stops complaining about private access.

I think we overlapped a bit of our efforts with the PlexClient issue. What are the things we should be keeping here? The kill-transcode should def by copied in.
It also looks like you found a few missing attributes in PlexClient. I think we should probably not be overriding the names of attributes to new names as in this example.  I used to do that, and things get pretty confusing pretty quickly. (self.protocolCapabilities = data.attrib.get('protocolCapabilities', data.attrib.get('provides', '')).split(',')))
The playQueue changes I don't fully understand, but I'm also tired (its 2am here). What happens if we call playMedia() with both media and playQueue specified? If that works right, what happens if media is not in the playQueue items? -- I was thinking we could have a playlist.toPlayQueue(), then a new function next to playMedia called something like startPlayQueue() (that playMedia would call as well).
How is _find_media_type() used?

How is _find_media_type() used?
Atm its not, its just a nice helper to use if your lazy and want to figure out what mtype to pass automatically. But its rather slow, so i was thinking we should just change mtype to mtype='video' since that is what pms is generally used for and require the user only to set the correct mtype if the player isnt playing video.

The playQueue changes I don't fully understand, but I'm also tired (its 2am here). What happens if we call playMedia() with both media and playQueue specified?
If playQueue is passed, that gets presedence and it used if not we autocreate it for the user has we have done in the past.

Im gonna close and split this PR. I never intended for it to do so much.
I'll start with making clients better first.

for playMedia(), I think you can skip the argument all together, and just pass in a playMedia(media=<playQueue> and do the right thing.  Pretty much the same thing you already did, but drops an argument?

That would be the best, I believe it's possible to do this will some small changes to the createplayque.

I know this API is intended to mimic the xml attrs but sometimes this feels really awkward. Say I want the name of a server. That's friendlyname. A client is name, and there are a couple of other cases. Would it be ok if we added some aliases so it's a bit  more intuitive to use?

It might be fine. I just found that when I renamed Plex attrs in the API before it was generally because I was doing something awkward or not really intended. With clients, I question the usefulness of listing sessions then trying to connect to the client from the session list. That would only work if they owned the client that was already playing the media. And if they own the client then connecting from the devices list seems like the better path anyway.
Anyway, if you guys really think it's needed I don't want to stand in the way. Just seems like an odd path to me.


Formatted the codebase

Fixes Issue

Formatted all the JS code (double codes, spacing, indentation etc.)

Check List (Check all the boxes which are applicable)

[ ] My code follows the code style of this project. (I'm not sure lol)
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] All new and existing tests passed.
[x] This PR does not contain plagiarized content.
[ ] The title of my pull request is a short description of the requested changes.

Screenshots
N/A
Note to reviewers
Nothing

I think we should wait with this until the PRs for husky, prettier and linting are complete.

Yes, the linting rules may conflict.

😂 pls check #90


feat: ULSIF and RULSIF

Instance based methods implementation , comments to be changed

Codecov Report

Merging #80 (896be13) into master (93a565d) will decrease coverage by 5.10%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #80      +/-   ##
==========================================
- Coverage   93.90%   88.80%   -5.11%
==========================================
  Files          29       36       +7
  Lines        3596     4333     +737
==========================================
+ Hits         3377     3848     +471
- Misses        219      485     +266

Impacted Files
Coverage Δ

adapt/instance_based/_RULSIF.py
0.00% <0.00%> (ø)

adapt/instance_based/_ULSIF.py
0.00% <0.00%> (ø)

adapt/feature_based/_ccsa.py
95.23% <0.00%> (-4.77%)
:arrow_down:

adapt/feature_based/_fa.py
96.15% <0.00%> (-3.85%)
:arrow_down:

adapt/feature_based/_cdan.py
89.34% <0.00%> (-2.97%)
:arrow_down:

adapt/instance_based/_kliep.py
92.59% <0.00%> (-2.20%)
:arrow_down:

adapt/instance_based/_tradaboost.py
94.95% <0.00%> (-1.89%)
:arrow_down:

adapt/utils.py
95.50% <0.00%> (-0.27%)
:arrow_down:

adapt/feature_based/_sa.py
96.42% <0.00%> (ø)

adapt/feature_based/_mcd.py
97.41% <0.00%> (ø)

... and 23 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


feat: emoji picker

Description

based on #2909
add emojis with :emoji_name:
get autocompletion for emoji names

keyboard & mouse support

skin tone support through the appearance settigns

Changelog

added a list of emoji names based off unicode-emoji-json which is based on the unicode spec

but: emojis that have two skin tones (e. g. love pairs) have the skin tones disabled

created new EmojiSuggestions component, styles and tests
created useEmojiSuggestions hook

delays loading emojis.json untill the user starts inputing an emoji
handles providing the data for EmojiSuggestions component
keyboard input: arrow up/down keys, enter, tab
moved MAX_NOTE_LENGTH from local constant to constant in constants/misc.ts

added a setting for the skin color

created SkinToneSelector

update SettingsDropdown to make the icon optional

added action, state, reducer for skinColor

stored in localStorage
only one action: setSkinTone

Checklist

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] The light- and dark-theme are both supported and tested
[x] The design was implemented and is responsive for all devices and screen sizes
[x] The application was tested in the most commonly used browsers (e.g. Chrome, Firefox, Safari)

(Optional) Visual Changes

emoji suggestions

skin tone settings

emoji suggestions when editing note

ready for review & feedback👍


LDAP accounts/domain/alias  fully functional

I have a old mail-server (v1) with my own ldap implementation.
I have tried to play with the v2 and the following docker-compose.yml
version: '2'

services:
  mail:
    image: tvial/docker-mailserver:2.1
    hostname: mail
    domainname: domain.com
    container_name: mail
    ports:
    - "25:25"
    - "143:143"
    - "587:587"
    - "993:993"
    volumes:
    - maildata:/var/mail
    - mailstate:/var/mail-state
    - ./config/:/tmp/docker-mailserver/
    - /home/me/workspace/private/domain-keys/mail-server:/tmp/ssl:ro
    environment:
    - ENABLE_LDAP=1
    - LDAP_SERVER_HOST=ldap.domain.com
    - LDAP_SEARCH_BASE=dc=mail,dc=domain,dc=com
    - LDAP_BIND_DN=cn=readonly,dc=domain,dc=com
    - LDAP_QUERY_FILTER=(&(objectClass=CourierMailAccount)(mail=%s))
    - LDAP_BIND_PW=abc
    - ENABLE_SPAMASSASSIN=1
    - ENABLE_CLAMAV=1
    - ENABLE_FAIL2BAN=1
    - ENABLE_SASLAUTHD=1
    - SASLAUTHD_MECHANISMS=ldap
    - SASLAUTHD_LDAP_SERVER=ldap.domain.com
    - SASLAUTHD_LDAP_PROTO=ldap://
    - SASLAUTHD_LDAP_SSL=0
    - SASLAUTHD_LDAP_PASSWORD=domain
    - SASLAUTHD_LDAP_BIND_DN=cn=readonly,dc=domain,dc=com
    - SASLAUTHD_LDAP_PASSWORD=abc
    - SASLAUTHD_LDAP_SEARCH_BASE=dc=mail,dc=domain,dc=com
    - SASLAUTHD_LDAP_FILTER=(&(objectClass=CourierMailAccount)(mail=%s))
    - SSL_TYPE=manual
    - SSL_CERT_PATH=/tmp/ssl/mail.domain.com-full.pem
    - SSL_KEY_PATH=/tmp/ssl/mail.domain.com-key.pem
    - ONE_DIR=1
    - DMS_DEBUG=0
    cap_add:
    - NET_ADMIN
    restart: always

volumes:
  maildata:
    driver: local
  mailstate:
    driver: local

I have the following remarks

Generated LDAP configuration doesn't load all my values (filters)
I haven't found in the documentation how to also configure alias filter query and domain filter query.
Also I can't decrypt the install script which is mixing too many concerns.

Can anyone confirm this issue and tell me how the ldap feature is fully functional ?

I have 2 issues with the LDAP but got mine working. See #638 #636 #491
Maybe this helps

@kopax as far as i oversee this topic, the only problem with the ldap feature is, that dovecot (as stated by @johansmitsnl and also by myself ) is not implemented. So the file /etc/dovecot/dovecot-ldap.conf.ext will not be affected by the ldap configuration.

Generated LDAP configuration doesn't load all my values (filters)
Can you give more informations about this? What values are not loaded correctly?

Also I can't decrypt the install script which is mixing too many concerns.
https://github.com/tomav/docker-mailserver/issues/491#issuecomment-306174227
https://github.com/tomav/docker-mailserver/issues/491#issuecomment-306296358

@alinmear you can try my docker compose and you will notice that the configuration inside of the container isn't updated.
For examples theses one doesn't configure postfix ldap auth :
- SASLAUTHD_LDAP_SEARCH_BASE=dc=mail,dc=domain,dc=com
- SASLAUTHD_LDAP_FILTER=(&(objectClass=CourierMailAccount)(mail=%s))

I am maintaining my own LDAP image build on fork of V1. Kind of old but it also support aliases and multiples domains. At the time I wrote it I purpose my implementation but I needed some help for integration test.
I've started to read the install script but it become to messy at some point, I can't see in one shot what is going where so TBH I already skipped until I got some information.

@kopax, i investigated this over the weekend and found 1 critical flaw within the ldap functionality. We are currently treating all 3 filters (user, alias, group) like 1. I already developed a fix for this and will make a pr for it.
We have 3 points where Query filters are getting into the game:
POSTFIX:

/etc/postfix/ldap-users.cf
/etc/postfix/ldap-groups.cf
/etc/postfix/ldap-aliases.cf

SASLAUTHD:

/etc/saslauthd.conf

DOVECOT:

/etc/dovecot/dovecot-ldap.conf.ext

We need to introduce 4 new Env-Variables to deal with this situation; so we would have the following env Variables for the LDAP part:

LDAP_QUERY_FILTER_USER
LDAP_QUERY_FILTER_GROUP
LDAP_QUERY_FILTER_ALIAS
SASLAUTHD_LDAP_FILTER
DOVECOT_USER_FILTER
DOVECOT_PASS_FILTER

@kopax please try with the latest version of this container. Your issues should be fixed with #644.

Any news on this issue? Is it working as expected after #644?

@kopax is it working right now for you? Merged #648 , so special character should work now too

@alinmear I just got back from vacation. Sorry for taking so long. I didn't had the time to test yet.


ExternalProgramTask can't process external process printing unicode to stdout

As the title says, ExternalProgramTask crashes with the following error when the external task prints some unicode in stdout:

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/luigi/worker.py", line 191, in run
new_deps = self._run_get_new_deps()
File "/usr/local/lib/python2.7/dist-packages/luigi/worker.py", line 129, in _run_get_new_deps
task_gen = self.task.run()
File "/usr/local/lib/python2.7/dist-packages/luigi/contrib/external_program.py", line 110, in run
logger.info('Program stdout:\n{}'.format(stdout))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 35: ordinal not in range(128)

My pipeline orchestrates a number of bash scripts. I can't share nothing of the actual code, but I have created some code that reproduces the issue.
This is the smallest task that recreated the issue
import luigi
from luigi.contrib.external_program import ExternalProgramTask

class MyExternalProgramTask(ExternalProgramTask):

    my_script = luigi.Parameter()
    my_output = luigi.Parameter()

    def output(self):
        return luigi.LocalTarget(self.my_output)

    def program_args(self):
        return [self.my_script, self.my_output]

if __name__ == "__main__":
    luigi.run()

(save it and name it my_bug_example.py).
The following are two very simple bash scripts that write to an output file and print something to stdout:
ascii_stdout.sh
#!/bin/bash
echo "Just a place holder for possible output" > $1
echo "Hi guys, this is a ascii message"

unicode_stdout.sh
#!/bin/bash
echo "This is a unicode message: removed ‘wav.scp’ "
echo "Hi guys, this is a ascii message"

Running the following command will trigger the error:
python my_bug_example.py MyExternalProgramTask --local-scheduler --my-script ./unicode_stdout.sh --my-output unicode.out

While this one will run smootly:
python my_bug_example.py MyExternalProgramTask --local-scheduler --my-script ./ascii_stdout.sh --my-output ascii.out

I'm pretty confident that the bug is locate in line 110 of external_program.py:
logger.info('Program stdout:\n{}'.format(stdout))

with the following change also the unicode case should work:
logger.info(u'Program stdout:\n{}'.format(stdout))

Of course, the same modification should be applied also to line 113 of external_program.py.

Due to a customer request, we have to stick with python 2.7 in our project. This error pops up when we get an error message from an external command in utf-8.
Unfortunately, it's not possible to run a python2.7 spark job from a python 3.x luigi. Also, we have to run a localized Linux distro, so most of the console errors produce utf-8 characters.
Please fix it so it runs under both python 2.x and puthon 3.x or provide a way to fix it.
So far, I will resort to manually fixing the code myself.

Since 718a48aea491690f74feb9e0e0b6b5ee8082341c you should be able to specify capture_output = False in your task class; that should avoid the logging call and let your task work correctly.
Maybe luigi should consider using from __future__ import unicode_literals to make the Python2 <> Python3 compatibility a bit more predictable? It's a bit heavy-handed though, and might cause more issues with Python2 -- but it would also have solved this issue, rather than special-casing these two literals as unicode.


com.a.a@5c66bda <<< error in some failed downloads.

I am downloading some pdf files hosted on Nginx server on Digital Ocean.
Most of the times it works perfectly. But some users are getting this error [com.a.a@5c66bda]
Can you please explain about com.a.a@5c66bda & how to solve it for them?

hello sir my name is lucky agarwal.
i'm from india.
sir please reply me
sir download time show error:-
com.downloader.Error@8f6acd

sir please reply me

I have solved the problem. You need the url Https,  not Http.


Swift Compiler Error

i have problem with react-native-notification-banner V0.7 it says swift compiler error, can you help me to solve it? thanks before

same problem

+1

Trying to build an old project for iOS. @prscX If you can please provide a workaround.
RNNB: 0.0.7
RN: 0.59.10
Xcode: 12.5 beta


Optimize TimeOnly example

Hello thank you for the package. I noticed another small thing with the TimeOnly example

The server response is this

My suggestion would be as follows, the example time is from this documentation https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings#Roundtrip

Hi, thanks for the contribution! Could you please clarify the issue? Are you saying that example value doesn't have .0000000 at the end, and thus doesn't fully represent the TimeOnly type?

Hi, thanks for the contribution! Could you please clarify the issue? Are you saying that example value doesn't have .0000000 at the end, and thus doesn't fully represent the TimeOnly type?

I have not found any information on how exactly the time format is defined. I have only adapted it to the return value.

I have not found any information on how exactly the time format is defined. I have only adapted it to the return value.

Got it. What about https://docs.microsoft.com/en-us/dotnet/api/system.timeonly ?

Represents a time of day, as would be read from a clock, within the range 00:00:00 to 23:59:59.9999999

That would fit for example or?

Do you know how American time format is handled (AM/PM)? Or does TimeOnly support only 24-hour-format? Does serviver return different results for different locales?
Could you replace 30 minutes with 42? I like the 42 reference 😅

TimeOnly isn’t associated with any particular date, it is best visualized as a circular analog clock that might hang on your wall (albeit a 24-hour clock, not a 12-hour clock).
https://devblogs.microsoft.com/dotnet/date-time-and-time-zone-enhancements-in-net-6/

What is a sample value for TimeSpan?

https://github.com/dotnet/runtime/issues/53539


JSDoc Style Comment for VS Code.

Change the comments of methods to make it more user-friendly for VS Code users.

All the instances of @param {Callback(HookObject, hWnd, dwmsEventTime) => Interger} have the typo Interger instead of Integer.
Also, currently the callback function accepts three parameters: the hook object, hWnd, eventtime.
     * @param {Callback(hook, hWnd, dwmsEventTime) => Integer} Callback
     * - `hook`: the WinEvent hook object that triggered the callback
     * - `hWnd`: the window handle that triggered the event
     * - `dwmsEventTime`: the `A_TickCount` for when the event happened

Idk if the first argument should be named HookObject, hook, or something else. Hungarian notation doesn't really work here, but whatever :D
I think with these modifications I could merge the pull request.

All the instances of @param {Callback(HookObject, hWnd, dwmsEventTime) => Interger} have the typo Interger instead of Integer.

Typo fixed:)

Also, currently the callback function accepts three parameters: the hook object, hWnd, eventtime.
     * @param {Callback(hook, hWnd, dwmsEventTime) => Integer} Callback
     * - `hook`: the WinEvent hook object that triggered the callback
     * - `hWnd`: the window handle that triggered the event
     * - `dwmsEventTime`: the `A_TickCount` for when the event happened

Idk if the first argument should be named HookObject, hook, or something else. Hungarian notation doesn't really work here, but whatever :D
I think with these modifications I could merge the pull request.

I think using eventObj as the parameter name is quite clear, because the class name is WinEvent. :)


feat(ci): run rustfmt in CI

Blocked on https://github.com/steveklabnik/simple-server/pull/30

I've rebased this on top of the other PR so we can see it pass once that is merged.


Update syntax to es6

To align with near future changes in React. Closes #8

🙇 @davidtheclark addressed your feedback!


Fix js-yaml, type imports

This fixes the use of js-yaml by npm i-ing to fix the lock, adding the right types package, and then calling the right function.
I also made a minor loader fix; the imports at the top to get the type for the lazily-loaded modules will actually cause an import to occur immediately. I can revert this part if you'd like.
There are some other type errors to do with the thrown errors, but they don't appear when running tsc because the version of TypeScript this repo uses is super out of date (far past what DefinitelyTyped supports, so I would strongly suggest upgrading).

Will this get a release, or is this blocked by waiting for a new maintainer (#277)?


Permit custom Instant::now() emplementations in no_std environments

Instant::now() is dependent on the std crate and therefore disabled when setup to run in a no_std environment. That's understandable.
I have however gotten FreeRTOS running in my no_std environment, which permits me to replicate the behaviour of Instant::now() like so:
pub fn now() -> Instant {
    Instant::from_millis(FreeRtosUtils::get_tick_count_duration().to_ms())
}

Would it be possible to enable this library to link to a user defined Instant::now() function if enabled with a feature? Maybe something that could be tagged in the same way #[panic_handler] works?

What would be the point? Instant::now is never used within smoltcp itself.

It's used in the examples.
It could be useful to provide libraries a portable way to get the current time as well.
In my case I'm experimenting with FreeRTOS+smoltcp integration. I got the DHCP example working, but had to implement the now() function myself. I'd like to make it available to the users in a familiar syntax, making the difference from std environment hardly noticeable.

I don't think the complexity of the mechanism you propose (i.e. something similar to #[panic_handler]) is justified by the benefit of avoiding change a single line in example code.


Allow one Image select

how can config component so it allow only selection of single image currently can select multiple images

you can use prop singleImage={true}.
It is there, but not showing in the documentation at the moment.

i am setting singleImage={true} but its not working it is selecting more then one images and showing there preview.  i only want to show preview of one image

using singleImage={true} is restricting from selecting multiple images at a time. But still multiple images can be selected by one at a time.

Maybe someone who worked with the Component might figure out how to implement a behaviour that only allows for a single Image to be added at a time (Just like singleImage={true} already does.) and whenever another is selected it removes the Image that's already there, only to replace it with the new one.
Since this seems more like the intended way adding a singe Image would work, I propose to make this new behaviour work with the singleImage prop.

A quick solution would be to disable the button when there's an image.
Adding the following to the <button /> element should do the trick
disabled={this.props.singleImage && this.state.files[0]}

@juusaw Where are you see the button ? Or you change the the source component code ?

That's internal to the library, yes. So an update to the library would be required.

For fix this issue need to add
			if (this.props.singleImage) { 				dataURLs = []; 				files = []; 			}
in onDropFile() method inside component.

none of them suggestion working,
@juusaw button is not disabling at all , even when I use disabled={true}
@vsshaposhnikov  if I paste this code in onDropfile() under compiled.js or index.js in the react-native-images-upload , it does not pick a single image.

So far my best quick fix is to add display: 'none' to the buttonStyles prop if there are 1 or more images.  This way the button does not appear.

@taylorstyers
Have you add the style directly on source code? or on your style css?

@taylorstyers
buttonStyles only works on hard coded style. but when I put a function It doesn't work..
buttonStyles={{display: function()}} doesn't work
buttonStyles={{display: 'none'}} working


Plant Sower and Forestry Sapling

For some reason forestry saplings are not getting planted by the plat sower. Is that intentional? I am trying to start a cherry wood farm and it won't plant anything other than vanilla saplings

It's not intentional but I can't fix it either I will try to figure it out overtime.


Implement == compilation

We do already compile < and > but still not compile ==, the interpretation of it is already done. So there are no changes in the VM needed just the Compiler

i want to work on it. can you assign

Of course, assigned you! @shivamxsurya

@shivamxsurya Any progress?

Done!


Customizable button colors

Can button colors be customizable? Default color doesn't align with our app theme.

hey @cloudscore which buttons are you referring to?

All the buttons. Ok, cancel and neutral. As to align with app theme the separators better be customizable as well.

Hi @gusparis is there any update regarding this? Update on this will be helpful.

hello! yes, I will be adding this enhancement in next build. I was working on fixing the multiple build issues we had. Feel free to commit the changes you would like and will gladly review them. Cheers!


🧪 Improving Code Coverage with new pytests

As of right now, there is only 2, or more like a single test for the whole library.
Tasks
Implement new pytests to validate the behavior of objects, utils and core components of the library.
All missing tests on current should be passed.

Hello, I just added this PR to increase code coverage.
I'll try to add more if I have time.

Closed due to depreciation, thank you for your effort ♥


advice

This article is automatically translated
Proposal
Go is great, and this has led me to a solution to make go code readability easier.
We are looking for a way to read and write (global variable concurrency without contention).
Background
Our current concurrency solutions are problematic.
The problems piled up as the project got bigger.
Option 1 is usually locked: but this approach can greatly affect code readability, especially in the if scope.
mutexb.Lock()
mutexb.Unlock()
This scheme made our million-line project code extremely complex, and failing to add it would result in an error and flash back.
Such stability is unacceptable to us. It is difficult to audit anyone without mistakes.

Option 2.  GOMAXPROCS(1) // Single thread
This approach will affect the CPU multi-core utilization, we use multi-open process approach can also achieve the goal
Concurrent reading and writing of global variables will cause an error flash back result, which is about 80% less than the occurrence of multi-core, but there are still a small number of concurrent competing flash back
Workarounds
We hope that GO can add an automatic locking mode for reading and writing global variables to avoid concurrent flashback caused by locking errors
Or something like this to increase concurrency stability
Runtime. GOMAXPROCS(1) // Single thread

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions


Fix hide when snackbar not exists

If hide called before show it try to read property timeout of null

Thx for the fixe, its in v1.3.1


Reconfigure pre-commit

It looks like we want to use pre-commit for code quality again (given that .pre-commit-config.yaml is here), but the settings for mypy and ruff are missing.

[x] Upgrade all pre-commit hooks to the latest versions
[x] Add all configuration back
[ ] Fix all the issues that arise

I just pushed a branch where I completed the first 2 steps, but I don't like the look of the next step...
Found 707 errors (133 fixed, 574 remaining).
No fixes available (136 hidden fixes can be enabled with the `--unsafe-fixes` option).


Fix a typo/phrase in documentation. 📝

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Fix OOM handling in TempArenaAllocator

My last fix to reduce memory usage inadvertantly introduced a bug where an OOM could occur while reusing an existing TempArenaAllocator.
This change cleans up OOM handling in that class and centralizes all guest arena registration in that class to AdviseInUse

@dotnet-bot test Ubuntu ubuntu_linux_release please

@curtisman please review

@dotnet-bot test Ubuntu ubuntu_linux_release please


Vulnerabilty with ejs which is dependant on angular-devkit

Command
new
Is this a regression?

[ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
No response
Description
Running npm audit on Angular v16 project causes an error output, because @angular-devkit/build-angular depends on vulnerable version of ejs.
for more details: GHSA-ghr5-ch3p-vcr6
Minimal Reproduction
Create new Angular v16 project.

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1602.5 (cli-only)
@angular-devkit/core         16.2.5 (cli-only)
@angular-devkit/schematics   16.2.5 (cli-only)
@schematics/angular          16.2.5 (cli-only)

Anything else relevant?
No response

ejs is not a direct nor a transitrive dependency of<EMAIL_ADDRESS>yarn why ejs
yarn why v1.22.19
[1/4] Why do we have the module "ejs"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
error We couldn't find a match!
Done in 0.63s.


Upgrade to Gradle 8

Upgrade to Gradle 8 (Gradle wrapper)
Update com.gradle.plugin-publish plugin to 1.1.0 (previous version is not compatible with Gradle 8)
Update publishing section of the build file to make it work with the new publishing plugin (at least it does not fail anymore)
Fix Gradle plugin API compatibility issue in TestSetsPlugin.kt

Fixes #131

BTW. If a Gradle plugin is built with Gradle 8, what minimal Gradle version it will be working with?

I'm not a specialist but as far as I understand, as long as the plugin does not use any newer API, it will continue to work with Gradle 5.1 as before.
BTW, in hindsight I now realise that upgrade to Gradle 8 is not actually necessary to fix this API compatibility. I can remove that part of the PR, if you like.

I am not a maintainer and don't have an opinion regarding bumping the Gradle version. I just wanted to make sure that doing that won't make the plugin incompatible with Gradle 6+.

@tkrullmann are you still maintaining this project?

This project seems abandoned. I would recommend migrating to JVM Test Suite plugin

why is this still pendng?

Why is this not merged yet?

a release also needed...in order to be able to use it...

@tkrullmann any estimate of release with this fix, please?


Feat/civ 3263

JIRA link (if applicable)
CIV-3263
Change description
Added changes so that I2P changes to Judge referral or Proceeds in heritage system depending on the claim's traits
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[X] No

Replaced by branch 3263-b


Fix log deletion

The log server returns error 500 when a log is deleted.

This was a filter initialization issue. It has been resolved in commit 59e4adf7e62f07e38573bbf9deea30bc3a778153


Add the PromptFlow from "On Your Data" and check it works with our index

Required by https://github.com/Azure-Samples/chat-with-your-data-solution-accelerator/issues/406
Description
Create and deploy a flow which mimics the current converstation flow.
Tasks

[ ] Spike replicating the behavior in prompt flow and how to deploy
[ ] Create flow
[ ] Deploy the flow via Bicep

Update 20th May:

Currently working on spiking the implementation
We've successfully replicated orchestration flow in prompt flow
We've successfully exported the flow and run this locally using pf flow serve ...
We're hitting an issue when trying to build the flow using pf flow build...

We need this to be able to deploy it to Azure App Service
The issue is that the Azure AI Search connection is not being picked up by the pf flow build command
We've raised an issue here as I believe it is a bug with the pf tool https://github.com/microsoft/promptflow/issues/3313
We'll keep digging for solutions

Further Update 20th May:

I've managed to get around the issue with the AI Search connection not being picked up by adding connection: aisearch_connection to the lookup node
I'm now running into another issue where running the built executable works, but sending queries through it results in a 401 -Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired. error when calling OpenAI.

I've checked the Key is correct and all is good
I'll continue to investigate

Update 21st May:

After receiving guidance from the prompt flow team, I have been able to deploy the flow to an AML endpoint
Discussed this with the team and this is more desirable than deploying to an App Service as it's closer to where the prompt flow is defined and experimentation is run
Next step is to work out how to deploy an AML endpoint using bicep

Update 24th May:

I've got the workspace and connections deploying successfully using Bicep
However, it does not seem to be possible to deploy a flow and a corresponding endpoint using Bicep
I've explored using deployment scripts, but these run on a container in Azure, it's not trivial to install the required dependencies (pfazure) and it does not have access to local files.
As a fallback, we could look at using a azd postprovision hook, which runs locally to deploy the flow. The main downside of this, is that there would be a manual step for users who deploy using one click deploy.
I'll discuss with the team to decide next steps.


[SPARK-23280][SQL] add map type support to ColumnVector

What changes were proposed in this pull request?
Fill the last missing piece of ColumnVector: the map type support.
The idea is similar to the array type support. A map is basically 2 arrays: keys and values. We ask the implementations to provide a key array, a value array, and an offset and length to specify the range of this map in the key/value array.
In WritableColumnVector, we put the key array in first child vector, and value array in second child vector, and offsets and lengths in the current vector, which is very similar to how array type is implemented here.
How was this patch tested?
a new test

retest this please

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/449/
Test PASSed.

Test build #86896 has started for PR 20450 at commit 182b404.

LGTM only some nits and naming issues.

LGTM

Test build #86896 has finished for PR 20450 at commit 182b404.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/86896/
Test PASSed.

thanks, merging to master/2.3!

I found that we don't enable getMap API in MutableColumnarRow in this change, should we do it? If so, I can make a small follow-up PR for it.

@viirya Thanks! but I'm working on it. I'll do it soon.

@ueshin Ok. No problem. :)


Unconfirmable requests should return immediately.

Hi there, here is my test case:
var coap = require('coap');
var req = coap.request({
  host: 'localhost',
  port: 8360,
  pathname: '/event',
  method: 'POST',
  confirmable: false
}).end("hello");

I'm simply trying to make a request and return immediately, in a fire and forget fashion. Unfortunately the client hangs forever until a timeout happens.
Is this a bug or there is some other option that I couldn't find?
Thanks,
Chris

Non confirmable requests still have a response, the client is waiting for that.

You mean if the recipient rejects the message? That's the only case I can find in the spec. Still that could be handled differently from the library e.g. with a flag and an event listener and not as the default case. It's a bit weird sending something in an unreliable fashion and still waiting some kind of response.

@cv711, please refer to RFC7252 section 5. The request/response semantic in CoAP is separate from confirmable/non-confirmable messages.
That is, CoAP request must always expect a response and in the absence of any abnormalities (server not reachable, network loss, etc.) the request will always receive a response.
In case of non-confirmable request a separate response message is expected.
In case of confirmable request there are two possible responses:

Acknowledgment message plus an additional response message
Piggybacked response message (Combined acknowledgment and response messages).

You can find more details in the link.


Add correlation cost layer

I just copied the files from my PR in tensorflow and slightly (+ blindly) adjusted the BUILD. Hence, this is really WIP.
References:

https://github.com/tensorflow/tensorflow/pull/21392#issuecomment-440720577

I will rebase to master when I can run those ci test locally + adding a comprehensive commit message.
The docker command seems to not contain any way to run CUDA.

I just copied over the file and slightly (+ blindly) adjusted the BUILD. Hence, this is really WIP.

For reference:
https://github.com/tensorflow/tensorflow/pull/21392

The GPU support is still in process: https://github.com/tensorflow/addons/issues/118

I did a rebase to the master branch and fixed some path+lines in my code to adapt it to this addons-repo.
I will not join the tf-eager-execution-club. I added the tf.compat.v1.disable_eager_execution() to have a proper TensorFlow without this eager-exec-bull***t to preserve my own sanity and let other people take care of the tf-eager-crap.

Lol thanks you're entitled to your opinion. I would like to work on this, but will probably wait until dynamic kernels are finalized. Once it's done maybe we can benchmark autograph and graph mode performance of the same layer.
I'll reach back out to you if/when I have questions if thats alright.

Just glanced at the code it's all the op call it seems so probably will not need to benchmark. I'll see if we can adapt it to eager in the short term. GPU support might wait for dynamic kernels so we don't package 2 addons

The GPU support is already in the BUILD for BAZEL (in the comments). I can do the adjustments for the GPU stuff when dynamic kernels with Cuda is described somewhere.
The unit-tests are quite slow for the CPU version.
Honestly, I tried the eager part for the tests, but I had no time to find a good way to compare CPU and GPU output.
Btw: The workflow from the contribution.md in this repo with the docker image is nice and helpful!

Any news on this?

This got pushed for some other work, but GPU testing is now setup so I'll try to have this done by the end of the week

@tensorflow/sig-addons-maintainers Ready for review.
Tests are run in eager and graph, exposed as a Keras Layer and op if needed. GPU compiling / testing works.
There is a fail on py2-gpu that seems unrelated to this. It's the same fail from todays CI run and looks like its a bug in tf-core nightly or something.

@PatWie Hi, Patrick. Could you add some docstring for this class when time allows? I find its API document lacks necessary information:
https://github.com/tensorflow/addons/blob/r0.5/docs/api_docs/python/tfa/layers/CorrelationCost.md
It seems that we should hide correlation_cost function, and only expose CorrelationCost in public.
https://github.com/tensorflow/addons/blob/r0.5/docs/api_docs/python/tfa/layers/optical_flow/correlation_cost.md
Please correct me if I'm wrong, thank you :-)

@facaiy . The code is documented (just the c++ part)! Does
https://github.com/tensorflow/addons/blob/76249547c481ed47bd6f2f8092a99cd64d37fd2f/tensorflow_addons/custom_ops/layers/cc/ops/correlation_cost_op.cc#L92-L109
help? Like I already stated, I'm not a big friend of Keras, TF2 and co. I create my graphs as I did since the first TF has been release.

Unfortunately, I'm afraid that we only provide API document in python side for users. No worries, I filed an issue to seek help from community https://github.com/tensorflow/addons/issues/509

Hi @PatWie , Since the documentation has already been done in C++ part. I am just copying and pasting it.
As per another task in this issue, I will make the correlation_cost function private.
@seanpmorgan , Please let me know if any other changes are there. I am new to open source and will appreciate your inputs.
Thanks

Hi @PyExtreme, many thanks for the help! What you mentioned above are the points for this issue. Just go ahead so that we could directly give you some feedback during review! Thanks again :smiley:


Support for multiple partials path

Is it possible the partials config options accepts an array of paths instead of a single path?

Right now it only accepts a single path. You can however nest as much folders as you want under that path.


Still Microsoft Security Warnings in MF Installer

Describe the bug
MF Installer still give a Security Warning when we use it first time on a Computer
Steps To Reproduce
Steps to reproduce the behavior:

Download the installer from Homepage
Run It !
To test once again you must download it for new ( whatever the 100% same file).  If you run the original file a second time the warning is gone ( cause you accept it on first run) .....   So simply run a "new" instance and issue occure again.

Expected behavior
Would be cool to avoid this..... Cause for new Users without experience in Computers this warning sound like a critical information that MF is Spyware or Hacking Stuff!
Actual behavior
Users get scarred    :-)
Details

MobiFlight Version: ALL

Additional context
@kkr0kk  still say..... This is related to Microsoft itself and we would need to buy a verification licence!
May a other advanced GitHub User read this and know a way to solve this for free!
(Open Source Freeware is not be able to pay 800$ per Year for this !)

for my knowledge, toi avoid this we need to sign the APP with an EV certificate, is expensive, and you need legal compagny to get one.

I have submit installer to microsoft to up reputation, but i'm not sure the next one will be OK.
And users need to get updates to not have warnings (so maybe some weeks).
mobiflight-installer.exeSubmission ID: e6d8d227-dd30-436a-8fab-6de55c120154Status: CompletedSubmitted by<EMAIL_ADDRESS>Sep 23, 2021 18:59:21User Opinion: Incorrect detectionAnalyst comments:
The warning you experienced indicates that the application had not established reputation with the Microsoft Defender SmartScreen Application Reputation feature at that time. We can confirm mobiflight-installer.exe, (SHA256 - cf6e19ce42b45312da77e0cc6035270e820a2115b905cf4fc165c7b23d7bc043) has since established reputation and attempting to download or run the application should no longer show any warnings.
Please note, however, that the submitted files are not signed using a valid digital certificate. Unsigned files will have to establish reputation each time a new version is released.
Application Reputation warnings are meant to indicate when applications do not have known positive reputation. This doesn’t mean that the application is malicious, only that it is “unknown.” Users can still proceed to download and run the application. If establishing reputation immediately is critical, you may want to consider investing in an EV Authenticode certificate. A valid EV Authenticode certificate can immediately establish reputation with SmartScreen reputation services even if no prior reputation exists. In order to be considered a valid EV certificate, the certificate must be issued by a Certificate Authority that is authorized by the Microsoft Trusted Root Certificate Program and recognized as an Extended Validation issuer.
Thank you for contacting Microsoft.
Click here for more information

@kkr0kk - Thank you. Since the installer doesn't update too often I think we give this approach a try. Maybe in the near future there will be a viable way for open source projects to get this kind of certificates for less money.


Populate only R files from build cache to build.

This is a proposed fix/workaround for issue https://github.com/virtualstaticvoid/heroku-buildpack-r/issues/66

Looks good. I'll pull down your changes this evening and give it a test.

Thanks @glendudek. I've taken your fixes and applied to cedar-14 branch in #68

Cool, many thanks for the buildpack and support!


Test User Input app v002

very basic app, allows to test the bangle.js input interface,
v.0.0.2: removed warnings, added images and screenshots to README.md

Thanks! Looks really handy.
Do you have any changes to apps.json? Right now your app won't appear in the app loader without them. The apps/testUserInput/test_userInput.info file doesn't actually need to be committed as it's created automatically.
Info here: https://www.espruino.com/Bangle.js+App+Loader

Thanks! Looks really handy.
Do you have any changes to apps.json? Right now your app won't appear in the app loader without them. The apps/testUserInput/test_userInput.info file doesn't actually need to be committed as it's created automatically.
Info here: https://www.espruino.com/Bangle.js+App+Loader

I think i was following a deprecated procedure. I've just modified the apps.json, added the app.png and a minor change on js.
It will be easy to commit my 2nd and next app :)

Thanks! I don't see the apps.json yet I'm afraid...
Just so you know the icon's usually done in JS as well (rather than a .img) - did you find some out of date instructions somewhere? Do you remember where? I can try and get them changed :)

I believe the issue is it's case sensitive - so you have a folder called testUserInput but the app ID is testuserinput. I'll just merge and tweak this here.

Just sorted! I'll get it live on banglejs.com/apps today. If you're interested in what needed tweaking, it's here: https://github.com/espruino/BangleApps/commit/11530da1726dac368f7dc961246ec286b68bd9a2


Use with Shelly 3EM MQTT?

Hi!
Fantastic esphome component and great work!
I was wondering if it is possible to get it working with a Shelly 3EM with MQTT enabled. The Shelly does not provide a topic with total power consumption. It has a topic for instantaneous active power per channel (https://shelly-api-docs.shelly.cloud/gen1/#shelly-3em-mqtt). Can we do some sort of calculation and sum up the three channels (topics) in the YAML?
Or can i get It from the json of the HTTP status page? This looks like this:
{
   "actions_stats" : {
      "skipped" : 0
   },
   "cfg_changed_cnt" : 0,
   "cloud" : {
      "connected" : false,
      "enabled" : false
   },
   "ct_calst" : 0,
   "emeter_n" : {
      "current" : 0,
      "is_valid" : false,
      "ixsum" : 12.68,
      "mismatch" : false
   },
   "emeters" : [
      {
         "current" : 2.06,
         "is_valid" : true,
         "pf" : -0.95,
         "power" : -458.43,
         "total" : 226923.9,
         "total_returned" : 517029.3,
         "voltage" : 234.79
      },
      {
         "current" : 1.87,
         "is_valid" : true,
         "pf" : 0.81,
         "power" : 357.2,
         "total" : 269829.5,
         "total_returned" : 0,
         "voltage" : 235.29
      },
      {
         "current" : 11.34,
         "is_valid" : true,
         "pf" : 1,
         "power" : 2629.79,
         "total" : 1348406.2,
         "total_returned" : 0,
         "voltage" : 232.09
      }
   ],
   "fs_free" : 153612,
   "fs_mounted" : true,
   "fs_size" : 233681,
   "has_update" : false,
   "mac" : "E8DB84D68FFB",
   "mqtt" : {
      "connected" : true
   },
   "ram_free" : 25556,
   "ram_total" : 49928,
   "relays" : [
      {
         "has_timer" : false,
         "is_valid" : true,
         "ison" : true,
         "overpower" : false,
         "source" : "input",
         "timer_duration" : 0,
         "timer_remaining" : 0,
         "timer_started" : 0
      }
   ],
   "serial" : 92,
   "time" : "12:42",
   "total_power" : 2528.56,
   "unixtime" :<PHONE_NUMBER>,
   "update" : {
      "has_update" : false,
      "new_version" : "20220830-080542/v1.12-3EM-gcf4f7c2",
      "old_version" : "20220830-080542/v1.12-3EM-gcf4f7c2",
      "status" : "idle"
   },
   "uptime" : 3009,
   "v_data" : 1,
   "wifi_sta" : {
      "connected" : true,
      "ip" : "192.168.1.X",
      "rssi" : -59,
      "ssid" : "AAAAA"
   }
}

Best regards!

Yes. You could subscribe all instantaneous power topics and use a template sensor to provide the sum:
sensor:
  - id: l1
    internal: true
    platform: mqtt_subscribe
    name: "${name} instantaneous power consumption l1"
    topic: "shellies/shellyem3-DEVID/emeter/1/power"
    accuracy_decimals: 2
    unit_of_measurement: W
    device_class: power
  - id: l2
    internal: true
    platform: mqtt_subscribe
    name: "${name} instantaneous power consumption l1"
    topic: "shellies/shellyem3-DEVID/emeter/2/power"
    accuracy_decimals: 2
    unit_of_measurement: W
    device_class: power
  - id: l2
    internal: true
    platform: mqtt_subscribe
    name: "${name} instantaneous power consumption l1"
    topic: "shellies/shellyem3-DEVID/emeter/2/power"
    accuracy_decimals: 2
    unit_of_measurement: W
    device_class: power
  - platform: template
    id: powermeter
    name: "${name} instantaneous power consumption sum"
    lambda: |-
      if (id(l1).state && id(l2).state && id(l3).state) {
        return id(l1).state + id(l2).state + id(l3).state;
      } else {
        return 0.0;
      }
    update_interval: 15s

Please feel to ask additional questions if the idea doesn't solve your issue. Otherwise please close the issue!

Okay, that looks good! I will give it a try!
On the other hand i'm looking for a solution where I have no problem if my homeassistant/raspberry is offline. I was thinking about talking directly with the shelly 3EM. Can I get it from the HTTP call and extract it?

Good point. Extracting the value from a json response should also be possible. Please take a look at the http request component: https://esphome.io/components/http_request.html
If you are unable to create a proper solution by combining a template sensor and the http request please ping me again.

Got it working with your links! Thanks a lot!
Here is how I did it, maybe it's useful for an example in the repository:
`  - platform: template
id: powermeter
name: "${name} instantaneous power consumption sum"
lambda: |-
if (id(powermeter).state) {
return id(powermeter).state;
} else {
return 0.0;
}
update_interval: 2s
time:

platform: sntp
id: sntp_time
on_time:
Every 1 second

seconds: /1
then:

http_request.get:
url: http://<IP_ADDRESS>/status/
headers:
Content-Type: application/json
verify_ssl: false
on_response:
then:
- lambda: |-
json::parse_json(id(http_request_data).get_string(), [](JsonObject root) {
id(powermeter).publish_state(root["total_power"]);
});`

Thank you for this possibility to read out the Shelly3EM directly!
A small addition for shelly-3em-http-status-json.yaml: The 2nd line (id: http_request_data) is needed, to prevent a error message during compiling:
http_request:
    id: http_request_data
    useragent: esphome/device
    timeout: 5s

I don't see the benefit of storing the response in a global variable. Do I miss something?

I cant' t explain it either. But  I read some reports that people had success with this measure. E.g. here:
https://github.com/esphome/issues/issues/4250
I'll tell you if it makes a difference.

Ok, it isn't an improvement. After 2h I got this:

My yaml includes the Wifi signal sensor. The frequent errors seem to occur when the wifi signal is weak. That does not explains to me the heap error.
The ESP is no longer responsive after some errors. It might not be a good idea to have the timeout time for  http_request greater than the call frequency. Therefore I set timeout to 800ms now - hopefully it helps.

This is my guess: The error looks critical but it isn't. Every now and then the Shelly doesn't provide a valid response. Let's assume the connection gets dropped and there is no response at all. In this case this implementation
json::parse_json(id(http_request_data).get_string(), [](JsonObject root) {
  id(powermeter).publish_state(root["total_power"]);
});

tries to parse_json() an empty string or something else with a size of 0 bytes. This will lead to the error above. You could try to catch this case using an if condition.

Please try:
std::string response_data = id(http_request_data).get_string();
if(!response_data.empty()) {
  json::parse_json(response_data, [](JsonObject root) {
    id(powermeter).publish_state(root["total_power"]);
  });
}

The ESP is no longer responsive after some errors. It might not be a good idea to have the timeout time for  http_request greater than the call frequency. Therefore I set timeout to 800ms now - hopefully it helps.

Good catch! If the requests pile up there could be a serious memory issue for sure.

Please try:
std::string response_data = id(http_request_data).get_string();
if(!response_data.empty()) {
  json::parse_json(response_data, [](JsonObject root) {
    id(powermeter).publish_state(root["total_power"]);
  });
}

Unfortunately no difference:
08:32:47 | [E] | [json:080] | Could not allocate memory for JSON document! Requested 0 bytes, free heap: 7008
08:32:48 | [W] | [http_request:086] | HTTP Request failed; URL: http://<IP_ADDRESS>/status/; Error: connection failed; Duration: 824 ms
08:32:49 | [I] | [soyosource_display:232] | Status frame (Soyo, 15 bytes) received

May be the error is raised a the http_request component already. Could you add some debug instructions to the snippet:
std::string response_data = id(http_request_data).get_string();
ESP_LOGD("Lambda", "Response data: %s", response_data.c_str());
if(!response_data.empty()) {
  ESP_LOGD("Lambda", "Parsing JSON");
  json::parse_json(response_data, [](JsonObject root) {
    id(powermeter).publish_state(root["total_power"]);
  });
}

Oh sorry, I did a mistake, I compiled the wrong version.
https://github.com/syssi/esphome-soyosource-gtn-virtual-meter/issues/76#issuecomment-1477335306
gives no allocation errors, only warnings when the connection is lost:
[09:32:22][I][soyosource_display:442]:   Start delay: 3 s
[09:32:26][W][http_request:086]: HTTP Request failed; URL: http://<IP_ADDRESS>/status/; Error: connection failed; Duration: 521 ms
[09:32:26][W][http_request:086]: HTTP Request failed; URL: http://<IP_ADDRESS>/status/; Error: connection failed; Duration: 516 ms
[09:32:28][I][soyosource_display:232]: Status frame (Soyo, 15 bytes) received

Combined with the shorter http_request timeout it should be stable. Thank you for your help!!
An to complete the picture, this is the last working version:
http_request:
  id: http_request_data
  useragent: esphome/device
  timeout: 500ms

interval:
  - interval: 1100ms
    then:
      - http_request.get:
         url: ${shelly_3em_url}
         headers:
            Content-Type: application/json
         verify_ssl: false
         on_response:
            then:
              - lambda: |-
                  std::string response_data = id(http_request_data).get_string();
                  if(!response_data.empty()) {
                  json::parse_json(response_data, [](JsonObject root) {
                  id(powermeter).publish_state(root["total_power"]);
                  });
                  }
              - component.update: virtualmeter0


Feature Request => filter responses (status codes, length, etc)

Would it be possible to filter results based on status code, response length, words, regex?

status code and length are already implemented


Online-1048 Add top margin for footer

Pre-Flight checklist

[x] Screenshots and design review for any changes that affect layout or styling

[x] Desktop screenshots
[x] Mobile width screenshots

[x] Testing

[x] Code is tested
[x] Changes have been manually tested

What are the relevant tickets?
Fixes https://github.com/mitodl/mitxonline/issues/1048
What's this PR do?
Adds top margin for footer to add some spacing.
How should this be manually tested?
Visit the dashboard with and without enrolments.
Screenshots (if appropriate)

@pdpinch Please have a look at the Screenshots.

Codecov Report

Merging #1052 (fc89ab9) into main (fce9dca) will increase coverage by 2.77%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1052      +/-   ##
==========================================
+ Coverage   85.93%   88.71%   +2.77%
==========================================
  Files         284      141     -143
  Lines       10814     3827    -6987
  Branches     1168        0    -1168
==========================================
- Hits         9293     3395    -5898
+ Misses       1315      432     -883
+ Partials      206        0     -206

Impacted Files
Coverage Δ

openedx/apps.py

courses/constants.py

main/exceptions.py

users/urls.py

openedx/views.py

courses/apps.py

ecommerce/admin.py

flexiblepricing/views/v0/__init__.py

users/admin.py

cms/templatetags/feature_img_src.py

... and 133 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


feat: update to Capacitor v6

This PR updates @capacitor-community/photoviewer to Capacitor 6.

While I work at Ionic, I want to clarify that this contribution was made during my personal time. This is a personal contribution to the Capacitor community, and is not related to my work responsibilities. As such, I won't be able to maintain this plugin or assist with inquiries about contacting Ionic employees.

A big thanks to @jepiqueau for all the contributions to the Capacitor Community,.
Changes

Plugin migrated from Capacitor 5 to Capacitor 6 by running npx @capacitor/plugin-migration-v5-to-v6@latest, per plugin update docs.
Fix compilation issue when targeting Android SDK 34 (#56). Credit to @andrerds for the solution.
Major version bump.

Testing
Testers wanted. Minimal testing has been performed after updating using the example app on a PIxel 6 (Android 14) and iPhone 15 (iOS 17.0) simulator, with no issues reported.
I do not use this plugin and do not have the bandwidth or frame-of-reference to properly battle-test. It would be appreciated if users of this plugin could run a smoke test against their apps (after updating to Capacitor 6) and comment on this PR with their results.
Plugin maintenance
If you are interested in performing the role of maintainer for this plugin, please comment in the #capacitor-community channel of the Ionic Discord Server.

@eric-horodyski Thanks for this. This morning, @robingenz accepts to ensure the maintenance of the plugin. So discuss with him for the PR merge and the npm publish

@robingenz any eta on this ?

@eric-horodyski Seems like i miss some permissions in this repository. For example, i cannot create new milestones. Could you please check this?

Hey @robingenz, I don't have permission myself to make these adjustments (I work on the customer engineering side of the house). My colleagues on the Ionic Discord should be able to assist (you'll want the #capacitor-community channel).

@eric-horodyski Please resolve the last merge conflict.


Manually trigger TagBot

I encountered a situation where actions for CodecLz4.jl were disabled when the package was registered. I've re-enabled actions for the repo but the latest execution of TagBot was successful but it didn't create the tag. I believe I can extend the lookback to mitigate the problem but it seems annoying I need to make a new commit to trigger tag bot. Could we introduce a commit trigger similar to how the JuliaRegistrator works to address these kinds of issues?

#66
You can try to follow the logic of tagbot/action/__main__.py, filling in the commit SHA and release number manually. But yeah I should really make this nicer.


Inconsistent data type of statusCode in API response

Code of Conduct

[X] I agree to follow this project's Code of Conduct.

Submission validity

[X] This is not a personal support request, that should be posted on discussions community.
[X] I checked current issues and this request isn't a duplicate of an existing issue, opened or closed.

Self troubleshooting

[X] I've read the documentation and made sure to follow it.
[X] I've read the troubleshooting first steps and frequent issues guides.

Version
1.9.2
Description
In the API response for shortening a URL, if the request is successful, the statusCode in the JSON response is an integer. But in the case of an error, like the URL already having been shortened, the statusCode is returned as a string in the JSON.
Expectation
I would think it should be consistently one data type or the other.
Reproduction steps
Make a shorten API call for a new URL. The statusCode will be an integer in the response JSON. Now try to shorten the same URL again. In the error response the statusCode is now a string.
Context
I'd expect that both should be either an integer OR a string.

I would think it should be consistently one data type or the other.

As would I, and there are comments in the code supporting this:
https://github.com/YOURLS/YOURLS/blob/aed6bb9a5ad5ea79ff419cae103188ea8ac8a0a3/includes/functions-shorturls.php#L15-L16
Since it seems like strings are expected, I have made those changes and opened #3756 for the other maintainers to review.


Make it easier to get to standalone tier page

Here's a standalone tier card on the Collective page:

If you click read more you can see the campaign page:

But it's likely a lot of people will never do that, because they only click the big action button which goes straight to the checkout process.
I think if someone has gone to all the trouble of forcing a standalone tier and putting content in it, we should direct interested users there from the main Collective page.
So I suggest all of these are linked to the tier page:

Title of tier (headline of the card) should be a link
Main action button ('contribute' by default)
Read more, if we even need to keep that as a link once the above two are in place.

Sound great!

Bump! I really want this change... could it be a bounty @znarf @Betree ? My suggested change is simply to link the title and action button to the standalone page and then people can contribute from there, and remove read more to create more space for the description text.

@Memo-Es any opinion on this?

Could this be done any time soon please?

Link the title and action button to the standalone page, and then people can contribute from there, and remove the 'read more' link to create more space for the description text.

This issue is being addressed as part of the accessibility project of this sprint (Q1S2)
The design specs are described in the issue https://github.com/opencollective/opencollective/issues/4045#issuecomment-814614922.

We are applying new hover states for the card and the tier title.
Both the title and the read more link lead to the standalone tier page.
The button label should be tied to an action, in this case 'Contribute,' and therefore, it should lead you straight to the contribution flow.

@alanna @Betree


Documentation fix cherrypick

Cherry-pick documentation fixes to 5.5 branch

you know what you are doing, merge it

Waiting on staging build before merging.